SheafSystem  0.0.0.0
st2_e3.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/st2_e3.impl.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/stp_space.h"
28 #include "SheafSystem/fiber_bundles_namespace.h"
29 #include "SheafSystem/schema_poset_member.h"
30 #include "SheafSystem/stp_space.h"
31 #include "SheafSystem/wsv_block.h"
32 
33 using namespace std;
34 using namespace fiber_bundle; // Workaround for MS C++ bug.
35 
36 
37 //==============================================================================
38 // CLASS ST2_E3_LITE
39 //==============================================================================
40 
41 //==============================================================================
42 // ST2_E3 FACET OF CLASS ST2_E3_LITE
43 //==============================================================================
44 
45 // PUBLIC MEMBER FUNCTIONS
46 
49 {
50 
51  // Preconditions:
52 
53  // Body:
54 
55  // Postconditions:
56 
57  ensure(invariant());
58 
59  // Exit:
60 }
61 
63 st2_e3_lite(const st2_e3_lite& xother)
64 {
65  // Preconditions:
66 
67  // Body:
68 
69  (*this) = xother;
70 
71  // Postconditions:
72 
73  ensure(invariant());
74 
75  // Exit:
76 }
77 
80 operator=(const st2_e3_lite& xother)
81 {
82 
83  // Preconditions:
84 
85  // Body:
86 
87  if(this == &xother)
88  return *this;
89 
90  _row_dofs = xother._row_dofs;
91 
92  // Postconditions:
93 
94  ensure(invariant());
95 
96  // Exit:
97 
98  return *this;
99 }
100 
103 {
104  // Preconditions:
105 
106  // Body:
107 
108  // Postconditions:
109 
110  // Exit:
111 }
112 
114 st2_e3_lite(const row_dofs_type& xrow_dofs)
115 {
116  // Preconditions:
117 
118  // Body:
119 
120  (*this) = xrow_dofs;
121 
122  // Postconditions:
123 
124  // Exit:
125 }
126 
129 operator=(const row_dofs_type& xrow_dofs)
130 {
131  // Preconditions:
132 
133  // Body:
134 
135  _row_dofs = xrow_dofs;
136 
137  // Postconditions:
138 
139  ensure(invariant());
140 
141  // Exit:
142 
143  return *this;
144 
145 }
146 
148 st2_e3_lite(const matrix_type& xmatrix)
149 {
150  // Preconditions:
151 
152  // Body:
153 
154  (*this) = xmatrix;
155 
156  // Postconditions:
157 
158  // Exit:
159 }
160 
163 operator=(const matrix_type& xmatrix)
164 {
165  // Preconditions:
166 
167  // Body:
168 
169  //_row_dofs = xmatrix;
170  _row_dofs = reinterpret_cast<const row_dofs_type&>(xmatrix);
171 
172  // Postconditions:
173 
174  ensure(invariant());
175 
176  // Exit:
177 
178  return *this;
179 
180 }
181 
182 fiber_bundle::st2_e3_lite::
184 {
185  // Preconditions:
186 
187  // Body:
188 
189  matrix_type& result = _row_dofs;
190 
191  // Postconditions:
192 
193  // Exit:
194 
195  return result;
196 }
197 
198 fiber_bundle::st2_e3_lite::
199 operator const st2_e3_lite::matrix_type& () const
200 {
201  // Preconditions:
202 
203  // Body:
204 
205  const matrix_type& result = _row_dofs;
206 
207  // Postconditions:
208 
209  // Exit:
210 
211  return result;
212 }
213 
214 fiber_bundle::st2_e3_lite::
216 {
217  // Preconditions:
218 
219  // Body:
220 
221  row_dofs_type& result = _row_dofs;
222 
223  // Postconditions:
224 
225  // Exit:
226 
227  return result;
228 }
229 
230 fiber_bundle::st2_e3_lite::
231 operator const st2_e3_lite::row_dofs_type& () const
232 {
233  // Preconditions:
234 
235  // Body:
236 
237  const row_dofs_type& result = _row_dofs;
238 
239  // Postconditions:
240 
241  // Exit:
242 
243  return result;
244 }
245 
247 st2_e3_lite(const value_type& xx, const value_type& xy, const value_type& xz,
248  const value_type& yy, const value_type& yz, const value_type& zz)
249 {
250  // Preconditions:
251 
252  // Body:
253 
254  put_components(xx, xy, xz, yy, yz, zz);
255 
256  // Postconditions:
257 
258  // Exit:
259 }
260 
261 void
263 put_components(const value_type& xx_comp,
264  const value_type& xy_comp,
265  const value_type& xz_comp,
266  const value_type& yy_comp,
267  const value_type& yz_comp,
268  const value_type& zz_comp)
269 
270 {
271  // Preconditions:
272 
273  // Body:
274 
275  put_component(0, xx_comp);
276  put_component(1, xy_comp);
277  put_component(2, xz_comp);
278  put_component(3, yy_comp);
279  put_component(4, yz_comp);
280  put_component(5, zz_comp);
281 
282  // Postconditions:
283 
284  ensure(invariant());
285  ensure(isunordered_or_equals(component(0), xx_comp));
286  ensure(isunordered_or_equals(component(1), xy_comp));
287  ensure(isunordered_or_equals(component(2), xz_comp));
288  ensure(isunordered_or_equals(component(3), yy_comp));
289  ensure(isunordered_or_equals(component(4), yz_comp));
290  ensure(isunordered_or_equals(component(5), zz_comp));
291 
292  // Exit:
293 }
294 
295 // PROTECTED MEMBER FUNCTIONS
296 
297 // PRIVATE MEMBER FUNCTIONS
298 
299 
300 //==============================================================================
301 // INTERIOR ALGEBRA (ST2) FACET OF CLASS ST2_E3_LITE
302 //==============================================================================
303 
304 // PUBLIC MEMBER FUNCTIONS
305 
306 // PROTECTED MEMBER FUNCTIONS
307 
308 // PRIVATE MEMBER FUNCTIONS
309 
310 
311 //==============================================================================
312 // INTERIOR ALGEBRA (STP) FACET OF CLASS ST2_E3_LITE
313 //==============================================================================
314 
315 // PUBLIC MEMBER FUNCTIONS
316 
317 // PROTECTED MEMBER FUNCTIONS
318 
319 // PRIVATE MEMBER FUNCTIONS
320 
321 
322 //==============================================================================
323 // TENSOR ALGEBRA (TP) FACET OF CLASS ST2_E3_LITE
324 //==============================================================================
325 
326 // PUBLIC MEMBER FUNCTIONS
327 
328 int
330 dd() const
331 {
332  // Preconditions:
333 
334  // Body:
335 
336  int result = 3;
337 
338  // Postconditions:
339 
340  ensure(invariant());
341  ensure(result == 3);
342 
343  // Exit:
344 
345  return result;
346 }
347 
348 // PROTECTED MEMBER FUNCTIONS
349 
350 // PRIVATE MEMBER FUNCTIONS
351 
352 
353 //==============================================================================
354 // VECTOR ALGEBRA (VD) FACET OF CLASS ST2_E3_LITE
355 //==============================================================================
356 
357 // PUBLIC MEMBER FUNCTIONS
358 
361 tp_prototype(int xp) const
362 {
363  // Preconditions:
364 
365  require(precondition_of(e3_lite::static_tp_prototype(xp)));
366 
367  // Body:
368 
369  const tp_lite& result = e3_lite::static_tp_prototype(xp);
370 
371  // Postconditions:
372 
373  ensure(postcondition_of(e3_lite::static_tp_prototype(xp)));
374 
375  // Exit:
376 
377  return result;
378 }
379 
382 atp_prototype(int xp) const
383 {
384  // Preconditions:
385 
386  require(precondition_of(e3_lite::static_atp_prototype(xp)));
387 
388  // Body:
389 
390  const atp_lite& result = e3_lite::static_atp_prototype(xp);
391 
392  // Postconditions:
393 
394  ensure(postcondition_of(e3_lite::static_atp_prototype(xp)));
395 
396  // Exit:
397 
398  return result;
399 }
400 
403 stp_prototype(int xp) const
404 {
405  // Preconditions:
406 
407  require(precondition_of(e3_lite::static_stp_prototype(xp)));
408 
409  // Body:
410 
411  const stp_lite& result = e3_lite::static_stp_prototype(xp);
412 
413  // Postconditions:
414 
415  ensure(postcondition_of(e3_lite::static_stp_prototype(xp)));
416 
417  // Exit:
418 
419  return result;
420 }
421 
422 // PROTECTED MEMBER FUNCTIONS
423 
424 // PRIVATE MEMBER FUNCTIONS
425 
426 
427 //==============================================================================
428 // CARTESIAN ALGEBRA (TUPLE) FACET OF CLASS ST2_E3_LITE
429 //==============================================================================
430 
431 // PUBLIC MEMBER FUNCTIONS
432 
433 // PROTECTED MEMBER FUNCTIONS
434 
435 // PRIVATE MEMBER FUNCTIONS
436 
437 
438 //==============================================================================
439 // ABSTRACT POSET MEMBER FACET OF CLASS ST2_E3_LITE
440 //==============================================================================
441 
442 // PUBLIC MEMBER FUNCTIONS
443 
444 const std::string&
446 class_name() const
447 {
448  // Preconditions:
449 
450  // Body:
451 
452  const string& result = static_class_name();
453 
454  // Postconditions:
455 
456  ensure(!result.empty());
457 
458  // Exit:
459 
460  return result;
461 }
462 
463 const std::string&
466 {
467  // Preconditions:
468 
469  // Body:
470 
471  static const string result("st2_e3_lite");
472 
473  // Postconditions:
474 
475  ensure(!result.empty());
476 
477  // Exit:
478 
479  return result;
480 }
481 
484 clone() const
485 {
486  st2_e3_lite* result = 0;
487 
488  // Preconditions:
489 
490  // Body:
491 
492  result = new st2_e3_lite();
493 
494  // Postconditions:
495 
496  ensure(result != 0);
497  ensure(is_same_type(*result));
498 
499  // Exit:
500 
501  return result;
502 }
503 
504 // PROTECTED MEMBER FUNCTIONS
505 
506 // PRIVATE MEMBER FUNCTIONS
507 
508 
509 //==============================================================================
510 // ANY FACET OF CLASS ST2_E3_LITE
511 //==============================================================================
512 
513 // PUBLIC MEMBER FUNCTIONS
514 
515 bool
517 is_ancestor_of(const any_lite& xother) const
518 {
519  // Preconditions:
520 
521  require(&xother != 0);
522 
523  // Body:
524 
525  // True if other conforms to this.
526 
527  bool result = dynamic_cast<const st2_e3_lite*>(&xother) != 0;
528 
529  // Postconditions:
530 
531  return result;
532 }
533 
534 bool
536 invariant() const
537 {
538  bool result = true;
539 
540  if(invariant_check())
541  {
542  // Prevent recursive calls to invariant.
543 
544  disable_invariant_check();
545 
546  // Must satisfy base class invariant.
547 
548  invariance(st2_lite::invariant());
549 
550  // Invariances for this class:
551 
552  // Finished, turn invariant checking back on.
553 
554  enable_invariant_check();
555  }
556 
557  // Exit
558 
559  return result;
560 }
561 
562 void*
565 {
566  return &_row_dofs;
567 }
568 
569 const void*
571 row_dofs() const
572 {
573  return &_row_dofs;
574 }
575 
576 // PROTECTED MEMBER FUNCTIONS
577 
578 // PRIVATE MEMBER FUNCTIONS
579 
580 
581 //==============================================================================
582 // CLASS ST2_E3
583 //==============================================================================
584 
585 // ===========================================================
586 // HOST FACTORY FACET OF CLASS ST2_E3
587 // ===========================================================
588 
589 // PUBLIC MEMBER FUNCTIONS
590 
591 const sheaf::poset_path&
594 {
595  // Preconditions:
596 
597 
598  // Body:
599 
600  static const poset_path result(standard_schema_poset_name(), "st2_e3_schema");
601 
602  // Postconditions:
603 
604  // Exit:
605 
606  return result;
607 }
608 
609 void
612 {
613  // Preconditions:
614 
615  require(xns.state_is_read_write_accessible());
616  require(xns.contains_poset(standard_schema_poset_name()));
617  require(!xns.contains_poset_member(standard_schema_path()));
618 
619  // Body:
620 
621  string lmember_names = "xx DOUBLE false ";
622  lmember_names += "xy DOUBLE false ";
623  lmember_names += "xz DOUBLE false ";
624  lmember_names += "yy DOUBLE false ";
625  lmember_names += "yz DOUBLE false ";
626  lmember_names += "zz DOUBLE false";
627 
628  schema_poset_member lschema(xns,
629  standard_schema_path().member_name(),
630  st2::standard_schema_path(),
631  lmember_names,
632  false);
633 
634  lschema.detach_from_state();
635 
636  // Postconditions:
637 
638  ensure(xns.contains_poset_member(standard_schema_path()));
639 
640  // Exit:
641 
642  return;
643 }
644 
648  const poset_path& xhost_path,
649  const poset_path& xschema_path,
650  const poset_path& xvector_space_path,
651  bool xauto_access)
652 {
653  // cout << endl << "Entering st2_e3::new_host." << endl;
654 
655  // Preconditions:
656 
657  require(xns.state_is_auto_read_write_accessible(xauto_access));
658 
659  require(!xhost_path.empty());
660  require(!xns.contains_path(xhost_path, xauto_access));
661 
662  require(xschema_path.full());
663  require(xns.path_is_auto_read_accessible(xschema_path, xauto_access));
664  require(schema_poset_member::conforms_to(xns, xschema_path, standard_schema_path()));
665  require(schema_poset_member::row_dof_ct(xns, xschema_path, xauto_access) == 6);
666 
667  require(xns.path_is_auto_read_accessible(xvector_space_path, xauto_access));
668  require(xns.contains_poset<vector_space_type::host_type>(xvector_space_path, xauto_access));
669  require(xns.member_poset(xvector_space_path, xauto_access).schema(xauto_access).conforms_to(vector_space_type::standard_schema_path()));
670  require(xns.member_poset<vector_space_type::host_type>(xvector_space_path, xauto_access).d(xauto_access) == 3);
671 
672  // Body:
673 
674  host_type& result =
675  host_type::new_table(xns, xhost_path, xschema_path, 2, xvector_space_path, xauto_access);
676 
677  // Postconditions:
678 
679  ensure(xns.owns(result, xauto_access));
680  ensure(result.path(true) == xhost_path);
681  ensure(result.state_is_not_read_accessible());
682  ensure(result.schema(true).path(xauto_access) == xschema_path);
683 
684  ensure(result.factor_ct(true) == 6);
685  ensure(result.d(true) == 6);
686  ensure(result.scalar_space_path(true) == xns.member_poset<vector_space_type::host_type>(xvector_space_path, xauto_access).scalar_space_path());
687  ensure(result.p(true) == 2);
688  ensure(result.dd(true) == 3);
689  ensure(result.vector_space_path(true) == xvector_space_path);
690 
691  // Exit:
692 
693  // cout << "Leaving st2_e3::new_host." << endl;
694  return result;
695 }
696 
699 standard_host(namespace_type& xns, const std::string& xsuffix, bool xauto_access)
700 {
701  // cout << endl << "Entering st2_e3::new_host." << endl;
702 
703  // Preconditions:
704 
705  require(xns.state_is_auto_read_write_accessible(xauto_access));
706 
707  require(xsuffix.empty() || poset_path::is_valid_name(xsuffix));
708  require(standard_host_is_available<st2_e3>(xns, xsuffix, xauto_access));
709 
710  require(xns.path_is_auto_read_accessible(standard_schema_path(), xauto_access));
711 
712  require(xns.path_is_auto_read_available(standard_host_path<vector_space_type>(xsuffix), xauto_access));
713 
714  // Body:
715 
716  // Create the vector space if necessary.
717 
718  poset_path lvector_space_path = vector_space_type::standard_host(xns, xsuffix, xauto_access).path(true);
719 
720  poset_path lpath(standard_host_path<st2_e3>(xsuffix));
721 
722  host_type* result_ptr;
723  if(xns.contains_path(lpath, xauto_access))
724  {
725  result_ptr = &xns.member_poset<host_type>(lpath, xauto_access);
726  }
727  else
728  {
729  result_ptr = &new_host(xns, lpath, standard_schema_path(), lvector_space_path, xauto_access);
730  }
731 
732  host_type& result = *result_ptr;
733 
734  // Postconditions:
735 
736  ensure(xns.owns(result, xauto_access));
737  ensure(result.path(true) == standard_host_path<st2_e3>(xsuffix));
738  ensure(result.state_is_not_read_accessible());
739  ensure(result.schema(true).path(xauto_access) == standard_schema_path());
740 
741  ensure(result.factor_ct(true) == 6);
742  ensure(result.d(true) == 6);
743  ensure(result.scalar_space_path(true) == standard_host_path<vector_space_type::scalar_type>(xsuffix) );
744  ensure(result.p(true) == 2);
745  ensure(result.dd(true) == 3);
746  ensure(result.vector_space_path(true) == standard_host_path<vector_space_type>(xsuffix) );
747 
748  // Exit:
749 
750  // cout << "Leaving st2_e3::new_host." << endl;
751  return result;
752 }
753 
754 // PROTECTED MEMBER FUNCTIONS
755 
756 // PRIVATE MEMBER FUNCTIONS
757 
758 
759 //==============================================================================
760 // ST2_E3 FACET OF CLASS ST2_E3
761 //==============================================================================
762 
763 // PUBLIC MEMBER FUNCTIONS
764 
767 {
768  // Preconditions:
769 
770  // Body:
771 
772  // Postconditions:
773 
774  ensure(invariant());
775 }
776 
779 {
780  // Preconditions:
781 
782  require(xhost != 0);
783  require(xhost->state_is_read_accessible());
784  require(xhost->contains_member(xhub_id));
785 
786  // Body:
787 
788  attach_to_state(xhost, xhub_id);
789 
790  // Postconditions:
791 
792  ensure(invariant());
793  // ensure(host() == xhost);
794  ensure(index() == xhub_id);
795  ensure(is_attached());
796 }
797 
799 st2_e3(const poset_state_handle* xhost, const scoped_index& xid)
800 {
801  // Preconditions:
802 
803  require(xhost != 0);
804  require(xhost->state_is_read_accessible());
805  require(xhost->contains_member(xid));
806 
807  // Body:
808 
809  attach_to_state(xhost, xid.hub_pod());
810 
811  // Postconditions:
812 
813  ensure(invariant());
814  // ensure(host() == xhost);
815  ensure(index() ==~ xid);
816  ensure(is_attached());
817 }
818 
820 st2_e3(const poset_state_handle* xhost, const std::string& xname)
821 {
822 
823  // Preconditions:
824 
825  require(xhost != 0);
826  require(xhost->state_is_read_accessible());
827  require(!xname.empty());
828  require(xhost->contains_member(xname));
829 
830  // Body:
831 
832  attach_to_state(xhost, xname);
833 
834  // Postconditions:
835 
836  ensure(invariant());
837  // ensure(host() == xhost);
838  ensure(name() == xname);
839  ensure(is_attached());
840 
841 }
842 
845 {
846 
847  // Preconditions:
848 
849  require(xother != 0);
850 
851  // Body:
852 
853  attach_to_state(xother);
854 
855  // Postconditions:
856 
857  ensure(invariant());
858  ensure(is_attached());
859  ensure(is_same_state(xother));
860 
861 }
862 
864 st2_e3(poset_state_handle* xhost, bool xauto_access)
865 {
866 
867  // Preconditions:
868 
869  require(precondition_of(new_jim_state(xhost, 0, false, xauto_access)));
870 
871  // Body:
872 
873  new_jim_state(xhost, 0, false, xauto_access);
874 
875  // Postconditions:
876 
877  ensure(postcondition_of(new_jim_state(xhost, 0, false, xauto_access)));
878 
879  // Exit:
880 
881  return;
882 }
883 
886  const row_dofs_type& xrdt,
887  bool xauto_access)
888 {
889 
890  // Preconditions:
891 
892  require(precondition_of(new_jim_state(&xhost, 0, false, xauto_access)));
893 
894  // Body:
895 
896  new_jim_state(&xhost, 0, false, xauto_access);
897 
898  if(xauto_access)
899  {
900  xhost.get_read_write_access();
901  }
902 
903  *this = xrdt;
904 
905  if(xauto_access)
906  {
907  xhost.release_access();
908  }
909 
910  // Postconditions:
911 
912  ensure(postcondition_of(new_jim_state(&xhost, 0, false, xauto_access)));
913 
914  // Exit:
915 
916  return;
917 }
918 
922 {
923  // Preconditions:
924 
925  require(state_is_read_write_accessible());
926 
927  // Body:
928 
929  sheaf::row_dofs(*this) = xrdt;
930 
931  // Postconditions:
932 
933  ensure_for_all(i, 0, d(), component(i) == xrdt.components[i]);
934 
935  // Exit:
936 
937  return *this;
938 
939 }
940 
945 {
946  // Preconditions:
947 
948  require(is_ancestor_of(&xother));
949  require(precondition_of(attach_to_state(&xother)));
950 
951  // Body:
952 
953  attach_to_state(&xother);
954 
955  // Postconditions:
956 
957  ensure(postcondition_of(attach_to_state(&xother)));
958 
959  // Exit:
960 
961  return *this;
962 }
963 
967 operator=(const st2_e3& xother)
968 {
969  // Preconditions:
970 
971  require(precondition_of(attach_to_state(&xother)));
972 
973  // Body:
974 
975  attach_to_state(&xother);
976 
977  // Postconditions:
978 
979  ensure(postcondition_of(attach_to_state(&xother)));
980 
981  // Exit:
982 
983  return *this;
984 }
985 
988 {
989 
990  // Preconditions:
991 
992  // Body:
993 
994  // Postconditions:
995 
996 }
997 
998 
1002 {
1003  // Preconditions:
1004 
1005  // Body:
1006 
1007  static const volatile_type result;
1008 
1009  // Postconditions:
1010 
1011  // Exit:
1012 
1013  return result;
1014 }
1015 
1019 lite_type() const
1020 {
1021  // Preconditions:
1022 
1023  // Body:
1024 
1025  volatile_type* result = new volatile_type(sheaf::row_dofs(*this));
1026 
1027  // Postconditions:
1028 
1029  // Exit:
1030 
1031  return result;
1032 }
1033 
1034 
1035 void
1037 put_components(dof_type xx_comp, dof_type xy_comp, dof_type xz_comp,
1038  dof_type yy_comp, dof_type yz_comp, dof_type zz_comp)
1039 {
1040  // Preconditions:
1041 
1042  require(state_is_read_write_accessible());
1043 
1044  // Body:
1045 
1046  put_component(0, xx_comp);
1047  put_component(1, xy_comp);
1048  put_component(2, xz_comp);
1049  put_component(3, yy_comp);
1050  put_component(4, yz_comp);
1051  put_component(5, zz_comp);
1052 
1053  // Postconditions:
1054 
1055  ensure(invariant());
1056  ensure(isunordered_or_equals(component(0), xx_comp));
1057  ensure(isunordered_or_equals(component(1), xy_comp));
1058  ensure(isunordered_or_equals(component(2), xz_comp));
1059  ensure(isunordered_or_equals(component(3), yy_comp));
1060  ensure(isunordered_or_equals(component(4), yz_comp));
1061  ensure(isunordered_or_equals(component(5), zz_comp));
1062 
1063  // Exit:
1064 
1065  return;
1066 }
1067 
1068 fiber_bundle::st2_e3::
1070 {
1071  // Preconditions:
1072 
1073  require(state_is_read_write_accessible());
1074 
1075  // Body:
1076 
1077  row_dofs_type& result = sheaf::row_dofs(*this);
1078 
1079  // Postconditions:
1080 
1081  // Exit:
1082 
1083  return result;
1084 }
1085 
1086 fiber_bundle::st2_e3::
1087 operator const st2_e3::row_dofs_type& () const
1088 {
1089  // Preconditions:
1090 
1091  require(state_is_read_accessible());
1092 
1093  // Body:
1094 
1095  const row_dofs_type& result = sheaf::row_dofs(*this);
1096 
1097  // Postconditions:
1098 
1099  // Exit:
1100 
1101  return result;
1102 }
1103 
1104 // PROTECTED MEMBER FUNCTIONS
1105 
1106 // PRIVATE MEMBER FUNCTIONS
1107 
1108 
1109 //==============================================================================
1110 // ST2 FACET OF CLASS ST2_E3
1111 //==============================================================================
1112 
1113 // PUBLIC MEMBER FUNCTIONS
1114 
1115 // PROTECTED MEMBER FUNCTIONS
1116 
1117 // PRIVATE MEMBER FUNCTIONS
1118 
1119 
1120 //==============================================================================
1121 // STP FACET OF CLASS ST2_E3
1122 //==============================================================================
1123 
1124 // PUBLIC MEMBER FUNCTIONS
1125 
1126 // PROTECTED MEMBER FUNCTIONS
1127 
1128 // PRIVATE MEMBER FUNCTIONS
1129 
1130 
1131 //==============================================================================
1132 // TP FACET OF CLASS ST2_E3
1133 //==============================================================================
1134 
1135 // PUBLIC MEMBER FUNCTIONS
1136 
1137 // PROTECTED MEMBER FUNCTIONS
1138 
1139 // PRIVATE MEMBER FUNCTIONS
1140 
1141 
1142 //==============================================================================
1143 // VD FACET OF CLASS ST2_E3
1144 //==============================================================================
1145 
1146 // PUBLIC MEMBER FUNCTIONS
1147 
1148 // PROTECTED MEMBER FUNCTIONS
1149 
1150 // PRIVATE MEMBER FUNCTIONS
1151 
1152 
1153 //==============================================================================
1154 // TUPLE FACET OF CLASS ST2_E3
1155 //==============================================================================
1156 
1157 // PUBLIC MEMBER FUNCTIONS
1158 
1161 new_tp(int xp, bool xauto_access) const
1162 {
1163  // Preconditions:
1164 
1165  require(precondition_of(e3::new_tp(vector_space(xauto_access), xp)));
1166 
1167  // Body:
1168 
1169  tp* result = e3::new_tp(vector_space(xauto_access), xp);
1170 
1171  // Postconditions:
1172 
1173  ensure(postcondition_of(e3::new_tp(vector_space(xauto_access), xp)));
1174 
1175  // Exit:
1176 
1177  return result;
1178 }
1179 
1182 new_atp(int xp, bool xauto_access) const
1183 {
1184  // Preconditions:
1185 
1186  require(precondition_of(e3::new_atp(vector_space(xauto_access), xp)));
1187 
1188  // Body:
1189 
1190  atp* result = e3::new_atp(vector_space(xauto_access), xp);
1191 
1192  // Postconditions:
1193 
1194  ensure(postcondition_of(e3::new_atp(vector_space(xauto_access), xp)));
1195 
1196  // Exit:
1197 
1198  return result;
1199 }
1200 
1203 new_stp(int xp, bool xauto_access) const
1204 {
1205  // Preconditions:
1206 
1207  require(precondition_of(e3::new_stp(vector_space(xauto_access), xp)));
1208 
1209  // Body:
1210 
1211  stp* result = e3::new_stp(vector_space(xauto_access), xp);
1212 
1213  // Postconditions:
1214 
1215  ensure(postcondition_of(e3::new_stp(vector_space(xauto_access), xp)));
1216 
1217  // Exit:
1218 
1219  return result;
1220 }
1221 
1222 
1223 // PROTECTED MEMBER FUNCTIONS
1224 
1225 // PRIVATE MEMBER FUNCTIONS
1226 
1227 
1228 //=============================================================================
1229 // ABSTRACT POSET MEMBER FACET OF CLASS ST2_E3
1230 //=============================================================================
1231 
1232 // PUBLIC MEMBER FUNCTIONS
1233 
1234 const std::string&
1236 class_name() const
1237 {
1238  // Preconditions:
1239 
1240  // Body:
1241 
1242  const string& result = static_class_name();
1243 
1244  // Postconditions:
1245 
1246  ensure(!result.empty());
1247 
1248  // Exit:
1249 
1250  return result;
1251 }
1252 
1253 const std::string&
1256 {
1257  // Preconditions:
1258 
1259  // Body:
1260 
1261  static const string result("st2_e3");
1262 
1263  // Postconditions:
1264 
1265  ensure(!result.empty());
1266 
1267  // Exit:
1268 
1269  return result;
1270 }
1271 
1274 clone() const
1275 {
1276 
1277  // Preconditions:
1278 
1279  // Body:
1280 
1281  // Create new handle of the current class.
1282 
1283  st2_e3* result = new st2_e3();
1284 
1285  // Postconditions:
1286 
1287  ensure(result != 0);
1288  ensure(result->invariant());
1289 
1290  // Exit:
1291 
1292  return result;
1293 
1294 }
1295 
1296 // PROTECTED MEMBER FUNCTIONS
1297 
1298 // PRIVATE MEMBER FUNCTIONS
1299 
1300 
1301 //=============================================================================
1302 // ANY FACET OF CLASS ST2_E3
1303 //=============================================================================
1304 
1305 // PUBLIC MEMBER FUNCTIONS
1306 
1307 bool
1309 is_ancestor_of(const any* xother) const
1310 {
1311  // Preconditions:
1312 
1313  require(xother != 0);
1314 
1315  // Body:
1316 
1317  // If other may be dynamically cast to the type of this then this is an
1318  // ancestor of other.
1319 
1320  bool result = dynamic_cast<const st2_e3*>(xother) != 0;
1321 
1322  // Postconditions:
1323 
1324  ensure(invariant());
1325 
1326  // Exit:
1327 
1328  return result;
1329 
1330 }
1331 
1332 bool
1334 invariant() const
1335 {
1336  bool result = true;
1337 
1338  // Preconditions:
1339 
1340  // Body:
1341 
1342  if(invariant_check())
1343  {
1344  // Prevent recursive calls to invariant.
1345 
1346  disable_invariant_check();
1347 
1348  // Must satisfy base class invariant.
1349 
1350  invariance(st2::invariant());
1351 
1352  // Invariants for this class:
1353 
1354  invariance(state_is_read_accessible() ? (dd() == 3) : true);
1355  invariance(state_is_read_accessible() ? (d() == 6) : true);
1356 
1357  // Finished, turn invariant checking back on.
1358 
1359  enable_invariant_check();
1360  }
1361 
1362  // Postconditions:
1363 
1364  ensure(is_derived_query);
1365 
1366  // Exit:
1367 
1368  return result;
1369 }
1370 
1371 // PROTECTED MEMBER FUNCTIONS
1372 
1373 // PRIVATE MEMBER FUNCTIONS
1374 
1375 
1376 //==============================================================================
1377 // NON-MEMBER FUNCTIONS
1378 //==============================================================================
1379 
1380 void
1382 transform_basis_by(st2_e3_lite& xv, const gl3_lite& xtransform, bool is_contravariant)
1383 {
1384  // Preconditions:
1385 
1386  // Body:
1387 
1388  // Notation:
1389  //
1390  // Let the current basis be f-hat, considered as a row of vectors
1391  // with f-hat[i] the i-th basis vector. Similary, let e-hat be the
1392  // new basis. Let B be the matrix of the transform xtransform,
1393  // defined such that the i-th column, B[*][i] contains
1394  // the components of e-hat[i] with respect to f-hat.
1395  //
1396  // Given a twice covariant tensor T, let the components w.r.t.
1397  // f-hat be denoted Tf[k][l], where k is a row index and l is a
1398  // column index. Then the components w.r.t. e-hat are given by:
1399  //
1400  // Te[m][n] = sum k{ sum l{ B[k][m]*B[l][n]*Tf[k][l] }}
1401  //
1402  // For a twice contravariant tensor, the transform is:
1403  //
1404  // Te[m][n] = sum k{ sum l{ C[m][k]*C[n][l]*Tf[k][l] }}
1405  //
1406  // where C is the inverse of B.
1407 
1408  // Transfer the tensor components into a full matrix
1409  // Note that the schema currently stores the matrix
1410  // elements in upper triangular row order.
1411 
1412  typedef st2_e3_lite::value_type value_type;
1413 
1414  value_type xx = xv[0];
1415  value_type xy = xv[1];
1416  value_type xz = xv[2];
1417  value_type yy = xv[3];
1418  value_type yz = xv[4];
1419  value_type zz = xv[5];
1420 
1422 
1423  Tf[0][0] = xx;
1424  Tf[0][1] = xy;
1425  Tf[0][2] = xz;
1426 
1427  Tf[1][0] = xy;
1428  Tf[1][1] = yy;
1429  Tf[1][2] = yz;
1430 
1431  Tf[2][0] = xz;
1432  Tf[2][1] = yz;
1433  Tf[2][2] = zz;
1434 
1435  // Make Te the matrix of xv (we have copied it so we can now overwrite it).
1436 
1437  st2_e3_lite::matrix_type& Te = xv;
1438 
1440 
1441  if(!is_contravariant)
1442  {
1443  // Covariant case.
1444 
1445  // Get the basis transform matrix.
1446 
1447  const gl3_lite::matrix_type& B = xtransform.basis_matrix();
1448 
1449  // Transform the components;
1450  // only need to compute upper triangular part.
1451 
1452  for(int m=0; m<3; ++m)
1453  {
1454  for(int n=m; n<3; ++n)
1455  {
1456  value_type Te_mn = 0.0;
1457  for(int k=0; k<3; ++k)
1458  {
1459  for(int l=0; l<3; ++l)
1460  {
1461  Te_mn += B[k][m]*B[l][n]*Tf[k][l];
1462  }
1463  }
1464  Te[m][n] = Te_mn;
1465  }
1466  }
1467  }
1468  else
1469  {
1470  // Contravariant case.
1471 
1472  // Get the component transform matrix.
1473 
1474  const gl3_lite::matrix_type& C = xtransform.component_matrix();
1475 
1476  // Transform the components;
1477  // only need to compute upper triangular part.
1478 
1479  for(int m=0; m<3; ++m)
1480  {
1481  for(int n=m; n<3; ++n)
1482  {
1483  value_type Te_mn = 0.0;
1484  for(int k=0; k<3; ++k)
1485  {
1486  for(int l=0; l<3; ++l)
1487  {
1488  Te_mn += C[m][k]*C[n][l]*Tf[k][l];
1489  }
1490  }
1491  Te[m][n] = Te_mn;
1492  }
1493  }
1494  }
1495 
1496  // Postconditions:
1497 
1498  // Exit:
1499 
1500 }
1501 
1502 
1503 //==============================================================================
1504 // TEMPLATE SPECIALIZATIONS
1505 //==============================================================================
1506 
1508 void
1510 determinant(const st2_e3& x0, vd_value_type& xresult, bool xauto_access)
1511 {
1512  // Preconditions:
1513 
1514  require(x0.state_is_auto_read_accessible(xauto_access));
1515 
1516  // Body:
1517 
1518  if(xauto_access)
1519  {
1520  x0.get_read_access();
1521  }
1522 
1523  vd_value_type a00 = x0.component(0, 0);
1524  vd_value_type a01 = x0.component(0, 1);
1525  vd_value_type a02 = x0.component(0, 2);
1526  vd_value_type a10 = a01;
1527  vd_value_type a11 = x0.component(1, 1);
1528  vd_value_type a12 = x0.component(1, 2);
1529  vd_value_type a20 = a02;
1530  vd_value_type a21 = a12;
1531  vd_value_type a22 = x0.component(2, 2);
1532 
1533  vd_value_type c00 = a11*a22 - a12*a21;
1534  vd_value_type c01 = a12*a20 - a10*a22;
1535  vd_value_type c02 = a10*a21 - a11*a20;
1536 
1537  xresult = a00*c00 + a01*c01 + a02*c02;
1538 
1539  if(xauto_access)
1540  {
1541  x0.release_access();
1542  }
1543 
1544  // Postconditions:
1545 
1546  ensure(unexecutable("xresult == determinant of x0"));
1547 
1548  // Exit:
1549 
1550  return;
1551 }
1552 
1556 determinant(const st2_e3& x0, bool xauto_access)
1557 {
1558  // Preconditions:
1559 
1560  require(precondition_of(determinant(x0, result, xauto_access)));
1561 
1562  // Body:
1563 
1564  vd_value_type result;
1565 
1566  determinant(x0, result, xauto_access);
1567 
1568  // Postconditions:
1569 
1570  ensure(postcondition_of(determinant(x0, result, xauto_access)));
1571 
1572  // Exit:
1573 
1574  return result;
1575 }
1576 
1578 void
1581 {
1582  // Preconditions:
1583 
1584  // Body:
1585 
1586  vd_value_type a00 = x0.component(0, 0);
1587  vd_value_type a01 = x0.component(0, 1);
1588  vd_value_type a02 = x0.component(0, 2);
1589  vd_value_type a10 = a01;
1590  vd_value_type a11 = x0.component(1, 1);
1591  vd_value_type a12 = x0.component(1, 2);
1592  vd_value_type a20 = a02;
1593  vd_value_type a21 = a12;
1594  vd_value_type a22 = x0.component(2, 2);
1595 
1596  vd_value_type c00 = a11*a22 - a12*a21;
1597  vd_value_type c01 = a12*a20 - a10*a22;
1598  vd_value_type c02 = a10*a21 - a11*a20;
1599 
1600  xresult = a00*c00 + a01*c01 + a02*c02;
1601 
1602  // Postconditions:
1603 
1604  ensure(unexecutable("xresult == determinant of x0"));
1605 
1606  // Exit:
1607 
1608  return;
1609 }
1610 
1615 {
1616  // Preconditions:
1617 
1618  require(precondition_of(determinant(x0, result)));
1619 
1620  // Body:
1621 
1622  vd_value_type result;
1623 
1624  determinant(x0, result);
1625 
1626  // Postconditions:
1627 
1628  ensure(postcondition_of(determinant(x0, result)));
1629 
1630  // Exit:
1631 
1632  return result;
1633 }
1634 
1635 // ===========================================================
1636 // TEMPLATE SPECIALIZATIONS
1637 // ===========================================================
1638 
1639 template <>
1640 void
1642 to_principal_axes(const st2_e3_lite& xlite, gl3_lite& xtransform, st2_e3_lite& xresult)
1643 {
1644  // Preconditions:
1645 
1646  // Body:
1647 
1648  // Calculate the eigenvalues and eigenvectors using the
1649  // Jacobi transformation (iterative) method.
1650 
1651  const st2_e3_lite::matrix_type& mlite = xlite;
1652  st2_e3_lite::matrix_type& mresult = xresult;
1653 
1654  jacobi_transformation(mlite, xtransform.basis_matrix(), mresult);
1655 
1656  // The component part of xtransform is the inverse of the basis part
1657  // (but in the symmetric case; the transform and the inverse are
1658  // identical and the transform is quicker to calculate).
1659 
1660  xtransform.basis_matrix().transpose(xtransform.component_matrix());
1661 
1662  // Postconditions:
1663 
1664  // Exit:
1665 }
virtual ~st2_e3_lite()
Destructor.
Definition: st2_e3.cc:102
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 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 ...
matrix_type & basis_matrix()
The associated basis transformation matrix (non const version).
Definition: gl3.cc:254
virtual const stp_lite & stp_prototype(int xp) const
Prototype for symmetric tensors of degree xp over this vector space.
Definition: st2_e3.cc:403
virtual volatile_type * lite_type() const
Virtual conversion to the associated volatile type.
Definition: st2_e3.cc:1019
static void make_standard_schema(namespace_poset &xns)
Creates the standard schema for this class in namespace xns.
Definition: st2_e3.cc:611
virtual stp * new_stp(int xp, bool xauto_access) const
Virtual constructor for symmetric tensors of degree xp over vector space xvector_space.
Definition: st2_e3.cc:1203
void jacobi_transformation(const symmetric_matrix_3x3< T > &xm, general_matrix_3x3< T > &xeigenvectors, T xeigenvalues[3])
Determine the eigenvectors and eigenvalues of a real symmetric matrix xm.
A symmetric tensor of degree p over an abstract vector space.
Definition: stp.h:190
virtual const tp_lite & tp_prototype(int xp) const
Prototype for general tensors of degree xp over this vector space.
Definition: st2_e3.cc:361
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
vd_value_type value_type
The type of component in the fiber; the scalar type in the fiber vector space.
Definition: st2.h:56
virtual bool is_ancestor_of(const any_lite &xother) const
Conformance test; true if other conforms to this.
Definition: st2_e3.cc:517
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 const atp_lite & atp_prototype(int xp) const
Prototype for antisymmetric tensors of degree xp over this vector space.
Definition: st2_e3.cc:382
poset_path path(bool xauto_access=true) const
A path to this component.
bool conforms_to(const schema_poset_member &xother) const
True if the dofs defined by this agree in type and in order with the dofs defined by xother...
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 void put_components(const value_type &xx_comp, const value_type &xy_comp, const value_type &xz_comp, const value_type &yy_comp, const value_type &yz_comp, const value_type &zz_comp)
Set values of the components to the given arguments.
Definition: st2_e3.cc:263
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...
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...
~st2_e3()
Destructor.
Definition: st2_e3.cc:987
A client handle for a general, abstract partially order set.
virtual const std::string & class_name() const
The name of this class.
Definition: st2_e3.cc:446
virtual const std::string & class_name() const
The name of this class.
Definition: st2_e3.cc:1236
virtual void put_components(dof_type xx_comp, dof_type xy_comp, dof_type xz_comp, dof_type yy_comp, dof_type yz_comp, dof_type zz_comp)
Sets values of the components to the given arguments.
Definition: st2_e3.cc:1037
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
STL namespace.
virtual value_type component(int xrow, int xcolumn) const
The value of the component in a specified row and column.
Definition: st2.cc:145
st2_e3_lite()
Default constructor.
Definition: st2_e3.cc:48
bool invariant() const
Class invariant.
Definition: st2_e3.cc:536
virtual void get_read_access() const
Get read access to the state associated with this.
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.
st2_e3 & operator=(const row_dofs_type &xrdt)
Assignment to an instance of the associated row dofs type.
Definition: st2_e3.cc:921
virtual void * row_dofs()
The row dofs for this instance (mutable version).
Definition: st2_e3.cc:564
SHEAF_DLL_SPEC void determinant(const st2 &x0, vd_value_type &xresult, bool xauto_access)
The determinant of a symmetric tensor (pre-allocated version for persistent types).
Definition: st2.cc:1228
SHEAF_DLL_SPEC void transform_basis_by(e3_lite &xv, const gl3_lite &xtransform, bool is_contravariant=true)
Transform the basis and components of xv by xtransform.
Definition: e3.cc:2283
matrix_type & component_matrix()
The associated component transformation matrix (non const version).
Definition: gl3.cc:288
T * to_principal_axes(const T &xlite, GLN &xtransform)
Computes the principal axes basis for xlite. Returns the diagonalization in the auto-allocated result...
Definition: st2.impl.h:40
T::row_dofs_type & row_dofs(T &x0)
The row dofs pod type for x0 (mutable version).
An antisymmetric tensor of degree p over an abstract vector space (volatile version).
Definition: atp.h:44
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: stp_space.cc:86
bool invariant() const
Class invariant.
Definition: st2_e3.cc:1334
A general tensor of "degree" p and given "variance" over an abstract vector space.
Definition: tp.h:253
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...
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
A general symmetric tensor of degree 2 over an abstract vector space (volatile version).
Definition: st2.h:43
virtual schema_poset_member & schema()
The schema for this poset (mutable version).
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 symmetric tensor of degree 2 over a Euclidean vector space of dimension 3 (volatile version)...
Definition: st2_e3.h:148
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)
virtual void detach_from_state()
Detach this handle from its state, if any.
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
virtual st2_e3_lite * clone() const
Virtual constructor, makes a new instance of the same type as this.
Definition: st2_e3.cc:484
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 p(int xd, int xdd) const
Tensor degree as a function of tensor dimension xd and domain dimension xdd.
Definition: tp_space.cc:235
virtual tp * new_tp(int xp, bool xauto_access) const
Virtual constructor for general tensors of degree xp over vector space xvector_space.
Definition: st2_e3.cc:1161
static const poset_path & standard_schema_path()
The path to the standard schema for this class.
Definition: st2_e3.cc:593
gl3_row_dofs_type< double >::matrix_type matrix_type
The type of the associated matrix.
Definition: gl3.h:202
bool empty() const
True if both poset name and member name are empty.
Definition: poset_path.cc:291
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...
A general tensor of degree p over an abstract vector space (volatile version). Volatile version does ...
Definition: tp.h:59
st2_e3()
Default constructor.
Definition: st2_e3.cc:766
The mathematical group GL(3, R). The group of all invertible, linear transformations on the R3...
Definition: gl3.h:183
bool contains_poset(pod_index_type xhub_id, bool xauto_access=true) const
True if this contains a poset with hub id xhub_id..
bool path_is_auto_read_available(const poset_path &xpath, bool xauto_access) const
True if the state referred to xpath does not exist or exists and is auto read accessible.
poset_path scalar_space_path() const
The path of the underlying space of scalars.
Definition: vd_space.cc:250
virtual atp * new_atp(int xp, bool xauto_access) const
Virtual constructor for antisymmetric tensors of degree xp over vector space xvector_space.
Definition: st2_e3.cc:1182
virtual const volatile_type & lite_prototype() const
Virtual constructor for the associated volatile type.
Definition: st2_e3.cc:1001
An abstract vector space viewed as an antisymmetric tensor space of degree 1.
Definition: at1_space.h:42
st2_e3_lite & operator=(const st2_e3_lite &xother)
Assignment operator.
Definition: st2_e3.cc:80
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
static const std::string & static_class_name()
The name of this class.
Definition: st2_e3.cc:465
int dd() const
The dimension of the underlying ("domain") vector space.
Definition: tp_space.cc:317
General matrix with 3 rows and 3 columns.
bool is_ancestor_of(const any *other) const
True if other conforms to current.
Definition: st2_e3.cc:1309
An abstract client handle for a member of a poset.
std::string path() const
The full path as a string.
Definition: poset_path.cc:450
vd_dof_type dof_type
The type of the degrees of freedom. Note that although dof_type == value_type in this implementation...
Definition: vd.h:431
st2_e3_row_dofs_type< double >::matrix_type matrix_type
The type of the associated matrix.
Definition: st2_e3.h:167
T components[6]
The xx, xy, xz, yy, yz, zz dofs.
Definition: st2_e3.h:130
virtual st2_e3 * clone() const
Make a new handle, no state instance of current.
Definition: st2_e3.cc:1274
A symmetric tensor of degree p over an abstract vector space (volatile version).
Definition: stp.h:44
An abstract symmetric tensor space of degree p.
Definition: stp_space.h:42
Namespace for the fiber_bundles component of the sheaf system.
value_type component(int xrow, int xcolumn) const
The component with row index xrow and column index xcolumn.
Definition: st2.cc:751
static const std::string & static_class_name()
The name of this class.
Definition: st2_e3.cc:1255
row_dofs_type _row_dofs
Row_dofs_type.
Definition: st2_e3.h:257
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...
A client handle for a poset member which has been prepared for use as a schema.
virtual int dd() const
Dimension of the underlying vector space.
Definition: st2_e3.cc:330
double vd_value_type
The type of component in the fiber; the scalar type in the fiber vector space.
Definition: fiber_bundle.h:63
static host_type & standard_host(namespace_type &xns, const std::string &xsuffix, bool xauto_access)
The host with path standard_host_path<st2_e3>(xsuffix). Returns the host if it already exists...
Definition: st2_e3.cc:699
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: st2_e3.cc:647
A symmetric tensor of degree 2 over a Euclidean vector space of dimension 3 (persistent version)...
Definition: st2_e3.h:435
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