21 #ifndef D_UNIFORM_POINT_LOCATOR_IMPL_H 22 #define D_UNIFORM_POINT_LOCATOR_IMPL_H 24 #ifndef SHEAF_DLL_SPEC_H 25 #include "SheafSystem/sheaf_dll_spec.h" 29 #ifndef D_UNIFORM_POINT_LOCATOR_H 30 #include "SheafSystem/d_uniform_point_locator.h" 33 #ifndef ASSERT_CONTRACT_H 34 #include "SheafSystem/assert_contract.h" 37 #ifndef CHART_POINT_1D_H 38 #include "SheafSystem/chart_point_1d.h" 41 #ifndef CHART_POINT_2D_H 42 #include "SheafSystem/chart_point_2d.h" 45 #ifndef CHART_POINT_3D_H 46 #include "SheafSystem/chart_point_3d.h" 49 #ifndef SEC_AT1_SPACE_H 50 #include "SheafSystem/sec_at1_space.h" 54 #include "SheafSystem/sec_ed.h" 57 #ifndef STRUCTURED_BLOCK_1D_H 58 #include "SheafSystem/structured_block_1d.h" 61 #ifndef STRUCTURED_BLOCK_2D_H 62 #include "SheafSystem/structured_block_2d.h" 65 #ifndef STRUCTURED_BLOCK_3D_H 66 #include "SheafSystem/structured_block_3d.h" 70 #include "SheafSystem/uniform_1d.h" 74 #include "SheafSystem/uniform_2d.h" 78 #include "SheafSystem/uniform_3d.h" 93 template <
int DC,
int DB>
101 _block->detach_from_state();
116 template <
int DC,
int DB>
130 template <
int DC,
int DB>
137 if(xcomp == xupper_bound)
142 result = xcomp*(1.0 - std::numeric_limits<sec_vd_value_type>::epsilon());
155 template <
int DC,
int DB>
162 require(this->coordinates().state_is_read_accessible());
166 this->update_domain();
168 _dofs =
reinterpret_cast<sec_vd_dof_type*
>(coordinates().dof_map().dof_tuple());
169 _dof_ct = coordinates().dof_map().dof_ct();
179 template <
int DC,
int DB>
186 require(xvalue != 0);
187 require(xvalue_ub >= this->dc());
188 require(xresult.
db() >= this->db());
200 for(
int i=0; i<DC; ++i)
202 _clipped_value[i] = clip_component(xvalue[i], ub()[i]);
205 _block_pt->put_local_coords_zero();
206 _block_pt->put_chart_id(_block->index());
208 _evaluator->coord_at_value(_dofs,
212 _block_pt->local_coords(),
219 if(_evaluator->in_standard_domain(_block_pt->local_coords(), _block_pt->db()))
224 _block->refine_point_pa(*_block_pt, xresult);
235 ensure(unexecutable(xresult.
is_valid() ?
236 xresult.chart() contains xvalue at xresult.
local_coord() :
237 no chart contains xvalue));
245 template <
int DC,
int DB>
252 require(xvalue != 0);
253 require(xvalue_ub >= this->dc());
254 require(this->db() <= 3);
258 define_old_variable(
int old_xresult_ct = xresult.
ct());
268 for(
int i=0; i<DC; ++i)
270 _clipped_value[i] = clip_component(xvalue[i], ub()[i]);
273 _block_pt->put_local_coords_zero();
274 _block_pt->put_chart_id(_block->index());
276 _evaluator->coord_at_value(_dofs,
280 _block_pt->local_coords(),
287 if(_evaluator->in_standard_domain(_block_pt->local_coords(), _block_pt->db()))
292 _block->refine_point_pa(*_block_pt, xresult);
301 ensure(xresult.
ct() >= old_xresult_ct);
302 ensure_for_all(i, old_xresult_ct, xresult.
ct(), xresult[i].is_valid());
310 template <
int DB,
int DC>
317 require(xvalue != 0);
318 require(xvalue_ub >= this->dc());
319 require(this->dc() <= 3);
323 define_old_variable(
int old_xresult_ct = xresult.
ct());
329 lbranch_id = coordinates().index();
330 point_at_value(xvalue, xvalue_ub, lpt);
336 ensure(xresult.
ct() == old_xresult_ct + 1);
337 ensure_for_all(i, old_xresult_ct, xresult.
ct(),
338 coordinates().host()->contains_member(xresult[i].first,
false));
339 ensure_for_all(i, old_xresult_ct, xresult.
ct(), xresult[i].second.is_valid());
354 #endif // D_UNIFORM_POINT_LOCATOR_IMPL_H size_type ct() const
The number of items currently in use.
A point in a 3D chart space.
virtual int db() const =0
The dimension of this chart.
bool is_valid() const
True if this ia a valid point in a chart.
std::pair< scoped_index, chart_point_3d > branch_point_pair
A point in base space paired with a branch in section space.
void invalidate()
Makes this invalid.
void push_back(const_reference_type item)
Insert item at the end of the items in the auto_block.
An index within the external ("client") scope of a given id space.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
double sec_vd_dof_type
The type of degree of freedom in the section space.
An auto_block with a no-initialization initialization policy.
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.
virtual coord_type local_coord(int xi) const =0
The xi-th local coordinate of this point.