[MOAB-dev] commit/MOAB: danwu: Fixed some build errors of point_in_elem_search example (caused by recent merged spatial locator code).

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Fri Feb 14 15:32:28 CST 2014


1 new commit in MOAB:

https://bitbucket.org/fathomteam/moab/commits/8d545b11c527/
Changeset:   8d545b11c527
Branch:      master
User:        danwu
Date:        2014-02-14 22:32:12
Summary:     Fixed some build errors of point_in_elem_search example (caused by recent merged spatial locator code).

Affected #:  2 files

diff --git a/examples/point_in_elem_search.cpp b/examples/point_in_elem_search.cpp
index ce22928..ddf3f03 100644
--- a/examples/point_in_elem_search.cpp
+++ b/examples/point_in_elem_search.cpp
@@ -53,14 +53,13 @@ int main(int argc, char **argv) {
   SpatialLocator sl(&mb, elems, &tree);
   
     // get the box extents
-  BoundBox box;
   CartVect box_extents, pos;
-  rval = sl.get_bounding_box(box); ERR("Problem getting tree bounding box");
+  BoundBox box = sl.local_box();
   box_extents = box.bMax - box.bMin;
   
     // query at random places in the tree
   CartVect params;
-  bool is_inside;
+  int is_inside = 0;
   int num_inside = 0;
   EntityHandle elem;
   for (int i = 0; i < num_queries; i++) {
@@ -78,9 +77,3 @@ int main(int argc, char **argv) {
   std::cout << "Queries inside box = " << num_inside << "/" << num_queries << " = " 
             << 100.0*((double)num_inside)/num_queries << "%" << std::endl;
 }
-
-    
-  
-  
-  
-

diff --git a/src/moab/SpatialLocator.hpp b/src/moab/SpatialLocator.hpp
index f9a1746..3d29c55 100644
--- a/src/moab/SpatialLocator.hpp
+++ b/src/moab/SpatialLocator.hpp
@@ -135,7 +135,7 @@ namespace moab {
 
         /* locate a point */
       ErrorCode locate_point(const double *pos, 
-                             EntityHandle &ent, double *params, bool *is_inside = NULL,
+                             EntityHandle &ent, double *params, int *is_inside = NULL,
                               const double rel_iter_tol = 1.0e-10, const double abs_iter_tol = 1.0e-10,
                               const double inside_tol = 1.0e-6);
 
@@ -169,12 +169,6 @@ namespace moab {
       
   private:
 
-        /* locate a point */
-      ErrorCode locate_point(const double *pos, 
-                             EntityHandle &ent, double *params, int *is_inside = NULL,
-                              const double rel_iter_tol = 1.0e-10, const double abs_iter_tol = 1.0e-10,
-                              const double inside_tol = 1.0e-6);
-
 #ifdef USE_MPI
         /* MPI_ReduceAll source mesh bounding boxes to get global source mesh bounding box
          */

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