dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #13268
Re: ufc ordering in parallel
Matthew Knepley wrote:
> I cannot be more emphatic here. <voice_of_god>THERE IS NO SPECIAL
> CASING</voice_of_god>. At all. In the whole thing. You can argue that
> in some cases it might be slower, but it works for any arrangement in
> any dimension. I will never put that special case crap in my
> code. Ever.
Voice of g-d or otherwise, the code disagrees.
compute{Triangle,Quadrilateral,Tetrahedral,Hexahedral,LineFace}Geometry
orientTriangle
MeshInterpolatePoints - Assumes 3D and tetrahedron
Sieve/MeshSurgery.hh is all special-cased
But the above is either necessary or superficial. Now consider
Selection::numFaceVertices which appears to require homogeneous topology
and assume that all faces have the same topology. Furthermore, if you
want to support dim > 3 or more exotic polyhedrons, it is no longer the
case that topological dimension and total number of vertices defines the
element topology.
switch (cellDim) {
case 0 :
_numFaceVertices = 0;
break;
case 1 :
_numFaceVertices = 1;
break;
case 2:
switch (numCorners) {
case 3 : // triangle
_numFaceVertices = 2; // Edge has 2 vertices
break;
case 4 : // quadrilateral
_numFaceVertices = 2; // Edge has 2 vertices
break;
default :
throw ALE::Exception("Invalid number of face corners");
}
break;
case 3:
switch (numCorners) {
case 4 : // tetradehdron
_numFaceVertices = 3; // Face has 3 vertices
break;
case 8 : // hexahedron
_numFaceVertices = 4; // Face has 4 vertices
break;
default :
throw ALE::Exception("Invalid number of face corners");
}
break;
default:
throw ALE::Exception("Invalid cell dimension");
}
Selection::faceOrientation is the same pattern with a bunch more code
(including another switch over orientation of each face of a hex, which
can be replaced with an array describing the canonical orientation).
The point is that this information needs to show up somewhere. The MBCN
convention allows it to show up in a couple of arrays defined in one
place, *reducing* the number of places that you need to special-case.
This is drifting rather off-topic for Dolfin, especially since they only
work with simplices anyway, so perhaps we should continue the discussion
off-list.
Jed
Attachment:
signature.asc
Description: OpenPGP digital signature
Follow ups
References
-
ufc ordering in parallel
From: Robert Kirby, 2009-04-28
-
Re: ufc ordering in parallel
From: Matthew Knepley, 2009-04-28
-
Re: ufc ordering in parallel
From: Anders Logg, 2009-04-28
-
Re: ufc ordering in parallel
From: Matthew Knepley, 2009-04-28
-
Re: ufc ordering in parallel
From: Anders Logg, 2009-04-28
-
Re: ufc ordering in parallel
From: Matthew Knepley, 2009-04-28
-
Re: ufc ordering in parallel
From: Jed Brown, 2009-04-28
-
Re: ufc ordering in parallel
From: Matthew Knepley, 2009-04-28
-
Re: ufc ordering in parallel
From: Jed Brown, 2009-04-29
-
Re: ufc ordering in parallel
From: Matthew Knepley, 2009-04-29