21 #include "SheafSystem/base_space_poset.h" 23 #include "SheafSystem/array_index_space_state.h" 24 #include "SheafSystem/array_poset_dof_map.h" 25 #include "SheafSystem/base_space_member.h" 26 #include "SheafSystem/index_space_handle.h" 27 #include "SheafSystem/index_space_iterator.h" 28 #include "SheafSystem/interval_index_space_state.h" 29 #include "SheafSystem/namespace_poset.impl.h" 30 #include "SheafSystem/namespace_poset_member.h" 31 #include "SheafSystem/poset_handle_factory.h" 32 #include "SheafSystem/poset_type.h" 33 #include "SheafSystem/preorder_iterator.h" 34 #include "SheafSystem/std_sstream.h" 35 #include "SheafSystem/zone_nodes_block_crg_interval.h" 55 static const poset_path& result = base_space_member::standard_schema_path();
59 ensure(result.
full());
76 require(!xpath.
empty());
79 require(xschema_path.
full());
81 require(unexecutable(
"xschema_path conforms to standard_schema_path"));
84 require(xmax_db >= 0);
92 table_type* ltable =
new table_type();
107 lmap->
put_dof(
"max_db", xmax_db);
111 ltable->new_state(xns, xpath, lschema, *lmap);
122 ensure(xns.
owns(result, xauto_access));
123 ensure(result.
path(
true) == xpath);
125 ensure(result.
schema(
true).
path(xauto_access) == xschema_path);
127 ensure(result.
max_db() == xmax_db);
148 ensure(postcondition_of(refinable_poset::refinable_poset()));
168 fiber_bundle::base_space_poset::
203 require(state_is_auto_read_accessible(xauto_access));
204 require(contains_member(xmbr_id, xauto_access));
225 ensure(is_basic_query);
238 require(state_is_auto_read_accessible(xauto_access));
239 require(contains_member(xmbr_id, xauto_access));
243 bool result = contains_zone_id_space(xmbr_id.
hub_pod(), xauto_access);
247 ensure(is_basic_query);
260 require(state_is_auto_read_accessible(xauto_access));
261 require(contains_member(xmbr_id, xauto_access));
262 require(contains_zone_id_space(xmbr_id, xauto_access));
284 ensure(member_id_spaces(xauto_access).allocated_id_space(result));
297 require(state_is_auto_read_accessible(xauto_access));
298 require(contains_member(xmbr_id, xauto_access));
299 require(contains_zone_id_space(xmbr_id, xauto_access));
308 ensure(member_id_spaces(xauto_access).allocated_id_space(result));
321 require(state_is_auto_read_accessible(xauto_access));
322 require(member_id_spaces(xauto_access).allocated_id_space(xid_space));
331 crg().id_spaces().release_id_space(xid_space);
353 require(state_is_auto_read_accessible(xauto_access));
354 require(contains_member(xmbr_id, xauto_access));
355 require(contains_zone_id_space(xmbr_id, xauto_access));
377 ensure(member_id_spaces(xauto_access).allocated_id_space_iterator(result));
390 require(state_is_auto_read_accessible(xauto_access));
391 require(contains_member(xmbr_id, xauto_access));
392 require(contains_zone_id_space(xmbr_id, xauto_access));
401 ensure(member_id_spaces(xauto_access).allocated_id_space_iterator(result));
414 require(state_is_auto_read_accessible(xauto_access));
415 require(member_id_spaces(xauto_access).allocated_id_space_iterator(xitr));
424 crg().id_spaces().release_id_space_iterator(xitr);
457 require(state_is_auto_read_accessible(xauto_access));
458 require(contains_member(xmbr_id, xauto_access));
479 ensure(is_basic_query);
492 require(state_is_auto_read_accessible(xauto_access));
493 require(contains_member(xmbr_id, xauto_access));
497 bool result = contains_vertex_id_space(xmbr_id.
hub_pod(), xauto_access);
501 ensure(is_basic_query);
514 require(state_is_auto_read_accessible(xauto_access));
515 require(contains_member(xmbr_id, xauto_access));
516 require(contains_vertex_id_space(xmbr_id, xauto_access));
538 ensure(member_id_spaces(xauto_access).allocated_id_space(result));
551 require(state_is_auto_read_accessible(xauto_access));
552 require(contains_member(xmbr_id, xauto_access));
553 require(contains_vertex_id_space(xmbr_id, xauto_access));
562 ensure(member_id_spaces(xauto_access).allocated_id_space(result));
575 require(state_is_auto_read_accessible(xauto_access));
576 require(member_id_spaces(xauto_access).allocated_id_space(xid_space));
585 crg().id_spaces().release_id_space(xid_space);
607 require(state_is_auto_read_accessible(xauto_access));
608 require(contains_member(xmbr_id, xauto_access));
609 require(contains_vertex_id_space(xmbr_id, xauto_access));
631 ensure(member_id_spaces(xauto_access).allocated_id_space_iterator(result));
644 require(state_is_auto_read_accessible(xauto_access));
645 require(contains_member(xmbr_id, xauto_access));
646 require(contains_vertex_id_space(xmbr_id, xauto_access));
655 ensure(member_id_spaces(xauto_access).allocated_id_space_iterator(result));
668 require(state_is_auto_read_accessible(xauto_access));
669 require(member_id_spaces(xauto_access).allocated_id_space_iterator(xitr));
678 crg().id_spaces().release_id_space_iterator(xitr);
711 require(state_is_auto_read_accessible(xauto_access));
712 require(contains_member(xmbr_id, xauto_access));
733 ensure(is_basic_query);
746 require(state_is_auto_read_accessible(xauto_access));
747 require(contains_member(xmbr_id, xauto_access));
751 bool result = contains_vertex_client_id_space(xmbr_id.
hub_pod(), xauto_access);
755 ensure(is_basic_query);
768 require(state_is_auto_read_accessible(xauto_access));
769 require(contains_member(xmbr_id, xauto_access));
770 require(contains_vertex_client_id_space(xmbr_id, xauto_access));
792 ensure(member_id_spaces(xauto_access).allocated_id_space(result));
805 require(state_is_auto_read_accessible(xauto_access));
806 require(contains_member(xmbr_id, xauto_access));
807 require(contains_vertex_client_id_space(xmbr_id, xauto_access));
816 ensure(member_id_spaces(xauto_access).allocated_id_space(result));
829 require(state_is_auto_read_accessible(xauto_access));
830 require(member_id_spaces(xauto_access).allocated_id_space(xid_space));
839 crg().id_spaces().release_id_space(xid_space);
861 require(state_is_auto_read_accessible(xauto_access));
862 require(contains_member(xmbr_id, xauto_access));
863 require(contains_vertex_client_id_space(xmbr_id, xauto_access));
885 ensure(member_id_spaces(xauto_access).allocated_id_space_iterator(result));
898 require(state_is_auto_read_accessible(xauto_access));
899 require(contains_member(xmbr_id, xauto_access));
900 require(contains_vertex_client_id_space(xmbr_id, xauto_access));
909 ensure(member_id_spaces(xauto_access).allocated_id_space_iterator(result));
922 require(state_is_auto_read_accessible(xauto_access));
923 require(member_id_spaces(xauto_access).allocated_id_space_iterator(xitr));
932 crg().id_spaces().release_id_space_iterator(xitr);
966 require(state_is_auto_read_accessible(xauto_access));
967 require(contains_member(xzone_id, xauto_access));
990 ensure(is_basic_query);
1003 require(state_is_auto_read_accessible(xauto_access));
1004 require(contains_member(xzone_id, xauto_access));
1008 bool result = contains_connectivity_id_space(xzone_id.
hub_pod(), xauto_access);
1012 ensure(is_basic_query);
1025 require(state_is_auto_read_accessible(xauto_access));
1026 require(contains_member(xzone_id, xauto_access));
1027 require(contains_connectivity_id_space(xzone_id, xauto_access));
1050 ensure(member_id_spaces(xauto_access).allocated_id_space(result));
1063 require(state_is_auto_read_accessible(xauto_access));
1064 require(contains_member(xzone_id, xauto_access));
1065 require(contains_connectivity_id_space(xzone_id, xauto_access));
1074 ensure(member_id_spaces(xauto_access).allocated_id_space(result));
1087 require(state_is_auto_read_accessible(xauto_access));
1088 require(member_id_spaces(xauto_access).allocated_id_space(xid_space));
1097 crg().id_spaces().release_id_space(xid_space);
1119 require(state_is_auto_read_accessible(xauto_access));
1120 require(contains_member(xzone_id, xauto_access));
1121 require(contains_connectivity_id_space(xzone_id, xauto_access));
1144 ensure(member_id_spaces(xauto_access).allocated_id_space_iterator(result));
1157 require(state_is_auto_read_accessible(xauto_access));
1158 require(contains_member(xzone_id, xauto_access));
1159 require(contains_connectivity_id_space(xzone_id, xauto_access));
1168 ensure(member_id_spaces(xauto_access).allocated_id_space_iterator(result));
1181 require(state_is_auto_read_accessible(xauto_access));
1182 require(member_id_spaces(xauto_access).allocated_id_space_iterator(xitr));
1191 crg().id_spaces().release_id_space_iterator(xitr);
1224 require(state_is_auto_read_accessible(xauto_access));
1225 require(contains_member(xvertex_id, xauto_access));
1248 ensure(is_basic_query);
1261 require(state_is_auto_read_accessible(xauto_access));
1262 require(contains_member(xvertex_id, xauto_access));
1266 bool result = contains_adjacency_id_space(xvertex_id.
hub_pod(), xauto_access);
1270 ensure(is_basic_query);
1283 require(state_is_auto_read_accessible(xauto_access));
1284 require(contains_member(xvertex_id, xauto_access));
1285 require(contains_adjacency_id_space(xvertex_id, xauto_access));
1308 ensure(member_id_spaces(xauto_access).allocated_id_space(result));
1321 require(state_is_auto_read_accessible(xauto_access));
1322 require(contains_member(xvertex_id, xauto_access));
1323 require(contains_adjacency_id_space(xvertex_id, xauto_access));
1332 ensure(member_id_spaces(xauto_access).allocated_id_space(result));
1345 require(state_is_auto_read_accessible(xauto_access));
1346 require(member_id_spaces(xauto_access).allocated_id_space(xid_space));
1355 crg().id_spaces().release_id_space(xid_space);
1377 require(state_is_auto_read_accessible(xauto_access));
1378 require(contains_member(xvertex_id, xauto_access));
1379 require(contains_adjacency_id_space(xvertex_id, xauto_access));
1402 ensure(member_id_spaces(xauto_access).allocated_id_space_iterator(result));
1415 require(state_is_auto_read_accessible(xauto_access));
1416 require(contains_member(xvertex_id, xauto_access));
1417 require(contains_adjacency_id_space(xvertex_id, xauto_access));
1426 ensure(member_id_spaces(xauto_access).allocated_id_space_iterator(result));
1439 require(state_is_auto_read_accessible(xauto_access));
1440 require(member_id_spaces(xauto_access).allocated_id_space_iterator(xitr));
1449 crg().id_spaces().release_id_space_iterator(xitr);
1485 const string& result = base_space_member::prototypes_poset_name();
1489 ensure(result == base_space_member::prototypes_poset_name());
1503 require(xauto_access ? is_attached() : state_is_read_accessible());
1504 require(xauto_access || name_space()->state_is_read_accessible());
1505 require(xauto_access || name_space()->member_poset(prototypes_poset_name(),
true).state_is_read_accessible());
1506 require(name_space()->contains_poset_member(prototypes_poset_name()+
"/"+xname,
true));
1507 require(unexecutable(
"!xauto_access ? prototypes poset is read accessible : true"));
1515 name_space()->get_read_access();
1519 name_space()->member_poset(prototypes_poset_name(),
false);
1533 name_space()->release_access();
1549 bool xauto_access)
const 1553 require(is_attached());
1554 require(xauto_access || (xcreate ? state_is_read_write_accessible() : state_is_read_accessible()));
1567 size_type ltuple_ct = row_dof_tuple_ct();
1568 for(
pod_index_type ltuple_id = 0; ltuple_id < ltuple_ct; ++ltuple_id)
1573 result = dof_tuple_id(ltuple_id,
false);
1583 row_dof_tuple(result,
true)->refinement_depth = xdepth;
1593 ensure(!result.
is_valid() || contains_row_dof_tuple(result));
1594 ensure(!result.
is_valid() || (xname == row_dof_tuple(result)->type_name));
1595 ensure(!result.
is_valid() || (xdepth == row_dof_tuple(result)->refinement_depth));
1626 return BASE_SPACE_POSET_ID;
1637 static const char* result =
"base_space_poset";
1654 require(state_is_read_accessible());
1658 refinable_poset::attach_handle_data_members();
1662 _blocks.attach_to_state(
this, blocks_name());
1663 _block_vertices.attach_to_state(
this, block_vertices_name());
1665 int lmax_db = max_db();
1666 _d_cells.reserve(lmax_db+1);
1667 _d_cells.set_ct(lmax_db+1);
1669 _d_cells_id_spaces.reserve(lmax_db+1);
1670 _d_cells_id_spaces.set_ct(lmax_db+1);
1672 for(
int i=0; i<=lmax_db; i++)
1674 _d_cells[i].attach_to_state(
this, d_cells_name(i, lmax_db));
1675 _d_cells_id_spaces[i] = &_d_cells[i].id_space();
1678 _cells.attach_to_state(
this, cells_name());
1697 new_member(
const std::string& xprototype_name,
bool xcopy_dof_map)
1703 require(in_jim_edit_mode());
1704 require(name_space()->state_is_read_accessible());
1705 require(name_space()->member_poset(prototypes_poset_name(),
false).state_is_read_accessible());
1706 require(!xprototype_name.empty());
1707 require(name_space()->contains_poset_member(
poset_path(prototypes_poset_name(), xprototype_name),
false));
1715 ltuple_id = new_row_dof_map(xprototype_name);
1719 ltuple_id = prototype_dof_tuple_id(xprototype_name, 0,
true,
false);
1726 ensure(invariant());
1727 ensure(contains_member(result,
false));
1728 ensure(type_name(result) == xprototype_name);
1729 ensure(cover_is_empty(
LOWER, result));
1730 ensure(cover_is_empty(
UPPER, result));
1746 require(precondition_of(new_member(
string(xprototype_name), xcopy_dof_map)));
1750 string lprotoname(xprototype_name);
1756 ensure(postcondition_of(new_member(
string(xprototype_name), xcopy_dof_map)));
1766 new_member(
const std::string& xtype_name,
int xdb,
const std::string& xlocal_cell_name)
1772 require(in_jim_edit_mode());
1773 require(name_space()->state_is_read_accessible());
1774 require(poset_path::is_valid_name(xtype_name));
1775 require(!contains_member(xtype_name,
true));
1776 require(member_id_spaces(
false).contains(
"cell_types"));
1777 require(xlocal_cell_name.empty() || contains_member(xlocal_cell_name));
1787 put_member_name(result, xtype_name,
true,
false);
1804 ltuple->
type_id = ltype_id_space.
pod(result);
1812 ltuple->
type_name = strdup(xtype_name.c_str());
1820 if(xlocal_cell_name.empty())
1848 ensure(invariant());
1849 ensure(contains_member(result,
false));
1850 ensure(member_name(result,
false) == xtype_name);
1851 ensure(db(result) == xdb);
1852 ensure(type_name(result) == xtype_name);
1853 ensure(unexecutable(
"local_cell_type_name(result) == xlocal_cell_name"));
1854 ensure(cover_is_empty(
LOWER, result));
1855 ensure(cover_is_empty(
UPPER, result));
1917 string result = poset_path::reserved_prefix() +
"blocks";
1934 subposet& result = _block_vertices;
1951 const subposet& result = _block_vertices;
1969 string result = poset_path::reserved_prefix() +
"block_vertices";
2020 subposet& result = _d_cells[max_db()];
2037 subposet& result = _d_cells[max_db()];
2052 require(state_is_read_accessible());
2053 require((0 <= xd) && (xd <= max_db()));
2072 require(state_is_read_accessible());
2073 require((0 <= xd) && (xd <= max_db()));
2092 require(state_is_read_accessible());
2093 require((0 <= xd) && (xd <= max_db()));
2114 require(state_is_read_accessible());
2115 require((0 <= xd) && (xd <= max_db()));
2142 result = poset_path::reserved_prefix() +
"vertices";
2144 else if(xdb == xmax_db)
2146 result = poset_path::reserved_prefix() +
"elements";
2150 stringstream lsp_name_stream;
2151 lsp_name_stream << poset_path::reserved_prefix() << xdb <<
"_cells";
2152 lsp_name_stream >> result;
2157 ensure(!result.empty());
2207 string result = poset_path::reserved_prefix() +
"cells";
2222 require(state_is_read_write_accessible());
2242 int ldb = xinterval.
db(i);
2243 d_cells(ldb).insert_member(i);
2247 cells().insert_member(i);
2252 for(
int i = 0; i <= max_db(); ++i)
2258 pod_index_type lbegin = member_id_spaces(
false).hub_begin(lspace_id);
2259 pod_index_type lend = lbegin + member_id_spaces(
false).ct(lspace_id) - 1;
2262 (d_cells_id_space(i)).push_interval(lbegin, lend);
2269 (cells().id_space()).push_interval(xinterval.
cells_begin(),
2280 block_vertices().insert_member(lvertex_itr.
hub_pod());
2284 member_id_spaces(
false).release_id_space_iterator(lvertex_itr);
2301 require(poset_path::is_valid_name(xname));
2302 require(state_is_read_write_accessible());
2308 refinable_poset::initialize_standard_subposets(xname);
2314 _blocks.new_state(
this);
2315 lsp_name = blocks_name();
2316 _blocks.put_name(lsp_name,
true,
false);
2317 _blocks.new_id_space(
"array_index_space_state");
2318 _blocks.put_is_persistent(
false);
2322 _block_vertices.new_state(
this);
2323 lsp_name = block_vertices_name();
2324 _block_vertices.put_name(lsp_name,
true,
false);
2325 _block_vertices.new_id_space(
"array_index_space_state");
2326 _block_vertices.put_is_persistent(
false);
2330 int lmax_db = max_db();
2331 _d_cells.reserve(lmax_db + 1);
2332 _d_cells_id_spaces.reserve(lmax_db + 1);
2334 for(
int i=0; i<=lmax_db; i++)
2336 _d_cells[i].new_state(
this);
2337 lsp_name = d_cells_name(i, lmax_db);
2338 _d_cells[i].put_name(lsp_name,
true,
false);
2339 _d_cells[i].new_id_space(
"interval_index_space_state");
2340 _d_cells_id_spaces[i] = &_d_cells[i].id_space();
2341 _d_cells[i].put_is_persistent(
false);
2346 _cells.new_state(
this);
2347 lsp_name = cells_name();
2348 _cells.put_name(lsp_name,
true,
false);
2349 _cells.new_id_space(
"interval_index_space_state");
2350 _cells.put_is_persistent(
false);
2361 ensure(state_obj()->powerset()->invariant());
2362 ensure(jims().is_attached());
2363 ensure(whole().is_attached());
2364 ensure(resident().is_attached() && resident().index() == RESIDENT_INDEX);
2366 ensure(includes_subposet(blocks_name()));
2367 ensure(includes_subposet(block_vertices_name()));
2368 ensure_for_all(i, 0, max_db(), includes_subposet(d_cells_name(i, max_db())));
2369 ensure(includes_subposet(
"__cells"));
2393 require(state_is_read_accessible());
2397 result = table_dof_tuple()->max_db;
2412 require(state_is_read_write_accessible());
2416 table_dof_tuple()->max_db = xmax_db;
2420 ensure(max_db() == xmax_db);
2433 require(state_is_read_write_accessible());
2437 define_old_variable(
int old_max_db = max_db());
2439 if(xmax_db > max_db())
2441 table_dof_tuple()->max_db = xmax_db;
2446 ensure(max_db() == ((xmax_db > old_max_db) ? xmax_db : old_max_db));
2515 require(state_is_read_accessible());
2516 require(contains_member(xhub_id,
false));
2520 if(is_jim(xhub_id,
false))
2524 result = member_dof_tuple(xhub_id)->db;
2533 int lmbr_dim = db(litr.
hub_pod());
2534 result = lmbr_dim > result ? lmbr_dim : result;
2537 release_cover_id_space_iterator(litr);
2542 ensure(result >= -1);
2543 ensure( (result == -1) == is_jem(xhub_id, bottom().index().pod()) );
2558 require(state_is_read_accessible());
2559 require(contains_member(xid,
false));
2567 ensure(result >= -1);
2568 ensure( (result == -1) == is_jem(xid, bottom().index()) );
2581 require(state_is_read_accessible());
2582 require(is_jim(xhub_id,
false));
2601 require(state_is_read_accessible());
2602 require(is_jim(xid,
false));
2606 return type_id(xid.
hub_pod());
2615 require(state_is_read_accessible());
2616 require(is_jim(xhub_id,
false));
2620 string result(member_dof_tuple(xhub_id)->type_name);
2624 ensure(!result.empty());
2637 require(state_is_read_accessible());
2638 require(is_jim(xid,
false));
2642 string result = type_name(xid.
hub_pod());
2646 ensure(!result.empty());
2659 require(state_is_read_accessible());
2660 require(is_jim(xhub_id,
false));
2664 int result = member_dof_tuple(xhub_id)->refinement_depth;
2679 require(state_is_read_accessible());
2680 require(is_jim(xid,
false));
2684 return refinement_depth(xid.
hub_pod());
2693 require(state_is_read_write_accessible());
2694 require(is_jim(xhub_id,
false));
2698 member_dof_tuple(xhub_id)->refinement_depth = xdepth;
2702 ensure(refinement_depth(xhub_id) == xdepth);
2715 require(state_is_read_write_accessible());
2716 require(is_jim(xid,
false));
2720 put_refinement_depth(xid.
hub_pod(), xdepth);
2724 ensure(refinement_depth(xid) == xdepth);
2739 require(xrequire_write_access ?
2740 state_is_read_write_accessible() :
2741 state_is_read_accessible());
2742 require(contains_member(xhub_id));
2743 require(is_jim(xhub_id,
false));
2747 result = row_dof_tuple(member_dof_tuple_id(xhub_id,
false),
2748 xrequire_write_access);
2752 ensure(result != 0);
2767 require(xrequire_write_access ?
2768 state_is_read_write_accessible() :
2769 state_is_read_accessible());
2770 require(contains_member(xid));
2771 require(is_jim(xid,
false));
2775 result = member_dof_tuple(xid.
hub_pod(), xrequire_write_access);
2779 ensure(result != 0);
2794 require(xrequire_write_access ?
2795 state_is_read_write_accessible() :
2796 state_is_read_accessible());
2797 require(contains_row_dof_tuple(xtuple_hub_id));
2801 poset_dof_map& ldof_map = row_dof_map(xtuple_hub_id, xrequire_write_access);
2806 ensure(result != 0);
2821 require(xrequire_write_access ?
2822 state_is_read_write_accessible() :
2823 state_is_read_accessible());
2824 require(contains_row_dof_tuple(xtuple_id));
2828 result = row_dof_tuple(xtuple_id.
hub_pod(), xrequire_write_access);
2832 ensure(result != 0);
2845 require(state_is_read_write_accessible());
2846 require(name_space()->member_poset(prototypes_poset_name()).state_is_auto_read_accessible(
true));
2847 require(name_space()->contains_poset_member(prototypes_poset_name()+
"/"+xprototype_name,
false));
2851 define_old_variable(
int old_row_dof_tuple_ct = row_dof_tuple_ct());
2860 poset_path lproto_path(prototypes_poset_name(), xprototype_name);
2867 ltuple->
db = lproto_tuple->
db;
2884 ensure(row_dof_tuple_ct() == old_row_dof_tuple_ct+1);
2885 ensure(contains_row_dof_tuple(result));
2911 bool result = crg().contains_explicit_member(xmbr_id);
2976 if(invariant_check())
2978 disable_invariant_check();
2980 invariance(refinable_poset::invariant());
2985 enable_invariant_check();
3007 ensure(result != 0);
3008 ensure(is_same_type(result));
3034 result = xinclude_shallow ?
sizeof(xp) : 0;
3041 result += deep_size(lxp,
false, xresults);
3055 ensure(result >= 0);
An implementation of class scattered_insertion_index_space_handle that has a interval id space state...
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 release_vertex_id_space_iterator(index_space_iterator &xitr, bool xauto_access) const
Returns the iterator to the vertex id space, xitr to the pool of id space iterators.
virtual const char * class_name() const
The name of this class.
virtual void initialize_standard_subposets(const std::string &xname)
Creates the subposets common to every poset (i.e._whole and _jims).
virtual poset_path path(bool xauto_access=true) const
The path of this poset.
bool state_is_auto_read_write_accessible(bool xauto_access) const
True if state is auto accessible for read and write, that is, if the state is already accessible for ...
virtual ~base_space_poset()
Destructor.
A client handle for a subposet.
bool is_valid() const
True if this is a valid id.
pod_index_type vertices_space_id() const
The index of the vertex id space.
bool full() const
True if both poset name and member name are not empty.
pod_index_type vertex_client_space_id() const
The index of the vertex client id space.
const pod_type & pod() const
The "plain old data" storage of this; the value in the external id space.
An abstract iterator over the ids of an id space.
size_type size
The number of local cells.
std::string type_name(pod_index_type xmbr_hub_id) const
The type id of the member with hub id xmbr_hub_id.
poset_path path(bool xauto_access=true) const
A path to this component.
row_dof_tuple_type * row_dof_tuple(pod_index_type xtuple_hub_id, bool xrequire_write_access=false) const
The row dof tuple with tuple hub id xtuple_hub_id.
The default name space; a poset which contains other posets as members.
int local_cell_type_id
The local cell type id.
int refinement_depth(pod_index_type xmbr_hub_id) const
The refinement depth of the member with hub id xmbr_hub_id.
index_space_iterator & get_vertex_id_space_iterator(pod_index_type xmbr_id, bool xauto_access) const
Allocates an vertex id space iterator for the block containing the member with index xmbr_id for the ...
bool state_is_read_accessible() const
True if this is attached and if the state is accessible for read or access control is disabled...
The type of table dof tuple for base_space_poset.
bool contains_vertex_client_id_space(pod_index_type xmbr_id, bool xauto_access) const
True, if and only if the block containing the member with index xmbr_id has a vertex client id space...
subposet & d_cells(int xd)
The subposet containing the cells of dimension xd (mutable version).
subposet & blocks()
The subposet containing all the blocks, const ver (mutable version).
bool path_is_auto_read_accessible(const poset_path &xpath, bool xauto_access) const
True if the state referred to xpath exists and is auto read accessible.
void release_vertex_id_space(index_space_handle &xid_space, bool xauto_access) const
Returns the handle to the vertex id space, xid_space to the pool of id space handles.
poset_type
Identifiers for poset types.
const char * local_cell_type_name
The local cell type name.
void update_max_db(int xmax_db)
Sets max_db() to the larger of old max_db() and xmax_db.
void release_adjacency_id_space(index_space_handle &xid_space, bool xauto_access) const
Returns the id space handle xid_space to the adjacency handle pool.
A client handle for a general, abstract partially order set.
const scoped_index & new_row_dof_map(const std::string &xprototype_name)
Creates a new dof map with dofs equal to those of the prototype with name xprototype_name.
void release_connectivity_id_space_iterator(index_space_iterator &xid_space, bool xauto_access) const
Returns the id space iterator xid_space to the connectivity iterator pool.
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 * dof_tuple()=0
The dof tuple (mutable version).
virtual bool is_ancestor_of(const any *other) const
True if other conforms to this.
A path defined by a poset name and a member name separated by a forward slash ('/'). For example: "cell_definitions/triangle".
bool is_interval_member(pod_index_type xindex) const
True if xindex is the interval member.
An abstract handle to a space of alternate integer identifiers (aliases) for a subset of a hub set of...
pod_index_type adjacency_space_id(pod_index_type xvertex_id) const
The index of the adjacency id space for vertex with id xvertex_id.
virtual void release_id_space() const
Returns this id space handle to the handle pool.
subposet & cells()
The subposet containing all the cells, of any dimension.
virtual base_space_poset * clone() const
Virtual constructor; creates a new handle of the same actual type as this, attached to the same state...
virtual const index_space_family & id_spaces() const =0
The id space family for this (const version).
void release_zone_id_space(index_space_handle &xid_space, bool xauto_access) const
Returns the handle to the zone id space, xid_space to the pool of id space handles.
virtual void get_read_access() const
Get read access to the state associated with this.
scoped_index prototype_dof_tuple_id(const std::string &xname, int xdepth, bool xcreate, bool xauto_access) const
The dof tuple id in this of the base space member prototype with name xname and refinememnt_depth xde...
virtual void next()=0
Makes id() the next id in the iteration.
void release_zone_id_space_iterator(index_space_iterator &xitr, bool xauto_access) const
Returns the iterator to the zone id space, xitr to the pool of id space iterators.
const pod_index_type & type_id() const
The cell type id of this. The id of the prototype of this in the "cell_types" id space of the prototy...
The general, abstract map from dof ids to dof values.
virtual bool is_attached() const =0
True if this handle is attached to a state.
int db
The base space dimension.
pod_index_type prototype_type_id(const std::string &xname, bool xauto_access=true) const
The type id of the base space member prototype with name xname.
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...
static std::string blocks_name()
The name of the blocks subposet.
virtual pod_type pod(pod_type xid) const
The pod index in this space equivalent to xid in the hub id space.
A client handle for a member of a base space poset.
Abstract implementation of crg_interval for an interval of implicit cover relation graph members...
index_space_iterator & get_vertex_client_id_space_iterator(pod_index_type xmbr_id, bool xauto_access) const
Allocates an vertex client id space iterator for the block containing the member with index xmbr_id f...
virtual pod_index_type cells_begin() const =0
The beginning of the local cells interval.
bool contains_vertex_id_space(pod_index_type xmbr_id, bool xauto_access) const
True, if and only if the block containing the member with index xmbr_id has a vertex 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...
static std::string cells_name()
The name of the cells subposet.
index_space_iterator & get_connectivity_id_space_iterator(pod_index_type xzone_id, bool xauto_access) const
Allocates an id space iterator from the connectivity iterator pool attached to the connectivity id sp...
Abstract base class with useful features for all objects.
The lattice of closed cells of a cellular space; a lattice representation of a computational mesh...
size_type k_size
The upper bound on the z direction index for structured blocks.
void put_max_db(int xmax_db)
Sets max_db() to xmax_db.
scattered_insertion_index_space_handle & d_cells_id_space(int xd)
The id space for the subposet containing the cells of dimension xd (mutable version).
virtual schema_poset_member & schema()
The schema for this poset (mutable version).
bool is_done() const
True if iteration is finished.
Emulator for a interval of implicit base space members representing a homogeneous collection of cells...
void insert_interval_in_standard_subposets(base_space_crg_interval &xinterval)
Inserts interval xinterval into the standard subposets.
A factory for instanting descendants of an abstract type T, given the class name of the descendant...
size_type i_size
The upper bound on the x direction index for structured blocks.
const table_dof_tuple_type * table_dof_tuple() const
The table dof tuple for this (const version).
virtual index_space_handle & get_id_space() const
Allocates an id space handle from the handle pool.
const index_space_family & id_spaces() const
The id space family for this (const version).
virtual const scoped_index & new_row_dof_map()
Creates a new row dof map.
static const std::string & prototypes_poset_name()
The name of the prototypes poset; a synonym for bsae_space_member::prototypes_poset_name().
subposet & vertices()
The subposet containing all the vertices, that is, the cells of dimension 0 (mutable version)...
bool owns(const poset_state_handle &xposet, bool xauto_access) const
True if and only if this contains the poset xposet. synonym for contains_poset(xposet.poset_path(true), xauto_access)
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 bool is_attached() const
True if this handle is attached to a state.
void release_adjacency_id_space_iterator(index_space_iterator &xid_space, bool xauto_access) const
Returns the id space iterator xid_space to the adjacency iterator pool.
virtual void attach_handle_data_members()
Initializes the handle data members when this handle is attached to a state.
virtual poset_type type_id() const
Identifier for the type of this poset.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
virtual pod_index_type d_cells_space_id(int xd) const =0
The id space index for the cells of dimension xd. Returns invalid_pod_index() if there is no id space...
virtual void insert_member(pod_index_type xmbr_hub_id)
Inserts the member of host() with hub id xmbr_hub_id.
index_space_handle & get_vertex_client_id_space(pod_index_type xmbr_id, bool xauto_access) const
Allocates an vertex client id space handle for the block containing the member with index xmbr_id for...
bool contains_path(const poset_path &xpath, bool xauto_access=true) const
True if this contains the poset or poset member specified by xpath.
index_space_iterator & get_zone_id_space_iterator(pod_index_type xmbr_id, bool xauto_access) const
Allocates an zone id space iterator for the block containing the member with index xmbr_id for the po...
const bool UPPER
Selector for upper cover.
pod_index_type zones_space_id() const
The index of the zone id space.
static std::string block_vertices_name()
The name of the block vertices subposet.
pod_index_type connectivity_space_id(pod_index_type xzone_id) const
The index of the connectivity id space for zone with id xzone_id.
int db(pod_index_type xmbr_hub_id) const
The base space dimension of the member with hub id xmbr_hub_id.
virtual pod_index_type cells_end() const =0
The end of the local cells interval.
void release_connectivity_id_space(index_space_handle &xid_space, bool xauto_access) const
Returns the id space handle xid_space to the connectivity handle pool.
virtual int db(pod_index_type xmbr_id) const =0
The dimension of the member with id xmbr_id. Does not require access to dof tuple.
pod_index_type block_vertices_space_id() const
The id space index of the block vertices id space.
bool empty() const
True if both poset name and member name are empty.
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_index_type new_member(const std::string &xprototype_name, bool xcopy_dof_map)
Creates a disconnected jim using the prototype with name xprototype_name. If xcopy_dof_map or if xhos...
static const poset_path & standard_schema_path()
The path to the standard schema for this class.
bool contains_zone_id_space(pod_index_type xmbr_id, bool xauto_access) const
True, if and only if the block containing the member with index xmbr_id has a zone id space...
index_space_handle & get_vertex_id_space(pod_index_type xmbr_id, bool xauto_access) const
Allocates an vertex id space handle for the block containing the member with index xmbr_id for the po...
index_space_handle & get_connectivity_id_space(pod_index_type xzone_id, bool xauto_access) const
Allocates an id space handle from the connectivity handle pool attached to the connectivity id space ...
const index_space_family & id_spaces() const
The id space family for this interval.
const char * type_name() const
The cell type name.
SHEAF_DLL_SPEC size_t deep_size(const sec_vd &x0, bool xinclude_shallow=true)
The deep size of the referenced object of type sec_vd. if xinclude_shallow, add the sizeof x0 to the ...
size_type j_size
The upper bound on the y direction index for structured blocks.
static base_space_poset & new_table(namespace_type &xhost, const poset_path &xpath, const poset_path &xschema_path, int xmax_db, bool xauto_access)
Creates a new base_space_poset in namespace xns with path xpath, schema specified by xschema_path...
bool contains_adjacency_id_space(pod_index_type xvertex_id, bool xauto_access) const
True if this poset contains the adjacency for a vertex with id xvertex_id.
block< scattered_insertion_index_space_handle * > _d_cells_id_spaces
The id spaces for the subposets containing the cells of dimension 0 <= d <= db(). ...
Emulator for a interval of implicit base space members representing an unstructured block...
const bool LOWER
Selector for lower cover.
const scattered_insertion_index_space_handle & id_space() const
The id space for the members of with this (const version).
void release_vertex_client_id_space(index_space_handle &xid_space, bool xauto_access) const
Returns the handle to the vertex client id space, xid_space to the pool of id space handles...
virtual void detach_from_state()
Detach this handle from its state, if any.
const char * type_name
The cell type name.
virtual bool is_attached() const
True if this is attached to a state.
virtual bool invariant() const
Class invariant.
bool is_block_member(pod_index_type xmbr_id) const
True if the member with hub id xmbr_id is a block member.
bool is_explicit_member(pod_index_type xmbr_id) const
True if the member with hub id xmbr_id is an explicit member.
virtual bool is_attached() const =0
True if this iterator is attached to a state.
virtual void put_dof(pod_index_type xdof_id, const void *xdof, size_type xdof_size)
Sets the dof referred to by xdof_id to the value at xdof.
int refinement_depth
The refinement depth.
int_type pod_index_type
The plain old data index type.
A handle for a scattered_insertion_index_space_state.
static std::string d_cells_name(int xdb, int xmax_db)
The name of the xdb-cell subposet.
int type_id
The cell type id.
Abstract emulator for a interval of implicit base space members.
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_...
subposet & elements()
The subposet containing the elements or zones, that is, the cells of maximal dimension.
void insert_prototype(T *xprototype)
Sets xprototype as the prototype for its client class.
bool contains_connectivity_id_space(pod_index_type xzone_id, bool xauto_access) const
True if this poset contains the connectivity for a zone with id xzone_id.
index_space_iterator & get_adjacency_id_space_iterator(pod_index_type xvertex_id, bool xauto_access) const
Allocates an id space iterator from the adjacency iterator pool attached to the adjacency id space st...
base_space_poset()
Default constructor; creates a new base_space_poset handle not attached to any state.
virtual void get_read_access() const
Get read access to the state associated with this.
int max_db() const
The maximum dimension of the members of this base space.
bool vertices_initialized() const
True if the vertex id space has been initialized.
The type of row dof tuple for base_space_member.
bool vertex_client_id_space_initialized() const
True if and only if the vertex client id space has been initialized.
subposet & block_vertices()
The subposet containing the vertices associated with blocks (mutable version).
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.
An array representation of abstract class poset_dof_map.
bool zones_initialized() const
True if the zone id space has been initialized.
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.
void release_vertex_client_id_space_iterator(index_space_iterator &xitr, bool xauto_access) const
Returns the iterator to the vertex client id space, xitr to the pool of id space iterators.
bool state_is_not_read_accessible() const
True if this is attached and if the state is accessible for read or if access control is disabled...
void put_refinement_depth(pod_index_type xmbr_hub_id, int xdepth)
Sets the refinement depth of the member with hub id xmbr_hub_id to xdepth.
A client handle for a poset member which has been prepared for use as a schema.
bool contains_hub(const std::string &xname, pod_type xid) const
True if the space with name xname contains an id equivalent to xid in the unglued hub id space...
row_dof_tuple_type * row_dof_tuple(bool xrequire_write_access=false)
The row dof tuple for this.
pod_type hub_pod() const
The current unglued hub id in the iteration. synonym for unglued_hub_pod().
index_space_handle & get_adjacency_id_space(pod_index_type xvertex_id, bool xauto_access) const
Allocates an id space handle from the adjacency handle pool attached to the adjacency id space state ...
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.
index_space_handle & get_zone_id_space(pod_index_type xmbr_id, bool xauto_access) const
Allocates an zone id space handle for the block containing the member with index xmbr_id from the poo...