21 #include "SheafSystem/array_cylindrical_point_locator.h" 23 #include "SheafSystem/sec_ed.h" 24 #include "SheafSystem/section_space_schema_poset.h" 25 #include "SheafSystem/structured_block_2d.h" 26 #include "SheafSystem/unstructured_block.h" 43 require(xcoords.
schema().
df() == DC);
44 require(xcoords.
schema().
db() == DB);
46 require(xbin_ub.
ct() >= DB);
47 require_for_all(i, 0, DB, xbin_ub[i] > 0);
51 for(
int i=0; i<DB; i++)
75 require(xcoords.
schema().
df() == DC);
88 lbin_ub = (lbin_ub > 1) ? lbin_ub : 1;
91 for(
int i=0; i<DB; i++)
190 result = (ltype_name ==
"structured_block_2d");
195 result = (ltype_name.find(
"quad") != string::npos);
196 lblock.detach_from_state();
230 result = (ltype_name ==
"unstructured_block");
235 result = (ltype_name.find(
"triangle") != string::npos);
236 lblock.detach_from_state();
271 for(
int i=0; i<DB; i++)
279 for(
int i=0; i<DB; i++)
284 _bins.reserve(lbin_ct);
285 _bins.set_ct(lbin_ct);
303 return (xcoord[0]*
_bin_ub[1] + xcoord[1]);
310 return (xid[0]*
_bin_ub[1] + xid[1]);
358 ensure(
box_ct() == old_box_ct + 1);
396 ensure(
box_ct() == old_box_ct - 1);
410 require(xpt_ub >=
db());
443 box_list_type::const_iterator itr = llist.
begin();
444 while((itr != llist.
end()) && (*itr != xbox))
449 result = (itr != llist.
end());
538 invariance(
size() > 0);
558 for(
int i=0; i< xpl.
db(); i++)
560 cout <<
" " << xpl.
lb()[i];
565 for(
int i=0; i< xpl.
db(); i++)
567 cout <<
" " << xpl.
ub()[i];
size_type capacity() const
The number of bins allocated for use by the search structure.
array_cylindrical_point_locator()
Default constructor; disabled.
virtual void update()
Updates the search structure to the current values of coordinates().
size_type size() const
The number of bins used by the search structure.
block< sec_vd_value_type > _one_over_min_bin_size
Reciprocal of the dimensions of the smallest bins.
section_space_schema_poset * host() const
The poset which this is a handle to a component of.
size_type ct() const
The number of items currently in use.
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...
A homogeneous collection of connected quads arranged in an i_size() x j_size() array.
size_type box_ct() const
The number of bounding boxes stored in the search structure.
std::string type_name(pod_index_type xmbr_hub_id) const
The type id of the member with hub id xmbr_hub_id.
bool state_is_read_accessible() const
True if this is attached and if the state is accessible for read or access control is disabled...
virtual void insert_box(d_bounding_box< 2, 2 > *xbox)
Insert xbox into this.
virtual ~array_cylindrical_point_locator()
Destructor.
block< size_type > _bin_ub
The upper bound for the bin index.
OBSOLETE: use zone_nodes_block or point_block_*d. A client handle for a base space member which repre...
const block< sec_vd_value_type > & lb() const
The lower bound of the domain defined by coordinates().
const d_bin_coordinates< DC, DB > & ub() const
The upper bound; the upper, right, rear corner.
iterator begin()
Returns an iterator to the first element of the container.
Fixed point relative coordinates for a tree domain.
sec_vd_value_type _bin_0_max
A sec_vd_value_type that truncates to the maximum index for bin 0.
static int_type ub()
The upper bound for components.
A section of a fiber bundle with a d-dimensional Euclidean vector space fiber.
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...
block< sec_vd_value_type > _bin_size
The dimensions of the smallest bins.
virtual array_cylindrical_point_locator & operator=(const point_locator &xother)
Assignment operator.
void update_bins()
Resets this with bounds xlb, xub, and xbin_ub. If xbin_ub == 0; use default_bin_ub().
A point location query in domains with global coordinate dimension DC and local coordinate dimension ...
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...
size_type bin_id(const d_bin_coordinates< 2, 2 > &xcoord) const
The single index (offset) associated with tree coordinates xcoord.
const d_bin_coordinates< DC, DB > & lb() const
The lower bound; the lower, left, front corner.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
virtual bool contains_box(d_bounding_box< 2, 2 > *xbox) const
True if xbox is in this.
A bounding box that can be strung together into a list.
virtual void remove_box(d_bounding_box< 2, 2 > *xbox)
Remove xbox from this.
std::string evaluator_family_name() const
The name of the evaluator family for section spaces on schemae hosted by this.
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.
iterator end()
Returns an iterator to the element following the last element of the container.
SHEAF_DLL_SPEC void log(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute log of x0 (log(x0)) (pre-allocated version).
virtual void clear()
Clear this of all bounding boxes.
An abstract point location query in domains with global coordinate dimension dc and local coordinate ...
block< box_list_type > _bins
The search structure; a d-dimensional array of bins.
size_type _box_ct
The number of bounding boxes stored in the search structure.
int db() const
The intrinsic dimension of the domain; the dimension of the local coordinates.
virtual bool invariant() const
Class invariant.
total_poset_member & base_space()
The base space component of this (mutable version).
SHEAF_DLL_SPEC std::ostream & operator<<(std::ostream &xos, const array_cylindrical_point_locator &xpl)
Insert array_cylindrical_point_locator xpl into ostream xos.
virtual section_space_schema_member & schema()
The restricted schema for this (mutable version).
int_type pod_index_type
The plain old data index type.
const char * local_cell_type_name() const
The type name of the prototype for the local cell.
int evaluation_ct() const
The number of members in the intersection of the evaluation subposet and the down set of the base spa...
const block< sec_vd_value_type > & ub() const
The upper bound of the domain defined by coordinates().
int db() const
The dimension of the base space component.
int df() const
The dimension of the fiber space component.
bool is_empty() const
True if this contains no bounding boxes.
SHEAF_DLL_SPEC void exp(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute exp of x0 (exp(x0)) (pre-allocated version).
Namespace for geometry component of sheaf system.
vd_value_type sec_vd_value_type
The type of component in the value of a section at a point.
Wrapper class for forward_list or slist depending on compiler. The class replicates the minimum subse...
An abstract point location query in domains with global coordinate dimension dc and local coordinate ...
base_space_poset & base_space()
The base space for section spaces on this schema.
pod_index_type base_space_id() const
The member id of the base space component of this.