[MOAB-dev] r5968 - in MOAB/trunk: src/parallel src/parallel/moab test/parallel tools/mbcslam

iulian at mcs.anl.gov iulian at mcs.anl.gov
Fri Feb 1 14:14:52 CST 2013


Author: iulian
Date: 2013-02-01 14:14:52 -0600 (Fri, 01 Feb 2013)
New Revision: 5968

Modified:
   MOAB/trunk/src/parallel/ParallelComm.cpp
   MOAB/trunk/src/parallel/moab/ParallelComm.hpp
   MOAB/trunk/test/parallel/par_intx_sph.cpp
   MOAB/trunk/tools/mbcslam/CslamUtils.cpp
   MOAB/trunk/tools/mbcslam/CslamUtils.hpp
   MOAB/trunk/tools/mbcslam/Intx2Mesh.cpp
   MOAB/trunk/tools/mbcslam/Intx2Mesh.hpp
Log:
settle intersection points after mesh intersection, using a strategy similar to exchange tags:
 pack the intersection points from interface edges, send, unpack at the destination, then correct position

add utilities to compute areas on a sphere, using Girard's theorem; need to add tests.



Modified: MOAB/trunk/src/parallel/ParallelComm.cpp
===================================================================
--- MOAB/trunk/src/parallel/ParallelComm.cpp	2013-02-01 18:19:53 UTC (rev 5967)
+++ MOAB/trunk/src/parallel/ParallelComm.cpp	2013-02-01 20:14:52 UTC (rev 5968)
@@ -204,7 +204,8 @@
                      MB_MESG_REMOTEH_LARGE,
                      MB_MESG_TAGS_ACK,
                      MB_MESG_TAGS_SIZE,
-                     MB_MESG_TAGS_LARGE};
+                     MB_MESG_TAGS_LARGE
+  };
 
   static inline size_t RANGE_SIZE(const Range& rng)
   { return 2*sizeof(EntityHandle)*rng.psize()+sizeof(int); }
@@ -8594,4 +8595,238 @@
     return MB_SUCCESS;
   }
 
+  /*
+   * this call is collective, so we will use the message ids for tag communications;
+   * they are similar, but simpler
+   * pack the number of edges, the remote edge handles, then for each edge, the number
+   *    of intersection points, and then 3 doubles for each intersection point
+   * on average, there is one intx point per edge, in some cases 2, in some cases 0
+   *   so on average, the message size is num_edges *( sizeof(eh) + sizeof(int) + 1*3*sizeof(double) )
+   *          = num_edges * (8+4+24)
+   */
+ErrorCode ParallelComm::settle_intersection_points(Range & edges, Range & shared_edges_owned,
+          std::vector<std::vector<EntityHandle> *> & extraNodesVec, double tolerance)
+{
+  // the index of an edge in the edges Range will give the index for extraNodesVec
+  // the strategy of this follows exchange tags strategy:
+  ErrorCode result;
+  int success;
+
+  myDebug->tprintf(1, "Entering settle_intersection_points\n");
+
+  // get all procs interfacing to this proc
+  std::set<unsigned int> exch_procs;
+  result = get_comm_procs(exch_procs);
+
+  // post ghost irecv's for all interface procs
+  // index requests the same as buffer/sharing procs indices
+  std::vector<MPI_Request>  recv_intx_reqs(2 * buffProcs.size(), MPI_REQUEST_NULL),
+      sent_ack_reqs(buffProcs.size(), MPI_REQUEST_NULL);
+  std::vector<unsigned int>::iterator sit;
+  int ind;
+
+  reset_all_buffers();
+  int incoming = 0;
+


More information about the moab-dev mailing list