[MOAB-dev] r4303 - MOAB/trunk/tools/mbcoupler

smithrm at mcs.anl.gov smithrm at mcs.anl.gov
Mon Nov 29 16:02:52 CST 2010


Author: smithrm
Date: 2010-11-29 16:02:51 -0600 (Mon, 29 Nov 2010)
New Revision: 4303

Modified:
   MOAB/trunk/tools/mbcoupler/mbcoupler_test.cpp
Log:
o Updated mesh file output to add root EntitySets to master proc partition data.


Modified: MOAB/trunk/tools/mbcoupler/mbcoupler_test.cpp
===================================================================
--- MOAB/trunk/tools/mbcoupler/mbcoupler_test.cpp	2010-11-25 19:03:36 UTC (rev 4302)
+++ MOAB/trunk/tools/mbcoupler/mbcoupler_test.cpp	2010-11-29 22:02:51 UTC (rev 4303)
@@ -164,8 +164,12 @@
     std::stringstream sofname;
     sofname << outFile << "S" << "R" << rank << ".h5m";
 
-    result = mbImpl->write_file(sofname.str().c_str(), NULL, writeOpts.c_str(),
-                                pcs[0]->partition_sets());
+    Range partSets = pcs[0]->partition_sets();
+    // If this is the master proc then put the root entity set in the data to be
+    // written to the file
+    if (rank == 0)
+      partSets.insert((EntityHandle) roots[0]);
+    result = mbImpl->write_file(sofname.str().c_str(), NULL, writeOpts.c_str(), partSets);
     PRINT_LAST_ERROR;
     std::cout << "Wrote " << sofname.str() << std::endl;
 
@@ -173,8 +177,13 @@
       std::stringstream tofname;
       tofname << outFile << "T" << i << "R" << rank << ".h5m";
 
-      result = mbImpl->write_file(tofname.str().c_str(), NULL, writeOpts.c_str(),
-                                  pcs[i]->partition_sets());
+      partSets.clear();
+      partSets = pcs[i]->partition_sets();
+      // If this is the master proc then put the root entity set in the data to be
+      // written to the file
+      if (rank == 0)
+        partSets.insert((EntityHandle) roots[i]);
+      result = mbImpl->write_file(tofname.str().c_str(), NULL, writeOpts.c_str(), partSets);
       PRINT_LAST_ERROR;
       std::cout << "Wrote " << tofname.str() << std::endl;
     }


















More information about the moab-dev mailing list