[MOAB-dev] r5689 - in MOAB/trunk: src/moab/point_locater tools

rhl6856 at mcs.anl.gov rhl6856 at mcs.anl.gov
Wed Aug 8 20:18:16 CDT 2012


Author: rhl6856
Date: 2012-08-08 20:18:16 -0500 (Wed, 08 Aug 2012)
New Revision: 5689

Modified:
   MOAB/trunk/src/moab/point_locater/bvh_tree.hpp
   MOAB/trunk/src/moab/point_locater/linear_hex_map.hpp
   MOAB/trunk/src/moab/point_locater/parametrizer.hpp
   MOAB/trunk/src/moab/point_locater/point_locater.hpp
   MOAB/trunk/tools/point_search.cpp
Log:
jacobian apparently can be negative. find point with tolerances

Modified: MOAB/trunk/src/moab/point_locater/bvh_tree.hpp
===================================================================
--- MOAB/trunk/src/moab/point_locater/bvh_tree.hpp	2012-08-08 21:49:24 UTC (rev 5688)
+++ MOAB/trunk/src/moab/point_locater/bvh_tree.hpp	2012-08-09 01:18:16 UTC (rev 5689)
@@ -667,9 +667,9 @@
 		return 0;
 	}
 	if( node.Lmax < node.Rmin){
-		if( point[ node.dim] <= node.Lmax){            	
+		if( point[ node.dim] <= (node.Lmax + tol)){            	
         		return _find_point( point, node.child, tol);
-        	}else if( point[ node.dim] >= node.Rmin){            	
+        	}else if( point[ node.dim] >= (node.Rmin - tol)){            	
 			return _find_point( point, node.child+1, tol);
 		}
 		return 0; //point lies in empty space.
@@ -678,10 +678,10 @@
 	//left of Rmin, you must be on the left
 	//we can't be sure about the boundaries since the boxes overlap
 	//this was a typo in the paper which caused pain.
-	if( point[ node.dim] < node.Rmin){
+	if( point[ node.dim] < (node.Rmin - tol)){
 		return _find_point( point, node.child, tol);
 	//if you are on the right Lmax, you must be on the right
-	}else if( point[ node.dim] > node.Lmax){
+	}else if( point[ node.dim] > (node.Lmax+tol)){
 		return _find_point( point, node.child+1, tol);
 	}
 	/* pg5 of paper
@@ -701,7 +701,7 @@
 //public functionality
 public:
 template< typename Vector>
-Entity_handle find( const Vector & point, double tol=1.0e-6) const{
+Entity_handle find( const Vector & point, const double tol) const{
 	typedef typename Vector::const_iterator Point_iterator;
 	return  _find_point( point, 0, tol);
 }
@@ -709,7 +709,7 @@
 //public functionality
 public:
 template< typename Vector>
-Entity_handle bruteforce_find( const Vector & point, double tol=1.0e-6) const{
+Entity_handle bruteforce_find( const Vector & point, const double tol) const{
 	typedef typename Vector::const_iterator Point_iterator;
 	typedef typename Nodes::value_type Node;
 	typedef typename Nodes::const_iterator Node_iterator;

Modified: MOAB/trunk/src/moab/point_locater/linear_hex_map.hpp
===================================================================
--- MOAB/trunk/src/moab/point_locater/linear_hex_map.hpp	2012-08-08 21:49:24 UTC (rev 5688)


More information about the moab-dev mailing list