[MOAB-dev] r2540 - MOAB/trunk

kraftche at mcs.anl.gov kraftche at mcs.anl.gov
Tue Jan 13 21:20:31 CST 2009


Author: kraftche
Date: 2009-01-13 21:20:31 -0600 (Tue, 13 Jan 2009)
New Revision: 2540

Modified:
   MOAB/trunk/MBCN.hpp
Log:
fix bugs: HasMidRegionNodes could return true for facces and edges with mid-element node & HasMidFaceNodes returned true for edge3

Modified: MOAB/trunk/MBCN.hpp
===================================================================
--- MOAB/trunk/MBCN.hpp	2009-01-14 02:40:05 UTC (rev 2539)
+++ MOAB/trunk/MBCN.hpp	2009-01-14 03:20:31 UTC (rev 2540)
@@ -474,6 +474,8 @@
 {
     // poly elements never have mid nodes as far as canonical ordering is concerned
   if (MBPOLYGON == this_type || MBPOLYHEDRON == this_type) return false;
+    // edges cannot have mid-face nodes
+  if (Dimension(this_type) < 2) return false;
 
   if (num_nodes == (VerticesPerEntity(this_type) + NumSubEntities(this_type, 2)) ||
       num_nodes == (VerticesPerEntity(this_type) + NumSubEntities(this_type, 1) + 
@@ -491,7 +493,7 @@
                                          const int num_nodes)
 {
     // poly elements never have mid nodes as far as canonical ordering is concerned
-  if (MBPOLYGON == this_type || MBPOLYHEDRON == this_type) return false;
+  if (Dimension(this_type) != 3 || MBPOLYHEDRON == this_type) return false;
 
   if (num_nodes == (VerticesPerEntity(this_type) + 1) ||
       num_nodes == (VerticesPerEntity(this_type) + NumSubEntities(this_type, 1) + 1) ||




More information about the moab-dev mailing list