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

rhl6856 at mcs.anl.gov rhl6856 at mcs.anl.gov
Fri Aug 3 13:37:26 CDT 2012


Author: rhl6856
Date: 2012-08-03 13:37:26 -0500 (Fri, 03 Aug 2012)
New Revision: 5669

Modified:
   MOAB/trunk/src/moab/point_locater/bvh_tree.hpp
   MOAB/trunk/src/moab/point_locater/common_tree.hpp
   MOAB/trunk/tools/point_search.cpp
Log:
bvh tree builds. not all points found. strange numerical issues.

Modified: MOAB/trunk/src/moab/point_locater/bvh_tree.hpp
===================================================================
--- MOAB/trunk/src/moab/point_locater/bvh_tree.hpp	2012-08-03 18:37:25 UTC (rev 5668)
+++ MOAB/trunk/src/moab/point_locater/bvh_tree.hpp	2012-08-03 18:37:26 UTC (rev 5669)
@@ -4,7 +4,7 @@
  * (C) 2012
  *
  * An element tree partitions a mesh composed of elements.
- * We subdivide the bounding box of a mesh, by putting boxes
+ * We subdivide the bounding box of a me, by putting boxes
  * on the left if there center is on the left of a split line
  * and vice versa.
  */
@@ -19,7 +19,7 @@
 #include <tr1/unordered_map>
 #include <limits>
 #include "common_tree.hpp"
-
+#define BVH_TREE_DEBUG
 #ifndef BVH_TREE_HPP
 #define BVH_TREE_HPP
 namespace moab {
@@ -35,20 +35,94 @@
 	namespace _bvh {
 	template< typename Box, typename Entity_handle>
 	struct _Node{
-		unsigned int dim;
-		unsigned int child;
-		float Lmax, Rmin;
-		std::vector< std::pair< Box, Entity_handle> > entities;
+		typedef typename  std::vector< std::pair< Box, Entity_handle> > 
+								Entities;
+		std::size_t dim;
+		std::size_t child;
+		double Lmax, Rmin;
+		Entities entities;
+		_Node& operator=( const _Node& f){
+			dim = f.dim;
+			child=f.child;
+			Lmax=f.Lmax;
+			Rmin=f.Rmin;
+			entities=f.entities;
+			return *this;
+		}
 	}; // _Node
 
-	struct _Split_data {
-		unsigned int dim;
-		unsigned int child;
-		float Lmax, Rmin;
-		unsigned int nl;


More information about the moab-dev mailing list