[MOAB-dev] r1917 - in MOAB/trunk: . tools/iMesh

tautges at mcs.anl.gov tautges at mcs.anl.gov
Mon Jun 23 17:38:27 CDT 2008


Author: tautges
Date: 2008-06-23 17:38:27 -0500 (Mon, 23 Jun 2008)
New Revision: 1917

Modified:
   MOAB/trunk/MBCN.hpp
   MOAB/trunk/MBTest.cpp
   MOAB/trunk/tools/iMesh/iMesh_MOAB.cpp
Log:
Changing dimensions of some tables in MBCN, to save memory.  Reporting those sizes from MBTest.

Checking for valid entity in iterator-based functions in iMesh.

Passes make check.


Modified: MOAB/trunk/MBCN.hpp
===================================================================
--- MOAB/trunk/MBCN.hpp	2008-06-23 17:01:28 UTC (rev 1916)
+++ MOAB/trunk/MBCN.hpp	2008-06-23 22:38:27 UTC (rev 1917)
@@ -42,10 +42,10 @@
 #include "MBEntityType.h"
 
 // the maximum number n-1 dimension adjacencies a element may have
-#define MB_MAX_SUB_ENTITIES  24
+#define MB_MAX_SUB_ENTITIES  12
 
 // the maximum number of nodes an n-1 dimensional element may have
-#define MB_MAX_SUB_ENTITY_VERTICES 16
+#define MB_MAX_SUB_ENTITY_VERTICES 8
 
 typedef std::pair<MBEntityType, MBEntityType> MBDimensionPair;
 

Modified: MOAB/trunk/MBTest.cpp
===================================================================
--- MOAB/trunk/MBTest.cpp	2008-06-23 17:01:28 UTC (rev 1916)
+++ MOAB/trunk/MBTest.cpp	2008-06-23 22:38:27 UTC (rev 1917)
@@ -5827,7 +5827,14 @@
 
     // Check command line arg to see if we should avoid doing the stress test
   bool stress_test = true;
-  
+
+  std::cout << "Size of mConnMap = " << sizeof(MBCN::mConnectivityMap)
+            << std::endl;
+  std::cout << "Size of mUpConnMap = " << sizeof(MBCN::mUpConnMap)
+            << std::endl;
+  std::cout << "Size of MBCN = " << sizeof(MBCN)
+            << std::endl;
+    
   for (int i = 1; i < argc; ++i) {
     if (string(argv[i]) == "-nostress")
       stress_test = false;

Modified: MOAB/trunk/tools/iMesh/iMesh_MOAB.cpp
===================================================================
--- MOAB/trunk/tools/iMesh/iMesh_MOAB.cpp	2008-06-23 17:01:28 UTC (rev 1916)
+++ MOAB/trunk/tools/iMesh/iMesh_MOAB.cpp	2008-06-23 22:38:27 UTC (rev 1917)
@@ -881,18 +881,21 @@
     CHECK_SIZE(*entity_handles, *entity_handles_allocated, expected_size,
                iBase_EntityHandle, false);
   
-    int& i = *entity_handles_size;
+    int j = 0, i;
     for (i = 0; i < this_it->requestedSize; ++i, ++this_it->currentPos)
     {
       if (this_it->currentPos == this_it->iteratorRange.end()) {
         *is_end = false;
+        *entity_handles_size = j;
         RETURN(iBase_SUCCESS);
       }
-    
-      (*entity_handles)[i] = (iBase_EntityHandle)*this_it->currentPos;
+
+      if (MBimesh->is_valid(*this_it->currentPos)) 
+        (*entity_handles)[j++] = (iBase_EntityHandle)*this_it->currentPos;
     }
   
     *is_end = true;
+    *entity_handles_size = j;
     RETURN(iBase_SUCCESS);
   }
 




More information about the moab-dev mailing list