[MOAB-dev] r5893 - in MOAB/trunk: src/io src/parallel src/parallel/moab test/parallel

xbxu at mcs.anl.gov xbxu at mcs.anl.gov
Fri Nov 30 17:51:23 CST 2012


Author: xbxu
Date: 2012-11-30 17:51:23 -0600 (Fri, 30 Nov 2012)
New Revision: 5893

Modified:
   MOAB/trunk/src/io/ReadNC.cpp
   MOAB/trunk/src/parallel/ParallelComm.cpp
   MOAB/trunk/src/parallel/moab/ParallelComm.hpp
   MOAB/trunk/test/parallel/Makefile.am
Log:
Gather tag value from domain-decomposed meshes onto a global mesh
represented on the root processor.

Thanks for Iulian's help and Tim's algorithm!


Modified: MOAB/trunk/src/io/ReadNC.cpp
===================================================================
--- MOAB/trunk/src/io/ReadNC.cpp	2012-11-29 22:56:52 UTC (rev 5892)
+++ MOAB/trunk/src/io/ReadNC.cpp	2012-11-30 23:51:23 UTC (rev 5893)
@@ -101,16 +101,17 @@
   std::vector<std::string> var_names;
   std::vector<int> tstep_nums;
   std::vector<double> tstep_vals;
-
+  /*
   if (file_id_tag)
     mGlobalIdTag = *file_id_tag;
   else {
+    */
     //! get and cache predefined tag handles
     int dum_val = 0;
     rval = mbImpl->tag_get_handle(GLOBAL_ID_TAG_NAME, 1, MB_TYPE_INTEGER, mGlobalIdTag, MB_TAG_DENSE | MB_TAG_CREAT, &dum_val);
     if (MB_SUCCESS != rval)
       return rval;
-  }
+    //}
 
   std::string partition_tag_name;
   rval = parse_options(opts, var_names, tstep_nums, tstep_vals);
@@ -862,7 +863,81 @@
   ERRORR(rval, "Couldn't create spectral order tag.");
   rval = mbImpl->tag_set_data(sporder, &tmp_set, 1, &spectralOrder);
   ERRORR(rval, "Couldn't set value for spectral order tag.");
-  
+  /*
+  bool gatherOpt = false;
+  if (opts.get_null_option("GATHER_SET") == MB_SUCCESS)
+    gatherOpt = true;
+  */
+  /*
+    - if (root) 
+    . create vertices for all vertex positions in 2D grid
+    . create quads for all vertex positions
+    . create new entity set & insert these vertices/quads into it
+    . mark new entity set with <choose tag - maybe "GATHER_SET"?>
+  */
+  //  if (gatherOpt) {
+
+#ifdef USE_MPI
+  if (myPcomm->proc_config().proc_rank() == 0) {
+#endif
+    unsigned int num_total_verts = gDims[3] - gDims[0] + 1;
+    EntityHandle gather_set;    
+    rval = mbImpl->create_meshset(MESHSET_SET, gather_set);
+    ERRORR(rval, "Trouble creating gather set.");
+


More information about the moab-dev mailing list