On Wed, Apr 29, 2009 at 07:31:16AM -0500, Matthew Knepley wrote: > On Wed, Apr 29, 2009 at 6:17 AM, Jed Brown <[email protected]> wrote: > > 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 > > > Yep, it is geometric, not topological. > > > > Sieve/MeshSurgery.hh is all special-cased > > > Not mine. > > > > 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. > > > None of which is necessary for this crap. That code is used to construct fault > surfaces inside of a volume. I know how to do this topologically, but it > requires > a fully interpolated mesh. PyLith was unwilling to do this, so we had to > special > case since topology is thrown away. > > The real way to solve this is to construct the intermediates on the fly, but > it > takes > some real thinking to make this efficient, and I am only one person. > > > > 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. > > > I'm sure they care (a little). > > Matt
I care. It sure has a certain entertainment value. ;-) -- Anders
signature.asc
Description: Digital signature
_______________________________________________ DOLFIN-dev mailing list [email protected] http://www.fenics.org/mailman/listinfo/dolfin-dev
