21 #include "SheafSystem/index_space_iterator.h" 23 #include "SheafSystem/assert_contract.h" 24 #include "SheafSystem/hub_index_space_handle.h" 25 #include "SheafSystem/index_space_family.h" 86 result = result && (
_pod == xother.
_pod);
92 ensure(is_basic_query);
117 ensure(*result == *
this);
210 ensure(is_basic_query);
281 ensure(is_basic_query);
301 ensure(is_basic_query);
321 ensure(is_basic_query);
396 ensure(is_basic_query);
417 ensure(is_basic_query);
451 ensure(is_basic_query);
518 ensure(is_basic_query);
531 require(xid_spaces.
contains(xindex));
544 ensure(
index() == xindex);
557 require(!xname.empty());
558 require(xid_spaces.
contains(xname));
570 ensure(
name() == xname);
598 ensure(
index() == xindex);
626 ensure(
name() == xname);
657 ensure(&
host() == &xid_space.
host());
681 ensure(&
host() == &xhost);
715 require(xid_spaces.
contains(xindex));
724 ensure(is_basic_query);
734 const std::string& xname)
const 738 require(xid_spaces.
contains(xname));
746 ensure(is_basic_query);
767 ensure(is_basic_query);
788 ensure(is_basic_query);
812 ensure(is_basic_query);
904 size_t result = xinclude_shallow ?
sizeof(xn) : 0;
virtual bool invariant() const
Class invariant, intended to be redefined in each descendant. See below for template for invariant in...
const index_space_collection * collection(pod_type xid) const
Id space collection for id xid (const version).
const hub_index_space_handle & hub_id_space() const
The hub id space.
std::string name(pod_type xid) const
The name for id xid.
An abstract iterator over the ids of an id space.
bool _is_done
True if the iteration is finished.
virtual const index_space_collection & host() const =0
The host collection.
pod_type pod() const
The current id in the iteration.
virtual pod_type family_scope(pod_type xlocal_id) const =0
Id relative to the id space family equivalent to the local id xlocal_id.
void invalidate_ids()
Set is_done() and invalidate pod() and hub_pod().
virtual void detach()=0
Detach this handle form its state, if any.
An abstract handle to a space of alternate integer identifiers (aliases) for a subset of a hub set of...
virtual const index_space_family & id_spaces() const =0
The id space family for this (const version).
virtual pod_type index() const =0
Index of this space.
virtual void next()=0
Makes id() the next id in the iteration.
pod_type glued_hub_pod() const
The current glued hub id in the iteration.
virtual bool is_attached() const =0
True if this handle is attached to a state.
An implementation of class sum_index_space_handle that has a primary sum id space state...
virtual const index_space_family & id_spaces() const =0
The id space family for this (const version).
virtual pod_type local_scope(pod_type xspace_id) const =0
Id relative to this collection equivalent to the id space family id xspace_id.
pod_type index(const std::string &xname) const
The index for name xname.
virtual void reset()=0
Restarts the iteration.
Abstract base class with useful features for all objects.
pod_type unglued_hub_pod() const
The current unglued hub id in the iteration.
std::string name() const
Name of this space.
bool is_done() const
True if iteration is finished.
const index_space_family & id_spaces() const
The id space family for this (const version).
void attach_to(const index_space_family &xid_spaces, pod_type xindex)
Attach to the state with index xindex in the id space family xid_spaces.
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.
virtual const index_space_collection & host() const =0
The host collection.
pod_type _hub_pod
The current hub id in the iteration.
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 =0
True if this collection contains the id space with local id xlocal_id.
virtual pod_type index() const =0
Index of this space.
virtual pod_type unglued_hub_pod(pod_type xid) const
The pod index in the unglued hub id space equivalent to xid in this 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.
bool contains(pod_type xid) const
True, if this contains an id space with id xid.
pod_type _pod
The current id in the iteration.
virtual index_space_iterator & operator=(const index_space_iterator &xother)
Assignment operator.
Factory and container for a family of id spaces.
virtual bool invariant() const
Class invariant.
index_space_iterator()
Creates an iterator for the id space.
pod_index_type pod_type
The "plain old data" index type for this.
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.
bool is_same_type(const any *other) const
True if other is the same type as this.
virtual index_space_iterator * clone() const =0
Virtual constructor, makes a new instance of the same type as this. If the iterator is attached...
void enable_invariant_check() const
Enable invariant checking.
void force_is_done()
Makes is_done() true.
const hub_index_space_handle & hub_id_space() const
The hub id space of this family.
virtual bool operator==(const index_space_iterator &xother) const
True if this is equivalent to xother.
bool conforms_to_state(const index_space_family &xid_spaces, pod_type xindex) const
True if this conforms to the handle type required by the state with index xindex in the id space fami...
pod_type hub_pod() const
The current unglued hub id in the iteration. synonym for unglued_hub_pod().
virtual ~index_space_iterator()
Destructor.
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.