SheafSystem
0.0.0.0
|
An abstract point location query in domains with global coordinate dimension dc and local coordinate dimension db using a search structure based on sorting bounding boxes into a set of bins. More...
#include <cylindrical_point_locator.h>
CYLINDRICAL_POINT_LOCATOR FACET | |
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... | |
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... | |
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 | insert_box (d_bounding_box< 2, 2 > *xbox)=0 |
Insert xbox into the search structure. More... | |
virtual void | remove_box (d_bounding_box< 2, 2 > *xbox)=0 |
Remove xbox from the search structure. More... | |
virtual const box_list_type & | box_list (sec_vd_value_type *xpt, size_type xpt_ub) const =0 |
The list of bounding boxes which may contain xpt. More... | |
virtual bool | contains_box (d_bounding_box< 2, 2 > *xbox) const =0 |
True if xbox is in the box list of some bin. More... | |
virtual void | clear ()=0 |
Clear the search structure of all bounding boxes. More... | |
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... | |
virtual cylindrical_point_locator & | operator= (const point_locator &xother) |
Assignment operator. More... | |
cylindrical_point_locator & | operator= (const cylindrical_point_locator &xother) |
Assignment operator; disabled. More... | |
virtual void | update_bins ()=0 |
Updates the bin parameters. 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... | |
POINT_LOCATOR FACET | |
virtual bool | invariant () const |
Class invariant. 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... | |
Additional Inherited Members | |
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::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::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... | |
An abstract point location query in domains with global coordinate dimension dc and local coordinate dimension db using a search structure based on sorting bounding boxes into a set of bins.
Definition at line 73 of file cylindrical_point_locator.h.
typedef singly_linked_list<const d_bounding_box<2, 2>*> geometry::cylindrical_point_locator::box_list_type |
The type of box list.
Definition at line 101 of file cylindrical_point_locator.h.
Dimension of coordinate space.
Dimension of base space.
Definition at line 93 of file cylindrical_point_locator.h.
|
virtual |
Destructor.
Definition at line 95 of file cylindrical_point_locator.cc.
References bin_ub().
Referenced by cylindrical_point_locator().
|
protected |
Creates an instance for coordinate section xcoords.
Definition at line 53 of file cylindrical_point_locator.cc.
References _bin_size, _bin_ub, _box_ct, _eval_itr, _one_over_min_bin_size, fiber_bundle::eval_iterator::force_is_done(), geometry::point_locator::point_locator(), sheaf::auto_block< T, S >::reserve(), sheaf::auto_block< T, S >::set_ct(), and ~cylindrical_point_locator().
|
inlineprotected |
Default constructor; disabled.
Definition at line 177 of file cylindrical_point_locator.h.
|
inlineprotected |
Copy constructor; disabled.
Definition at line 182 of file cylindrical_point_locator.h.
|
virtual |
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.
Implements geometry::point_locator.
Definition at line 1010 of file cylindrical_point_locator.cc.
References _gathered_dofs, sheaf::auto_block< T, S >::base(), sheaf::singly_linked_list< T, A >::begin(), box_list(), branch_points_at_value(), geometry::d_bounding_box< DC, DB >::contains_point(), fiber_bundle::section_evaluator::coord_at_value(), sheaf::auto_block< T, un_block_initialization_policy< T > >::ct(), geometry::point_locator::db(), geometry::point_locator::dc(), geometry::d_bounding_box< DC, DB >::dof_ct(), geometry::d_bounding_box< DC, DB >::dofs_index(), sheaf::singly_linked_list< T, A >::end(), geometry::d_bounding_box< DC, DB >::evaluator(), fiber_bundle::section_evaluator::in_standard_domain(), sheaf::invalid_pod_index(), geometry::d_bounding_box< DC, DB >::member_id(), sheaf::auto_block< T, un_block_initialization_policy< T > >::push_back(), relative_position_pa(), and xyz_to_lat_lon().
Referenced by point_at_value().
const sheaf::block< fiber_bundle::sec_vd_value_type > & geometry::cylindrical_point_locator::bin_size | ( | ) | const |
The dimensions of the smallest bins.
Definition at line 132 of file cylindrical_point_locator.cc.
References _bin_size, and box_ct().
Referenced by bin_ub().
const sheaf::block< sheaf::size_type > & geometry::cylindrical_point_locator::bin_ub | ( | ) | const |
The upper bound for the bin index.
Definition at line 112 of file cylindrical_point_locator.cc.
References _bin_ub, bin_size(), and geometry::point_locator::db().
Referenced by ~cylindrical_point_locator().
sheaf::size_type geometry::cylindrical_point_locator::box_ct | ( | ) | const |
The number of bounding boxes stored in the search structure.
Definition at line 152 of file cylindrical_point_locator.cc.
References _box_ct, and is_empty().
Referenced by bin_size(), insert_box(), geometry::array_cylindrical_point_locator::insert_box(), is_empty(), remove_box(), and geometry::array_cylindrical_point_locator::remove_box().
|
pure virtual |
The list of bounding boxes which may contain xpt.
Implemented in geometry::array_cylindrical_point_locator.
Definition at line 317 of file cylindrical_point_locator.cc.
References contains_box(), and geometry::point_locator::db().
Referenced by all_points_at_value(), branch_points_at_value(), point_at_value(), and remove_box().
|
virtual |
Finds one chart point in each branch at which coordinates() has value xvalue and appends them to xresult.
Implements geometry::point_locator.
Definition at line 1101 of file cylindrical_point_locator.cc.
References _branches, _gathered_dofs, sheaf::auto_block< T, S >::base(), sheaf::singly_linked_list< T, A >::begin(), box_list(), geometry::d_bounding_box< DC, DB >::branch_id(), sheaf::poset_state_handle::contains_member(), geometry::d_bounding_box< DC, DB >::contains_point(), fiber_bundle::section_evaluator::coord_at_value(), geometry::point_locator::coordinates(), sheaf::auto_block< T, S >::ct(), fiber_bundle::chart_point_3d::db(), geometry::point_locator::dc(), geometry::d_bounding_box< DC, DB >::dof_ct(), geometry::d_bounding_box< DC, DB >::dofs_index(), sheaf::singly_linked_list< T, A >::end(), geometry::d_bounding_box< DC, DB >::evaluator(), fiber_bundle::sec_at1::host(), fiber_bundle::section_evaluator::in_standard_domain(), fiber_bundle::chart_point_3d::local_coords(), geometry::d_bounding_box< DC, DB >::member_id(), sheaf::auto_block< T, S >::push_back(), fiber_bundle::chart_point::put_chart_id(), relative_position_pa(), and xyz_to_lat_lon().
Referenced by all_points_at_value().
|
pure virtual |
Clear the search structure of all bounding boxes.
Is Abstract.
Implemented in geometry::array_cylindrical_point_locator.
Definition at line 363 of file cylindrical_point_locator.cc.
References is_empty(), and update_bins().
Referenced by contains_box().
|
pure virtual |
True if xbox is in the box list of some bin.
Implemented in geometry::array_cylindrical_point_locator.
Definition at line 341 of file cylindrical_point_locator.cc.
References clear().
Referenced by box_list(), insert_box(), and remove_box().
|
pure virtual |
Insert xbox into the search structure.
Implemented in geometry::array_cylindrical_point_locator.
Definition at line 268 of file cylindrical_point_locator.cc.
References _box_ct, box_ct(), contains_box(), and remove_box().
Referenced by make_quad_bounding_box(), make_triangle_bounding_box(), and relative_position_pa().
|
protected |
Creates the bounding box or boxes for the quad defined by the dofs starting at xdofs and inserts them in the search structure.
Definition at line 404 of file cylindrical_point_locator.cc.
References insert_triangle(), make_quad_bounding_box(), sheaf::auto_block< T, S >::set_ct(), and xyz_to_lat_lon().
Referenced by update(), and update_bins().
|
protected |
Creates the bounding box or boxes for the triangle defined by the dofs starting at xdofs and inserts them in the search structure.
Definition at line 487 of file cylindrical_point_locator.cc.
References make_triangle_bounding_box(), sheaf::auto_block< T, S >::set_ct(), and xyz_to_lat_lon().
Referenced by insert_quad(), and update().
|
virtual |
Class invariant.
Reimplemented from geometry::point_locator.
Reimplemented in geometry::array_cylindrical_point_locator.
Definition at line 809 of file cylindrical_point_locator.cc.
References geometry::point_locator::coordinates(), and update().
Referenced by operator=().
bool geometry::cylindrical_point_locator::is_empty | ( | ) | const |
True if this contains no bounding boxes.
Definition at line 173 of file cylindrical_point_locator.cc.
References box_ct(), and relative_position().
Referenced by box_ct(), clear(), geometry::array_cylindrical_point_locator::clear(), geometry::array_cylindrical_point_locator::update_bins(), and update_bins().
|
protected |
Makes a bounding box for a quad.
Definition at line 604 of file cylindrical_point_locator.cc.
References _boxes, _gathered_dofs, sheaf::auto_block< T, S >::base(), sheaf::auto_block< T, S >::ct(), insert_box(), make_triangle_bounding_box(), fiber_bundle::section_evaluator::max(), fiber_bundle::section_evaluator::min(), sheaf::auto_block< T, S >::push_back(), geometry::d_bounding_box< DC, DB >::put_branch_id(), geometry::d_bounding_box< DC, DB >::put_dof_ct(), geometry::d_bounding_box< DC, DB >::put_dofs_index(), geometry::d_bounding_box< DC, DB >::put_evaluator(), geometry::d_bounding_box< DC, DB >::put_lb(), geometry::d_bounding_box< DC, DB >::put_member_id(), geometry::d_bounding_box< DC, DB >::put_ub(), and relative_position_pa().
Referenced by insert_quad(), and xyz_to_lat_lon().
|
protected |
Makes a bounding box for a triangle.
Definition at line 682 of file cylindrical_point_locator.cc.
References _boxes, _gathered_dofs, sheaf::auto_block< T, S >::base(), sheaf::auto_block< T, S >::ct(), insert_box(), fiber_bundle::section_evaluator::max(), fiber_bundle::section_evaluator::min(), operator=(), sheaf::auto_block< T, S >::push_back(), geometry::d_bounding_box< DC, DB >::put_branch_id(), geometry::d_bounding_box< DC, DB >::put_dof_ct(), geometry::d_bounding_box< DC, DB >::put_dofs_index(), geometry::d_bounding_box< DC, DB >::put_evaluator(), geometry::d_bounding_box< DC, DB >::put_lb(), geometry::d_bounding_box< DC, DB >::put_member_id(), geometry::d_bounding_box< DC, DB >::put_ub(), and relative_position_pa().
Referenced by insert_triangle(), and make_quad_bounding_box().
|
protectedvirtual |
Assignment operator.
Not Implemented.
Reimplemented from geometry::point_locator.
Reimplemented in geometry::array_cylindrical_point_locator.
Definition at line 768 of file cylindrical_point_locator.cc.
References invariant().
Referenced by make_triangle_bounding_box().
|
protected |
Assignment operator; disabled.
Not Implemented.
Definition at line 789 of file cylindrical_point_locator.cc.
References invariant().
|
virtual |
Finds a chart point at which coordinates() has value xvalue.
Implements geometry::point_locator.
Definition at line 928 of file cylindrical_point_locator.cc.
References _gathered_dofs, all_points_at_value(), sheaf::auto_block< T, S >::base(), sheaf::singly_linked_list< T, A >::begin(), box_list(), geometry::d_bounding_box< DC, DB >::contains_point(), fiber_bundle::section_evaluator::coord_at_value(), fiber_bundle::chart_point::db(), geometry::point_locator::db(), geometry::point_locator::dc(), geometry::d_bounding_box< DC, DB >::dof_ct(), geometry::d_bounding_box< DC, DB >::dofs_index(), sheaf::singly_linked_list< T, A >::end(), geometry::d_bounding_box< DC, DB >::evaluator(), fiber_bundle::section_evaluator::in_standard_domain(), fiber_bundle::chart_point::invalidate(), fiber_bundle::chart_point::is_valid(), fiber_bundle::chart_point::local_coord(), fiber_bundle::chart_point::local_coords(), geometry::d_bounding_box< DC, DB >::member_id(), fiber_bundle::chart_point::put_chart_id(), relative_position_pa(), and xyz_to_lat_lon().
Referenced by update().
geometry::d_bin_coordinates< 2, 2 > * geometry::cylindrical_point_locator::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.
Definition at line 195 of file cylindrical_point_locator.cc.
References geometry::point_locator::db(), and relative_position_pa().
Referenced by is_empty().
void geometry::cylindrical_point_locator::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.
Definition at line 221 of file cylindrical_point_locator.cc.
References _bin_0_max, _bin_ub, _one_over_min_bin_size, geometry::point_locator::db(), and insert_box().
Referenced by all_points_at_value(), geometry::array_cylindrical_point_locator::box_list(), branch_points_at_value(), make_quad_bounding_box(), make_triangle_bounding_box(), point_at_value(), and relative_position().
|
pure virtual |
Remove xbox from the search structure.
Implemented in geometry::array_cylindrical_point_locator.
Definition at line 292 of file cylindrical_point_locator.cc.
References _box_ct, box_ct(), box_list(), and contains_box().
Referenced by insert_box().
|
virtual |
Updates the search structure to the current values of coordinates().
Implements geometry::point_locator.
Definition at line 820 of file cylindrical_point_locator.cc.
References _boxes, _eval_itr, _gathered_dofs, sheaf::abstract_poset_member::attach_to_state(), geometry::point_locator::coordinates(), sheaf::auto_block< T, S >::ct(), fiber_bundle::sec_tuple::detach_from_state(), fiber_bundle::eval_iterator::discretization_members(), sheaf::DOWN, fiber_bundle::section_space_schema_member::evaluation_ct(), fiber_bundle::eval_iterator::gather_dofs(), sheaf::poset_component::index(), sheaf::depth_first_iterator::index(), insert_quad(), insert_triangle(), sheaf::depth_first_iterator::is_done(), fiber_bundle::eval_iterator::next(), sheaf::NOT_STRICT, point_at_value(), fiber_bundle::eval_iterator::put_schema_anchor(), sheaf::auto_block< T, S >::reserve(), sheaf::depth_first_iterator::reset(), fiber_bundle::sec_rep_space_member::schema(), sheaf::auto_block< T, S >::set_ct(), sheaf::depth_first_iterator::truncate(), update_bins(), and geometry::point_locator::update_domain().
Referenced by geometry::array_cylindrical_point_locator::array_cylindrical_point_locator(), and invariant().
|
protectedpure virtual |
Updates the bin parameters.
Implemented in geometry::array_cylindrical_point_locator.
Definition at line 385 of file cylindrical_point_locator.cc.
References insert_quad(), and is_empty().
|
protected |
Converts cartesian coordinates xcartesian to (longitude, latitude) xresult.
Definition at line 570 of file cylindrical_point_locator.cc.
References fiber_bundle::sec_at0_algebra::acos(), fiber_bundle::sec_at0_algebra::atan2(), make_quad_bounding_box(), and fiber_bundle::sec_at0_algebra::sqrt().
Referenced by all_points_at_value(), branch_points_at_value(), insert_quad(), insert_triangle(), and point_at_value().
|
protected |
A sec_vd_value_type that truncates to the maximum index for bin 0.
Definition at line 202 of file cylindrical_point_locator.h.
Referenced by geometry::array_cylindrical_point_locator::array_cylindrical_point_locator(), and relative_position_pa().
|
protected |
The dimensions of the smallest bins.
Definition at line 207 of file cylindrical_point_locator.h.
Referenced by bin_size(), cylindrical_point_locator(), and geometry::array_cylindrical_point_locator::update_bins().
The upper bound for the bin index.
Definition at line 197 of file cylindrical_point_locator.h.
Referenced by geometry::array_cylindrical_point_locator::array_cylindrical_point_locator(), geometry::array_cylindrical_point_locator::bin_id(), bin_ub(), cylindrical_point_locator(), relative_position_pa(), and geometry::array_cylindrical_point_locator::update_bins().
|
protected |
The number of bounding boxes stored in the search structure.
Definition at line 222 of file cylindrical_point_locator.h.
Referenced by box_ct(), geometry::array_cylindrical_point_locator::clear(), cylindrical_point_locator(), insert_box(), geometry::array_cylindrical_point_locator::insert_box(), remove_box(), and geometry::array_cylindrical_point_locator::remove_box().
|
protected |
Bounding boxes for the evaluation members.
Definition at line 227 of file cylindrical_point_locator.h.
Referenced by make_quad_bounding_box(), make_triangle_bounding_box(), and update().
|
protected |
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.
Definition at line 246 of file cylindrical_point_locator.h.
Referenced by branch_points_at_value().
|
protected |
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.
Definition at line 239 of file cylindrical_point_locator.h.
Referenced by cylindrical_point_locator(), and update().
|
protected |
The dofs of gathered by evaluation member.
Definition at line 232 of file cylindrical_point_locator.h.
Referenced by all_points_at_value(), branch_points_at_value(), make_quad_bounding_box(), make_triangle_bounding_box(), point_at_value(), and update().
|
protected |
Reciprocal of the dimensions of the smallest bins.
Definition at line 212 of file cylindrical_point_locator.h.
Referenced by cylindrical_point_locator(), relative_position_pa(), and geometry::array_cylindrical_point_locator::update_bins().