ffc team mailing list archive
-
ffc team
-
Mailing list archive
-
Message #00176
Move computation of reordering of dofs on faces based on alignment to [...]
Commit from logg (2005-06-28 02:21 CEST)
----------------
Move computation of reordering of dofs on faces based on alignment to
new module alignment. Looks like it's working now, but not tested with
DOLFIN yet.
Example output for degree 6 Lagrange on tets:
void dofmap(int dofs[], const Cell& cell, const Mesh& mesh) const
{
static unsigned int face_reordering[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 4, 7, 9, 1, 5, 8, 2, 6, 3, 3, 6, 8, 9, 2, 5, 7, 1, 4, 0, 3, 2, 1, 0, 6, 5, 4, 8, 7, 9, 9,
7, 4, 0, 8, 5, 1, 6, 2, 3, 9, 8, 6, 3, 7, 5, 2, 4, 1, 0};
dofs[0] = cell.nodeID(0);
dofs[1] = cell.nodeID(1);
dofs[2] = cell.nodeID(2);
dofs[3] = cell.nodeID(3);
int alignment = cell.edgeAlignment(0);
int offset = mesh.noNodes();
dofs[4] = offset + 5*cell.edgeID(0) + ( alignment == 0 ? 0 : 4 );
dofs[5] = offset + 5*cell.edgeID(0) + ( alignment == 0 ? 1 : 3 );
...
alignment = cell.faceAlignment(0);
offset = offset + 5*mesh.noEdges();
dofs[34] = offset + 10*cell.faceID(0) + face_reordering[alignment*10 + 0];
dofs[35] = offset + 10*cell.faceID(0) + face_reordering[alignment*10 + 1];
dofs[36] = offset + 10*cell.faceID(0) + face_reordering[alignment*10 + 2];
}
+ ffc src/ffc/compiler/alignment.py 1.1
ffc src/ffc/compiler/dofmap.py 1.16