[MOAB-dev] r5937 - in MOAB/trunk: test/parallel tools/mbcslam

iulian at mcs.anl.gov iulian at mcs.anl.gov
Thu Jan 17 13:20:16 CST 2013


Author: iulian
Date: 2013-01-17 13:20:16 -0600 (Thu, 17 Jan 2013)
New Revision: 5937

Modified:
   MOAB/trunk/test/parallel/par_intx_sph.cpp
   MOAB/trunk/tools/mbcslam/Intx2Mesh.cpp
   MOAB/trunk/tools/mbcslam/Intx2Mesh.hpp
Log:
more progress for intersecting meshes in parallel
follows the algorithm at 
https://collab.mcs.anl.gov/display/moab/Pseudo-code+for+intersection%2C+Nov+15
localization is made as in the mbcoupler, using a KD-tree
the vertices and quads are identified by their global ID, instead of owner proc and handle on owner.
 still to do: 
  merging at the interface (the intersection is carried on separately on each processor, but the intersection points on 
interface edges should be merged in the end). We could employ the heavy artilerry (ParallelMerge) or do a more localized 
matching. We "know" that all the points to be merged are new points on the shared edges.



Modified: MOAB/trunk/test/parallel/par_intx_sph.cpp
===================================================================
--- MOAB/trunk/test/parallel/par_intx_sph.cpp	2013-01-17 17:33:17 UTC (rev 5936)
+++ MOAB/trunk/test/parallel/par_intx_sph.cpp	2013-01-17 19:20:16 UTC (rev 5937)
@@ -164,13 +164,38 @@
  
   Intx2MeshOnSphere worker(&mb);
 
-  worker.SetRadius(3*sqrt(3.));
+  double radius= 3. * sqrt(3.) ; // input
+  worker.SetRadius(radius);
   worker.set_box_error(EPS1);//
+  worker.SetEntityType(MBQUAD);
+
+  worker.SetErrorTolerance(radius*1.e-8);
   worker.locate_departure_points(euler_set);
 
-  std::string opts_write("PARALLEL=WRITE_PART");
-  rval = mb.write_file("manuf.h5m", 0, opts_write.c_str(), &euler_set, 1);
+  // we need to make sure the covering set is bigger than the euler mesh
+  EntityHandle covering_lagr_set;
+  rval = mb.create_meshset(MESHSET_SET, covering_lagr_set);
   CHECK_ERR(rval);
 
+  rval = worker.create_departure_mesh(covering_lagr_set);
+  CHECK_ERR(rval);
+  int rank = pcomm->proc_config().proc_rank();
+  std::stringstream ss;
+  ss<<"partial" << rank<<".vtk";
+  mb.write_file(ss.str().c_str(), 0, 0, &covering_lagr_set, 1);
+  EntityHandle outputSet;
+  rval = mb.create_meshset(MESHSET_SET, outputSet);
+  CHECK_ERR(rval);
+  rval = worker.intersect_meshes(covering_lagr_set, euler_set, outputSet);
+  CHECK_ERR(rval);
 
+  //std::string opts_write("PARALLEL=WRITE_PART");
+  //rval = mb.write_file("manuf.h5m", 0, opts_write.c_str(), &outputSet, 1);
+  std::string opts_write("");
+  std::stringstream outf;
+  outf<<"intersect" << rank<<".h5m";
+  rval = mb.write_file(outf.str().c_str(), 0, 0, &outputSet, 1);
+  CHECK_ERR(rval);
+
+
 }

Modified: MOAB/trunk/tools/mbcslam/Intx2Mesh.cpp
===================================================================
--- MOAB/trunk/tools/mbcslam/Intx2Mesh.cpp	2013-01-17 17:33:17 UTC (rev 5936)
+++ MOAB/trunk/tools/mbcslam/Intx2Mesh.cpp	2013-01-17 19:20:16 UTC (rev 5937)


More information about the moab-dev mailing list