21 #include "SheafSystem/sec_at0_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_at0.h" 32 #include "SheafSystem/sec_at1.h" 33 #include "SheafSystem/sec_tuple_space.impl.h" 34 #include "SheafSystem/section_space_schema_member.impl.h" 35 #include "SheafSystem/section_space_schema_poset.h" 36 #include "SheafSystem/at0.h" 37 #include "SheafSystem/at0_space.h" 63 require(!xpath.
empty());
66 require(xschema_path.
full());
68 require(fiber_space_conforms<fiber_type::host_type>(xns, xschema_path, xauto_access));
76 table_type& result = *(
new table_type());
80 schema_type lschema(xns, xschema_path, xauto_access);
101 lmap.
put_dof(
"scalar_space_path", xpath);
106 lmap.
put_dof(
"vector_space_path", xpath);
110 result.new_state(xns, xpath, lschema, lmap);
119 ensure(xns.
owns(result, xauto_access));
120 ensure(result.path(
true) == xpath);
121 ensure(result.state_is_not_read_accessible());
122 ensure(result.schema(
true).path(xauto_access) == xschema_path);
124 ensure(result.factor_ct(
true) == result.schema(
true).fiber_space<
fiber_type::host_type>().factor_ct(xauto_access));
125 ensure(result.factor_ct(
true) == 1);
127 ensure(result.d(
true) == 1);
128 ensure(result.scalar_space_path(
true) == xpath);
130 ensure(result.p(
true) == 0);
131 ensure(result.dd(
true) == result.schema(
true).fiber_space<
fiber_type::host_type>().dd(xauto_access));
132 ensure(result.dd(
true) == 1);
133 ensure(result.vector_space_path(
true) == xpath);
179 require(xbottom != 0);
259 ensure(
is_vector(xmbr_id, xauto_access));
338 fiber_bundle::sec_at0_space::
371 return SEC_AT0_SPACE_ID;
385 static const char* result =
"sec_at0_space";
void insert_prototype(const poset_state_handle *xprototype)
Sets xprototype as the prototype for its client class.
section_space_schema_poset * host() const
The poset which this is a handle to a component of.
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.
const pod_type & pod() const
The "plain old data" storage of this; the value in the external id space.
virtual poset_type type_id() const
Identifier for the type of this poset.
const scoped_index & index() const
The member index of this poset within the namespace host()
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...
virtual pod_index_type prereq_id(int xi) const
The id of the xi-th prerequisite poset for this.
poset_type
Identifiers for poset types.
virtual void put_is_covector(pod_index_type xmbr_id, bool xauto_access)
Sets is_covector true for the member with id xmbr_id.
virtual bool is_covector(pod_index_type xmbr_id, bool xauto_access) const
True if and only if the member with id xmbr_id is a covector.
A path defined by a poset name and a member name separated by a forward slash ('/'). For example: "cell_definitions/triangle".
poset_path vector_space_path() const
The path of the underlying vector space.
virtual bool is_ancestor_of(const any *xother) const
True if other conforms to this.
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.
sec_at0_space()
Default constructor; creates a new sec_at0_space handle not attached to any state.
void copy_dof_tuple(const poset_dof_map &xother)
Copies the dof tuple of xother into this.
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.
int p() const
The tensor degree of this space.
A space of scalars viewed as an antisymmetric tensor section space of degree 0.
virtual const char * class_name() const
The name of this class.
An abstract antisymmetric tensor section space of degree p.
virtual section_space_schema_member & schema()
The schema for this poset (mutable version)
A space of scalars viewed as an antisymmetric tensor space of degree 0.
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)
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
virtual size_type covariant_subposet_ct() const
The number of covariant subposets.
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 is_vector(pod_index_type xmbr_id, bool xauto_access) const
True if and only if the member with id xmbr_id is a vector (as opposed to a covector).
virtual bool invariant() const
Class invariant.
virtual ~sec_at0_space()
Destructor.
int dd() const
The dimension of the underlying ("domain") vector space.
static sec_at0_space & new_table(namespace_type &xhost, const poset_path &xpath, const poset_path &xschema_path, bool xauto_access)
Creates a new sec_at0_space in namespace xns with path xpath and schema specified by xschema_path...
virtual std::string name() const
The name of this poset.
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.
static poset_handle_factory & factory()
The poset handle factory.
namespace_poset * name_space() const
The namespace this poset resides in.
virtual bool is_attached() const
True if this is attached to a state.
int factor_ct() const
The number of factors in this product.
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.
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).
int d() const
The dimension.
virtual sec_at0_space * clone() const
Virtual constructor; creates a new handle of the same actual type as this, attached to the same state...
virtual void put_is_vector(pod_index_type xmbr_id, bool xauto_access)
Sets is_vector true for the member with id xmbr_id.
An array representation of abstract class poset_dof_map.
Namespace for the fiber_bundles component of the sheaf system.
SHEAF_DLL_SPEC pod_index_type invalid_pod_index()
The invalid pod index value.
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.
Antisymetric tensor of degree 0. As the degree is 0 there is nothing to be symmetric or antisymmetric...
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) ...