[MOAB-dev] r5660 - MOAB/trunk/src/moab/point_locater
rhl6856 at mcs.anl.gov
rhl6856 at mcs.anl.gov
Fri Aug 3 13:37:18 CDT 2012
Author: rhl6856
Date: 2012-08-03 13:37:18 -0500 (Fri, 03 Aug 2012)
New Revision: 5660
Modified:
MOAB/trunk/src/moab/point_locater/element_tree.hpp
Log:
working towards an element tree
Modified: MOAB/trunk/src/moab/point_locater/element_tree.hpp
===================================================================
--- MOAB/trunk/src/moab/point_locater/element_tree.hpp 2012-08-03 18:37:17 UTC (rev 5659)
+++ MOAB/trunk/src/moab/point_locater/element_tree.hpp 2012-08-03 18:37:18 UTC (rev 5660)
@@ -29,10 +29,6 @@
Vector min;
}; //Box
-
-
-
-
template< typename _Entity_handles,
typename _Boxes,
typename _Moab> class Element_tree;
@@ -40,6 +36,17 @@
//non-exported functionality
namespace _element_tree {
+template< typename Data>
+struct Split_comparator {
+ const std::size_t split_objective( const Data & a) const {
+ return std::abs( a.left - a.right) + a.middle*a.middle;
+ }
+
+ bool operator()( const Data & a, const Data & b) const {
+ return split_objective( a) < split_objective( b);
+ }
+};
+
template< typename _Entity_handles>
class Node{
//public types:
@@ -54,35 +61,41 @@
public:
//Default constructor
Node(): left_( -1), middle_( -1), right_( -1),
- dim( -1), split( 0), left_line( 0), right_line( 0),
+ dim( -1), split( 0),
+ left_line( 0), right_line( 0),
entity_handles_( NULL) {}
//Destructor
~Node(){ delete entity_handles_; }
//Constructor (leaf)
- Node( Entity_handles & _entities):
+ Node( Entity_handles & _entities, Box & box):
left_( -1), middle_( -1), right_( -1),
- dim( -1), split( 0), left_line( 0), right_line( 0),
+ dim( -1), split( 0),
More information about the moab-dev
mailing list