SheafSystem  0.0.0.0
sec_ed.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_ed.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/sec_at0.h"
28 #include "SheafSystem/sec_at0_space.h"
29 #include "SheafSystem/sec_at1_space.h"
30 #include "SheafSystem/sec_tuple_space.impl.h"
31 #include "SheafSystem/section_space_schema_member.impl.h"
32 #include "SheafSystem/section_space_schema_poset.h"
33 #include "SheafSystem/at1.h"
34 #include "SheafSystem/at1_space.h"
35 
36 
37 using namespace std;
38 using namespace fiber_bundle; // Workaround for MS C++ bug.
39 
40 //==============================================================================
41 // CLASS SEC_ED
42 //==============================================================================
43 
44 // ===========================================================
45 // HOST FACTORY FACET OF CLASS SEC_ED
46 // ===========================================================
47 
48 // PUBLIC MEMBER FUNCTIONS
49 
53  const poset_path& xhost_path,
54  const poset_path& xschema_path,
55  const poset_path& xscalar_space_path,
56  bool xauto_access)
57 {
58  // cout << endl << "Entering sec_ed::new_host." << endl;
59 
60  // Preconditions:
61 
62  require(xns.state_is_auto_read_write_accessible(xauto_access));
63 
64  require(!xhost_path.empty());
65  require(!xns.contains_path(xhost_path, xauto_access));
66 
67  require(xschema_path.full());
68  require(xns.path_is_auto_read_accessible<schema_type::host_type>(xschema_path, xauto_access));
69  require(host_type::fiber_space_conforms<fiber_type::host_type>(xns, xschema_path, xauto_access));
70 
71  require(xns.path_is_auto_read_accessible<scalar_type::host_type>(xscalar_space_path, xauto_access));
72 
73  require(host_type::same_scalar_fiber_space(xns, xschema_path, xscalar_space_path, xauto_access));
74 
75  // Body:
76 
77  host_type& result = host_type::new_table(xns, xhost_path, xschema_path, xscalar_space_path, xauto_access);
78 
79  // Postconditions:
80 
81  ensure(xns.owns(result, xauto_access));
82  ensure(result.path(true) == xhost_path);
83  ensure(result.state_is_not_read_accessible());
84  ensure(result.schema(true).path(xauto_access) == xschema_path);
85 
86  ensure(result.factor_ct(true) == result.schema(true).fiber_space<fiber_type::host_type>().factor_ct(xauto_access));
87  ensure(result.d(true) == result.schema(true).fiber_space<fiber_type::host_type>().d(xauto_access));
88  ensure(result.d(true) == result.dd(true));
89  ensure(result.scalar_space_path(true) == xscalar_space_path);
90  ensure(result.p(true) == result.schema(true).fiber_space<fiber_type::host_type>().p(xauto_access));
91  ensure(result.p(true) == 1);
92  ensure(result.dd(true) == result.schema(true).fiber_space<fiber_type::host_type>().dd(xauto_access));
93  ensure(result.vector_space_path(true) == xhost_path);
94 
95  // Exit:
96 
97  // cout << "Leaving sec_ed::new_host." << endl;
98  return result;
99 }
100 
101 // PROTECTED MEMBER FUNCTIONS
102 
103 // PRIVATE MEMBER FUNCTIONS
104 
105 
106 //==============================================================================
107 // ED FACET OF CLASS SEC_ED
108 //==============================================================================
109 
110 // PUBLIC MEMBER FUNCTIONS
111 
114 {
115  // Preconditions:
116 
117  // Body:
118 
119  // Postconditions:
120 
121  ensure(invariant());
122 }
123 
125 sec_ed(const sec_rep_space* xhost, pod_index_type xhub_id)
126 {
127  // Preconditions:
128 
129  require(xhost != 0);
130  require(xhost->state_is_read_accessible());
131  require(xhost->contains_member(xhub_id));
132 
133  // Body:
134 
135  attach_to_state(xhost, xhub_id);
136 
137  // Postconditions:
138 
139  ensure(invariant());
140  //ensure(host() == xhost);
141  ensure(index() == xhub_id);
142  ensure(is_attached());
143  ensure(!is_restricted());
144 }
145 
147 sec_ed(const sec_rep_space* xhost, const scoped_index& xid)
148 {
149  // Preconditions:
150 
151  require(xhost != 0);
152  require(xhost->state_is_read_accessible());
153  require(xhost->contains_member(xid));
154 
155  // Body:
156 
157  attach_to_state(xhost, xid.hub_pod());
158 
159  // Postconditions:
160 
161  ensure(invariant());
162  //ensure(host() == xhost);
163  ensure(index() ==~ xid);
164  ensure(is_attached());
165  ensure(!is_restricted());
166 }
167 
169 sec_ed(const sec_rep_space* xhost, const std::string& xname)
170 {
171 
172  // Preconditions:
173 
174  require(xhost != 0);
175  require(xhost->state_is_read_accessible());
176  require(!xname.empty());
177  require(xhost->contains_member(xname));
178 
179  // Body:
180 
181  attach_to_state(xhost, xname);
182 
183  // Postconditions:
184 
185  ensure(invariant());
186  //ensure(host() == xhost);
187  ensure(name() == xname);
188  ensure(is_attached());
189  ensure(!is_restricted());
190 
191 }
192 
194 sec_ed(const namespace_poset* xnamespace,
195  const poset_path& xpath,
196  bool xauto_access)
197 {
198 
199  // Preconditions:
200 
201  require(precondition_of(attach_to_state(same args)));
202 
203  // Body:
204 
205  attach_to_state(xnamespace, xpath, xauto_access);
206 
207  // Postconditions:
208 
209  ensure(postcondition_of(attach_to_state(same args)));
210 
211  // Exit:
212 
213  return;
214 }
215 
216 
219 {
220 
221  // Preconditions:
222 
223  require(xother != 0);
224 
225  // Body:
226 
227  attach_to_state(xother);
228 
229  // Postconditions:
230 
231  ensure(invariant());
232  ensure(is_attached());
233  ensure(is_same_state(xother));
234  ensure(is_same_restriction(xother));
235 
236 }
237 
239 sec_ed(sec_rep_space* xhost, section_dof_map* xdof_map, bool xauto_access)
240 {
241 
242  // Preconditions:
243 
244  require(precondition_of(new_jim_state(xhost, xdof_map, false, xauto_access)));
245 
246  // Body:
247 
248  new_jim_state(xhost, xdof_map, false, xauto_access);
249 
250  // Postconditions:
251 
252  ensure(postcondition_of(new_jim_state(xhost, xdof_map, false, xauto_access)));
253 
254  // Exit:
255 
256  return;
257 }
258 
261  abstract_poset_member& xbase_mbr,
262  int xbase_version, bool xauto_access)
263 {
264 
265  // Preconditions:
266 
267  require(precondition_of(\
268  new_jim_state(xhost, xbase_mbr, xbase_version, xauto_access)));
269 
270  // Body:
271 
272  new_jim_state(xhost, xbase_mbr, xbase_version, xauto_access);
273 
274  // Postconditions:
275 
276 
277  // Exit:
278 
279  return;
280 }
281 
285 {
286  // Preconditions:
287 
288  require(is_ancestor_of(&xother));
289  require(precondition_of(attach_to_state(&xother)));
290 
291  // Body:
292 
293  attach_to_state(&xother);
294 
295  // Postconditions:
296 
297  ensure(postcondition_of(attach_to_state(&xother)));
298 
299  // Exit:
300 
301  return *this;
302 }
303 
306 operator=(const sec_ed& xother)
307 {
308  // Preconditions:
309 
310  require(precondition_of(attach_to_state(&xother)));
311 
312  // Body:
313 
314  attach_to_state(&xother);
315 
316  // Postconditions:
317 
318  ensure(postcondition_of(attach_to_state(&xother)));
319 
320  // Exit:
321 
322  return *this;
323 }
324 
327 operator=(const ed& xfiber)
328 {
329  // Preconditions:
330 
331  require(precondition_of(sec_vd::operator=(xfiber)));
332 
333  // Body:
334 
335  sec_vd::operator=(xfiber);
336 
337  // Postconditions:
338 
339  ensure(postcondition_of(sec_vd::operator=(xfiber)));
340 
341  // Exit:
342 
343  return *this;
344 }
345 
348 operator=(const ed_lite& xfiber)
349 {
350  // Preconditions:
351 
352  require(precondition_of(sec_vd::operator=(xfiber)));
353 
354  // Body:
355 
356  sec_vd::operator=(xfiber);
357 
358  // Postconditions:
359 
360  ensure(postcondition_of(sec_vd::operator=(xfiber)));
361 
362  // Exit:
363 
364  return *this;
365 }
366 
369 {
370 
371  // Preconditions:
372 
373  // Body:
374 
375  // Postconditions:
376 
377 }
378 
382 {
383  // Preconditions:
384 
385  // Body:
386 
387  static const fiber_type result;
388 
389  // Postconditions:
390 
391  // Exit:
392 
393  return result;
394 }
395 
396 // PROTECTED MEMBER FUNCTIONS
397 
398 // PRIVATE MEMBER FUNCTIONS
399 
400 
401 //==============================================================================
402 // AT1 FACET OF CLASS SEC_ED
403 //==============================================================================
404 
405 // PUBLIC MEMBER FUNCTIONS
406 
407 // PROTECTED MEMBER FUNCTIONS
408 
409 // PRIVATE MEMBER FUNCTIONS
410 
411 
412 //==============================================================================
413 // ATP FACET OF CLASS SEC_ED
414 //==============================================================================
415 
416 // PUBLIC MEMBER FUNCTIONS
417 
418 // PROTECTED MEMBER FUNCTIONS
419 
420 // PRIVATE MEMBER FUNCTIONS
421 
422 
423 //==============================================================================
424 // TP FACET OF CLASS SEC_ED
425 //==============================================================================
426 
427 // PUBLIC MEMBER FUNCTIONS
428 
429 // PROTECTED MEMBER FUNCTIONS
430 
431 // PRIVATE MEMBER FUNCTIONS
432 
433 
434 //==============================================================================
435 // VD FACET OF CLASS SEC_ED
436 //==============================================================================
437 
438 // PUBLIC MEMBER FUNCTIONS
439 
440 // PROTECTED MEMBER FUNCTIONS
441 
442 // PRIVATE MEMBER FUNCTIONS
443 
444 
445 //==============================================================================
446 // TUPLE FACET OF CLASS SEC_ED
447 //==============================================================================
448 
449 // PUBLIC MEMBER FUNCTIONS
450 
451 // PROTECTED MEMBER FUNCTIONS
452 
453 // PRIVATE MEMBER FUNCTIONS
454 
455 
456 //==============================================================================
457 // ABSTRACT POSET MEMBER FACET OF CLASS SEC_ED
458 //==============================================================================
459 
460 // PUBLIC MEMBER FUNCTIONS
461 
462 const std::string&
464 class_name() const
465 {
466  // Preconditions:
467 
468  // Body:
469 
470  const string& result = static_class_name();
471 
472  // Postconditions:
473 
474  ensure(!result.empty());
475 
476  // Exit:
477 
478  return result;
479 }
480 
481 const std::string&
484 {
485  // Preconditions:
486 
487  // Body:
488 
489  static const string result("sec_ed");
490 
491  // Postconditions:
492 
493  ensure(!result.empty());
494 
495  // Exit:
496 
497  return result;
498 }
499 
502 clone() const
503 {
504 
505  // Preconditions:
506 
507  // Body:
508 
509  // Create new handle of the current class.
510 
511  sec_ed* result = new sec_ed();
512 
513  // Postconditions:
514 
515  ensure(result != 0);
516  ensure(result->invariant());
517 
518  // Exit:
519 
520  return result;
521 
522 }
523 
524 // PROTECTED MEMBER FUNCTIONS
525 
526 // PRIVATE MEMBER FUNCTIONS
527 
528 
529 //==============================================================================
530 // ANY FACET OF CLASS SEC_ED
531 //==============================================================================
532 
533 // PUBLIC MEMBER FUNCTIONS
534 
535 bool
537 fiber_is_ancestor_of(const any* xother) const
538 {
539 
540  // Preconditions:
541 
542  require(xother != 0);
543 
544  // Body:
545 
546  // If xother may be dynamically cast to the type of this fiber then this
547  // fiber is an ancestor of xother.
548 
549  bool result = dynamic_cast<const ed*>(xother) != 0;
550 
551  // Postconditions:
552 
553  ensure(invariant());
554  ensure(xother->invariant());
555 
556  // Exit:
557 
558  return result;
559 
560 }
561 
562 bool
564 is_ancestor_of(const any* xother) const
565 {
566 
567  // Preconditions:
568 
569  require(xother != 0);
570 
571  // Body:
572 
573  // If other may be dynamically cast to the type of this then this is an
574  // ancestor of other.
575 
576  bool result = dynamic_cast<const sec_ed*>(xother) != 0;
577 
578  // Postconditions:
579 
580  //ensure(invariant());
581 
582  // Exit:
583 
584  return result;
585 
586 }
587 
588 bool
590 invariant() const
591 {
592  bool result = true;
593 
594  // Preconditions:
595 
596  // Body:
597 
598  // Must satisfy base class invariant
599 
600  invariance(sec_at1::invariant());
601 
602  if (invariant_check())
603  {
604  // Prevent recursive calls to invariant
605 
606  disable_invariant_check();
607 
608  // Finished, turn invariant checking back on.
609 
610  enable_invariant_check();
611  }
612 
613  // Postconditions:
614 
615  ensure(is_derived_query);
616 
617  // Exit:
618 
619  return result;
620 }
621 
622 // PROTECTED MEMBER FUNCTIONS
623 
624 // PRIVATE MEMBER FUNCTIONS
625 
626 
627 //==============================================================================
628 // NON-MEMBER FUNCTIONS
629 //==============================================================================
630 
631 namespace
632 {
633 using namespace fiber_bundle::ed_algebra;
634 
635 class dot_functor
636 {
637 public:
638  void operator()(const ed_lite& xl0, const ed_lite& xl1,
639  at0_lite& xlresult) const
640  {
641  xlresult = dot(xl0, xl1);
642  }
643 };
644 
645 class length_functor
646 {
647 public:
648  void operator()(const ed_lite& x0, at0_lite& xresult)
649  {
650  xresult = length(x0);
651  }
652 };
653 
654 class put_length_functor
655 {
656 public:
657  void operator()(ed_lite& x0, const vd_value_type& xlength)
658  {
659  put_length(x0, xlength);
660  }
661 
662  void operator()(ed_lite& x0, const at0_lite& xlength)
663  {
664  put_length(x0, xlength);
665  }
666 };
667 
668 class normalize_functor
669 {
670 public:
671  void operator()(const ed_lite& x0, ed_lite& xresult)
672  {
673  normalize(x0, xresult);
674  }
675 };
676 
677 } //end unnamed namespace
678 
679 //==============================================================================
680 //==============================================================================
681 
682 #include "SheafSystem/sec_vd.impl.h"
683 
684 using namespace fiber_bundle::sec_vd_algebra;
685 
686 void
688 dot(const sec_ed& x0, const sec_ed& x1, sec_at0& xresult, bool xauto_access)
689 {
690  // Preconditions:
691 
692  require(x0.state_is_auto_read_accessible(xauto_access));
693  require(x1.state_is_auto_read_accessible(xauto_access));
694  require(xresult.state_is_auto_read_write_accessible(xauto_access));
695  require(x0.is_same_type(&x1));
696  require(x0.is_p_form(xauto_access) == x1.is_p_form(xauto_access));
697 
698  // Body:
699 
700  binary_op(x0, x1, xresult, dot_functor(), xauto_access);
701 
702  // Postconditions:
703 
704 
705  // Exit:
706 
707  return;
708 }
709 
710 void
712 length(const sec_ed& x0, sec_at0& xresult, bool xauto_access)
713 {
714  // Preconditions:
715 
716  require(x0.state_is_auto_read_accessible(xauto_access));
717  require(xresult.state_is_auto_read_write_accessible(xauto_access));
718 
719  // Body:
720 
721  unary_op(x0, xresult, length_functor(), xauto_access);
722 
723  // Postconditions:
724 
725 
726  // Exit:
727 
728  return;
729 }
730 
731 void
733 put_length(sec_ed& x0, const vd_value_type& xlength, bool xauto_access)
734 {
735  // Preconditions:
736 
737  require(x0.state_is_auto_read_accessible(xauto_access));
738  require(xlength >= 0.0);
739 
740  // Body:
741 
742  unary_op(x0, xlength, put_length_functor(), xauto_access);
743 
744  // Postconditions:
745 
746  ensure(unexecutable("length(x0, xauto_access) == xlength"));
747 
748  // Exit:
749 
750  return;
751 }
752 
754 // void
755 // fiber_bundle::
756 // put_length(sec_ed& x0, const sec_at0& xlength, bool xauto_access)
757 // {
758 // // Preconditions:
759 
760 // require(x0.state_is_auto_read_accessible(xauto_access));
761 // require(xlength >= 0.0);
762 
763 // // Body:
764 
765 // unary_op(x0, xlength, put_length_functor(), xauto_access);
766 
767 // // Postconditions:
768 
769 // ensure(unexecutable("length(x0, xauto_access) == xlength"));
770 
771 // // Exit:
772 
773 // return;
774 // }
775 
776 void
778 normalize(const sec_ed& x0, sec_ed& xresult, bool xauto_access)
779 {
780  // Preconditions:
781 
782  require(x0.state_is_auto_read_accessible(xauto_access));
783  require(xresult.state_is_auto_read_write_accessible(xauto_access));
784  require(x0.is_same_type(&xresult));
785  require(x0.is_p_form(xauto_access) == xresult.is_p_form(xauto_access));
786 
787  // Body:
788 
789  unary_op(x0, xresult, normalize_functor(), xauto_access);
790 
791  // Postconditions:
792 
793  ensure(xresult.is_p_form(xauto_access) == x0.is_p_form(xauto_access));
794  ensure(unexecutable("length(xresult, xauto_access) == 1.0"));
795 
796  // Exit:
797 
798  return;
799 }
800 
801 void
803 normalize(sec_ed& x0, bool xauto_access)
804 {
805  // Preconditions:
806 
807  require(precondition_of(normalize(x0, x0, xauto_access)));
808 
809  // Body:
810 
811  normalize(x0, x0, xauto_access);
812 
813  // Postconditions:
814 
815  ensure(postcondition_of(normalize(x0, x0, xauto_access)));
816 
817  // Exit:
818 }
819 
820 
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 ...
bool full() const
True if both poset name and member name are not empty.
Definition: poset_path.cc:311
A Cartesian product section space.
Namespace containing the Euclidean vector algebra functions for the fiber_bundles component of the sh...
Definition: ed.h:442
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 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...
void unary_op(const S0 &x0, SR &xresult, F xfunctor, bool xauto_access)
Unary operator.
Definition: sec_vd.impl.h:224
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...
SHEAF_DLL_SPEC void length(const sec_ed &x0, sec_at0 &xresult, bool xauto_access)
The Euclidean length (magnitude) of x0.
Definition: sec_ed.cc:712
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...
static const std::string & static_class_name()
The name of this class.
Definition: sec_ed.cc:483
virtual sec_ed & operator=(const abstract_poset_member &xother)
Assignment operator; synonym for attach_to_state(&xother).
Definition: sec_ed.cc:284
A path defined by a poset name and a member name separated by a forward slash (&#39;/&#39;). For example: "cell_definitions/triangle".
Definition: poset_path.h:48
A member of a sec_rep_space; a section.
poset_path vector_space_path() const
The path of the underlying vector space.
bool fiber_is_ancestor_of(const any *xother) const
True if xother conforms to an instance of the fiber of current.
Definition: sec_ed.cc:537
STL namespace.
virtual const std::string & class_name() const
The name of this class.
Definition: sec_ed.cc:464
SHEAF_DLL_SPEC void put_length(sec_ed &x0, const vd_value_type &xlength, bool xauto_access)
Set the Euclidean length (magnitude) of x0 to xlength.
Definition: sec_ed.cc:733
A schema poset for a section space. A binary Cartesian product subspace of the binary tensor product ...
SHEAF_DLL_SPEC vd_value_type dot(const ed &x0, const ed &x1, bool xauto_access)
The Euclidean "dot" product of x0 with x1 (version for persistent types).
Definition: ed.cc:863
SHEAF_DLL_SPEC vd_value_type length(const ed &x0, bool xauto_access)
The Euclidean length (magnitude) of x0 (version for persistent types).
Definition: ed.cc:906
A section of a fiber bundle with a d-dimensional Euclidean vector space fiber.
Definition: sec_ed.h:47
Abstract base class with useful features for all objects.
Definition: any.h:39
int p() const
The tensor degree of this space.
virtual section_space_schema_member & schema()
The schema for this poset (mutable version)
SHEAF_DLL_SPEC void put_length(ed &x0, const vd_value_type &xlength, bool xauto_access)
Set the Euclidean length (magnitude) of x0 to xlength. (version for persistent types).
Definition: ed.cc:947
Euclidean vector space of dimension d (volatile version).
Definition: ed.h:44
void binary_op(const S0 &x0, const S1 &x1, SR &xresult, F xfunctor, bool xauto_access)
Binary operator.
Definition: sec_vd.impl.h:48
virtual sec_ed * clone() const
Make a new handle, no state instance of current.
Definition: sec_ed.cc:502
bool owns(const poset_state_handle &xposet, bool xauto_access) const
True if and only if this contains the poset xposet. synonym for contains_poset(xposet.poset_path(true), xauto_access)
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
static 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_ed.cc:52
bool is_ancestor_of(const any *xother) const
True if xother conforms to current.
Definition: sec_ed.cc:564
bool contains_path(const poset_path &xpath, bool xauto_access=true) const
True if this contains the poset or poset member specified by xpath.
Antisymetric tensor of degree 0 (volatile version).
Definition: at0.h:127
virtual bool contains_member(pod_index_type xmbr_hub_id, bool xauto_access=true) const
True if some version of this poset contains poset member with hub id xmbr_hub_id. ...
int dd() const
The dimension of the underlying ("domain") vector space.
bool is_p_form(bool xauto_access) const
True if this is a p-form.
Definition: sec_atp.cc:396
bool empty() const
True if both poset name and member name are empty.
Definition: poset_path.cc:291
SHEAF_DLL_SPEC void normalize(const ed &x0, ed &xresult, bool xauto_access)
Normalize x0 (convert to a unit vector) (pre_allocated version for persistent types).
Definition: ed.cc:992
SHEAF_DLL_SPEC void normalize(const sec_ed &x0, sec_ed &xresult, bool xauto_access)
Normalize x0 (convert to a unit vector).
Definition: sec_ed.cc:778
An abstract vector space viewed as an antisymmetric tensor space of degree 1.
Definition: at1_space.h:42
Euclidean vector space of dimension d (peresistent version).
Definition: ed.h:210
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).
bool invariant() const
Class invariant.
Definition: sec_ed.cc:590
Namespace containing the algrebra functions for a a section of a fiber bundle with a d-dimensional ve...
Definition: sec_vd.h:691
SHEAF_DLL_SPEC void dot(const sec_ed &x0, const sec_ed &x1, sec_at0 &xresult, bool xauto_access)
The Euclidean "dot" product of x0 with x2.
Definition: sec_ed.cc:688
An abstract client handle for a member of a poset.
Namespace for the fiber_bundles component of the sheaf system.
bool is_same_type(const any *other) const
True if other is the same type as this.
Definition: any.cc:79
Antisymetric tensor of degree 0. As the degree is 0 there is nothing to be symmetric or antisymmetric...
Definition: sec_at0.h:51
~sec_ed()
Destructor.
Definition: sec_ed.cc:368
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...
double vd_value_type
The type of component in the fiber; the scalar type in the fiber vector space.
Definition: fiber_bundle.h:63
sec_ed()
Default constructor.
Definition: sec_ed.cc:113
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.
Definition: scoped_index.h:710
virtual const fiber_type & fiber_prototype() const
Virtual constructor for the associated fiber type.
Definition: sec_ed.cc:381
A handle for a poset whose members are numerical representations of sections of a fiber bundle...
Definition: sec_rep_space.h:61