[MOAB-dev] r5898 - in MOAB/trunk: doc src src/io src/moab test test/perf

tautges at mcs.anl.gov tautges at mcs.anl.gov
Wed Dec 5 11:56:45 CST 2012


Author: tautges
Date: 2012-12-05 11:56:44 -0600 (Wed, 05 Dec 2012)
New Revision: 5898

Modified:
   MOAB/trunk/doc/MOAB-UG.doc
   MOAB/trunk/src/Core.cpp
   MOAB/trunk/src/FBEngine.cpp
   MOAB/trunk/src/ReadUtil.cpp
   MOAB/trunk/src/ReadUtil.hpp
   MOAB/trunk/src/SequenceManager.cpp
   MOAB/trunk/src/SequenceManager.hpp
   MOAB/trunk/src/SpectralMeshTool.cpp
   MOAB/trunk/src/io/ReadGCRM.cpp
   MOAB/trunk/src/io/ReadNC.cpp
   MOAB/trunk/src/io/ReadTemplate.cpp
   MOAB/trunk/src/io/Tqdcfr.cpp
   MOAB/trunk/src/io/WriteCCMIO.cpp
   MOAB/trunk/src/moab/ReadUtilIface.hpp
   MOAB/trunk/test/MBTest.cpp
   MOAB/trunk/test/perf/perf.cpp
   MOAB/trunk/test/perf/runtest
Log:
Besides fixing a few warnings and improving the performance test a
bit, this commit changes the chunked allocation behavior.  When
creating mesh through the ReadUtil interface, the previous code
allocated at the default chunk size, defined in SequenceManager.  This
presents a problem when representing a small mesh with many, large
dense tags, since dense tags are allocated according to the chunk
size.  This has been changed such that applications can specify a
chunk size to the ReadUtil functions for creating nodes/elements.  The
default behavior was changed to use the exact number of nodes/elements
for the chunk size (or, when building in parallel, 1.5 times that
number, to account for ghosts that get added later).  Applications
calling the MOAB API functions (not the ReadUtil functions) for
creating vertices/entities still allocate at the original default
chunk sizes.

Passed make check in serial and parallel.

Specific changes:
SpectralMeshTool.cpp: remove a warning
ReadUtilIface, ReadUtil: add sequence size arguments to get_node_coords and get_element_connect,
  defaulted to -1 (which results in num_nodes/num_elements being used for sequence size)
SequenceManager: add a sequence size to create_entity_sequence, and change the way the
  sequence size is determined.  Also moved DEFAULT_*_SEQUENCE_SIZE variables to static public
  members, for use by other readers wanting to use the default size.
Core.cpp: initialized variable to remove warning.
Tqdcfr.cpp: explicitly specify default sequence sizes, since nodes/elements are allocated by
  geometric entity.  Also fixed a few compile warnings.
ReadTemplate.cpp, ReadGCRM.cpp: empty statements added to remove compiler warning
MOAB-UG.doc: added some info on chunked allocation
perf.cpp, runtest: changes from Gabriel Marin (ORNL) to allow calling iterator-based tests separately
test/MBTest.cpp: added sequence size parameter
WriteCCMIO.cpp: substituting the new tag_get_handle for a deprecated one.
FBEngine.cpp: getting rid of a few unused variables.



Modified: MOAB/trunk/doc/MOAB-UG.doc
===================================================================
(Binary files differ)

Modified: MOAB/trunk/src/Core.cpp
===================================================================
--- MOAB/trunk/src/Core.cpp	2012-12-05 15:45:14 UTC (rev 5897)
+++ MOAB/trunk/src/Core.cpp	2012-12-05 17:56:44 UTC (rev 5898)
@@ -1054,7 +1054,7 @@
                                   double *coords) const
 {
   const EntitySequence* seq = NULL;
-  const VertexSequence* vseq;
+  const VertexSequence* vseq = NULL;
   const EntityHandle* const end = entities + num_entities;
   const EntityHandle* iter = entities;
   ErrorCode status = MB_SUCCESS;

Modified: MOAB/trunk/src/FBEngine.cpp
===================================================================
--- MOAB/trunk/src/FBEngine.cpp	2012-12-05 15:45:14 UTC (rev 5897)
+++ MOAB/trunk/src/FBEngine.cpp	2012-12-05 17:56:44 UTC (rev 5898)
@@ -2207,11 +2207,9 @@
         const EntityHandle * conn2;
         rval = _mbImpl->get_connectivity(currentBoundary, conn2, nnodes2);
         MBERRORR(rval, "Failed to get connectivity");
-        EntityHandle thirdNode = conn3[0];
         int thirdIndex = -1;
         for (int j = 0; j < 3; j++) {
           if ((conn3[j] != conn2[0]) && (conn3[j] != conn2[1])) {
-            thirdNode = conn3[j];
             thirdIndex = j;
             break;
           }
@@ -2448,12 +2446,12 @@
   Range vertexRange;
   rval = getAdjacentEntities(edge, 0, vertexRange);
 
-  EntityHandle firstSet, secondSet;
+  EntityHandle secondSet;
   if (vertexRange.size() == 1)
   {
     // initially a periodic edge, OK to add the new set to both edges, and the
     // second set
-    firstSet = secondSet = vertexRange[0];
+    secondSet = vertexRange[0];
   }
   else
   {
@@ -2471,7 +2469,6 @@
          MBERRORR(MB_FAILURE, " node set not defined well");


More information about the moab-dev mailing list