21 #include "SheafSystem/implicit_crg_interval.h" 23 #include "SheafSystem/arg_list.h" 24 #include "SheafSystem/assert_contract.h" 25 #include "SheafSystem/index_space_family.h" 26 #include "SheafSystem/index_space_iterator.h" 27 #include "SheafSystem/list_index_space_handle.h" 28 #include "SheafSystem/list_index_space_state.h" 29 #include "SheafSystem/poset_state_handle.h" 41 : _private_data_initialized(false),
42 _dof_tuple_ids_initialized(false),
201 string suffix = xlower ?
"_lower_cover" :
"_upper_cover";
207 ensure(!result.empty());
307 for(
int i=0; i<xdof_tuple_ids.
ct(); ++i)
318 ensure_for_all(i, 0, xdof_tuple_ids.
ct(),
dof_tuple_ids()[i] == xdof_tuple_ids[i]);
389 explicit_cover_map_type::const_iterator litr;
432 explicit_cover_map_type::const_iterator litr;
507 lmember_ct = xdata[idx];
512 lmember_id = xdata[++idx];
516 lcover_ct = xdata[++idx];
533 lmember_ct = xdata[++idx];
538 lmember_id = xdata[++idx];
542 lcover_ct = xdata[++idx];
726 static const string result(
"implicit_crg_interval");
832 result = xinclude_shallow ?
sizeof(xp) : 0;
An implementation of class scattered_insertion_index_space_handle that has a interval id space state...
virtual pod_index_type dof_tuple_id(pod_index_type xmbr_index) const =0
The dof tuple id of the member with index xmbr_index.
void initialize(const namespace_poset &xnamespace)
Sets is_initialized() == true; dummy routine provided to satisfy factory template.
index_space_family * _id_spaces
The id space family of this interval.
virtual pod_type index() const
Index of this space.
void get_private_data(block< pod_index_type > &xdata) const
Initializes this using private data xdata.
size_type ct() const
The number of items currently in use.
explicit_cover_map_type _explicit_lower_cover_map
The map from ids to explicit lower cover id spaces.
An abstract iterator over the ids of an id space.
block< pod_index_type > _dof_tuple_ids
The ids of the dof tuples associated with this interval.
const hub_index_space_handle & hub_id_space() const
The hub id space of this interval.
virtual bool is_initialized() const
True if fully initialized.
The default name space; a poset which contains other posets as members.
bool state_is_read_accessible() const
True if this is attached and if the state is accessible for read or access control is disabled...
A client handle for a general, abstract partially order set.
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...
An map implementation of class scattered_insertion_index_space_handle. This representation is intende...
bool is_interval_member(pod_index_type xindex) const
True if xindex is the interval member.
void reserve(index_type xub)
Makes ub() at least xub; if new storage is allocated, it is uninitialized.
block< pod_index_type > & dof_tuple_ids()
The ids of the dof tuples associated with this interval.
primary_index_space_handle _local_id_space
The id space of this interval.
virtual implicit_crg_interval * clone() const =0
Virtual constructor, makes a new instance of the same type as this.
pod_index_type begin() const
The beginning of the member interval; this emulates members in the interval [begin(), end()), includes interval member.
explicit_cover_map_type _explicit_upper_cover_map
The map from ids to explicit upper cover id spaces.
virtual void next()=0
Makes id() the next id in the iteration.
pod_index_type implicit_begin() const
The beginning of the implicit member interval (begin(), end()), excludes interval member; synonym for...
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
virtual ~implicit_crg_interval()
Destructor.
static std::string explicit_cover_name(bool xlower, const scoped_index &xmbr_index)
Creates a name for the explicit cover id space for member with index, xmbr_index. ...
index_space_iterator & get_id_space_iterator(const std::string &xname) const
Allocates an id space iterator from the iterator pool attached to state with name xname...
virtual const std::string & class_name() const
The name of this class; provided to satisfy factory template.
void initialize_dof_tuple_ids(const block< pod_index_type > &xdof_tuple_ids)
Allocates and initializes dof_tuple_ids() with xdof_tuple_ids.
virtual void get_implicit_private_data(block< pod_index_type > &xdata) const =0
Initializes this using private data xdata.
Abstract implementation of crg_interval for an interval of implicit cover relation graph members...
bool is_hub_scope() const
True if and only if the id space of this is the hub id space.
bool local_id_space_initialized() const
True if local id space has been initialized.
virtual bool invariant() const
Class invariant.
Abstract base class with useful features for all objects.
virtual void put_implicit_private_data(const block< pod_index_type > &xdata)=0
Initializes this using private data xdata.
void push_back(const_reference_type item)
Insert item at the end of the items in the auto_block.
bool is_done() const
True if iteration is finished.
pod_index_type end() const
The end of the member interval.
bool _private_data_initialized
True if private data has been initialized.
void release_id_space_iterator(index_space_iterator &xitr) const
Returns the id space iterator xitr to the iterator pool.
void set_ct(size_type xct)
Sets ct() == xct.
pod_index_type interval_member() const
The index of the interval member itself; synonym for begin().
An index within the external ("client") scope of a given id space.
virtual size_type implicit_private_data_size() const =0
The size of the private data.
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.
implicit_crg_interval()
Default Constructor; constructs an uninitialized interval.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
virtual void insert_member(pod_index_type xmbr_hub_id)
Inserts the member of host() with hub id xmbr_hub_id.
size_type private_data_size() const
The size of the private data.
const bool UPPER
Selector for upper cover.
virtual void finalize(poset_state_handle &xhost)
Finialize the initialization of this crg interval in the host xhost.
bool private_data_initialized() const
True if private data has been initialized.
void put(const index_space_handle &xid_space, pod_type xpod)
Set the scope to id space, xid_space and pod() to xpod.
static std::string implicit_cover_name(bool xlower, const scoped_index &xmbr_index)
Creates a name for the implicit cover id space for member with index, xmbr_index. ...
bool contains_member(pod_index_type xindex) const
True if and only if the index xindex is contained in this interval.
void disable_invariant_check() const
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing inv...
virtual bool is_jim(pod_index_type xmbr_index) const =0
True if and only if the member with index xmbr_index is join-irreducible.
bool _is_finalized
True if the initialization of this crg interval has been finalized.
friend SHEAF_DLL_SPEC size_t deep_size(const implicit_crg_interval &xp, bool xinclude_shallow)
The deep size of the referenced object of type implicit_crg_interval; if xinclude_shallow, add the sizeof xp to the result.
bool invariant_check() const
True if invariant checking is enabled.
void initialize(const namespace_poset &xnamespace)
Sets is_initialized() == true; dummy routine provided to satisfy factory template.
int_type pod_index_type
The plain old data index type.
virtual bool invariant() const
Class invariant.
virtual subposet & jims()
The subset of all jims (mutable version)
void push_back(const scoped_index &xhub_id)
Make the next id in this space equivalent to xhub_id in the hub id space. synonym for push_back(xhub_...
void clean_cover(bool xlower, pod_index_type xmbr_index)
Removes members of the cover that are no longer members of the crg.
const primary_index_space_handle & local_id_space() const
The local id space of this interval.
bool _dof_tuple_ids_initialized
True if dof tuple ids have been initialized.
pod_type offset() const
The offset into the hub id space.
size_type ct(const std::string &xname) const
The number of members for the id space with name xname.
bool dof_tuple_ids_initialized() const
True if dof tuple ids have been initialized.
An auto_block with a no-initialization initialization policy.
bool is_same_type(const any *other) const
True if other is the same type as this.
void put_private_data(const block< pod_index_type > &xdata)
Initializes this using private data xdata.
void enable_invariant_check() const
Enable invariant checking.
pod_type hub_pod() const
The current unglued hub id in the iteration. synonym for unglued_hub_pod().
static std::string make_reserved_name(const std::string &xprefix, const size_t &xindex, const std::string &xsuffix)
Creates a string reserved_prefix()_xprefix_xindex_xsuffix.
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.