[MOAB-dev] Changes to CN (formerly MBCN)

Tim Tautges tautges at mcs.anl.gov
Thu Apr 22 13:25:01 CDT 2010


Hi all,
   I just wanted to alert you to some changes I made yesterday to the canonical numbering parts of MOAB.  These changes 
shouldn't really affect anybody using CN as part of MOAB, but could affect some using CN outside that context.

CN keeps canonical numbering information (vertex, edge, and face numbering for all types) in a set of statically defined 
arrays.  It also keeps information about adjacencies between sub-entities, e.g. which edges are adjacent to which faces 
in a 3d element.  Before yesterdays change, the edge-face and face-face adjacency information was kept not in canonical 
order, but in sorted order by index.  It was thought at the time that this would speed up booleans between these lists; 
in reality, since the lists are so small, it probably didn't make a difference speed-wise.  What it did do, though, was 
mess up construction of higher-dimensional, quadratic entities, e.g. a 9-noded quad, from lower-dimensional entities, 
e.g. from 3-noded edges.

Consider a 27-node hex, with mid nodes on edges, faces, and the hex.  To construct a bounding face from that hex, you need:
- the corner nodes, which can be recovered from the node indices of the face in the hex
- the order of edges on the face*
- the edge mid-nodes, which can can be recovered from the edge indices in the hex
- the face mid-node, which can be recovered from the face index in the hex
The 2nd one, the order of edges on the face, was the problematic one in this case.  Say, for quad 1 in a hex, the edges 
are ordered around that quad 0-5-8-4, in terms of edge indices.  Since that list used to be stored in sorted order, 
0-4-5-8, you would end up with the wrong order of vertices for that 9-noded quad.

The change that I made was to put these lists back into canonical order.  In all cases, the order of edges around a face 
is such that the implied normal points *out* of an element.  Face-face adjacencies (which gives the faces adjacent to 
edges bounding a face) were also adjusted for canonical ordering.

So, again, this change won't affect many people, if any, but if you were seeing flakiness in vertex order of 
lower-dimensional entities bounding an entity, this might have been why.

This change appeared in r3801 of MOAB.

- tim

-- 
================================================================
"You will keep in perfect peace him whose mind is
   steadfast, because he trusts in you."               Isaiah 26:3

              Tim Tautges            Argonne National Laboratory
          (tautges at mcs.anl.gov)      (telecommuting from UW-Madison)
          phone: (608) 263-8485      1500 Engineering Dr.
            fax: (608) 263-4499      Madison, WI 53706



More information about the moab-dev mailing list