21 #include "SheafSystem/zone_nodes_block.h" 23 #include "SheafSystem/assert_contract.h" 24 #include "SheafSystem/arg_list.h" 25 #include "SheafSystem/base_space_poset.h" 26 #include "SheafSystem/block_connectivity.h" 27 #include "SheafSystem/fiber_bundles_namespace.h" 28 #include "SheafSystem/index_space_iterator.h" 29 #include "SheafSystem/namespace_poset.h" 30 #include "SheafSystem/poset_path.h" 31 #include "SheafSystem/wsv_block.h" 56 const poset_path& result = STATIC_PROTOTYPE_PATH;
78 require(!xhost_path.
empty());
81 require(xschema_path.
full());
85 require(xmax_db >= 0);
90 host_type::new_table(xns, xhost_path, xschema_path, xmax_db, xauto_access);
94 ensure(xns.
owns(result, xauto_access));
95 ensure(result.
path(
true) == xhost_path);
97 ensure(result.
schema(
true).
path(xauto_access) == xschema_path);
99 ensure(result.
max_db() == xmax_db);
122 require(xmax_db >= 0);
133 result_ptr = &new_host(xns, xhost_path, standard_schema_path(), xmax_db, xauto_access);
140 ensure(xns.
owns(result, xauto_access));
141 ensure(result.
path(
true) == xhost_path);
143 ensure(result.
schema(
true).
path(xauto_access) == standard_schema_path());
145 ensure(result.
max_db() == xmax_db);
174 ensure(! is_attached() );
188 new_jem_state(const_cast<abstract_poset_member*>(&xother),
true,
true);
192 attach_to_state(&xother);
220 require(precondition_of(new_state(xhost, xconn, xauto_access)));
224 new_state(xhost, xconn, xauto_access);
228 ensure(postcondition_of(new_state(xhost, xconn, xauto_access)));
242 require(precondition_of(attach_to_state(xhost, xhub_id)));
246 attach_to_state(&xhost, xhub_id);
250 ensure(postcondition_of(attach_to_state(xhost, xhub_id)));
258 require(precondition_of(attach_to_state(xhost, xid)));
262 attach_to_state(&xhost, xid.
hub_pod());
266 ensure(postcondition_of(attach_to_state(xhost, xid)));
274 require(precondition_of(attach_to_state(same args)));
278 attach_to_state(&xhost, xname);
282 ensure(postcondition_of(attach_to_state(same args)));
294 require(precondition_of(attach_to_state(same args)));
298 attach_to_state(xnamespace, xpath, xauto_access);
302 ensure(postcondition_of(attach_to_state(same args)));
318 require(precondition_of(attach_to_state(same args)));
322 attach_to_state(xnamespace, xposet_id, xmember_id);
326 ensure(postcondition_of(attach_to_state(same args)));
342 require(precondition_of(attach_to_state(same args)));
346 attach_to_state(xnamespace, xposet_id.
hub_pod(), xmember_id.
hub_pod());
350 ensure(postcondition_of(attach_to_state(same args)));
365 require(is_attached());
366 require(dynamic_cast<base_space_poset*>(host()) != 0);
367 require(precondition_of(new_state(*host(), xconn, xauto_access)));
373 new_state(lhost, xconn, xauto_access);
377 ensure(postcondition_of(new_state(*host(), xconn, xauto_access)));
402 require(namespace_is_ancestor_of(xhost.
name_space()));
429 attach_to_state(&xhost, lindex);
439 ensure(is_attached());
477 require(state_is_auto_read_accessible(xauto_access));
490 ensure(is_basic_query);
503 require(state_is_auto_read_accessible(xauto_access));
504 require(contains_vertex_client_id_space(xauto_access));
518 ensure(host()->member_id_spaces(xauto_access).allocated_id_space(result));
531 require(state_is_auto_read_accessible(xauto_access));
532 require(host()->member_id_spaces(xauto_access).allocated_id_space(xid_space));
558 require(state_is_auto_read_accessible(xauto_access));
559 require(contains_vertex_client_id_space(xauto_access));
573 ensure(host()->member_id_spaces(xauto_access).allocated_id_space_iterator(result));
586 require(state_is_auto_read_accessible(xauto_access));
587 require(host()->member_id_spaces(xauto_access).allocated_id_space_iterator(xitr));
666 attach_to_state(&xother);
670 ensure(is_same_state(&xother));
684 require(is_ancestor_of(&xother));
754 clone(
bool xnew_state,
bool xauto_access)
const 771 if(invariant_check())
775 disable_invariant_check();
781 enable_invariant_check();
index_space_handle & get_vertex_client_id_space(bool xauto_access) const
Allocates a vertex client id space handle from the pool of handles.
virtual bool invariant() const
Class invariant.
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 ...
virtual zone_nodes_block & operator=(const abstract_poset_member &xother)
Assignment operator; attaches this to the same state as xother.
static const poset_path & static_prototype_path()
The path of the prototype required by this class.
bool path_is_auto_read_write_available(const poset_path &xpath, bool xauto_access) const
True if the state referred to xpath does not exist or exists and is auto read-write accessible...
virtual void create_cover_link(abstract_poset_member *xlesser)
Insert a link from this to lesser; make lesser <= this.
bool full() const
True if both poset name and member name are not empty.
abstract_poset_member & top()
The top member of the poset (mutable version)
void release_vertex_client_id_space(index_space_handle &xid_space, bool xauto_access) const
Returns the vertex client id space handle xid_space to the pool of handles.
An abstract iterator over the ids of an id space.
poset_path path(bool xauto_access=true) const
A path to this component.
bool conforms_to(const schema_poset_member &xother) const
True if the dofs defined by this agree in type and in order with the dofs defined by xother...
void new_state(const block_connectivity &xconn, bool xauto_access)
Creates a new unstructured block state in host() and attaches this to it.
The default name space; a poset which contains other posets as members.
bool contains_vertex_client_id_space(pod_index_type xmbr_id, bool xauto_access) const
True, if and only if the block containing the member with index xmbr_id has a vertex client id space...
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 zone_nodes_block * clone() const
Make a new handle, no state instance of current.
A path defined by a poset name and a member name separated by a forward slash ('/'). For example: "cell_definitions/triangle".
virtual homogeneous_block * clone() const =0
Make a new handle, no state instance of current.
index_space_iterator & get_vertex_client_id_space_iterator(bool xauto_access) const
Allocates a vertex client id space iterator from the pool of iterators.
An abstract handle to a space of alternate integer identifiers (aliases) for a subset of a hub set of...
Zone to node connectivity relation for a block of zones of a given type.
A homogeneous collection of zones with nodal connectivity.
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.
static void get_size(const block_connectivity &xconn, size_type &result)
The size of the interval for block connectivity xconn.
virtual bool is_attached() const =0
True if this handle is attached to a state.
static const std::string & prototypes_poset_name()
The name of the prototypes poset.
static void get_private_data(const block_connectivity &xconn, block< pod_index_type > &result)
The private data for an instance with connectivity xconn.
index_space_iterator & get_vertex_client_id_space_iterator(pod_index_type xmbr_id, bool xauto_access) const
Allocates an vertex client id space iterator for the block containing the member with index xmbr_id f...
Abstract base class with useful features for all objects.
The lattice of closed cells of a cellular space; a lattice representation of a computational mesh...
static host_type & standard_host(namespace_type &xns, const poset_path &xhost_path, int xmax_db, bool xauto_access)
The host with path xhost_path. Returns the host if it already exists, otherwise, creates it in namesp...
virtual schema_poset_member & schema()
The schema for this poset (mutable version).
virtual const zone_nodes_block_crg_interval & interval() const
The implicit interval member for this block.
zone_nodes_block()
Default constructor; creates a new, unattached handle.
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.
virtual bool is_attached() const
True if this handle is attached to a non-void state.
void release_vertex_client_id_space_iterator(index_space_iterator &xitr, bool xauto_access) const
Returns the vertex client id space iterator xitr to the pool of iterators.
virtual void get_read_access() const
Get read access to the state associated with this.
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.
index_space_handle & get_vertex_client_id_space(pod_index_type xmbr_id, bool xauto_access) const
Allocates an vertex client id space handle for the block containing the member with index xmbr_id for...
bool contains_path(const poset_path &xpath, bool xauto_access=true) const
True if this contains the poset or poset member specified by xpath.
bool empty() const
True if both poset name and member name are empty.
static void get_dof_tuple_ids(poset_state_handle &xhost, const block_connectivity &xconn, block< pod_index_type > &result)
The dof tuple ids for an instance created with parameter xi_size.
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...
Emulator for a interval of implicit base space members representing an unstructured block...
void release_vertex_client_id_space(index_space_handle &xid_space, bool xauto_access) const
Returns the handle to the vertex client id space, xid_space to the pool of id space handles...
namespace_poset * name_space() const
The namespace this poset resides in.
virtual bool is_attached() const
True if this is attached to a state.
virtual bool is_ancestor_of(const any *other) const
True if other conforms to this.
virtual ~zone_nodes_block()
Destructor; deletes a poset member and its attached state, if any.
bool contains_vertex_client_id_space(bool xauto_access) const
True if and only if this block contains a vertex client id space.
virtual bool is_attached() const =0
True if this iterator is attached to a state.
size_type element_ct() const
The number of elements.
static host_type & new_host(namespace_type &xns, const poset_path &xhost_path, const poset_path &xschema_path, int xmax_db, bool xauto_access)
Creates a new host poset for members of this type. The poset is created in namespace xns with path xh...
int_type pod_index_type
The plain old data index type.
std::string member_name() const
The member name part of the path.
virtual pod_index_type new_member_interval(const std::string &xinterval_type, size_type xsize, const block< pod_index_type > &xdof_tuple_ids, const block< pod_index_type > &xdata)
Create a disconnected member interval of type xinterval_type with size xsize, dof tuple ids xdof_tupl...
virtual void end_jim_edit_mode(bool xensure_lattice_invariant=true, bool xauto_access=true)
Prevent editing of jims and jim order relation.
static bool is_valid_name(const std::string &xname)
True if xname is not empty and contains only name legal characters.
virtual void get_read_access() const
Get read access to the state associated with this.
int max_db() const
The maximum dimension of the members of this base space.
An abstract client handle for a member of a poset.
bool row_conforms_to(const schema_poset_member &xother) const
True if the row dofs defined by this agree in type and in order with the dofs defined by xother...
bool in_jim_edit_mode() const
True if editing jims and jim order relation is allowed.
Namespace for the fiber_bundles component of the sheaf system.
void release_vertex_client_id_space_iterator(index_space_iterator &xitr, bool xauto_access) const
Returns the iterator to the vertex client id space, xitr to the pool of id space iterators.
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...
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.
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.
virtual void begin_jim_edit_mode(bool xauto_access=true)
Allow editing of jims and jim order relation.