22 #include "SheafSystem/sec_t4_e3.h" 24 #include "SheafSystem/assert_contract.h" 25 #include "SheafSystem/base_space_poset.h" 26 #include "SheafSystem/binary_section_space_schema_member.impl.h" 27 #include "SheafSystem/at1_space.h" 28 #include "SheafSystem/fiber_bundles_namespace.h" 29 #include "SheafSystem/index_space_iterator.h" 30 #include "SheafSystem/sec_at0.h" 31 #include "SheafSystem/sec_at0_space.h" 32 #include "SheafSystem/sec_at1_space.h" 33 #include "SheafSystem/sec_e3.h" 34 #include "SheafSystem/sec_stp_space.h" 35 #include "SheafSystem/sec_tuple.impl.h" 36 #include "SheafSystem/sec_tuple_space.impl.h" 37 #include "SheafSystem/sec_vd.impl.h" 38 #include "SheafSystem/t4_e3.h" 39 #include "SheafSystem/stp_space.h" 68 require(!xhost_path.
empty());
71 require(xschema_path.
full());
73 require(host_type::fiber_space_conforms<fiber_type::host_type>(xns, xschema_path, xauto_access));
77 require(host_type::same_vector_fiber_space(xns, xschema_path, xvector_space_path, xauto_access));
81 host_type& result = host_type::new_table(xns, xhost_path, xschema_path, xvector_space_path, xauto_access);
85 ensure(xns.
owns(result, xauto_access));
86 ensure(result.
path(
true) == xhost_path);
88 ensure(result.
schema(
true).
path(xauto_access) == xschema_path);
95 ensure(result.
p(
true) == 4);
110 const std::string& xsection_suffix,
111 const std::string& xfiber_suffix,
120 require(xbase_path.
full());
123 require(xrep_path.
empty() || xrep_path.
full());
126 require(xsection_suffix.empty() || poset_path::is_valid_name(xsection_suffix));
128 require(xfiber_suffix.empty() || poset_path::is_valid_name(xfiber_suffix));
130 require(standard_host_is_available<sec_t4_e3>(xns, xbase_path, xrep_path, xsection_suffix, xfiber_suffix, xauto_access));
131 require(fiber_type::standard_host_is_available<fiber_type>(xns, xfiber_suffix, xauto_access));
132 require(schema_type::standard_host_is_available<sec_t4_e3>(xns, xbase_path, xrep_path, xfiber_suffix, xauto_access));
136 poset_path lstd_path = standard_host_path<sec_t4_e3>(xbase_path, xrep_path, xsection_suffix, xfiber_suffix);
152 poset_path lrep_path = (!xrep_path.empty() ? xrep_path : standard_rep_path());
157 schema_type::standard_member<sec_t4_e3>(xns, xbase_path, lrep_path, xfiber_suffix, xauto_access);
162 vector_space_type::standard_host(xns, xbase_path, lrep_path, xsection_suffix, xfiber_suffix, xauto_access).
path(xauto_access);
166 lresult_ptr = &new_host(xns, lstd_path, lstd_schema_path, lvector_space_path, xauto_access);
173 ensure(xns.
owns(result, xauto_access));
174 ensure(result.
path(
true) == standard_host_path<sec_t4_e3>(xbase_path, xrep_path, xsection_suffix, xfiber_suffix));
176 ensure(result.
schema(
true).
path(xauto_access) ==
177 schema_type::standard_member_path<sec_t4_e3>(xbase_path, xrep_path, xfiber_suffix));
182 scalar_type::standard_host_path<scalar_type>(xbase_path, result.
rep().
path(xauto_access), xsection_suffix, xfiber_suffix));
184 ensure(result.
p(
true) == 4);
187 vector_space_type::standard_host_path<vector_space_type>(xbase_path, result.
rep().
path(xauto_access), xsection_suffix, xfiber_suffix));
228 attach_to_state(&xother);
234 ensure(is_same_state(&xother));
235 ensure(is_same_restriction(&xother));
241 int xbase_version,
bool xauto_access)
246 require(precondition_of(new_jim_state(\
247 xhost, xbase_mbr, xbase_version, xauto_access)));
251 new_jim_state(xhost, xbase_mbr, xbase_version, xauto_access);
255 ensure(postcondition_of(new_jim_state(\
256 xhost, xbase_mbr, xbase_version, xauto_access)));
269 require(precondition_of(new_jim_state(xhost, xdof_map,
false, xauto_access)));
273 new_jim_state(xhost, xdof_map,
false, xauto_access);
277 ensure(postcondition_of(new_jim_state(xhost, xdof_map,
false, xauto_access)));
295 attach_to_state(xhost, xhub_id);
301 ensure(index() == xhub_id);
302 ensure(is_attached());
303 ensure(!is_restricted());
317 attach_to_state(xhost, xid.
hub_pod());
323 ensure(index() ==~ xid);
324 ensure(is_attached());
325 ensure(!is_restricted());
336 require(!xname.empty());
341 attach_to_state(xhost, xname);
347 ensure(name() == xname);
348 ensure(is_attached());
349 ensure(!is_restricted());
361 require(precondition_of(attach_to_state(same args)));
365 attach_to_state(xnamespace, xpath, xauto_access);
369 ensure(postcondition_of(attach_to_state(same args)));
382 require(is_ancestor_of(&xother));
383 require(precondition_of(attach_to_state(&xother)));
387 attach_to_state(&xother);
391 ensure(postcondition_of(attach_to_state(&xother)));
404 require(precondition_of(attach_to_state(&xother)));
408 attach_to_state(&xother);
412 ensure(postcondition_of(attach_to_state(&xother)));
425 require(precondition_of(sec_vd::operator=(xfiber)));
429 sec_vd::operator=(xfiber);
433 ensure(postcondition_of(sec_vd::operator=(xfiber)));
446 require(precondition_of(sec_vd::operator=(xfiber)));
450 sec_vd::operator=(xfiber);
454 ensure(postcondition_of(sec_vd::operator=(xfiber)));
552 const string& result = static_class_name();
556 ensure(!result.empty());
571 static const string result(
"sec_t4_e3");
575 ensure(!result.empty());
624 require(xother != 0);
628 bool result =
dynamic_cast<const t4_e3*
>(xother) != 0;
647 require(xother != 0);
651 bool result =
dynamic_cast<const sec_t4_e3*
>(xother) != 0;
671 if (invariant_check())
675 disable_invariant_check();
679 invariance(sec_tp::invariant());
683 invariance(state_is_read_accessible() ? dd() == 3 :
true);
687 enable_invariant_check();
virtual bool invariant() const
Class invariant, intended to be redefined in each descendant. See below for template for invariant in...
static int factor_ct(int xd)
Factor_ct() as a function of dimension xd.
virtual poset_path path(bool xauto_access=true) const
The path of this poset.
bool state_is_auto_read_write_accessible(bool xauto_access) const
True if state is auto accessible for read and write, that is, if the state is already accessible for ...
bool fiber_is_ancestor_of(const any *xother) const
True if xother conforms to an instance of the fiber of current.
bool full() const
True if both poset name and member name are not empty.
bool is_ancestor_of(const any *xother) const
True if xother conforms to current.
The abstract map from section dof ids to section dof values of heterogeneous type.
virtual sec_t4_e3 & operator=(const abstract_poset_member &xother)
Assignment operator; synonym for attach_to_state(&xother).
static const std::string & static_class_name()
The name of this class.
A space of scalars viewed as an antisymmetric tensor section space of degree 1.
poset_path path(bool xauto_access=true) const
A path to this component.
The default name space; a poset which contains other posets as members.
bool state_is_read_accessible() const
True if this is attached and if the state is accessible for read or access control is disabled...
bool path_is_auto_read_accessible(const poset_path &xpath, bool xauto_access) const
True if the state referred to xpath exists and is auto read accessible.
The standard fiber bundles name space; extends the standard sheaves namespace by defining base space...
static host_type & new_host(namespace_type &xns, const poset_path &xhost_path, const poset_path &xschema_path, const poset_path &xvector_space_path, bool xauto_access)
Creates a new host table for members of this type. The poset is created in namespace xns with path xh...
A path defined by a poset name and a member name separated by a forward slash ('/'). For example: "cell_definitions/triangle".
A member of a sec_rep_space; a section.
bool invariant() const
Class invariant.
poset_path vector_space_path() const
The path of the underlying vector space.
A schema poset for a section space. A binary Cartesian product subspace of the binary tensor product ...
poset_state_handle & member_poset(pod_index_type xhub_id, bool xauto_access=true) const
The poset_state_handle object referred to by hub id xhub_id.
The poset for sec_rep_descriptors.
virtual const std::string & class_name() const
The name of this class.
static host_type & standard_host(namespace_type &xns, const poset_path &xbase_path, const poset_path &xrep_path, const std::string &xsection_suffix, const std::string &xfiber_suffix, bool xauto_access)
The standard host for sections of this type with base space xbase_path, representation xrep_path...
A tensor of degree 4 over a Euclidean vector space of dimension 3 (persistent version).
Abstract base class with useful features for all objects.
int p() const
The tensor degree of this space.
The lattice of closed cells of a cellular space; a lattice representation of a computational mesh...
sec_rep_descriptor & rep()
A representation descriptor for this sec rep space (mutable version).
virtual section_space_schema_member & schema()
The schema for this poset (mutable version)
virtual sec_t4_e3 * clone() const
Make a new handle, no state instance of current.
An abstract tensor section space of degree p.
bool owns(const poset_state_handle &xposet, bool xauto_access) const
True if and only if this contains the poset xposet. synonym for contains_poset(xposet.poset_path(true), xauto_access)
An index within the external ("client") scope of a given id space.
A tensor of degree 4 over a Euclidean vector space of dimension 3 (volatile version).
virtual bool is_attached() const
True if this handle is attached to a non-void state.
bool contains_path(const poset_path &xpath, bool xauto_access=true) const
True if this contains the poset or poset member specified by xpath.
virtual bool contains_member(pod_index_type xmbr_hub_id, bool xauto_access=true) const
True if some version of this poset contains poset member with hub id xmbr_hub_id. ...
int dd() const
The dimension of the underlying ("domain") vector space.
bool empty() const
True if both poset name and member name are empty.
A section of a bundle with fiber type t4_e3.
int_type pod_index_type
The plain old data index type.
poset_path scalar_space_path() const
The path of the underlying space of scalars.
poset & fiber_space()
The fiber space for section spaces on this schema (mutable version).
virtual int d(int xp, int xdd) const
Dimension d() as a function of degree xp and domain dimension xdd.
sec_t4_e3()
Default constructor; creates an unattached handle.
An abstract client handle for a member of a poset.
std::string path() const
The full path as a string.
An abstract tensor space of degree p.
Namespace for the fiber_bundles component of the sheaf system.
virtual const fiber_type & fiber_prototype() const
Virtual constructor for the associated fiber type.
bool state_is_not_read_accessible() const
True if this is attached and if the state is accessible for read or if access control is disabled...
A tensor of degree 4 over an abstract vector space (persistent version).
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.
A handle for a poset whose members are numerical representations of sections of a fiber bundle...