[MOAB-dev] commit/MOAB: tautges: Fixing errors turned up by make check.
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Thu Feb 13 12:11:37 CST 2014
1 new commit in MOAB:
https://bitbucket.org/fathomteam/moab/commits/e0f83a6e64cf/
Changeset: e0f83a6e64cf
Branch: master
User: tautges
Date: 2014-02-13 19:11:27
Summary: Fixing errors turned up by make check.
Affected #: 4 files
diff --git a/src/moab/SpatialLocator.hpp b/src/moab/SpatialLocator.hpp
index f07cff7..f9a1746 100644
--- a/src/moab/SpatialLocator.hpp
+++ b/src/moab/SpatialLocator.hpp
@@ -277,6 +277,7 @@ namespace moab {
return locate_points(pos, 1, &ent, params, is_inside, rel_iter_tol, abs_iter_tol, inside_tol);
}
+#ifdef USE_MPI
inline ErrorCode SpatialLocator::get_point_ijk(const CartVect &point, const double abs_iter_tol, int *ijk) const
{
for (int i = 0; i < 3; i++) {
@@ -305,6 +306,7 @@ namespace moab {
return ijk[2] * regNums[0]*regNums[1] + ijk[1] * regNums[0] + ijk[0];
}
+#endif
} // namespace moab
diff --git a/test/perf/point_location/sploc_searching_perf.cpp b/test/perf/point_location/sploc_searching_perf.cpp
index ad17241..fcda676 100644
--- a/test/perf/point_location/sploc_searching_perf.cpp
+++ b/test/perf/point_location/sploc_searching_perf.cpp
@@ -141,9 +141,7 @@ int main(int argc, char **argv)
ErrorCode test_locator(SpatialLocator &sl, int npoints, double rtol, double &cpu_time, double &percent_outside)
{
- BoundBox box;
- ErrorCode rval = sl.get_bounding_box(box);
- if (MB_SUCCESS != rval) return rval;
+ BoundBox box = sl.local_box();
CartVect box_del = box.bMax - box.bMin;
std::vector<CartVect> test_pts(npoints), test_res(npoints);
@@ -160,7 +158,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(), &is_in[0], rtol, 0.0);
+ ErrorCode 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 230e911..241aab8 100644
--- a/test/perf/point_location/tree_searching_perf.cpp
+++ b/test/perf/point_location/tree_searching_perf.cpp
@@ -132,9 +132,7 @@ int main(int argc, char **argv)
ErrorCode test_locator(SpatialLocator &sl, int npoints, double &cpu_time, double &percent_outside)
{
- BoundBox box;
- ErrorCode rval = sl.get_bounding_box(box);
- if (MB_SUCCESS != rval) return rval;
+ BoundBox box = sl.local_box();
CartVect box_del = box.bMax - box.bMin;
std::vector<CartVect> test_pts(npoints), test_res(npoints);
@@ -151,7 +149,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(), &is_in[0]);
+ ErrorCode 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();
diff --git a/test/spatial_locator_test.cpp b/test/spatial_locator_test.cpp
index 2ede04f..0171bf9 100644
--- a/test/spatial_locator_test.cpp
+++ b/test/spatial_locator_test.cpp
@@ -103,13 +103,13 @@ void test_bvh_tree()
void test_locator(SpatialLocator *sl)
{
CartVect box_del, test_pt, test_res;
- BoundBox box;
- ErrorCode rval = sl->get_bounding_box(box); CHECK_ERR(rval);
+ BoundBox box = sl->local_box();
box_del = box.bMax - box.bMin;
double denom = 1.0 / (double)RAND_MAX;
int is_in;
EntityHandle ent;
+ ErrorCode rval;
for (int i = 0; i < npoints; i++) {
// generate a small number of random point to test
double rx = (double)rand() * denom, ry = (double)rand() * denom, rz = (double)rand() * denom;
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