21 #include "SheafSystem/at1.h" 23 #include "SheafSystem/abstract_poset_member.impl.h" 24 #include "SheafSystem/assert_contract.h" 25 #include "SheafSystem/at0.h" 26 #include "SheafSystem/at1_space.h" 27 #include "SheafSystem/fiber_bundles_namespace.h" 28 #include "SheafSystem/schema_poset_member.h" 29 #include "SheafSystem/wsv_block.h" 132 vd_lite::operator=(xrow_dofs);
136 postcondition_of(vd_lite::operator=(xrow_dofs));
226 const string& result = static_class_name();
230 ensure(!result.empty());
245 static const string result(
"at1_lite");
249 ensure(!result.empty());
271 ensure(is_same_type(*result));
295 require(&xother != 0);
301 bool result =
dynamic_cast<const at1_lite*
>(&xother) != 0;
314 if(invariant_check())
318 disable_invariant_check();
322 invariance(atp_lite::invariant());
328 enable_invariant_check();
360 static const poset_path result(standard_schema_poset_name(),
"at1_schema");
383 standard_schema_path().member_name(),
384 atp::standard_schema_path(),
388 lschema.detach_from_state();
413 require(!xhost_path.
empty());
416 require(xschema_path.
full());
418 require(schema_poset_member::conforms_to(xns, xschema_path, standard_schema_path()));
426 host_type::new_table(xns, xhost_path, xschema_path, xscalar_space_path, xauto_access);
430 ensure(xns.
owns(result, xauto_access));
431 ensure(result.
path(
true) == xhost_path);
433 ensure(result.
schema(
true).
path(xauto_access) == xschema_path);
435 ensure(result.
factor_ct(
true) == result.
d(
true));
436 ensure(result.
d(
true) == schema_poset_member::row_dof_ct(xns, xschema_path, xauto_access));
438 ensure(result.
p(
true) == 1);
439 ensure(result.
dd(
true) == result.
d(
true));
483 attach_to_state(xhost, xhub_id);
489 ensure(index() == xhub_id);
490 ensure(is_attached());
504 attach_to_state(xhost, xid.
hub_pod());
510 ensure(index() ==~ xid);
511 ensure(is_attached());
522 require(!xname.empty());
527 attach_to_state(xhost, xname);
533 ensure(name() == xname);
534 ensure(is_attached());
544 require(xother != 0);
548 attach_to_state(xother);
553 ensure(is_attached());
554 ensure(is_same_state(xother));
563 require(precondition_of(new_jim_state(xhost, 0,
false, xauto_access)));
567 new_jim_state(xhost, 0,
false, xauto_access);
571 ensure(postcondition_of(new_jim_state(xhost, 0,
false, xauto_access)));
585 require(is_ancestor_of(&xother));
586 require(precondition_of(attach_to_state(&xother)));
590 attach_to_state(&xother);
594 ensure(postcondition_of(attach_to_state(&xother)));
608 require(precondition_of(attach_to_state(&xother)));
612 attach_to_state(&xother);
616 ensure(postcondition_of(attach_to_state(&xother)));
718 const string& result = static_class_name();
722 ensure(!result.empty());
737 static const string result(
"at1");
741 ensure(!result.empty());
763 return reinterpret_cast<host_type*
>(_host);
770 return dynamic_cast<const host_type*
>(xother) != 0;
791 require(xother != 0);
798 bool result =
dynamic_cast<const at1*
>(xother) != 0;
846 invariance(atp::invariant());
848 if (invariant_check())
852 disable_invariant_check();
854 invariance((is_attached() ? p() == 1 :
true));
858 enable_invariant_check();
863 ensure(is_derived_query);
bool is_ancestor_of(const any *xother) const
True if other conforms to current.
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 ...
at1_lite()
Default constructor.
bool full() const
True if both poset name and member name are not empty.
static int d(const namespace_poset &xns, int xp, const poset_path &xvector_space_path, bool xauto_access)
The tensor dimension implied by tensor degree xp and the dimension of the domain vector space specifi...
virtual bool host_is_ancestor_of(const poset_state_handle *other) const
True if other conforms to host.
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.
A general antisymmetric tensor of degree 1 over an abstract vector space (persistent version)...
The standard fiber bundles name space; extends the standard sheaves namespace by defining base space...
poset_path vector_space_path() const
The path of the underlying vector space.
at1_lite & operator=(const at1_lite &xother)
Assignment operator.
A general antisymmetric tensor of degree 1 over an abstract vector space (volatile version)...
bool contains_poset_member(pod_index_type xposet_hub_id, pod_index_type xmember_hub_id, bool xauto_access=true) const
True if this contains a poset with hub id xposet_hub_id which contains a member with hub id xmember_h...
A client handle for a general, abstract partially order set.
A path defined by a poset name and a member name separated by a forward slash ('/'). For example: "cell_definitions/triangle".
virtual ~at1()
Destructor.
T::row_dofs_type & row_dofs(T &x0)
The row dofs pod type for x0 (mutable version).
at1()
Default constructor.
virtual ~at1_lite()
Destructor.
Abstract base class with useful features for all volatile objects.
Abstract base class with useful features for all objects.
static const std::string & static_class_name()
The name of this class.
virtual schema_poset_member & schema()
The schema for this poset (mutable version).
host_type * host() const
The poset this is a member of.
A space of scalars viewed as an antisymmetric tensor space of degree 0.
virtual const std::string & class_name() const
The name of this class.
bool state_is_read_write_accessible() const
True if this is attached and if the state is accessible for read and write or access control is disab...
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. ...
int p(int xd, int xdd) const
Tensor degree as a function of tensor dimension xd and domain dimension xdd.
bool invariant() const
Class invariant.
bool empty() const
True if both poset name and member name are empty.
bool contains_poset(pod_index_type xhub_id, bool xauto_access=true) const
True if this contains a poset with hub id xhub_id..
poset_path scalar_space_path() const
The path of the underlying space of scalars.
An abstract vector space viewed as an antisymmetric tensor space of degree 1.
virtual at1 * clone() const
Make a new handle, no state instance of current.
static int factor_ct(int xd)
Factor_ct() as a function of dimension xd.
int_type pod_index_type
The plain old data index type.
virtual const volatile_type & lite_prototype() const
Virtual constructor for the associated volatile type.
int dd() const
The dimension of the underlying ("domain") vector space.
bool invariant() const
Class invariant.
virtual volatile_type * lite_type() const
Virtual conversion to the associated volatile type.
virtual at1 & operator=(const abstract_poset_member &xother)
Assignment operator; synonym for attach_to_state(&xother).
virtual at1_lite * clone() const
Virtual constructor, makes a new instance of the same type as this.
An abstract client handle for a member of a poset.
static const poset_path & standard_schema_path()
The path to the standard schema for this class.
virtual bool is_ancestor_of(const any_lite &xother) const
Conformance test; true if other conforms to this.
static void make_standard_schema(namespace_poset &xns)
Creates the standard schema for this class in namespace xns.
Namespace for the fiber_bundles component of the sheaf system.
Row dofs type for class vd.
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.
static const std::string & static_class_name()
The name of this class.
virtual const std::string & class_name() const
The name of this class.
virtual int p() const
Degree of this as an antisymmetric tensor space.
static host_type & new_host(namespace_type &xns, const poset_path &xhost_path, const poset_path &xschema_path, const poset_path &xscalar_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...
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.