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

tautges at mcs.anl.gov tautges at mcs.anl.gov
Fri Apr 8 17:27:07 CDT 2011


Author: tautges
Date: 2011-04-08 17:27:06 -0500 (Fri, 08 Apr 2011)
New Revision: 4728

Modified:
   MOAB/trunk/src/moab/ScdInterface.hpp
   MOAB/trunk/src/parallel/ParallelMergeMesh.cpp
   MOAB/trunk/src/parallel/moab/ParallelMergeMesh.hpp
   MOAB/trunk/test/parallel/parmerge.cpp
Log:
Update on parallel mesh merge.  I've verified it works for simple cases.

In ScdInterface, just correcting a comment.




Modified: MOAB/trunk/src/moab/ScdInterface.hpp
===================================================================
--- MOAB/trunk/src/moab/ScdInterface.hpp	2011-04-07 17:28:02 UTC (rev 4727)
+++ MOAB/trunk/src/moab/ScdInterface.hpp	2011-04-08 22:27:06 UTC (rev 4728)
@@ -44,7 +44,7 @@
  *
  * Structured mesh blocks are returned in the form of ScdBox class objects.  Each ScdBox instance
  * represents a rectangular block of vertices and possibly elements (edges, quads, or hexes).  The
- * entity handles for a ScdBox are guaranteed to be contiguous, starting at a starting valuable
+ * entity handles for a ScdBox are guaranteed to be contiguous, starting at a starting value
  * which is also available through the ScdBox class.  However, vertex handles may or may not be
  * contiguous, depending on the construction method.  The start vertex handle is also available from
  * the ScdBox class.

Modified: MOAB/trunk/src/parallel/ParallelMergeMesh.cpp
===================================================================
--- MOAB/trunk/src/parallel/ParallelMergeMesh.cpp	2011-04-07 17:28:02 UTC (rev 4727)
+++ MOAB/trunk/src/parallel/ParallelMergeMesh.cpp	2011-04-08 22:27:06 UTC (rev 4728)
@@ -6,6 +6,7 @@
 #include "moab/Skinner.hpp"
 #include "moab/MergeMesh.hpp"
 #include "moab/ParallelComm.hpp"
+#include "moab/CN.hpp"
 
 extern "C" 
 {
@@ -52,7 +53,8 @@
     //Merge Mesh Locally
     MergeMesh merger(mb);
     merger.merge_entities(ents,myEps);
-    if(rval != MB_SUCCESS){
+    //We can return if there is only 1 proc
+    if(rval != MB_SUCCESS || myPcomm->size() == 1){
       return rval;
     }
 
@@ -65,46 +67,55 @@
 
     /*3)Get Skin
       -Get Range of 0 dimensional entities*/
-    Range skinents;
+    //Look into improving by using higher skin
+    std::vector<Range> skin_ents(4);
     Skinner skinner(mb);
-    rval = skinner.find_skin(ents,0,skinents);
-    if(rval != MB_SUCCESS){
-      return rval;
+    for(int skin_dim = dim; skin_dim >= 0; skin_dim--){
+      rval = skinner.find_skin(ents,skin_dim,skin_ents[skin_dim]);
+      if(rval != MB_SUCCESS){
+	return rval;


More information about the moab-dev mailing list