20 #include "SheafSystem/member_record.h" 22 #include "SheafSystem/array_poset_dof_map.h" 23 #include "SheafSystem/assert_contract.h" 24 #include "SheafSystem/data_converter.h" 25 #include "SheafSystem/dof_tuple_record_set.h" 26 #include "SheafSystem/error_message.h" 27 #include "SheafSystem/index_equivalence_iterator.h" 28 #include "SheafSystem/index_space_iterator.h" 29 #include "SheafSystem/implicit_crg_interval.h" 30 #include "SheafSystem/member_record_set.h" 31 #include "SheafSystem/namespace_poset.h" 32 #include "SheafSystem/namespace_poset_dof_map.h" 33 #include "SheafSystem/poset_bounds.h" 34 #include "SheafSystem/poset_dof_iterator.h" 35 #include "SheafSystem/primitives_poset_dof_map.h" 36 #include "SheafSystem/record_queue.h" 37 #include "SheafSystem/standard_dof_tuple_index.h" 56 require(
scaffold().structure().state_is_read_accessible());
105 ensure(&(host()) == &xhost);
175 sheaf::member_record::
194 sheaf::member_record::
221 require(
scaffold().structure().state_is_read_accessible());
263 return (_eqv_itr != 0);
267 sheaf::member_record::
273 require(
scaffold().structure().contains_member(xrep_id,
true));
302 require(
scaffold().structure().state_is_read_accessible());
306 #ifdef DIAGNOSTIC_OUTPUT 307 cout <<
"member_record::external_size: member: " << xmbr_id << endl;
323 result += private_data_external_size();
324 result += dof_tuple_ids_external_size();
325 result += lower_cover_external_size();
326 result += upper_cover_external_size();
327 result += subposet_ids_external_size();
328 result += eqv_ids_external_size();
329 result += toc_external_size();
331 #ifdef DIAGNOSTIC_OUTPUT 332 cout <<
"\ttoc: " << _toc <<
" = " << _toc.to_ulong()
333 <<
" size: " << result
346 sheaf::member_record::
347 private_data_external_size()
353 #ifdef DIAGNOSTIC_OUTPUT 354 cout <<
"sheaf::member_record::private_data_external_size " << endl;
392 _toc[HAS_PRIVATE_DATA] = (result > 0);
394 #ifdef DIAGNOSTIC_OUTPUT 395 cout <<
"\ttoc: " << _toc <<
" = " << _toc.to_ulong()
396 <<
" size: " << result
409 sheaf::member_record::
410 dof_tuple_ids_external_size()
416 #ifdef DIAGNOSTIC_OUTPUT 417 cout <<
"member_record::dof_tuple_ids_external_size " << endl;
441 if(_poset->
is_jim(_mbr_id,
false))
462 _toc[HAS_DOF_TUPLE_IDS] = (result > 0);
464 #ifdef DIAGNOSTIC_OUTPUT 465 cout <<
"\ttoc: " << _toc <<
" = " << _toc.to_ulong()
466 <<
" size: " << result
479 sheaf::member_record::
480 lower_cover_external_size()
486 #ifdef DIAGNOSTIC_OUTPUT 487 cout <<
"member_record::lower_cover_external_size " << endl;
518 _toc[HAS_LOWER_COVER] = (result > 0);
520 #ifdef DIAGNOSTIC_OUTPUT 521 cout <<
"\ttoc: " << _toc <<
" = " << _toc.to_ulong()
522 <<
" size: " << result
535 sheaf::member_record::
536 upper_cover_external_size()
542 #ifdef DIAGNOSTIC_OUTPUT 543 cout <<
"member_record::upper_cover_external_size " << endl;
574 _toc[HAS_UPPER_COVER] = (result > 0);
576 #ifdef DIAGNOSTIC_OUTPUT 577 cout <<
"\ttoc: " << _toc <<
" = " << _toc.to_ulong()
578 <<
" size: " << result
591 sheaf::member_record::
592 subposet_ids_external_size()
598 #ifdef DIAGNOSTIC_OUTPUT 599 cout <<
"member_record::subposet_ids_external_size " << endl;
608 bool lhas_toc_subposet_ids =
false;
611 for(
int i = lsp_min; i<lsp_ub; i++)
617 int lsp_bit = i - lsp_min + SUBPOSET_BITS_BEGIN;
618 if(lsp_bit < SUBPOSET_BITS_END)
622 lhas_toc_subposet_ids =
true;
642 _toc[HAS_TOC_SUBPOSET_IDS] = lhas_toc_subposet_ids;
643 _toc[HAS_SUBPOSET_IDS] = (result > 0);
645 #ifdef DIAGNOSTIC_OUTPUT 646 cout <<
"\ttoc: " << _toc <<
" = " << _toc.to_ulong()
647 <<
" size: " << result
660 sheaf::member_record::
661 eqv_ids_external_size()
669 #ifdef DIAGNOSTIC_OUTPUT 670 cout <<
"member_record::eqv_ids_external_size " << endl;
678 result += (2*equivalence_iterator(_mbr_id).
ct());
687 _toc[HAS_EQV_IDS] = (result > 0);
689 #ifdef DIAGNOSTIC_OUTPUT 690 cout <<
"\ttoc: " << _toc <<
" = " << _toc.to_ulong()
691 <<
" size: " << result
704 sheaf::member_record::
711 #ifdef DIAGNOSTIC_OUTPUT 712 cout <<
"member_record::toc_external_size" << endl;
720 _toc[IS_JIM] = (_interval == 0) && _poset->
is_jim(_mbr_id);
731 #ifdef DIAGNOSTIC_OUTPUT 732 cout <<
"\ttoc: " << _toc <<
" = " << _toc.to_ulong()
733 <<
" size: " << result
757 require(
scaffold().structure().state_is_read_accessible());
761 #ifdef DIAGNOSTIC_OUTPUT 762 cout <<
"member_record::externalize: member: " << xmbr_id << endl;
778 transfer_member_to_internal_buffer(xmbr_id);
783 convert_internal_buffer_to_external_buffer();
787 transfer_external_buffer_to_HDF(xhdf_buffer);
798 sheaf::member_record::
799 transfer_member_to_internal_buffer(
const scoped_index& xmbr_id)
803 require(
scaffold().structure().state_is_read_accessible());
807 clear_internal_buffer();
811 transfer_member_to_toc(xmbr_id);
815 if(_toc[IS_INTERVAL])
817 transfer_interval_to_private_data(xmbr_id);
818 transfer_interval_to_dof_tuple_ids(xmbr_id);
819 transfer_interval_to_class_names(xmbr_id);
823 transfer_member_to_dof_tuple_ids(xmbr_id);
828 transfer_member_to_lower_cover(xmbr_id);
832 transfer_member_to_upper_cover(xmbr_id);
836 transfer_member_to_subposet_ids(xmbr_id);
840 transfer_member_to_eqv_ids(xmbr_id);
849 #ifdef DIAGNOSTIC_OUTPUT 850 cout <<
"leaving member_record::transfer_member_to_internal_buffer " << endl;
851 cout <<
"\ttoc: " << _toc <<
" = " << _toc.to_ulong() << endl;
869 sheaf::member_record::
870 clear_internal_buffer()
878 _private_data.
clear();
879 _dof_tuple_ids.
clear();
880 _lower_cover.
clear();
881 _upper_cover.
clear();
882 _subposet_ids.
clear();
889 ensure(_private_data.
ct() == 0);
890 ensure(_dof_tuple_ids.
ct() == 0);
891 ensure(_lower_cover.
ct() == 0);
892 ensure(_upper_cover.
ct() == 0);
893 ensure(_subposet_ids.
ct() == 0);
894 ensure(_eqv_ids.
ct() == 0);
895 ensure(_names.
ct() == 0);
904 sheaf::member_record::
909 require(_toc.none());
913 #ifdef DIAGNOSTIC_OUTPUT 914 cout <<
"member_record::transfer_member_to_toc " << endl;
919 _toc[IS_JIM] = _poset->
is_jim(xmbr_id);
922 _toc[IS_INTERVAL] = (_interval != 0);
929 #ifdef DIAGNOSTIC_OUTPUT 930 cout <<
"\ttoc: " << _toc <<
" = " << _toc.to_ulong() << endl;
942 sheaf::member_record::
943 transfer_interval_to_private_data(
const scoped_index& xmbr_id)
947 require(
scaffold().structure().crg().implicit_member(xmbr_id.
hub_pod()) != 0);
948 require(_private_data.
ct() == 0);
952 #ifdef DIAGNOSTIC_OUTPUT 953 cout <<
"member_record::transfer_interval_to_private_data " << endl;
972 _toc[HAS_PRIVATE_DATA] = (_private_data.
ct() > 0);
974 #ifdef DIAGNOSTIC_OUTPUT 975 cout <<
"\t_private_data ct: " << _private_data.
ct() <<
" ids: ";
976 for(
int i=0; i<_private_data.
ct(); i++)
978 cout << setw(6) << _private_data[i];
981 cout <<
"\ttoc: " << _toc <<
" = " << _toc.to_ulong() << endl;
993 sheaf::member_record::
994 transfer_member_to_dof_tuple_ids(
const scoped_index& xmbr_id)
998 require(
scaffold().structure().crg().implicit_member(xmbr_id.
hub_pod()) == 0);
999 require(_dof_tuple_ids.
ct() == 0);
1003 #ifdef DIAGNOSTIC_OUTPUT 1004 cout <<
"member_record::transfer_member_to_dof_tuple_id " << endl;
1007 if(_poset->
is_jim(xmbr_id,
false))
1023 bool ldof_tuple_is_empty =
1026 if(ldof_tuple_is_empty)
1030 ldof_tuple_id = _poset->
dof_tuple_id(EMPTY_DOF_TUPLE_INDEX,
false);
1056 if(!ldof_tuple_is_empty)
1065 assertion(
scaffold().dof_tuple_types().find(lext_dof_tuple_id) ==
1066 scaffold().dof_tuple_types().end());
1072 typedef poset_scaffold::dof_tuple_types_type::value_type types_value_type;
1073 types_value_type ltypes_value(lext_dof_tuple_id, ltype_id);
1077 assertion(
scaffold().dof_tuple_class_names().find(lext_dof_tuple_id) ==
1078 scaffold().dof_tuple_class_names().end());
1082 typedef poset_scaffold::dof_tuple_class_names_type::value_type names_value_type;
1083 names_value_type lnames_value(lext_dof_tuple_id, lclass_name);
1090 _dof_tuple_ids.
push_back(lext_dof_tuple_id);
1097 _toc[HAS_DOF_TUPLE_IDS] = (_dof_tuple_ids.
ct() > 0);
1099 #ifdef DIAGNOSTIC_OUTPUT 1100 cout <<
"\t_dof_tuple_ids ct: " << _dof_tuple_ids.
ct() <<
" ids : ";
1101 for(
int i=0; i<_dof_tuple_ids.
ct(); i++)
1103 cout << setw(6) << _dof_tuple_ids[i];
1106 cout <<
"\ttoc: " << _toc <<
" = " << _toc.to_ulong() << endl;
1117 sheaf::member_record::
1118 transfer_interval_to_dof_tuple_ids(
const scoped_index& xmbr_id)
1122 require(
scaffold().structure().crg().implicit_member(xmbr_id.
hub_pod()) != 0);
1123 require(_dof_tuple_ids.
ct() == 0);
1127 #ifdef DIAGNOSTIC_OUTPUT 1128 cout <<
"member_record::transfer_interval_to_dof_tuple_id " << endl;
1165 assertion(
scaffold().dof_tuple_types().find(lext_dof_tuple_id) ==
1166 scaffold().dof_tuple_types().end());
1172 typedef poset_scaffold::dof_tuple_types_type::value_type types_value_type;
1173 types_value_type ltypes_value(lext_dof_tuple_id, ltype_id);
1177 assertion(
scaffold().dof_tuple_class_names().find(lext_dof_tuple_id) ==
1178 scaffold().dof_tuple_class_names().end());
1182 typedef poset_scaffold::dof_tuple_class_names_type::value_type names_value_type;
1183 names_value_type lnames_value(lext_dof_tuple_id, lclass_name);
1190 _dof_tuple_ids.
push_back(lext_dof_tuple_id);
1200 _toc[HAS_DOF_TUPLE_IDS] = (_dof_tuple_ids.
ct() > 0);
1202 #ifdef DIAGNOSTIC_OUTPUT 1203 cout <<
"\t_dof_tuple_ids ct: " << _dof_tuple_ids.
ct() <<
" ids: ";
1204 for(
int i=0; i<_dof_tuple_ids.
ct(); i++)
1206 cout << setw(6) << _dof_tuple_ids[i];
1209 cout <<
"\ttoc: " << _toc <<
" = " << _toc.to_ulong() << endl;
1222 sheaf::member_record::
1223 transfer_member_to_lower_cover(
const scoped_index& xmbr_id)
1227 require(_lower_cover.
ct() == 0);
1231 #ifdef DIAGNOSTIC_OUTPUT 1232 cout <<
"member_record::transfer_member_to_lower_cover " << endl;
1257 _toc[HAS_LOWER_COVER] = (_lower_cover.
ct() > 0);
1259 #ifdef DIAGNOSTIC_OUTPUT 1260 cout <<
"\t_lower_cover ct: " << _lower_cover.
ct() <<
" ids: ";
1261 for(
int i=0; i<_lower_cover.
ct(); i++)
1263 cout << setw(6) << _lower_cover[i];
1266 cout <<
"\ttoc: " << _toc <<
" = " << _toc.to_ulong() << endl;
1278 sheaf::member_record::
1279 transfer_member_to_upper_cover(
const scoped_index& xmbr_id)
1283 require(_upper_cover.
ct() == 0);
1287 #ifdef DIAGNOSTIC_OUTPUT 1288 cout <<
"member_record::transfer_member_to_upper_cover " << endl;
1296 (lmbr_id != BOTTOM_INDEX))
1318 _toc[HAS_UPPER_COVER] = (_upper_cover.
ct() > 0);
1320 #ifdef DIAGNOSTIC_OUTPUT 1321 cout <<
"\t_upper_cover ct: " << _upper_cover.
ct() <<
" ids: ";
1322 for(
int i=0; i<_upper_cover.
ct(); i++)
1324 cout << setw(6) << _upper_cover[i];
1327 cout <<
"\ttoc: " << _toc <<
" = " << _toc.to_ulong() << endl;
1339 sheaf::member_record::
1340 transfer_member_to_subposet_ids(
const scoped_index& xmbr_id)
1344 require(_subposet_ids.
ct() == 0);
1348 #ifdef DIAGNOSTIC_OUTPUT 1349 cout <<
"member_record::transfer_member_to_subposet_ids " << endl;
1360 bool lhas_toc_subposet_ids =
false;
1368 int lsp_bit = i - lsp_min + SUBPOSET_BITS_BEGIN;
1369 if(lsp_bit < SUBPOSET_BITS_END)
1373 #ifdef DIAGNOSTIC_OUTPUT 1374 cout <<
"\tsetting bit " << lsp_bit
1375 <<
" subposet id " << lsp->
index()
1376 <<
" name: " << lsp->
name() << endl;
1379 _toc[lsp_bit] =
true;
1380 lhas_toc_subposet_ids =
true;
1393 _toc[HAS_TOC_SUBPOSET_IDS] = lhas_toc_subposet_ids;
1394 _toc[HAS_SUBPOSET_IDS] = (_subposet_ids.
ct() > 0);
1396 #ifdef DIAGNOSTIC_OUTPUT 1397 cout <<
"\t_subposet_ids ct: " << _subposet_ids.
ct() <<
" ids: ";
1398 for(
int i=0; i<_subposet_ids.
ct(); i++)
1400 cout << setw(6) << _subposet_ids[i];
1403 cout <<
"\ttoc: " << _toc <<
" = " << _toc.to_ulong() << endl;
1415 sheaf::member_record::
1416 transfer_member_to_eqv_ids(
const scoped_index& xmbr_id)
1420 require(_eqv_ids.
ct() == 0);
1425 #ifdef DIAGNOSTIC_OUTPUT 1426 cout <<
"member_record::transfer_member_to_eqv_ids " << endl;
1438 while(!litr.is_done())
1448 _toc[HAS_EQV_IDS] = (_eqv_ids.
ct() > 0);
1450 #ifdef DIAGNOSTIC_OUTPUT 1451 cout <<
"\t_eqv_ids ct: " << _eqv_ids.
ct() <<
" ids: ";
1452 for(
int i=0; i<_eqv_ids.
ct(); i++)
1454 cout << setw(6) << _eqv_ids[i];
1457 cout <<
"\ttoc: " << _toc <<
" = " << _toc.to_ulong() << endl;
1469 sheaf::member_record::
1474 require(_names.
ct() == 0);
1478 #ifdef DIAGNOSTIC_OUTPUT 1479 cout <<
"member_record::transfer_member_to_names " << endl;
1489 for(
int i=0; i<_names.
ct();i++)
1505 sheaf::member_record::
1506 transfer_interval_to_class_names(
const scoped_index& xmbr_id)
1510 require(_toc[IS_INTERVAL]);
1514 #ifdef DIAGNOSTIC_OUTPUT 1515 cout <<
"member_record::transfer_interval_to_class_names" 1516 <<
" mbr id: " << xmbr_id
1525 typedef map_type::mapped_type mapped_type;
1526 mapped_type lmapped;
1529 lmapped.second = _interval->
size();
1531 #ifdef DIAGNOSTIC_OUTPUT 1532 cout <<
"\tclass name: " << lmapped.first
1533 <<
" size: " << lmapped.second
1534 <<
" int id: " << xmbr_id.
pod()
1550 sheaf::member_record::
1551 convert_internal_buffer_to_external_buffer()
1559 initialize_external_buffer();
1563 size_t lnext_field_offset = 0;
1565 externalize_toc(lnext_field_offset);
1567 externalize_private_data_ct(lnext_field_offset);
1568 externalize_private_data(lnext_field_offset);
1570 externalize_dof_tuple_ids_ct(lnext_field_offset);
1571 externalize_dof_tuple_ids(lnext_field_offset);
1573 externalize_lower_cover_ct(lnext_field_offset);
1574 externalize_lower_cover(lnext_field_offset);
1576 externalize_upper_cover_ct(lnext_field_offset);
1577 externalize_upper_cover(lnext_field_offset);
1579 externalize_subposet_ids_ct(lnext_field_offset);
1580 externalize_subposet_ids(lnext_field_offset);
1582 externalize_eqv_ids(lnext_field_offset);
1599 sheaf::member_record::
1600 initialize_external_buffer()
1617 _end_offset += _toc[HAS_PRIVATE_DATA] ? 1 : 0;
1621 _end_offset += _private_data.
ct();
1625 _end_offset += _toc[HAS_DOF_TUPLE_IDS] ? 1 : 0;
1629 _end_offset += _dof_tuple_ids.
ct();
1633 _end_offset += _toc[HAS_LOWER_COVER] ? 1 : 0;
1637 _end_offset += _lower_cover.
ct();
1641 _end_offset += _toc[HAS_UPPER_COVER] ? 1 : 0;
1645 _end_offset += _upper_cover.
ct();
1649 _end_offset += _toc[HAS_SUBPOSET_IDS] ? 1 : 0;
1653 _end_offset += _subposet_ids.
ct();
1657 _end_offset += _eqv_ids.
ct() ;
1687 sheaf::member_record::
1688 externalize_toc(
size_t& xnext_field_offset)
1694 require(!
type_map().toc_converter()->internal_size_greater());
1698 #ifdef DIAGNOSTIC_OUTPUT 1699 cout <<
"\ttoc: " << _toc <<
" = " << _toc.to_ulong() << endl;
1703 define_old_variable(
size_t old_xnext_field_offset = xnext_field_offset);
1715 int_buf()[xnext_field_offset++] =
static_cast<int>(_toc.to_ulong());
1719 ensure(xnext_field_offset == old_xnext_field_offset + 1);
1720 ensure(xnext_field_offset <=
buf_ub());
1729 sheaf::member_record::
1730 externalize_private_data_ct(
size_t& xnext_field_offset)
1736 require(!
type_map().dof_tuple_id_converter()->internal_size_greater());
1740 define_old_variable(
size_t old_xnext_field_offset = xnext_field_offset);
1744 if(_toc[HAS_PRIVATE_DATA])
1746 int_buf()[xnext_field_offset++] = _private_data.
ct();
1751 ensure(xnext_field_offset >= old_xnext_field_offset);
1752 ensure(xnext_field_offset <=
buf_ub());
1761 sheaf::member_record::
1762 externalize_private_data(
size_t& xnext_field_offset)
1768 require(!
type_map().dof_tuple_id_converter()->internal_size_greater());
1772 #ifdef DIAGNOSTIC_OUTPUT 1773 cout <<
"\tprivate_data: " << _private_data << endl;
1776 define_old_variable(
size_t old_xnext_field_offset = xnext_field_offset);
1780 if(_toc[HAS_PRIVATE_DATA])
1782 int lct = _private_data.
ct();
1783 for(
int i=0; i<lct; ++i)
1785 int_buf()[xnext_field_offset++] = _private_data[i];
1791 ensure(xnext_field_offset == old_xnext_field_offset + _private_data.
ct());
1792 ensure(xnext_field_offset <=
buf_ub());
1801 sheaf::member_record::
1802 externalize_dof_tuple_ids_ct(
size_t& xnext_field_offset)
1811 define_old_variable(
size_t old_xnext_field_offset = xnext_field_offset);
1815 if(_toc[HAS_DOF_TUPLE_IDS])
1817 int_buf()[xnext_field_offset++] = _dof_tuple_ids.
ct();
1822 ensure(xnext_field_offset >= old_xnext_field_offset);
1823 ensure(xnext_field_offset <=
buf_ub());
1832 sheaf::member_record::
1833 externalize_dof_tuple_ids(
size_t& xnext_field_offset)
1839 require(!
type_map().dof_tuple_id_converter()->internal_size_greater());
1843 #ifdef DIAGNOSTIC_OUTPUT 1844 cout <<
"\tdof_tuple_ids: " << _dof_tuple_ids << endl;
1847 define_old_variable(
size_t old_xnext_field_offset = xnext_field_offset);
1851 if(_toc[HAS_DOF_TUPLE_IDS])
1853 int lct = _dof_tuple_ids.
ct();
1854 for(
int i=0; i<lct; ++i)
1856 int_buf()[xnext_field_offset++] = _dof_tuple_ids[i];
1862 ensure(xnext_field_offset == old_xnext_field_offset + _dof_tuple_ids.
ct());
1863 ensure(xnext_field_offset <=
buf_ub());
1872 sheaf::member_record::
1873 externalize_lower_cover_ct(
size_t& xnext_field_offset)
1882 define_old_variable(
size_t old_xnext_field_offset = xnext_field_offset);
1884 if(_toc[HAS_LOWER_COVER])
1886 int_buf()[xnext_field_offset++] = _lower_cover.
ct();
1892 ensure(xnext_field_offset >= old_xnext_field_offset);
1893 ensure(xnext_field_offset <=
buf_ub());
1902 sheaf::member_record::
1903 externalize_lower_cover(
size_t& xnext_field_offset)
1911 #ifdef DIAGNOSTIC_OUTPUT 1912 cout <<
"\tlower_cover: " << _lower_cover << endl;
1915 define_old_variable(
size_t old_xnext_field_offset = xnext_field_offset);
1917 if(_toc[HAS_LOWER_COVER])
1922 int_buf()[xnext_field_offset++] = _lower_cover[i];
1928 ensure(xnext_field_offset == old_xnext_field_offset + _lower_cover.
ct());
1929 ensure(xnext_field_offset <=
buf_ub());
1938 sheaf::member_record::
1939 externalize_upper_cover_ct(
size_t& xnext_field_offset)
1948 define_old_variable(
size_t old_xnext_field_offset = xnext_field_offset);
1950 if(_toc[HAS_UPPER_COVER])
1952 int_buf()[xnext_field_offset++] = _upper_cover.
ct();
1958 ensure(xnext_field_offset >= old_xnext_field_offset);
1959 ensure(xnext_field_offset <=
buf_ub());
1968 sheaf::member_record::
1969 externalize_upper_cover(
size_t& xnext_field_offset)
1977 #ifdef DIAGNOSTIC_OUTPUT 1978 cout <<
"\tupper_cover: " << _upper_cover << endl;
1981 define_old_variable(
size_t old_xnext_field_offset = xnext_field_offset);
1983 if(_toc[HAS_UPPER_COVER])
1988 int_buf()[xnext_field_offset++] = _upper_cover[i];
1994 ensure(xnext_field_offset == old_xnext_field_offset + _upper_cover.
ct());
1995 ensure(xnext_field_offset <=
buf_ub());
2004 sheaf::member_record::
2005 externalize_subposet_ids_ct(
size_t& xnext_field_offset)
2014 define_old_variable(
size_t old_xnext_field_offset = xnext_field_offset);
2016 if(_toc[HAS_SUBPOSET_IDS])
2018 int_buf()[xnext_field_offset++] = _subposet_ids.
ct();
2024 ensure(xnext_field_offset >= old_xnext_field_offset);
2025 ensure(xnext_field_offset <=
buf_ub());
2034 sheaf::member_record::
2035 externalize_subposet_ids(
size_t& xnext_field_offset)
2043 #ifdef DIAGNOSTIC_OUTPUT 2044 cout <<
"\tsubposet_ids: " << _subposet_ids << endl;
2047 define_old_variable(
size_t old_xnext_field_offset = xnext_field_offset);
2049 if(_toc[HAS_SUBPOSET_IDS])
2054 int_buf()[xnext_field_offset++] = _subposet_ids[i];
2061 ensure(xnext_field_offset == old_xnext_field_offset + _subposet_ids.
ct());
2062 ensure(xnext_field_offset <=
buf_ub());
2071 sheaf::member_record::
2072 externalize_eqv_ids(
size_t& xnext_field_offset)
2080 #ifdef DIAGNOSTIC_OUTPUT 2081 cout <<
"\teqv_ids: " << _eqv_ids << endl;
2084 define_old_variable(
size_t old_xnext_field_offset = xnext_field_offset);
2086 if(_toc[HAS_EQV_IDS])
2091 int_buf()[xnext_field_offset++] = _eqv_ids[i];
2097 ensure(xnext_field_offset == old_xnext_field_offset + _eqv_ids.
ct());
2098 ensure(xnext_field_offset ==
buf_ub());
2107 sheaf::member_record::
2108 transfer_external_buffer_to_HDF(hvl_t* xbuf)
2122 ensure(xbuf->p ==
buf());
2123 ensure(xbuf->len ==
buf_ub());
2142 require(
scaffold().structure().state_is_read_write_accessible());
2146 #ifdef DIAGNOSTIC_OUTPUT 2147 cout <<
"member_record::internalize: member: " << xmbr_id << endl;
2162 transfer_HDF_to_external_buffer(xhdf_buffer);
2167 convert_external_buffer_to_internal_buffer();
2171 transfer_internal_buffer_to_member(xmbr_id);
2182 sheaf::member_record::
2183 transfer_HDF_to_external_buffer(hvl_t* xbuf)
2192 _end_offset = xbuf->len;
2199 ensure(
buf() == xbuf->p);
2200 ensure(
buf_ub() == xbuf->len);
2211 sheaf::member_record::
2212 convert_external_buffer_to_internal_buffer()
2218 size_t lnext_field_offset = 0;
2222 internalize_toc(lnext_field_offset);
2224 internalize_private_data_ct(lnext_field_offset);
2225 internalize_private_data(lnext_field_offset);
2227 internalize_dof_tuple_ids_ct(lnext_field_offset);
2228 internalize_dof_tuple_ids(lnext_field_offset);
2230 internalize_lower_cover_ct(lnext_field_offset);
2231 internalize_lower_cover(lnext_field_offset);
2233 internalize_upper_cover_ct(lnext_field_offset);
2234 internalize_upper_cover(lnext_field_offset);
2236 internalize_subposet_ids_ct(lnext_field_offset);
2237 internalize_subposet_ids(lnext_field_offset);
2239 internalize_eqv_ids(lnext_field_offset);
2257 sheaf::member_record::
2258 internalize_toc(
size_t& xnext_field_offset)
2263 require(!
type_map().toc_converter()->external_size_greater());
2267 define_old_variable(
size_t old_xnext_field_offset = xnext_field_offset);
2269 _toc = toc_type(static_cast<unsigned long long>(int_buf()[xnext_field_offset++]));
2271 #ifdef DIAGNOSTIC_OUTPUT 2272 cout <<
"\ttoc: " << _toc <<
" = " << _toc.to_ulong() << endl;
2277 ensure(xnext_field_offset == old_xnext_field_offset + 1);
2278 ensure(xnext_field_offset <=
buf_ub());
2288 sheaf::member_record::
2289 internalize_private_data_ct(
size_t& xnext_field_offset)
2298 define_old_variable(
size_t old_xnext_field_offset = xnext_field_offset);
2300 if(_toc[HAS_PRIVATE_DATA])
2302 pod_index_type lprivate_data_ct = int_buf()[xnext_field_offset++];
2303 _private_data.
reserve(lprivate_data_ct);
2304 _private_data.
set_ct(lprivate_data_ct);
2313 ensure(xnext_field_offset >= old_xnext_field_offset);
2314 ensure(xnext_field_offset <=
buf_ub());
2323 sheaf::member_record::
2324 internalize_private_data(
size_t& xnext_field_offset)
2333 define_old_variable(
size_t old_xnext_field_offset = xnext_field_offset);
2335 if(_toc[HAS_PRIVATE_DATA])
2338 for(
int i=0; i<lct; ++i)
2340 _private_data[i] = int_buf()[xnext_field_offset++];
2344 #ifdef DIAGNOSTIC_OUTPUT 2345 cout <<
"\tprivate_data: " << _private_data << endl;
2350 ensure(xnext_field_offset == old_xnext_field_offset + _private_data.
ct());
2351 ensure(xnext_field_offset <=
buf_ub());
2360 sheaf::member_record::
2361 internalize_dof_tuple_ids_ct(
size_t& xnext_field_offset)
2370 define_old_variable(
size_t old_xnext_field_offset = xnext_field_offset);
2372 if(_toc[HAS_DOF_TUPLE_IDS])
2374 pod_index_type ldof_tuple_ids_ct = int_buf()[xnext_field_offset++];
2375 _dof_tuple_ids.
reserve(ldof_tuple_ids_ct);
2376 _dof_tuple_ids.
set_ct(ldof_tuple_ids_ct);
2380 _dof_tuple_ids.
set_ct(0);
2385 ensure(xnext_field_offset >= old_xnext_field_offset);
2386 ensure(xnext_field_offset <=
buf_ub());
2395 sheaf::member_record::
2396 internalize_dof_tuple_ids(
size_t& xnext_field_offset)
2405 define_old_variable(
size_t old_xnext_field_offset = xnext_field_offset);
2407 if(_toc[HAS_DOF_TUPLE_IDS])
2410 for(
int i=0; i<lct; ++i)
2412 _dof_tuple_ids[i] = int_buf()[xnext_field_offset++];
2416 #ifdef DIAGNOSTIC_OUTPUT 2417 cout <<
"\tdof_tuple_ids: " << _dof_tuple_ids << endl;
2422 ensure(xnext_field_offset == old_xnext_field_offset + _dof_tuple_ids.
ct());
2423 ensure(xnext_field_offset <=
buf_ub());
2432 sheaf::member_record::
2433 internalize_lower_cover_ct(
size_t& xnext_field_offset)
2441 define_old_variable(
size_t old_xnext_field_offset = xnext_field_offset);
2443 if(_toc[HAS_LOWER_COVER])
2445 int llower_cover_ct = int_buf()[xnext_field_offset++];
2446 _lower_cover.
reserve(llower_cover_ct);
2447 _lower_cover.
set_ct(llower_cover_ct);
2456 ensure(xnext_field_offset >= old_xnext_field_offset);
2457 ensure(xnext_field_offset <=
buf_ub());
2467 sheaf::member_record::
2468 internalize_lower_cover(
size_t& xnext_field_offset)
2473 require(unexecutable(_lower_cover_ct is
internal));
2477 define_old_variable(
size_t old_xnext_field_offset = xnext_field_offset);
2479 if(_toc[HAS_LOWER_COVER])
2484 _lower_cover[i] = int_buf()[xnext_field_offset++];
2488 #ifdef DIAGNOSTIC_OUTPUT 2489 cout <<
"\tlower_cover: " << _lower_cover << endl;
2494 ensure(xnext_field_offset == old_xnext_field_offset + _lower_cover.
ct());
2495 ensure(xnext_field_offset <=
buf_ub());
2505 sheaf::member_record::
2506 internalize_upper_cover_ct(
size_t& xnext_field_offset)
2514 define_old_variable(
size_t old_xnext_field_offset = xnext_field_offset);
2516 if(_toc[HAS_UPPER_COVER])
2518 int lupper_cover_ct = int_buf()[xnext_field_offset++];
2519 _upper_cover.
reserve(lupper_cover_ct);
2520 _upper_cover.
set_ct(lupper_cover_ct);
2529 ensure(xnext_field_offset >= old_xnext_field_offset);
2530 ensure(xnext_field_offset <=
buf_ub());
2540 sheaf::member_record::
2541 internalize_upper_cover(
size_t& xnext_field_offset)
2546 require(unexecutable(_upper_cover_ct is
internal));
2550 define_old_variable(
size_t old_xnext_field_offset = xnext_field_offset);
2552 if(_toc[HAS_UPPER_COVER])
2557 _upper_cover[i] = int_buf()[xnext_field_offset++];
2561 #ifdef DIAGNOSTIC_OUTPUT 2562 cout <<
"\tupper_cover: " << _upper_cover << endl;
2567 ensure(xnext_field_offset == old_xnext_field_offset + _upper_cover.
ct());
2568 ensure(xnext_field_offset <=
buf_ub());
2578 sheaf::member_record::
2579 internalize_subposet_ids_ct(
size_t& xnext_field_offset)
2585 require(xnext_field_offset <=
buf_ub());
2589 define_old_variable(
size_t old_xnext_field_offset = xnext_field_offset);
2591 if(_toc[HAS_SUBPOSET_IDS])
2593 int lsubposet_ids_ct = int_buf()[xnext_field_offset++];
2594 _subposet_ids.
reserve(lsubposet_ids_ct);
2595 _subposet_ids.
set_ct(lsubposet_ids_ct);
2605 ensure(xnext_field_offset >= old_xnext_field_offset);
2606 ensure(xnext_field_offset <=
buf_ub());
2617 sheaf::member_record::
2618 internalize_subposet_ids(
size_t& xnext_field_offset)
2623 require(xnext_field_offset <=
buf_ub());
2627 define_old_variable(
size_t old_xnext_field_offset = xnext_field_offset);
2629 if(_toc[HAS_SUBPOSET_IDS])
2631 size_t lids_ct = _subposet_ids.
ct();
2632 for(
size_t i=0; i< lids_ct; ++i)
2634 _subposet_ids[i] = int_buf()[xnext_field_offset++];
2638 #ifdef DIAGNOSTIC_OUTPUT 2639 cout <<
"\tsubposet_ids: " << _subposet_ids << endl;
2644 ensure(xnext_field_offset == old_xnext_field_offset + _subposet_ids.
ct());
2645 ensure(xnext_field_offset <=
buf_ub());
2656 sheaf::member_record::
2657 internalize_eqv_ids(
size_t& xnext_field_offset)
2662 require(xnext_field_offset <=
buf_ub());
2666 define_old_variable(
size_t old_xnext_field_offset = xnext_field_offset);
2668 if(_toc[HAS_EQV_IDS])
2672 size_t lct = _end_offset - xnext_field_offset;
2676 for(
size_t i=0; i<lct; ++i)
2678 _eqv_ids[i] = int_buf()[xnext_field_offset++];
2687 #ifdef DIAGNOSTIC_OUTPUT 2688 cout <<
"\teqv_ids: " << _eqv_ids << endl;
2693 ensure(xnext_field_offset == old_xnext_field_offset + _eqv_ids.
ct());
2694 ensure(xnext_field_offset ==
buf_ub());
2703 sheaf::member_record::
2704 transfer_internal_buffer_to_member(
const scoped_index& xmbr_id)
2708 require(
scaffold().structure().state_is_read_write_accessible());
2714 transfer_toc_to_member(xmbr_id);
2716 if(_toc[IS_INTERVAL])
2722 transfer_private_data_to_interval(xmbr_id);
2724 transfer_dof_tuple_ids_to_interval(xmbr_id);
2743 transfer_dof_tuple_ids_to_member(xmbr_id);
2748 transfer_eqv_ids_to_member(xmbr_id);
2754 transfer_subposet_ids_to_member(xmbr_id);
2758 transfer_upper_cover_to_member(xmbr_id);
2773 _is_resident =
false;
2780 transfer_lower_cover_to_member(xmbr_id);
2781 _is_resident =
true;
2799 sheaf::member_record::
2806 #ifdef DIAGNOSTIC_OUTPUT 2807 cout <<
"member_record::transfer_toc_to_member" << endl;
2808 cout <<
"\ttoc: " << _toc <<
" = " << _toc.to_ulong() << endl;
2854 sheaf::member_record::
2855 transfer_private_data_to_interval(
const scoped_index& xmbr_id)
2859 require(
scaffold().structure().crg().implicit_member(xmbr_id.
hub_pod()) != 0);
2863 #ifdef DIAGNOSTIC_OUTPUT 2864 cout <<
"member_record::transfer_private_data_to_interval " << endl;
2865 cout <<
"\txmbr_id: " << xmbr_id << endl;
2866 cout <<
"\t_private_data ct: " << _private_data.
ct() <<
" ids: ";
2867 for(
int i=0; i<_private_data.
ct(); i++)
2869 cout << setw(6) << _private_data[i];
2888 sheaf::member_record::
2889 transfer_dof_tuple_ids_to_interval(
const scoped_index& xmbr_id)
2893 require(
scaffold().structure().crg().implicit_member(xmbr_id.
hub_pod()) != 0);
2897 #ifdef DIAGNOSTIC_OUTPUT 2898 cout <<
"member_record::transfer_dof_tuple_id_to_interval " << endl;
2910 int ldof_tuple_ct = _dof_tuple_ids.
ct();
2917 ldof_tuple_ids.
reserve(ldof_tuple_ct);
2918 ldof_tuple_ids.
set_ct(ldof_tuple_ct);
2920 for(
int i=0; i<_dof_tuple_ids.
ct(); ++i)
2924 scoped_index ldof_tuple_id(ldof_tuple_space, lext_dof_tuple_id);
2931 ldof_tuple_id = new_row_dof_tuple(lext_dof_tuple_id);
2935 ldof_tuple_space.
insert(lext_dof_tuple_id, ldof_tuple_id);
2942 ldof_tuple_ids[i] = ldof_tuple_id.
hub_pod();
2961 sheaf::member_record::
2962 transfer_dof_tuple_ids_to_member(
const scoped_index& xmbr_id)
2968 #ifdef DIAGNOSTIC_OUTPUT 2969 cout <<
"member_record::transfer_dof_tuple_ids_to_member " << endl;
2985 if(_dof_tuple_ids.
ct() > 0)
2989 scoped_index ldof_tuple_id(ldof_tuple_space, _dof_tuple_ids[0]);
2996 ldof_tuple_id = new_row_dof_tuple(_dof_tuple_ids[0]);
2998 if(
scaffold().external_schema().index() == BOTTOM_INDEX)
3003 if(
scaffold().structure().schema().index() == BOTTOM_INDEX)
3010 ldof_tuple_space.
insert(_dof_tuple_ids[0], ldof_tuple_id);
3029 ldof_tuple_space.
insert(_dof_tuple_ids[0], ldof_tuple_id);
3031 #ifdef DIAGNOSTIC_OUTPUT 3032 cout <<
"\tqueuing dof tuple id: " << ldof_tuple_id << endl;
3043 #ifdef DIAGNOSTIC_OUTPUT 3044 cout <<
"\tsetting dof tuple id for member: " << xmbr_id.
hub_pod()
3045 <<
" to " << ldof_tuple_id.
hub_pod()
3067 sheaf::member_record::
3072 require(
scaffold().structure().state_is_read_write_accessible());
3073 require(
scaffold().dof_tuple_types().find(xext_dof_tuple_pod) !=
3074 scaffold().dof_tuple_types().end());
3075 require(
scaffold().dof_tuple_class_names().find(xext_dof_tuple_pod) !=
3076 scaffold().dof_tuple_class_names().end());
3077 require(
scaffold().dof_tuple_schema_ids().find(xext_dof_tuple_pod) !=
3078 scaffold().dof_tuple_schema_ids().end());
3079 require(
scaffold().dof_tuple_schema_versions().find(xext_dof_tuple_pod) !=
3080 scaffold().dof_tuple_schema_versions().end());
3085 #ifdef DIAGNOSTIC_OUTPUT 3086 cout <<
"member_record::new_row_dof_tuple " << endl;
3089 define_old_variable(
int old_row_dof_tuple_ct =
scaffold().structure().row_dof_tuple_ct());
3101 string lclass_name =
3114 #ifdef DIAGNOSTIC_OUTPUT 3115 cout <<
"\tclass name= " << lclass_name
3116 <<
" schema id= " << lschema_int_id
3117 <<
" schema version= " << lschema_ver
3137 if(lposet_schema.
ge(lschema_int_id))
3142 ltuple_schema_id = lschema_int_id;
3144 else if(lposet_schema.
le(lschema_int_id))
3149 ltuple_schema_id = lposet_schema.
index().
pod();
3156 post_fatal_error_message(
"Incomparable internal and external schema not supported.");
3166 assertion(lmap != 0);
3176 ensure(
scaffold().structure().row_dof_tuple_ct() == old_row_dof_tuple_ct+1);
3177 ensure(
scaffold().structure().contains_row_dof_tuple(result));
3187 sheaf::member_record::
3188 transfer_lower_cover_to_member(
const scoped_index& xmbr_id)
3194 #ifdef DIAGNOSTIC_OUTPUT 3195 cout <<
"member_record::transfer_lower_cover_to_member" << endl;
3196 cout <<
"\tmbr: " << xmbr_id <<
" lower_cover ct: " << _lower_cover.
ct() << endl;
3199 if(_lower_cover.
ct() > 0)
3218 for(
int i=0; i<_lower_cover.
ct(); i++)
3222 lint_lesser = _lower_cover[i];
3229 new_member(lint_lesser);
3234 #ifdef DIAGNOSTIC_OUTPUT 3235 cout <<
"\tinserted: " << lint_lesser <<
" in lower cover of: " << xmbr_id << endl;
3238 if(lint_lesser == BOTTOM_INDEX)
3258 sheaf::member_record::
3259 transfer_upper_cover_to_member(
const scoped_index& xmbr_id)
3265 #ifdef DIAGNOSTIC_OUTPUT 3266 cout <<
"member_record::transfer_upper_cover_to_member" << endl;
3267 cout <<
"\tmbr: " << xmbr_id <<
" upper_cover ct: " << _upper_cover.
ct() << endl;
3270 if(_upper_cover.
ct() > 0)
3284 for(
int i=0; i<_upper_cover.
ct(); i++)
3290 #ifdef DIAGNOSTIC_OUTPUT 3291 cout <<
"\tinserted: " << _upper_cover[i] <<
" in upper cover of: " << xmbr_id << endl;
3305 sheaf::member_record::
3310 require(
scaffold().structure().in_jim_edit_mode());
3314 #ifdef DIAGNOSTIC_OUTPUT 3315 cout <<
"\tmember_record::new_member id: " << xmbr_id << endl;
3318 define_old_variable(
int old_member_ct =
scaffold().structure().member_ct());
3323 typedef class_names_type::const_iterator itr_type;
3326 itr_type litr = lclass_names.find(xmbr_id);
3328 if(litr != lclass_names.end())
3332 #ifdef DIAGNOSTIC_OUTPUT 3333 cout <<
"\tcreating interval member" << endl
3334 <<
"\tmbr_id= " << xmbr_id
3335 <<
"\tclass name= " << litr->second.first
3336 <<
"\tsize: " << litr->second.second
3348 #ifdef DIAGNOSTIC_OUTPUT 3349 cout <<
"\tcreating ordinary member" << endl;
3352 _poset->
new_member(xmbr_id,
false, 0,
false);
3357 ensure(
scaffold().structure().member_ct() > old_member_ct);
3358 ensure(
scaffold().structure().contains_member(xmbr_id));
3367 sheaf::member_record::
3368 transfer_subposet_ids_to_member(
const scoped_index& xmbr_id)
3374 #ifdef DIAGNOSTIC_OUTPUT 3375 cout <<
"member_record::transfer_subposet_ids_to_member" << endl;
3384 for(
int i=SUBPOSET_BITS_BEGIN; i< SUBPOSET_BITS_END; ++i)
3392 #ifdef DIAGNOSTIC_OUTPUT 3393 cout <<
"\tgetting bit " << i
3394 <<
" subposet id " << lsp->
index()
3395 <<
" name: " << lsp->
name() << endl;
3404 for(
int i = 0; i<_subposet_ids.
ct(); i++)
3407 #ifdef DIAGNOSTIC_OUTPUT 3408 cout <<
"\ti: " << i <<
" sp_id: " << _subposet_ids[i] << endl;
3424 sheaf::member_record::
3425 transfer_eqv_ids_to_member(
const scoped_index& xmbr_id)
3431 #ifdef DIAGNOSTIC_OUTPUT 3432 cout <<
"member_record::transfer_eqv_ids_to_member" << endl;
3437 #ifdef DIAGNOSTIC_OUTPUT 3438 cout <<
"\tmbr: " << xmbr_id
3439 <<
" eqv_ids.ct: " << _eqv_ids.
ct() << endl;
3443 for(
int i = 0; i<_eqv_ids.
ct(); i+=2)
3463 if(!lid_space->
contains(lext_id, lint_id))
3467 #ifdef DIAGNOSTIC_OUTPUT 3468 cout <<
"\ti: " << i
3469 <<
" internal id: " << lint_id
3470 <<
" external id: " << lext_id
3471 <<
" ... making entry in map." 3475 lid_space->
insert(lext_id, lint_id);
3481 #ifdef DIAGNOSTIC_OUTPUT 3482 cout <<
"\ti: " << i
3483 <<
" internal id: " << lint_id
3484 <<
" external id: " << lext_id
3485 <<
" ... entry already exists, skipping." 3501 sheaf::member_record::
3512 #ifdef DIAGNOSTIC_OUTPUT 3513 cout <<
"names for member ext id: " << lext_id <<
" int id: " << xmbr_id <<
":" << endl;
3519 typedef member_name_map_type::name_list_type name_list_type;
3520 typedef member_name_map_type::const_name_iterator itr_type;
3523 name_list_type lname_list = lname_map.
all_names(lext_id.
pod());
3525 for(itr_type lname_itr = lname_list.begin(); lname_itr != lname_list.end(); ++lname_itr)
3528 #ifdef DIAGNOSTIC_OUTPUT 3529 cout <<
"\t" << *lname_itr << endl;
3568 ensure(result != 0);
3617 require(other != 0);
3623 bool result =
dynamic_cast<const member_record*
>(other) != 0;
An implementation of class scattered_insertion_index_space_handle that has a interval id space state...
id_spaces_type & id_spaces()
Buffer for id spaces (mutable version).
A client handle for a subposet.
virtual member_record * clone() const
Virtual constructor; makes a new instance of the same type as this.
void delete_equivalence_iterator()
Destroy the equivalence iterator.
bool is_valid() const
True if this is a valid id.
The data structure representing the cover relation graph of a poset.
virtual bool invariant() const
Class invariant.
poset_scaffold & scaffold()
The scaffold for the poset associated with this record (mutable version).
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.
bool in_scope() const
True if and only if scope() contains an entry for pod().
size_type member_name_ct(pod_index_type xmbr_hub_id, bool xauto_access) const
The number of names for the member with hub id xmbr_hub_id.
bool bounded_below() const
True if the lower bound is not the bottom.
const pod_type & pod() const
The "plain old data" storage of this; the value in the external id space.
void * buf() const
The buffer.
An abstract iterator over the ids of an id space.
bool contains_member(pod_index_type xid) const
True if and only if there exists a member with index xid.
index_space_iterator & get_cover_id_space_iterator(bool xlower, pod_index_type xmbr_hub_id) const
Allocates an iterator for the lower (xlower true) or upper (xlower false) cover id space of the membe...
pod_index_type dof_tuple_schema_int_id(pod_index_type xdof_tuple_ext_id) const
The internal schema id for the dof tuple with external id xdof_tuple_ext_id.
index_equivalence_class::member_type member_type
The member type for the equivalence id list. The first value in the pair is the index of the id space...
virtual poset_state * state_obj() const
State object for this poset.
dof_tuple_types_type & dof_tuple_types()
Dof tuple type ids (mutable version).
implicit_crg_interval * implicit_member(pod_index_type xid) const
The implicit interval for the member with index xid. Returns null, if no implicit interval exists...
poset_data_type_map & type_map()
The data type map used to convert data for this record (mutable version).
void put_row_dof_tuple(poset_dof_map *xdof_tuple)
Sets the dof tuple at index xindex to xdof_tuple.
virtual int standard_subposet_ct() const
The number of standard subposets automatically allocated by the constructor.
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
pod_index_type member_dof_tuple_id(pod_index_type xmbr_hub_id, bool xauto_access) const
The dof tuple hub id of the member with hub id xmbr_hub_id.
const name_list_type & all_names(index_type xindex) const
All names associated with index xindex.
void put_rep_id(pod_index_type xrep_id)
Sets rep_id() to xrep_id.
static poset_dof_map * new_dof_map(const std::string &xclass_name, dof_tuple_type xsheaf_base_class_id)
Creates an uninitialized dof map of type xclass_name, if a prototype of that name exists...
member_record(member_record_set &xhost)
Creates an instance in record set xhost for reading or writing member data.
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...
bool is_interval_member(pod_index_type xindex) const
True if xindex is the interval 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.
std::vector< subposet * > & subposets()
Buffer for subposet handles (mutable version).
A partial multi-valued relation with total injective inverse between names and indices of type index_...
void reserve(index_type xub)
Makes ub() at least xub; if new storage is allocated, it is uninitialized.
The general variable length record wrapper/adapter for transferring data between the kernel and the i...
virtual bool invariant() const
Class invariant.
block< pod_index_type > & dof_tuple_ids()
The ids of the dof tuples associated with this interval.
void put_delete_buffer(bool xval)
Sets delete_buffer to value xval.
A (lower, upper) bounds pair for a poset. Specifies a portion of a poset for a bounded i/o operation...
record_index external_index() const
The external index of this record.
void new_equivalence_iterator()
Create the equivalence iterator.
virtual ~member_record()
Destructor.
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.
size_type ct() const
The number of items in the current equivalence list being iterated over.
The general, abstract map from dof ids to dof values.
record_queue & queue()
The queue of dof tuple record requests.
virtual void put_member_name(pod_index_type xmbr_hub_id, const std::string &xname, bool xunique, bool xauto_access=false)
Make xname a name for the member with hub id xmbr_hub_id. if xunique, make xname the only name...
void put_buf(const void *xbuf, size_t xub)
Sets the buffer to xbuf.
dof_tuple_record_set & dof_tuple_records()
The dof tuple record set associated with this.
dof_tuple_class_names_type & dof_tuple_class_names()
Dof tuple class names (mutable version).
implicit_crg_interval * interval() const
The implicit interval object for the current member, if any.
poset_table_state * table() const
Table (dof tuples).
int dof_tuple_schema_version(pod_index_type xext_id) const
The external schema version for the dof tuple with external id xdof_tuple_ext_id. ...
virtual const std::string & class_name() const
The name of this class; provided to satisfy factory template.
virtual pod_index_type new_member(bool xis_jim, pod_index_type xtuple_hub_id)
Create a disconnected member with is_jim == xis_jim and the dof tuple identified by hub id xtuple_hub...
virtual pod_type pod(pod_type xid) const
The pod index in this space equivalent to xid in the hub id space.
void initialize_dof_tuple_ids(const block< pod_index_type > &xdof_tuple_ids)
Allocates and initializes dof_tuple_ids() with xdof_tuple_ids.
Abstract implementation of crg_interval for an interval of implicit cover relation graph members...
scoped_index member_ext_id(const scoped_index &xid) const
An id in the member external id space with pod mapped from xid.
void put_member_dof_tuple_id(pod_index_type xmbr_hub_id, pod_index_type xtuple_hub_id, bool xauto_access)
Sets the dof tuple hub id of the member with hub id xmbr_hub_id to xtuple_hub_id. ...
Abstract base class with useful features for all objects.
A record_set containing records of type member_record.
A record buffer for transferring member data between the kernel and the i/o subsystem.
void put_scope(const index_space_handle &xid_space)
Sets the scope to xid_space.
virtual int standard_member_ct() const
The number of standard members automatically allocated by the constructor.
pod_index_type rep_id() const
The representative id in the top id space of this equivalence class.
virtual schema_poset_member & schema()
The schema for this poset (mutable version).
dof_tuple_index_space_type & dof_tuple_id_space()
External to internal dof_tuple index space for table() (mutable version).
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.
size_type external_size(const scoped_index &xmbr_id)
The size of the member record in external form.
void externalize(const scoped_index &xmbr_id, hvl_t *xhdf_buffer)
Converts the record from internal to external form.
size_t buf_ub() const
The size of the buffer, in bytes.
void set_ct(size_type xct)
Sets ct() == xct.
An index within the external ("client") scope of a given id space.
bool is_internal() const
True if the internal buffer has been initialized.
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.
virtual void init_row_dof_map(const poset_state_handle *xhost, pod_index_type xschema_mbr_id, int xschema_version)
Initializes this as a map for row dofs in host xhost, with schema member specified by xschema_mbr_id ...
schema_poset_member & external_schema()
The schema of the poset in external namespace (mutable version).
const bool UPPER
Selector for upper cover.
void reset()
Restarts the iteration.
poset_bounds & row_bounds()
The bounds for the rows in this transaction (mutable version).
bool le(pod_index_type xother_index) const
True if this is less than or equal to the member with index xother_index.
virtual void finalize(poset_state_handle &xhost)
Finialize the initialization of this crg interval in the host xhost.
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...
size_type cover_ct(bool xlower, pod_index_type xmbr_index) const
The number of members in the lower (xlower true) or upper (xlower false) cover of the member with ind...
dof_tuple_type
Identifiers for dof tuple types.
void put_is_internal(bool xis_internal)
Sets is_internal to xis_internal.
void disable_invariant_check() const
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing inv...
void insert_cover_member(pod_index_type xother_mbr_index, bool xlower, pod_index_type xmbr_index)
Inserts xother_mbr_index in the lower (xlower true) or upper (xlower false) cover of the member with ...
void all_member_names(pod_index_type xmbr_hub_id, block< std::string > &xresult, bool xauto_access=false) const
All the names for the member with hub id xmbr_hub_id.
void enqueue(pod_index_type xindex)
Inserts xindex at the end of the record queue.
bool member_has_name(pod_index_type xmbr_hub_id, const std::string &xname, bool xauto_access=false) const
True if xname is a name for the member with hub id xmbr_hub_id.
member_name_map_type & member_name_map()
External index to member name map (mutable version).
poset_state_handle & structure()
The handle for the poset being transferred. (Name chosen to void name conflict with class poset...
const bool LOWER
Selector for lower cover.
virtual poset_dof_map & row_dof_map(pod_index_type xtuple_hub_id, bool xrequire_write_access=false) const
The map from row dof client_ids to row dof values for dof tuple hub id xtuple_hub_id.
bool ge(pod_index_type xother_index) const
True if this is greater than or equal to the member with index xother_index.
member_class_names_type & member_class_names()
Member class names (mutable version).
size_type size() const
The number of members in the member interval.
poset_crg_state & crg() const
The cover relation graph.
bool invariant_check() const
True if invariant checking is enabled.
pod_index_type compute_ext_id(const scoped_index &xtuple_id)
Computes the external id for the dof tuple dof tuple with id xtuple_id.
scoped_index hub_id() const
This mapped to the hub id space.
bool has_equivalence_iterator() const
True, if the equivalence iterator is initialized.
virtual void remove_member(pod_index_type xmbr_hub_id)
Removes the member of host() with hub id xmbr_hub_id.
int_type pod_index_type
The plain old data index type.
A handle for a scattered_insertion_index_space_state.
void put_entry(const entry_type &xentry, bool xunique)
Sets (xindex, xname) as an entry in the map. If xunique, deletes all other entries for xindex...
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...
bool cover_is_explicit(bool xlower, pod_index_type xmbr_index) const
True if and only if the lower (xlower true) or upper (xlower false) cover of the member with index xm...
virtual subposet & jims()
The subset of all jims (mutable version)
void clear_cover(bool xlower, pod_index_type xmbr_index)
Clears the lower (xlower true) or upper (xlower false) cover of the member with index xmbr_index...
virtual pod_index_type new_member_interval(const std::string &xinterval_type, size_type xsize, const block< pod_index_type > &xtuple_hub_ids, const block< pod_index_type > &xdata)
Create a disconnected member interval of type xinterval_type with size xsize, dof tuple ids xtuple_hu...
An iterator over members of an id equivalence class.
virtual dof_tuple_type type_id() const =0
An identifer for the type of dof tuple this is.
bool is_external() const
True if the external buffer has been initialized.
int int_type
The preferred integer type.
bool bound_contains_member(const poset_bounds &xbounds, bool xis_ub, const scoped_index &xindex) const
True if the upper bound id (xis_ub == true) or the lower bound (xis_ub == false) of xbounds contains ...
unordered::unordered_map< pod_index_type, std::pair< std::string, size_type > > member_class_names_type
Type of member class names map.
void internalize(hvl_t *xhdf_buffer, const scoped_index &xmbr_id)
Converts the record from external to internal form.
void clear()
Remove all items.
SHEAF_DLL_SPEC bool is_valid(pod_index_type xpod_index)
True if an only if xpod_index is valid.
virtual const std::string & class_name() const
The name of the actual (possibly derived) class of this instance.
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.
A client handle for a poset member which has been prepared for use as a schema.
void release_cover_id_space_iterator(index_space_iterator &xcover_itr) const
Returns xcover_itr to the pool of id space iterators.
virtual bool contains(pod_type xid) const
True if this space contains id xid.
const scoped_index & index() const
The index of this in host() dof tuple table.
pod_type hub_pod() const
The current unglued hub id in the iteration. synonym for unglued_hub_pod().
void put_is_external(bool xis_external)
Sets is_external to xis_external.
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.
bool is_resident() const
True if and only if member represented by this record is fully resident after read.