SheafSystem  0.0.0.0
product_section_space_schema_crg_range.cc
Go to the documentation of this file.
1 
2 //
3 // Copyright (c) 2014 Limit Point Systems, Inc.
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 
20 
21 #include "SheafSystem/product_section_space_schema_crg_range.h"
22 #include "SheafSystem/assert_contract.h"
23 #include "SheafSystem/factory.h"
24 #include "SheafSystem/cover_set_iterator.h"
25 #include "SheafSystem/ij_product_structure.h"
26 #include "SheafSystem/product_section_space_schema_poset.h"
27 #include "SheafSystem/section_space_schema_table_dof_crg_range.h"
28 
29 // ===========================================================
30 // PRODUCT_SECTION_SPACE_SCHEMA_CRG_RANGE FACET
31 // ==========================================================
32 
33 // PUBLIC MEMBER FUNCTIONS
34 
37  : _base_id_space(0),
38  _fiber_id_space(0),
39  _table_dof_range(0)
40 {
41  // Preconditions:
42 
43  // Body:
44 
45  // Postconditions:
46 
47  ensure(invariant());
48 
49  // Exit:
50 
51  return;
52 }
53 
56 {
57  // Preconditions:
58 
59  // Body:
60 
61  // nothing to do.
62 
63  // Postconditions:
64 
65  // Exit:
66 
67  return;
68 }
69 
73 {
74  // Preconditions:
75 
77 
78  // Body:
79 
80  const ij_product_structure& result =
81  _local_id_space.product_structure<ij_product_structure>();
82 
83  // Postconditions:
84 
85  ensure(is_basic_query);
86 
87  // Exit:
88 
89  return result;
90 }
91 
92 bool
95 {
96  // Preconditions:
97 
98  // Body:
99 
100  bool result = (_base_id_space != 0) && (_fiber_id_space != 0);
101 
102  // Postconditions:
103 
104  ensure(is_basic_query);
105 
106  // Exit:
107 
108  return result;
109 }
110 
111 bool
114 {
115  // Preconditions:
116 
117  // Body:
118 
119  bool result = _local_id_space.has_product_structure();
120 
121  // Postconditions:
122 
123  ensure(is_basic_query);
124 
125  // Exit:
126 
127  return result;
128 }
129 
130 bool
133 {
134  // Preconditions:
135 
136  // Body:
137 
138  bool result = (_table_dof_range != 0);
139 
140  // Postconditions:
141 
142  ensure(is_basic_query);
143 
144  // Exit:
145 
146  return result;
147 }
148 
149 void
152 {
153  // Preconditions:
154 
155  require(is_initialized());
156 
157  // Body:
158 
159  base_space().update_gathered_member_id_space(false);
160  fiber_schema().update_gathered_member_id_space(false);
161 
162  // Postconditions:
163 
164  // Exit:
165 
166  return;
167 }
168 
169 void
172 {
173  // Preconditions:
174 
175  require(is_initialized());
176 
177  // Body:
178 
179  _local_id_space.product_structure<ij_product_structure>().
180  put_ubs(_base_id_space->ct(), _fiber_id_space->ct());
181 
182  // Postconditions:
183 
184  // Exit:
185 
186  return;
187 }
188 
189 // PROTECTED MEMBER FUNCTIONS
190 
191 void
194 {
195  // Preconditions:
196 
197  require(!gathered_id_spaces_initialized());
198  require(base_space_initialized());
199  require(fiber_schema_initialized());
200 
201  // Body:
202 
205 
206  // Postconditions:
207 
209 
210  // Exit:
211 
212  return;
213 }
214 
215 void
218 {
219  // Preconditions:
220 
221  require(!product_structure_initialized());
222  require(local_id_space_initialized());
223  require(base_space_initialized());
224  require(fiber_schema_initialized());
226 
227  // Body:
228 
230  _fiber_id_space->ct());
231  _local_id_space.new_product_structure(lproduct);
232 
233  // Postconditions:
234 
236 
237  // Exit:
238 
239  return;
240 }
241 
242 void
245 {
246  // Preconditions:
247 
248  require(!table_dof_range_initialized());
249 
250  // Body:
251 
252  _table_dof_range = &xtable_dof_range;
253 
254  // Postconditions:
255 
256  ensure(table_dof_range_initialized());
257 
258  // Exit:
259 
260  return;
261 }
262 
266 {
267  // Preconditions:
268 
269  require(xhost.state_is_read_accessible());
270 
271  // Body:
272 
273  const index_space_handle* result;
274 
275  if(xhost.has_gathered_member_id_space(false))
276  {
277  // A gathered member id space has already been created.
278 
279  assertion(xhost.gathered_member_id_space_excludes_bottom(true));
280 
281  result = &xhost.gathered_member_id_space(false);
282  }
283  else
284  {
285  // Create a gathered member id space.
286 
287  // Need read/write access
288 
289  xhost.get_read_write_access(true);
290  result = &xhost.new_gathered_member_id_space(true, false);
291  xhost.release_access();
292  }
293 
294  // Postconditions:
295 
296  ensure(result != 0);
297 
298  // Exit:
299 
300  return result;
301 }
302 
303 // PRIVATE MEMBER FUNCTIONS
304 
305 
306 // ===========================================================
307 // SECTION_SPACE_SCHEMA_CRG_RANGE FACET
308 // ===========================================================
309 
310 // PUBLIC MEMBER FUNCTIONS
311 
312 bool
315  pod_index_type xfiber_schema_id) const
316 {
317  // Preconditions:
318 
319  // Body:
320 
321  bool result =
322  _base_id_space->contains_hub(xbase_space_id) &&
323  _fiber_id_space->contains_hub(xfiber_schema_id);
324 
325  // Postconditions:
326 
327  ensure(is_basic_query);
328 
329  // Exit:
330 
331  return result;
332 }
333 
334 void
337  pod_index_type& xbase_space_id,
338  pod_index_type& xfiber_schema_id) const
339 {
340  // Preconditions:
341 
342  require(local_id_space().contains_hub(xindex));
343 
344  // Body:
345 
346  pod_index_type lpod = _local_id_space.pod(xindex);
347 
348  product_structure().tuple(lpod, xbase_space_id, xfiber_schema_id);
349 
350  xbase_space_id = _base_id_space->hub_pod(xbase_space_id);
351  xfiber_schema_id = _fiber_id_space->hub_pod(xfiber_schema_id);
352 
353  // Postconditions:
354 
355  ensure(contains_member(xbase_space_id, xfiber_schema_id));
356 
357  // Exit:
358 
359  return;
360 }
361 
362 void
364 ordinal(pod_index_type xbase_space_id,
365  pod_index_type xfiber_schema_id,
366  pod_index_type& xindex) const
367 {
368  // Preconditions:
369 
370  require(contains_member(xbase_space_id, xfiber_schema_id));
371 
372  // Body:
373 
374  product_structure().ordinal(_base_id_space->pod(xbase_space_id),
375  _fiber_id_space->pod(xfiber_schema_id),
376  xindex);
377  xindex = _local_id_space.hub_pod(xindex);
378 
379  // Postconditions:
380 
381  ensure(local_id_space().contains_hub(xindex));
382 
383  // Exit:
384 
385  return;
386 }
387 
388 // PROTECTED MEMBER FUNCTIONS
389 
390 // PRIVATE MEMBER FUNCTIONS
391 
392 
393 // ===========================================================
394 // IMPLICIT_CRG_RANGE FACET
395 // ===========================================================
396 
397 // PUBLIC MEMBER FUNCTIONS
398 
399 // PROTECTED MEMBER FUNCTIONS
400 
401 // PRIVATE MEMBER FUNCTIONS
402 
403 
404 // ===========================================================
405 // RANGE FACET
406 // ===========================================================
407 
408 // PUBLIC MEMBER FUNCTIONS
409 
410 void
413 {
414  // Preconditions:
415 
416  require(xhost.state_is_read_accessible());
417 
418  // Body:
419 
420  result =
421  (xhost.base_space().member_hub_id_space(false).ct()-1) *
422  (xhost.fiber_schema().member_hub_id_space(false).ct()-1);
423 
424  // Postconditions:
425 
426  // Exit:
427 
428  return;
429 }
430 
431 sheaf::cover_set_iterator
433 atoms() const
434 {
435  // Preconditions:
436 
437  // Body:
438 
439  list_cover_set* lcover = new list_cover_set(0);
440  lcover->put_is_implicit(true);
441 
442  pod_index_type lid;
443  cover_set_iterator lbase_itr = _base_space->cover_iterator(false, BOTTOM_INDEX);
444  cover_set_iterator lfiber_itr = _fiber_schema->cover_iterator(false, BOTTOM_INDEX);
445  while(!lbase_itr.is_done())
446  {
447  lfiber_itr.reset();
448 
449  while(!lfiber_itr.is_done())
450  {
451  if(!_fiber_schema->table_dof_subposet().contains_member(lfiber_itr.item()))
452  {
453  // fiber schema atom is not a table dof.
454  // add member base space atom x fiber schema atom.
455 
456  ordinal(lbase_itr.item(), lfiber_itr.item(), lid);
457  lcover->push_back(lid);
458  }
459 
460  lfiber_itr.next();
461  }
462 
463  lbase_itr.next();
464  }
465 
466  cover_set_iterator result(lcover);
467 
468  // Postconditions:
469 
470  // Exit:
471 
472  return result;
473 }
474 
475 
476 // PROTECTED MEMBER FUNCTIONS
477 
478 // PRIVATE MEMBER FUNCTIONS
479 
480 
481 // ===========================================================
482 // COVER SET FACET
483 // ===========================================================
484 
485 // PUBLIC MEMBER FUNCTIONS
486 
487 // PROTECTED MEMBER FUNCTIONS
488 
489 sheaf::cover_set_iterator
491 implicit_cover_iterator(bool xlower, pod_index_type xmbr_index) const
492 {
493  // Preconditions:
494 
495  require(contains_member(xmbr_index));
496 
497  // Body:
498 
499  list_cover_set* lcover = new list_cover_set(0);
500  lcover->put_is_implicit(true);
501 
502  pod_index_type lbase_space_id, lfiber_schema_id, lid;
503 
504  tuple(xmbr_index, lbase_space_id, lfiber_schema_id);
505 
506  if(xlower &&
507  (_base_space->is_atom(lbase_space_id) &&
508  _fiber_schema->is_atom(lfiber_schema_id)))
509  {
510  if(_fiber_schema->table_dof_subposet().contains_member(lfiber_schema_id))
511  {
512  // Lower cover of (base space atom, fiber schema table dof id) =
513  // (base space bottom, fiber schema table dof id)
514 
515  _table_dof_range->ordinal(BOTTOM_INDEX, lfiber_schema_id, lid);
516  lcover->push_back(lid);
517  }
518  else
519  {
520  // Lower cover of (base space atom, fiber schema row dof id) = BOTTOM_INDEX.
521 
522  lcover->push_back(BOTTOM_INDEX);
523  }
524  }
525  else
526  {
527  // base_space.cover_iterator(xlower, lbase_space_id) x lfiber_schema_id.
528 
529  cover_set_iterator lbase_itr = _base_space->cover_iterator(xlower, lbase_space_id);
530  while(!lbase_itr.is_done())
531  {
532  if(lbase_itr.item() != BOTTOM_INDEX)
533  {
534  ordinal(lbase_itr.item(), lfiber_schema_id, lid);
535 
536  lcover->push_back(lid);
537  }
538 
539  lbase_itr.next();
540  }
541 
542  // base_space_id x fiber_schema.cover_iterator(xlower, lfiber_schema_id).
543 
544  cover_set_iterator lfiber_itr = _fiber_schema->cover_iterator(xlower, lfiber_schema_id);
545  while(!lfiber_itr.is_done())
546  {
547  if(lfiber_itr.item() != BOTTOM_INDEX)
548  {
549  ordinal(lbase_space_id, lfiber_itr.item(), lid);
550 
551  lcover->push_back(lid);
552  }
553 
554  lfiber_itr.next();
555  }
556  }
557 
558  cover_set_iterator result(lcover);
559 
560  // Postconditions:
561 
562  // Exit:
563 
564  return result;
565 }
566 
567 bool
569 implicit_cover_is_empty(bool xlower, pod_index_type xmbr_index) const
570 {
571  // Preconditions:
572 
573  require(contains_member(xmbr_index));
574 
575  // Body:
576 
577  // The cover is never empty.
578 
579  // Postconditions:
580 
581  ensure(is_basic_query);
582 
583  // Exit:
584 
585  return false;
586 }
587 
590 implicit_cover_size(bool xlower, pod_index_type xmbr_index) const
591 {
592  // Preconditions:
593 
594  require(contains_member(xmbr_index));
595 
596  // Body:
597 
598  pod_index_type lbase_space_id, lfiber_schema_id;
599 
600  tuple(xmbr_index, lbase_space_id, lfiber_schema_id);
601 
602  size_type result = 0;
603 
604  // Deal with special cases.
605 
606  if(xlower &&
607  _base_space->is_atom(lbase_space_id) &&
608  _fiber_schema->is_atom(lfiber_schema_id))
609  {
610  // Product of base space atom and fiber schema atom.
611 
612  result = 1;
613  }
614  else
615  {
616  result =
617  _base_space->cover_ct(xlower, lbase_space_id) +
618  _fiber_schema->cover_ct(xlower, lfiber_schema_id);
619  }
620 
621  // Postconditions:
622 
623  ensure(is_basic_query);
624 
625  // Exit:
626 
627  return result;
628 }
629 
630 bool
633  pod_index_type xmbr_index,
634  pod_index_type xother_index) const
635 {
636  // Preconditions:
637 
638  require(contains_member(xmbr_index));
639 
640  // Body:
641 
642  // Factor xmbr_index.
643 
644  pod_index_type lbase_space_id, lfiber_schema_id;
645 
646  tuple(xmbr_index, lbase_space_id, lfiber_schema_id);
647 
648  bool result;
649 
650  if(xlower &&
651  (_base_space->is_atom(lbase_space_id) &&
652  _fiber_schema->is_atom(lfiber_schema_id)))
653  {
654  if(_fiber_schema->table_dof_subposet().contains_member(lfiber_schema_id))
655  {
656  // Lower cover of (base space atom, fiber schema table dof id) =
657  // (base space bottom, fiber schema table dof id)
658 
659  pod_index_type lother_base_space_id, lother_fiber_schema_id;
660  _table_dof_range->tuple(xother_index, lother_base_space_id, lother_fiber_schema_id);
661 
662  result = (lother_base_space_id == BOTTOM_INDEX) && (lother_fiber_schema_id == lfiber_schema_id);
663  }
664  else
665  {
666  // xmbr_index is an atom, the lower cover is bottom.
667 
668  result = (xother_index == BOTTOM_INDEX);
669  }
670  }
671  else
672  {
673  // Factor xother_index.
674 
675  pod_index_type lother_base_space_id, lother_fiber_schema_id;
676 
677  tuple(xother_index, lother_base_space_id, lother_fiber_schema_id);
678 
679  // True if one of two conditions are true;
680  // (1) The other base space member is in the cover of the base space member
681  // and the fiber schema members are the same.
682  // (2) The other fiber schema member is in the cover of the fiber schema member
683  // and the base space members are the same.
684 
685  result =
686  (_base_space->cover_contains_member(xlower, lbase_space_id, lother_base_space_id) &&
687  (lfiber_schema_id == lother_fiber_schema_id)) ||
688  (_fiber_schema->cover_contains_member(xlower, lfiber_schema_id, lother_fiber_schema_id) &&
689  (lbase_space_id == lother_base_space_id));
690  }
691 
692  // Postconditions:
693 
694  ensure(is_basic_query);
695 
696  // Exit:
697 
698  return result;
699 }
700 
703 implicit_first_cover_member(bool xlower, pod_index_type xmbr_index) const
704 {
705  // Preconditions:
706 
707  require(contains_member(xmbr_index));
708  require(!cover_is_empty(xlower, xmbr_index));
709 
710  // Body:
711 
713 
714  pod_index_type lbase_space_id, lfiber_schema_id;
715 
716  tuple(xmbr_index, lbase_space_id, lfiber_schema_id);
717 
718  if(xlower && _base_space->is_atom(lbase_space_id))
719  {
720  // The base space component is an atom.
721 
722  if(_fiber_schema->table_dof_subposet().contains_member(lfiber_schema_id))
723  {
724  // The fiber schema is a table dof, the lower cover is
725  // (base space bottom, fiber schema table dof)
726 
727  _table_dof_range->ordinal(BOTTOM_INDEX, lfiber_schema_id, result);
728  }
729  else if(_fiber_schema->is_atom(lfiber_schema_id))
730  {
731  // The fiber schema component is an atom, the lower cover is bottom.
732 
733  result = BOTTOM_INDEX;
734  }
735  else
736  {
737  // The first member is the first member in the fiber schema's
738  // lower cover.
739 
740  ordinal(lbase_space_id,
741  _fiber_schema->first_cover_member(xlower, lfiber_schema_id),
742  result);
743  }
744  }
745  else
746  {
747  ordinal(_base_space->first_cover_member(xlower, lbase_space_id),
748  lfiber_schema_id, result);
749  }
750 
751  // Postconditions:
752 
753  ensure(is_basic_query);
754 
755  // Exit:
756 
757  return result;
758 }
759 
760 // PRIVATE MEMBER FUNCTIONS
761 
762 
763 // ===========================================================
764 // DOF_TUPLE_ID FACET
765 // ===========================================================
766 
767 // PUBLIC MEMBER FUNCTIONS
768 
769 bool
771 is_jim(pod_index_type xmbr_index) const
772 {
773  // Preconditions:
774 
775  require(contains_member(xmbr_index));
776 
777  // Body:
778 
779  pod_index_type lbase_space_id, lfiber_schema_id;
780 
781  tuple(xmbr_index, lbase_space_id, lfiber_schema_id);
782 
783  bool result =
784  _base_space->is_jim(lbase_space_id) &&
785  _fiber_schema->is_jim(lfiber_schema_id);
786 
787  // Postconditions:
788 
789  ensure(is_basic_query);
790 
791  // Exit:
792 
793  return result;
794 }
795 
796 const sheaf::scoped_index&
798 dof_tuple_id(pod_index_type xmbr_index) const
799 {
800  // Preconditions:
801 
802  require(contains_member(xmbr_index));
803 
804  // Body:
805 
806  pod_index_type lbase_space_id, lfiber_schema_id;
807 
808  tuple(xmbr_index, lbase_space_id, lfiber_schema_id);
809 
810  const scoped_index& result = _fiber_schema->dof_tuple_id(lfiber_schema_id);
811 
812  // Postconditions:
813 
814  ensure(result.is_valid());
815 
816  // Exit:
817 
818  return result;
819 }
820 
821 // PROTECTED MEMBER FUNCTIONS
822 
823 // PRIVATE MEMBER FUNCTIONS
824 
825 
826 // ===========================================================
827 // PRIVATE_DATA FACET
828 // ===========================================================
829 
830 // PUBLIC MEMBER FUNCTIONS
831 
832 // PROTECTED MEMBER FUNCTIONS
833 
837 {
838  // Preconditions:
839 
840  // Body:
841 
842  // Postconditions:
843 
844  ensure(is_basic_query);
845 
846  // Exit:
847 
848  return 0;
849 }
850 
851 void
854 {
855  // Preconditions:
856 
857  // Body:
858 
859  // nothing to do.
860 
861  // Postconditions:
862 
863  ensure(xdata.ct() == implicit_private_data_size());
864 
865  // Exit:
866 
867  return;
868 }
869 
870 void
873 {
874  // Preconditions:
875 
876  require(xdata.ct() >= implicit_private_data_size());
877 
878  // Body:
879 
880  // Postconditions:
881 
882  ensure(invariant());
883 
884  // Exit:
885 
886  return;
887 }
888 
889 // PRIVATE MEMBER FUNCTIONS
890 
891 
892 // ===========================================================
893 // FINIALIZE FACET
894 // ===========================================================
895 
896 // PUBLIC DATA MEMBERS
897 
898 void
901 {
902  // Preconditions:
903 
904  require(dynamic_cast<product_section_space_schema_poset*>(&xhost) != 0);
905  require(xhost.state_is_read_accessible());
906 
907  // Body:
908 
910  reinterpret_cast<product_section_space_schema_poset&>(xhost);
911 
912  // Initialize base space.
913 
914  initialize_base_space(lhost.base_space());
915 
916  // Initialize fiber schema.
917 
918  initialize_fiber_schema(lhost.fiber_schema());
919 
920  // Initialize the gathered hub id spaces.
921 
923 
924  // Initialize the product structure.
925 
927 
928  // Initialize the table dof crg range.
929 
930  initialize_table_dof_range(lhost.table_dof_range());
931 
932  // Put atoms in upper cover of bottom.
933 
937 
938  xhost.append_cover(atoms(), UPPER, BOTTOM_INDEX);
939 
940  implicit_crg_range::finalize(xhost);
941 
942  // Set the range of the host to this.
943 
944  lhost.put_product_range(*this);
945 
946  // Postconditions:
947 
948  ensure(invariant());
949  ensure(is_initialized());
950 
951  // Exit:
952 
953  return;
954 }
955 
956 // PROTECTED DATA MEMBERS
957 
958 // PRIVATE DATA MEMBERS
959 
960 
961 // ===========================================================
962 // FACTORY FACET
963 // ===========================================================
964 
965 // PUBLIC MEMBER FUNCTIONS
966 
967 bool
970 {
971  // Preconditions:
972 
973  // Body:
974 
975  bool result =
976  implicit_crg_range::is_initialized() &&
981 
982  // Postconditions:
983 
984  ensure(is_basic_query);
985 
986  // Exit:
987 
988  return result;
989 }
990 
991 const std::string&
993 class_name() const
994 {
995  // Preconditions:
996 
997  // Body:
998 
999  static const string result("product_section_space_schema_crg_range");
1000 
1001  // Postconditions:
1002 
1003  // Exit:
1004 
1005  return result;
1006 }
1007 
1008 // PROTECTED MEMBER FUNCTIONS
1009 
1010 // PRIVATE MEMBER FUNCTIONS
1011 
1012 bool
1013 fiber_bundle::product_section_space_schema_crg_range::
1014 make_prototype()
1015 {
1016  // Preconditions:
1017 
1018  // Body:
1019 
1022 
1023  range_factory().insert_prototype(lproto);
1024 
1025  // Postconditions:
1026 
1027  // Exit:
1028 
1029  return true;
1030 }
1031 
1032 
1033 // ===========================================================
1034 // ANY FACET
1035 // ===========================================================
1036 
1037 // PUBLIC MEMBER FUNCTIONS
1038 
1039 bool
1041 is_ancestor_of(const any *other) const
1042 {
1043  // Preconditions:
1044 
1045  require(other != 0);
1046 
1047  // Body:
1048 
1049  // True if other conforms to this
1050 
1051  bool result = dynamic_cast<const product_section_space_schema_crg_range*>(other) != 0;
1052 
1053  // Postconditions:
1054 
1055  // Exit:
1056 
1057  return result;
1058 }
1059 
1062 clone() const
1063 {
1065 
1066  // Preconditions:
1067 
1068  // Body:
1069 
1071 
1072  // Postconditions:
1073 
1074  ensure(result != 0);
1075  ensure(is_same_type(result));
1076 
1077  // Exit:
1078 
1079  return result;
1080 }
1081 
1082 bool
1084 invariant() const
1085 {
1086  bool result = true;
1087 
1088  if(invariant_check())
1089  {
1090  // Prevent recursive calls to invariant
1091 
1092  disable_invariant_check();
1093 
1094  // Must satisfy base class invariant
1095 
1097 
1098  // Invariances for this class:
1099 
1100  // Finished, turn invariant checking back on.
1101 
1102  enable_invariant_check();
1103  }
1104 
1105  // Exit
1106 
1107  return result;
1108 }
1109 
1110 // PROTECTED MEMBER FUNCTIONS
1111 
1112 // PRIVATE MEMBER FUNCTIONS
1113 
1114 
1115 // ===========================================================
1116 // NON-MEMBER FUNCTIONS
1117 // ===========================================================
virtual void get_read_write_access(bool xrelease_read_only_access=false)
Get read write access to the state associated with this. If release_read_only_access is requested...
virtual void put_implicit_private_data(const block< pod_index_type > &xdata)
Initializes this using private data xdata.
bool is_valid() const
True if this is a valid id.
Definition: scoped_index.h:832
static void get_size(const product_section_space_schema_poset &xhost, size_type &result)
The size for an instance created with parameter xhost.
const index_space_handle * _fiber_id_space
The gathered fiber schema hub id space.
size_type ct() const
The number of items currently in use.
virtual size_type cover_ct(bool xlower, pod_index_type xmbr_hub_id) const
The number of members in the lower cover (xlower true) or upper cover (xlower false) of the member wi...
void initialize_fiber_schema(poset_state_handle &xfiber_schema)
Sets the fiber schema for section spaces on this schema to xfiber_schema.
base_space_poset & base_space()
The base space for section spaces on this schema (mutable version).
virtual bool is_jim(pod_index_type xmbr_index) const
True if and only if the member with index xmbr_index is join-irreducible.
bool table_dof_range_initialized() const
True if the table dof range has been initialized.
virtual void tuple(pod_index_type xindex, pod_index_type &xbase_space_id, pod_index_type &xfiber_schema_id) const
The tuple conversion from section space schema id xindex to the base space id xbase_space_id and fibe...
virtual void get_implicit_private_data(block< pod_index_type > &xdata) const
The private data for this instance.
bool state_is_read_accessible() const
True if this is attached and if the state is accessible for read or access control is disabled...
virtual product_section_space_schema_crg_range * clone() const
Virtual constructor, makes a new instance of the same type as this.
A client handle for a general, abstract partially order set.
bool contains_hub(pod_type xid) const
True if this space contains an id equivalent to xid in the unglued hub id space. synonym for contains...
virtual size_type implicit_cover_size(bool xlower, pod_index_type xmbr_index) const
The number of members in the lower (xlower true) or upper (xlower false) cover set.
virtual bool is_atom(pod_index_type xmbr_hub_id) const
True if the member with hub id xmbr_hub_id covers the bottom.
virtual bool contains_member(pod_index_type xbase_space_id, pod_index_type xfiber_schema_id) const
True if this range contains the member with base space id xbase_space_id and fiber schema id xfiber_s...
virtual pod_index_type implicit_first_cover_member(bool xlower, pod_index_type xmbr_index) const
The first member of the lower (xlower true) or upper (xlower false) cover.
virtual const scoped_index & dof_tuple_id(bool xauto_access) const
An id in the dof tuple hub id space; intended for copying to initialize ids to the dof tuple id space...
virtual bool contains_member(pod_index_type xmbr_hub_id) const
True if this poset contains poset member with hub id xmbr_hub_id.
Definition: subposet.cc:955
void update_product_structure()
Update teh product structure of the local id space.
An abstract handle to a space of alternate integer identifiers (aliases) for a subset of a hub set of...
void tuple(pod_type xordinal, pod_type &xi, pod_type &xj) const
Ordinal to 2-tuple conversion.
virtual cover_set_iterator atoms() const
An iterator over the atoms in this range.
virtual void ordinal(pod_index_type xbase_space_id, pod_index_type xfiber_schema_id, pod_index_type &xindex) const
The ordinal conversion from base space id xbase_space_id and fiber schema id xfiber_schema_id to sect...
bool gathered_id_spaces_initialized() const
True if the gathered id spaces have been initialized.
poset_state_handle & fiber_schema()
The fiber schema for section spaces on this schema (mutable version).
void initialize_base_space(base_space_poset &xbase_space)
Sets the base space for section spaces on this schema to xbase_space.
An schema poset for a section space represented by a Cartesian product subspace of the tensor product...
bool product_structure_initialized() const
True if the product structure has been initialized.
Abstract base class with useful features for all objects.
Definition: any.h:39
virtual bool implicit_cover_is_empty(bool xlower, pod_index_type xmbr_index) const
True if and only if the lower (xlower true) or upper (xlower false) cover set of the member with inde...
Abstract emulator for a range of implicit section space schema members.
virtual void ordinal(pod_index_type xbase_space_id, pod_index_type xfiber_schema_id, pod_index_type &xindex) const
The ordinal conversion from base space id xbase_space_id and fiber schema id xfiber_schema_id to sect...
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
virtual void finalize(poset_state_handle &xhost)
Finialize the initialization of this crg range in the host xhost.
void initialize_gathered_id_spaces()
Initialize the gathered hub id spaces for the base space and fiber schema.
bool base_space_initialized() const
True if the base space has been initialized.
const index_space_handle * _base_id_space
The gathered base space hub id space.
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
virtual const scoped_index & dof_tuple_id(pod_index_type xmbr_index) const
The dof tuple id of the member with index xmbr_index.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
Definition: sheaf.h:52
const index_space_handle * gathered_id_space(poset_state_handle &xhost)
Get the gathered hub id space for xhost.
const bool UPPER
Selector for upper cover.
Definition: sheaf.h:72
virtual size_type ct() const =0
The number of members.
virtual bool implicit_cover_contains_member(bool xlower, pod_index_type xmbr_index, pod_index_type xother_index) const
True if and only if the lower (xlower true) or upper (xlower false) cover set contains xindex...
void initialize_table_dof_range(section_space_schema_table_dof_crg_range &xtable_dof_range)
Sets the table dof crg range.
const ij_product_structure & product_structure() const
The product structure of the local id space,.
virtual void release_access(bool xall=false) const
Release access. If xall is true, release all levels of access. Otherwise, release one level of access...
virtual pod_type pod(pod_type xid) const =0
The pod index in this space equivalent to xid in the hub id space.
void ordinal(pod_type xi, pod_type xj, pod_type &xordinal) const
2-tuple to ordinal conversion.
const section_space_schema_table_dof_crg_range * _table_dof_range
The table dof crg range.
bool cover_contains_member(bool xlower, pod_index_type xmbr_hub_id, pod_index_type xother_mbr_hub_id) const
True if and only if the lower (xlower true) or upper (xlower false) cover set of the member with hub ...
const hub_index_space_handle & member_hub_id_space(bool xauto_access) const
The member hub id space.
virtual size_type implicit_private_data_size() const
The size of the private data.
virtual const std::string & class_name() const
The name of this class; provided to satisfy factory template.
pod_type hub_pod(pod_type xid) const
The pod index in the unglued hub id space equivalent to xid in this id space; synonym for unglued_hub...
poset_state_handle & fiber_schema()
The fiber schema for section spaces on this schema (mutable version).
Emulator for a range of implicit section space schema members representing the Cartesian product the ...
subposet & table_dof_subposet()
The table dof subposet when this poset is used as a schema (mutable version).
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
A 2D implementation of abstract_product_structure.
void initialize_product_structure()
Sets the product structure of the local id space to an ij_product_structure.
virtual cover_set_iterator implicit_cover_iterator(bool xlower, pod_index_type xmbr_index) const
Iterator for lower (xlower true) or upper (xlower false) cover set of the member with index xmbr_inde...
virtual bool is_jim(pod_index_type xmbr_hub_id, bool xin_current_version=true) const
True if the member with hub id xmbr_hub_id is a jim in the current version (xin_current_version == tr...
base_space_poset * _base_space
The base space for section spaces on this schema.
virtual size_type ct() const
The number of members.
bool fiber_schema_initialized() const
True if the fiber schema has been initialized.
pod_index_type first_cover_member(bool xlower, pod_index_type xmbr_hub_id) const
Hub id of the first member of the lower (xlower true) or upper (xlower false) cover of the member wit...
SHEAF_DLL_SPEC pod_index_type invalid_pod_index()
The invalid pod index value.
Definition: pod_types.cc:31
poset_state_handle * _fiber_schema
The fiber schema for section spaces on this schema.
virtual void tuple(pod_index_type xindex, pod_index_type &xbase_space_id, pod_index_type &xfiber_schema_id) const
The tuple conversion from section space schema id xindex to the base space id xbase_space_id and fibe...
void update_gathered_id_spaces()
Update the gathered hub id spaces for the base space and fiber schema.
base_space_poset & base_space()
The base space for section spaces on this schema.