21 #include "SheafSystem/sec_atp_space.h" 23 #include "SheafSystem/abstract_poset_member.impl.h" 24 #include "SheafSystem/assert_contract.h" 25 #include "SheafSystem/binary_section_space_schema_member.impl.h" 26 #include "SheafSystem/binary_section_space_schema_poset.h" 27 #include "SheafSystem/fiber_bundles_namespace.h" 28 #include "SheafSystem/namespace_poset.impl.h" 29 #include "SheafSystem/namespace_poset_member.h" 30 #include "SheafSystem/poset_handle_factory.h" 31 #include "SheafSystem/sec_at1.h" 32 #include "SheafSystem/sec_at1_space.h" 33 #include "SheafSystem/sec_atp.h" 34 #include "SheafSystem/sec_tuple_space.impl.h" 35 #include "SheafSystem/section_space_schema_member.impl.h" 36 #include "SheafSystem/section_space_schema_poset.h" 37 #include "SheafSystem/atp.h" 38 #include "SheafSystem/atp_space.h" 65 require(!xpath.
empty());
68 require(xschema_path.
full());
70 require(fiber_space_conforms<fiber_type::host_type>(xns, xschema_path, xauto_access));
74 require(same_vector_fiber_space(xns, xschema_path, xvector_space_path, xauto_access));
82 table_type& result = *(
new table_type());
86 schema_type lschema(xns, xschema_path, xauto_access);
111 lmap.
put_dof(
"scalar_space_path", lscalar_space_path);
115 lmap.
put_dof(
"vector_space_path", xvector_space_path);
119 result.new_state(xns, xpath, lschema, lmap);
128 ensure(xns.
owns(result, xauto_access));
129 ensure(result.path(
true) == xpath);
130 ensure(result.state_is_not_read_accessible());
131 ensure(result.schema(
true).path(xauto_access) == xschema_path);
133 ensure(result.factor_ct(
true) == result.schema(
true).fiber_space<
fiber_type::host_type>().factor_ct(xauto_access));
135 ensure(result.scalar_space_path(
true) ==
138 ensure(result.dd(
true) == result.schema(
true).fiber_space<
fiber_type::host_type>().dd(xauto_access));
139 ensure(result.vector_space_path(
true) == xvector_space_path);
155 require(state_is_auto_read_accessible(xauto_access));
156 require(contains_member(xmbr_id, xauto_access));
157 require(contains_variance_subposets(xauto_access));
161 bool result = is_covariant(xmbr_id, xauto_access);
177 require(state_is_auto_read_accessible(xauto_access));
178 require(contains_member(xmbr_id, xauto_access));
179 require(contains_variance_subposets(xauto_access));
183 return is_p_form(xmbr_id.
hub_pod(), xauto_access);
192 require(state_is_auto_read_write_accessible(xauto_access));
193 require(contains_member(xmbr_id, xauto_access));
194 require(contains_variance_subposets(xauto_access));
198 put_is_covariant(xmbr_id, xauto_access);
202 ensure(is_p_form(xmbr_id, xauto_access));
215 require(state_is_auto_read_write_accessible(xauto_access));
216 require(contains_member(xmbr_id, xauto_access));
217 require(contains_variance_subposets(xauto_access));
221 put_is_p_form(xmbr_id.
hub_pod(), xauto_access);
225 ensure(is_p_form(xmbr_id, xauto_access));
239 require(state_is_auto_read_accessible(xauto_access));
240 require(contains_member(xmbr_id, xauto_access));
241 require(contains_variance_subposets(xauto_access));
245 bool result = is_contravariant(xmbr_id, xauto_access);
261 require(state_is_auto_read_accessible(xauto_access));
262 require(contains_member(xmbr_id, xauto_access));
263 require(contains_variance_subposets(xauto_access));
267 return is_p_vector(xmbr_id.
hub_pod(), xauto_access);
276 require(state_is_auto_read_write_accessible(xauto_access));
277 require(contains_member(xmbr_id, xauto_access));
278 require(contains_variance_subposets(xauto_access));
282 put_is_contravariant(xmbr_id, xauto_access);
286 ensure(is_p_vector(xmbr_id, xauto_access));
299 require(state_is_auto_read_write_accessible(xauto_access));
300 require(contains_member(xmbr_id, xauto_access));
301 require(contains_variance_subposets(xauto_access));
305 put_is_p_vector(xmbr_id.
hub_pod(), xauto_access);
309 ensure(is_p_vector(xmbr_id, xauto_access));
354 require(xbottom != 0);
380 d(
int xp,
int xdd)
const 451 fiber_bundle::sec_atp_space::
484 return SEC_ATP_SPACE_ID;
498 static const char* result =
"sec_atp_space";
bool is_pure() const
True if and only if all indices are covariant or all indices are contravariant.
void insert_prototype(const poset_state_handle *xprototype)
Sets xprototype as the prototype for its client class.
A client handle for a poset member which has been prepared for use as a schema for a section space...
bool full() const
True if both poset name and member name are not empty.
int p() const
The tensor degree.
The "type" of a tensor; specifies the degree and the co- or contra-variance for each index of a tenso...
A space of scalars viewed as an antisymmetric tensor section space of degree 1.
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...
poset_type
Identifiers for poset types.
virtual tensor_variance round_variance(const tensor_variance &xvariance) const
"Rounds" xvariance up or down to a supported value; either pure covariant or pure contravariant...
sec_tp_space()
Default constructor; creates a new sec_tp_space handle not attached to any state. ...
A path defined by a poset name and a member name separated by a forward slash ('/'). For example: "cell_definitions/triangle".
virtual bool invariant() const
Class invariant.
A schema poset for a section space. A binary Cartesian product subspace of the binary tensor product ...
virtual void get_read_access() const
Get read access to the state associated with this.
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.
SHEAF_DLL_SPEC unsigned int binomial_coefficient(unsigned int xi, unsigned int xj)
Binomial coefficient (xi, xj).
void copy_dof_tuple(const poset_dof_map &xother)
Copies the dof tuple of xother into this.
void put_is_p_vector(pod_index_type xmbr_id, bool xauto_access)
Sets is_p_vector for the member with id xmbr_id to true. synonym for put_is_contravariant(xmbr_id, xauto_access).
bool is_p_form(pod_index_type xmbr_id, bool xauto_access) const
True if the member with id xmbr_id is a p-form; synonym for is_covariant(xmbr_id, xauto_access)...
virtual ~sec_atp_space()
Destructor.
virtual void release_access(bool xall=false) const
Release access. If xall is true, release all levels of access. Otherwise, release one level of access...
sec_atp_space()
Default constructor; creates a new sec_atp_space handle not attached to any state.
Abstract base class with useful features for all objects.
An abstract antisymmetric tensor section space of degree p.
void put_is_p_form(pod_index_type xmbr_id, bool xauto_access)
Sets is_p_form for the member with id xmbr_id to true; synonym for put_is_covariant(xmbr_id, xauto_access).
An abstract antisymmetric tensor space of degree p.
virtual bool is_ancestor_of(const any *xother) const
True if other conforms to this.
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)
virtual const char * class_name() const
The name of this class.
An index within the external ("client") scope of a given id space.
A section of a bundle with fiber type atp.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
bool contains_path(const poset_path &xpath, bool xauto_access=true) const
True if this contains the poset or poset member specified by xpath.
static sec_atp_space & new_table(namespace_type &xhost, const poset_path &xpath, const poset_path &xschema_path, const poset_path &xvector_space_path, bool xauto_access)
Creates a new sec_atp_space in namespace xns with path xpath, schema specified by xschema_path...
bool empty() const
True if both poset name and member name are empty.
void disable_invariant_check() const
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing inv...
poset_state_handle()
Default constructor.
virtual poset_type type_id() const
Identifier for the type of this poset.
static poset_handle_factory & factory()
The poset handle factory.
virtual bool is_attached() const
True if this is attached to a state.
virtual void put_dof(pod_index_type xdof_id, const void *xdof, size_type xdof_size)
Sets the dof referred to by xdof_id to the value at xdof.
bool invariant_check() const
True if invariant checking is enabled.
virtual bool invariant() const
Class invariant.
virtual sec_atp_space * clone() const
Virtual constructor; creates a new handle of the same actual type as this, attached to the same state...
int_type pod_index_type
The plain old data index type.
poset & fiber_space()
The fiber space for section spaces on this schema (mutable version).
bool variance(int xi) const
The variance of the xi-th index; covariant if true, contravariant if false.
void purify()
Sets all indices the same as index 0.
int d() const
The dimension.
bool is_p_vector(pod_index_type xmbr_id, bool xauto_access) const
True if the member with id xmbr_id is a p-vector; synonym for is_contravariant(xmbr_id, xauto_access).
An array representation of abstract class poset_dof_map.
Namespace containing the vector algrebra functions for the fiber_bundles component of the sheaf syste...
Namespace for the fiber_bundles component of the sheaf system.
bool is_same_type(const any *other) const
True if other is the same type as this.
void enable_invariant_check() const
Enable invariant checking.
virtual size_type covariant_subposet_ct() const
The number of covariant subposets.
virtual array_poset_dof_map & table_dof_map(bool xrequire_write_access=false)
The map from table dof client_ids to table dof values for this poset (mutable version) ...
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.