21 #include "SheafSystem/sec_met_e2.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/at1_space.h" 27 #include "SheafSystem/fiber_bundles_namespace.h" 28 #include "SheafSystem/index_space_iterator.h" 29 #include "SheafSystem/sec_at0.h" 30 #include "SheafSystem/sec_at0_space.h" 31 #include "SheafSystem/sec_at1_space.h" 32 #include "SheafSystem/sec_e2.h" 33 #include "SheafSystem/sec_stp_space.h" 34 #include "SheafSystem/sec_tuple.impl.h" 35 #include "SheafSystem/sec_tuple_space.impl.h" 36 #include "SheafSystem/sec_vd.impl.h" 37 #include "SheafSystem/met_e2.h" 38 #include "SheafSystem/stp_space.h" 67 require(!xhost_path.
empty());
70 require(xschema_path.
full());
72 require(host_type::fiber_space_conforms<fiber_type::host_type>(xns, xschema_path, xauto_access));
76 require(host_type::same_vector_fiber_space(xns, xschema_path, xvector_space_path, xauto_access));
80 host_type& result = host_type::new_table(xns, xhost_path, xschema_path, xvector_space_path, xauto_access);
84 ensure(xns.
owns(result, xauto_access));
85 ensure(result.
path(
true) == xhost_path);
87 ensure(result.
schema(
true).
path(xauto_access) == xschema_path);
94 ensure(result.
p(
true) == 2);
109 const std::string& xsection_suffix,
110 const std::string& xfiber_suffix,
119 require(xbase_path.
full());
122 require(xrep_path.
empty() || xrep_path.
full());
125 require(xsection_suffix.empty() || poset_path::is_valid_name(xsection_suffix));
127 require(xfiber_suffix.empty() || poset_path::is_valid_name(xfiber_suffix));
129 require(standard_host_is_available<sec_met_e2>(xns, xbase_path, xrep_path, xsection_suffix, xfiber_suffix, xauto_access));
130 require(fiber_type::standard_host_is_available<fiber_type>(xns, xfiber_suffix, xauto_access));
131 require(schema_type::standard_host_is_available<sec_met_e2>(xns, xbase_path, xrep_path, xfiber_suffix, xauto_access));
135 poset_path lstd_path = standard_host_path<sec_met_e2>(xbase_path, xrep_path, xsection_suffix, xfiber_suffix);
151 poset_path lrep_path = (!xrep_path.empty() ? xrep_path : standard_rep_path());
156 schema_type::standard_member<sec_met_e2>(xns, xbase_path, lrep_path, xfiber_suffix, xauto_access);
161 vector_space_type::standard_host(xns, xbase_path, lrep_path, xsection_suffix, xfiber_suffix, xauto_access).
path(xauto_access);
165 lresult_ptr = &new_host(xns, lstd_path, lstd_schema_path, lvector_space_path, xauto_access);
172 ensure(xns.
owns(result, xauto_access));
173 ensure(result.
path(
true) == standard_host_path<sec_met_e2>(xbase_path, xrep_path, xsection_suffix, xfiber_suffix));
175 ensure(result.
schema(
true).
path(xauto_access) ==
176 schema_type::standard_member_path<sec_met_e2>(xbase_path, xrep_path, xfiber_suffix));
181 scalar_type::standard_host_path<scalar_type>(xbase_path, result.
rep().
path(xauto_access), xsection_suffix, xfiber_suffix));
183 ensure(result.
p(
true) == 2);
186 vector_space_type::standard_host_path<vector_space_type>(xbase_path, result.
rep().
path(xauto_access), xsection_suffix, xfiber_suffix));
227 attach_to_state(xhost, xhub_id);
233 ensure(index() == xhub_id);
234 ensure(is_attached());
235 ensure(!is_restricted());
249 attach_to_state(xhost, xid.
hub_pod());
255 ensure(index() ==~ xid);
256 ensure(is_attached());
257 ensure(!is_restricted());
268 require(!xname.empty());
273 attach_to_state(xhost, xname);
279 ensure(name() == xname);
280 ensure(is_attached());
281 ensure(!is_restricted());
294 require(precondition_of(attach_to_state(same args)));
298 attach_to_state(xnamespace, xpath, xauto_access);
302 ensure(postcondition_of(attach_to_state(same args)));
316 require(xother != 0);
320 attach_to_state(xother);
325 ensure(is_attached());
326 ensure(is_same_state(xother));
327 ensure(is_same_restriction(xother));
337 require(precondition_of(new_jim_state(xhost, xdof_map,
false, xauto_access)));
341 new_jim_state(xhost, xdof_map,
false, xauto_access);
345 ensure(postcondition_of(new_jim_state(xhost, xdof_map,
false, xauto_access)));
358 require(is_ancestor_of(&xother));
359 require(precondition_of(attach_to_state(&xother)));
363 attach_to_state(&xother);
367 ensure(postcondition_of(attach_to_state(&xother)));
380 require(precondition_of(attach_to_state(&xother)));
384 attach_to_state(&xother);
388 ensure(postcondition_of(attach_to_state(&xother)));
401 require(precondition_of(sec_vd::operator=(xfiber)));
405 sec_vd::operator=(xfiber);
409 ensure(postcondition_of(sec_vd::operator=(xfiber)));
422 require(precondition_of(sec_vd::operator=(xfiber)));
426 sec_vd::operator=(xfiber);
430 ensure(postcondition_of(sec_vd::operator=(xfiber)));
562 const string& result = static_class_name();
566 ensure(!result.empty());
581 static const string result(
"sec_met_e2");
585 ensure(!result.empty());
634 require(xother != 0);
641 bool result =
dynamic_cast<const met_e2*
>(xother) != 0;
660 require(xother != 0);
667 bool result =
dynamic_cast<const sec_met_e2*
>(xother) != 0;
689 invariance(sec_met_ed::invariant());
691 if (invariant_check())
695 disable_invariant_check();
697 invariance(is_attached() ? df() == 3 :
true);
701 enable_invariant_check();
706 ensure(is_derived_query);
731 lower(x0, x1, xresult);
741 raise(x0, x1, xresult);
750 #include "SheafSystem/sec_e2.h" 751 #include "SheafSystem/sec_vd.impl.h" 768 binary_op(xmetric, xvector, xresult, lower_functor(), xauto_access);
791 binary_op(xmetric, xcovector, xresult, raise_functor(), xauto_access);
SHEAF_DLL_SPEC void lower(const met &xmetric, const ed &xvector, ed &xresult, bool xauto_access)
Lower vector (pre-allocated version for persistent type).
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 ...
An abstract symmetric tensor section space of degree p.
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...
bool full() const
True if both poset name and member name are not empty.
The abstract map from section dof ids to section dof values of heterogeneous type.
sec_met_e2()
default constructor
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...
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.
Namespace containing the metric tensor algrebra functions for the fiber_bundles component of the shea...
poset_path vector_space_path() const
The path of the underlying vector space.
SHEAF_DLL_SPEC void lower(const sec_met &xmetric, const sec_ed &xvector, sec_ed &xresult, bool xauto_access)
Lower vector (pre-allocated version).
A schema poset for a section space. A binary Cartesian product subspace of the binary tensor product ...
static const std::string & static_class_name()
The name of this class.
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.
A metric tensor over an abstract vector space (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)
A metric tensor over a 2 dimensional Euclidean vector space (persistent version). ...
virtual sec_met_e2 * clone() const
Make a new handle, no state instance of current.
bool invariant() const
Class invariant.
Euclidean vector space of dimension 2 (volatile version).
virtual int d(int xp, int xdd) const
Dimension d() as a function of degree xp and domain dimension xdd.
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)
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. ...
virtual const fiber_type & fiber_prototype() const
Virtual constructor for the associated fiber type.
bool is_ancestor_of(const any *xother) const
True if xother conforms to current.
int dd() const
The dimension of the underlying ("domain") vector space.
bool empty() const
True if both poset name and member name are empty.
virtual sec_met_e2 & operator=(const abstract_poset_member &xother)
Assignment operator; synonym for attach_to_state(&xother).
virtual const std::string & class_name() const
The name of this class.
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).
Namespace containing the algrebra functions for a a section of a fiber bundle with a d-dimensional ve...
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...
An abstract client handle for a member of a poset.
SHEAF_DLL_SPEC void raise(const sec_met &xmetric, const sec_ed &xcovector, sec_ed &xresult, bool xauto_access)
Raise covector (pre-allocated version).
std::string path() const
The full path as a string.
A metric tensor over a 2 dimensional Euclidean vector space (volatile version).
A section of a bundle with fiber type met_e2.
An abstract symmetric tensor space of degree p.
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...
bool fiber_is_ancestor_of(const any *xother) const
True if xother conforms to an instance of the fiber of current.
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.
A section of a fiber bundle with a 2-dimensional Euclidean vector space fiber.
A handle for a poset whose members are numerical representations of sections of a fiber bundle...