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

tautges at mcs.anl.gov tautges at mcs.anl.gov
Fri Apr 27 15:19:19 CDT 2012


Author: tautges
Date: 2012-04-27 15:19:19 -0500 (Fri, 27 Apr 2012)
New Revision: 5506

Modified:
   MOAB/trunk/tools/mbcoupler/Coupler.cpp
   MOAB/trunk/tools/mbcoupler/Coupler.hpp
Log:
Cache target vertices properly in coupler this time.


Modified: MOAB/trunk/tools/mbcoupler/Coupler.cpp
===================================================================
--- MOAB/trunk/tools/mbcoupler/Coupler.cpp	2012-04-27 17:28:19 UTC (rev 5505)
+++ MOAB/trunk/tools/mbcoupler/Coupler.cpp	2012-04-27 20:19:19 UTC (rev 5506)
@@ -218,6 +218,21 @@
   }
   return MB_SUCCESS;
 }
+
+ErrorCode Coupler::locate_points(Range &targ_verts,
+                                 TupleList *tl,
+                                 bool store_local)
+{
+    // get locations
+  std::vector<double> locs(3*targ_verts.size());
+  ErrorCode rval = mbImpl->get_coords(targ_verts, &locs[0]);
+  if (MB_SUCCESS != rval) return rval;
+
+  if (store_local) targetVerts = targ_verts;
+  
+  return locate_points(&locs[0], targ_verts.size(), tl, store_local);
+}
+
 ErrorCode Coupler::locate_points(double *xyz, int num_points,
                                      TupleList *tl,
                                      bool store_local)

Modified: MOAB/trunk/tools/mbcoupler/Coupler.hpp
===================================================================
--- MOAB/trunk/tools/mbcoupler/Coupler.hpp	2012-04-27 17:28:19 UTC (rev 5505)
+++ MOAB/trunk/tools/mbcoupler/Coupler.hpp	2012-04-27 20:19:19 UTC (rev 5506)
@@ -336,6 +336,20 @@
    */
   ErrorCode get_gl_points_on_elements(Range & targ_elems, std::vector<double> & vpos, int & numPointsOfInterest);
 
+    /* Get functions */
+
+  inline Interface *mb_impl() const {return mbImpl;}
+  inline AdaptiveKDTree *my_tree() const {return myTree;};
+  inline EntityHandle local_root() const {return localRoot;}
+  inline const std::vector<double> &all_boxes() const {return allBoxes;}
+  inline ParallelComm *my_pc() const {return myPc;}
+  inline const Range &target_verts() const {return targetVerts;}
+  inline int my_id() const {return myId;}
+  inline const Range &my_range() const {return myRange;}
+  inline TupleList *mapped_pts() const {return mappedPts;}
+  inline const std::vector<unsigned int> &local_mapped_pts() const {return localMappedPts;}
+  inline int num_its() const {return numIts;}
+        
 private:
 


More information about the moab-dev mailing list