[MOAB-dev] r5692 - MOAB/trunk/src/moab/point_locater

rhl6856 at mcs.anl.gov rhl6856 at mcs.anl.gov
Mon Aug 13 11:49:49 CDT 2012


Author: rhl6856
Date: 2012-08-13 11:49:49 -0500 (Mon, 13 Aug 2012)
New Revision: 5692

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/linear_tet_map.hpp
   MOAB/trunk/src/moab/point_locater/parametrizer.hpp
   MOAB/trunk/src/moab/point_locater/point_locater.hpp
Log:
correcting tolerances for linear_tet. parametrizer doesnt export tolerance

Modified: MOAB/trunk/src/moab/point_locater/bvh_tree.hpp
===================================================================
--- MOAB/trunk/src/moab/point_locater/bvh_tree.hpp	2012-08-13 16:49:48 UTC (rev 5691)
+++ MOAB/trunk/src/moab/point_locater/bvh_tree.hpp	2012-08-13 16:49:49 UTC (rev 5692)
@@ -657,7 +657,7 @@
 				     i != node.entities.end(); ++i){
 			if( ct::box_contains_point( i->first, point, tol)){
 				const std::pair< bool, Vector> result = 
-				entity_contains( moab, i->second, point, tol);
+				entity_contains( moab, i->second, point);
 				if (result.first){
 						//TODO: return Point as well..
 						return i->second;
@@ -725,7 +725,11 @@
 						++j){
 				if( ct::box_contains_point( j->first, 
 								point, tol)){
-					return j->second;
+				      const std::pair< bool, Vector> result = 
+				      entity_contains( moab, j->second, point);
+				      if (result.first){
+				      	return j->second;
+				      }
 				}
 			}
 		}

Modified: MOAB/trunk/src/moab/point_locater/linear_hex_map.hpp
===================================================================
--- MOAB/trunk/src/moab/point_locater/linear_hex_map.hpp	2012-08-13 16:49:48 UTC (rev 5691)
+++ MOAB/trunk/src/moab/point_locater/linear_hex_map.hpp	2012-08-13 16:49:49 UTC (rev 5692)
@@ -44,10 +44,12 @@
     std::pair< bool, Point> operator()( const Entity_handle & h, 
 					const Points & v, 
 					const Point & p, 
-					const double tol) const{
+					const double tol=1.e-6) const{
 	Point result(3, 0.0);
 	solve_inverse( p, result, v);
-	return std::make_pair( is_contained( result), result);
+	bool point_found = solve_inverse( p, result, v, tol) && 
+						is_contained( result, tol);
+	return std::make_pair( point_found, result);
     }
 
   private:
@@ -68,7 +70,7 @@
     }
 
     template< typename Point>
-    bool is_contained( const Point & p, const double tol=1e-8) const{


More information about the moab-dev mailing list