21 #include "SheafSystem/sec_jcb_e13.h" 23 #include "SheafSystem/assert_contract.h" 24 #include "SheafSystem/base_space_poset.h" 25 #include "SheafSystem/binary_section_space_schema_member.impl.h" 26 #include "SheafSystem/fiber_bundles_namespace.h" 27 #include "SheafSystem/namespace_poset.impl.h" 28 #include "SheafSystem/section_space_schema_member.impl.h" 29 #include "SheafSystem/section_space_schema_poset.h" 30 #include "SheafSystem/sec_at0.h" 31 #include "SheafSystem/sec_at1.h" 32 #include "SheafSystem/sec_at1_space.h" 33 #include "SheafSystem/sec_e1.h" 34 #include "SheafSystem/sec_e3.h" 35 #include "SheafSystem/sec_jcb_space.h" 36 #include "SheafSystem/sec_tuple.impl.h" 37 #include "SheafSystem/sec_tuple_space.impl.h" 38 #include "SheafSystem/jcb_e13.h" 39 #include "SheafSystem/jcb_space.h" 69 require(!xhost_path.
empty());
72 require(xschema_path.
full());
74 require(host_type::fiber_space_conforms<fiber_type::host_type>(xns, xschema_path, xauto_access));
79 require(host_type::same_vector_fiber_space(xns, xschema_path, xdomain_path, xrange_path, xauto_access));
83 host_type& result = host_type::new_table(xns, xhost_path, xschema_path, xdomain_path, xrange_path, xauto_access);
87 ensure(xns.
owns(result, xauto_access));
88 ensure(result.
path(
true) == xhost_path);
90 ensure(result.
schema(
true).
path(xauto_access) == xschema_path);
101 ensure(result.
range_path(
true) == xrange_path);
114 const std::string& xsection_suffix,
115 const std::string& xfiber_suffix,
124 require(xbase_path.
full());
127 require(xrep_path.
empty() || xrep_path.
full());
130 require(xsection_suffix.empty() || poset_path::is_valid_name(xsection_suffix));
132 require(xfiber_suffix.empty() || poset_path::is_valid_name(xfiber_suffix));
134 require(standard_host_is_available<sec_jcb_e13>(xns, xbase_path, xrep_path, xsection_suffix, xfiber_suffix, xauto_access));
135 require(fiber_type::standard_host_is_available<fiber_type>(xns, xfiber_suffix, xauto_access));
136 require(schema_type::standard_host_is_available<sec_jcb_e13>(xns, xbase_path, xrep_path, xfiber_suffix, xauto_access));
140 poset_path lstd_path = standard_host_path<sec_jcb_e13>(xbase_path, xrep_path, xsection_suffix, xfiber_suffix);
156 poset_path lrep_path = (!xrep_path.empty() ? xrep_path : standard_rep_path());
161 schema_type::standard_member<sec_jcb_e13>(xns, xbase_path, lrep_path, xfiber_suffix, xauto_access);
166 domain_type::standard_host(xns, xbase_path, lrep_path, xsection_suffix, xfiber_suffix, xauto_access).
path(xauto_access);
171 range_type::standard_host(xns, xbase_path, lrep_path, xsection_suffix, xfiber_suffix, xauto_access).
path(xauto_access);
175 lresult_ptr = &new_host(xns, lstd_path, lstd_schema_path, ldomain_path, lrange_path, xauto_access);
182 ensure(xns.
owns(result, xauto_access));
183 ensure(result.
path(
true) == standard_host_path<sec_jcb_e13>(xbase_path, xrep_path, xsection_suffix, xfiber_suffix));
185 ensure(result.
schema(
true).
path(xauto_access) ==
186 schema_type::standard_member_path<sec_jcb_e13>(xbase_path, xrep_path, xfiber_suffix));
191 standard_host_path<domain_type::scalar_type>(xbase_path, xrep_path, xsection_suffix, xfiber_suffix));
193 standard_host_path<range_type::scalar_type>(xbase_path, xrep_path, xsection_suffix, xfiber_suffix));
197 standard_host_path<domain_type>(xbase_path, xrep_path, xsection_suffix, xfiber_suffix));
199 standard_host_path<range_type>(xbase_path, xrep_path, xsection_suffix, xfiber_suffix));
246 attach_to_state(xhost, xhub_id);
252 ensure(index() == xhub_id);
253 ensure(is_attached());
254 ensure(!is_restricted());
268 attach_to_state(xhost, xid.
hub_pod());
274 ensure(index() ==~ xid);
275 ensure(is_attached());
276 ensure(!is_restricted());
287 require(!xname.empty());
292 attach_to_state(xhost, xname);
298 ensure(name() == xname);
299 ensure(is_attached());
300 ensure(!is_restricted());
313 require(precondition_of(attach_to_state(same args)));
317 attach_to_state(xnamespace, xpath, xauto_access);
321 ensure(postcondition_of(attach_to_state(same args)));
335 require(xother != 0);
339 attach_to_state(xother);
344 ensure(is_attached());
345 ensure(is_same_state(xother));
346 ensure(is_same_restriction(xother));
356 require(precondition_of(new_jim_state(xhost, xdof_map,
false, xauto_access)));
360 new_jim_state(xhost, xdof_map,
false, xauto_access);
364 ensure(postcondition_of(new_jim_state(xhost, xdof_map,
false, xauto_access)));
377 require(is_ancestor_of(&xother));
378 require(precondition_of(attach_to_state(&xother)));
382 attach_to_state(&xother);
386 ensure(postcondition_of(attach_to_state(&xother)));
399 require(precondition_of(attach_to_state(&xother)));
403 attach_to_state(&xother);
407 ensure(postcondition_of(attach_to_state(&xother)));
420 require(precondition_of(sec_vd::operator=(xfiber)));
424 sec_vd::operator=(xfiber);
428 ensure(postcondition_of(sec_vd::operator=(xfiber)));
441 require(precondition_of(sec_vd::operator=(xfiber)));
445 sec_vd::operator=(xfiber);
449 ensure(postcondition_of(sec_vd::operator=(xfiber)));
550 const string& result = static_class_name();
554 ensure(!result.empty());
569 static const string result(
"sec_jcb_e13");
573 ensure(!result.empty());
622 require(xother != 0);
629 bool result =
dynamic_cast<const jcb_e13*
>(xother) != 0;
648 require(xother != 0);
655 bool result =
dynamic_cast<const sec_jcb_e13*
>(xother) != 0;
679 invariance(sec_jcb_ed::invariant());
681 if (invariant_check())
685 disable_invariant_check();
687 invariance(is_attached() ? dd() == 1 :
true);
688 invariance(is_attached() ? dr() == 3 :
true);
692 enable_invariant_check();
697 ensure(is_derived_query);
722 push(x0, x1, xresult);
732 pull(x0, x1, xresult);
741 #include "SheafSystem/sec_e1.h" 742 #include "SheafSystem/sec_e3.h" 743 #include "SheafSystem/sec_vd.impl.h" 760 binary_op(xjcb, xvector, xresult, push_functor(), xauto_access);
783 binary_op(xjcb, xcovector, xresult, pull_functor(), xauto_access);
static int d(int xdd, int xdr)
Dimension d() as a function of domain dimension xdd and range dimension xdr.
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 full() const
True if both poset name and member name are not empty.
Euclidean vector space of dimension 3 (volatile version).
poset_path range_path() const
The path of the range vector space.
The abstract map from section dof ids to section dof values of heterogeneous type.
A space of scalars viewed as an antisymmetric tensor section space of degree 1.
poset_path domain_path() const
The path of the domain vector space.
Jacobian of a map from a 1 dimensional domain (u) to a 3 dimensional Euclidean space (x...
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...
bool state_is_auto_read_accessible(bool xauto_access) const
True if the state is auto accessible for read, that is, if the state is already accessible for read o...
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.
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.
Abstract base class with useful features for all objects.
bool fiber_is_ancestor_of(const any *xother) const
True if xother conforms to an instance of the fiber of current.
The lattice of closed cells of a cellular space; a lattice representation of a computational mesh...
A section of a bundle with fiber type jcb_e13.
virtual section_space_schema_member & schema()
The schema for this poset (mutable version)
virtual const std::string & class_name() const
The name of this class.
virtual int dr() const
Dimension of the range.
int dd() const
The dimension of the underlying ("domain") vector space.
void binary_op(const S0 &x0, const S1 &x1, SR &xresult, F xfunctor, bool xauto_access)
Binary operator.
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)
SHEAF_DLL_SPEC void push(const sec_jcb &xjcb, const sec_at1 &xvector, sec_at1 &xresult, bool xauto_access)
Push vector forward (pre-allocated version).
An index within the external ("client") scope of a given id space.
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. ...
Jacobian of a map from a 1 dimensional domain (u) to a 3 dimensional Euclidean space (x...
static const std::string & static_class_name()
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...
static host_type & new_host(namespace_type &xns, const poset_path &xhost_path, const poset_path &xschema_path, const poset_path &xdomain_space_path, const poset_path &xrange_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...
~sec_jcb_e13()
Destructor.
bool empty() const
True if both poset name and member name are empty.
bool is_ancestor_of(const any *xother) const
True if xother conforms to current.
A section of a fiber bundle with a 3-dimensional Euclidean vector space fiber.
SHEAF_DLL_SPEC void pull(const jcb &xjcb, const at1 &xcovector, at1 &xresult, bool xauto_access)
Pull covector back (pre-allocated version for persistent types).
sec_jcb_e13()
Default constructor.
virtual sec_jcb_e13 * clone() const
Make a new handle, no state instance of current.
Namespace containing the Jacobian algrebra functions for the fiber_bundles component of the sheaf sys...
virtual sec_jcb_e13 & operator=(const abstract_poset_member &xother)
Assignment operator; synonym for attach_to_state(&xother).
SHEAF_DLL_SPEC void pull(const sec_jcb &xjcb, const sec_at1 &xcovector, sec_at1 &xresult, bool xauto_access)
Pull covector back (pre-allocated version).
An abstract space of Jacobians.
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).
A section of a fiber bundle with a 1-dimensional Euclidean vector space fiber.
An abstract section space of Jacobians.
Euclidean vector space of dimension 1 (volatile version).
Namespace containing the algrebra functions for a a section of a fiber bundle with a d-dimensional ve...
An abstract client handle for a member of a poset.
std::string path() const
The full path as a string.
SHEAF_DLL_SPEC void push(const jcb &xjcb, const at1 &xvector, at1 &xresult, bool xauto_access)
Push vector forward (pre-allocated version for persistent types).
virtual const fiber_type & fiber_prototype() const
Virtual constructor for the associated fiber type.
Namespace for the fiber_bundles component of the sheaf system.
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...
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...