SheafSystem  0.0.0.0
at3.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/at3.h"
22 
23 #include "SheafSystem/abstract_poset_member.impl.h"
24 #include "SheafSystem/assert_contract.h"
25 #include "SheafSystem/at0.h"
26 #include "SheafSystem/at1_space.h"
27 #include "SheafSystem/fiber_bundles_namespace.h"
28 #include "SheafSystem/schema_poset_member.h"
29 #include "SheafSystem/wsv_block.h"
30 
31 using namespace std;
32 using namespace fiber_bundle; // Workaround for MS C++ bug.
33 
34 
35 //==============================================================================
36 // CLASS AT3_LITE
37 //==============================================================================
38 
39 //==============================================================================
40 // AT3 FACET OF CLASS AT3_LITE
41 //==============================================================================
42 
43 // PUBLIC MEMBER FUNCTIONS
44 
47 {
48 
49  // Preconditions:
50 
51  // Body:
52 
53  // Postconditions:
54 
55  ensure(invariant());
56 
57  // Exit:
58 }
59 
61 at3_lite(const at3_lite& xother)
62 {
63  // Preconditions:
64 
65  // Body:
66 
67  *this = xother;
68 
69  // Postconditions:
70 
71  ensure(invariant());
72 
73  // Exit:
74 }
75 
78 operator=(const at3_lite& xother)
79 {
80 
81  // Preconditions:
82 
83 
84  // Body:
85 
86 
87  // Postconditions:
88 
89  ensure(invariant());
90 
91  // Exit:
92 
93  return *this;
94 }
95 
98 {
99  // Preconditions:
100 
101  // Body:
102 
103  // Postconditions:
104 
105  // Exit:
106 
107 }
108 
110 at3_lite(const row_dofs_type& xrow_dofs)
111 {
112  // Preconditions:
113 
114  // Body:
115 
116  *this = xrow_dofs;
117 
118  // Postconditions:
119 
120  ensure(invariant());
121 
122  // Exit:
123 }
124 
127 operator=(const row_dofs_type& xrow_dofs)
128 {
129  // Preconditions:
130 
131  // Body:
132 
133  vd_lite::operator=(xrow_dofs);
134 
135  // Postconditions:
136 
137  postcondition_of(vd_lite::operator=(xrow_dofs));
138 
139  // Exit:
140 
141  return *this;
142 
143 }
144 
145 // PROTECTED MEMBER FUNCTIONS
146 
147 // PRIVATE MEMBER FUNCTIONS
148 
149 
150 //==============================================================================
151 // ATP FACET OF CLASS AT3_LITE
152 //==============================================================================
153 
154 // PUBLIC MEMBER FUNCTIONS
155 
156 int
158 p() const
159 {
160  // Preconditions:
161 
162  // Body:
163 
164  int result = 3;
165 
166  // Postconditions:
167 
168  ensure(invariant());
169  ensure(result == 3);
170 
171  // Exit:
172 
173  return result;
174 }
175 
176 // PROTECTED MEMBER FUNCTIONS
177 
178 // PRIVATE MEMBER FUNCTIONS
179 
180 
181 //==============================================================================
182 // VD FACET OF CLASS AT3_LITE
183 //==============================================================================
184 
185 // PUBLIC MEMBER FUNCTIONS
186 
189 component(int xi, int xj, int xk) const
190 {
191  // Preconditions:
192 
193  require((0 <= xi) && (xi < dd()));
194  require((0 <= xj) && (xj < dd()));
195  require((0 <= xk) && (xk < dd()));
196 
197  // Body:
198 
199  //$$SCRIBBLE: For at3_e3 we know that d=1 meaning we have only
200  // one component. So we use the Levi-Civita (permutation)
201  // symbol for accessing the "components".
202 
204 
205  static const int levi_civita[27] =
206  {0, 0, 0, 0, 0, 1, 0, -1, 0,
207  0, 0, -1, 0, 0, 0, 1, 0, 0,
208  0, 1, 0, -1, 0, 0, 0, 0, 0};
209 
210  int ldd = dd();
211  int lindex = (xi*ldd + xj)*ldd + xk;
212  int lindex_value = levi_civita[lindex];
213 
214  value_type result = (lindex_value != 0)
215  ? (lindex_value*component(0)) : 0;
216 
217  // Postconditions:
218 
219  ensure(invariant());
220 
221  // Exit:
222 
223  return result;
224 }
225 
226 void
228 put_component(int xi, int xj, int xk, value_type xvalue)
229 {
230  // Preconditions:
231 
232  require((0 <= xi) && (xi < dd()));
233  require((0 <= xj) && (xj < dd()));
234  require((0 <= xk) && (xk < dd()));
235 
236  // Body:
237 
238  //@hack We have only ONE component (for at3_e3).
239  // This function is only here to allow things
240  // to work generically.
241 
242  //@issue Decide what we want to do here and fix it.
243 
244  static const int levi_civita[27] =
245  {0, 0, 0, 0, 0, 1, 0, -1, 0,
246  0, 0, -1, 0, 0, 0, 1, 0, 0,
247  0, 1, 0, -1, 0, 0, 0, 0, 0};
248 
249  int ldd = dd();
250  int lindex = (xi*ldd + xj)*ldd + xk;
251  int lindex_value = levi_civita[lindex];
252 
253  if(lindex_value != 0)
254  {
255  put_component(0, xvalue);
256  }
257 
258  cout << "+++++++++++++++++ component(xi, xj, xk) = "\
259  << component(xi, xj, xk) << endl;
260 
261  // Postconditions:
262 
263  ensure(isunordered_or_equals(component(xi, xj, xk), xvalue*lindex_value));
264 
265  // Exit:
266 
267  return;
268 }
269 
270 int
272 index_for_ijk(int xi, int xj, int xk) const
273 {
274  // Preconditions:
275 
276  require((0 <= xi) && (xi < dd()));
277  require((0 <= xj) && (xj < dd()));
278  require((0 <= xk) && (xk < dd()));
279 
280  // Body:
281 
282  int result = 0;
283 
284  // Postconditions:
285 
286  ensure(result == 0);
287 
288  // Exit:
289 
290  return result;
291 }
292 
293 // PROTECTED MEMBER FUNCTIONS
294 
295 // PRIVATE MEMBER FUNCTIONS
296 
297 
298 //==============================================================================
299 // TUPLE FACET OF CLASS AT3_LITE
300 //==============================================================================
301 
302 // PUBLIC MEMBER FUNCTIONS
303 
304 // PROTECTED MEMBER FUNCTIONS
305 
306 // PRIVATE MEMBER FUNCTIONS
307 
308 
309 //==============================================================================
310 // ABSTRACT POSET MEMBER FACET OF CLASS AT3_LITE
311 //==============================================================================
312 
313 // PUBLIC MEMBER FUNCTIONS
314 
315 const std::string&
317 class_name() const
318 {
319  // Preconditions:
320 
321  // Body:
322 
323  const string& result = static_class_name();
324 
325  // Postconditions:
326 
327  ensure(!result.empty());
328 
329  // Exit:
330 
331  return result;
332 }
333 
334 const std::string&
337 {
338  // Preconditions:
339 
340  // Body:
341 
342  static const string result("at3_lite");
343 
344  // Postconditions:
345 
346  ensure(!result.empty());
347 
348  // Exit:
349 
350  return result;
351 }
352 
355 clone() const
356 {
357  at3_lite* result = 0;
358 
359  // Preconditions:
360 
361  // Body:
362 
363  result = new at3_lite();
364 
365  // Postconditions:
366 
367  ensure(result != 0);
368  ensure(is_same_type(*result));
369 
370  // Exit:
371 
372  return result;
373 }
374 
375 // PROTECTED MEMBER FUNCTIONS
376 
377 // PRIVATE MEMBER FUNCTIONS
378 
379 
380 //==============================================================================
381 // ANY FACET OF CLASS AT3_LITE
382 //==============================================================================
383 
384 // PUBLIC MEMBER FUNCTIONS
385 
386 bool
388 is_ancestor_of(const any_lite& xother) const
389 {
390  // Preconditions:
391 
392  require(&xother != 0);
393 
394  // Body:
395 
396  // True if other conforms to this.
397 
398  bool result = dynamic_cast<const at3_lite*>(&xother) != 0;
399 
400  // Postconditions:
401 
402  return result;
403 }
404 
405 bool
407 invariant() const
408 {
409  bool result = true;
410 
411  if(invariant_check())
412  {
413  // Prevent recursive calls to invariant.
414 
415  disable_invariant_check();
416 
417  // Must satisfy base class invariant.
418 
419  invariance(atp_lite::invariant());
420 
421  // Invariances for this class:
422 
423  // Finished, turn invariant checking back on.
424 
425  enable_invariant_check();
426  }
427 
428  // Exit
429 
430  return result;
431 }
432 
433 // PROTECTED MEMBER FUNCTIONS
434 
435 // PRIVATE MEMBER FUNCTIONS
436 
437 
438 //==============================================================================
439 // CLASS AT3
440 //==============================================================================
441 
442 // ===========================================================
443 // HOST FACTORY FACET OF CLASS AT3
444 // ===========================================================
445 
446 // PUBLIC MEMBER FUNCTIONS
447 
448 const sheaf::poset_path&
451 {
452  // Preconditions:
453 
454 
455  // Body:
456 
457  static const poset_path result(standard_schema_poset_name(), "at3_schema");
458 
459  // Postconditions:
460 
461  // Exit:
462 
463  return result;
464 }
465 
466 void
469 {
470  // Preconditions:
471 
472  require(xns.state_is_read_write_accessible());
473  require(xns.contains_poset(standard_schema_poset_name()));
474  require(!xns.contains_poset_member(standard_schema_path()));
475 
476 
477  // Body:
478 
479  schema_poset_member lschema(xns,
480  standard_schema_path().member_name(),
481  atp::standard_schema_path(),
482  "",
483  false);
484 
485  lschema.detach_from_state();
486 
487  // Postconditions:
488 
489  ensure(xns.contains_poset_member(standard_schema_path()));
490 
491  // Exit:
492 
493  return;
494 }
495 
499  const poset_path& xhost_path,
500  const poset_path& xschema_path,
501  const poset_path& xscalar_space_path,
502  bool xauto_access)
503 {
504  // cout << endl << "Entering at3::new_host." << endl;
505 
506  // Preconditions:
507 
508  require(xns.state_is_auto_read_write_accessible(xauto_access));
509 
510  require(!xhost_path.empty());
511  require(!xns.contains_path(xhost_path, xauto_access));
512 
513  require(xschema_path.full());
514  require(xns.path_is_auto_read_accessible(xschema_path, xauto_access));
515  require(schema_poset_member::conforms_to(xns, xschema_path, standard_schema_path()));
516 
517  require(xns.path_is_auto_read_accessible(xscalar_space_path, xauto_access));
518  require(xns.contains_poset<scalar_type::host_type>(xscalar_space_path, xauto_access));
519 
520  // Body:
521 
522  host_type& result =
523  host_type::new_table(xns, xhost_path, xschema_path, 3, xscalar_space_path, xauto_access);
524 
525  // Postconditions:
526 
527  ensure(xns.owns(result, xauto_access));
528  ensure(result.path(true) == xhost_path);
529  ensure(result.state_is_not_read_accessible());
530  ensure(result.schema(true).path(xauto_access) == xschema_path);
531 
532  ensure(result.factor_ct(true) == result.d(true));
533  ensure(result.d(true) == schema_poset_member::row_dof_ct(xns, xschema_path, xauto_access));
534  ensure(result.scalar_space_path(true) == xscalar_space_path );
535  ensure(result.p(true) == 3);
536  ensure(result.dd(true) == result.d(true));
537  ensure(result.vector_space_path(true) == xhost_path );
538 
539  // Exit:
540 
541  // cout << "Leaving at3::new_host." << endl;
542  return result;
543 }
544 
545 // PROTECTED MEMBER FUNCTIONS
546 
547 // PRIVATE MEMBER FUNCTIONS
548 
549 
550 //==============================================================================
551 // AT3 FACET OF CLASS AT3
552 //==============================================================================
553 
554 // PUBLIC MEMBER FUNCTIONS
555 
558 {
559 
560  // Preconditions:
561 
562  // Body:
563 
564  // Postconditions:
565 
566  ensure(invariant());
567 }
568 
570 at3(const poset_state_handle* xhost, pod_index_type xhub_id)
571 {
572  // Preconditions:
573 
574  require(xhost != 0);
575  require(xhost->state_is_read_accessible());
576  require(xhost->contains_member(xhub_id));
577 
578  // Body:
579 
580  attach_to_state(xhost, xhub_id);
581 
582  // Postconditions:
583 
584  ensure(invariant());
585  // ensure(host() == xhost);
586  ensure(index() == xhub_id);
587  ensure(is_attached());
588 }
589 
591 at3(const poset_state_handle* xhost, const scoped_index& xid)
592 {
593  // Preconditions:
594 
595  require(xhost != 0);
596  require(xhost->state_is_read_accessible());
597  require(xhost->contains_member(xid));
598 
599  // Body:
600 
601  attach_to_state(xhost, xid.hub_pod());
602 
603  // Postconditions:
604 
605  ensure(invariant());
606  // ensure(host() == xhost);
607  ensure(index() ==~ xid);
608  ensure(is_attached());
609 }
610 
612 at3(const poset_state_handle* xhost, const std::string& xname)
613 {
614 
615  // Preconditions:
616 
617  require(xhost != 0);
618  require(xhost->state_is_read_accessible());
619  require(!xname.empty());
620  require(xhost->contains_member(xname));
621 
622  // Body:
623 
624  attach_to_state(xhost, xname);
625 
626  // Postconditions:
627 
628  ensure(invariant());
629  // ensure(host() == xhost);
630  ensure(name() == xname);
631  ensure(is_attached());
632 
633 }
634 
637 {
638 
639  // Preconditions:
640 
641  require(xother != 0);
642 
643  // Body:
644 
645  attach_to_state(xother);
646 
647  // Postconditions:
648 
649  ensure(invariant());
650  ensure(is_attached());
651  ensure(is_same_state(xother));
652 
653 }
654 
656 at3(poset_state_handle* xhost, bool xauto_access)
657 {
658 
659  // Preconditions:
660 
661  require(precondition_of(new_jim_state(xhost, 0, false, xauto_access)));
662 
663  // Body:
664 
665  new_jim_state(xhost, 0, false, xauto_access);
666 
667  // Postconditions:
668 
669  ensure(postcondition_of(new_jim_state(xhost, 0, false, xauto_access)));
670 
671  // Exit:
672 
673  return;
674 }
675 
680 {
681  // Preconditions:
682 
683  require(is_ancestor_of(&xother));
684  require(precondition_of(attach_to_state(&xother)));
685 
686  // Body:
687 
688  attach_to_state(&xother);
689 
690  // Postconditions:
691 
692  ensure(postcondition_of(attach_to_state(&xother)));
693 
694  // Exit:
695 
696  return *this;
697 }
698 
702 operator=(const at3& xother)
703 {
704  // Preconditions:
705 
706  require(precondition_of(attach_to_state(&xother)));
707 
708  // Body:
709 
710  attach_to_state(&xother);
711 
712  // Postconditions:
713 
714  ensure(postcondition_of(attach_to_state(&xother)));
715 
716  // Exit:
717 
718  return *this;
719 }
720 
723 {
724 
725  // Preconditions:
726 
727  // Body:
728 
729  // Postconditions:
730 
731 }
732 
736 {
737  // Preconditions:
738 
739  // Body:
740 
741  static const volatile_type result;
742 
743  // Postconditions:
744 
745  // Exit:
746 
747  return result;
748 }
749 
753 lite_type() const
754 {
755  // Preconditions:
756 
757  // Body:
758 
759  volatile_type* result = new volatile_type(sheaf::row_dofs(*this));
760 
761  // Postconditions:
762 
763  // Exit:
764 
765  return result;
766 }
767 
770 component(int xi, int xj, int xk) const
771 {
772  // Preconditions:
773 
774  require(state_is_read_write_accessible());
775  require((0 <= xi) && (xi < dd()));
776  require((0 <= xj) && (xj < dd()));
777  require((0 <= xk) && (xk < dd()));
778 
779  // Body:
780 
781  //$$SCRIBBLE: For at3_e3 we know that d=1 meaning we have only
782  // one component. So we use the Levi-Civita (permutation)
783  // symbol for accessing the "components".
784 
786 
787  static const int levi_civita[27] =
788  {0, 0, 0, 0, 0, 1, 0, -1, 0,
789  0, 0, -1, 0, 0, 0, 1, 0, 0,
790  0, 1, 0, -1, 0, 0, 0, 0, 0};
791 
792  int ldd = dd();
793  int lindex = (xi*ldd + xj)*ldd + xk;
794  int lindex_value = levi_civita[lindex];
795 
796  value_type result = (lindex_value != 0)
797  ? (lindex_value*component(0)) : 0;
798 
799  // Postconditions:
800 
801  ensure(invariant());
802 
803  // Exit:
804 
805  return result;
806 }
807 
810 component(int xi, int xj, int xk, bool xauto_access) const
811 {
812  // Preconditions:
813 
814  require(state_is_auto_read_accessible(xauto_access));
815  require(precondition_of(component(xi, xj, xk)));
816 
817  // Body:
818 
819  if(xauto_access)
820  {
821  get_read_access();
822  }
823 
824  value_type result = component(xi, xj, xk);
825 
826  if(xauto_access)
827  {
828  release_access();
829  }
830 
831  // Postconditions:
832 
833  ensure(postcondition_of(component(xi, xj, xk)));
834 
835  // Exit:
836 
837  return result;
838 }
839 
840 void
842 put_component(int xi, int xj, int xk, value_type xvalue)
843 {
844 
845  // Preconditions:
846 
847  require(state_is_read_write_accessible());
848  require((0 <= xi) && (xi < dd()));
849  require((0 <= xj) && (xj < dd()));
850  require((0 <= xk) && (xk < dd()));
851 
852  //@hack We have only ONE component (for at3_e3).
853  // This function is only here to allow things
854  // to work generically.
855 
856  //@issue Decide what we want to do here and fix it.
857 
858  static const int levi_civita[27] =
859  {0, 0, 0, 0, 0, 1, 0, -1, 0,
860  0, 0, -1, 0, 0, 0, 1, 0, 0,
861  0, 1, 0, -1, 0, 0, 0, 0, 0};
862 
863  int ldd = dd();
864  int lindex = (xi*ldd + xj)*ldd + xk;
865  int lindex_value = levi_civita[lindex];
866 
867  if(lindex_value != 0)
868  {
869  value_type lvalue = xvalue*lindex_value;
870  put_component(0, lvalue);
871  }
872 
873  // Postconditions:
874 
875  ensure(isunordered_or_equals(component(xi, xj, xk), xvalue));
876 
877  // Exit:
878 
879  return;
880 }
881 
882 void
884 put_component(int xi, int xj, int xk, value_type xvalue,
885  bool xauto_access)
886 {
887 
888  // Preconditions:
889 
890  require(state_is_auto_read_write_accessible(xauto_access));
891  require(precondition_of(put_component(xi, xj, xk, xvalue)));
892 
893  // Body:
894 
895  if(xauto_access)
896  {
897  get_read_write_access(true);
898  }
899 
900  put_component(xi, xj, xk, xvalue);
901 
902  if(xauto_access)
903  {
904  release_access();
905  }
906 
907  // Postconditions:
908 
909  ensure(postcondition_of(put_component(xi, xj, xk, xvalue)));
910 
911  // Exit:
912 
913  return;
914 }
915 
916 int
918 index_for_ijk(int xi, int xj, int xk) const
919 {
920  // Preconditions:
921 
922  require((0 <= xi) && (xi < dd()));
923  require((0 <= xj) && (xj < dd()));
924  require((0 <= xk) && (xk < dd()));
925 
926  // Body:
927 
928  int result = 0;
929 
930  // Postconditions:
931 
932  ensure(result == 0);
933 
934  // Exit:
935 
936  return result;
937 }
938 
939 // PROTECTED MEMBER FUNCTIONS
940 
941 // PRIVATE MEMBER FUNCTIONS
942 
943 
944 //==============================================================================
945 // ATP FACET OF CLASS AT3
946 //==============================================================================
947 
948 // PUBLIC MEMBER FUNCTIONS
949 
950 // PROTECTED MEMBER FUNCTIONS
951 
952 // PRIVATE MEMBER FUNCTIONS
953 
954 
955 //==============================================================================
956 // TP FACET OF CLASS AT3
957 //==============================================================================
958 
959 // PUBLIC MEMBER FUNCTIONS
960 
961 // PROTECTED MEMBER FUNCTIONS
962 
963 // PRIVATE MEMBER FUNCTIONS
964 
965 
966 //==============================================================================
967 // VD FACET OF CLASS AT3
968 //==============================================================================
969 
970 // PUBLIC MEMBER FUNCTIONS
971 
972 // PROTECTED MEMBER FUNCTIONS
973 
974 // PRIVATE MEMBER FUNCTIONS
975 
976 
977 //==============================================================================
978 // TUPLE FACET OF CLASS AT3
979 //==============================================================================
980 
981 // PUBLIC MEMBER FUNCTIONS
982 
983 // PROTECTED MEMBER FUNCTIONS
984 
985 // PRIVATE MEMBER FUNCTIONS
986 
987 
988 //==============================================================================
989 // TUPLE FACET OF CLASS AT3
990 //==============================================================================
991 
992 // PUBLIC MEMBER FUNCTIONS
993 
994 // PROTECTED MEMBER FUNCTIONS
995 
996 // PRIVATE MEMBER FUNCTIONS
997 
998 
999 //==============================================================================
1000 // ABSTRACT POSET MEMBER FACET OF CLASS AT3
1001 //==============================================================================
1002 
1003 // PUBLIC MEMBER FUNCTIONS
1004 
1005 const std::string&
1007 class_name() const
1008 {
1009  // Preconditions:
1010 
1011  // Body:
1012 
1013  const string& result = static_class_name();
1014 
1015  // Postconditions:
1016 
1017  ensure(!result.empty());
1018 
1019  // Exit:
1020 
1021  return result;
1022 }
1023 
1024 const std::string&
1027 {
1028  // Preconditions:
1029 
1030  // Body:
1031 
1032  static const string result("at3");
1033 
1034  // Postconditions:
1035 
1036  ensure(!result.empty());
1037 
1038  // Exit:
1039 
1040  return result;
1041 }
1042 
1045 clone() const
1046 {
1047 
1048  // Preconditions:
1049 
1050  // Body:
1051 
1052  // Create new handle of the current class.
1053 
1054  at3* result = new at3();
1055 
1056  // Postconditions:
1057 
1058  ensure(result != 0);
1059  ensure(result->invariant());
1060 
1061  // Exit:
1062 
1063  return result;
1064 
1065 }
1066 
1067 // PROTECTED MEMBER FUNCTIONS
1068 
1069 // PRIVATE MEMBER FUNCTIONS
1070 
1071 
1072 //==============================================================================
1073 // ANY FACET OF CLASS AT3
1074 //==============================================================================
1075 
1076 // PUBLIC MEMBER FUNCTIONS
1077 
1078 bool
1080 is_ancestor_of(const any* xother) const
1081 {
1082 
1083  // Preconditions:
1084 
1085  require(xother != 0);
1086 
1087  // Body:
1088 
1089  // If xother may be dynamically cast to the type of this then this is an
1090  // ancestor of other.
1091 
1092  bool result = dynamic_cast<const at3*>(xother) != 0;
1093 
1094  // Postconditions:
1095 
1096  ensure(invariant());
1097  ensure(xother->invariant());
1098 
1099  // Exit:
1100 
1101  return result;
1102 
1103 }
1104 
1105 bool
1107 invariant() const
1108 {
1109  bool result = true;
1110 
1111  // Body:
1112 
1113  if (invariant_check())
1114  {
1115  // Prevent recursive calls to invariant.
1116 
1117  disable_invariant_check();
1118 
1119  // Must satisfy base class invariant.
1120 
1121  invariance(atp::invariant());
1122 
1123  // Invariances for this class:
1124 
1125  invariance((state_is_read_accessible() ? p() == 3 : true));
1126 
1127  // Finished, turn invariant checking back on.
1128 
1129  enable_invariant_check();
1130  }
1131 
1132  // Exit:
1133 
1134  return result;
1135 }
1136 
1137 
virtual bool invariant() const
Class invariant, intended to be redefined in each descendant. See below for template for invariant in...
Definition: any.cc:153
virtual poset_path path(bool xauto_access=true) const
The path of this poset.
bool state_is_auto_read_write_accessible(bool xauto_access) const
True if state is auto accessible for read and write, that is, if the state is already accessible for ...
An antisymmetric rank 3 tensor over an abstract vector space (volatile version).
Definition: at3.h:43
static const poset_path & standard_schema_path()
The path to the standard schema for this class.
Definition: at3.cc:450
vd_value_type value_type
The type of component in the fiber; the scalar type in the fiber vector space.
Definition: vd.h:129
bool full() const
True if both poset name and member name are not empty.
Definition: poset_path.cc:311
static int d(const namespace_poset &xns, int xp, const poset_path &xvector_space_path, bool xauto_access)
The tensor dimension implied by tensor degree xp and the dimension of the domain vector space specifi...
Definition: atp_space.cc:86
virtual at3 * clone() const
Make a new handle, no state instance of current.
Definition: at3.cc:1045
poset_path path(bool xauto_access=true) const
A path to this component.
virtual bool is_ancestor_of(const any_lite &xother) const
Conformance test; true if other conforms to this.
Definition: at3.cc:388
The default name space; a poset which contains other posets as members.
virtual int index_for_ijk(int xi, int xj, int xk) const
The index into linear storage of the component for specified indices xi, xj, xk.
Definition: at3.cc:918
bool state_is_read_accessible() const
True if this is attached and if the state is accessible for read or access control is disabled...
bool path_is_auto_read_accessible(const poset_path &xpath, bool xauto_access) const
True if the state referred to xpath exists and is auto read accessible.
The standard fiber bundles name space; extends the standard sheaves namespace by defining base space...
poset_path vector_space_path() const
The path of the underlying vector space.
Definition: tp_space.cc:365
bool contains_poset_member(pod_index_type xposet_hub_id, pod_index_type xmember_hub_id, bool xauto_access=true) const
True if this contains a poset with hub id xposet_hub_id which contains a member with hub id xmember_h...
A client handle for a general, abstract partially order set.
at3_lite & operator=(const at3_lite &xother)
Assignment operator.
Definition: at3.cc:78
virtual int index_for_ijk(int xi, int xj, int xk) const
The index into linear storage of the component for specified indices xi, xj, xk.
Definition: at3.cc:272
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
virtual const std::string & class_name() const
The name of this class.
Definition: at3.cc:317
STL namespace.
virtual at3_lite * clone() const
Virtual constructor, makes a new instance of the same type as this.
Definition: at3.cc:355
bool is_ancestor_of(const any *xother) const
True if other conforms to current.
Definition: at3.cc:1080
virtual value_type component(int xi, int xj, int xk) const
The value of component with indices xi, xj, xk.
Definition: at3.cc:770
bool invariant() const
Class invariant.
Definition: at3.cc:407
T::row_dofs_type & row_dofs(T &x0)
The row dofs pod type for x0 (mutable version).
static const std::string & static_class_name()
The name of this class.
Definition: at3.cc:1026
Abstract base class with useful features for all volatile objects.
Definition: any_lite.h:48
Abstract base class with useful features for all objects.
Definition: any.h:39
virtual value_type component(int xi, int xj, int xk) const
The value of component with indices xi, xj, xk.
Definition: at3.cc:189
virtual schema_poset_member & schema()
The schema for this poset (mutable version).
at3_lite()
Default constructor.
Definition: at3.cc:46
A space of scalars viewed as an antisymmetric tensor space of degree 0.
Definition: at0_space.h:42
An abstract antisymmetric tensor space of degree p.
Definition: atp_space.h:42
bool state_is_read_write_accessible() const
True if this is attached and if the state is accessible for read and write or access control is disab...
virtual void put_component(int xi, int xj, int xk, value_type xvalue)
Sets the component with indices xi, xj, xk to xvalue.
Definition: at3.cc:228
bool owns(const poset_state_handle &xposet, bool xauto_access) const
True if and only if this contains the poset xposet. synonym for contains_poset(xposet.poset_path(true), xauto_access)
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
static void make_standard_schema(namespace_poset &xns)
Creates the standard schema for this class in namespace xns.
Definition: at3.cc:468
bool contains_path(const poset_path &xpath, bool xauto_access=true) const
True if this contains the poset or poset member specified by xpath.
virtual ~at3_lite()
Destructor.
Definition: at3.cc:97
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. ...
int p(int xd, int xdd) const
Tensor degree as a function of tensor dimension xd and domain dimension xdd.
Definition: tp_space.cc:235
static const std::string & static_class_name()
The name of this class.
Definition: at3.cc:336
bool invariant() const
Class invariant.
Definition: at3.cc:1107
An antisymmetric rank 3 tensor over an abstract vector space (volatile version).
Definition: at3.h:230
bool empty() const
True if both poset name and member name are empty.
Definition: poset_path.cc:291
virtual const std::string & class_name() const
The name of this class.
Definition: at3.cc:1007
bool contains_poset(pod_index_type xhub_id, bool xauto_access=true) const
True if this contains a poset with hub id xhub_id..
poset_path scalar_space_path() const
The path of the underlying space of scalars.
Definition: vd_space.cc:250
virtual at3 & operator=(const abstract_poset_member &xother)
Assignment operator; synonym for attach_to_state(&xother).
Definition: at3.cc:679
static host_type & new_host(namespace_type &xns, const poset_path &xhost_path, const poset_path &xschema_path, const poset_path &xscalar_space_path, bool xauto_access)
Creates a new host table for members of this type. The poset is created in namespace xns with path xh...
Definition: at3.cc:498
static int factor_ct(int xd)
Factor_ct() as a function of dimension xd.
Definition: vd_space.cc:167
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
vd_value_type value_type
The POD ("plain old data") type of scalar in the vector space of this.
Definition: vd.h:423
int dd() const
The dimension of the underlying ("domain") vector space.
Definition: tp_space.cc:317
virtual void put_component(int xi, int xj, int xk, value_type xvalue)
Sets the component with indices xi, xj, xk to xvalue.
Definition: at3.cc:842
An abstract client handle for a member of a poset.
virtual int p() const
Degree of this as an antisymmetric tensor space.
Definition: at3.cc:158
at3()
Default constructor.
Definition: at3.cc:557
Namespace for the fiber_bundles component of the sheaf system.
virtual const volatile_type & lite_prototype() const
Virtual constructor for the associated volatile type.
Definition: at3.cc:735
Row dofs type for class vd.
Definition: vd.h:61
~at3()
Destructor.
Definition: at3.cc:722
bool state_is_not_read_accessible() const
True if this is attached and if the state is accessible for read or if access control is disabled...
virtual volatile_type * lite_type() const
Virtual conversion to the associated volatile type.
Definition: at3.cc:753
A client handle for a poset member which has been prepared for use as a schema.
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.
Definition: scoped_index.h:710
SHEAF_DLL_SPEC bool isunordered_or_equals(float x1, float x2)
True if isunordered(x1, x2) or x1 == x2.
Definition: sheaf.cc:102