[MOAB-dev] r1690 - MOAB/trunk/tools/iMesh

kraftche at mcs.anl.gov kraftche at mcs.anl.gov
Tue Mar 25 11:39:22 CDT 2008


Author: kraftche
Date: 2008-03-25 11:39:22 -0500 (Tue, 25 Mar 2008)
New Revision: 1690

Modified:
   MOAB/trunk/tools/iMesh/iMesh_MOAB.cpp
Log:
add special case for queries of iMesh_SEPTAHEDRON: always return no entities because there can never be any

Modified: MOAB/trunk/tools/iMesh/iMesh_MOAB.cpp
===================================================================
--- MOAB/trunk/tools/iMesh/iMesh_MOAB.cpp	2008-03-25 16:38:38 UTC (rev 1689)
+++ MOAB/trunk/tools/iMesh/iMesh_MOAB.cpp	2008-03-25 16:39:22 UTC (rev 1690)
@@ -388,6 +388,11 @@
                        /*in*/ const int entity_topology,
                        int *num_topo, int *err)
 {
+  if (entity_topology == iMesh_SEPTAHEDRON) {
+    *num_topo = 0;
+    RETURN(iBase_SUCCESS);
+  }
+
   *num_topo = 0;
   MBErrorCode result = 
     MBI->get_number_entities_by_type(ENTITY_HANDLE(entity_set_handle), 
@@ -639,8 +644,12 @@
   MBEntityHandle handle = ENTITY_HANDLE(entity_set_handle);
   MBErrorCode result;
 
-  if (use_top)
-    result = MBI->get_entities_by_type(handle, type, out_entities);
+  if (use_top) {
+    if (entity_topology == iMesh_SEPTAHEDRON)
+      result = MB_SUCCESS;  // MOAB doesn't do septahedrons, so there are never any.
+    else
+      result = MBI->get_entities_by_type(handle, type, out_entities);
+  }
   else if (use_type && entity_type != iBase_ALL_TYPES)
     result = MBI->get_entities_by_dimension(handle, entity_type, out_entities);
   else 
@@ -755,6 +764,8 @@
   else if (requestor_type == MBMAXTYPE)
     result = MBI->get_entities_by_dimension
       (in_set, entity_type_requestor, entities);
+  else if (entity_topology_requestor == iMesh_SEPTAHEDRON)
+    result = MB_SUCCESS;  // MOAB doesn't do septahedrons, so there are never any of them.
   else
     result = MBI->get_entities_by_type(in_set, requestor_type, entities);
   
@@ -871,6 +882,8 @@
       requested_entity_topology == iMesh_ALL_TOPOLOGIES)
     result = MBI->get_entities_by_handle( ENTITY_HANDLE(entity_set_handle),
                                           new_it->iteratorRange );
+  else if (requested_entity_topology == iMesh_SEPTAHEDRON)
+    result = MB_SUCCESS; // never any septahedrons because MOAB doesn't support them
   else if (MBMAXTYPE != req_type)
     result = MBI->get_entities_by_type(ENTITY_HANDLE(entity_set_handle),
                                        req_type,




More information about the moab-dev mailing list