← Back to team overview

ffc team mailing list archive

Re: ordering of P2 nodes

 

ok.  But I have one more question.

Is there any kind of re-ordering of nodes that dolfin does internally? I thought I remembered seeing this. I have been trying to compare two matrices, and it looks like the entries are the same, except the ordering is a little different.

- Shawn

On Tue, 23 Jun 2009, Kristian Oelgaard wrote:

Quoting Shawn Walker <walker@xxxxxxxxxxxxxxx>:

Hello.  I need to know how FFC orders P2 Lagrange nodes.  I need to know
this in order to compare a FEM matrix that I created in another program.

For example, say you have one triangle with the following nodes:

[0 1 2 3 4 5]

Where is the #3 node in relation to the #0, #1, and #2 nodes?  Is #3
opposite the #0 node?

Yes.

I usually look at the tabulate_dofs() function, for the P2 case:

dofs[0] = c.entity_indices[0][0];
dofs[1] = c.entity_indices[0][1];
dofs[2] = c.entity_indices[0][2];
unsigned int offset = m.num_entities[0];
dofs[3] = offset + c.entity_indices[1][0];
dofs[4] = offset + c.entity_indices[1][1];
dofs[5] = offset + c.entity_indices[1][2];

So you see that the first 3 dofs are the vertices, the next 3 are the midpoints
of the edges. Then you need to know the UFC ordering of edges to figure out
that e0 is the edge which does not contain vertex 0 (opposite to v0) etc.

Kristian

- Shawn
_______________________________________________
FFC-dev mailing list
FFC-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/ffc-dev






Follow ups

References