20 #include "SheafSystem/jcb_space.h" 22 #include "SheafSystem/abstract_poset_member.impl.h" 23 #include "SheafSystem/assert_contract.h" 24 #include "SheafSystem/at0_space.h" 25 #include "SheafSystem/at1.h" 26 #include "SheafSystem/at1_space.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/jcb.h" 52 static const string& result = jcb::standard_schema_poset_name();
56 ensure(!result.empty());
73 static const poset_path& result = jcb::standard_schema_path();
77 ensure(result.
full());
78 ensure(result.
poset_name() == standard_schema_poset_name());
91 require(xschema_path.
full());
96 int result = schema_poset_member::row_dof_ct(xns, xschema_path, xauto_access);
100 ensure(result == schema_poset_member::row_dof_ct(xns, xschema_path, xauto_access));
121 int result = d(ldd, ldr);
154 require(!xpath.
empty());
157 require(xschema_path.
full());
159 require(schema_poset_member::conforms_to(xns, xschema_path, standard_schema_path(), xauto_access));
164 require(d(xns, xschema_path, xauto_access) == d(xns, xdomain_path, xrange_path, xauto_access));
175 table_type* ltable =
new table_type();
199 lmap->
put_dof(
"factor_ct", ld);
201 lmap->
put_dof(
"scalar_space_path", lscalar_space_path);
202 lmap->
put_dof(
"domain_path", xdomain_path);
204 lmap->
put_dof(
"range_path", xrange_path);
209 ltable->new_state(xns, xpath, lschema, *lmap);
220 ensure(xns.
owns(result, xauto_access));
221 ensure(result.
path(
true) == xpath);
223 ensure(result.
schema(
true).
path(xauto_access) == xschema_path);
225 ensure(result.
factor_ct(
true) == result.
d(
true));
226 ensure(result.
d(
true) == d(xns, xschema_path, xauto_access));
231 ensure(result.
range_path(
true) == xrange_path);
252 require(state_is_read_accessible());
267 dd(
bool xauto_access)
const 271 require(state_is_auto_read_accessible(xauto_access));
300 require(state_is_read_accessible());
308 ensure(!result.
empty());
321 require(state_is_auto_read_accessible(xauto_access));
339 ensure(!result.
empty());
352 require(state_is_read_accessible());
367 dr(
bool xauto_access)
const 371 require(state_is_auto_read_accessible(xauto_access));
400 require(state_is_read_accessible());
408 ensure(!result.
empty());
421 require(state_is_auto_read_accessible(xauto_access));
439 ensure(!result.
empty());
486 require(xbottom != 0);
506 fiber_bundle::jcb_space::
554 static const char* result =
"jcb_space";
630 result =
dynamic_cast<const jcb_space*
>(xother) != 0;
poset_state_handle * host() const
The poset which this is a handle to a component of.
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 ...
void insert_prototype(const poset_state_handle *xprototype)
Sets xprototype as the prototype for its client class.
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 const char * class_name() const
The name of this class.
static jcb_space & new_table(namespace_type &xhost, const poset_path &xpath, const poset_path &xschema_path, const poset_path &xdomain_path, const poset_path &xrange_path, bool xauto_access)
Creates a new jcb_space in namespace xns with path xpath, schema specified by xschema_path, and table attributes domain_path, range_path, and scalar_space_path specified by xdomain_path and xrange_path, respectively.
static const std::string & standard_schema_poset_name()
The name of the standard schema poset for this class.
const scoped_index & index() const
The member index of this poset within the namespace host()
int dd() const
The dimension of the underlying ("domain") vector space.
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...
poset_type
Identifiers for poset types.
A path defined by a poset name and a member name separated by a forward slash ('/'). For example: "cell_definitions/triangle".
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.
virtual pod_index_type prereq_id(int xi) const
The id of the xi-th prerequisite poset for 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...
Abstract base class with useful features for all objects.
virtual schema_poset_member & schema()
The schema for this poset (mutable version).
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)
std::string poset_name() const
The poset name part of the path.
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 int row_dof_ct(const namespace_poset &xns, const poset_path &xpath, bool xauto_access=true)
The number of row dofs defined by the schema specified by xns and xpath. Synonym for dof_ct(xns...
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.
poset_path domain_path() const
The path of the domain vector space.
poset_path scalar_space_path() const
The path of the underlying space of scalars.
jcb_space()
Default constructor; creates a new jcb_space handle not attached to any state.
static poset_handle_factory & factory()
The poset handle factory.
int d() const
The dimension.
namespace_poset * name_space() const
The namespace this poset resides in.
virtual bool is_attached() const
True if this is attached to a state.
An abstract vector space viewed as an antisymmetric tensor space of degree 1.
static int d(const namespace_poset &xns, const poset_path &xschema_path, bool xauto_access)
The jacobian dimension implied by the schema specified by xschema_path.
An abstract vector space of dimension d.
virtual jcb_space * clone() const
Virtual constructor; creates a new handle of the same actual type as this, attached to the same 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.
poset_path range_path() const
The path of the range vector space.
An abstract space of Jacobians.
static int factor_ct(int xd)
Factor_ct() as a function of dimension xd.
T::table_dofs_type & table_dofs(T &x0)
The table dofs pod type for x0 (mutable version).
int_type pod_index_type
The plain old data index type.
virtual poset_type type_id() const
Identifier for the type of this poset.
virtual bool invariant() const
Class invariant.
virtual ~jcb_space()
Destructor.
static const poset_path & standard_schema_path()
The path to the standard schema for this class.
virtual int dr() const
Dimension of the range.
vd_space()
Default constructor; creates a new vd_space handle not attached to any state.
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.
virtual bool invariant() const
Class invariant.
void enable_invariant_check() const
Enable invariant checking.
int factor_ct() const
The number of factors in this product.
virtual bool is_ancestor_of(const any *xother) const
True if other conforms to this.
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 client handle for a poset member which has been prepared for use as a schema.
virtual const scoped_index & member_id(bool xauto_access) const
An id in the member hub id space; intended for copying to initialize ids to the member id space...