[MOAB-dev] commit/MOAB: tautges: LloydSmoother: proper handling of communicator.

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Tue Nov 26 13:20:35 CST 2013


1 new commit in MOAB:

https://bitbucket.org/fathomteam/moab/commits/c1b51c7ed3ee/
Changeset:   c1b51c7ed3ee
Branch:      deformed-mesh-remap
User:        tautges
Date:        2013-11-26 20:20:17
Summary:     LloydSmoother: proper handling of communicator.
test/perf/point_location files: adding tolerance args for two-tolerance changes.

Affected #:  5 files

diff --git a/src/LloydSmoother.cpp b/src/LloydSmoother.cpp
index 09546b5..d60b615 100644
--- a/src/LloydSmoother.cpp
+++ b/src/LloydSmoother.cpp
@@ -7,6 +7,7 @@
 
 #ifdef USE_MPI
 #include "moab/ParallelComm.hpp"
+#include "MBParallelConventions.h"
 #endif
 
 #include <iostream>
@@ -161,7 +162,7 @@ ErrorCode LloydSmoother::perform_smooth()
 #ifdef USE_MPI
     // 2c. exchange tags on owned verts
     if (myPcomm->size() > 1) {
-      rval = pcomm->exchange_tags(centroid, shared_owned_verts); RR("Failed to exchange tags.");
+      rval = myPcomm->exchange_tags(centroid, shared_owned_verts); RR("Failed to exchange tags.");
     }
 #endif
 
@@ -171,7 +172,7 @@ ErrorCode LloydSmoother::perform_smooth()
         // global reduce for maximum delta, then report it
       if (myPcomm->size() > 1)
         MPI_Reduce(&resid, &global_max, 1, MPI_DOUBLE, MPI_MAX, 0, myPcomm->comm());
-      if (!pcomm->rank()) 
+      if (!myPcomm->rank()) 
 #endif
         std::cout << "Max residual = " << global_max << std::endl;
     }

diff --git a/test/perf/point_location/elem_eval_time.cpp b/test/perf/point_location/elem_eval_time.cpp
index 186bd81..ef86762 100644
--- a/test/perf/point_location/elem_eval_time.cpp
+++ b/test/perf/point_location/elem_eval_time.cpp
@@ -158,7 +158,7 @@ ErrorCode time_reverse_eval(Interface *mbi, int method, Range &elems,
     bool ins;
     for (rit = elems.begin(), i = 0; rit != elems.end(); rit++, i++) {
       eeval.set_ent_handle(*rit);
-      rval = eeval.reverse_eval(coords[i].array(), 1.0e-6, params[i].array(), &ins);
+      rval = eeval.reverse_eval(coords[i].array(), 1.0e-10, 1.0e-6, params[i].array(), &ins);
       assert(ins);
 #ifndef NDEBUG
       if (MB_SUCCESS != rval) return rval;

diff --git a/test/perf/point_location/point_location.cpp b/test/perf/point_location/point_location.cpp
index df4132e..4f5ddcc 100644
--- a/test/perf/point_location/point_location.cpp
+++ b/test/perf/point_location/point_location.cpp
@@ -290,7 +290,7 @@ void do_kdtree_test( Interface& mb, int tree_depth, int elem_per_leaf,
   int len;
   for (long i = 0; i < num_test; ++i) {
     const size_t idx = (size_t)i % points.size();
-    rval = tool.point_search( points[idx].array(), leaf, 0.0, NULL, &root ); CHK(rval);
+    rval = tool.point_search( points[idx].array(), leaf, 1.0e-10, 1.0e-6, NULL, &root ); CHK(rval);
     hexes.clear();
     rval = mb.get_entities_by_handle( leaf, hexes ); CHK(rval);
     for (j = hexes.begin(); j != hexes.end(); ++j) {

diff --git a/test/perf/point_location/sploc_searching_perf.cpp b/test/perf/point_location/sploc_searching_perf.cpp
index bf09a8e..158504d 100644
--- a/test/perf/point_location/sploc_searching_perf.cpp
+++ b/test/perf/point_location/sploc_searching_perf.cpp
@@ -160,7 +160,7 @@ ErrorCode test_locator(SpatialLocator &sl, int npoints, double rtol, double &cpu
   CpuTimer ct;
   
     // call spatial locator to locate points
-  rval = sl.locate_points(test_pts[0].array(), npoints, &ents[0], test_res[0].array(), rtol, 0.0, &is_in[0]);
+  rval = sl.locate_points(test_pts[0].array(), npoints, &ents[0], test_res[0].array(), &is_in[0], rtol, 0.0);
   if (MB_SUCCESS != rval) return rval;
 
   cpu_time = ct.time_elapsed();

diff --git a/test/perf/point_location/tree_searching_perf.cpp b/test/perf/point_location/tree_searching_perf.cpp
index 6d1badb..9e35d9b 100644
--- a/test/perf/point_location/tree_searching_perf.cpp
+++ b/test/perf/point_location/tree_searching_perf.cpp
@@ -32,9 +32,10 @@ int main(int argc, char **argv)
 #endif
 
   int npoints = 100, dim = 3;
-  int dints = 1, dleafs = 1, ddeps = 1;
+  int dints = 1, dleafs = 1, ddeps = 1, csints = 0;
   
-  ProgOptions po("tree_searching_perf options" );
+  ProgOptions po;
+  po.addOpt<int>( "candidateplaneset,c", "Candidate plane set (0=SUBDIVISION,1=SUBDIV_SNAP,2=VERTEX_MEDIAN,3=VERTEX_SAMPLE", &csints);
   po.addOpt<int>( "ints,i", "Number of doublings of intervals on each side of scd mesh", &dints);
   po.addOpt<int>( "leaf,l", "Number of doublings of maximum number of elements per leaf", &dleafs);
   po.addOpt<int>( "max_depth,m", "Number of 5-intervals on maximum depth of tree", &ddeps);
@@ -78,7 +79,7 @@ int main(int argc, char **argv)
       for (std::vector<int>::iterator leafs_it = leafs.begin(); leafs_it != leafs.end(); leafs_it++) {
   
           // iteration: tree type
-        for (int tree_tp = 0; tree_tp < 2; tree_tp++) {
+        for (int tree_tp = 1; tree_tp < 2; tree_tp++) {
             // create tree
           Tree *tree;
           if (0 == tree_tp)
@@ -88,6 +89,11 @@ int main(int argc, char **argv)
 
           std::ostringstream opts;
           opts << "MAX_DEPTH=" << *dep_it << ";MAX_PER_LEAF=" << *leafs_it;
+          if (csints) {
+            if (opts.str().length() > 0) 
+              opts << ";";
+            opts << "PLANE_SET=" << csints;
+          }
           FileOptions fo(opts.str().c_str());
           rval = tree->parse_options(fo);
           SpatialLocator sl(&mb, elems, tree);
@@ -145,7 +151,7 @@ ErrorCode test_locator(SpatialLocator &sl, int npoints, double &cpu_time, double
   CpuTimer ct;
   
     // call spatial locator to locate points
-  rval = sl.locate_points(test_pts[0].array(), npoints, &ents[0], test_res[0].array(), 0.0, 0.0, &is_in[0]);
+  rval = sl.locate_points(test_pts[0].array(), npoints, &ents[0], test_res[0].array(), &is_in[0]);
   if (MB_SUCCESS != rval) return rval;
 
   cpu_time = ct.time_elapsed();

Repository URL: https://bitbucket.org/fathomteam/moab/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.


More information about the moab-dev mailing list