SheafSystem  0.0.0.0
sec_atp.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/sec_atp.h"
22 
23 #include "SheafSystem/assert_contract.h"
24 #include "SheafSystem/atp.h"
25 #include "SheafSystem/atp_space.h"
26 #include "SheafSystem/binary_section_space_schema_member.impl.h"
27 #include "SheafSystem/binary_section_space_schema_poset.h"
28 #include "SheafSystem/fiber_bundles_namespace.h"
29 #include "SheafSystem/section_space_schema_member.impl.h"
30 #include "SheafSystem/section_space_schema_poset.h"
31 #include "SheafSystem/sec_at1.h"
32 #include "SheafSystem/sec_at1_space.h"
33 #include "SheafSystem/sec_atp_space.h"
34 #include "SheafSystem/sec_tuple_space.impl.h"
35 
36 
37 using namespace std;
38 using namespace fiber_bundle; // Workaround for MS C++ bug.
39 
40 //==============================================================================
41 // CLASS SEC_ATP
42 //==============================================================================
43 
44 // ===========================================================
45 // HOST FACTORY FACET OF CLASS SEC_ATP
46 // ===========================================================
47 
48 // PUBLIC MEMBER FUNCTIONS
49 
53  const poset_path& xhost_path,
54  const poset_path& xschema_path,
55  const poset_path& xvector_space_path,
56  bool xauto_access)
57 {
58  // cout << endl << "Entering sec_atp::new_host." << endl;
59 
60  // Preconditions:
61 
62  require(xns.state_is_auto_read_write_accessible(xauto_access));
63 
64  require(!xhost_path.empty());
65  require(!xns.contains_path(xhost_path, xauto_access));
66 
67  require(xschema_path.full());
68  require(xns.path_is_auto_read_accessible<schema_type::host_type>(xschema_path, xauto_access));
69  require(host_type::fiber_space_conforms<fiber_type::host_type>(xns, xschema_path, xauto_access));
70 
71  require(xns.path_is_auto_read_accessible<vector_space_type::host_type>(xvector_space_path, xauto_access));
72 
73  require(host_type::same_vector_fiber_space(xns, xschema_path, xvector_space_path, xauto_access));
74 
75  // Body:
76 
77  host_type& result = host_type::new_table(xns, xhost_path, xschema_path, xvector_space_path, xauto_access);
78 
79  // Postconditions:
80 
81  ensure(xns.owns(result, xauto_access));
82  ensure(result.path(true) == xhost_path);
83  ensure(result.state_is_not_read_accessible());
84  ensure(result.schema(true).path(xauto_access) == xschema_path);
85 
86  ensure(result.factor_ct(true) == result.schema(true).fiber_space<fiber_type::host_type>().factor_ct(xauto_access));
87  ensure(result.d(true) == result.schema(true).fiber_space<fiber_type::host_type>().d(xauto_access));
88  ensure(result.scalar_space_path(true) ==
89  xns.member_poset<vector_space_type::host_type>(xvector_space_path, xauto_access).scalar_space_path(xauto_access));
90  ensure(result.p(true) == result.schema(true).fiber_space<fiber_type::host_type>().p(xauto_access));
91  ensure(result.dd(true) == result.schema(true).fiber_space<fiber_type::host_type>().dd(xauto_access));
92  ensure(result.vector_space_path(true) == xvector_space_path);
93 
94  // Exit:
95 
96  // cout << "Leaving sec_atp::new_host." << endl;
97  return result;
98 }
99 
100 // PROTECTED MEMBER FUNCTIONS
101 
102 // PRIVATE MEMBER FUNCTIONS
103 
104 
105 //==============================================================================
106 // ATP FACET OF CLASS SEC_ATP
107 //==============================================================================
108 
109 // PUBLIC MEMBER FUNCTIONS
110 
113 {
114 
115  // Preconditions:
116 
117  // Body:
118 
119  // Postconditions:
120 
121  ensure(invariant());
122 }
123 
125 sec_atp(const sec_rep_space* xhost, pod_index_type xhub_id)
126 {
127  // Preconditions:
128 
129  require(xhost != 0);
130  require(xhost->state_is_read_accessible());
131  require(xhost->contains_member(xhub_id));
132 
133  // Body:
134 
135  attach_to_state(xhost, xhub_id);
136 
137  // Postconditions:
138 
139  ensure(invariant());
140  //ensure(host() == xhost);
141  ensure(index() == xhub_id);
142  ensure(is_attached());
143  ensure(!is_restricted());
144 }
145 
147 sec_atp(const sec_rep_space* xhost, const scoped_index& xid)
148 {
149  // Preconditions:
150 
151  require(xhost != 0);
152  require(xhost->state_is_read_accessible());
153  require(xhost->contains_member(xid));
154 
155  // Body:
156 
157  attach_to_state(xhost, xid.hub_pod());
158 
159  // Postconditions:
160 
161  ensure(invariant());
162  //ensure(host() == xhost);
163  ensure(index() ==~ xid);
164  ensure(is_attached());
165  ensure(!is_restricted());
166 }
167 
169 sec_atp(const sec_rep_space* xhost, const std::string& xname)
170 {
171 
172  // Preconditions:
173 
174  require(xhost != 0);
175  require(xhost->state_is_read_accessible());
176  require(!xname.empty());
177  require(xhost->contains_member(xname));
178 
179  // Body:
180 
181  attach_to_state(xhost, xname);
182 
183  // Postconditions:
184 
185  ensure(invariant());
186  //ensure(host() == xhost);
187  ensure(name() == xname);
188  ensure(is_attached());
189  ensure(!is_restricted());
190 
191 }
192 
194 sec_atp(const namespace_poset* xnamespace,
195  const poset_path& xpath,
196  bool xauto_access)
197 {
198  // Preconditions:
199 
200  require(precondition_of(attach_to_state(same args)));
201 
202  // Body:
203 
204  attach_to_state(xnamespace, xpath, xauto_access);
205 
206  // Postconditions:
207 
208  ensure(postcondition_of(attach_to_state(same args)));
209 
210  // Exit:
211 
212  return;
213 }
214 
217 {
218 
219  // Preconditions:
220 
221  require(xother != 0);
222 
223  // Body:
224 
225  attach_to_state(xother);
226 
227  // Postconditions:
228 
229  ensure(invariant());
230  ensure(is_attached());
231  ensure(is_same_state(xother));
232  ensure(is_same_restriction(xother));
233 
234 }
235 
237 sec_atp(sec_rep_space* xhost, section_dof_map* xdof_map, bool xauto_access)
238 {
239 
240  // Preconditions:
241 
242  require(precondition_of(new_jim_state(xhost, xdof_map, false, xauto_access)));
243 
244  // Body:
245 
246  new_jim_state(xhost, xdof_map, false, xauto_access);
247 
248  // Postconditions:
249 
250  ensure(postcondition_of(new_jim_state(xhost, xdof_map, false, xauto_access)));
251 
252  // Exit:
253 
254  return;
255 }
256 
259  abstract_poset_member& xbase_mbr,
260  int xbase_version, bool xauto_access)
261 {
262 
263  // Preconditions:
264 
265  require(precondition_of(new_jim_state(xhost, xbase_mbr, xbase_version, xauto_access)));
266 
267  // Body:
268 
269  new_jim_state(xhost, xbase_mbr, xbase_version, xauto_access);
270 
271  // Postconditions:
272 
273  ensure(postcondition_of(new_jim_state(xhost, xbase_mbr, xbase_version, xauto_access)));
274 
275  // Exit:
276 
277  return;
278 }
279 
283 {
284  // Preconditions:
285 
286  require(is_ancestor_of(&xother));
287  require(precondition_of(attach_to_state(&xother)));
288 
289  // Body:
290 
291  attach_to_state(&xother);
292 
293  // Postconditions:
294 
295  ensure(postcondition_of(attach_to_state(&xother)));
296 
297  // Exit:
298 
299  return *this;
300 }
301 
304 operator=(const sec_atp& xother)
305 {
306  // Preconditions:
307 
308  require(precondition_of(attach_to_state(&xother)));
309 
310  // Body:
311 
312  attach_to_state(&xother);
313 
314  // Postconditions:
315 
316  ensure(postcondition_of(attach_to_state(&xother)));
317 
318  // Exit:
319 
320  return *this;
321 }
322 
325 operator=(const atp& xfiber)
326 {
327  // Preconditions:
328 
329  require(precondition_of(sec_vd::operator=(xfiber)));
330 
331  // Body:
332 
333  sec_vd::operator=(xfiber);
334 
335  // Postconditions:
336 
337  ensure(postcondition_of(sec_vd::operator=(xfiber)));
338 
339  // Exit:
340 
341  return *this;
342 }
343 
346 operator=(const atp_lite& xfiber)
347 {
348  // Preconditions:
349 
350  require(precondition_of(sec_vd::operator=(xfiber)));
351 
352  // Body:
353 
354  sec_vd::operator=(xfiber);
355 
356  // Postconditions:
357 
358  ensure(postcondition_of(sec_vd::operator=(xfiber)));
359 
360  // Exit:
361 
362  return *this;
363 }
364 
367 {
368 
369  // Preconditions:
370 
371  // Body:
372 
373  // Postconditions:
374 
375 }
376 
380 {
381  // Preconditions:
382 
383  // Body:
384 
385  static const fiber_type result;
386 
387  // Postconditions:
388 
389  // Exit:
390 
391  return result;
392 }
393 
394 bool
396 is_p_form(bool xauto_access) const
397 {
398  // Preconditions:
399 
400  require(state_is_auto_read_accessible(xauto_access));
401  require(host()->contains_variance_subposets(xauto_access));
402 
403  // Body:
404 
405  bool result = host()->is_p_form(_index, xauto_access);
406 
407  // Postconditions:
408 
409  // Exit:
410 
411  return result;
412 }
413 
414 void
416 put_is_p_form(bool xauto_access)
417 {
418  // Preconditions:
419 
420  require(state_is_auto_read_write_accessible(xauto_access));
421  require(host()->contains_variance_subposets(xauto_access));
422 
423  // Body:
424 
425  host()->put_is_p_form(_index, xauto_access);
426 
427  // Postconditions:
428 
429  ensure(is_p_form(xauto_access));
430 
431  // Exit:
432 
433  return;
434 }
435 
436 
437 bool
439 is_p_vector(bool xauto_access) const
440 {
441  // Preconditions:
442 
443  require(state_is_auto_read_accessible(xauto_access));
444  require(host()->contains_variance_subposets(xauto_access));
445 
446  // Body:
447 
448  bool result = host()->is_p_vector(_index, xauto_access);
449 
450  // Postconditions:
451 
452  // Exit:
453 
454  return result;
455 }
456 
457 void
459 put_is_p_vector(bool xauto_access)
460 {
461  // Preconditions:
462 
463  require(state_is_auto_read_write_accessible(xauto_access));
464  require(host()->contains_variance_subposets(xauto_access));
465 
466  // Body:
467 
468  host()->put_is_p_vector(_index, xauto_access);
469 
470  // Postconditions:
471 
472  ensure(is_p_vector(xauto_access));
473 
474  // Exit:
475 
476  return;
477 }
478 
479 // PROTECTED MEMBER FUNCTIONS
480 
481 // PRIVATE MEMBER FUNCTIONS
482 
483 
484 //==============================================================================
485 // TP FACET OF CLASS SEC_ATP
486 //==============================================================================
487 
488 // PUBLIC MEMBER FUNCTIONS
489 
490 // PROTECTED MEMBER FUNCTIONS
491 
492 // PRIVATE MEMBER FUNCTIONS
493 
494 
495 //==============================================================================
496 // VD FACET OF CLASS SEC_ATP
497 //==============================================================================
498 
499 // PUBLIC MEMBER FUNCTIONS
500 
501 // PROTECTED MEMBER FUNCTIONS
502 
503 // PRIVATE MEMBER FUNCTIONS
504 
505 
506 //==============================================================================
507 // TUPLE FACET OF CLASS SEC_ATP
508 //==============================================================================
509 
510 // PUBLIC MEMBER FUNCTIONS
511 
512 // PROTECTED MEMBER FUNCTIONS
513 
514 // PRIVATE MEMBER FUNCTIONS
515 
516 
517 //==============================================================================
518 // ABSTRACT POSET MEMBER FACET OF CLASS SEC_ATP
519 //==============================================================================
520 
521 // PUBLIC MEMBER FUNCTIONS
522 
523 const std::string&
525 class_name() const
526 {
527  // Preconditions:
528 
529  // Body:
530 
531  const string& result = static_class_name();
532 
533  // Postconditions:
534 
535  ensure(!result.empty());
536 
537  // Exit:
538 
539  return result;
540 }
541 
542 const std::string&
545 {
546  // Preconditions:
547 
548  // Body:
549 
550  static const string result("sec_atp");
551 
552  // Postconditions:
553 
554  ensure(!result.empty());
555 
556  // Exit:
557 
558  return result;
559 }
560 
563 clone() const
564 {
565 
566  // Preconditions:
567 
568  // Body:
569 
570  // create new handle of the current class.
571 
572  sec_atp *result = new sec_atp();
573 
574  // Postconditions:
575 
576  ensure(result != 0);
577  ensure(result->invariant());
578 
579  // Exit:
580 
581  return result;
582 
583 }
584 
585 // PROTECTED MEMBER FUNCTIONS
586 
587 // PRIVATE MEMBER FUNCTIONS
588 
589 
590 // ===========================================================
591 // POSET_COMPONENT FACET
592 // ===========================================================
593 
594 // PUBLIC MEMBER FUNCTIONS
595 
598 host() const
599 {
600  return reinterpret_cast<host_type*>(_host);
601 }
602 
603 bool
606 {
607  return dynamic_cast<const host_type*>(xother) != 0;
608 }
609 
610 // PROTECTED MEMBER FUNCTIONS
611 
612 // PRIVATE MEMBER FUNCTIONS
613 
614 
615 //==============================================================================
616 // ANY FACET OF CLASS SEC_ATP
617 //==============================================================================
618 
619 // PUBLIC MEMBER FUNCTIONS
620 
621 bool
623 fiber_is_ancestor_of(const any* xother) const
624 {
625 
626  // Preconditions:
627 
628  require(xother != 0);
629 
630  // Body:
631 
632  // If other may be dynamically cast to the type of this fiber then this
633  // fiber is an ancestor of xother.
634 
635  bool result = dynamic_cast<const atp*>(xother) != 0;
636 
637  // Postconditions:
638 
639  ensure(invariant());
640  ensure(xother->invariant());
641 
642  // Exit:
643 
644  return result;
645 
646 }
647 
648 bool
650 is_ancestor_of(const any* xother) const
651 {
652  // Preconditions:
653 
654  require(xother != 0);
655 
656  // Body:
657 
658  // If other may be dynamically cast to the type of this then this is an
659  // ancestor of other.
660 
661  bool result = dynamic_cast<const sec_atp*>(xother) != 0;
662 
663  // Postconditions:
664 
665  //ensure(invariant());
666 
667  // Exit:
668 
669  return result;
670 
671 }
672 
673 bool
675 invariant() const
676 {
677  bool result = true;
678 
679  // Preconditions:
680 
681  // Body:
682 
683  // Must satisfy base class invariant
684 
685  invariance(sec_tp::invariant());
686 
687  if (invariant_check())
688  {
689  // Prevent recursive calls to invariant
690 
691  disable_invariant_check();
692 
694  //invariance(is_attached() ? (is_p_form() || is_p_vector()) : true);
695 
696  // Finished, turn invariant checking back on.
697 
698  enable_invariant_check();
699  }
700 
701  // Postconditions:
702 
703  ensure(is_derived_query);
704 
705  // Exit:
706 
707  return result;
708 }
709 
710 // PROTECTED MEMBER FUNCTIONS
711 
712 // PRIVATE MEMBER FUNCTIONS
713 
714 
715 //==============================================================================
716 // NON-MEMBER FUNCTIONS
717 //==============================================================================
718 
719 #include "SheafSystem/error_message.h"
720 #include "SheafSystem/sec_at0.h"
721 #include "SheafSystem/sec_e2.h"
722 #include "SheafSystem/sec_e3.h"
723 #include "SheafSystem/sec_at2_e2.h"
724 #include "SheafSystem/sec_at2_e3.h"
725 #include "SheafSystem/sec_at3_e3.h"
726 
727 void
729 hook(const sec_atp& x0, const sec_atp& x1, sec_atp& xresult,
730  bool xauto_access)
731 {
732  // Preconditions:
733 
734  require(x0.state_is_auto_read_accessible(xauto_access));
735  require(x1.state_is_auto_read_accessible(xauto_access));
736  require(xresult.state_is_auto_read_write_accessible(xauto_access));
737  require(x1.dd(xauto_access) == x0.dd(xauto_access));
738  require(x0.is_p_form(xauto_access) == x1.is_p_form(xauto_access));
739  require(x0.is_p_form(xauto_access) == xresult.is_p_form(xauto_access));
740 
741  // Body:
742 
743  const sec_e2* e2_x0 = dynamic_cast<const sec_e2*>(&x0);
744  const sec_e3* e3_x0 = dynamic_cast<const sec_e3*>(&x0);
745  const sec_at2_e2* at2_e2_x0 = dynamic_cast<const sec_at2_e2*>(&x0);
746  const sec_at2_e3* at2_e3_x0 = dynamic_cast<const sec_at2_e3*>(&x0);
747  const sec_at3_e3* at3_e3_x0 = dynamic_cast<const sec_at3_e3*>(&x0);
748 
749  const sec_e2* e2_x1 = dynamic_cast<const sec_e2*>(&x1);
750  const sec_e3* e3_x1 = dynamic_cast<const sec_e3*>(&x1);
751 
752  sec_at0* at0_xresult = dynamic_cast<sec_at0*>(&xresult);
753  sec_e2* e2_xresult = dynamic_cast<sec_e2*>(&xresult);
754  sec_e3* e3_xresult = dynamic_cast<sec_e3*>(&xresult);
755  sec_at2_e3* at2_e3_xresult = dynamic_cast<sec_at2_e3*>(&xresult);
756 
757  if(e2_x0 && e2_x1 && at0_xresult)
758  {
759  hook(*e2_x0, *e2_x1, *at0_xresult, xauto_access);
760  }
761  else if(at2_e2_x0 && e2_x1 && e2_xresult)
762  {
763  hook(*at2_e2_x0, *e2_x1, *e2_xresult, xauto_access);
764  }
765  else if(e3_x0 && e3_x1 && at0_xresult)
766  {
767  hook(*e3_x0, *e3_x1, *at0_xresult, xauto_access);
768  }
769  else if(at2_e3_x0 && e3_x1 && e3_xresult)
770  {
771  hook(*at2_e3_x0, *e3_x1, *e3_xresult, xauto_access);
772  }
773  else if(at3_e3_x0 && e3_x1 && at2_e3_xresult)
774  {
775  hook(*at3_e3_x0, *e3_x1, *at2_e3_xresult, xauto_access);
776  }
777  else
778  {
779  post_fatal_error_message(\
780  "Unsupported argument types in call to hook(...)");
781  }
782 
783  // Postconditions:
784 
785  ensure(xresult.variance(xauto_access) == hook(x0.variance(xauto_access)));
786 
787  // Exit:
788 
789  return;
790 }
791 
792 void
794 star(const sec_atp& x0, sec_atp& xresult, bool xauto_access)
795 {
796  // Preconditions:
797 
798  require(x0.state_is_auto_read_accessible(xauto_access));
799  require(xresult.state_is_auto_read_write_accessible(xauto_access));
800 
801  // Body:
802 
803  const sec_at2_e2* at2_e2_x0 = dynamic_cast<const sec_at2_e2*>(&x0);
804  const sec_at0* at0_x0 = dynamic_cast<const sec_at0*>(&x0);
805  const sec_e2* e2_x0 = dynamic_cast<const sec_e2*>(&x0);
806  const sec_at2_e3* at2_e3_x0 = dynamic_cast<const sec_at2_e3*>(&x0);
807  const sec_e3* e3_x0 = dynamic_cast<const sec_e3*>(&x0);
808  const sec_at3_e3* at3_e3_x0 = dynamic_cast<const sec_at3_e3*>(&x0);
809 
810  sec_at0* at0_xresult = dynamic_cast<sec_at0*>(&xresult);
811  sec_at2_e2* at2_e2_xresult = dynamic_cast<sec_at2_e2*>(&xresult);
812  sec_e2* e2_xresult = dynamic_cast<sec_e2*>(&xresult);
813  sec_e3* e3_xresult = dynamic_cast<sec_e3*>(&xresult);
814  sec_at2_e3* at2_e3_xresult = dynamic_cast<sec_at2_e3*>(&xresult);
815  sec_at3_e3* at3_e3_xresult = dynamic_cast<sec_at3_e3*>(&xresult);
816 
817  if(at2_e2_x0 && at0_xresult)
818  {
819  star(*at2_e2_x0, *at0_xresult, xauto_access);
820  }
821  else if(at0_x0 && at2_e2_xresult)
822  {
823  star(*at0_x0, *at2_e2_xresult, xauto_access);
824  }
825  else if(e2_x0 && e2_xresult)
826  {
827  star(*e2_x0, *e2_xresult, xauto_access);
828  }
829  else if(at2_e3_x0 && e3_xresult)
830  {
831  star(*at2_e3_x0, *e3_xresult, xauto_access);
832  }
833  else if(e3_x0 && at2_e3_xresult)
834  {
835  star(*e3_x0, *at2_e3_xresult, xauto_access);
836  }
837  else if(at3_e3_x0 && at0_xresult)
838  {
839  star(*at3_e3_x0, *at0_xresult, xauto_access);
840  }
841  else if(at0_x0 && at3_e3_xresult)
842  {
843  star(*at0_x0, *at3_e3_xresult, xauto_access);
844  }
845  else
846  {
847  post_fatal_error_message(\
848  "Unsupported argument types in call to star(...)");
849  }
850 
851  // Postconditions:
852 
854 
855 // ensure((x0.p(xauto_access)>0) \
856 // ? (xresult.is_p_form(xauto_access) == x0.is_p_form(xauto_access)) : true);
857 // ensure((x0.p(xauto_access)==0) \
858 // ? (xresult.is_p_form(xauto_access) == old_xresult_is_p_form): true );
859 
860  // Exit:
861 
862  return;
863 }
864 
865 void
867 wedge(const sec_atp& x0, const sec_atp& x1, sec_atp& xresult, bool xauto_access)
868 {
869  // Preconditions:
870 
871  require(x0.state_is_auto_read_accessible(xauto_access));
872  require(x1.state_is_auto_read_accessible(xauto_access));
873  require(xresult.state_is_auto_read_write_accessible(xauto_access));
874  require(x0.dd(xauto_access) >= xresult.dd(xauto_access));
875  require(x1.dd(xauto_access) >= xresult.dd(xauto_access));
876  require(xresult.p(xauto_access) == x0.p(xauto_access) + x1.p(xauto_access));
877  require(x0.is_p_form(xauto_access) == x1.is_p_form(xauto_access));
878 
879  // Body:
880 
881  const sec_e2* e2_x0 = dynamic_cast<const sec_e2*>(&x0);
882  const sec_e3* e3_x0 = dynamic_cast<const sec_e3*>(&x0);
883  const sec_at2_e3* at2_e3_x0 = dynamic_cast<const sec_at2_e3*>(&x0);
884 
885  const sec_e2* e2_x1 = dynamic_cast<const sec_e2*>(&x1);
886  const sec_e3* e3_x1 = dynamic_cast<const sec_e3*>(&x1);
887 
888  sec_at2_e2* at2_e2_xresult = dynamic_cast<sec_at2_e2*>(&xresult);
889  sec_at2_e3* at2_e3_xresult = dynamic_cast<sec_at2_e3*>(&xresult);
890  sec_at3_e3* at3_e3_xresult = dynamic_cast<sec_at3_e3*>(&xresult);
891 
892  if(e2_x0 && e2_x1 && at2_e2_xresult)
893  {
894  wedge(*e2_x0, *e2_x1, *at2_e2_xresult, xauto_access);
895  }
896  else if(e3_x0 && e3_x1 && at2_e3_xresult)
897  {
898  wedge(*e3_x0, *e3_x1, *at2_e3_xresult, xauto_access);
899  }
900  else if(at2_e3_x0 && e3_x1 && at3_e3_xresult)
901  {
902  wedge(*at2_e3_x0, *e3_x1, *at3_e3_xresult, xauto_access);
903  }
904  else
905  {
906  post_fatal_error_message(\
907  "Unsupported argument types in call to wedge(...)");
908  }
909 
910  // Postconditions:
911 
913 
914 // ensure(xresult.variance(xauto_access) == \
915 // wedge(x0.variance(xauto_access), x1.variance(xauto_access)));
916 
917  // Exit:
918 
919  return;
920 }
921 
virtual bool invariant() const
Class invariant, intended to be redefined in each descendant. See below for template for invariant in...
Definition: any.cc:153
static int factor_ct(int xd)
Factor_ct() as a function of dimension xd.
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 ...
A section of a bundle with fiber type at2_e3.
Definition: sec_at2_e3.h:48
void put_is_p_vector(bool xauto_access)
Sets is_p_vector to true.
Definition: sec_atp.cc:459
SHEAF_DLL_SPEC void wedge(const sec_e2 &x0, const sec_e2 &x1, sec_at2_e2 &xresult, bool xauto_access)
The exterior (wedge) product of two antisymmetric tensors (pre-allocated version).
Definition: sec_at2_e2.cc:950
bool full() const
True if both poset name and member name are not empty.
Definition: poset_path.cc:311
An antisymmetric tensor of degree p.
Definition: atp.h:190
The abstract map from section dof ids to section dof values of heterogeneous type.
A section of a bundle with fiber type at3_e3.
Definition: sec_at3_e3.h:48
A space of scalars viewed as an antisymmetric tensor section space of degree 1.
Definition: sec_at1_space.h:48
poset_path path(bool xauto_access=true) const
A path to this 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...
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...
bool state_is_auto_read_accessible(bool xauto_access) const
True if the state is auto accessible for read, that is, if the state is already accessible for read o...
A client handle for a general, abstract partially order set.
host_type * host() const
The poset this is a member of.
Definition: sec_atp.cc:598
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
A member of a sec_rep_space; a section.
poset_path vector_space_path() const
The path of the underlying vector space.
bool fiber_is_ancestor_of(const any *xother) const
True if xother conforms to an instance of the fiber of current.
Definition: sec_atp.cc:623
STL namespace.
bool is_ancestor_of(const any *other) const
true if other conforms to current
Definition: sec_atp.cc:650
static host_type & new_host(namespace_type &xns, const poset_path &xhost_path, const poset_path &xschema_path, const poset_path &xvector_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: sec_atp.cc:52
A schema poset for a section space. A binary Cartesian product subspace of the binary tensor product ...
poset_state_handle & member_poset(pod_index_type xhub_id, bool xauto_access=true) const
The poset_state_handle object referred to by hub id xhub_id.
virtual tensor_variance variance(bool xauto_access) const
The variance.
Definition: sec_tp.cc:589
virtual const fiber_type & fiber_prototype() const
Virtual constructor for the associated fiber type.
Definition: sec_atp.cc:379
virtual int p() const
The degree of the tensors in host(); the sum of the contravariant and covariant degrees.
Definition: sec_tp.cc:391
An antisymmetric tensor of degree p over an abstract vector space (volatile version).
Definition: atp.h:44
~sec_atp()
Destructor.
Definition: sec_atp.cc:366
Abstract base class with useful features for all objects.
Definition: any.h:39
int p() const
The tensor degree of this space.
SHEAF_DLL_SPEC void wedge(const e2 &x0, const e2 &x1, at2_e2 &xresult, bool xauto_access)
The exterior (wedge) product of two antisymmetric tensors (pre-allocated version for persistent types...
Definition: at2_e2.cc:1779
An abstract antisymmetric tensor section space of degree p.
Definition: sec_atp_space.h:47
virtual section_space_schema_member & schema()
The schema for this poset (mutable version)
SHEAF_DLL_SPEC void hook(const e2 &x0, const e2 &x1, at0 &xresult, bool xauto_access)
The interior (hook) product of two antisymmetric tensors (pre-allocated version for persistent types)...
Definition: at2_e2.cc:1328
A section of a bundle with fiber type at2_e2.
Definition: sec_at2_e2.h:48
An abstract antisymmetric tensor space of degree p.
Definition: atp_space.h:42
bool is_p_vector(bool xauto_access) const
True if this is a p-vector.
Definition: sec_atp.cc:439
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
virtual sec_atp * clone() const
Make a new handle, no state instance of current.
Definition: sec_atp.cc:563
SHEAF_DLL_SPEC void star(const sec_at2_e2 &x0, sec_at0 &xresult, bool xauto_access)
The Hodge star operator for antisymmetric tensors (pre-allocated version).
Definition: sec_at2_e2.cc:830
A section of a bundle with fiber type atp.
Definition: sec_atp.h:48
virtual int dd() const
Dimension of the underlying vector space.
Definition: sec_tp.cc:433
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 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 dd() const
The dimension of the underlying ("domain") vector space.
bool is_p_form(bool xauto_access) const
True if this is a p-form.
Definition: sec_atp.cc:396
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: sec_atp.cc:525
bool invariant() const
class invariant
Definition: sec_atp.cc:675
A section of a fiber bundle with a 3-dimensional Euclidean vector space fiber.
Definition: sec_e3.h:47
SHEAF_DLL_SPEC void hook(const sec_e2 &x0, const sec_e2 &x1, sec_at0 &xresult, bool xauto_access)
The interior (hook) product of two antisymmetric tensors (pre-allocated version for persistent types)...
Definition: sec_at2_e2.cc:767
sec_atp()
Default constructor.
Definition: sec_atp.cc:112
virtual sec_atp & operator=(const abstract_poset_member &xother)
Assignment operator; synonym for attach_to_state(&xother).
Definition: sec_atp.cc:282
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
poset_path scalar_space_path() const
The path of the underlying space of scalars.
poset & fiber_space()
The fiber space for section spaces on this schema (mutable version).
void put_is_p_form(bool xauto_access)
Sets is_p_form to true.
Definition: sec_atp.cc:416
An abstract client handle for a member of a poset.
virtual bool host_is_ancestor_of(const poset_state_handle *other) const
True if other conforms to host.
Definition: sec_atp.cc:605
static const std::string & static_class_name()
The name of this class.
Definition: sec_atp.cc:544
Namespace for the fiber_bundles component of the sheaf system.
SHEAF_DLL_SPEC void star(const at2_e2 &x0, at0 &xresult, bool xauto_access)
The Hodge star operator for antisymmetric tensors (pre-allocated version persistent types)...
Definition: at2_e2.cc:1518
Antisymetric tensor of degree 0. As the degree is 0 there is nothing to be symmetric or antisymmetric...
Definition: sec_at0.h:51
virtual int d(int xp, int xdd) const
Dimension d() as a function of degree xp and domain dimension xdd.
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...
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.
Definition: scoped_index.h:710
A section of a fiber bundle with a 2-dimensional Euclidean vector space fiber.
Definition: sec_e2.h:48
A handle for a poset whose members are numerical representations of sections of a fiber bundle...
Definition: sec_rep_space.h:61