On Fri, 16 Apr 2010, Boyce Griffith wrote: > On 4/16/10 1:15 PM, Roy Stogner wrote: >> >> On Fri, 16 Apr 2010, Boyce Griffith wrote: >>> >>> Thanks! Another hopefully quick question --- what is the argument i to >>> Mesh::point()? Is i supposed to be a dof index? (I am trying to >>> extract the values and spatial locations of each of the local DOFs.) >> >> No, a node index. There can be multiple DoFs on each node, as well as >> DoFs that are associated with elements instead of nodes. > > Right, of course... > > For a nodal FE method, I guess the think to do is to loop over the local > nodes and lookup the corresponding dof index using Node::dof_number(). > > In my case, I think there should always be a dof associated with each > element. But what happens if I were to use Node::dof_number() for a > variable/system which does not have a DOF associated with that node?
Assertion failure in debug/devel modes, OOB error otherwise. See the DofObject interface, though - you can query for how many systems are associated with a node/elem, how many variables are in each system at each node/elem, and how many DoFs are associated with each variable on a node/elem. It's probably better to use at least the last two interfaces rather than hard-coding something; otherwise just switching approximation spaces or adding more physics could break your code later. --- Roy ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
