SheafSystem  0.0.0.0
sec_jcb.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_jcb.h"
22 
23 #include "SheafSystem/assert_contract.h"
24 #include "SheafSystem/binary_section_space_schema_member.impl.h"
25 #include "SheafSystem/binary_section_space_schema_poset.h"
26 #include "SheafSystem/fiber_bundles_namespace.h"
27 #include "SheafSystem/section_space_schema_member.impl.h"
28 #include "SheafSystem/section_space_schema_poset.h"
29 #include "SheafSystem/sec_at0.h"
30 #include "SheafSystem/sec_at1.h"
31 #include "SheafSystem/sec_at1_space.h"
32 #include "SheafSystem/sec_jcb_space.h"
33 #include "SheafSystem/sec_tuple_space.impl.h"
34 #include "SheafSystem/jcb.h"
35 #include "SheafSystem/jcb_space.h"
36 
37 using namespace std;
38 using namespace fiber_bundle; // Workaround for MS C++ bug.
39 
40 //==============================================================================
41 // CLASS SEC_JCB
42 //==============================================================================
43 
44 // ===========================================================
45 // HOST FACTORY FACET
46 // ===========================================================
47 
48 // PUBLIC MEMBER FUNCTIONS
49 
53  const poset_path& xhost_path,
54  const poset_path& xschema_path,
55  const poset_path& xdomain_path,
56  const poset_path& xrange_path,
57  bool xauto_access)
58 {
59  // cout << endl << "Entering sec_jcb::new_host." << endl;
60 
61  // Preconditions:
62 
63  require(xns.state_is_auto_read_write_accessible(xauto_access));
64 
65  require(!xhost_path.empty());
66  require(!xns.contains_path(xhost_path, xauto_access));
67 
68  require(xschema_path.full());
69  require(xns.path_is_auto_read_accessible<schema_type::host_type>(xschema_path, xauto_access));
70  require(host_type::fiber_space_conforms<fiber_type::host_type>(xns, xschema_path, xauto_access));
71 
72  require(xns.path_is_auto_read_accessible<domain_type::host_type>(xdomain_path, xauto_access));
73  require(xns.path_is_auto_read_accessible<range_type::host_type>(xrange_path, xauto_access));
74 
75  require(host_type::same_vector_fiber_space(xns, xschema_path, xdomain_path, xrange_path, xauto_access));
76 
77  // Body:
78 
79  host_type& result = host_type::new_table(xns, xhost_path, xschema_path, xdomain_path, xrange_path, xauto_access);
80 
81  // Postconditions:
82 
83  ensure(xns.owns(result, xauto_access));
84  ensure(result.path(true) == xhost_path);
85  ensure(result.state_is_not_read_accessible());
86  ensure(result.schema(true).path(xauto_access) == xschema_path);
87 
88  ensure(result.factor_ct(true) == result.schema(true).fiber_space<fiber_type::host_type>().factor_ct(xauto_access));
89  ensure(result.d(true) == result.schema(true).fiber_space<fiber_type::host_type>().d(xauto_access));
90  ensure(result.scalar_space_path(true) ==
91  xns.member_poset<domain_type::host_type>(xdomain_path, xauto_access).scalar_space_path(xauto_access));
92  ensure(result.scalar_space_path(true) ==
93  xns.member_poset<range_type::host_type>(xrange_path, xauto_access).scalar_space_path(xauto_access));
94  ensure(result.dd(true) == result.schema(true).fiber_space<fiber_type::host_type>().dd(xauto_access));
95  ensure(result.dr(true) == result.schema(true).fiber_space<fiber_type::host_type>().dr(xauto_access));
96  ensure(result.domain_path(true) == xdomain_path);
97  ensure(result.range_path(true) == xrange_path);
98 
99  // Exit:
100 
101  // cout << "Leaving sec_jcb::new_host." << endl;
102  return result;
103 }
104 
105 // PROTECTED MEMBER FUNCTIONS
106 
107 // PRIVATE MEMBER FUNCTIONS
108 
109 
110 //==============================================================================
111 // JCB FACET OF CLASS SEC_JCB
112 //==============================================================================
113 
114 // PUBLIC MEMBER FUNCTIONS
115 
118 {
119 
120  // Preconditions:
121 
122  // Body:
123 
124  // Postconditions:
125 
126  ensure(invariant());
127 }
128 
130 sec_jcb(const sec_rep_space* xhost, pod_index_type xhub_id)
131 {
132  // Preconditions:
133 
134  require(xhost != 0);
135  require(xhost->state_is_read_accessible());
136  require(xhost->contains_member(xhub_id));
137 
138  // Body:
139 
140  attach_to_state(xhost, xhub_id);
141 
142  // Postconditions:
143 
144  ensure(invariant());
145  //ensure(host() == xhost);
146  ensure(index() == xhub_id);
147  ensure(is_attached());
148  ensure(!is_restricted());
149 }
150 
152 sec_jcb(const sec_rep_space* xhost, const scoped_index& xid)
153 {
154  // Preconditions:
155 
156  require(xhost != 0);
157  require(xhost->state_is_read_accessible());
158  require(xhost->contains_member(xid));
159 
160  // Body:
161 
162  attach_to_state(xhost, xid.hub_pod());
163 
164  // Postconditions:
165 
166  ensure(invariant());
167  //ensure(host() == xhost);
168  ensure(index() ==~ xid);
169  ensure(is_attached());
170  ensure(!is_restricted());
171 }
172 
174 sec_jcb(const sec_rep_space* xhost, const std::string& xname)
175 {
176 
177  // Preconditions:
178 
179  require(xhost != 0);
180  require(xhost->state_is_read_accessible());
181  require(!xname.empty());
182  require(xhost->contains_member(xname));
183 
184  // Body:
185 
186  attach_to_state(xhost, xname);
187 
188  // Postconditions:
189 
190  ensure(invariant());
191  //ensure(host() == xhost);
192  ensure(name() == xname);
193  ensure(is_attached());
194  ensure(!is_restricted());
195 
196 }
197 
198 
200 sec_jcb(const namespace_poset* xnamespace,
201  const poset_path& xpath,
202  bool xauto_access)
203 {
204 
205  // Preconditions:
206 
207  require(precondition_of(attach_to_state(same args)));
208 
209  // Body:
210 
211  attach_to_state(xnamespace, xpath, xauto_access);
212 
213  // Postconditions:
214 
215  ensure(postcondition_of(attach_to_state(same args)));
216 
217  // Exit:
218 
219  return;
220 }
221 
222 
225 {
226 
227  // Preconditions:
228 
229  require(xother != 0);
230 
231  // Body:
232 
233  attach_to_state(xother);
234 
235  // Postconditions:
236 
237  ensure(invariant());
238  ensure(is_attached());
239  ensure(is_same_state(xother));
240  ensure(is_same_restriction(xother));
241 
242 }
243 
245 sec_jcb(sec_rep_space* xhost, section_dof_map* xdof_map, bool xauto_access)
246 {
247 
248  // Preconditions:
249 
250  require(precondition_of(new_jim_state(xhost, xdof_map, false, xauto_access)));
251 
252  // Body:
253 
254  new_jim_state(xhost, xdof_map, false, xauto_access);
255 
256  // Postconditions:
257 
258  ensure(postcondition_of(new_jim_state(xhost, xdof_map, false, xauto_access)));
259 
260  // Exit:
261 
262  return;
263 }
264 
268 {
269  // Preconditions:
270 
271  require(is_ancestor_of(&xother));
272  require(precondition_of(attach_to_state(&xother)));
273 
274  // Body:
275 
276  attach_to_state(&xother);
277 
278  // Postconditions:
279 
280  ensure(postcondition_of(attach_to_state(&xother)));
281 
282  // Exit:
283 
284  return *this;
285 }
286 
289 operator=(const sec_jcb& xother)
290 {
291  // Preconditions:
292 
293  require(precondition_of(attach_to_state(&xother)));
294 
295  // Body:
296 
297  attach_to_state(&xother);
298 
299  // Postconditions:
300 
301  ensure(postcondition_of(attach_to_state(&xother)));
302 
303  // Exit:
304 
305  return *this;
306 }
307 
310 operator=(const jcb& xfiber)
311 {
312  // Preconditions:
313 
314  require(precondition_of(sec_vd::operator=(xfiber)));
315 
316  // Body:
317 
318  sec_vd::operator=(xfiber);
319 
320  // Postconditions:
321 
322  ensure(postcondition_of(sec_vd::operator=(xfiber)));
323 
324  // Exit:
325 
326  return *this;
327 }
328 
331 operator=(const jcb_lite& xfiber)
332 {
333  // Preconditions:
334 
335  require(precondition_of(sec_vd::operator=(xfiber)));
336 
337  // Body:
338 
339  sec_vd::operator=(xfiber);
340 
341  // Postconditions:
342 
343  ensure(postcondition_of(sec_vd::operator=(xfiber)));
344 
345  // Exit:
346 
347  return *this;
348 }
349 
352 {
353 
354  // Preconditions:
355 
356  // Body:
357 
358  // Postconditions:
359 
360 }
361 
365 {
366  // Preconditions:
367 
368  // Body:
369 
370  static const fiber_type result;
371 
372  // Postconditions:
373 
374  // Exit:
375 
376  return result;
377 }
378 
379 
380 int
382 dd() const
383 {
384  // Preconditions:
385 
386  require(state_is_read_accessible());
387 
388  // Body:
389 
390  int result = host()->dd();
391 
392  // Postconditions:
393 
394  ensure(result >= 0);
395 
396  // Exit:
397 
398  return result;
399 }
400 
401 int
403 dd(bool xauto_access) const
404 {
405  // Preconditions:
406 
407  require(state_is_auto_read_accessible(xauto_access));
408 
409  // Body:
410 
411  int result = host()->dd(xauto_access);
412 
413  // Postconditions:
414 
415  ensure(result >= 0);
416 
417  // Exit:
418 
419  return result;
420 }
421 
424 domain_path() const
425 {
426  // Preconditions:
427 
428  require(state_is_read_accessible());
429 
430  // Body:
431 
432  poset_path result(host()->domain_path());
433 
434  // Postconditions:
435 
436  ensure(!result.empty());
437 
438  // Exit:
439 
440  return result;
441 }
442 
445 domain_path(bool xauto_access) const
446 {
447  // Preconditions:
448 
449  require(state_is_auto_read_accessible(xauto_access));
450 
451  // Body:
452 
453  poset_path result(host()->domain_path(xauto_access));
454 
455  // Postconditions:
456 
457  ensure(!result.empty());
458 
459  // Exit:
460 
461  return result;
462 }
463 
464 int
466 dr() const
467 {
468  // Preconditions:
469 
470  require(state_is_read_accessible());
471 
472  // Body:
473 
474  int result = host()->dr();
475 
476  // Postconditions:
477 
478  ensure(result >= 0);
479 
480  // Exit:
481 
482  return result;
483 }
484 
485 int
487 dr(bool xauto_access) const
488 {
489  // Preconditions:
490 
491  require(state_is_auto_read_accessible(xauto_access));
492 
493  // Body:
494 
495  int result = host()->dr(xauto_access);
496 
497  // Postconditions:
498 
499  ensure(result >= 0);
500 
501  // Exit:
502 
503  return result;
504 }
505 
508 range_path() const
509 {
510  // Preconditions:
511 
512  require(state_is_read_accessible());
513 
514  // Body:
515 
516  poset_path result(host()->range_path());
517 
518  // Postconditions:
519 
520  ensure(!result.empty());
521 
522  // Exit:
523 
524  return result;
525 }
526 
529 range_path(bool xauto_access) const
530 {
531  // Preconditions:
532 
533  require(state_is_auto_read_accessible(xauto_access));
534 
535  // Body:
536 
537  poset_path result(host()->range_path(xauto_access));
538 
539  // Postconditions:
540 
541  ensure(!result.empty());
542 
543  // Exit:
544 
545  return result;
546 }
547 
548 // PROTECTED MEMBER FUNCTIONS
549 
550 // PRIVATE MEMBER FUNCTIONS
551 
552 
553 //==============================================================================
554 // VD FACET OF CLASS SEC_JCB
555 //==============================================================================
556 
557 // PUBLIC MEMBER FUNCTIONS
558 
559 // PROTECTED MEMBER FUNCTIONS
560 
561 // PRIVATE MEMBER FUNCTIONS
562 
563 
564 //==============================================================================
565 // TUPLE FACET OF CLASS SEC_JCB
566 //==============================================================================
567 
568 // PUBLIC MEMBER FUNCTIONS
569 
570 // PROTECTED MEMBER FUNCTIONS
571 
572 // PRIVATE MEMBER FUNCTIONS
573 
574 
575 //==============================================================================
576 // ABSTRACT POSET MEMBER FACET OF CLASS SEC_JCB
577 //==============================================================================
578 
579 // PUBLIC MEMBER FUNCTIONS
580 
581 const std::string&
583 class_name() const
584 {
585  // Preconditions:
586 
587  // Body:
588 
589  const string& result = static_class_name();
590 
591  // Postconditions:
592 
593  ensure(!result.empty());
594 
595  // Exit:
596 
597  return result;
598 }
599 
600 const std::string&
603 {
604  // Preconditions:
605 
606  // Body:
607 
608  static const string result("sec_jcb");
609 
610  // Postconditions:
611 
612  ensure(!result.empty());
613 
614  // Exit:
615 
616  return result;
617 }
618 
621 clone() const
622 {
623 
624  // Preconditions:
625 
626  // Body:
627 
628  // create new handle of the current class.
629 
630  sec_jcb *result = new sec_jcb();
631 
632  // Postconditions:
633 
634  ensure(result != 0);
635  ensure(result->invariant());
636 
637  // Exit:
638 
639  return result;
640 
641 }
642 
643 // PROTECTED MEMBER FUNCTIONS
644 
645 // PRIVATE MEMBER FUNCTIONS
646 
647 
648 // ===========================================================
649 // POSET_COMPONENT FACET
650 // ===========================================================
651 
652 // PUBLIC MEMBER FUNCTIONS
653 
656 host() const
657 {
658  return reinterpret_cast<host_type*>(_host);
659 }
660 
661 bool
664 {
665  return dynamic_cast<const host_type*>(xother) != 0;
666 }
667 
668 // PROTECTED MEMBER FUNCTIONS
669 
670 // PRIVATE MEMBER FUNCTIONS
671 
672 
673 //==============================================================================
674 // ANY FACET OF CLASS SEC_JCB
675 //==============================================================================
676 
677 // PUBLIC MEMBER FUNCTIONS
678 
679 bool
681 fiber_is_ancestor_of(const any* xother) const
682 {
683 
684  // Preconditions:
685 
686  require(xother != 0);
687 
688  // Body:
689 
690  // If xother may be dynamically cast to the type of this fiber then this
691  // fiber is an ancestor of xother.
692 
693  bool result = dynamic_cast<const jcb*>(xother) != 0;
694 
695  // Postconditions:
696 
697  ensure(invariant());
698  ensure(xother->invariant());
699 
700  // Exit:
701 
702  return result;
703 
704 }
705 
706 bool
708 is_ancestor_of(const any* xother) const
709 {
710  // Preconditions:
711 
712  require(xother != 0);
713 
714  // Body:
715 
716  // If other may be dynamically cast to the type of this then this is an
717  // ancestor of other.
718 
719  bool result = dynamic_cast<const sec_jcb*>(xother) != 0;
720 
721  // Postconditions:
722 
723  //ensure(invariant());
724 
725  // Exit:
726 
727  return result;
728 
729 }
730 
731 bool
733 invariant() const
734 {
735  bool result = true;
736 
737  // Preconditions:
738 
739  // Body:
740 
741  // Must satisfy base class invariant.
742 
743  invariance(sec_vd::invariant());
744 
745  if(invariant_check())
746  {
747  // Prevent recursive calls to invariant.
748 
749  disable_invariant_check();
750 
751  invariance(is_attached() ? df() == dd()*dr() : true);
752  invariance(is_attached() ? dr() == db() : true);
753 
754  // Finished, turn invariant checking back on.
755 
756  enable_invariant_check();
757  }
758 
759  // Postconditions:
760 
761  ensure(is_derived_query);
762 
763  // Exit:
764 
765  return result;
766 
767 }
768 
769 // PROTECTED MEMBER FUNCTIONS
770 
771 // PRIVATE MEMBER FUNCTIONS
772 
773 
774 //##############################################################################
775 //##############################################################################
776 
778 
781 comp2(int row, int col) const
782 {
783 
784  // Preconditions:
785 
786  require(0 <= row && row <= dd());
787  require(0 <= col && col <= dr());
788 
789  // Body:
790 
791  // Convert (row, col) into an index into linear component storage and
792  // retrieve result.
793 
794  sec_at0 *result = comp(row * dr() + col);
795 
796  // Postconditions:
797 
798  ensure(result != 0);
799  ensure(invariant());
800  ensure(result->invariant());
801 
802  // Exit:
803 
804  return result;
805 
806 }
807 
808 void
810 set_comp2(int row, int col, sec_at0* new_comp)
811 {
812 
813  // Preconditions:
814 
815  require(0 <= row && row <= dd());
816  require(0 <= col && col <= dr());
817  require(new_comp != 0);
818 
819  // Body:
820 
821  // Convert (row, col) into an index into linear component storage and
822  // set requested component to new_comp.
823 
824  set_comp(row * dr() + col, new_comp);
825 
826  // Postconditions:
827 
828  ensure(invariant());
829 
830 }
831 
832 //==============================================================================
833 // NON-MEMBER FUNCTIONS
834 //==============================================================================
835 
836 #include "SheafSystem/error_message.h"
837 #include "SheafSystem/sec_at1.h"
838 #include "SheafSystem/sec_e1.h"
839 #include "SheafSystem/sec_e2.h"
840 #include "SheafSystem/sec_e3.h"
841 #include "SheafSystem/sec_jcb_e13.h"
842 #include "SheafSystem/sec_jcb_e23.h"
843 #include "SheafSystem/sec_jcb_e33.h"
844 
845 void
847 push(const sec_jcb& xjcb, const sec_at1& xvector, sec_at1& xresult,
848  bool xauto_access)
849 {
850  // Preconditions:
851 
852  require(xjcb.state_is_auto_read_accessible(xauto_access));
853  require(xvector.state_is_auto_read_accessible(xauto_access));
854  require(xresult.state_is_auto_read_write_accessible(xauto_access));
855  //require(xvector.d(xauto_access) == xjcb.dd(xauto_access));
856  //require(xresult.d(xauto_access) == xjcb.dr(xauto_access));
857  require(xvector.is_contravariant(0, xauto_access)); // !is_dual
858  require(xresult.is_contravariant(0, xauto_access)); // !is_dual
859 
860  // Body:
861 
862  const sec_jcb_e13* jcb_e13_xjcb = dynamic_cast<const sec_jcb_e13*>(&xjcb);
863  const sec_jcb_e23* jcb_e23_xjcb = dynamic_cast<const sec_jcb_e23*>(&xjcb);
864  const sec_jcb_e33* jcb_e33_xjcb = dynamic_cast<const sec_jcb_e33*>(&xjcb);
865 
866  const sec_e1* e1_xvector = dynamic_cast<const sec_e1*>(&xvector);
867  const sec_e2* e2_xvector = dynamic_cast<const sec_e2*>(&xvector);
868  const sec_e3* e3_xvector = dynamic_cast<const sec_e3*>(&xvector);
869 
870  sec_e3* e3_xresult = dynamic_cast<sec_e3*>(&xresult);
871 
872  if(jcb_e13_xjcb && e1_xvector && e3_xresult)
873  {
874  push(*jcb_e13_xjcb, *e1_xvector, *e3_xresult, xauto_access);
875  }
876  else if(jcb_e23_xjcb && e2_xvector && e3_xresult)
877  {
878  push(*jcb_e23_xjcb, *e2_xvector, *e3_xresult, xauto_access);
879  }
880  else if(jcb_e33_xjcb && e3_xvector && e3_xresult)
881  {
882  push(*jcb_e33_xjcb, *e3_xvector, *e3_xresult, xauto_access);
883  }
884  else
885  {
886  post_fatal_error_message(\
887  "Unsupported argument types in call to push(...)");
888  }
889 
890  // Postconditions:
891 
892  ensure(xresult.is_contravariant(0, xauto_access)); // !is_dual
893 
894  // Exit:
895 
896  return;
897 }
898 
899 void
901 pull(const sec_jcb& xjcb, const sec_at1& xcovector, sec_at1& xresult,
902  bool xauto_access)
903 {
904  // Preconditions:
905 
906  require(xjcb.state_is_auto_read_accessible(xauto_access));
907  require(xcovector.state_is_auto_read_accessible(xauto_access));
908  require(xresult.state_is_auto_read_write_accessible(xauto_access));
909  //require(xcovector.d(xauto_access) == xjcb.dr(xauto_access));
910  //require(xresult.d(xauto_access) == xjcb.dd(xauto_access));
911  require(xcovector.is_covariant(0, xauto_access)); // is_dual
912  require(xresult.is_covariant(0, xauto_access)); // is_dual
913 
914  // Body:
915 
916  const sec_jcb_e13* jcb_e13_xjcb = dynamic_cast<const sec_jcb_e13*>(&xjcb);
917  const sec_jcb_e23* jcb_e23_xjcb = dynamic_cast<const sec_jcb_e23*>(&xjcb);
918  const sec_jcb_e33* jcb_e33_xjcb = dynamic_cast<const sec_jcb_e33*>(&xjcb);
919 
920  const sec_e3* e3_xcovector = dynamic_cast<const sec_e3*>(&xcovector);
921 
922  sec_e1* e1_xresult = dynamic_cast<sec_e1*>(&xresult);
923  sec_e2* e2_xresult = dynamic_cast<sec_e2*>(&xresult);
924  sec_e3* e3_xresult = dynamic_cast<sec_e3*>(&xresult);
925 
926  if(jcb_e13_xjcb && e3_xcovector && e1_xresult)
927  {
928  pull(*jcb_e13_xjcb, *e3_xcovector, *e1_xresult, xauto_access);
929  }
930  else if(jcb_e23_xjcb && e3_xcovector && e2_xresult)
931  {
932  pull(*jcb_e23_xjcb, *e3_xcovector, *e2_xresult, xauto_access);
933  }
934  else if(jcb_e33_xjcb && e3_xcovector && e3_xresult)
935  {
936  pull(*jcb_e33_xjcb, *e3_xcovector, *e3_xresult, xauto_access);
937  }
938  else
939  {
940  post_fatal_error_message(\
941  "Unsupported argument types in call to pull(...)");
942  }
943 
944  // Postconditions:
945 
946  ensure(xresult.is_covariant(0, xauto_access)); // is_dual
947 
948  // Exit:
949 
950  return;
951 }
952 
static int d(int xdd, int xdr)
Dimension d() as a function of domain dimension xdd and range dimension xdr.
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 ...
sec_at0 * comp2(int row, int col) const
Component indexed by row and col.
Definition: sec_jcb.cc:781
static const std::string & static_class_name()
The name of this class.
Definition: sec_jcb.cc:602
bool full() const
True if both poset name and member name are not empty.
Definition: poset_path.cc:311
poset_path range_path() const
The path of the range vector space.
The abstract map from section dof ids to section dof values of heterogeneous type.
A space of scalars viewed as an antisymmetric tensor section space of degree 1.
Definition: sec_at1_space.h:48
poset_path domain_path() const
The path of the domain vector space.
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...
virtual int dd() const
Dimension of the domain.
Definition: sec_jcb.cc:382
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.
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.
STL namespace.
virtual sec_jcb & operator=(const abstract_poset_member &xother)
Assignment operator; synonym for attach_to_state(&xother).
Definition: sec_jcb.cc:267
A schema poset for a section space. A binary Cartesian product subspace of the binary tensor product ...
static host_type & new_host(namespace_type &xns, const poset_path &xhost_path, const poset_path &xschema_path, const poset_path &xdomain_space_path, const poset_path &xrange_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_jcb.cc:52
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.
A section of a bundle with fiber type at1.
Definition: sec_at1.h:48
bool fiber_is_ancestor_of(const any *xother) const
True if xother conforms to an instance of the fiber of current.
Definition: sec_jcb.cc:681
bool is_ancestor_of(const any *other) const
true if other conforms to current
Definition: sec_jcb.cc:708
virtual const fiber_type & fiber_prototype() const
Virtual constructor for the associated fiber type.
Definition: sec_jcb.cc:364
poset_path domain_path() const
The path of the domain vector space.
Definition: sec_jcb.cc:424
Abstract base class with useful features for all objects.
Definition: any.h:39
A section of a bundle with fiber type jcb_e13.
Definition: sec_jcb_e13.h:49
virtual section_space_schema_member & schema()
The schema for this poset (mutable version)
virtual int dr() const
Dimension of the range.
virtual bool is_contravariant(bool xauto_access) const
True if and only if all tensor index positions are contravariant.
Definition: sec_tp.cc:748
int dd() const
The dimension of the underlying ("domain") vector space.
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)
SHEAF_DLL_SPEC void push(const sec_jcb &xjcb, const sec_at1 &xvector, sec_at1 &xresult, bool xauto_access)
Push vector forward (pre-allocated version).
Definition: sec_jcb.cc:847
Abstract jacobian class (volatile version).
Definition: jcb.h:54
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
A section of a bundle with fiber type jcb_e33.
Definition: sec_jcb_e33.h:48
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. ...
~sec_jcb()
Destructor.
Definition: sec_jcb.cc:351
poset_path range_path() const
The path of the range vector space.
Definition: sec_jcb.cc:508
bool empty() const
True if both poset name and member name are empty.
Definition: poset_path.cc:291
A section of a fiber bundle with a 3-dimensional Euclidean vector space fiber.
Definition: sec_e3.h:47
SHEAF_DLL_SPEC void pull(const jcb &xjcb, const at1 &xcovector, at1 &xresult, bool xauto_access)
Pull covector back (pre-allocated version for persistent types).
Definition: jcb.cc:1440
Abstract jacobian class.
Definition: jcb.h:229
void set_comp2(int row, int col, sec_at0 *new_comp)
Sets component by row and col.
Definition: sec_jcb.cc:810
A section of a bundle with fiber type jcb.
Definition: sec_jcb.h:49
virtual bool host_is_ancestor_of(const poset_state_handle *other) const
True if other conforms to host.
Definition: sec_jcb.cc:663
SHEAF_DLL_SPEC void pull(const sec_jcb &xjcb, const sec_at1 &xcovector, sec_at1 &xresult, bool xauto_access)
Pull covector back (pre-allocated version).
Definition: sec_jcb.cc:901
sec_jcb()
Default constructor.
Definition: sec_jcb.cc:117
An abstract space of Jacobians.
Definition: jcb_space.h:46
bool invariant() const
Class invariant.
Definition: sec_jcb.cc:733
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).
A section of a fiber bundle with a 1-dimensional Euclidean vector space fiber.
Definition: sec_e1.h:47
virtual const std::string & class_name() const
The name of this class.
Definition: sec_jcb.cc:583
An abstract section space of Jacobians.
Definition: sec_jcb_space.h:53
host_type * host() const
The poset this is a member of.
Definition: sec_jcb.cc:656
virtual bool is_covariant(bool xauto_access) const
True if and only if all tensor index positions are covariant.
Definition: sec_tp.cc:666
A section of a bundle with fiber type jcb_e23.
Definition: sec_jcb_e23.h:49
virtual int dr() const
Dimension of the range.
Definition: sec_jcb.cc:466
An abstract client handle for a member of a poset.
virtual sec_jcb * clone() const
Make a new handle, no state instance of current.
Definition: sec_jcb.cc:621
SHEAF_DLL_SPEC void push(const jcb &xjcb, const at1 &xvector, at1 &xresult, bool xauto_access)
Push vector forward (pre-allocated version for persistent types).
Definition: jcb.cc:1374
bool invariant() const
Class invariant.
Definition: sec_at0.cc:727
Namespace for the fiber_bundles component of the sheaf system.
Antisymetric tensor of degree 0. As the degree is 0 there is nothing to be symmetric or antisymmetric...
Definition: sec_at0.h:51
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