21 #include "SheafSystem/product_section_space_schema_crg_range.h" 22 #include "SheafSystem/assert_contract.h" 23 #include "SheafSystem/factory.h" 24 #include "SheafSystem/cover_set_iterator.h" 25 #include "SheafSystem/ij_product_structure.h" 26 #include "SheafSystem/product_section_space_schema_poset.h" 27 #include "SheafSystem/section_space_schema_table_dof_crg_range.h" 85 ensure(is_basic_query);
104 ensure(is_basic_query);
119 bool result = _local_id_space.has_product_structure();
123 ensure(is_basic_query);
142 ensure(is_basic_query);
159 base_space().update_gathered_member_id_space(
false);
222 require(local_id_space_initialized());
231 _local_id_space.new_product_structure(lproduct);
275 if(xhost.has_gathered_member_id_space(
false))
279 assertion(xhost.gathered_member_id_space_excludes_bottom(
true));
281 result = &xhost.gathered_member_id_space(
false);
290 result = &xhost.new_gathered_member_id_space(
true,
false);
327 ensure(is_basic_query);
342 require(local_id_space().contains_hub(xindex));
377 xindex = _local_id_space.hub_pod(xindex);
381 ensure(local_id_space().contains_hub(xindex));
431 sheaf::cover_set_iterator
439 list_cover_set* lcover =
new list_cover_set(0);
440 lcover->put_is_implicit(
true);
443 cover_set_iterator lbase_itr =
_base_space->cover_iterator(
false, BOTTOM_INDEX);
444 cover_set_iterator lfiber_itr =
_fiber_schema->cover_iterator(
false, BOTTOM_INDEX);
445 while(!lbase_itr.is_done())
449 while(!lfiber_itr.is_done())
456 ordinal(lbase_itr.item(), lfiber_itr.item(), lid);
457 lcover->push_back(lid);
466 cover_set_iterator result(lcover);
489 sheaf::cover_set_iterator
499 list_cover_set* lcover =
new list_cover_set(0);
500 lcover->put_is_implicit(
true);
504 tuple(xmbr_index, lbase_space_id, lfiber_schema_id);
516 lcover->push_back(lid);
522 lcover->push_back(BOTTOM_INDEX);
529 cover_set_iterator lbase_itr =
_base_space->cover_iterator(xlower, lbase_space_id);
530 while(!lbase_itr.is_done())
532 if(lbase_itr.item() != BOTTOM_INDEX)
534 ordinal(lbase_itr.item(), lfiber_schema_id, lid);
536 lcover->push_back(lid);
544 cover_set_iterator lfiber_itr =
_fiber_schema->cover_iterator(xlower, lfiber_schema_id);
545 while(!lfiber_itr.is_done())
547 if(lfiber_itr.item() != BOTTOM_INDEX)
549 ordinal(lbase_space_id, lfiber_itr.item(), lid);
551 lcover->push_back(lid);
558 cover_set_iterator result(lcover);
581 ensure(is_basic_query);
600 tuple(xmbr_index, lbase_space_id, lfiber_schema_id);
623 ensure(is_basic_query);
646 tuple(xmbr_index, lbase_space_id, lfiber_schema_id);
662 result = (lother_base_space_id == BOTTOM_INDEX) && (lother_fiber_schema_id == lfiber_schema_id);
668 result = (xother_index == BOTTOM_INDEX);
677 tuple(xother_index, lother_base_space_id, lother_fiber_schema_id);
687 (lfiber_schema_id == lother_fiber_schema_id)) ||
689 (lbase_space_id == lother_base_space_id));
694 ensure(is_basic_query);
708 require(!cover_is_empty(xlower, xmbr_index));
716 tuple(xmbr_index, lbase_space_id, lfiber_schema_id);
733 result = BOTTOM_INDEX;
748 lfiber_schema_id, result);
753 ensure(is_basic_query);
781 tuple(xmbr_index, lbase_space_id, lfiber_schema_id);
789 ensure(is_basic_query);
808 tuple(xmbr_index, lbase_space_id, lfiber_schema_id);
844 ensure(is_basic_query);
904 require(dynamic_cast<product_section_space_schema_poset*>(&xhost) != 0);
938 xhost.append_cover(
atoms(),
UPPER, BOTTOM_INDEX);
940 implicit_crg_range::finalize(xhost);
944 lhost.put_product_range(*
this);
976 implicit_crg_range::is_initialized() &&
984 ensure(is_basic_query);
999 static const string result(
"product_section_space_schema_crg_range");
1013 fiber_bundle::product_section_space_schema_crg_range::
1023 range_factory().insert_prototype(lproto);
1045 require(other != 0);
1074 ensure(result != 0);
1075 ensure(is_same_type(result));
1088 if(invariant_check())
1092 disable_invariant_check();
1102 enable_invariant_check();
virtual void get_read_write_access(bool xrelease_read_only_access=false)
Get read write access to the state associated with this. If release_read_only_access is requested...
virtual void put_implicit_private_data(const block< pod_index_type > &xdata)
Initializes this using private data xdata.
bool is_valid() const
True if this is a valid id.
static void get_size(const product_section_space_schema_poset &xhost, size_type &result)
The size for an instance created with parameter xhost.
const index_space_handle * _fiber_id_space
The gathered fiber schema hub id space.
size_type ct() const
The number of items currently in use.
virtual size_type cover_ct(bool xlower, pod_index_type xmbr_hub_id) const
The number of members in the lower cover (xlower true) or upper cover (xlower false) of the member wi...
void initialize_fiber_schema(poset_state_handle &xfiber_schema)
Sets the fiber schema for section spaces on this schema to xfiber_schema.
base_space_poset & base_space()
The base space for section spaces on this schema (mutable version).
virtual bool is_jim(pod_index_type xmbr_index) const
True if and only if the member with index xmbr_index is join-irreducible.
bool table_dof_range_initialized() const
True if the table dof range has been initialized.
virtual void tuple(pod_index_type xindex, pod_index_type &xbase_space_id, pod_index_type &xfiber_schema_id) const
The tuple conversion from section space schema id xindex to the base space id xbase_space_id and fibe...
virtual void get_implicit_private_data(block< pod_index_type > &xdata) const
The private data for this instance.
bool state_is_read_accessible() const
True if this is attached and if the state is accessible for read or access control is disabled...
virtual product_section_space_schema_crg_range * clone() const
Virtual constructor, makes a new instance of the same type as this.
A client handle for a general, abstract partially order set.
bool contains_hub(pod_type xid) const
True if this space contains an id equivalent to xid in the unglued hub id space. synonym for contains...
virtual size_type implicit_cover_size(bool xlower, pod_index_type xmbr_index) const
The number of members in the lower (xlower true) or upper (xlower false) cover set.
virtual bool is_atom(pod_index_type xmbr_hub_id) const
True if the member with hub id xmbr_hub_id covers the bottom.
virtual bool contains_member(pod_index_type xbase_space_id, pod_index_type xfiber_schema_id) const
True if this range contains the member with base space id xbase_space_id and fiber schema id xfiber_s...
virtual pod_index_type implicit_first_cover_member(bool xlower, pod_index_type xmbr_index) const
The first member of the lower (xlower true) or upper (xlower false) cover.
virtual const scoped_index & dof_tuple_id(bool xauto_access) const
An id in the dof tuple hub id space; intended for copying to initialize ids to the dof tuple id space...
virtual bool contains_member(pod_index_type xmbr_hub_id) const
True if this poset contains poset member with hub id xmbr_hub_id.
void update_product_structure()
Update teh product structure of the local id space.
An abstract handle to a space of alternate integer identifiers (aliases) for a subset of a hub set of...
void tuple(pod_type xordinal, pod_type &xi, pod_type &xj) const
Ordinal to 2-tuple conversion.
virtual cover_set_iterator atoms() const
An iterator over the atoms in this range.
virtual void ordinal(pod_index_type xbase_space_id, pod_index_type xfiber_schema_id, pod_index_type &xindex) const
The ordinal conversion from base space id xbase_space_id and fiber schema id xfiber_schema_id to sect...
bool gathered_id_spaces_initialized() const
True if the gathered id spaces have been initialized.
poset_state_handle & fiber_schema()
The fiber schema for section spaces on this schema (mutable version).
void initialize_base_space(base_space_poset &xbase_space)
Sets the base space for section spaces on this schema to xbase_space.
An schema poset for a section space represented by a Cartesian product subspace of the tensor product...
bool product_structure_initialized() const
True if the product structure has been initialized.
Abstract base class with useful features for all objects.
virtual bool implicit_cover_is_empty(bool xlower, pod_index_type xmbr_index) const
True if and only if the lower (xlower true) or upper (xlower false) cover set of the member with inde...
Abstract emulator for a range of implicit section space schema members.
virtual void ordinal(pod_index_type xbase_space_id, pod_index_type xfiber_schema_id, pod_index_type &xindex) const
The ordinal conversion from base space id xbase_space_id and fiber schema id xfiber_schema_id to sect...
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
virtual void finalize(poset_state_handle &xhost)
Finialize the initialization of this crg range in the host xhost.
void initialize_gathered_id_spaces()
Initialize the gathered hub id spaces for the base space and fiber schema.
product_section_space_schema_crg_range()
Default constructor.
bool base_space_initialized() const
True if the base space has been initialized.
const index_space_handle * _base_id_space
The gathered base space hub id space.
An index within the external ("client") scope of a given id space.
virtual const scoped_index & dof_tuple_id(pod_index_type xmbr_index) const
The dof tuple id of the member with index xmbr_index.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
const index_space_handle * gathered_id_space(poset_state_handle &xhost)
Get the gathered hub id space for xhost.
const bool UPPER
Selector for upper cover.
virtual size_type ct() const =0
The number of members.
virtual bool implicit_cover_contains_member(bool xlower, pod_index_type xmbr_index, pod_index_type xother_index) const
True if and only if the lower (xlower true) or upper (xlower false) cover set contains xindex...
void initialize_table_dof_range(section_space_schema_table_dof_crg_range &xtable_dof_range)
Sets the table dof crg range.
const ij_product_structure & product_structure() const
The product structure of the local id space,.
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 pod_type pod(pod_type xid) const =0
The pod index in this space equivalent to xid in the hub id space.
void ordinal(pod_type xi, pod_type xj, pod_type &xordinal) const
2-tuple to ordinal conversion.
const section_space_schema_table_dof_crg_range * _table_dof_range
The table dof crg range.
bool cover_contains_member(bool xlower, pod_index_type xmbr_hub_id, pod_index_type xother_mbr_hub_id) const
True if and only if the lower (xlower true) or upper (xlower false) cover set of the member with hub ...
const hub_index_space_handle & member_hub_id_space(bool xauto_access) const
The member hub id space.
virtual size_type implicit_private_data_size() const
The size of the private data.
virtual const std::string & class_name() const
The name of this class; provided to satisfy factory template.
pod_type hub_pod(pod_type xid) const
The pod index in the unglued hub id space equivalent to xid in this id space; synonym for unglued_hub...
poset_state_handle & fiber_schema()
The fiber schema for section spaces on this schema (mutable version).
Emulator for a range of implicit section space schema members representing the Cartesian product the ...
subposet & table_dof_subposet()
The table dof subposet when this poset is used as a schema (mutable version).
int_type pod_index_type
The plain old data index type.
A 2D implementation of abstract_product_structure.
void initialize_product_structure()
Sets the product structure of the local id space to an ij_product_structure.
virtual cover_set_iterator implicit_cover_iterator(bool xlower, pod_index_type xmbr_index) const
Iterator for lower (xlower true) or upper (xlower false) cover set of the member with index xmbr_inde...
virtual ~product_section_space_schema_crg_range()
Destructor.
virtual bool is_jim(pod_index_type xmbr_hub_id, bool xin_current_version=true) const
True if the member with hub id xmbr_hub_id is a jim in the current version (xin_current_version == tr...
base_space_poset * _base_space
The base space for section spaces on this schema.
virtual bool is_initialized() const
True if fully initialized.
virtual size_type ct() const
The number of members.
bool fiber_schema_initialized() const
True if the fiber schema has been initialized.
pod_index_type first_cover_member(bool xlower, pod_index_type xmbr_hub_id) const
Hub id of the first member of the lower (xlower true) or upper (xlower false) cover of the member wit...
virtual bool invariant() const
Class invariant.
SHEAF_DLL_SPEC pod_index_type invalid_pod_index()
The invalid pod index value.
poset_state_handle * _fiber_schema
The fiber schema for section spaces on this schema.
virtual bool invariant() const
Class invariant.
virtual void tuple(pod_index_type xindex, pod_index_type &xbase_space_id, pod_index_type &xfiber_schema_id) const
The tuple conversion from section space schema id xindex to the base space id xbase_space_id and fibe...
void update_gathered_id_spaces()
Update the gathered hub id spaces for the base space and fiber schema.
base_space_poset & base_space()
The base space for section spaces on this schema.