[MOAB-dev] r5133 - in MOAB/trunk: src src/moab src/parallel test test/h5file test/io tools/dagmc

tautges at mcs.anl.gov tautges at mcs.anl.gov
Tue Aug 30 10:47:00 CDT 2011


Author: tautges
Date: 2011-08-30 10:46:59 -0500 (Tue, 30 Aug 2011)
New Revision: 5133

Modified:
   MOAB/trunk/src/Core.cpp
   MOAB/trunk/src/FileOptions.cpp
   MOAB/trunk/src/ScdElementData.hpp
   MOAB/trunk/src/ScdInterface.cpp
   MOAB/trunk/src/moab/ScdInterface.hpp
   MOAB/trunk/src/parallel/WriteHDF5Parallel.cpp
   MOAB/trunk/test/MBTest.cpp
   MOAB/trunk/test/Makefile.am
   MOAB/trunk/test/h5file/h5partial.cpp
   MOAB/trunk/test/h5file/h5regression.cpp
   MOAB/trunk/test/h5file/h5sets_test.cpp
   MOAB/trunk/test/h5file/h5varlen.cpp
   MOAB/trunk/test/io/read_nc.cpp
   MOAB/trunk/test/kd_tree_test.cpp
   MOAB/trunk/test/scdseq_test.cpp
   MOAB/trunk/tools/dagmc/Makefile.am
   MOAB/trunk/tools/dagmc/test_geom.cc
Log:
Mainly lots of bug fixes in partition computation for structured meshes.

This also adds back code that shuts down MPI if MOAB called MPI_Init.  In many cases, this required
adding calls to MPI_Init/MPI_Finalize to tests that start up/shut down MOAB multiple times.  This is
required because many MPI implementations (including openMPI) don't allow you to start up/shut down
MPI multiple times in the same run.

test/scdseq_test.cpp: test parallel partitioning methods more completely; also fixed bug in test
  code creating structured meshes sharing faces, where 3rd coordinate of shared interface mesh was
  specified wrongly; also brought this test under control of TestUtil stuff.
test/io/read_nc.cpp: startup/shutdown MPI properly if parallel version of MOAB.
src/Core.cpp: in destructor, un-comment code that calls MPI_Finalize if this instance called
  MPI_Init.
src/ScdElementData.hpp: Added parametric space check/assertion
src/ScdInterface.cpp: added checks on proper parameters in get_adj_edge_or_face; also corrected
  numerous bugs in partition and get_neighbor code; also added arguments to partition functions such
  that they don't depend on ParallelComm, so they can be called in serial.
src/FileOptions.cpp: corrected memory leak

Passes make check in serial and parallel.


Modified: MOAB/trunk/src/Core.cpp
===================================================================
--- MOAB/trunk/src/Core.cpp	2011-08-30 15:27:28 UTC (rev 5132)
+++ MOAB/trunk/src/Core.cpp	2011-08-30 15:46:59 UTC (rev 5133)
@@ -310,8 +310,8 @@
       logfile = default_log;
     MPE_Finish_log( logfile );
   }
-  //if (mpiFinalize)
-  //  MPI_Finalize();
+  if (mpiFinalize)
+    MPI_Finalize();
 #endif
 }
 

Modified: MOAB/trunk/src/FileOptions.cpp
===================================================================
--- MOAB/trunk/src/FileOptions.cpp	2011-08-30 15:27:28 UTC (rev 5132)
+++ MOAB/trunk/src/FileOptions.cpp	2011-08-30 15:46:59 UTC (rev 5133)
@@ -274,6 +274,7 @@
   for (char* i = strtok( tmp_str, separator ); i; i = strtok( 0, separator )) 
     if (!strempty(i)) // skip empty strings
       values.push_back( std::string(i));
+  free(tmp_str);
   
   return MB_SUCCESS;
 }

Modified: MOAB/trunk/src/ScdElementData.hpp
===================================================================
--- MOAB/trunk/src/ScdElementData.hpp	2011-08-30 15:27:28 UTC (rev 5132)
+++ MOAB/trunk/src/ScdElementData.hpp	2011-08-30 15:46:59 UTC (rev 5133)
@@ -135,6 +135,9 @@
     //! test whether this sequence contains these parameters
   inline bool contains(const HomCoord &coords) const;
 
+    //! test whether *vertex parameterization* in this sequence contains these parameters
+  inline bool contains_vertex(const HomCoord &coords) const;
+
     //! get connectivity of an entity given entity's parameters
   inline ErrorCode get_params_connectivity(const int i, const int j, const int k,
                                        std::vector<EntityHandle>& connectivity) const;
@@ -225,6 +228,17 @@
            (dIJKm1[2] && temp.k() >= elementParams[0].k() && temp.k() < elementParams[0].k()+dIJKm1[2])));
 }
   
+inline bool ScdElementData::contains_vertex(const HomCoord &temp) const 
+{
+    // upper bound is < instead of <= because element params max is one less
+    // than vertex params max, except in case of 2d or 1d sequence


More information about the moab-dev mailing list