SheafSystem  0.0.0.0
product_section_space_schema_member.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_member.impl.h"
22 
23 #include "SheafSystem/assert_contract.h"
24 #include "SheafSystem/array_index_space_state.h"
25 #include "SheafSystem/ij_product_structure.h"
26 #include "SheafSystem/namespace_poset.h"
27 #include "SheafSystem/postorder_itr.h"
28 #include "SheafSystem/preorder_itr.h"
29 #include "SheafSystem/product_section_dof_iterator.h"
30 #include "SheafSystem/product_section_space_schema_poset.h"
31 #include "SheafSystem/sec_rep_descriptor.h"
32 #include "SheafSystem/section_space_schema_jims_index_space_handle.h"
33 #include "SheafSystem/section_space_schema_jims_index_space_state.h"
34 
35 using namespace std;
36 using namespace fiber_bundle; // Workaround for MS C++ bug.
37 
38 // ===========================================================
39 // PRODUCT_SECTION_SPACE_SCHEMA_MEMBER FACET
40 // ===========================================================
41 
42 // PUBLIC MEMBER FUNCTIONS
43 
47 {
48  // Preconditions:
49 
50  // Body:
51 
52  // Nothing to do; base class does it all.
53 
54  // Postconditions:
55 
56  ensure(invariant());
57  ensure(!is_attached());
58  ensure(!is_factorable());
59 
60  // Exit:
61 }
62 
65 {
66  // Preconditions:
67 
68  // Body:
69 
70  attach_to_state(&xother);
71 
72  // postconditions:
73 
74  ensure(invariant());
75  ensure(is_attached() == xother.is_attached() );
76 }
77 
81 {
82  // Preconditions:
83 
84  // Body:
85 
86  attach_to_state(&xother);
87 
88  // Postconditions:
89 
90  ensure(is_same_state(&xother));
91 
92  // Exit
93 
94  return *this;
95 }
96 
100 {
101 
102  // Preconditions:
103 
104  require(is_ancestor_of(&xother));
105 
106  //Body:
107 
108  not_implemented();
109 
110  //Postconditions:
111 
112  ensure(invariant());
113 
114  //Exit:
115 
116  return *this;
117 }
118 
121 {
122 
123  // Preconditions:
124 
125  // Body:
126 
127  // Nothing to do.
128 
129  // Postconditions:
130 
131  // Exit
132 
133  return;
134 }
135 
136 // NEW HANDLE, NEW STATE CONSTRUCTORS
137 
140  array_poset_dof_map* xdof_map,
141  bool xcopy_dof_map,
142  bool xauto_access)
143 {
144 
145  // Preconditions:
146 
147  require(precondition_of(new_jim_state(same args)));
148 
149  // Body:
150 
151  new_jim_state(xhost, xdof_map, xcopy_dof_map, xauto_access);
152 
153  // Postconditions:
154 
155  ensure(postcondition_of(new_jim_state(same args)));
156 
157  // Exit:
158 
159  return;
160 }
161 
162 
165  const scoped_index& xdof_tuple_id,
166  bool xauto_access)
167 {
168 
169  // Preconditions:
170 
171  require(precondition_of(new_jim_state(same args)));
172 
173  // Body:
174 
175  new_jim_state(xhost, xdof_tuple_id, xauto_access);
176 
177  // Postconditions:
178 
179  ensure(postcondition_of(new_jim_state(same args)));
180 
181  // Exit:
182 
183  return;
184 }
185 
188  scoped_index* xexpansion,
189  int xexpansion_ct,
190  const tern& xnew_jem,
191  bool xauto_access)
192 {
193 
194  // Preconditions:
195 
196  require(precondition_of(new_jrm_state(same args)));
197 
198  // Body:
199 
200  new_jrm_state(xhost, xexpansion, xexpansion_ct, xnew_jem, xauto_access);
201 
202  // Postconditions:
203 
204  ensure(postcondition_of(new_jrm_state(same args)));
205 
206  // Exit:
207 
208  return;
209 }
210 
211 // NEW HANDLE, EXISTING STATE CONSTRUCTORS
212 
215  pod_index_type xhub_id)
216 {
217  // Preconditions:
218 
219  require(xhost->state_is_read_accessible());
220  require(xhost->contains_member(xhub_id));
221 
222  // Body:
223 
224  attach_to_state(xhost, xhub_id);
225 
226  // Postconditions:
227 
228  ensure(invariant());
229  ensure(host() == xhost);
230  ensure(index() == xhub_id);
231  ensure(is_attached());
232 }
233 
236  const scoped_index& xid)
237 {
238  // Preconditions:
239 
240  require(xhost->state_is_read_accessible());
241  require(xhost->contains_member(xid));
242 
243  // Body:
244 
245  attach_to_state(xhost, xid.hub_pod());
246 
247  // Postconditions:
248 
249  ensure(invariant());
250  ensure(host() == xhost);
251  ensure(index() ==~ xid);
252  ensure(is_attached());
253 }
254 
257  const std::string& xname)
258 {
259  // Preconditions:
260 
261  require(xhost != 0);
262  require(xhost->state_is_read_accessible());
263  require(!xname.empty());
264  require(xhost->contains_member(xname));
265 
266  // Body:
267 
268  attach_to_state(xhost, xname);
269 
270  // Postconditions:
271 
272  ensure(invariant());
273  ensure(host() == xhost);
274  ensure(name() == xname);
275  ensure(is_attached());
276 }
277 
278 
281  pod_index_type xbase_space_id,
282  pod_index_type xfiber_schema_id)
283 {
284  // Preconditions:
285 
286  require(precondition_of(attach_to_state(same args)));
287 
288  // Body:
289 
290  attach_to_state(xhost, xbase_space_id, xfiber_schema_id);
291 
292  // Postconditions:
293 
294  ensure(postcondition_of(attach_to_state(same args)));
295 
296  // Exit
297 
298  return;
299 }
300 
303  const scoped_index& xbase_space_id,
304  const scoped_index& xfiber_schema_id)
305 {
306  // Preconditions:
307 
308  require(precondition_of(attach_to_state(same args)));
309 
310  // Body:
311 
312  attach_to_state(xhost,
313  xbase_space_id.hub_pod(),
314  xfiber_schema_id.hub_pod());
315 
316  // Postconditions:
317 
318  ensure(postcondition_of(attach_to_state(same args)));
319 
320  // Exit
321 
322  return;
323 }
324 
327  const poset_path& xbase_path,
328  const poset_path& xfiber_schema_path)
329 {
330  // Preconditions:
331 
332  require(precondition_of(attach_to_state(same args)));
333 
334  // Body:
335 
336  attach_to_state(xhost, xbase_path, xfiber_schema_path);
337 
338  // Postconditions:
339 
340  ensure(postcondition_of(attach_to_state(same args)));
341 
342  // Exit
343 
344  return;
345 }
346 
349  const poset_path& xpath,
350  bool xauto_access)
351 {
352  // Preconditions:
353 
354  require(precondition_of(attach_to_state(same args)));
355 
356  // Body:
357 
358  attach_to_state(&xns, xpath, xauto_access);
359 
360  // Postconditions:
361 
362  ensure(postcondition_of(attach_to_state(same args)));
363 
364  // Exit:
365 
366  return;
367 }
368 
369 // PROTECTED MEMBER FUNCTIONS
370 
371 void
374 {
375  // Preconditions:
376 
377  require(state_is_read_accessible());
378  require(is_factorable());
379 
380  // Body:
381 
382  base_space_poset& lbase_host = host()->base_space();
383  const subposet& leval_sp = evaluation();
384  const subposet& ldisc_sp = discretization();
385  const subposet& ljims_sp = lbase_host.jims();
386 
387  // Get the disc ct from the id space.
388 
390 
391  // Try to get evaluation_ct from eval id space.
392 
393  string leval_id_space_name = intersection_id_space_name(leval_sp, _base_space_id);
394  if(lbase_host.member_id_spaces(false).contains(leval_id_space_name))
395  {
396  _evaluation_ct = lbase_host.member_id_spaces(false).ct(leval_id_space_name);
397  }
398  else
399  {
400  _evaluation_ct = 0;
401 
403  while(!itr.is_done())
404  {
405  pod_index_type lindex = itr.index().pod();
406 
407  if(leval_sp.contains_member(lindex))
408  {
409  _evaluation_ct++;
410  }
411 
412  itr.next();
413  }
414  }
415 
416  // Get db from the base space.
417 
418  _db = lbase_host.db(_base_space.index());
419 
420  // Postconditions:
421 
422  // Exit
423 
424  return;
425 }
426 
427 void
430 {
431  // Preconditions:
432 
433  require(state_is_read_accessible());
434  require(is_factorable());
436 
437  // Body:
438 
439  base_space_poset& lbase_host = host()->base_space();
440  const subposet& leval_sp = evaluation();
441  const subposet& ldisc_sp = discretization();
442  const subposet& ljims_sp = lbase_host.jims();
443 
444  // Traverse the down set; count the eval and disc members and find
445  // the maximum dimension and client id.
446 
447  _db = 0;
448  _evaluation_ct = 0;
449  _discretization_ct = 0;
450 
451  // This schema is either new or changed, so we need
452  // to (re)build the sequence id space.
453 
454  // Refiners extend client id space; so we need to maintain same order.
455  // Do this in two steps:
456 
457  // First: find the disc members in the down set of the base and
458  // store their client ids in a set, which will keep them
459  // sorted in order.
460 
461  set<scoped_index::pod_type> ltop_seq_ids;
462  const index_space_handle& ltop_space = ldisc_sp.id_space();
463 
465  while(!itr.is_done())
466  {
467  const scoped_index& lindex = itr.index();
468 
469  if(ljims_sp.contains_member(lindex))
470  {
471  int ldb = lbase_host.member_dof_tuple(lindex)->db;
472 
473  _db = (ldb > _db) ? ldb : _db;
474  }
475 
476  if(leval_sp.contains_member(lindex))
477  {
478  _evaluation_ct++;
479  }
480 
481  if(ldisc_sp.contains_member(lindex))
482  {
484  ltop_seq_ids.insert(ltop_space.pod(lindex));
485  }
486 
487  itr.next();
488  }
489 
490  // Second: iterate over the set and define the new seq id space.
491  // The new space will contain a subset of the members in the
492  // original client id space in the same relative order as the original.
493 
494  assertion(dynamic_cast<scattered_insertion_index_space_handle*>(_discretization_id_space) != 0);
495 
498 
499  ldisc_id_space->clear();
500  ldisc_id_space->reserve(_discretization_ct);
501 
502  set<pod_index_type>::iterator lseq_id_itr;
503  for(lseq_id_itr = ltop_seq_ids.begin();
504  lseq_id_itr != ltop_seq_ids.end();
505  ++lseq_id_itr)
506  {
507  ldisc_id_space->push_back(ltop_space.hub_pod(*lseq_id_itr));
508  }
509 
510  // Postconditions:
511 
512  // Exit:
513 
514  return;
515 }
516 
517 void
520 {
521  // Preconditions:
522 
523  require(is_factorable());
524 
525  // Body:
526 
527  const index_space_handle& lfiber_schema_id_space =
529 
531  {
532  // Row dof id space already exists, set the factors.
533 
536 
539  lfiber_schema_id_space,
540  host()->product_structure());
541  }
542  else
543  {
544  // Create the row dof id space.
545 
546  arg_list largs =
547  section_space_schema_jims_index_space_state::
548  make_arg_list(*_discretization_id_space,
549  lfiber_schema_id_space,
550  host()->product_structure());
551 
552  pod_index_type lspace_id =
553  _host->new_member_id_space(row_dof_subposet_name(),
554  "section_space_schema_jims_index_space_state",
555  largs, false, false);
556 
558  &_host->member_id_spaces(false).get_id_space(lspace_id);
559  }
560 
561  // Postconditions:
562 
563  // Exit
564 
565  return;
566 }
567 
568 // PRIVATE MEMBER FUNCTIONS
569 
570 
571 // ===========================================================
572 // SECTION_SPACE_SCHEMA_MEMBER FACET
573 // ===========================================================
574 
575 // PUBLIC MEMBER FUNCTIONS
576 
577 // PROTECTED MEMBER FUNCTIONS
578 
579 // PRIVATE MEMBER FUNCTIONS
580 
581 
582 // ===========================================================
583 // SCHEMA_POSET_MEMBER FACET
584 // ===========================================================
585 
586 // PUBLIC MEMBER FUNCTIONS
587 
589 // sheaf::primitive_type
590 // fiber_bundle::product_section_space_schema_member::
591 // dof_tuple_type(bool xis_table_dof) const
592 // {
593 // primitive_type result = NOT_A_PRIMITIVE_TYPE;
594 
595 // // Preconditions:
596 
597 // require(state_is_read_accessible());
598 // /// @todo Remove.
599 // // require(is_schematized(false));
600 
601 // // Body:
602 
603 // result = fiber_schema().dof_tuple_type(xis_table_dof);
604 
605 // // Postconditions:
606 
607 // ensure(xis_table_dof ? result == NOT_A_PRIMITIVE_TYPE : true);
608 
609 // // Exit
610 
611 // return result;
612 // }
613 
614 // bool
615 // fiber_bundle::product_section_space_schema_member::
616 // is_dof(bool xin_table_dofs) const
617 // {
618 // bool result;
619 
620 // // Preconditions:
621 
622 // require(state_is_read_accessible());
623 // require(host()->is_schematized(false));
624 
625 
626 // // Body:
627 
628 // if(xin_table_dofs)
629 // {
630 // // Table dofs:
631 
632 // // Table dofs are {base.bottom()} x {fiber schema table dofs}.
633 
634 // result = (_base_space_id == BOTTOM_INDEX) && fiber_schema().is_table_dof();
635 // }
636 // else
637 // {
638 // // Row dofs:
639 
640 // result = host()->discretization().contains_member(_base_space_id) && fiber_schema().is_row_dof();
641 // }
642 
643 // // Postconditions:
644 
645 // // Exit
646 
647 // return result;
648 // }
649 
650 // size_t
651 // fiber_bundle::product_section_space_schema_member::
652 // size() const
653 // {
654 // size_t result;
655 
656 // // Preconditions:
657 
658 // require(state_is_read_accessible());
659 // require(fiber_schema().is_jim());
660 
661 // // Body:
662 
663 // result = fiber_schema().size();
664 
665 // // Postconditions:
666 
667 // // Exit
668 
669 // return result;
670 // }
671 
672 // size_t
673 // fiber_bundle::product_section_space_schema_member::
674 // alignment() const
675 // {
676 // size_t result;
677 
678 // // Preconditions:
679 
680 // require(state_is_read_accessible());
681 // require(fiber_schema().is_jim());
682 
683 // // Body:
684 
685 // result = fiber_schema().alignment();
686 
687 // // Postconditions:
688 
689 // // Exit
690 
691 // return result;
692 // }
693 
694 // sheaf::primitive_type
695 // fiber_bundle::product_section_space_schema_member::
696 // type() const
697 // {
698 // sheaf::primitive_type result;
699 
700 // // Preconditions:
701 
702 // require(state_is_read_accessible());
703 // require(fiber_schema().is_jim());
704 
705 // // Body:
706 
707 // result = fiber_schema().type();
708 
709 // // Postconditions:
710 
711 // ensure(is_primitive_index(result));
712 
713 // // Exit
714 
715 // return result;
716 // }
717 
720 dof_iterator(bool xis_table_dofs, int xversion) const
721 {
722  poset_dof_iterator* result;
723 
724  // Preconditions:
725 
726  require(state_is_read_accessible());
727  require(host()->is_schematized(false));
728  require(has_version(xversion));
729 
730 
731  // Body:
732 
733  result = new product_section_dof_iterator(*this, xis_table_dofs, xversion);
734 
735  // Postconditions:
736 
737  ensure(result != 0);
738 
739  // Exit
740 
741  return result;
742 }
743 
744 // PROTECTED MEMBER FUNCTIONS
745 
748 dof_descriptors(bool xis_table_dof) const
749 {
750  dof_descriptor_array* result = 0;
751 
752  // Preconditions:
753 
754  require(state_is_read_accessible());
755 
756  // Dof descriptors not defined for row dofs.
757 
758  require(xis_table_dof);
759 
760  // Body:
761 
762  result = schema_poset_member::dof_descriptors(xis_table_dof);
763 
764  // Postconditions:
765 
766  ensure(unexecutable(result != 0 implies it points to a buffer of length table_dof_ct()+1));
767 
768  // Exit
769 
770  return result;
771 }
772 
773 void
775 update_row_cache(bool xupdate_id_space) const
776 {
777  // Preconditions:
778 
779  // Body:
780 
781  if(is_factorable())
782  {
783  // This member is factorable. Create the product structure.
784 
785  base_space_poset& lbase_host = host()->base_space();
786 
787  // Declare an enum for determining what needs updated.
788 
789  enum update_type
790  {
791  only_row_cache, // Update only the row cache counts.
792  only_row_dof_id_space, // Update the row cache counts and row dof id space.
793  all_id_spaces // Update the row cache counts, discretization id space, and row dof id space.
794  };
795 
796  update_type lupdate = xupdate_id_space ? all_id_spaces : only_row_cache;
797 
800 
801  lbase_host.get_read_write_access(true);
802 
803  // Release old discretization handle if one was set.
804 
805  if(_discretization_id_space != 0)
806  {
808  }
809 
812 
813  string ldisc_id_space_name =
815 
816  // Assign the discretization id space.
817 
818  if(lbase_host.member_id_spaces(false).contains(ldisc_id_space_name))
819  {
821  &lbase_host.member_id_spaces(false).get_id_space(ldisc_id_space_name);
822 
823  if((lupdate == all_id_spaces) &&
824  (*_discretization_id_space == discretization().id_space()))
825  {
826  // The user requested that all the id spaces be update but since
827  // the this member's discretization id space is the same as the
828  // discretization id space of the host, only update the row id space.
829 
830  lupdate = only_row_dof_id_space;
831  }
832  }
833  else
834  {
835  // Create the discretization id space.
836 
837  arg_list largs = array_index_space_state::make_arg_list(0);
838 
839  pod_index_type lspace_id =
840  lbase_host.new_member_id_space(ldisc_id_space_name,
841  "array_index_space_state",
842  largs, false, false);
843 
845  &lbase_host.member_id_spaces(false).get_id_space(lspace_id);
846 
847  if(lupdate == only_row_cache)
848  {
849  // The discretization id space was created, update the discretization
850  // id space and the row dof id space.
851 
852  lupdate = all_id_spaces;
853  }
854  }
855 
856  // Make sure a row dof id space is created.
857 
858  if((lupdate == only_row_cache) &&
860  {
861  lupdate = only_row_dof_id_space;
862  }
863 
864  // Update the row cache and any id spaces needed.
865 
866  switch(lupdate)
867  {
868  case only_row_cache:
870  break;
871 
872  case only_row_dof_id_space:
875  break;
876 
877  case all_id_spaces:
880  break;
881  }
882 
883  lbase_host.release_access();
884 
885  // Update row values.
886 
888 
890 
892 
895  }
896  else
897  {
898  // Just another schema member.
899 
901  }
902 
903  // Postconditions:
904 
905  // Exit
906 
907  return;
908 }
909 
910 // PRIVATE MEMBER FUNCTIONS
911 
912 
913 // ===========================================================
914 // NEW DOF ACCESS FACET
915 // ===========================================================
916 
917 // PUBLIC MEMBER FUNCTIONS
918 
921 size(pod_index_type xdof_id, bool xis_table_dofs) const
922 {
923  // Preconditions:
924 
925  require(state_is_read_accessible());
926 
927  // Body:
928 
929  size_type result;
930 
931  if(is_factorable())
932  {
933  pod_index_type lfiber_dof_id = xdof_id;
934 
935  if(!xis_table_dofs)
936  {
937  pod_index_type ldisc_id;
939  tuple(xdof_id, ldisc_id, lfiber_dof_id);
940  }
941 
942  result = fiber_schema().size(lfiber_dof_id, xis_table_dofs);
943  }
944  else
945  {
946  schema_poset_member::size(xdof_id, xis_table_dofs);
947  }
948 
949  // Postconditions:
950 
951 
952  // Exit:
953 
954  return result;
955 }
956 
959 size(pod_index_type xdisc_id, pod_index_type xfiber_dof_id, bool xis_table_dof) const
960 {
961  // Preconditions:
962 
963  require(state_is_read_accessible());
964  require(is_factorable());
965  require(fiber_schema_id_space(xis_table_dof).contains(xfiber_dof_id));
966 
967  // Body:
968 
969  size_type result = fiber_schema().size(xfiber_dof_id, xis_table_dof);
970 
971  // Postconditions:
972 
973 
974  // Exit:
975 
976  return result;
977 }
978 
981 size(const scoped_index& xdisc_id,
982  const scoped_index& xfiber_dof_id,
983  bool xis_table_dof,
984  bool xauto_access) const
985 {
986  // Preconditions:
987 
988  require(state_is_read_accessible());
989  require(is_factorable());
990  require(fiber_schema_id_space(xis_table_dof, xauto_access).contains(xfiber_dof_id));
991 
992  // Body:
993 
994  size_type result = fiber_schema().size(xfiber_dof_id, xis_table_dof, xauto_access);
995 
996  // Postconditions:
997 
998 
999  // Exit:
1000 
1001  return result;
1002 }
1003 
1006 alignment(pod_index_type xdof_id, bool xis_table_dofs) const
1007 {
1008  // Preconditions:
1009 
1010  require(state_is_read_accessible());
1011 
1012  // Body:
1013 
1014  size_type result;
1015 
1016  if(is_factorable())
1017  {
1018  pod_index_type lfiber_dof_id = xdof_id;
1019 
1020  if(!xis_table_dofs)
1021  {
1022  pod_index_type ldisc_id;
1024  tuple(xdof_id, ldisc_id, lfiber_dof_id);
1025  }
1026 
1027  result = fiber_schema().alignment(lfiber_dof_id, xis_table_dofs);
1028  }
1029  else
1030  {
1031  result = alignment(xdof_id, xis_table_dofs);
1032  }
1033 
1034  // Postconditions:
1035 
1036  // Exit:
1037 
1038  return result;
1039 }
1040 
1043 alignment(pod_index_type xdisc_id, pod_index_type xfiber_dof_id, bool xis_table_dof) const
1044 {
1045  // Preconditions:
1046 
1047  require(state_is_read_accessible());
1048  require(is_factorable());
1049  require(fiber_schema_id_space(xis_table_dof).contains(xfiber_dof_id));
1050 
1051  // Body:
1052 
1053  size_type result = fiber_schema().alignment(xfiber_dof_id, xis_table_dof);
1054 
1055  // Postconditions:
1056 
1057 
1058  // Exit:
1059 
1060  return result;
1061 }
1062 
1065 alignment(const scoped_index& xdisc_id,
1066  const scoped_index& xfiber_dof_id,
1067  bool xis_table_dof,
1068  bool xauto_access) const
1069 {
1070  // Preconditions:
1071 
1072  require(state_is_read_accessible());
1073  require(is_factorable());
1074  require(fiber_schema_id_space(xis_table_dof, xauto_access).contains(xfiber_dof_id));
1075 
1076  // Body:
1077 
1078  size_type result =
1079  fiber_schema().alignment(xfiber_dof_id, xis_table_dof, xauto_access);
1080 
1081  // Postconditions:
1082 
1083 
1084  // Exit:
1085 
1086  return result;
1087 }
1088 
1091 type(pod_index_type xdof_id, bool xis_table_dofs) const
1092 {
1093  // Preconditions:
1094 
1095  require(state_is_read_accessible());
1096  require(xis_table_dofs ? fiber_schema_id_space(xis_table_dofs).contains(xdof_id) : true);
1097 
1098  // Body:
1099 
1100  primitive_type result;
1101 
1102  if(is_factorable())
1103  {
1104  pod_index_type lfiber_dof_id = xdof_id;
1105 
1106  if(!xis_table_dofs)
1107  {
1108  pod_index_type ldisc_id;
1110  tuple(xdof_id, ldisc_id, lfiber_dof_id);
1111  }
1112 
1113  result = fiber_schema().type(lfiber_dof_id, xis_table_dofs);
1114  }
1115  else
1116  {
1117  result = schema_poset_member::type(xdof_id, xis_table_dofs);
1118  }
1119 
1120  // Postconditions:
1121 
1122 
1123  // Exit:
1124 
1125  return result;
1126 }
1127 
1130 type(pod_index_type xdisc_id, pod_index_type xfiber_dof_id, bool xis_table_dof) const
1131 {
1132  // Preconditions:
1133 
1134  require(state_is_read_accessible());
1135  require(is_factorable());
1136  require(fiber_schema_id_space(xis_table_dof).contains(xfiber_dof_id));
1137 
1138  // Body:
1139 
1140  primitive_type result = fiber_schema().type(xfiber_dof_id, xis_table_dof);
1141 
1142  // Postconditions:
1143 
1144 
1145  // Exit:
1146 
1147  return result;
1148 }
1149 
1152 type(const scoped_index& xdisc_id,
1153  const scoped_index& xfiber_dof_id,
1154  bool xis_table_dof,
1155  bool xauto_access) const
1156 {
1157  // Preconditions:
1158 
1159  require(state_is_read_accessible());
1160  require(is_factorable());
1161  require(fiber_schema_id_space(xis_table_dof, xauto_access).contains(xfiber_dof_id));
1162 
1163  // Body:
1164 
1165  primitive_type result =
1166  fiber_schema().type(xfiber_dof_id, xis_table_dof, xauto_access);
1167 
1168  // Postconditions:
1169 
1170 
1171  // Exit:
1172 
1173  return result;
1174 }
1175 
1178 offset(pod_index_type xdof_id, bool xis_table_dof) const
1179 {
1180  size_type result;
1181 
1182  // Preconditions:
1183 
1184  require(state_is_read_accessible());
1185  require(xis_table_dof ? fiber_schema_id_space(xis_table_dof).contains(xdof_id) : true);
1186 
1187  // Body:
1188 
1189  if(!is_factorable())
1190  {
1191  result = schema_poset_member::offset(xdof_id, xis_table_dof);
1192  }
1193  else if(xis_table_dof)
1194  {
1195  result = fiber_schema().offset(xdof_id, true);
1196  }
1197  else
1198  {
1199  pod_index_type lfiber_dof_id, ldisc_id;
1201  tuple(xdof_id, ldisc_id, lfiber_dof_id);
1202 
1203  result = offset(ldisc_id, lfiber_dof_id, false);
1204  }
1205 
1206 
1207  // Postconditions:
1208 
1209 
1210  // Exit:
1211 
1212  return result;
1213 }
1214 
1217 offset(pod_index_type xdisc_id, pod_index_type xfiber_dof_id, bool xis_table_dof) const
1218 {
1219  // Preconditions:
1220 
1221  require(state_is_read_accessible());
1222  require(is_factorable());
1223  require(fiber_schema_id_space(xis_table_dof).contains(xfiber_dof_id));
1224 
1225  // Body:
1226 
1227  size_type result;
1228 
1229  if(xis_table_dof)
1230  {
1231  result = fiber_schema().offset(xfiber_dof_id, true);
1232  }
1233  else
1234  {
1235  result = fiber_size()*xdisc_id + fiber_schema().offset(xfiber_dof_id, false);
1236  }
1237 
1238  // Postconditions:
1239 
1240 
1241  // Exit:
1242 
1243  return result;
1244 }
1245 
1248 offset(const scoped_index& xdisc_id,
1249  const scoped_index& xfiber_dof_id,
1250  bool xis_table_dof,
1251  bool xauto_access) const
1252 {
1253  // Preconditions:
1254 
1255  require(state_is_read_accessible());
1256  require(is_factorable());
1257  require(fiber_schema_id_space(xis_table_dof, xauto_access).contains(xfiber_dof_id));
1258 
1259  // Body:
1260 
1261  if(xauto_access)
1262  {
1263  get_read_access();
1264  }
1265 
1266  pod_index_type ldisc_id = _discretization_id_space->pod(xdisc_id);
1267  pod_index_type lfiber_dof_id =
1268  fiber_schema_id_space(xis_table_dof).pod(xfiber_dof_id);
1269 
1270  size_type result = offset(ldisc_id, lfiber_dof_id, xis_table_dof);
1271 
1272  if(xauto_access)
1273  {
1274  release_access();
1275  }
1276 
1277  // Postconditions:
1278 
1279 
1280  // Exit:
1281 
1282  return result;
1283 }
1284 
1285 // PROTECTED MEMBER FUNCTIONS
1286 
1287 // PRIVATE MEMBER FUNCTIONS
1288 
1289 
1290 // ===========================================================
1291 // I/O SUPPORT FACET
1292 // ===========================================================
1293 
1294 // PUBLIC MEMBER FUNCTIONS
1295 
1299 {
1302 
1303  // Preconditions:
1304 
1305  require(state_is_read_accessible());
1306  require(host()->base_space().includes_subposet(xindex));
1307 
1308  // Body:
1309 
1310  zn_to_bool* ldecomp = new zn_to_bool();
1311 
1312  subposet ldecomp_sp(&host()->base_space(), xindex);
1313 
1314  index_iterator litr = ldecomp_sp.indexed_member_iterator();
1315  while(!litr.is_done())
1316  {
1317  pod_index_type lschema_mbr_id;
1318  host()->ordinal(litr.index().pod(), fiber_schema_id(), lschema_mbr_id);
1319 
1320  ldecomp->force(lschema_mbr_id, true);
1321 
1322  litr.next();
1323  }
1324 
1325  ldecomp_sp.detach_from_state();
1326 
1327  index_iterator* result = new index_iterator(ldecomp,
1328  host()->member_hub_id_space(false),
1329  true);
1330 
1331  // Postconditions:
1332 
1333  // Exit:
1334 
1335  return result;
1336 }
1337 
1340 
1341 // sheaf::pod_index_type
1342 // fiber_bundle::product_section_space_schema_member::
1343 // get_int_id(pod_index_type xext_id, const std::string& xid_space_name) const
1344 // {
1345 // // Preconditions:
1346 
1347 // require(state_is_read_accessible());
1348 // require(precondition_of(host()->base_space().get_ext_id(index(), xid_space_name)));
1349 
1350 // // Body:
1351 
1352 // /// @hack product subposet hack, ver 2.
1353 // /// Section space schema member external ids are really base space external ids.
1354 
1355 // pod_index_type lbase_id =
1356 // host()->base_space().get_int_id(xext_id, xid_space_name, false);
1357 
1358 // pod_index_type result;
1359 // host()->ordinal(lbase_id, fiber_schema_id(), result);
1360 
1361 // // Postconditions:
1362 
1363 // ensure(host()->contains_member(result));
1364 
1365 // // Exit:
1366 
1367 // return result;
1368 // }
1369 
1370 void
1372 get_ext_ids(const std::string& xid_space_name,
1373  pod_index_type& xschema_poset_ext_id,
1374  pod_index_type& xschema_member_ext_id,
1375  pod_index_type& xbase_space_ext_id,
1376  pod_index_type& xfiber_schema_ext_id,
1377  pod_index_type& xlocal_schema_ext_id) const
1378 {
1379  // Preconditions:
1380 
1381  require(state_is_read_accessible());
1382  require(host()->member_id_spaces(false).contains(xid_space_name));
1383  require(host()->base_space().member_id_spaces(false).contains(xid_space_name));
1384  require(host()->base_space().member_id_spaces(false).contains_hub(xid_space_name, base_space_id()));
1385  require(host()->fiber_schema().member_id_spaces(false).contains(xid_space_name));
1386  require(host()->fiber_schema().member_id_spaces(false).contains_hub(xid_space_name, fiber_schema_id()));
1387 
1388  // Body:
1389 
1390  // Get the external id for the schema poset (this->host()).
1391 
1392  xschema_poset_ext_id =
1393  name_space()->get_ext_id(host()->index(), xid_space_name, false);
1394 
1395  // Schema member external id is undefined.
1396 
1397  xschema_member_ext_id = invalid_pod_index();
1398 
1399  // Get the external id for the base space component.
1400 
1401  xbase_space_ext_id =
1402  host()->base_space().get_ext_id(base_space_id(), xid_space_name, false);
1403 
1404  // Get the external id for the fiber schema component.
1405 
1406  xfiber_schema_ext_id =
1407  host()->fiber_schema().get_ext_id(fiber_schema_id(), xid_space_name, false);
1408 
1409  // Local schema id is undefined.
1410 
1411  xlocal_schema_ext_id = invalid_pod_index();
1412 
1413  // Postconditions:
1414 
1415 
1416  // Exit:
1417 
1418  return;
1419 }
1420 
1424 {
1425  return fiber_schema();
1426 }
1427 
1428 size_t
1430 ext_data_type_ct(bool xis_table_schema) const
1431 {
1432  // Preconditions:
1433 
1434  require(state_is_read_accessible());
1435 
1436  // Body:
1437 
1438  // For product schema members,
1439  // the external data type is the entire schema.
1440 
1441  size_t result = xis_table_schema ? 1 : discretization_ct();
1442 
1443  // Postconditions:
1444 
1445 
1446  // Exit:
1447 
1448  return result;
1449 }
1450 
1451 // PROTECTED MEMBER FUNCTIONS
1452 
1453 // PRIVATE MEMBER FUNCTIONS
1454 
1455 
1456 // ===========================================================
1457 // DEGREE OF FREEDOM (DOF) TUPLE FACET
1458 // ===========================================================
1459 
1460 // PUBLIC MEMBER FUNCTIONS
1461 
1464 dof_map(bool xrequire_write_access)
1465 {
1466 
1467  // Preconditions:
1468 
1469  require(xrequire_write_access ?
1472  require(is_jim(false));
1473 
1474  // Body:
1475 
1476  primitives_poset_dof_map& result =
1477  fiber_schema().dof_map(xrequire_write_access);
1478 
1479  // Postconditions:
1480 
1481  // Exit:
1482 
1483  return result;
1484 }
1485 
1488 dof_map(bool xrequire_write_access) const
1489 {
1490 
1491  // Preconditions:
1492 
1493  require(xrequire_write_access ?
1496  require(is_jim(false));
1497 
1498  // Body:
1499 
1500  const primitives_poset_dof_map& result =
1501  fiber_schema().dof_map(xrequire_write_access);
1502 
1503  // Postconditions:
1504 
1505  // Exit:
1506 
1507  return result;
1508 }
1509 
1510 // PROTECTED MEMBER FUNCTIONS
1511 
1512 // PRIVATE MEMBER FUNCTIONS
1513 
1514 
1515 // ===========================================================
1516 // HOST POSET FACET
1517 // ===========================================================
1518 
1519 // PUBLIC MEMBER FUNCTIONS
1520 
1521 bool
1524 {
1525  bool result;
1526 
1527  // Preconditions:
1528 
1529  // Body:
1530 
1531  result = dynamic_cast<const product_section_space_schema_poset*>(xother) != 0;
1532 
1533  // Postconditions:
1534 
1535  // Exit
1536 
1537  return result;
1538 }
1539 
1540 // PROTECTED MEMBER FUNCTIONS
1541 
1542 // PRIVATE MEMBER FUNCTIONS
1543 
1544 
1545 // ===========================================================
1546 // ANY FACET
1547 // ===========================================================
1548 
1549 // PUBLIC MEMBER FUNCTIONS
1550 
1551 bool
1553 is_ancestor_of(const any* xother) const
1554 {
1555  bool result;
1556 
1557  // Preconditions:
1558 
1559  // Body:
1560 
1561  result = dynamic_cast<const product_section_space_schema_member*>(xother) != 0;
1562 
1563  // Postconditions:
1564 
1565  // Exit
1566 
1567  return result;
1568 }
1569 
1572 clone() const
1573 {
1574 
1575  // Preconditions:
1576 
1577  // Body:
1578 
1579  // create new handle of the current class.
1580 
1583 
1584  // Postconditions:
1585 
1586  ensure(result != 0);
1587  ensure(result->invariant());
1588 
1589  // Exit:
1590 
1591  return result;
1592 }
1593 
1594 bool
1596 invariant() const
1597 {
1598  bool result = true;
1599 
1600  // Preconditions:
1601 
1602  // Body:
1603 
1604  // Must satisfy base class invariant
1605 
1606  result = result && schema_poset_member::invariant();
1607 
1608  if(invariant_check())
1609  {
1610  // Prevent recursive calls to invariant
1611 
1613 
1616 
1617  // Finished, turn invariant checking back on.
1618 
1620  }
1621 
1622  // Postconditions:
1623 
1624  // Exit
1625 
1626  return result;
1627 }
1628 
1629 // PROTECTED MEMBER FUNCTIONS
1630 
1631 // PRIVATE MEMBER FUNCTIONS
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 get_ext_ids(const std::string &xid_space_name, pod_index_type &xschema_poset_ext_id, pod_index_type &xschema_member_ext_id, pod_index_type &xbase_space_ext_id, pod_index_type &xfiber_schema_ext_id, pod_index_type &xlocal_schema_ext_id) const
Gets the external ids of this in the id space with namexid_space_name.
virtual bool is_jim(bool xin_current_version=true) const
True if this member is join irreducible in the current version of the host (xin_current_version == tr...
A client handle for a subposet.
Definition: subposet.h:86
An implementation of class explicit_index_space_handle that has a section space schema jims id space ...
virtual size_t ext_data_type_ct(bool xis_table_schema) const
The number of instances of the external data type needed to represent this schema.
bool is_done() const
True if iteration finished.
int version(bool xunalias=true) const
The (possibly aliased) version of this component. The version of the host used when evaluating proper...
void length(const S &x0, SR &xresult, bool xauto_access)
Definition: sec_ed.impl.h:181
const pod_type & pod() const
The "plain old data" storage of this; the value in the external id space.
Definition: scoped_index.h:672
const index_space_handle & row_dof_id_space() const
The row dof id space for the schema defined by this.
virtual const abstract_product_structure & product_structure() const =0
The product structure for this id space (const version).
virtual size_t size() const
The number of bytes in this dof.
virtual void new_jrm_state(bool xauto_access=true)
Creates a new jrm (join-reducible member) state in host() and attaches this to it.
schema_poset_member & fiber_schema()
The fiber schema component of this (mutable version).
int _db
The dimension of the base space component.
The default name space; a poset which contains other posets as members.
bool state_is_read_accessible() const
True if this is attached and if the state is accessible for read or access control is disabled...
virtual size_t size() const =0
The number of bytes in this dof.
poset_state_handle * _host
The host poset for this component.
subposet & evaluation()
The evaluation subposet for section spaces on this schema (mutable version).
A client handle for a general, abstract partially order set.
A three state "bool". Does not provide the operations of ternary logic and is intended for use mostly...
Definition: tern.h:45
total_poset_member _base_space
The base space componewnt of this.
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.
void update_row_cache_without_disc_id_space() const
Updates row cache using existing _discretization_id_space.
const scoped_index & index() const
The current item in the subset.
A path defined by a poset name and a member name separated by a forward slash (&#39;/&#39;). For example: "cell_definitions/triangle".
Definition: poset_path.h:48
dof_descriptor_array * dof_descriptors(bool xis_table_dof) const
The dof_descriptors_array for the table dof tuple (xis_table_dof true) or row dof tuple defined by th...
const index_space_family & member_id_spaces(bool xauto_access) const
Collection of member id spaces for this (const version).
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
STL namespace.
index_space_handle * _row_dof_id_space
The row dof id space for the schema defined by this.
bool is_same_state(const poset_state_handle *xhost, pod_index_type xhub_id) const
True is this is attached to state with hub id xhub_id in host xhost.
Specialization of the filtered depth-first iterator which exposes the POSTVISIT_ACTION to the client...
Definition: postorder_itr.h:40
An abstract handle to a space of alternate integer identifiers (aliases) for a subset of a hub set of...
virtual sheaf::primitive_type type() const =0
The primitive type index of the dof defined by this.
std::string row_dof_subposet_name() const
The standard name for the row dof subposet associated with this schema member. Synonym for dof_subpos...
virtual void release_id_space() const =0
Returns this id space handle to the handle pool.
virtual void get_read_access() const
Get read access to the state associated with this.
virtual namespace_poset * name_space() const
The namespace of host()
virtual dof_descriptor_array * dof_descriptors(bool xis_table_dof) const
The dof_descriptors_array for the table dof tuple (xis_table_dof true) or row dof tuple defined by th...
const scoped_index & index() const
The index of the component state this handle is attached to.
std::string name() const
A name for this.
virtual primitive_type type() const
The primitive type index of the dof defined by this.
bool is_factorable() const
True if this member is factorable into base space and fiber schema components.
virtual product_section_space_schema_member & operator=(const abstract_poset_member &xother)
Assignment operator; attaches this to the same state as xother.
An schema poset for a section space represented by a Cartesian product subspace of the tensor product...
void next()
Makes item the next member of the subset.
const scoped_index & index() const
The index of the current member of the iteration.
virtual void release_access(bool xall=false) const
Release access. If xall is true, release all levels of access. Otherwise, release one level of access...
virtual size_type offset(pod_index_type xdof_id, bool xis_table_dof) const
The offset for the table dof (xis_table_dof true) or row dof referred to by xdof_id in the schema def...
virtual size_t alignment() const =0
The alignment for this dof.
Abstract base class with useful features for all objects.
Definition: any.h:39
pod_index_type fiber_schema_id() const
The member id of the fiber schema component of this.
A map from Zn (the integers mod n) to bools. A characteristic function used to represent subsets of Z...
Definition: zn_to_bool.h:52
The lattice of closed cells of a cellular space; a lattice representation of a computational mesh...
A whitespace separated list of arguments. Insertion operaters are used to insert arguments into the l...
Definition: arg_list.h:63
virtual size_t alignment() const
The alignment for this dof.
const bool NOT_STRICT
Iteration strictness control.
Definition: sheaf.h:102
const bool DOWN
Iteration directions.
Definition: sheaf.h:77
virtual void update_row_cache(bool xupdate_id_space=false) const
Updates cached row properties.
scoped_index _row_cache_index
The index with respect to which the cached row properties were evaluated.
virtual pod_index_type get_ext_id(pod_index_type xint_id, const std::string &xid_space_name, bool xauto_access) const
Translates xint_id to an external id using the equivalence map with name xid_space_name.
primitive_type
Type ids for sheaf primitives.
bool state_is_read_write_accessible() const
True if this is attached and if the state is accessible for read and write or access control is disab...
A client handle for a mutable partially ordered set.
Definition: poset.h:40
size_type _row_dof_ct
The number of row dofs defined by this schema.
A map from schema poset member ids to dof values for primitives_poset members.
int table_dof_ct() const
The number of table dofs defined by this schema. Synonym for dof_ct(true).
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
size_type _row_dof_tuple_ub
The size in bytes of the row dof tuple defined by this schema.
virtual bool is_attached() const
True if this handle is attached to a non-void state.
dof_descriptor_array * _row_dof_descriptors
The dof_descriptors_array for the row dof tuple defined by this schema.
virtual void update_row_cache(bool xupdate_id_space=false) const
Updates cached row properties; if xupdate_id_space, force the update of the row dof id space...
virtual void new_jim_state(poset_dof_map *xdof_map=0, bool xcopy_dof_map=false, bool xauto_access=true)
Creates a new jim (join-irreducible member) state in xhost and attaches this to it.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
Definition: sheaf.h:52
static std::string intersection_id_space_name(const subposet &xsp, const pod_index_type xhub_id)
The name of the id space for intersection of xsp with the down set of the member with hub id xhub_id...
product_section_space_schema_member()
Default constructor; creates a new, unattached product_section_space_schema_member handle...
virtual poset_dof_iterator * dof_iterator(bool xis_table_dofs, int xversion=CURRENT_MEMBER_VERSION) const
A postorder iterator over the table (xis_table_dofs == true) or row (xis_table_dofs == false) dofs de...
int db(pod_index_type xmbr_hub_id) const
The base space dimension of the member with hub id xmbr_hub_id.
void reserve(size_type xcapacity)
Reserve enough memory for xcapacity number of ids.
virtual product_section_space_schema_member * clone() const
Make a new handle, no state instance of current.
virtual size_type ct() const =0
The number of members.
int discretization_ct() const
The number of members in the intersection of the discretization subposet and the down set of the base...
virtual bool invariant() const
Class invariant.
Iterates in postorder over dofs of a schema member anchor. Attaches an a handle of type section_space...
An array for storing structs which describe the size, alignment, and offset of dofs within a dof tupl...
subposet & discretization()
The discretization subposet for section spaces on this schema (mutable version).
int _row_cache_version
The version with respect to which the cached row properties were evaluated.
void disable_invariant_check() const
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing inv...
Definition: any.h:97
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 bool host_is_ancestor_of(const poset_state_handle *other) const
True if other conforms to host.
virtual pod_type pod(pod_type xid) const =0
The pod index in this space equivalent to xid in the hub id space.
const ij_product_structure & product_structure() const
The product structure of this poset.
virtual index_iterator * get_decomposition(pod_index_type xindex) const
An iterator over the members of the decomposition identified by xindex.
Iterates over the subset of Zn defined by the characteristic function host().
const scattered_insertion_index_space_handle & id_space() const
The id space for the members of with this (const version).
Definition: subposet.cc:508
virtual void detach_from_state()
Detach this handle from its state, if any.
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...
virtual bool contains_member(pod_index_type xmbr_hub_id, bool xauto_access=true) const
True if some version of this poset contains poset member with hub id xmbr_hub_id. ...
void next()
Makes this the next member of the subset.
size_type fiber_size() const
The number of bytes in the fiber.
const index_space_handle & fiber_schema_id_space(bool xis_table_dofs) const
The id space for the dofs in the down set of the fiber schema of this.
index_space_handle * _discretization_id_space
The id space for the discretization members in the down set of the base space of this.
size_t row_dof_tuple_ub() const
The size in bytes of the row dof tuple defined by this schema. Synonym for dof_tuple_ub(false).
bool invariant_check() const
True if invariant checking is enabled.
Definition: any.h:79
Iterates in postorder over dofs of a schema member anchor. Attaches a handle of type schema_poset_mem...
virtual schema_poset_member & ext_data_type_schema()
The schema for the external data type associated with this schema.
total_poset_member & base_space()
The base space component of this (mutable version).
poset_state_handle & fiber_schema()
The fiber schema for section spaces on this schema (mutable version).
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
A 2D implementation of abstract_product_structure.
void update_row_cache_with_disc_id_space() const
Updates row cache including _discretization_id_space.
int _evaluation_ct
The number of members in the intersection of the evaluation subposet the down set of the base space c...
virtual primitives_poset_dof_map & dof_map(bool xrequire_write_access=false)
The map from schema member ids or client ids to dof values for this poset member (mutable version) ...
bool is_done() const
True if iteration finished.
A handle for a scattered_insertion_index_space_state.
A client handle for a poset member which has been prepared for use as a schema for a section space...
bool contains(pod_type xid) const
True, if this contains an id space with id xid.
virtual subposet & jims()
The subset of all jims (mutable version)
virtual ~product_section_space_schema_member()
Destructor; deletes a poset member and its attached state, if any.
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_...
virtual bool is_ancestor_of(const any *other) const
True if other conforms to this.
void tuple(pod_index_type x, size_type xj_ub, pod_index_type &xi, pod_index_type &xj)
Ordinal to 2-tuple conversion.
virtual void 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 size_type offset(pod_index_type xdof_id, bool xis_table_dof) const
The offset for the table dof (xis_table_dof true) or row dof referred to by xdof_id in the schema def...
An abstract client handle for a member of a poset.
size_type ct(const std::string &xname) const
The number of members for the id space with name xname.
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.
Namespace for the fiber_bundles component of the sheaf system.
SHEAF_DLL_SPEC pod_index_type invalid_pod_index()
The invalid pod index value.
Definition: pod_types.cc:31
virtual void attach_to_state(pod_index_type xbase_space_id, pod_index_type xfiber_schema_id)=0
Attach to the state in host() with component ids xbase_id and xfiber_schema_id.
int _discretization_ct
The number of members in the intersection of the discretization subposet the down set of the base spa...
virtual primitives_poset_dof_map & dof_map(bool xrequire_write_access=false)
The map from schema member ids or client ids to dof values for this poset member (mutable version) ...
void enable_invariant_check() const
Enable invariant checking.
Definition: any.h:87
A client handle for a poset member which has been prepared for use as a schema.
product_section_space_schema_poset * host() const
The poset which this is a handle to a component of.
virtual index_iterator indexed_member_iterator() const
An iterator for members of this poset; index version.
Definition: subposet.cc:934
bool has_version(int xversion) const
True if xversion is a valid version for this.
void force(int i, bool value)
Sets the i-th member to value, extends the upper bound if necessary.
Definition: zn_to_bool.cc:607
base_space_poset & base_space()
The base space for section spaces on this schema.
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.
Definition: scoped_index.h:710
pod_index_type _base_space_id
The member id of the base space component of this.
A client handle for a poset member which has been prepared for use as a schema for a section space...
pod_index_type base_space_id() const
The member id of the base space component of this.