21 #include "SheafSystem/section_space_schema_member.impl.h" 23 #include "SheafSystem/arg_list.h" 24 #include "SheafSystem/assert_contract.h" 25 #include "SheafSystem/array_index_space_handle.h" 26 #include "SheafSystem/array_index_space_state.h" 27 #include "SheafSystem/base_space_member.h" 28 #include "SheafSystem/binary_section_space_schema_member.impl.h" 29 #include "SheafSystem/binary_section_space_schema_poset.h" 30 #include "SheafSystem/discretization_iterator.h" 31 #include "SheafSystem/ij_product_structure.h" 32 #include "SheafSystem/index_space_iterator.h" 33 #include "SheafSystem/scattered_insertion_index_space_handle.h" 34 #include "SheafSystem/namespace_poset.h" 35 #include "SheafSystem/postorder_member_iterator.h" 36 #include "SheafSystem/postorder_itr.h" 37 #include "SheafSystem/preorder_itr.h" 38 #include "SheafSystem/sec_rep_descriptor.h" 39 #include "SheafSystem/section_component_iterator.h" 40 #include "SheafSystem/section_dof_iterator.h" 41 #include "SheafSystem/section_space_schema_jims_index_space_handle.h" 42 #include "SheafSystem/section_space_schema_jims_index_space_state.h" 43 #include "SheafSystem/section_space_schema_poset.h" 44 #include "SheafSystem/sheaves_namespace.h" 45 #include "SheafSystem/std_set.h" 46 #include "SheafSystem/wsv_block.h" 68 static const poset_path result(
"section_space_schema_schema",
"section_space_schema_schema");
72 ensure(result.
full());
97 ldof_specs =
"size SIZE_TYPE false";
98 ldof_specs +=
" alignment SIZE_TYPE false";
99 ldof_specs +=
" type POD_INDEX_TYPE false";
103 ldof_specs +=
" rep_path C_STRING true";
104 ldof_specs +=
" base_space_path C_STRING true";
105 ldof_specs +=
" fiber_space_path C_STRING true";
108 standard_schema_path().member_name(),
109 poset_path(standard_schema_path().member_name(),
"bottom"),
144 const string& result = static_class_name();
148 ensure(!result.empty());
163 static const string result(
"section_space_schema_member");
167 ensure(!result.empty());
177 const std::string& xbase_member_name)
181 require(poset_path::is_valid_name(xfiber_schema_member_name));
182 require(poset_path::is_valid_name(xbase_member_name));
186 string result(xfiber_schema_member_name);
188 result += xbase_member_name;
192 ensure(poset_path::is_valid_name(result));
207 attach_to_state(&xother);
211 ensure(is_same_state(&xother));
225 require(is_ancestor_of(&xother));
248 if(_discretization_id_space != 0)
250 _discretization_id_space->release_id_space();
266 require(is_attached());
285 require(is_attached());
306 require(is_attached());
311 result = rep().is_same_state(&xother.
rep());
325 return _base_space_id;
336 result.
put(_base_space.hub_id_space(), _base_space_id);
340 ensure(result.
same_scope(base_space().hub_id_space()));
369 require(is_attached());
374 result = base_space().is_same_state(&xother.
base_space());
388 return _fiber_schema_id;
399 result.
put(_fiber_schema.hub_id_space(), _fiber_schema_id);
403 ensure(result.
same_scope(fiber_schema().hub_id_space()));
414 return _fiber_schema;
421 return _fiber_schema;
432 require(is_attached());
437 result = fiber_schema().is_same_state(&xother.
fiber_schema());
454 require(is_attached());
458 poset& result = host()->fiber_space();
473 require(is_attached());
477 poset& result = host()->fiber_space();
494 require(base_space().state_is_read_accessible());
498 if(!row_cache_consistent())
524 if(!row_cache_consistent())
529 result = _evaluation_ct;
548 require(state_is_read_accessible());
552 if(!row_cache_consistent())
557 result = _discretization_ct;
576 require(state_is_read_accessible());
580 result = fiber_schema().row_dof_ct();
593 df(
bool xauto_access)
599 require(state_is_auto_read_accessible(xauto_access));
632 subposet& result = host()->discretization();
649 subposet& result = host()->discretization();
666 require(is_attached());
671 result = discretization().is_same_state(&xother.
discretization());
689 bool result = host()->is_multivalued();
706 subposet& result = host()->multivalued();
723 subposet& result = host()->multivalued();
740 subposet& result = host()->evaluation();
757 subposet& result = host()->evaluation();
774 require(is_attached());
779 result = evaluation().is_same_state(&xother.
evaluation());
797 require(state_is_read_accessible());
823 require(is_attached());
827 string result = rep().evaluator_family_name();
843 require(!xsp.
name().empty());
849 if(xhub_id == TOP_INDEX)
855 result = poset_path::make_reserved_name(
"", xhub_id,
856 xsp.
name() +
"_id_space");
861 ensure(!result.empty());
875 require(!xsp.
name().empty());
880 string result = intersection_id_space_name(xsp, xid.
hub_pod());
884 ensure(!result.empty());
899 require(state_is_read_accessible());
900 require(has_version(xversion));
925 require(state_is_read_accessible());
926 require(is_ancestor_of(&xother));
942 result = is_same_state(&xother);
963 require(xpath.
full());
968 require(dynamic_cast<binary_section_space_schema_poset*>(&xns.
member_poset(xpath)) != 0);
969 require(!xauto_access ?
974 require(!xauto_access ?
991 result = schema_poset_member::conforms_to(xns,
1028 _discretization_id_space = 0;
1032 ensure(invariant());
1033 ensure(!is_attached() );
1035 ensure(!
is_valid(base_space_id()));
1036 ensure(!
is_valid(fiber_schema_id()));
1038 ensure(!base_space().is_attached());
1039 ensure(!fiber_schema().is_attached());
1050 require(state_is_read_write_accessible());
1060 ensure(unexecutable(schema info initialized));
1073 require(state_is_read_accessible());
1079 schema_poset_member::attach_handle_data_members();
1083 _base_space_id = host()->get_base_space_id_from_index(_index.pod());
1084 _fiber_schema_id = host()->get_fiber_schema_id_from_index(_index.pod());
1088 _base_space.attach_to_state(&(host()->base_space()), _base_space_id);
1089 _fiber_schema.attach_to_state(&(host()->fiber_schema()), _fiber_schema_id);
1094 _base_space.put_version(_version,
false);
1098 ensure(base_space().is_attached());
1099 ensure(fiber_schema().is_attached());
1112 require(state_is_read_accessible());
1117 const subposet& leval_sp = evaluation();
1118 const subposet& ldisc_sp = discretization();
1123 _discretization_ct = _discretization_id_space->ct();
1127 string leval_id_space_name = intersection_id_space_name(leval_sp, _base_space_id);
1152 _db = lbase_host.
db(_base_space.index());
1167 require(state_is_read_accessible());
1168 require(host()->base_space().state_is_read_write_accessible());
1169 require(discretization().has_id_space());
1174 const subposet& leval_sp = evaluation();
1175 const subposet& ldisc_sp = discretization();
1183 _discretization_ct = 0;
1195 set<scoped_index::pod_type> ltop_seq_ids;
1207 _db = (ldb > _db) ? ldb : _db;
1217 _discretization_ct++;
1218 ltop_seq_ids.insert(ltop_space.
pod(lindex));
1228 assertion(dynamic_cast<scattered_insertion_index_space_handle*>(_discretization_id_space) != 0);
1233 ldisc_id_space->
clear();
1234 ldisc_id_space->
reserve(_discretization_ct);
1236 set<pod_index_type>::iterator lseq_id_itr;
1237 for(lseq_id_itr = ltop_seq_ids.begin();
1238 lseq_id_itr != ltop_seq_ids.end();
1260 fiber_schema().row_dof_id_space();
1262 if(_host->member_id_spaces(
false).contains(row_dof_subposet_name()))
1267 &_host->member_id_spaces(
false).
get_id_space(row_dof_subposet_name());
1270 (_row_dof_id_space)->put_factors(*_discretization_id_space,
1271 lfiber_schema_id_space,
1279 section_space_schema_jims_index_space_state::new_space(_host->member_id_spaces(
false),
1280 row_dof_subposet_name(),
1281 *_discretization_id_space,
1282 lfiber_schema_id_space,
1308 bool xin_table_dofs)
const 1314 require(state_is_read_accessible());
1318 pod_index_type l_id = host()->get_index_from_components(xbase_id, xfiber_id);
1319 result = contains_dof(l_id, xin_table_dofs);
1332 bool xin_table_dofs)
const 1338 require(state_is_read_accessible());
1353 require(state_is_read_accessible());
1357 if(!host()->member_id_spaces(
false).contains(table_dof_subposet_name()))
1362 array_index_space_state::new_space(host()->member_id_spaces(
false),
1363 table_dof_subposet_name(),
1366 _table_dof_id_space = <able_dof_id_space.
get_id_space();
1377 ltable_dof_id_space.
reserve(fiber_schema().table_dof_id_space().ct());
1380 fiber_schema().table_dof_id_space().get_iterator();
1390 fiber_schema().table_dof_id_space().release_iterator(litr);
1394 _table_dof_id_space =
1395 &host()->member_id_spaces(
false).get_id_space(table_dof_subposet_name());
1398 schema_poset_member::update_table_cache();
1413 require(state_is_read_accessible());
1424 only_row_dof_id_space,
1428 update_type lupdate = xupdate_id_space ? all_id_spaces : only_row_cache;
1437 if(_discretization_id_space != 0)
1439 _discretization_id_space->release_id_space();
1445 string ldisc_id_space_name =
1446 intersection_id_space_name(discretization(), _base_space_id);
1452 _discretization_id_space =
1455 if((lupdate == all_id_spaces) &&
1456 (*_discretization_id_space == discretization().id_space()))
1462 lupdate = only_row_dof_id_space;
1471 ldisc_id_space_name,
1475 _discretization_id_space = &ldiscretization_id_space.
get_id_space();
1477 if(lupdate == only_row_cache)
1482 lupdate = all_id_spaces;
1488 if((lupdate == only_row_cache) &&
1489 !_host->member_id_spaces(
false).contains(row_dof_subposet_name()))
1491 lupdate = only_row_dof_id_space;
1498 case only_row_cache:
1499 update_row_cache_without_disc_id_space();
1502 case only_row_dof_id_space:
1503 update_row_cache_without_disc_id_space();
1504 update_row_dof_id_space();
1508 update_row_cache_with_disc_id_space();
1509 update_row_dof_id_space();
1537 require(state_is_read_accessible());
1541 if(!row_cache_consistent())
1562 require(state_is_auto_read_accessible(xauto_access));
1571 if(!row_cache_consistent())
1597 require(state_is_read_accessible());
1601 if(!row_cache_consistent())
1622 require(state_is_auto_read_accessible(xauto_access));
1631 if(!row_cache_consistent())
1657 require(state_is_read_accessible());
1677 require(state_is_auto_read_accessible(xauto_access));
1682 fiber_schema().dof_id_space(xis_table_dofs, xauto_access);
1699 require(state_is_read_accessible());
1700 require(xis_table_dofs ? fiber_schema_id_space(xis_table_dofs).contains(xdof_id) :
true);
1710 tuple(xdof_id, ldisc_id, lfiber_dof_id);
1713 size_type result = fiber_schema().size(lfiber_dof_id, xis_table_dofs);
1729 require(state_is_read_accessible());
1730 require(fiber_schema_id_space(xis_table_dof).contains(xfiber_dof_id));
1734 size_type result = fiber_schema().size(xfiber_dof_id, xis_table_dof);
1749 bool xauto_access)
const 1753 require(state_is_read_accessible());
1754 require(fiber_schema_id_space(xis_table_dof, xauto_access).contains(xfiber_dof_id));
1758 size_type result = fiber_schema().size(xfiber_dof_id, xis_table_dof, xauto_access);
1774 require(state_is_read_accessible());
1775 require(xis_table_dofs ? fiber_schema_id_space(xis_table_dofs).contains(xdof_id) :
true);
1785 tuple(xdof_id, ldisc_id, lfiber_dof_id);
1788 size_type result = fiber_schema().alignment(lfiber_dof_id, xis_table_dofs);
1804 require(state_is_read_accessible());
1805 require(fiber_schema_id_space(xis_table_dof).contains(xfiber_dof_id));
1809 size_type result = fiber_schema().alignment(xfiber_dof_id, xis_table_dof);
1824 bool xauto_access)
const 1828 require(state_is_read_accessible());
1829 require(fiber_schema_id_space(xis_table_dof, xauto_access).contains(xfiber_dof_id));
1834 fiber_schema().alignment(xfiber_dof_id, xis_table_dof, xauto_access);
1850 require(state_is_read_accessible());
1851 require(xis_table_dofs ? fiber_schema_id_space(xis_table_dofs).contains(xdof_id) :
true);
1861 tuple(xdof_id, ldisc_id, lfiber_dof_id);
1864 primitive_type result = fiber_schema().type(lfiber_dof_id, xis_table_dofs);
1880 require(state_is_read_accessible());
1881 require(fiber_schema_id_space(xis_table_dof).contains(xfiber_dof_id));
1885 primitive_type result = fiber_schema().type(xfiber_dof_id, xis_table_dof);
1900 bool xauto_access)
const 1904 require(state_is_read_accessible());
1905 require(fiber_schema_id_space(xis_table_dof, xauto_access).contains(xfiber_dof_id));
1910 fiber_schema().type(xfiber_dof_id, xis_table_dof, xauto_access);
1928 require(state_is_read_accessible());
1929 require(xis_table_dof ? fiber_schema_id_space(xis_table_dof).contains(xdof_id) :
true);
1935 result = fiber_schema().offset(xdof_id,
true);
1941 tuple(xdof_id, ldisc_id, lfiber_dof_id);
1943 result = offset(ldisc_id, lfiber_dof_id,
false);
1961 require(state_is_read_accessible());
1962 require(fiber_schema_id_space(xis_table_dof).contains(xfiber_dof_id));
1970 result = fiber_schema().offset(xfiber_dof_id,
true);
1974 result = fiber_size()*xdisc_id + fiber_schema().offset(xfiber_dof_id,
false);
1990 bool xauto_access)
const 1994 require(state_is_read_accessible());
1995 require(fiber_schema_id_space(xis_table_dof, xauto_access).contains(xfiber_dof_id));
2004 pod_index_type ldisc_id = _discretization_id_space->pod(xdisc_id);
2006 fiber_schema_id_space(xis_table_dof).pod(xfiber_dof_id);
2008 size_type result = offset(ldisc_id, lfiber_dof_id, xis_table_dof);
2029 require(state_is_read_accessible());
2033 size_type result = fiber_schema().dof_tuple_ub(
false);
2049 require(state_is_auto_read_accessible(xauto_access));
2079 require(state_is_read_accessible());
2080 require(fiber_schema_id_space(
false).contains(xfiber_dof_id));
2084 if(!row_cache_consistent())
2090 fiber_schema().size(xfiber_dof_id,
false)*_discretization_ct;
2106 require(state_is_auto_read_accessible(xauto_access));
2107 require(fiber_schema_id_space(
false, xauto_access).contains(xfiber_dof_id));
2117 fiber_schema_id_space(
false).pod(xfiber_dof_id);
2118 size_type result = component_size(lfiber_dof_id);
2150 require(state_is_read_accessible());
2161 require(precondition_of(host()->base_space().get_ext_id(base_space_id(), xid_space_name)));
2169 require(host()->base_space().is_explicit_member(base_space_id()) ||
2170 host()->base_space().is_block_member(base_space_id()));
2175 host()->base_space().get_ext_id(base_space_id(), xid_space_name,
false);
2179 ensure(result >= 0);
2197 require(state_is_read_accessible());
2221 require(state_is_read_accessible());
2259 result = base_space().down_ct() * fiber_schema().down_ct();
2263 ensure(result > 0 );
2278 require(state_is_read_write_accessible());
2290 require(result != 0);
2291 require(postcondition_of(down_pa));
2313 ensure(unexecutable(result is down
set 2331 result = base_space().up_ct() * fiber_schema().up_ct();
2335 ensure(result > 0 );
2350 require(state_is_read_write_accessible());
2361 ensure(result != 0);
2362 ensure(postcondition_of(up_pa));
2387 ensure(unexecutable(result is up
set 2405 result = base_space().jim_ct() * fiber_schema().jim_ct();
2409 ensure(is_jem(&(host()->bottom())) ? result == 0 : result > 0 );
2424 require(state_is_read_write_accessible());
2436 ensure(result != 0);
2437 ensure(postcondition_of(jims_pa));
2451 require(state_is_read_write_accessible());
2460 ensure(unexecutable(result is jims
set 2478 result = base_space().maximal_jim_ct() * fiber_schema().maximal_jim_ct();
2482 ensure(is_jem(&(host()->bottom())) ? result == 0 : result > 0 );
2498 require(state_is_read_write_accessible());
2505 maximal_jims_pa(result);
2510 ensure(has_same_host(result));
2511 ensure(postcondition_of(maximal_jims_pa));
2524 require(has_same_host(result));
2533 ensure(unexecutable(result is
union of maximal_jims of
this with old result));
2557 require(has_same_host(other));
2562 require(state_is_read_accessible());
2570 ensure(unexecutable(result is least upper bound in host of
this and other));
2583 require(has_same_host(other));
2588 require(state_is_read_accessible());
2596 ensure(unexecutable(result is least upper bound in host of
this and other));
2620 require(state_is_read_accessible());
2621 require(has_version(xversion));
2622 require(!xunalias ? xversion != CURRENT_MEMBER_VERSION :
true);
2626 schema_poset_member::put_version(xversion, xunalias);
2631 _base_space.put_version(xversion, xunalias);
2636 version(
false) == unaliased_version(xversion) :
2637 version(
false) == xversion);
2663 require(is_attached());
2664 require(state_is_auto_read_write_accessible(xauto_access));
2668 string lname = standard_member_name(fiber_schema().name(
true),
2669 base_space().name(
true));
2671 put_name(lname, xunique, xauto_access);
2676 name(xauto_access) == standard_member_name(fiber_schema().name(
true), base_space().name(
true)) :
2677 has_name(standard_member_name(fiber_schema().name(
true), base_space().name(
true)), xauto_access));
2700 require(state_is_read_accessible());
2701 require(host()->base_space().contains_member(xbase_space_id));
2702 require(host()->fiber_schema().contains_member(xfiber_schema_id));
2710 ensure(base_space_id() == xbase_space_id);
2711 ensure(base_space().is_attached());
2712 ensure(fiber_schema_id() == xfiber_schema_id);
2713 ensure(fiber_schema().is_attached());
2727 require(state_is_read_accessible());
2728 require(host()->base_space().contains_member(xbase_space_id));
2729 require(host()->fiber_schema().contains_member(xfiber_schema_id));
2733 attach_to_state(xbase_space_id.
hub_pod(),
2738 ensure(base_space_id() == xbase_space_id.
hub_pod());
2739 ensure(base_space().is_attached());
2740 ensure(fiber_schema_id() == xfiber_schema_id.
hub_pod());
2741 ensure(fiber_schema().is_attached());
2756 require(xhost != 0);
2757 require(host_is_ancestor_of(xhost));
2768 ensure(base_space_id() == xbase_space_id);
2769 ensure(base_space().is_attached());
2770 ensure(fiber_schema_id() == xfiber_schema_id);
2771 ensure(fiber_schema().is_attached());
2785 require(xhost != 0);
2786 require(host_is_ancestor_of(xhost));
2793 attach_to_state(xhost,
2799 ensure(base_space_id() == xbase_space_id.
hub_pod());
2800 ensure(base_space().is_attached());
2801 ensure(fiber_schema_id() == xfiber_schema_id.
hub_pod());
2802 ensure(fiber_schema().is_attached());
2817 _base_space.detach_from_state();
2818 _base_space_id = _base_space.index().pod();
2819 _fiber_schema.detach_from_state();
2820 _fiber_schema_id = _fiber_schema.index().pod();
2822 schema_poset_member::detach_from_state();
2827 ensure(!is_attached());
2828 ensure(!base_space().is_attached());
2829 ensure(!fiber_schema().is_attached());
2908 invariance(schema_poset_member::invariant());
2910 if(invariant_check())
2914 disable_invariant_check();
2918 invariance(is_attached() == base_space().is_attached());
2919 invariance(is_attached() == fiber_schema().is_attached());
2926 enable_invariant_check();
2987 <<
" host = \'" << p.
host()->
name() <<
"\'" 2989 <<
" name = \'" << p.
name() <<
'\'' 2990 <<
" version= " << p.
version(
false)
2991 <<
" unaliased version= " << p.
version()
3007 os <<
"member: host = \'\'' index = -1 name = \'\''" 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...
void put_standard_name(bool xunique, bool xauto_access)
Sets the name of this member to a standard name; if xunique, make xname the only name.
virtual const std::string & class_name() const
The name of this class.
poset_state_handle * host() const
The poset which this is a handle to a component of.
A client handle for a subposet.
virtual void maximal_jims_pa(subposet *result) const
The maximal members of the set of jims contained in this member, pre-allocated.
An implementation of class explicit_index_space_handle that has a section space schema jims id space ...
bool is_done() const
True if iteration finished.
section_space_schema_poset * host() const
The poset which this is a handle to a component of.
int down_ct() const
The number of members in the down set of this member.
A client handle for a poset member which has been prepared for use as a schema for a section space...
virtual void jims_pa(subposet *result)
The set of jims contained in the down set of this member, pre-allocated.
bool full() const
True if both poset name and member name are not empty.
int version(bool xunalias=true) const
The (possibly aliased) version of this component. The version of the host used when evaluating proper...
bool in_scope() const
True if and only if scope() contains an entry for pod().
const pod_type & pod() const
The "plain old data" storage of this; the value in the external id space.
virtual const abstract_product_structure & product_structure() const =0
The product structure for this id space (const version).
virtual bool conforms_to(const schema_poset_member &xother, bool xis_table_dofs) const
True if this schema contains all the table dofs (xis_table_dofs true) or row dofs (xis_is_table_dofs ...
An abstract iterator over the ids of an id space.
schema_poset_member & fiber_schema()
The fiber schema component of this (mutable version).
virtual subposet * up() const
The up set of this member, auto- and pre-allocated versions.
poset_path path(bool xauto_access=true) const
A path to this component.
pod_type pod() const
The current id in the iteration.
The default name space; a poset which contains other posets as members.
virtual ~section_space_schema_member()
Destructor; deletes a poset member and its attached state, if any.
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 size_t size() const =0
The number of bytes in this dof.
bool is_persistent(const std::string &xname) const
True if the id space with name xname should be written to disk.
virtual void p_join_pa(abstract_poset_member *other, abstract_poset_member *result) const
Poset join of this with other, pre-allocated. The poset join is the least upper bound in the poset...
subposet & evaluation()
The evaluation subposet for section spaces on this schema (mutable version).
bool contains_poset_member(pod_index_type xposet_hub_id, pod_index_type xmember_hub_id, bool xauto_access=true) const
True if this contains a poset with hub id xposet_hub_id which contains a member with hub id xmember_h...
A client handle for a general, abstract partially order set.
Iterates in postorder over dofs of a schema member anchor. Attaches an a handle of type section_space...
index_space_handle & get_id_space(const std::string &xname) const
Allocates an id space handle from the handle pool attached to state with name xname.
virtual void update_row_cache(bool xupdate_id_space=false) const
Updates cached row properties.
A path defined by a poset name and a member name separated by a forward slash ('/'). For example: "cell_definitions/triangle".
const index_space_family & member_id_spaces(bool xauto_access) const
Collection of member id spaces for this (const version).
void clear()
Delete all ids.
bool is_multivalued() const
Switch that tells the user if the multivalued subposet exists.
int up_ct() const
The number of members in the up set of this member.
virtual bool contains_member(pod_index_type xmbr_hub_id) const
True if this poset contains poset member with hub id xmbr_hub_id.
bool is_same_state(const poset_state_handle *xhost, pod_index_type xhub_id) const
True is this is attached to state with hub id xhub_id in host xhost.
Specialization of the filtered depth-first iterator which exposes the POSTVISIT_ACTION to the client...
An abstract handle to a space of alternate integer identifiers (aliases) for a subset of a hub set of...
virtual sheaf::primitive_type type() const =0
The primitive type index of the dof defined by this.
virtual void update_table_cache() const
Updates cached table properties.
virtual void make_schema_info(bool xis_table_dof)
Makes the table or row dof subposets, client id maps, and other schema info for this. /.
virtual bool host_is_ancestor_of(const poset_state_handle *other) const
True if other conforms to host.
virtual void get_read_access() const
Get read access to the state associated with this.
poset_state_handle & member_poset(pod_index_type xhub_id, bool xauto_access=true) const
The poset_state_handle object referred to by hub id xhub_id.
virtual index_space_handle & get_id_space() const =0
Allocates an id space handle from the handle pool attached to the same id space.
const scoped_index & index() const
The index of the component state this handle is attached to.
virtual void next()=0
Makes id() the next id in the iteration.
std::string name() const
A name for this.
virtual subposet * maximal_jims()
The maximal members of the set of jims contained in this member, auto-allocated.
int db
The base space dimension.
virtual section_dof_iterator * dof_iterator(bool xis_table_dofs, int xversion=CURRENT_MEMBER_VERSION) const
A postorder iterator over the table (xis_table_dofs == true) or row (xis_table_dofs == false) dofs de...
static const std::string & static_class_name()
The name of this class.
virtual int jim_ct() const
The number of members in the set of jims contained in the down set of this member.
virtual void up_pa(subposet *result) const
The up set of this member, auto- and pre-allocated versions.
virtual subposet * down() const
The down set of this member, auto- and pre-allocated versions.
const scoped_index & index() const
The index of the current member of the iteration.
bool same_scope(const scoped_index &xother) const
True if and only if this is in the same id space as xother.
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 size_t alignment() const =0
The alignment for this dof.
Abstract base class with useful features for all objects.
pod_index_type fiber_schema_id() const
The member id of the fiber schema component of this.
The lattice of closed cells of a cellular space; a lattice representation of a computational mesh...
virtual section_space_schema_member & operator=(const abstract_poset_member &xother)
Assignment operator; attaches this to the same state as xother.
const bool NOT_STRICT
Iteration strictness control.
const bool DOWN
Iteration directions.
bool is_done() const
True if iteration is finished.
virtual section_component_iterator * component_iterator() const
A postorder iterator over the components defined by this.
bool same_base_space(const section_space_schema_member &xother) const
True if this has the same base as xother.
primitive_type
Type ids for sheaf primitives.
virtual index_space_handle & get_id_space() const
Allocates an id space handle from the handle pool.
virtual void attach_handle_data_members()
Initializes the handle data members when this handle is attached to a state.
A client handle for a mutable partially ordered set.
bool state_is_read_write_accessible() const
True if this is attached and if the state is accessible for read and write or access control is disab...
virtual bool invariant() const
Class invariant.
virtual pod_index_type get_ext_id(const std::string &xid_space_name) const
Gets an external id corresponding to index() in the id space with name xid_space_name. /.
virtual void detach_from_state()
Detach this handle from its state, if any.
An index within the external ("client") scope of a given id space.
virtual bool is_attached() const
True if this handle is attached to a non-void state.
An array implementation of class scattered_insertion_index_space_handle. This representation is inten...
virtual void get_read_access() const
Get read access to the state associated with this.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
virtual int maximal_jim_ct() const
The number of maximal members in the set of jims contained in the down set of this member...
static std::string intersection_id_space_name(const subposet &xsp, const pod_index_type xhub_id)
The name of the id space for intersection of xsp with the down set of the member with hub id xhub_id...
Iterates in postorder over components of a section_space_schema_member anchor. The components of a se...
virtual bool contains_member(pod_index_type xmbr_hub_id, bool xauto_access=true) const
True if some version of this poset contains poset member with hub id xmbr_hub_id. ...
bool same_fiber_schema(const section_space_schema_member &xother) const
True if this has the same fiber schema as xother.
std::string name(pod_index_type xdof_id, bool xis_table_dof) const
The name of the table dof (xis_table_dof true) or row dof referred to by xdof_id in the schema define...
int db(pod_index_type xmbr_hub_id) const
The base space dimension of the member with hub id xmbr_hub_id.
void reserve(size_type xcapacity)
Reserve enough memory for xcapacity number of ids.
void insert(pod_type xid, const scoped_index &xhub_id)
Make id xid in this id space equivalent to xhub_id in the hub id space. synonym for insert(xid...
virtual bool is_ancestor_of(const any *other) const
True if other conforms to this.
int discretization_ct() const
The number of members in the intersection of the discretization subposet and the down set of the base...
void put(const index_space_handle &xid_space, pod_type xpod)
Set the scope to id space, xid_space and pod() to xpod.
void update_row_dof_id_space() const
Updates _row_dof_id_space.
std::string evaluator_family_name() const
The name of the evaluator family for section spaces on schemae hosted by this.
subposet & discretization()
The discretization subposet for section spaces on this schema (mutable version).
virtual std::string name() const
The name of this poset.
void disable_invariant_check() const
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing inv...
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...
section_space_schema_member()
Default constructor; creates a new, unattached section_space_schema_member handle. Intended for use only by descendants.
virtual pod_type pod(pod_type xid) const =0
The pod index in this space equivalent to xid in the hub id space.
bool contains_poset(pod_index_type xhub_id, bool xauto_access=true) const
True if this contains a poset with hub id xhub_id..
bool same_discretization(const section_space_schema_member &xother) const
True if this has the same discretization as xother.
virtual void to_stream(std::ostream &xos=std::cout) const
Virtual stream insertion.
void update_row_cache_with_disc_id_space() const
Updates row cache including _discretization_id_space.
virtual void put_version(int xversion, bool xunalias=false)
Sets version to (possibly aliased) xversion. If unalias == true, set version to the actual version al...
bool contains_dof(const schema_poset_member &xother, bool xin_table_dofs) const
True if xother is a dof in the table dofs part (xin_table_dofs == true) or in the row dofs part (xin_...
const scattered_insertion_index_space_handle & id_space() const
The id space for the members of with this (const version).
virtual bool invariant() const
Class invariant.
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...
void next()
Makes this the next member of the subset.
size_type fiber_size() const
The number of bytes in the fiber.
const index_space_handle & fiber_schema_id_space(bool xis_table_dofs) const
The id space for the dofs in the down set of the fiber schema of this.
virtual bool is_ancestor_of(const any *other) const
True if other conforms to this.
An abstract schema poset for a section space. A Cartesian product subspace of the tensor product of a...
virtual void detach_from_state()
Detach this handle from its state, if any.
total_poset_member & base_space()
The base space component of this (mutable version).
poset_state_handle & fiber_schema()
The fiber schema for section spaces on this schema (mutable version).
const index_space_handle & discretization_id_space() const
The id space for the discretization members in the down set of the base space of this (const version)...
size_type component_size(pod_index_type xfiber_dof_id) const
The number of bytes in the component referred to by xfiber_dof_id.
int_type pod_index_type
The plain old data index type.
void update_row_cache_without_disc_id_space() const
Updates row cache using existing _discretization_id_space.
A 2D implementation of abstract_product_structure.
poset & fiber_space()
The fiber space for section spaces on this schema (mutable version).
bool same_rep(const section_space_schema_member &xother) const
True if this has the same rep as xother.
int evaluation_ct() const
The number of members in the intersection of the evaluation subposet and the down set of the base spa...
A handle for a scattered_insertion_index_space_state.
A client handle for a poset member which has been prepared for use as a schema for a section space...
bool contains(pod_type xid) const
True, if this contains an id space with id xid.
int db() const
The dimension of the base space component.
virtual subposet & jims()
The subset of all jims (mutable version)
bool same_evaluation(const section_space_schema_member &xother) const
True if this has the same evaluation as xother.
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_...
int df() const
The dimension of the fiber space component.
static std::string standard_member_name(const std::string &xfiber_schema_member_name, const std::string &xbase_member_name)
The standard member name for a schema with fiber schema member with name xfiber_schema_member_name an...
virtual void down_pa(subposet *result) const
The down set of this member, auto- and pre-allocated versions.
void tuple(pod_index_type x, size_type xj_ub, pod_index_type &xi, pod_index_type &xj)
Ordinal to 2-tuple conversion.
virtual void get_read_access() const
Get read access to the state associated with this.
An abstract client handle for a member of a poset.
sec_rep_descriptor & rep()
The representation for section spaces on this schema (mutable version).
size_type ct(const std::string &xname) const
The number of members for the id space with name xname.
virtual void p_meet_pa(abstract_poset_member *other, abstract_poset_member *result)
Poset meet of this with other, pre-allocated version. The poset meet is the greatest lower bound in t...
row_dof_tuple_type * member_dof_tuple(pod_index_type xmbr_hub_id, bool xrequire_write_access=false) const
The row dof tuple for the member with member hub id xmbr_hub_id.
virtual schema_poset_member & unrestricted_schema()
The unrestricted schema for this poset member (mutable version).
virtual schema_poset_member & schema()
The schema for this member (mutable version).
static bool fiber_schema_conforms_to(const namespace_poset &xns, const poset_path &xpath, const poset_path &xfiber_schema_path, bool xauto_access=true)
True if the fiber schema associated with xpath conforms to xfiber_schema_path.
virtual subposet * jims()
The set of jims contained in the down set of this member, auto-allocated.
SHEAF_DLL_SPEC bool is_valid(pod_index_type xpod_index)
True if an only if xpod_index is valid.
Namespace for the fiber_bundles component of the sheaf system.
SHEAF_DLL_SPEC pod_index_type invalid_pod_index()
The invalid pod index value.
virtual void attach_to_state(pod_index_type xbase_space_id, pod_index_type xfiber_schema_id)=0
Attach to the state in host() with component ids xbase_id and xfiber_schema_id.
void enable_invariant_check() const
Enable invariant checking.
static const poset_path & standard_schema_path()
The path of the schema required by this class.
A client handle for a poset member which has been prepared for use as a schema.
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...
pod_type hub_pod() const
The current unglued hub id in the iteration. synonym for unglued_hub_pod().
A client handle for an unrestricted member of a poset. A total_poset_member is guaranteed not to be r...
virtual size_type offset(pod_index_type xdof_id, bool xis_table_dof) const
The offset for the table dof (xis_table_dof true) or row dof referred to by xdof_id in the schema def...
static void make_standard_schema(namespace_poset &xns)
Creates the standard schema for this class in namespace xns.
SHEAF_DLL_SPEC std::ostream & operator<<(std::ostream &os, const binary_index &xbi)
Insert binary_index& xbi into ostream& os.
base_space_poset & base_space()
The base space for section spaces on this schema.
subposet & multivalued()
The multivalued subposet for section spaces on this schema (mutable version).
A description for a section representation scheme.
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.
pod_index_type base_space_id() const
The member id of the base space component of this.