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

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


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

Modified:
   MOAB/trunk/src/moab/point_locater/bvh_tree.hpp
   MOAB/trunk/src/moab/point_locater/common_tree.hpp
   MOAB/trunk/src/moab/point_locater/element_tree.hpp
   MOAB/trunk/tools/point_search.cpp
Log:
removed Box_with_center for now. things compile. need to implement bvh build rules

Modified: MOAB/trunk/src/moab/point_locater/bvh_tree.hpp
===================================================================
--- MOAB/trunk/src/moab/point_locater/bvh_tree.hpp	2012-08-03 18:37:24 UTC (rev 5667)
+++ MOAB/trunk/src/moab/point_locater/bvh_tree.hpp	2012-08-03 18:37:25 UTC (rev 5668)
@@ -42,7 +42,10 @@
 	}; // _Node
 
 	struct _Split_data {
-	
+		unsigned int dim;
+		unsigned int child;
+		float Lmax, Rmin;
+		unsigned int nl;
 	}; //_Split_data
 
 
@@ -82,46 +85,77 @@
 				bounding_box( _bounding_box),
 				entity_contains( entity_contains){
 	typedef typename Entity_handles::iterator Entity_handle_iterator;
-	typedef typename std::map< Entity_handle, Box> Entity_map;
+	typedef  common_tree::_Element_data< _Box, int > Element_data;
+	typedef typename std::tr1::unordered_map< Entity_handle, 
+						  Element_data> Entity_map;
 	typedef typename Entity_map::iterator Entity_map_iterator;
 	typedef std::vector< Entity_map_iterator> Vector;
 	//a fully balanced tree will have 2*_entities.size()
 	//which is one doubling away..
 	tree_.reserve( entity_handles_.size());
-	Entity_map entity_map;
+	Entity_map entity_map( entity_handles_.size());
 	common_tree::construct_element_map( entity_handles_, 
 					    entity_map, 
 					    bounding_box, 
 					    moab);
- 	_bounding_box = bounding_box;
-	
+	std::cout << "construct map ? " << std::endl;
+ 	//_bounding_box = bounding_box;
 	Vector entity_ordering;
 	construct_ordering( entity_map, entity_ordering); 
 	//We only build nonempty trees
+	std::cout << "ordering" << std::endl;
 	if( entity_ordering.size()){ 
 	 //initially all bits are set
 	 tree_.push_back( Node());
-	 _bvh::_Split_data data;
 	 const int depth = build_tree( entity_ordering.begin(), 
-				       entity_ordering.end(), 0, data);
+				       entity_ordering.end(), 0);
 	 std::cout << "max tree depth: " << depth << std::endl; 


More information about the moab-dev mailing list