On Tue, 1 Jun 2010, Vijay S. Mahadevan wrote:

>> Yes.  We're using C-like semantics here, where if you want to access
>> the 0th index in an array then the array should be at least length 1.
>
> Roy, I agree. But if I did want to know the dof_number associated with
> the a certain variable at a node (nodal dof) that does not have any
> components associated with it, then what do I specify for the third
> argument. This was my dilemma and since it's an unsigned int, I wasn't
> sure what else to specify. Or am I going about finding the dof_number
> for the node wrongly ?

If there aren't any components associated with a variable at a node,
then there doesn't exist a dof_number for that variable at that node.
If you're solving Q2/Q1 velocity-pressure, for instance, you need
HEX27 elements to give you enough velocity nodes, but the pressure
DoFs are only located on vertex nodes; to get the pressure value on
any other node you have to interpolate.

Which isn't a bad idea in general.  My own prejudice is that if
application code uses DofObject::dof_number directly then it's
probably doing something wrong, typically by making itself
incompatible with non-LAGRANGE elements.
---
Roy

------------------------------------------------------------------------------

_______________________________________________
Libmesh-devel mailing list
Libmesh-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to