21 #include "SheafSystem/list_index_space_handle.h" 22 #include "SheafSystem/assert_contract.h" 23 #include "SheafSystem/index_space_family.h" 24 #include "SheafSystem/list_index_space_state.h" 35 const std::string& xname,
40 require(!xname.empty());
41 require(!xid_spaces.
contains(xname));
51 ensure(&result.id_spaces() == &xid_spaces);
53 ensure(result.conforms_to_state(xname));
55 ensure(result.is_persistent() == xis_persistent);
56 ensure(result.name() == xname);
103 ensure((*
this) == xother);
116 require(xid_spaces.
contains(xindex));
128 ensure(
index() == xindex);
137 const std::string& xname)
141 require(xid_spaces.
contains(xname));
153 ensure(
name() == xname);
175 ensure((*
this) == xother);
251 ensure(
ct() == old_ct + 1);
252 ensure(
begin() == 0);
253 ensure(
ct() > 1 ?
end() == old_end+1 :
end() == 1);
274 define_old_variable(
pod_type old_domain_id =
pod(xold_range_id));
285 ensure(old_contains_xold_range_id ?
pod(xnew_range_id) == old_domain_id :
true);
308 ensure(&
state() == &xstate);
330 ensure(is_basic_query);
352 ensure(is_basic_query);
417 ensure((*
this) == xother);
438 ensure(*result == *
this);
472 ensure(is_basic_query);
573 xos << static_cast<const index_space_handle&>(xi);
577 xos <<
"index_space: index = -1 name = \'\'" to_range_type & to_range()
The representation of the domain id to range id map. Warning: direct manipulation of the to_range map...
pod_type front() const
The front of the list used to represent this id space; equivalent to hub_pod(begin()).
std::list< pod_type > to_range_type
The type of the domain id to range id map.
virtual bool invariant() const
Class invariant.
virtual void attach_to(pod_type xindex)
Attach to the state with index xindex in the id space family id_spaces().
virtual pod_type index() const
Index of this space.
An list implementation of class gathered_insertion_index_space_state. This representation is intended...
void reverse(bool xupdate_extrema)
Reverse the order, for instance hub_pod(new 0) = hub_pod(old last);.
static list_index_space_handle new_space(index_space_family &xid_spaces, const std::string &xname, bool xis_persistent)
Create a new list id space in the id space family xid_space at the next available id space index with...
virtual list_index_space_handle * clone() const
Virtual constructor, makes a new instance of the same type as this. If the handle is attached...
An map implementation of class scattered_insertion_index_space_handle. This representation is intende...
to_range_type & to_range()
The representation of the domain id to range id map. Warning: direct manipulation of the to_range map...
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
The id space family for this (const version).
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
static list_index_space_handle new_space(index_space_family &xid_spaces, const std::string &xname, bool xis_persistent)
Create a new list id space in the id space family xid_space with name xname, and persistence xis_pers...
virtual bool is_attached() const =0
True if this handle is attached to a state.
pod_type back() const
The back of the list used to represent this id space; equivalent to hub_pod(last id).
virtual pod_type pod(pod_type xid) const
The pod index in this space equivalent to xid in the hub id space.
Abstract base class with useful features for all objects.
pod_type front() const
The front of the list used to represent this id space; equivalent to hub_pod(begin()).
std::string name() const
Name of this space.
pod_index_type pod_type
The "plain old data" index type for this.
void push_front(pod_type xhub_id)
Pushes hub id xhub_id onto the front of the list used to represent this id space; increments the doma...
virtual bool is_attached() const
True if this handle is attached to a state.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
list_index_space_handle & operator=(const list_index_space_handle &xother)
Assignment operator; attach this handle to the state of xother. synonym for attach_to(xother).
virtual bool conforms_to_state(const index_space_collection &xhost, pod_type xlocal_id) const
True if this conforms to the handle type required by the state with local scope id xlocal_id in the h...
virtual bool contains_unglued_hub(pod_type xid) const
True if this space contains an id equivalent to xid in the unglued hub id space.
virtual ~list_index_space_handle()
Destructor.
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.
void push_front(pod_type xhub_id)
Pushes hub id xhub_id onto the front of the list used to represent this id space; increments the doma...
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 pod_type begin() const
Beginning id of this space.
list_index_space_handle()
Default constructor.
bool invariant_check() const
True if invariant checking is enabled.
pod_type back() const
The back of the list used to represent this id space; equivalent to hub_pod(last id).
std::list< pod_type > to_range_type
The type of the domain id to range id map.
SHEAF_DLL_SPEC std::ostream & operator<<(std::ostream &os, const dof_descriptor_array &p)
Insert dof_descriptor_array& p into ostream& os.
A handle for a scattered_insertion_index_space_state.
void replace_range_id(pod_type xold_range_id, pod_type xnew_range_id)
Replaces xold_range_id with xnew_range_id.
bool contains(pod_type xid) const
True, if this contains an id space with id xid.
virtual pod_type end() const
Ending id of this space.
void replace_range_id(pod_type xold_range_id, pod_type xnew_range_id)
Replaces xold_range_id with xnew_range_id.
list_index_space_state & state()
The list id space state (mutable version).
virtual size_type ct() const
The number of members.
virtual bool invariant() const
Class invariant.
Factory and container for a family of id spaces.
void reverse(bool xupdate_extrema)
Reverse the order, for instance hub_pod(new 0) = hub_pod(old last);.
bool is_same_type(const any *other) const
True if other is the same type as this.
void enable_invariant_check() const
Enable invariant checking.