21 #include "SheafSystem/visualization_iterator.h" 23 #include "SheafSystem/assert_contract.h" 24 #include "SheafSystem/base_space_member.h" 25 #include "SheafSystem/binary_section_space_schema_member.h" 26 #include "SheafSystem/error_message.h" 27 #include "SheafSystem/eval_family.h" 28 #include "SheafSystem/visualization_iterator_1_1.h" 30 #include "SheafSystem/visualization_iterator_1_3.h" 31 #include "SheafSystem/visualization_iterator_4_2.h" 32 #include "SheafSystem/visualization_iterator_4_3.h" 33 #include "SheafSystem/sec_rep_descriptor.h" 34 #include "SheafSystem/section_evaluator.h" 35 #include "SheafSystem/section_space_schema_member.h" 36 #include "SheafSystem/section_space_schema_poset.h" 37 #include "SheafSystem/sec_vd.h" 38 #include "SheafSystem/std_limits.h" 39 #include "SheafSystem/structured_block_1d.h" 40 #include "SheafSystem/structured_block_2d.h" 41 #include "SheafSystem/structured_block_3d.h" 42 #include "SheafSystem/subposet_member_iterator.h" 43 #include "SheafSystem/uniform_eval_family.h" 44 #include "vtkDoubleArray.h" 45 #include "vtkIdTypeArray.h" 107 if(invariant_check())
111 disable_invariant_check();
124 invariance(is_initialized() ? coordinates_schema().df() <= 3 :
true);
126 invariance((is_initialized() && has_property()) ?
127 property_schema().df() <= 16 :
132 enable_invariant_check();
155 _prop_state.down_set.set_ct(0);
156 _prop_state.discretization_members.set_ct(0);
160 _coord_state.discretization_members.set_ct(0);
162 _vis_state.down_set.set_ct(0);
163 _vis_state.discretization_members.set_ct(0);
168 _maximal_eval_id.invalidate();
189 require(is_initialized() ? xcoords_schema.
host()->
is_same_state(coordinates_schema().host()) :
true);
190 require(is_initialized() ?xprop_schema.
host()->
is_same_state(property_schema().host()) :
true);
194 _has_property =
true;
196 initialize_states(xcoords_schema, xprop_schema);
203 put_anchor(lsmaller.
index());
207 put_anchor(&lsmaller);
213 ensure(coordinates_schema().is_same_state(&xcoords_schema));
214 ensure(property_schema().is_same_state(&xprop_schema));
228 require(is_initialized() ? xcoords_schema.
host()->
is_same_state(coordinates_schema().host()) :
true);
232 _has_property =
false;
234 initialize_states(xcoords_schema);
248 ensure(coordinates_schema().is_same_state(&xcoords_schema));
262 require(is_initialized());
263 require(anchor().state_is_read_accessible());
267 define_old_variable(
bool old_descending = _descending);
268 define_old_variable(
bool old_strict = _strict);
281 ensure(descending() == old_descending);
282 ensure(strict() == old_strict);
390 post_fatal_error_message(
"Property rep not supported with this coordinates rep.");
393 else if(xcoords_schema.
rep().
name() ==
"vertex_vertex_constant")
397 if(xprop_schema.
rep().
name() ==
"vertex_vertex_constant")
415 post_fatal_error_message(
"Property rep not supported with this coordinates rep.");
422 post_fatal_error_message(
"Coordinates rep not supported.");
479 else if(xcoords_schema.
rep().
name() ==
"vertex_vertex_constant")
496 post_fatal_error_message(
"Coordinates rep not supported.");
532 require(is_initialized());
552 return _has_property;
561 require(is_initialized());
562 require(has_property());
581 return _use_point_top_ids;
588 _use_point_top_ids = xvalue;
590 ensure(use_point_top_ids() == xvalue);
599 return _use_cell_top_ids;
606 _use_cell_top_ids = xvalue;
608 ensure(use_cell_top_ids() == xvalue);
617 vtkDoubleArray* xvtk_pt_coords,
618 vtkDoubleArray* xvtk_prop,
619 int xprop_tensor_rank,
623 vtkIdTypeArray* xvtk_pt_label_ids,
624 vtkIdTypeArray* xvtk_cell_label_ids)
631 require(has_property());
638 require(xcoords.
schema().
df() <= 3);
654 vtkDoubleArray* xvtk_pt_coords,
658 vtkIdTypeArray* xvtk_pt_label_ids,
659 vtkIdTypeArray* xvtk_cell_label_ids)
669 require(xcoords.
schema().
df() <= 3);
686 vtkDoubleArray* xvtk_prop,
687 int xprop_tensor_rank)
691 require(has_property());
719 disable_invariant_check();
721 initialize_buffers();
722 initialize_order(BIORDER);
724 for(
int i=0; i<3; ++i)
726 for(
int j=0; j<3; ++j)
733 _use_point_top_ids =
true;
734 _use_cell_top_ids =
true;
737 enable_invariant_check();
762 disable_invariant_check();
764 put_anchor(xcoordinates_schema, xproperty_schema);
768 enable_invariant_check();
773 ensure(is_initialized());
774 ensure(coordinates_schema().is_same_state(&xcoordinates_schema));
775 ensure(coordinates_schema().is_same_type(&xcoordinates_schema));
776 ensure(coordinates_schema().version() == xcoordinates_schema.
version());
777 ensure(has_property());
778 ensure(property_schema().is_same_state(&xproperty_schema));
779 ensure(property_schema().is_same_type(&xproperty_schema));
780 ensure(property_schema().version() == xproperty_schema.
version());
781 ensure(descending());
783 ensure(unexecutable(!is_done() implies
this is first member));
801 disable_invariant_check();
805 initialize_states(xcoordinates_schema);
806 put_anchor(xcoordinates_schema);
810 enable_invariant_check();
815 ensure(is_initialized());
816 ensure(coordinates_schema().is_same_state(&xcoordinates_schema));
817 ensure(coordinates_schema().is_same_type(&xcoordinates_schema));
818 ensure(coordinates_schema().version() == xcoordinates_schema.
version());
819 ensure(!has_property());
820 ensure(descending());
822 ensure(unexecutable(!is_done() implies
this is first member));
845 for(
int i=0; i<COORD_DOFS_UB; ++i)
847 _coord_dofs[i] = 0.0;
850 for(
int i=0; i<PROP_DOFS_UB; ++i)
875 put_has_visited(ldown_set[i],
false);
916 _coord_state.initialize(xcoordinates_schema);
917 _prop_state.initialize(xproperty_schema);
924 _vis_state.initialize(xcoordinates_schema);
941 _coord_state.initialize(xcoordinates_schema);
948 _vis_state.initialize(xcoordinates_schema);
961 int xprop_tensor_rank,
962 vtkDoubleArray* xvtk_prop,
969 if(xprop_tensor_rank < 2)
974 xvtk_prop->SetTuple(xvtk_tuple_id, xprop_dofs);
986 _st2_e2[0][0] = xprop_dofs[0];
987 _st2_e2[0][1] = xprop_dofs[1];
988 _st2_e2[1][1] = xprop_dofs[2];
990 _st2_e2[1][0] = _st2_e2[0][1];
994 xvtk_prop->SetTuple(xvtk_tuple_id, &_st2_e2[0][0]);
1000 _st2_e3[0][0] = xprop_dofs[0];
1001 _st2_e3[0][1] = xprop_dofs[1];
1002 _st2_e3[1][1] = xprop_dofs[2];
1003 _st2_e3[0][2] = xprop_dofs[3];
1004 _st2_e3[1][2] = xprop_dofs[4];
1005 _st2_e3[2][2] = xprop_dofs[5];
1007 _st2_e3[1][0] = _st2_e3[0][1];
1008 _st2_e3[2][0] = _st2_e3[0][2];
1009 _st2_e3[2][1] = _st2_e3[1][2];
1011 xvtk_prop->SetTuple(xvtk_tuple_id, &_st2_e3[0][0]);
1021 poset_state_handle * host() const
The poset which this is a handle to a component of.
virtual void force_is_done()
Force the iterator to be done.
section_space_schema_poset * host() const
The poset which this is a handle to a component of.
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 state_is_read_accessible() const
True if this is attached and if the state is accessible for read or access control is disabled...
subposet & evaluation()
The evaluation subposet for section spaces on this schema (mutable version).
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.
const scoped_index & index() const
The index of the component state this handle is attached to.
std::string name() const
A name for this.
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.
void set_ct(size_type xct)
Sets ct() == xct.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
bool le(pod_index_type xother_index) const
True if this is less than or equal to the member with index xother_index.
std::string evaluator_family_name() const
The name of the evaluator family for section spaces on schemae hosted by this.
A section of a fiber bundle with a d-dimensional vector space fiber.
SHEAF_DLL_SPEC void min(const vd &x0, vd_value_type &xresult, bool xauto_access)
Minimum component of x0, pre-allocated version.
static const poset_path & standard_schema_path()
The path of the schema required by this class.
virtual void reset(bool xreset_markers=true)
Restarts the iteration over the down set of anchor().
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).
bool invariant() const
The class invariant.
A client handle for a poset member which has been prepared for use as a schema for a section space...
int df() const
The dimension of the fiber space component.
bool is_same_state(const poset_state_handle *xother) const
True if this is attached to the same state as xother.
An abstract client handle for a member of a poset.
double sec_vd_dof_type
The type of degree of freedom in the section space.
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).