SheafSystem  0.0.0.0
geometry::d_tree_point_locator< DC, DB > Class Template Reference

A point location query in domains with global coordinate dimension dc and local coordinate dimension db. implemented using a 2^DC tree search structure. Efficient for non-compact domains. More...

#include <d_tree_point_locator.h>

Inheritance diagram for geometry::d_tree_point_locator< DC, DB >:
geometry::d_bin_point_locator< DC, DB > geometry::point_locator

Friends

class d_tree_point_locator_node< DC, DB >
 

D_TREE_POINT_LOCATOR FACET

ptr_linked_pool< d_tree_point_locator_node< DC, DB > > _node_pool
 Pool for efficiently allocating and deallocating nodes. More...
 
d_tree_point_locator_node< DC, DB > _root
 The root node of the tree. More...
 
size_type _depth
 The number of levels in the tree; the length of the longest path from the root to a leaf. More...
 
 d_tree_point_locator (sec_ed &xcoords, size_type xdepth)
 Creates an instance for coordinate section xcoords with depth xdepth. More...
 
 d_tree_point_locator (sec_ed &xcoords)
 Creates an instance for coordinate section xcoords with depth computed from the size of the mesh. More...
 
virtual ~d_tree_point_locator ()
 Destructor. More...
 
const d_tree_point_locator_node< DC, DB > & root () const
 The root node. More...
 
size_type depth () const
 The number of levels; the length of the longest path from root() to a leaf. More...
 
size_type size ()
 The number of nodes in the tree. More...
 
size_type capacity ()
 The nodes allocated for use by the tree. More...
 
static size_type max_depth ()
 The maximum representable number of levels. More...
 
static size_typedefault_depth ()
 The default depth; the depth of a instance created with the default constructor. More...
 
 d_tree_point_locator ()
 Default constructor; disabled. More...
 
 d_tree_point_locator (const d_tree_point_locator< DC, DB > &xother)
 Copy constructor; disabled. More...
 
virtual d_tree_point_locatoroperator= (const point_locator &xother)
 Assignment operator; disabled. More...
 
d_tree_point_locatoroperator= (const d_tree_point_locator< DC, DB > &xother)
 Assignment operator; disabled. More...
 
void update_bins ()
 Updates the tree bin parameters. More...
 
ptr_linked_pool< d_tree_point_locator_node< DC, DB > > & node_pool ()
 Pool for efficiently allocating and deallocating nodes. More...
 

D_BIN_POINT_LOCATOR FACET

typedef singly_linked_list< const d_bounding_box< DC, DB > * > box_list_type
 The type of box list. More...
 
virtual void insert_box (d_bounding_box< DC, DB > *xbox)
 Insert xbox into the tree. More...
 
virtual void remove_box (d_bounding_box< DC, DB > *xbox)
 Remove xbox from the tree. More...
 
virtual const box_list_typebox_list (sec_vd_value_type *xpt, size_type xpt_ub) const
 The list of bounding boxes which may contain xpt. More...
 
virtual bool contains_box (d_bounding_box< DC, DB > *xbox) const
 True if xbox is in the box list of some bin. More...
 
virtual void clear ()
 Clear the tree of all bounding boxes and all nodes except the root. More...
 

POINT_LOCATOR FACET

virtual bool invariant () const
 Class invariant. More...
 

Additional Inherited Members

- Public Types inherited from geometry::d_bin_point_locator< DC, DB >
typedef singly_linked_list< const d_bounding_box< DC, DB > * > box_list_type
 The type of box list. More...
 
- Public Member Functions inherited from geometry::d_bin_point_locator< DC, DB >
virtual ~d_bin_point_locator ()
 Destructor. More...
 
const block< size_type > & bin_ub () const
 The upper bound for the bin index. More...
 
const block< sec_vd_value_type > & bin_size () const
 The dimensions of the smallest bins. More...
 
size_type box_ct () const
 The number of bounding boxes stored in the search structure. More...
 
bool is_empty () const
 True if this contains no bounding boxes. More...
 
d_bin_coordinates< DC, DB > * relative_position (sec_vd_value_type *xpt, size_type xpt_ub) const
 The position of xpt relative to the lower bound, in integer coordinates; auto-allocated version. More...
 
void relative_position_pa (sec_vd_value_type *xpt, size_type xpt_ub, d_bin_coordinates< DC, DB > &xresult) const
 The position of xpt relative to the lower bound, in integer coordinates; pre-allocated version. More...
 
d_bounding_box< DC, DB > * assign_box (const scoped_index &xmbr_id, const scoped_index &xbranch_id, section_evaluator &xeval, const sec_vd_dof_type *xdofs, size_type xdofs_ct)
 Assigns a box to xmbr_id and initializes it, but does not insert it in the search structure. More...
 
size_type box_capacity ()
 The number of boxes that have been allocated. More...
 
d_bounding_box< DC, DB > * box (pod_index_type xi)
 The xi-th bounding box. More...
 
void update_box (pod_index_type xi, const sec_vd_dof_type *xdofs, size_type xdofs_ct)
 Updates the xi-th bounding box with dofs xdofs. More...
 
const block< sec_vd_dof_type > & gathered_dofs () const
 The dofs of gathered by evaluation member. More...
 
virtual void update ()
 Updates the search structure to the current values of coordinates(); synonym for update(true);. More...
 
virtual void update (bool xpopulate, size_type xeval_capacity)
 Updates the search structure to the current values of coordinates(); if xpopulate, populates the search structure with the eval members coordinates(). Ensures capacity for at least xeval_capacity eval members. More...
 
virtual void point_at_value (const sec_vd_value_type *xvalue, size_type xvalue_ub, chart_point &xresult)
 Finds a chart point at which coordinates() has value xvalue. More...
 
virtual void all_points_at_value (const sec_vd_value_type *xvalue, size_type xvalue_ub, block< chart_point_3d > &xresult)
 Finds all chart points at which coordinates() has value xvalue and appends them to xresult. Note that charts overlap at their boundaries and hence if xvalue lies on a boundary it is contained in more than one chart. More...
 
virtual void branch_points_at_value (const sec_vd_value_type *xvalue, size_type xvalue_ub, block< branch_point_pair > &xresult)
 Finds one chart point in each branch at which coordinates() has value xvalue and appends them to xresult. More...
 
- Public Member Functions inherited from geometry::point_locator
sec_edcoordinates () const
 The coordinate section this inverts. More...
 
const block< sec_vd_value_type > & lb () const
 The lower bound of the domain defined by coordinates(). More...
 
const block< sec_vd_value_type > & ub () const
 The upper bound of the domain defined by coordinates(). More...
 
int dc () const
 The spatial dimension of the domain; the dimension of the global coordinates. More...
 
int db () const
 The intrinsic dimension of the domain; the dimension of the local coordinates. More...
 
bool domain_contains (sec_vd_value_type *xpt, size_type xpt_ub) const
 True if the domain contains xpt. More...
 
virtual ~point_locator ()
 Destructor. More...
 
- Protected Member Functions inherited from geometry::d_bin_point_locator< DC, DB >
 d_bin_point_locator (sec_ed &xcoords)
 Creates an instance for coordinate section xcoords. More...
 
 d_bin_point_locator ()
 Default constructor; disabled. More...
 
 d_bin_point_locator (const d_bin_point_locator< DC, DB > &xother)
 Copy constructor; disabled. More...
 
d_bin_point_locatoroperator= (const d_bin_point_locator< DC, DB > &xother)
 Assignment operator; disabled. More...
 
- Protected Member Functions inherited from geometry::point_locator
 point_locator ()
 Default constructor. More...
 
 point_locator (sec_ed &xcoords)
 Create an instance for coordinate section xcoords. More...
 
void update_domain ()
 Initializes the domain bounds and dimension. More...
 
- Static Protected Member Functions inherited from geometry::point_locator
static sec_vd_value_type slightly_greater_than (sec_vd_value_type x)
 A value slightly greater then x. More...
 
static sec_vd_value_type slightly_less_than (sec_vd_value_type x)
 A value slightly less then x. More...
 
- Protected Attributes inherited from geometry::d_bin_point_locator< DC, DB >
block< size_type_bin_ub
 The upper bound for the bin index. More...
 
block< sec_vd_value_type_bin_size
 The dimensions of the smallest bins. More...
 
block< sec_vd_value_type_one_over_min_bin_size
 Reciprocal of the dimensions of the smallest bins. More...
 
size_type _box_ct
 The number of bounding boxes stored in the search structure. More...
 
block< d_bounding_box< DC, DB > > _boxes
 Bounding boxes for the evaluation members. More...
 
block< sec_vd_dof_type_gathered_dofs
 The dofs of gathered by evaluation member. More...
 
eval_iterator _eval_itr
 The evaluator iterator used to populate the search structure; must have same life time as the search structure because it owns the eval_family which owns the section evaluators. More...
 
std::set< stl_scoped_index<> > _branches
 The branches for which a point has already been found for the current evaluation member. Used in all_points_at_value, allocated her to avoid reallocation for each query. More...
 
- Protected Attributes inherited from geometry::point_locator
block< sec_vd_value_type_lb
 The lower bound of the domain. More...
 
block< sec_vd_value_type_ub
 The upper bound of the domain. More...
 
int _dc
 The spatial dimension of the domain; the dimension of the global coordinates. More...
 
int _db
 The intrinsic dimension of the domain; the dimension of the local coordinates. More...
 

Detailed Description

template<int DC, int DB>
class geometry::d_tree_point_locator< DC, DB >

A point location query in domains with global coordinate dimension dc and local coordinate dimension db. implemented using a 2^DC tree search structure. Efficient for non-compact domains.

Definition at line 57 of file d_tree_point_locator.h.

Member Typedef Documentation

◆ box_list_type

template<int DC, int DB>
typedef singly_linked_list<const d_bounding_box<DC, DB>*> geometry::d_tree_point_locator< DC, DB >::box_list_type

The type of box list.

Definition at line 177 of file d_tree_point_locator.h.

Constructor & Destructor Documentation

◆ d_tree_point_locator() [1/4]

◆ d_tree_point_locator() [2/4]

◆ ~d_tree_point_locator()

◆ d_tree_point_locator() [3/4]

template<int DC, int DB>
geometry::d_tree_point_locator< DC, DB >::d_tree_point_locator ( )
inlineprotected

Default constructor; disabled.

Definition at line 121 of file d_tree_point_locator.h.

Referenced by geometry::d_tree_point_locator< DC, DB >::d_tree_point_locator().

◆ d_tree_point_locator() [4/4]

template<int DC, int DB>
geometry::d_tree_point_locator< DC, DB >::d_tree_point_locator ( const d_tree_point_locator< DC, DB > &  xother)
inlineprotected

Copy constructor; disabled.

Definition at line 126 of file d_tree_point_locator.h.

Member Function Documentation

◆ box_list()

template<int DC, int DB>
const d_tree_point_locator< DC, DB >::box_list_type & geometry::d_tree_point_locator< DC, DB >::box_list ( sec_vd_value_type xpt,
size_type  xpt_ub 
) const
virtual

◆ capacity()

template<int DC, int DB>
size_type geometry::d_tree_point_locator< DC, DB >::capacity ( )

◆ clear()

◆ contains_box()

template<int DC, int DB>
bool geometry::d_tree_point_locator< DC, DB >::contains_box ( d_bounding_box< DC, DB > *  xbox) const
virtual

◆ default_depth()

template<int DC, int DB>
size_type & geometry::d_tree_point_locator< DC, DB >::default_depth ( )
static

The default depth; the depth of a instance created with the default constructor.

Definition at line 248 of file d_tree_point_locator.impl.h.

References geometry::d_tree_point_locator< DC, DB >::update_bins().

Referenced by geometry::d_tree_point_locator< DC, DB >::capacity().

◆ depth()

template<int DC, int DB>
size_type geometry::d_tree_point_locator< DC, DB >::depth ( ) const

The number of levels; the length of the longest path from root() to a leaf.

Postcondition
  • result > 0

Definition at line 154 of file d_tree_point_locator.impl.h.

References geometry::d_tree_point_locator< DC, DB >::_depth, and geometry::d_tree_point_locator< DC, DB >::max_depth().

Referenced by geometry::d_tree_point_locator< DC, DB >::invariant(), and geometry::d_tree_point_locator< DC, DB >::root().

◆ insert_box()

◆ invariant()

template<int DC, int DB>
bool geometry::d_tree_point_locator< DC, DB >::invariant ( ) const
virtual

◆ max_depth()

template<int DC, int DB>
size_type geometry::d_tree_point_locator< DC, DB >::max_depth ( )
static

◆ node_pool()

◆ operator=() [1/2]

template<int DC, int DB>
virtual d_tree_point_locator& geometry::d_tree_point_locator< DC, DB >::operator= ( const point_locator xother)
inlineprotectedvirtual

Assignment operator; disabled.

Reimplemented from geometry::d_bin_point_locator< DC, DB >.

Definition at line 131 of file d_tree_point_locator.h.

◆ operator=() [2/2]

template<int DC, int DB>
d_tree_point_locator& geometry::d_tree_point_locator< DC, DB >::operator= ( const d_tree_point_locator< DC, DB > &  xother)
inlineprotected

Assignment operator; disabled.

Definition at line 136 of file d_tree_point_locator.h.

◆ remove_box()

template<int DC, int DB>
void geometry::d_tree_point_locator< DC, DB >::remove_box ( d_bounding_box< DC, DB > *  xbox)
virtual

◆ root()

◆ size()

◆ update_bins()

Member Data Documentation

◆ _depth

template<int DC, int DB>
size_type geometry::d_tree_point_locator< DC, DB >::_depth
protected

The number of levels in the tree; the length of the longest path from the root to a leaf.

Definition at line 162 of file d_tree_point_locator.h.

Referenced by geometry::d_tree_point_locator< DC, DB >::d_tree_point_locator(), geometry::d_tree_point_locator< DC, DB >::depth(), and geometry::d_tree_point_locator< DC, DB >::update_bins().

◆ _node_pool

template<int DC, int DB>
ptr_linked_pool< d_tree_point_locator_node<DC, DB> > geometry::d_tree_point_locator< DC, DB >::_node_pool
protected

Pool for efficiently allocating and deallocating nodes.

Definition at line 151 of file d_tree_point_locator.h.

Referenced by geometry::d_tree_point_locator< DC, DB >::node_pool().

◆ _root


The documentation for this class was generated from the following files: