21 #include "SheafSystem/abstract_product_structure.h" 22 #include "SheafSystem/explicit_index_space_collection.h" 23 #include "SheafSystem/assert_contract.h" 24 #include "SheafSystem/explicit_index_space_state.h" 25 #include "SheafSystem/hub_index_space_handle.h" 26 #include "SheafSystem/index_space_iterator.h" 41 map_type::iterator itr =
_states.begin();
68 ensure(is_basic_query);
165 map_type::const_iterator itr =
_states.find(xlocal_id);
167 bool result = (itr !=
_states.end());
171 ensure(is_basic_query);
189 map_type::const_iterator itr =
_states.find(xspace_id);
191 bool result = (itr !=
_states.end());
195 ensure(is_basic_query);
267 ensure((*
this) == xother);
287 ensure(is_basic_query);
315 ensure(is_basic_query);
334 ensure(is_basic_query);
377 ensure(is_basic_query);
398 ensure(is_basic_query);
419 ensure(is_basic_query);
436 bool result =
_states.find(xlocal_id)->second->contains(xid);
440 ensure(is_basic_query);
457 bool result =
_states.find(xlocal_id)->second->contains_unglued_hub(xid);
461 ensure(is_basic_query);
478 bool result =
_states.find(xlocal_id)->second->contains(xid, xhub_id);
482 ensure(is_basic_query);
520 pod_type result =
_states.find(xlocal_id)->second->unglued_hub_pod(xid);
541 bool result =
_states.find(xlocal_id)->second->is_persistent();
545 ensure(is_basic_query);
574 _states.find(xlocal_id)->second->new_product_structure(xproduct);
595 _states.find(xlocal_id)->second->delete_product_structure();
618 _states.find(xlocal_id)->second->product_structure();
622 ensure(is_basic_query);
641 _states.find(xlocal_id)->second->product_structure();
645 ensure(is_basic_query);
662 bool result =
_states.find(xlocal_id)->second->has_product_structure();
666 ensure(is_basic_query);
695 _states.find(xlocal_id)->second->get_id_space();
717 second->release_id_space(xid_space);
721 ensure(is_basic_query);
739 (itr !=
_states.end()) && itr->second->allocated_id_space(xid_space);
743 ensure(is_basic_query);
772 _states.find(xlocal_id)->second->get_iterator();
797 ensure(is_basic_query);
815 (itr !=
_states.end()) && itr->second->allocated_iterator(xitr);
819 ensure(is_basic_query);
903 size_t result = xinclude_shallow ?
sizeof(xn) : 0;
virtual size_type ct(pod_type xlocal_id) const
The number of members for the id space with id xlocal_id.
virtual pod_type family_scope(pod_type xlocal_id) const
Id relative to the id space family equivalent to the local id xlocal_id.
An abstract class that defines the product structure for an id space.
virtual explicit_index_space_state * explicit_state(pod_type xlocal_id) const
The explicit id space state for id xlocal_id. Returns null if there is no explicit id space for xloca...
virtual bool is_persistent(pod_type xlocal_id) const
True if the id space with id xlocal_id should be written to disk.
An abstract iterator over the ids of an id space.
virtual pod_type unglued_hub_pod(pod_type xlocal_id, pod_type xid) const
The pod index in the unglued hub id space equivalent to xid in the id space with id xlocal_id...
virtual const abstract_product_structure & product_structure(pod_type xlocal_id) const
The product structure for the id space with id xlocal_id (const version).
virtual pod_type local_scope(pod_type xspace_id) const
Id relative to this collection equivalent to the id space family id xspace_id.
virtual explicit_index_space_collection & operator=(const index_space_collection &xother)
Assignment operator.
virtual void remove(pod_type xlocal_id)
Remove the id space with id xlocal_id.
virtual index_space_handle & get_id_space(pod_type xlocal_id) const
Allocates an id space handle from the handle pool attached to state with id xlocal_id.
An abstract handle to a space of alternate integer identifiers (aliases) for a subset of a hub set of...
pod_index_type pod_type
The "plain old data" index type for this.
virtual pod_type index() const =0
Index of this space.
virtual bool is_attached() const =0
True if this handle is attached to a state.
virtual void delete_product_structure(pod_type xlocal_id)
Deletes the product structure for the id space with id xlocal_id.
Abstract base class with useful features for all objects.
An immutable abstract state for a space of alternate integer identifiers (aliases) for a subset of th...
void insert(explicit_index_space_state &xid_space)
Insert the explicit id space xid_space into this interval.
explicit_index_space_collection()
Default constructor.
SHEAF_DLL_SPEC size_t deep_size(const dof_descriptor_array &xp, bool xinclude_shallow=true)
The deep size of the referenced object of type dof_descriptor_array.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
virtual bool invariant() const
Class invariant.
A collection of id space states. This is a virtual class with provides an interface for accessing the...
void disable_invariant_check() const
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing inv...
virtual bool contains(pod_type xlocal_id) const
True if this collection contains the id space with local id xlocal_id.
virtual pod_type index() const =0
Index of this space.
virtual bool has_product_structure(pod_type xlocal_id) const
True if the id space with id xlocal_id has a product structure.
virtual bool contains_family(pod_type xspace_id) const
True if this collection contains the id space with family id xspace_id.
virtual bool allocated_id_space(const index_space_handle &xid_space) const
True if and only if id space handle xid_space was allocated by the handle pool.
virtual bool allocated_id_space_iterator(const index_space_iterator &xitr) const
True if and only if id space iterator xitr was allocated by the iterator pool.
map_type _states
The map from space id to explicit id space.
virtual pod_type pod(pod_type xlocal_id, pod_type xid) const
The pod index in the space with id xlocal_id equivalent to xid in the hub id space.
virtual bool is_attached() const =0
True if this iterator is attached to a state.
bool invariant_check() const
True if invariant checking is enabled.
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
virtual const index_space_family & id_spaces() const
The id space family for this (const version).
pod_type index() const
The index of this id space.
virtual void new_product_structure(pod_type xlocal_id, const abstract_product_structure &xproduct)
Creates a new product structure for the id space with id xlocal_id by cloning the product structure...
virtual ~explicit_index_space_collection()
Creates an arg list for constructing an instance of this.
virtual pod_type end(pod_type xlocal_id) const
Ending id of the space with id xlocal_id.
An implementation of index_space_collection for a sparse collection of explicit id spaces...
virtual bool contains_unglued_hub(pod_type xlocal_id, pod_type xid) const
True if the space with id xlocal_id contains an id equivalent to xid in the unglued hub id space...
Factory and container for a family of id spaces.
virtual void release_id_space_iterator(index_space_iterator &xitr) const
Returns the id space iterator xitr to the iterator pool.
virtual void release_id_space(index_space_handle &xid_space) const
Returns the id space handle xid_space to the handle pool.
virtual bool invariant() const
Class invariant.
virtual pod_type begin(pod_type xlocal_id) const
Beginning id of the space with id xlocal_id.
SHEAF_DLL_SPEC bool is_valid(pod_index_type xpod_index)
True if an only if xpod_index is valid.
SHEAF_DLL_SPEC pod_index_type invalid_pod_index()
The invalid pod index value.
virtual index_space_iterator & get_id_space_iterator(pod_type xlocal_id) const
Allocates an id space iterator from the iterator pool attached to state with id xlocal_id.
void enable_invariant_check() const
Enable invariant checking.
size_type capacity() const
The capacity of this collection.
index_space_family * _id_spaces
The index space family of this collection.
virtual bool operator==(const index_space_collection &xother) const
True if this is equivalent to xother.