SheafSystem  0.0.0.0
sec_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/sec_e3.h"
22 
23 #include "SheafSystem/assert_contract.h"
24 #include "SheafSystem/base_space_poset.h"
25 #include "SheafSystem/binary_section_space_schema_member.impl.h"
26 #include "SheafSystem/e3.impl.h"
27 #include "SheafSystem/at1_space.h"
28 #include "SheafSystem/fiber_bundles_namespace.h"
29 #include "SheafSystem/index_space_iterator.h"
30 #include "SheafSystem/sec_at0.h"
31 #include "SheafSystem/sec_at0_space.h"
32 #include "SheafSystem/sec_at1_space.h"
33 #include "SheafSystem/sec_tuple.impl.h"
34 #include "SheafSystem/sec_tuple_space.impl.h"
35 #include "SheafSystem/sec_vd.impl.h"
36 #include "SheafSystem/std_iomanip.h"
37 
38 using namespace std;
39 using namespace fiber_bundle; // Workaround for MS C++ bug.
40 
41 //==============================================================================
42 // CLASS SEC_E3
43 //==============================================================================
44 
45 // ===========================================================
46 // HOST FACTORY FACET OF CLASS SEC_E3
47 // ===========================================================
48 
49 // PUBLIC MEMBER FUNCTIONS
50 
54  const poset_path& xhost_path,
55  const poset_path& xschema_path,
56  const poset_path& xscalar_space_path,
57  bool xauto_access)
58 {
59  // cout << endl << "Entering sec_e3::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<scalar_type::host_type>(xscalar_space_path, xauto_access));
73 
74  require(host_type::same_scalar_fiber_space(xns, xschema_path, xscalar_space_path, xauto_access));
75 
76  // Body:
77 
78  host_type& result = host_type::new_table(xns, xhost_path, xschema_path, xscalar_space_path, xauto_access);
79 
80  // Postconditions:
81 
82  ensure(xns.owns(result, xauto_access));
83  ensure(result.path(true) == xhost_path);
84  ensure(result.state_is_not_read_accessible());
85  ensure(result.schema(true).path(xauto_access) == xschema_path);
86 
87  ensure(result.factor_ct(true) == result.schema(true).fiber_space<fiber_type::host_type>().factor_ct(xauto_access));
88  ensure(result.d(true) == result.schema(true).fiber_space<fiber_type::host_type>().d(xauto_access));
89  ensure(result.d(true) == result.dd(true));
90  ensure(result.scalar_space_path(true) == xscalar_space_path);
91  ensure(result.p(true) == result.schema(true).fiber_space<fiber_type::host_type>().p(xauto_access));
92  ensure(result.p(true) == 1);
93  ensure(result.dd(true) == result.schema(true).fiber_space<fiber_type::host_type>().dd(xauto_access));
94  ensure(result.vector_space_path(true) == xhost_path);
95 
96  // Exit:
97 
98  // cout << "Leaving sec_e3::new_host." << endl;
99  return result;
100 }
101 
105  const poset_path& xbase_path,
106  const poset_path& xrep_path,
107  const std::string& xsection_suffix,
108  const std::string& xfiber_suffix,
109  bool xauto_access)
110 {
111  // cout << endl << "Entering sec_e3::new_host." << endl;
112 
113  // Preconditions:
114 
115  require(xns.state_is_auto_read_write_accessible(xauto_access));
116 
117  require(xbase_path.full());
118  require(xns.path_is_auto_read_accessible<base_space_poset>(xbase_path, xauto_access));
119 
120  require(xrep_path.empty() || xrep_path.full());
121  require(xrep_path.empty() || xns.path_is_auto_read_accessible<sec_rep_descriptor_poset>(xrep_path, xauto_access));
122 
123  require(xsection_suffix.empty() || poset_path::is_valid_name(xsection_suffix));
124 
125  require(xfiber_suffix.empty() || poset_path::is_valid_name(xfiber_suffix));
126 
127  require(standard_host_is_available<sec_e3>(xns, xbase_path, xrep_path, xsection_suffix, xfiber_suffix, xauto_access));
128  require(fiber_type::standard_host_is_available<fiber_type>(xns, xfiber_suffix, xauto_access));
129  require(schema_type::standard_host_is_available<sec_e3>(xns, xbase_path, xrep_path, xfiber_suffix, xauto_access));
130 
131  // Body:
132 
133  poset_path lstd_path = standard_host_path<sec_e3>(xbase_path, xrep_path, xsection_suffix, xfiber_suffix);
134 
135  host_type* lresult_ptr;
136 
137  if(xns.contains_path(lstd_path, xauto_access))
138  {
139  // Standard host already exists, just return it.
140 
141  lresult_ptr = &xns.member_poset<host_type>(lstd_path, xauto_access);
142  }
143  else
144  {
145  // Standard host doesn't exist, have to create it.
146 
147  // Apply default for rep path if needed.
148 
149  poset_path lrep_path = (!xrep_path.empty() ? xrep_path : standard_rep_path());
150 
151  // Find or create the standard schema member.
152 
153  poset_path lstd_schema_path =
154  schema_type::standard_member<sec_e3>(xns, xbase_path, lrep_path, xfiber_suffix, xauto_access);
155 
156  // Find or create the standard scalar space.
157 
158  poset_path lscalar_space_path =
159  scalar_type::standard_host(xns, xbase_path, lrep_path, xsection_suffix, xfiber_suffix, xauto_access).path(xauto_access);
160 
161  // Create the standard host.
162 
163  lresult_ptr = &new_host(xns, lstd_path, lstd_schema_path, lscalar_space_path, xauto_access);
164  }
165 
166  host_type& result = *lresult_ptr;
167 
168  // Postconditions:
169 
170  ensure(xns.owns(result, xauto_access));
171  ensure(result.path(true) == standard_host_path<sec_e3>(xbase_path, xrep_path, xsection_suffix, xfiber_suffix));
172  ensure(result.state_is_not_read_accessible());
173  ensure(result.schema(true).path(xauto_access) ==
174  schema_type::standard_member_path<sec_e3>(xbase_path, xrep_path, xfiber_suffix));
175 
176  ensure(result.factor_ct(true) == result.schema(true).fiber_space<fiber_type::host_type>().factor_ct(xauto_access));
177  ensure(result.d(true) == result.schema(true).fiber_space<fiber_type::host_type>().d(xauto_access));
178  ensure(result.d(true) == result.dd(true));
179  ensure(result.scalar_space_path(true) ==
180  scalar_type::standard_host_path<scalar_type>(xbase_path, result.rep().path(xauto_access), xsection_suffix, xfiber_suffix));
181  ensure(result.p(true) == result.schema(true).fiber_space<fiber_type::host_type>().p(xauto_access));
182  ensure(result.p(true) == 1);
183  ensure(result.dd(true) == result.schema(true).fiber_space<fiber_type::host_type>().dd(xauto_access));
184  ensure(result.vector_space_path(true) == result.path(true));
185 
186  // Exit:
187 
188  // cout << "Leaving sec_e3::new_host." << endl;
189  return result;
190 }
191 
192 // PROTECTED MEMBER FUNCTIONS
193 
194 // PRIVATE MEMBER FUNCTIONS
195 
196 
197 //==============================================================================
198 // E3 FACET OF CLASS SEC_E3
199 //==============================================================================
200 
201 // PUBLIC MEMBER FUNCTIONS
202 
205 {
206  // Preconditions:
207 
208  // Body:
209 
210  // Postconditions:
211 
212  ensure(invariant());
213 }
214 
216 sec_e3(const sec_rep_space* xhost, pod_index_type xhub_id)
217 {
218  // Preconditions:
219 
220  require(xhost != 0);
221  require(xhost->state_is_read_accessible());
222  require(xhost->contains_member(xhub_id));
223 
224  // Body:
225 
226  attach_to_state(xhost, xhub_id);
227 
228  // Postconditions:
229 
230  ensure(invariant());
231  //ensure(host() == xhost);
232  ensure(index() == xhub_id);
233  ensure(is_attached());
234  ensure(!is_restricted());
235 }
236 
238 sec_e3(const sec_rep_space* xhost, const scoped_index& xid)
239 {
240  // Preconditions:
241 
242  require(xhost != 0);
243  require(xhost->state_is_read_accessible());
244  require(xhost->contains_member(xid));
245 
246  // Body:
247 
248  attach_to_state(xhost, xid.hub_pod());
249 
250  // Postconditions:
251 
252  ensure(invariant());
253  //ensure(host() == xhost);
254  ensure(index() ==~ xid);
255  ensure(is_attached());
256  ensure(!is_restricted());
257 }
258 
260 sec_e3(const sec_rep_space* xhost, const std::string& xname)
261 {
262  // Preconditions:
263 
264  require(xhost != 0);
265  require(xhost->state_is_read_accessible());
266  require(!xname.empty());
267  require(xhost->contains_member(xname));
268 
269  // Body:
270 
271  attach_to_state(xhost, xname);
272 
273  // Postconditions:
274 
275  ensure(invariant());
276  //ensure(host() == xhost);
277  ensure(name() == xname);
278  ensure(is_attached());
279  ensure(!is_restricted());
280 
281 }
282 
284 sec_e3(const namespace_poset* xnamespace,
285  const poset_path& xpath,
286  bool xauto_access)
287 {
288  // Preconditions:
289 
290  require(precondition_of(attach_to_state(same args)));
291 
292  // Body:
293 
294  attach_to_state(xnamespace, xpath, xauto_access);
295 
296  // Postconditions:
297 
298  ensure(postcondition_of(attach_to_state(same args)));
299 
300  // Exit:
301 
302  return;
303 }
304 
307 {
308  // Preconditions:
309 
310  require(xother != 0);
311 
312  // Body:
313 
314  attach_to_state(xother);
315 
316  // Postconditions:
317 
318  ensure(invariant());
319  ensure(is_attached());
320  ensure(is_same_state(xother));
321  ensure(is_same_restriction(xother));
322 
323 }
324 
326 sec_e3(sec_rep_space* xhost, section_dof_map* xdof_map, bool xauto_access)
327 {
328  // Preconditions:
329 
330  require(precondition_of(new_jim_state(xhost, xdof_map, false, xauto_access)));
331 
332  // Body:
333 
334  new_jim_state(xhost, xdof_map, false, xauto_access);
335 
336  // Postconditions:
337 
338  ensure(postcondition_of(new_jim_state(xhost, xdof_map, false, xauto_access)));
339 
340  // Exit:
341 
342  return;
343 }
344 
347  abstract_poset_member& xbase_mbr,
348  int xbase_version, bool xauto_access)
349 {
350  // Preconditions:
351 
352  require(precondition_of(new_jim_state(xhost, xbase_mbr, xbase_version, xauto_access)));
353 
354  // Body:
355 
356  new_jim_state(xhost, xbase_mbr, xbase_version, xauto_access);
357 
358  // Postconditions:
359 
360  ensure(postcondition_of(new_jim_state(xhost, xbase_mbr, xbase_version, xauto_access)));
361 
362  // Exit:
363 
364  return;
365 }
366 
368 sec_e3(sec_rep_space* xhost, const subposet& xbase_parts, bool xauto_access)
369 {
370  // Preconditions:
371 
372  require(precondition_of(new_jim_state(xhost, xbase_parts, xauto_access)));
373 
374  // Body:
375 
376  new_jrm_state(xhost, xbase_parts, xauto_access);
377 
378  // Postconditions:
379 
380  require(postcondition_of(new_jim_state(xhost, xbase_parts, xauto_access)));
381 
382  // Exit:
383 
384  return;
385 }
386 
390 {
391  // Preconditions:
392 
393  require(is_ancestor_of(&xother));
394  require(precondition_of(attach_to_state(&xother)));
395 
396  // Body:
397 
398  attach_to_state(&xother);
399 
400  // Postconditions:
401 
402  ensure(postcondition_of(attach_to_state(&xother)));
403 
404  // Exit:
405 
406  return *this;
407 }
408 
411 operator=(const sec_e3& xother)
412 {
413  // Preconditions:
414 
415  require(precondition_of(attach_to_state(&xother)));
416 
417  // Body:
418 
419  attach_to_state(&xother);
420 
421  // Postconditions:
422 
423  ensure(postcondition_of(attach_to_state(&xother)));
424 
425  // Exit:
426 
427  return *this;
428 }
429 
432 operator=(const e3& xfiber)
433 {
434  // Preconditions:
435 
436  require(precondition_of(sec_vd::operator=(xfiber)));
437 
438  // Body:
439 
440  sec_vd::operator=(xfiber);
441 
442  // Postconditions:
443 
444  ensure(postcondition_of(sec_vd::operator=(xfiber)));
445 
446  // Exit:
447 
448  return *this;
449 }
450 
453 operator=(const e3_lite& xfiber)
454 {
455  // Preconditions:
456 
457  require(precondition_of(sec_vd::operator=(xfiber)));
458 
459  // Body:
460 
461  sec_vd::operator=(xfiber);
462 
463  // Postconditions:
464 
465  ensure(postcondition_of(sec_vd::operator=(xfiber)));
466 
467  // Exit:
468 
469  return *this;
470 }
471 
474 {
475  // Preconditions:
476 
477  // Body:
478 
479  // Postconditions:
480 
481 }
482 
486 {
487  // Preconditions:
488 
489  // Body:
490 
491  static const fiber_type result;
492 
493  // Postconditions:
494 
495  // Exit:
496 
497  return result;
498 }
499 
500 // PROTECTED MEMBER FUNCTIONS
501 
502 // PRIVATE MEMBER FUNCTIONS
503 
504 
505 //==============================================================================
506 // ED FACET OF CLASS SEC_E3
507 //==============================================================================
508 
509 // PUBLIC MEMBER FUNCTIONS
510 
511 // PROTECTED MEMBER FUNCTIONS
512 
513 // PRIVATE MEMBER FUNCTIONS
514 
515 
516 //==============================================================================
517 // AT1 FACET OF CLASS SEC_E3
518 //==============================================================================
519 
520 // PUBLIC MEMBER FUNCTIONS
521 
522 // PROTECTED MEMBER FUNCTIONS
523 
524 // PRIVATE MEMBER FUNCTIONS
525 
526 
527 //==============================================================================
528 // ATP FACET OF CLASS SEC_E3
529 //==============================================================================
530 
531 // PUBLIC MEMBER FUNCTIONS
532 
533 // PROTECTED MEMBER FUNCTIONS
534 
535 // PRIVATE MEMBER FUNCTIONS
536 
537 
538 //==============================================================================
539 // TP FACET OF CLASS SEC_E3
540 //==============================================================================
541 
542 // PUBLIC MEMBER FUNCTIONS
543 
544 // PROTECTED MEMBER FUNCTIONS
545 
546 // PRIVATE MEMBER FUNCTIONS
547 
548 
549 //==============================================================================
550 // VD FACET OF CLASS SEC_E3
551 //==============================================================================
552 
553 // PUBLIC MEMBER FUNCTIONS
554 
555 // PROTECTED MEMBER FUNCTIONS
556 
557 // PRIVATE MEMBER FUNCTIONS
558 
559 
560 //==============================================================================
561 // TUPLE FACET OF CLASS SEC_E3
562 //==============================================================================
563 
564 // PUBLIC MEMBER FUNCTIONS
565 
566 // PROTECTED MEMBER FUNCTIONS
567 
568 // PRIVATE MEMBER FUNCTIONS
569 
570 
571 //==============================================================================
572 // ABSTRACT POSET MEMBER FACET OF CLASS SEC_E3
573 //==============================================================================
574 
575 // PUBLIC MEMBER FUNCTIONS
576 
577 const std::string&
579 class_name() const
580 {
581  // Preconditions:
582 
583  // Body:
584 
585  const string& result = static_class_name();
586 
587  // Postconditions:
588 
589  ensure(!result.empty());
590 
591  // Exit:
592 
593  return result;
594 }
595 
596 const std::string&
599 {
600  // Preconditions:
601 
602  // Body:
603 
604  static const string result("sec_e3");
605 
606  // Postconditions:
607 
608  ensure(!result.empty());
609 
610  // Exit:
611 
612  return result;
613 }
614 
617 clone() const
618 {
619  // Preconditions:
620 
621  // Body:
622 
623  // Create new handle of the current class.
624 
625  sec_e3* result = new sec_e3();
626 
627  // Postconditions:
628 
629  ensure(result != 0);
630  ensure(result->invariant());
631 
632  // Exit:
633 
634  return result;
635 
636 }
637 
638 // PROTECTED MEMBER FUNCTIONS
639 
640 // PRIVATE MEMBER FUNCTIONS
641 
642 
643 //==============================================================================
644 // ANY FACET OF CLASS SEC_E3
645 //==============================================================================
646 
647 // PUBLIC MEMBER FUNCTIONS
648 
649 bool
651 fiber_is_ancestor_of(const any* xother) const
652 {
653  // Preconditions:
654 
655  require(xother != 0);
656 
657  // Body:
658 
659  // If xother may be dynamically cast to the type of this fiber then this
660  // fiber is an ancestor of xother.
661 
662  bool result = dynamic_cast<const e3*>(xother) != 0;
663 
664  // Postconditions:
665 
666  ensure(invariant());
667  ensure(xother->invariant());
668 
669  // Exit:
670 
671  return result;
672 
673 }
674 
675 bool
677 is_ancestor_of(const any* xother) const
678 {
679  // Preconditions:
680 
681  require(xother != 0);
682 
683  // Body:
684 
685  // If other may be dynamically cast to the type of this then this is an
686  // ancestor of other.
687 
688  bool result = dynamic_cast<const sec_e3*>(xother) != 0;
689 
690  // Postconditions:
691 
692  //ensure(invariant());
693 
694  // Exit:
695 
696  return result;
697 
698 }
699 
700 bool
702 invariant() const
703 {
704  bool result = true;
705 
706  // Preconditions:
707 
708  // Body:
709 
710  invariance(sec_ed::invariant());
711 
712  if (invariant_check())
713  {
714  // Prevent recursive calls to invariant.
715 
716  disable_invariant_check();
717 
718  invariance(is_attached() ? df() == 3 : true);
719 
720  // Finished, turn invariant checking back on.
721 
722  enable_invariant_check();
723  }
724 
725  // Postconditions:
726 
727  ensure(is_derived_query);
728 
729  // Exit:
730 
731  return result;
732 
733 }
734 
735 // PROTECTED MEMBER FUNCTIONS
736 
737 // PRIVATE MEMBER FUNCTIONS
738 
739 
740 //==============================================================================
741 // NON-MEMBER FUNCTIONS
742 //==============================================================================
743 
744 std::ostream&
746 operator<<(std::ostream& xos, const sec_e3& xv)
747 {
748  sec_e3::dof_type ldof;
749  int i = 0;
750 
751  xos << "sec_e3 " << xv. name() << " dofs:" << endl;
752 
754 
755  while(!itr.is_done())
756  {
757  xos << setw(10) << xv.dof_map().dof(itr.index()).to_string();
758  if (i%5 == 4)
759  xos << endl;
760  itr.next();
761  i++;
762  }
763 
765 
766  return xos;
767 }
768 
769 //==============================================================================
770 
771 namespace
772 {
773 using namespace fiber_bundle::e3_algebra;
774 
775 class cross_functor
776 {
777 public:
778  void operator()(const e3_lite& x0, const e3_lite& x1, e3_lite& xresult)
779  {
780  cross(x0, x1, xresult);
781  }
782 };
783 
784 } //end unnamed namespace
785 
786 using namespace fiber_bundle::sec_vd_algebra;
787 
788 void
790 cross(const sec_e3& x0, const sec_e3& x1, sec_e3& xresult, bool xauto_access)
791 {
792  // Preconditions:
793 
794  require(x0.state_is_auto_read_accessible(xauto_access));
795  require(x1.state_is_auto_read_accessible(xauto_access));
796  require(xresult.state_is_auto_read_write_accessible(xauto_access));
797  require(x0.is_p_form(xauto_access) == x1.is_p_form(xauto_access));
798 
799  // Body:
800 
801  binary_op(x0, x1, xresult, cross_functor(), xauto_access);
802 
803  // Set the variance of the result.
804 
805  x0.is_p_form(xauto_access) ? xresult.put_is_p_form(xauto_access)
806  : xresult.put_is_p_vector(xauto_access);
807 
808  // Postconditions:
809 
810  ensure(x0.is_p_form(xauto_access) == xresult.is_p_form(xauto_access));
811  ensure(unexecutable("xresult == x0 cross x1"));
812 
813  // Exit:
814 
815  return;
816 
817 }
818 
819 void
821 cross_equal(sec_e3& xresult, const sec_e3& xother, bool xauto_access)
822 {
823  // Preconditions:
824 
825  require(precondition_of(sec_cross(xresult, xother, xresult, xauto_access)));
826 
827  // Body:
828 
829  cross(xresult, xother, xresult, xauto_access);
830 
831  // Postconditions:
832 
833  ensure(postcondition_of(sec_cross(xresult, xother, xresult, xauto_access)));
834 
835  // Exit:
836 
837 }
838 
839 
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 client handle for a subposet.
Definition: subposet.h:86
SHEAF_DLL_SPEC void cross_equal(sec_e3 &xresult, const sec_e3 &xother, bool xauto_access)
The 3D Euclidean vector "cross" product of xresult with xother; synonym for cross(xresult, xother, xresult, xauto_access).
Definition: sec_e3.cc:821
void put_is_p_vector(bool xauto_access)
Sets is_p_vector to true.
Definition: sec_atp.cc:459
bool full() const
True if both poset name and member name are not empty.
Definition: poset_path.cc:311
A Cartesian product section space.
const index_space_handle & row_dof_id_space() const
The row dof id space for the schema defined by this.
Euclidean vector space of dimension 3 (volatile version).
Definition: e3.h:116
The abstract map from section dof ids to section dof values of heterogeneous type.
An abstract iterator over the ids of an id space.
static host_type & new_host(namespace_type &xns, const poset_path &xhost_path, const poset_path &xschema_path, const poset_path &xscalar_space_path, bool xauto_access)
Creates a new host table for members of this type. The poset is created in namespace xns with path xh...
Definition: sec_e3.cc:53
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.
A general antisymmetric tensor of degree 1 over an abstract vector space (persistent version)...
Definition: at1.h:211
The standard fiber bundles name space; extends the standard sheaves namespace by defining base space...
primitive_value dof(pod_index_type xdof_id) const
The dof referred to by xdof_id.
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 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.
STL namespace.
virtual const fiber_type & fiber_prototype() const
Virtual constructor for the associated fiber type.
Definition: sec_e3.cc:485
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 void next()=0
Makes id() the next id in the iteration.
The poset for sec_rep_descriptors.
Euclidean vector space of dimension 3 (persistent version).
Definition: e3.h:467
virtual sec_e3 * clone() const
Make a new handle, no state instance of current.
Definition: sec_e3.cc:617
Abstract base class with useful features for all objects.
Definition: any.h:39
int p() const
The tensor degree of this space.
The lattice of closed cells of a cellular space; a lattice representation of a computational mesh...
sec_rep_descriptor & rep()
A representation descriptor for this sec rep space (mutable version).
virtual section_space_schema_member & schema()
The schema for this poset (mutable version)
bool is_done() const
True if iteration is finished.
Namespace containing the 3D Euclidean vector algebra functions for the fiber_bundles component of the...
Definition: e3.h:834
void binary_op(const S0 &x0, const S1 &x1, SR &xresult, F xfunctor, bool xauto_access)
Binary operator.
Definition: sec_vd.impl.h:48
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 release_iterator(index_space_iterator &xitr) const =0
Returns the id space iterator xitr to the iterator pool.
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
~sec_e3()
Destructor.
Definition: sec_e3.cc:473
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. ...
static host_type & standard_host(namespace_type &xns, const poset_path &xbase_path, const poset_path &xrep_path, const std::string &xsection_suffix, const std::string &xfiber_suffix, bool xauto_access)
The standard host for sections of this type with base space xbase_path, representation xrep_path...
Definition: sec_e3.cc:104
static const std::string & static_class_name()
The name of this class.
Definition: sec_e3.cc:598
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
A section of a fiber bundle with a 3-dimensional Euclidean vector space fiber.
Definition: sec_e3.h:47
virtual pod_type index() const =0
Index of this space.
virtual index_space_iterator & get_iterator() const =0
Allocates an id space iterator from the iterator pool.
virtual sec_e3 & operator=(const abstract_poset_member &xother)
Assignment operator; synonym for attach_to_state(&xother).
Definition: sec_e3.cc:389
void SHEAF_DLL_SPEC cross(const e3 &x0, const e3 &x1, e3 &xresult, bool xauto_access)
The 3D Euclidean vector "cross" product of x0 with x1 (pre-allocated version).
Definition: e3.cc:2112
An abstract vector space viewed as an antisymmetric tensor space of degree 1.
Definition: at1_space.h:42
virtual section_space_schema_member & schema()
The restricted schema for this (mutable version).
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
bool fiber_is_ancestor_of(const any *xother) const
True if xother conforms to an instance of the fiber of current.
Definition: sec_e3.cc:651
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).
sec_vd_dof_type dof_type
The type of degree of freedom.
Definition: sec_vd.h:91
virtual const std::string & class_name() const
The name of this class.
Definition: sec_e3.cc:579
Namespace containing the algrebra functions for a a section of a fiber bundle with a d-dimensional ve...
Definition: sec_vd.h:691
void put_is_p_form(bool xauto_access)
Sets is_p_form to true.
Definition: sec_atp.cc:416
sec_e3()
Creates a new sec_e3 handle not attached to any state.
Definition: sec_e3.cc:204
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
Namespace for the fiber_bundles component of the sheaf system.
bool invariant() const
class invariant
Definition: sec_e3.cc:702
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...
SHEAF_DLL_SPEC void cross(const sec_e3 &x0, const sec_e3 &x1, sec_e3 &xresult, bool xauto_access)
The 3D Euclidean vector "cross" product of x0 with x1 (pre-allocated version).
Definition: sec_e3.cc:790
virtual section_dof_map & dof_map(bool xrequire_write_access=false)
The map from client_ids to dof values for this poset member (mutable version)
bool is_ancestor_of(const any *other) const
true if other conforms to current
Definition: sec_e3.cc:677
SHEAF_DLL_SPEC std::ostream & operator<<(std::ostream &os, const binary_index &xbi)
Insert binary_index& xbi into ostream& os.
Definition: binary_index.cc:35
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.
Definition: scoped_index.h:710
A handle for a poset whose members are numerical representations of sections of a fiber bundle...
Definition: sec_rep_space.h:61