SheafSystem
0.0.0.0
|
A point location query in domains with global coordinate dimension DC and local coordinate dimension DB implemented using a DC index array search structure. Efficient for for compact (axis-aligned, box-shaped) domains. More...
#include <array_cylindrical_point_locator.h>
ARRAY_CYLINDRICAL_POINT_LOCATOR FACET | |
block< box_list_type > | _bins |
The search structure; a d-dimensional array of bins. More... | |
array_cylindrical_point_locator (sec_ed &xcoords, const block< size_type > &xbin_ub) | |
Create an instance for coordinates xcoords with bin ub xbin_ub. More... | |
array_cylindrical_point_locator (sec_ed &xcoords) | |
Create an instance for coordinates xcoords with bin ub computed from the size of the mesh. More... | |
virtual | ~array_cylindrical_point_locator () |
Destructor. More... | |
size_type | size () const |
The number of bins used by the search structure. More... | |
size_type | capacity () const |
The number of bins allocated for use by the search structure. More... | |
bool | is_dlinear_quads (const sec_ed &xcoords) const |
True if the base space of xcoords is a block of quads and the evaluator family id dlinear. More... | |
bool | is_dlinear_triangles (const sec_ed &xcoords) const |
True if the base space of xcoords is a block of triangles and the evaluator family id dlinear. More... | |
array_cylindrical_point_locator () | |
Default constructor; disabled. More... | |
array_cylindrical_point_locator (const array_cylindrical_point_locator &xother) | |
Copy constructor; disabled. More... | |
virtual array_cylindrical_point_locator & | operator= (const point_locator &xother) |
Assignment operator. More... | |
array_cylindrical_point_locator & | operator= (const array_cylindrical_point_locator &xother) |
Assignment operator; disabled. More... | |
void | update_bins () |
Resets this with bounds xlb, xub, and xbin_ub. If xbin_ub == 0; use default_bin_ub(). More... | |
size_type | bin_id (const d_bin_coordinates< 2, 2 > &xcoord) const |
The single index (offset) associated with tree coordinates xcoord. More... | |
size_type | bin_id (const block< size_type > &xid) const |
The single index (offset) associated with xid. More... | |
size_type | bin_id (size_type xi, size_type xj) const |
The single index (offset) associated with xi, xj. More... | |
CYLINDRICAL_POINT_LOCATOR FACET | |
typedef singly_linked_list< const d_bounding_box< 2, 2 > * > | box_list_type |
The type of box list. More... | |
virtual void | insert_box (d_bounding_box< 2, 2 > *xbox) |
Insert xbox into this. More... | |
virtual void | remove_box (d_bounding_box< 2, 2 > *xbox) |
Remove xbox from this. More... | |
virtual const box_list_type & | box_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< 2, 2 > *xbox) const |
True if xbox is in this. More... | |
virtual void | clear () |
Clear this of all bounding boxes. More... | |
POINT_LOCATOR FACET | |
virtual bool | invariant () const |
Class invariant. More... | |
Additional Inherited Members | |
Public Types inherited from geometry::cylindrical_point_locator | |
enum | space_dimensions { DC = 3, DB = 2 } |
Dimension of coordinate space. More... | |
typedef singly_linked_list< const d_bounding_box< 2, 2 > * > | box_list_type |
The type of box list. More... | |
Public Member Functions inherited from geometry::cylindrical_point_locator | |
virtual | ~cylindrical_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< 2, 2 > * | 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< 2, 2 > &xresult) const |
The position of xpt relative to the lower bound, in integer coordinates; pre-allocated version. More... | |
virtual void | update () |
Updates the search structure to the current values of coordinates(). 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_ed & | coordinates () 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::cylindrical_point_locator | |
cylindrical_point_locator (sec_ed &xcoords) | |
Creates an instance for coordinate section xcoords. More... | |
cylindrical_point_locator () | |
Default constructor; disabled. More... | |
cylindrical_point_locator (const cylindrical_point_locator &xother) | |
Copy constructor; disabled. More... | |
cylindrical_point_locator & | operator= (const cylindrical_point_locator &xother) |
Assignment operator; disabled. More... | |
void | insert_quad (block< sec_vd_dof_type > &xdofs, const scoped_index &xbranch_id, const scoped_index &xeval_id) |
Creates the bounding box or boxes for the quad defined by the dofs starting at xdofs and inserts them in the search structure. More... | |
void | insert_triangle (block< sec_vd_dof_type > &xdofs, const scoped_index &xbranch_id, const scoped_index &xeval_id) |
Creates the bounding box or boxes for the triangle defined by the dofs starting at xdofs and inserts them in the search structure. More... | |
void | xyz_to_lat_lon (const sec_vd_dof_type xcartesian[3], sec_vd_dof_type xresult[2]) |
Converts cartesian coordinates xcartesian to (longitude, latitude) xresult. More... | |
void | make_quad_bounding_box (block< sec_vd_dof_type > &xlat_lon_dofs, const scoped_index &xbranch_id, const scoped_index &xeval_id) |
Makes a bounding box for a quad. More... | |
void | make_triangle_bounding_box (block< sec_vd_dof_type > &xlat_lon_dofs, const scoped_index &xbranch_id, const scoped_index &xeval_id) |
Makes a bounding box for a triangle. 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::cylindrical_point_locator | |
block< size_type > | _bin_ub |
The upper bound for the bin index. More... | |
sec_vd_value_type | _bin_0_max |
A sec_vd_value_type that truncates to the maximum index for bin 0. 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< 2, 2 > > | _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... | |
A point location query in domains with global coordinate dimension DC and local coordinate dimension DB implemented using a DC index array search structure. Efficient for for compact (axis-aligned, box-shaped) domains.
Definition at line 44 of file array_cylindrical_point_locator.h.
typedef singly_linked_list<const d_bounding_box<2, 2>*> geometry::array_cylindrical_point_locator::box_list_type |
The type of box list.
Definition at line 157 of file array_cylindrical_point_locator.h.
geometry::array_cylindrical_point_locator::array_cylindrical_point_locator | ( | sec_ed & | xcoords, |
const block< size_type > & | xbin_ub | ||
) |
Create an instance for coordinates xcoords with bin ub xbin_ub.
Definition at line 36 of file array_cylindrical_point_locator.cc.
References geometry::cylindrical_point_locator::_bin_0_max, geometry::cylindrical_point_locator::_bin_ub, array_cylindrical_point_locator(), sheaf::auto_block< T, S >::ct(), fiber_bundle::section_space_schema_member::db(), fiber_bundle::section_space_schema_member::df(), is_dlinear_quads(), is_dlinear_triangles(), fiber_bundle::sec_rep_space_member::schema(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and geometry::cylindrical_point_locator::update().
geometry::array_cylindrical_point_locator::array_cylindrical_point_locator | ( | sec_ed & | xcoords | ) |
Create an instance for coordinates xcoords with bin ub computed from the size of the mesh.
Definition at line 69 of file array_cylindrical_point_locator.cc.
References geometry::cylindrical_point_locator::_bin_0_max, geometry::cylindrical_point_locator::_bin_ub, fiber_bundle::section_space_schema_member::df(), fiber_bundle::section_space_schema_member::evaluation_ct(), fiber_bundle::sec_at0_algebra::exp(), is_dlinear_quads(), is_dlinear_triangles(), fiber_bundle::sec_at0_algebra::log(), fiber_bundle::sec_rep_space_member::schema(), sheaf::read_write_monitor_handle::state_is_read_accessible(), geometry::cylindrical_point_locator::update(), and ~array_cylindrical_point_locator().
|
virtual |
Destructor.
Definition at line 109 of file array_cylindrical_point_locator.cc.
References size().
Referenced by array_cylindrical_point_locator().
|
inlineprotected |
Default constructor; disabled.
Definition at line 97 of file array_cylindrical_point_locator.h.
Referenced by array_cylindrical_point_locator().
|
inlineprotected |
Copy constructor; disabled.
Definition at line 104 of file array_cylindrical_point_locator.h.
|
protected |
The single index (offset) associated with tree coordinates xcoord.
Definition at line 301 of file array_cylindrical_point_locator.cc.
References geometry::cylindrical_point_locator::_bin_ub.
Referenced by bin_id(), box_list(), contains_box(), insert_box(), remove_box(), and update_bins().
|
protected |
The single index (offset) associated with xid.
Definition at line 308 of file array_cylindrical_point_locator.cc.
References geometry::cylindrical_point_locator::_bin_ub, and bin_id().
|
protected |
The single index (offset) associated with xi, xj.
Definition at line 315 of file array_cylindrical_point_locator.cc.
References geometry::cylindrical_point_locator::_bin_ub, and insert_box().
|
virtual |
The list of bounding boxes which may contain xpt.
Implements geometry::cylindrical_point_locator.
Definition at line 405 of file array_cylindrical_point_locator.cc.
References _bins, bin_id(), contains_box(), geometry::point_locator::db(), and geometry::cylindrical_point_locator::relative_position_pa().
Referenced by remove_box().
sheaf::size_type geometry::array_cylindrical_point_locator::capacity | ( | ) | const |
The number of bins allocated for use by the search structure.
Definition at line 148 of file array_cylindrical_point_locator.cc.
References _bins, and is_dlinear_quads().
Referenced by invariant(), and size().
|
virtual |
Clear this of all bounding boxes.
Implements geometry::cylindrical_point_locator.
Definition at line 461 of file array_cylindrical_point_locator.cc.
References _bins, geometry::cylindrical_point_locator::_box_ct, geometry::cylindrical_point_locator::is_empty(), and operator=().
Referenced by contains_box().
|
virtual |
True if xbox is in this.
Implements geometry::cylindrical_point_locator.
Definition at line 428 of file array_cylindrical_point_locator.cc.
References _bins, sheaf::singly_linked_list< T, A >::begin(), bin_id(), clear(), sheaf::singly_linked_list< T, A >::end(), and geometry::d_bounding_box< DC, DB >::lb().
Referenced by box_list(), insert_box(), and remove_box().
|
virtual |
Insert xbox into this.
Implements geometry::cylindrical_point_locator.
Definition at line 329 of file array_cylindrical_point_locator.cc.
References _bins, geometry::cylindrical_point_locator::_box_ct, bin_id(), geometry::cylindrical_point_locator::box_ct(), contains_box(), geometry::d_bounding_box< DC, DB >::lb(), remove_box(), and geometry::d_bounding_box< DC, DB >::ub().
Referenced by bin_id().
|
virtual |
Class invariant.
Reimplemented from geometry::cylindrical_point_locator.
Definition at line 534 of file array_cylindrical_point_locator.cc.
References capacity(), and size().
Referenced by operator=().
bool geometry::array_cylindrical_point_locator::is_dlinear_quads | ( | const sec_ed & | xcoords | ) | const |
True if the base space of xcoords is a block of quads and the evaluator family id dlinear.
Definition at line 170 of file array_cylindrical_point_locator.cc.
References fiber_bundle::section_space_schema_poset::base_space(), fiber_bundle::section_space_schema_member::base_space(), fiber_bundle::section_space_schema_member::base_space_id(), fiber_bundle::section_space_schema_member::evaluator_family_name(), fiber_bundle::section_space_schema_member::host(), is_dlinear_triangles(), fiber_bundle::homogeneous_block::local_cell_type_name(), fiber_bundle::sec_rep_space_member::schema(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and fiber_bundle::base_space_poset::type_name().
Referenced by array_cylindrical_point_locator(), and capacity().
bool geometry::array_cylindrical_point_locator::is_dlinear_triangles | ( | const sec_ed & | xcoords | ) | const |
True if the base space of xcoords is a block of triangles and the evaluator family id dlinear.
Definition at line 210 of file array_cylindrical_point_locator.cc.
References fiber_bundle::section_space_schema_poset::base_space(), fiber_bundle::section_space_schema_member::base_space(), fiber_bundle::section_space_schema_member::base_space_id(), fiber_bundle::section_space_schema_member::evaluator_family_name(), fiber_bundle::section_space_schema_member::host(), fiber_bundle::homogeneous_block::local_cell_type_name(), fiber_bundle::sec_rep_space_member::schema(), sheaf::read_write_monitor_handle::state_is_read_accessible(), fiber_bundle::base_space_poset::type_name(), and update_bins().
Referenced by array_cylindrical_point_locator(), and is_dlinear_quads().
|
protectedvirtual |
Assignment operator.
Not Implemented.
Reimplemented from geometry::cylindrical_point_locator.
Definition at line 493 of file array_cylindrical_point_locator.cc.
References invariant().
Referenced by clear().
|
protected |
Assignment operator; disabled.
Not Implemented.
Definition at line 514 of file array_cylindrical_point_locator.cc.
References invariant().
|
virtual |
Remove xbox from this.
Implements geometry::cylindrical_point_locator.
Definition at line 367 of file array_cylindrical_point_locator.cc.
References _bins, geometry::cylindrical_point_locator::_box_ct, bin_id(), geometry::cylindrical_point_locator::box_ct(), box_list(), contains_box(), geometry::d_bounding_box< DC, DB >::lb(), and geometry::d_bounding_box< DC, DB >::ub().
Referenced by insert_box().
sheaf::size_type geometry::array_cylindrical_point_locator::size | ( | ) | const |
The number of bins used by the search structure.
Definition at line 126 of file array_cylindrical_point_locator.cc.
References _bins, and capacity().
Referenced by invariant(), and ~array_cylindrical_point_locator().
|
protectedvirtual |
Resets this with bounds xlb, xub, and xbin_ub. If xbin_ub == 0; use default_bin_ub().
Implements geometry::cylindrical_point_locator.
Definition at line 253 of file array_cylindrical_point_locator.cc.
References geometry::cylindrical_point_locator::_bin_size, geometry::cylindrical_point_locator::_bin_ub, _bins, geometry::cylindrical_point_locator::_one_over_min_bin_size, bin_id(), geometry::cylindrical_point_locator::is_empty(), and geometry::d_bin_coordinates< DC, DB >::ub().
Referenced by is_dlinear_triangles().
|
protected |
The search structure; a d-dimensional array of bins.
Definition at line 127 of file array_cylindrical_point_locator.h.
Referenced by box_list(), capacity(), clear(), contains_box(), insert_box(), remove_box(), size(), and update_bins().