22 #include "SheafSystem/property_disc_iterator_4_3.h" 24 #include "SheafSystem/assert_contract.h" 25 #include "SheafSystem/base_space_member.h" 26 #include "SheafSystem/binary_section_space_schema_member.h" 27 #include "SheafSystem/eval_family.h" 28 #include "SheafSystem/sec_rep_descriptor.h" 29 #include "SheafSystem/section_evaluator.h" 30 #include "SheafSystem/section_space_schema_member.h" 31 #include "SheafSystem/sec_ed_invertible.h" 32 #include "SheafSystem/sec_vd.h" 33 #include "SheafSystem/std_limits.h" 34 #include "SheafSystem/structured_block_1d.h" 35 #include "SheafSystem/structured_block_2d.h" 36 #include "SheafSystem/structured_block_3d.h" 37 #include "SheafSystem/subposet_member_iterator.h" 38 #include "SheafSystem/uniform_eval_family.h" 39 #include "SheafSystem/field_vd.h" 53 fields::property_disc_iterator_4_3::
54 property_disc_iterator_4_3(
const field_vd& xfield)
72 initialize_iteration(xfield, BIORDER);
77 ensure(is_initialized());
81 ensure(property_schema().is_same_state(&xfield.
property().
schema()));
82 ensure(property_schema().is_same_type(&xfield.
property().
schema()));
86 ensure(unexecutable(!is_done() implies
this is first member));
92 fields::property_disc_iterator_4_3::
93 property_disc_iterator_4_3(
115 initialize_iteration(xcoordinates_schema, xproperty_schema, BIORDER);
120 ensure(is_initialized());
121 ensure(coordinates_schema().is_same_state(&xcoordinates_schema));
122 ensure(coordinates_schema().is_same_type(&xcoordinates_schema));
123 ensure(coordinates_schema().version() == xcoordinates_schema.
version());
124 ensure(property_schema().is_same_state(&xproperty_schema));
125 ensure(property_schema().is_same_type(&xproperty_schema));
126 ensure(property_schema().version() == xproperty_schema.
version());
127 ensure(descending());
129 ensure(unexecutable(!is_done() implies
this is first member));
160 require(dynamic_cast<const binary_section_space_schema_member*>
170 require(coordinate_discretization_members().ct() == 1);
175 require(property_discretization_members().ct() == 1);
179 if(_coord_state.dofs.ct() == 0)
183 _coord_state.gather_dofs(xsec);
186 int ldf = _coord_state.df;
209 _coord_state.eval_mbr->unrefine_point_pa(ldisc_pt, ldisc_pt);
245 bool ltruncate = xtruncate;
251 property_disc_iterator::next(ltruncate);
255 if(action() == PREVISIT_ACTION)
260 if(_coord_state.eval_sp.contains_member(_index))
262 _coord_state.set_and_attach_evaluation_member(_index);
263 _coord_state.discretization_members.set_ct(0);
264 _coord_state.gather_discretization_member(_index, greater_index());
265 _coord_state.dofs.set_ct(0);
268 if(_prop_state.eval_sp.contains_member(_index))
270 _prop_state.set_evaluation_member(_index);
274 if(_prop_state.disc_sp.contains_member(_index))
276 _prop_state.discretization_members.set_ct(0);
277 _prop_state.gather_discretization_member(_index);
281 else if(action() == POSTVISIT_ACTION)
283 if(_prop_state.eval_sp.contains_member(_index))
297 post_fatal_error_message(
"unrecognized action");
300 property_disc_iterator::next(ltruncate);
306 ensure(!is_done() ? action() == POSTVISIT_ACTION :
true);
369 if(invariant_check())
371 invariance(property_disc_iterator::invariant());
373 disable_invariant_check();
375 invariance(order() == BIORDER);
377 invariance(coordinates_schema().evaluator_family_name() ==
"uniform");
382 invariance(property_schema().base_space().is_same_state(&coordinates_schema().base_space()));
384 invariance(!property_schema().rep().eval_is_above_disc());
389 require(!is_done() ? coordinate_discretization_members().ct() <= 1 :
true);
393 enable_invariant_check();
scoped_index eval_id
The eval member the disc member is contained in.
A context for discretization members. Intended for implementing various iterators, especially concurrent iterations over multiple sections.
int version(bool xunalias=true) const
The (possibly aliased) version of this component. The version of the host used when evaluating proper...
size_type ct() const
The number of items currently in use.
bool invariant() const
The class invariant.
A point in a 3D chart space.
Namespace for fields component of sheaf system.
bool conforms_to(const schema_poset_member &xother) const
True if the dofs defined by this agree in type and in order with the dofs defined by xother...
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 property_disc_iterator_4_3 * clone() const
Make a new instance of the same type as this.
bool is_same_state(const poset_state_handle *xhost, pod_index_type xhub_id) const
True is this is attached to state with hub id xhub_id in host xhost.
void put_chart_id(pod_index_type xchart)
Sets chart_id() to xchart_id.
virtual dof_type value_at_coord(const dof_type xdofs[], size_type xdofs_ub, const dof_type xlocal_coords[], size_type xlocal_coords_ub) const
Value at a specified local_coordinate. Single component version.
Abstract base class with useful features for all objects.
bool eval_is_above_disc() const
True is the evaluation subposet is strictly above the discretization subposet.
int local_id
The local index of the disc member with respect to the eval member.
pointer_type base() const
The underlying storage array.
virtual bool is_ancestor_of(const any *xother) const
True if other conforms to this.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
A vd-valued property as a function of global coordinates.
sec_vd & property() const
The dependent variable of this field.
void next()
Makes this the next member of the subset.
std::string evaluator_family_name() const
The name of the evaluator family for section spaces on schemae hosted by this.
sec_vd_value_type values[values_ub]
The values of another section (typically the global coordinates) at this disc point.
base_space_member & base_space() const
The base space of this field.
An abstract local section evaluator; a map from {local coordinates x dofs} to section value...
coord_type * local_coords()
The array of local coordinates.
A section of a fiber bundle with a d-dimensional vector space fiber.
~property_disc_iterator_4_3()
Destructor.
total_poset_member & base_space()
The base space component of this (mutable version).
virtual section_space_schema_member & schema()
The restricted schema for this (mutable version).
A client handle for a poset member which has been prepared for use as a schema for a section space...
sec_ed_invertible & coordinates() const
The independent variable of this field.
bool state_is_read_accessible() const
True if this is attached and if the coordinates and property are accessible for read or access contro...
int df() const
The dimension of the fiber space component.
virtual void local_coordinates(pod_index_type xindex, coord_type xresult[], size_type xresult_ub) const =0
The local coordinates of the dof with local index xindex.
sec_rep_descriptor & rep()
The representation for section spaces on this schema (mutable version).
virtual schema_poset_member & schema()
The schema for this member (mutable version).
A property discretization iterator for a field with uniform coordinates section and a property sectio...
virtual void get_prop_disc_values(const sec_vd &xsec)
The gets the values of xsec at the property discretization points.