21 #include "SheafSystem/binary_section_space_schema_poset.h" 23 #include "SheafSystem/abstract_poset_member.h" 24 #include "SheafSystem/array_poset_dof_map.h" 25 #include "SheafSystem/base_space_member.h" 26 #include "SheafSystem/base_space_poset.h" 27 #include "SheafSystem/binary_section_space_schema_member.impl.h" 28 #include "SheafSystem/index_iterator.h" 29 #include "SheafSystem/namespace_poset.impl.h" 30 #include "SheafSystem/namespace_poset_member.h" 31 #include "SheafSystem/poset_handle_factory.h" 32 #include "SheafSystem/poset_member_iterator.h" 33 #include "SheafSystem/poset_state.h" 34 #include "SheafSystem/poset_type.h" 35 #include "SheafSystem/postorder_member_iterator.h" 36 #include "SheafSystem/schema_poset_member.h" 37 #include "SheafSystem/sec_rep_descriptor_poset.h" 38 #include "SheafSystem/sheaves_namespace.h" 39 #include "SheafSystem/subposet.h" 64 require(!xpath.
empty());
67 require(xschema_path.
full());
69 require(schema_poset_member::conforms_to(xns, xschema_path, standard_schema_path(), xauto_access));
71 require(xbase_path.
full());
74 require(!xfiber_path.
empty());
77 require(xrep_path.
full());
87 table_type& result = *(
new table_type());
102 lmap->
put_dof(
"base_space_path", xbase_path);
103 lmap->
put_dof(
"fiber_space_path", xfiber_path);
104 lmap->
put_dof(
"rep_path", xrep_path);
108 result.new_state(xns, xpath, lschema, *lmap);
118 ensure(xns.
owns(result, xauto_access));
119 ensure(result.path(
true) == xpath);
120 ensure(result.state_is_not_read_accessible());
121 ensure(result.schema(
true).path(xauto_access) == xschema_path);
123 ensure(unexecutable(
"result.base_space_path() == xbase_space_path"));
124 ensure(unexecutable(
"result.fiber_space_path() == xfiber_space_path"));
125 ensure(unexecutable(
"result.rep_path() == xrep_path"));
182 poset_type ltype = BINARY_SECTION_SPACE_SCHEMA_POSET_ID;
249 return BINARY_SECTION_SPACE_SCHEMA_POSET_ID;
260 static const char* result =
"binary_section_space_schema_poset";
288 require(unexecutable(
"rep in xdof_map exists"));
289 require(unexecutable(
"rep in xdof_map is read accessible"));
291 require(unexecutable(
"base space in xdof_map exists"));
292 require(unexecutable(
"base space in xdof_map is read accessible"));
294 require(unexecutable(
"fiber space in xdof_map exists"));
295 require(unexecutable(
"fiber space in xdof_map is read accessible"));
297 require(unexecutable(
"rep in xdof_map is valid for base and fiber in xdof_map"));
463 result =
base_space().
le(lgreater_base_id, llesser_base_id) &&
579 require(xjem1 !=~ xjem2);
580 require(!
is_jem(xjem1, BOTTOM_INDEX));
596 ensure(
le(xjem1, xjem2));
virtual void get_read_write_access(bool xrelease_read_only_access=false)
Get read write access to the state associated with this. If release_read_only_access is requested...
int fiber_schema_stride() const
The increment in the member id when the id of the fiber schema component is increased by one...
virtual const char * class_name() const
The name of this class.
void insert_prototype(const poset_state_handle *xprototype)
Sets xprototype as the prototype for its client class.
virtual binary_section_space_schema_poset * clone() const
Virtual constructor; creates a new handle of the same actual type as this, attached to the same state...
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.
The private state of a partially ordered set.
virtual size_type cover_ct(bool xlower, pod_index_type xmbr_hub_id) const
The number of members in the lower cover (xlower true) or upper cover (xlower false) of the member wi...
virtual ~binary_section_space_schema_poset()
Destructor.
void initialize_table_dof_tuple(array_poset_dof_map *xdof_tuple)
Installs xdof_tuple as the table dof tuple.
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 greatest_jem(pod_index_type xhub_id) const
The index of the largest member which is join-equivalent to hub id xhub_id.
poset_type
Identifiers for poset types.
virtual void get_read_write_access(bool xrelease_read_only_access=false)
Get read write access to the state associated with this. If release_read_only_access is requested...
virtual schema_poset_member & schema()
The schema on which this is allocated (mutable version).
virtual pod_index_type get_base_space_id_from_index(pod_index_type xmbr_hub_id) const
Computes the base space member id associated with hub id xmbr_hub_id.
virtual bool le(pod_index_type xgreater, pod_index_type xlesser) const
True if xlesser is less than or equal to hub id xgreater.
A path defined by a poset name and a member name separated by a forward slash ('/'). For example: "cell_definitions/triangle".
section_space_schema_member & top()
The top of member of the lattice (mutable version)
const index_space_family & member_id_spaces(bool xauto_access) const
Collection of member id spaces for this (const version).
virtual void initialize_standard_subposets(const std::string &xname)
Creates the subposets common to every poset (e.g. whole() and jims()).
bool is_same_state(const poset_state_handle *xhost, pod_index_type xhub_id) const
True is this is attached to state with hub id xhub_id in host xhost.
A schema poset for a section space. A binary Cartesian product subspace of the binary tensor product ...
virtual bool le(pod_index_type xgreater, pod_index_type xlesser) const
True if hub id xlesser is less than or equal to hub id xgreater.
virtual void get_read_access() const
Get read access to the state associated with this.
virtual namespace_poset * name_space() const
The namespace of host()
The poset for sec_rep_descriptors.
virtual bool is_jem(pod_index_type xmbr_hub_id, pod_index_type xother_hub_id) const
True if hub id xother_hub_id is join equivalent to hub id xmbr_hub_id.
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...
virtual bool invariant() const
Class invariant.
Abstract base class with useful features for all objects.
poset & fiber_space()
The fiber space for section spaces on this schema.
The lattice of closed cells of a cellular space; a lattice representation of a computational mesh...
virtual bool contains_link(pod_index_type xgreater, pod_index_type xlesser) const
True if there is a cover link between hub id xgreater and hub id xlesser.
pod_index_type get_int_id(pod_index_type xext_id, const std::string &xid_space_name, bool xauto_access) const
Translates xext_id to an internal id using the equivalence map with name xid_space_name.
virtual schema_poset_member & schema()
The schema for this poset (mutable version).
bool has_standard_subposet_ct() const
True if poset is in its initial state, that is, it contains just the standard subposets.
void update_standard_member_id_spaces()
Update the initially allocated id spaces.
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 has_standard_row_dof_tuple_ct() const
True if poset is in its initial state, that is, it contains just the standard row_dof_tuples.
virtual size_type cover_ct(bool xlower, pod_index_type xhub_id) const
The number of members in the lower cover (xlower true) or upper cover (xlower false) of the member wi...
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 bool leqv(pod_index_type xgreater, pod_index_type xlesser) const
True if xlesser is less than or equivalent to hub id xgreater.
virtual bool is_attached() const
True if this handle is attached to a non-void state.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
std::string poset_name() const
The poset name part of the path.
virtual bool invariant() const
Class invariant.
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_jim(pod_index_type xmbr_hub_id, bool xin_current_version=true) const
True if the member with hub id xmbr_hub_id is a jim.
virtual schema_poset_member * new_schema_handle(const std::string &xid_space_name, pod_index_type xschema_member_ext_id, pod_index_type xbase_space_ext_id, pod_index_type xfiber_schema_ext_id, pod_index_type xlocal_schema_ext_id)
Creates a member handle of the type appropriate for members of this when used as a schema...
sec_rep_descriptor & rep()
The representation for section spaces on this schema.
static binary_section_space_schema_poset & new_table(namespace_type &xhost, const poset_path &xpath, const poset_path &xschema_path, const poset_path &xbase_path, const poset_path &xfiber_path, const poset_path &xrep_path, bool xauto_access)
Creates a new binary_section_space_schema_poset in namespace xns with path xpath, schema specified by...
virtual void initialize_handle_data_members(const namespace_poset &xns)
Initializes the handle data members that depend on the table dofs and are required to get access when...
virtual void merge_jems(pod_index_type xjem1, pod_index_type xjem2)
Merge the join-equivalence class of xjem2 under that of xjem1.
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...
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...
virtual pod_index_type get_fiber_schema_id_from_index(pod_index_type xmbr_hub_id) const
Computes the fiber schema member id associated with hub id xmbr_hub_id.
int base_space_stride() const
The increment in the member id when the id of the base space component is increased by one...
const bool LOWER
Selector for lower cover.
static poset_handle_factory & factory()
The poset handle factory.
static const poset_path & standard_schema_path()
The path of the schema required by this class.
virtual bool is_ancestor_of(const any *other) const
True if other conforms to this.
virtual bool is_attached() const
True if this is attached to a state.
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. ...
section_space_schema_member & bottom()
The bottom of member of the lattice (mutable version)
poset_state * _state
State object for this poset.
An abstract schema poset for a section space. A Cartesian product subspace of the tensor product of a...
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 pod_index_type greatest_jem(pod_index_type xmbr_hub_id) const
The hub id of the largest member which is join-equivalent to hub id xmbr_hub_id.
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...
poset_state_handle & fiber_schema()
The fiber schema for section spaces on this schema (mutable version).
binary_section_space_schema_poset()
Default constructor; creates a new binary_section_space_schema_poset handle not attached to any state...
static bool make_prototype()
Creates prototype for this class and enters in in factory.
int_type pod_index_type
The plain old data index type.
virtual bool contains_link(pod_index_type xgreater, pod_index_type xlesser) const
True if there is a cover link between hub id xlesser and hub id xgreater.
virtual void new_state(const poset_path &xpath, const schema_poset_member &xschema, array_poset_dof_map &xdof_map)
Creates a new poset state with path xpath, schema xschema and table dof map xdof_map, attaches this to the state.
virtual poset_type type_id() const
Identifier for the type of this poset.
bool is_same_state(const poset_state_handle *xother) const
True if this is attached to the same state as xother.
virtual pod_index_type least_jem(pod_index_type xmbr_hub_id) const
The hub id of the smallest member which is join-equivalent to hub id xmbr_hub_id. ...
void attach_to_state(const namespace_poset *xns, const poset_path &xpath, bool xauto_access=true)
Attach to the state specified by path xpath in the namespace xns.
bool cover_is_equal(bool xlower, pod_index_type xmbr_hub_id, pod_index_type xother_mbr_hub_id) const
True if and only if the lower (xlower true) or upper (xlower false) cover set of the member with hub ...
virtual pod_index_type least_jem(pod_index_type xhub_id) const
The index of the smallest member which is join-equivalent to hub id xhub_id.
virtual bool leqv(pod_index_type xgreater, pod_index_type xlesser) const
True if hub id xlesser is less than or equivalent to hub id xgreater.
virtual pod_index_type get_index_from_components(pod_index_type xbase_space_id, pod_index_type xfiber_schema_id) const
Computes the index associated with component ids xbase_space_id, xfiber_schema_id, and xlocal_schema_id.
bool in_jim_edit_mode() const
True if editing jims and jim order relation is allowed.
virtual void initialize_standard_members()
Creates the members common to every poset (i.e. _top and _bottom).
An array representation of abstract class poset_dof_map.
Namespace for the fiber_bundles component of the sheaf system.
void enable_invariant_check() const
Enable invariant checking.
virtual bool is_jem(pod_index_type xhub_id, pod_index_type xother) const
True if xother is join equivalent to hub id xhub_id.
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 bool schema_is_ancestor_of(const schema_poset_member *xother_schema) const
True if xother_schema conforms to the type of schema required by this.
base_space_poset & base_space()
The base space for section spaces on this schema.
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) ...