[MOAB-dev] r5430 - in MOAB/trunk: src/io test/parallel tools/mbzoltan

tautges at mcs.anl.gov tautges at mcs.anl.gov
Thu Mar 15 14:44:06 CDT 2012


Author: tautges
Date: 2012-03-15 14:44:06 -0500 (Thu, 15 Mar 2012)
New Revision: 5430

Modified:
   MOAB/trunk/src/io/WriteDamsel.cpp
   MOAB/trunk/src/io/WriteDamsel.hpp
   MOAB/trunk/test/parallel/parallel_unit_tests.cpp
   MOAB/trunk/tools/mbzoltan/MBZoltan.cpp
   MOAB/trunk/tools/mbzoltan/MBZoltan.hpp
   MOAB/trunk/tools/mbzoltan/mbpart.cpp
Log:
Fixed the tag_reduce test, was using a hardwired int type where I should have used template parameter T.
Also, adding functionality to partitioner to also put closure into part sets, controllable by option -c;
haven't written code to account for that in mesh read in, but will do that soon.  Also improved output from
partitioner on what it's doing.  Finally, also fixed some bugs and other issues in the Damsel writer.
   



Modified: MOAB/trunk/src/io/WriteDamsel.cpp
===================================================================
--- MOAB/trunk/src/io/WriteDamsel.cpp	2012-03-14 20:22:30 UTC (rev 5429)
+++ MOAB/trunk/src/io/WriteDamsel.cpp	2012-03-15 19:44:06 UTC (rev 5430)
@@ -12,8 +12,6 @@
 #include "Internals.hpp"
 #include "DenseTag.hpp"
 
-#define DAMSEL_ID_INVALID 0
-
 namespace moab {
 
   // Some macros to handle error checking (cribbed from WriteHDF5).  The
@@ -103,8 +101,11 @@
   assert(mError);
   
   impl->tag_get_handle(GLOBAL_ID_TAG_NAME, 1, MB_TYPE_INTEGER,
-                       mGlobalIdTag, MB_TAG_SPARSE|MB_TAG_CREAT);
+                       mGlobalIdTag, MB_TAG_DENSE|MB_TAG_CREAT);
 
+  impl->tag_get_handle("ENTITYSET_TRACK_OWNER", 1, MB_TYPE_OPAQUE,
+                       mSetFlagsTag, MB_TAG_DENSE|MB_TAG_CREAT);
+
   moabHandleType = (sizeof(EntityHandle) == 64 ? DAMSEL_HANDLE_TYPE_HANDLE64 :
                     DAMSEL_HANDLE_TYPE_HANDLE32);
   
@@ -184,7 +185,7 @@
   err = DMSLmodel_wait(request, &status);
   CHK_DMSL_ERR(err, "DMSLmodel_wait failed.");
 
-  DMSLstore_close((damsel_store*)dmslModel);
+  DMSLmodel_close(dmslModel);
 
   DMSLlib_finalize(dmslLib);
   
@@ -195,12 +196,14 @@
 ErrorCode WriteDamsel::write_sets(RangeSeqIntersectIter &rsi) 
 {
     // write the sets
-
   ErrorCode rval = MB_SUCCESS;
   std::vector<EntityHandle> ents;
   damsel_container dseth;
   damsel_err_t err;
-  for (EntityHandle seth = rsi.get_start_handle(); seth <= rsi.get_end_handle(); seth++) {
+  std::vector<unsigned char> set_flags(rsi.get_end_handle() - rsi.get_start_handle() + 1);
+  EntityHandle seth;
+  unsigned int i;
+  for (seth = rsi.get_start_handle(), i = 0; seth <= rsi.get_end_handle(); seth++, i++) {
     // get the set type (range or set)
     unsigned int opts;


More information about the moab-dev mailing list