SheafSystem  0.0.0.0
sec_at0.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 //#define DIAGNOSTIC_OUTPUT
22 
23 #include "SheafSystem/sec_at0.h"
24 
25 #include "SheafSystem/assert_contract.h"
26 #include "SheafSystem/at0.impl.h"
27 #include "SheafSystem/at0_space.h"
28 #include "SheafSystem/base_space_poset.h"
29 #include "SheafSystem/binary_section_space_schema_member.impl.h"
30 #include "SheafSystem/fiber_bundles_namespace.h"
31 #include "SheafSystem/index_space_iterator.h"
32 #include "SheafSystem/sec_at0_space.h"
33 #include "SheafSystem/sec_tuple.impl.h"
34 #include "SheafSystem/sec_tuple_space.impl.h"
35 #include "SheafSystem/std_iomanip.h"
36 
37 
38 using namespace std;
39 using namespace fiber_bundle; // Workaround for MS C++ bug.
40 
41 //==============================================================================
42 // CLASS SEC_AT0
43 //==============================================================================
44 
45 // ===========================================================
46 // HOST FACTORY FACET OF CLASS SEC_AT0
47 // ===========================================================
48 
49 // PUBLIC MEMBER FUNCTIONS
50 
54  const poset_path& xhost_path,
55  const poset_path& xschema_path,
56  bool xauto_access)
57 {
58  // cout << endl << "Entering sec_at0::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  // Body:
72 
73  host_type& result = host_type::new_table(xns, xhost_path, xschema_path, xauto_access);
74 
75  // Postconditions:
76 
77  ensure(xns.owns(result, xauto_access));
78  ensure(result.path(true) == xhost_path);
79  ensure(result.state_is_not_read_accessible());
80  ensure(result.schema(true).path(xauto_access) == xschema_path);
81 
82  ensure(result.factor_ct(true) == result.schema(true).fiber_space<fiber_type::host_type>().factor_ct(xauto_access));
83  ensure(result.d(true) == result.schema(true).fiber_space<fiber_type::host_type>().d(xauto_access));
84  ensure(result.d(true) == result.dd(true));
85  ensure(result.d(true) == 1);
86  ensure(result.scalar_space_path(true) == xhost_path);
87  ensure(result.p(true) == result.schema(true).fiber_space<fiber_type::host_type>().p(xauto_access));
88  ensure(result.p(true) == 0);
89  ensure(result.dd(true) == result.schema(true).fiber_space<fiber_type::host_type>().dd(xauto_access));
90  ensure(result.dd(true) == 1);
91  ensure(result.vector_space_path(true) == xhost_path);
92 
93  // Exit:
94 
95  // cout << "Leaving sec_at0::new_host." << endl;
96  return result;
97 }
98 
102  const poset_path& xbase_path,
103  const poset_path& xrep_path,
104  const std::string& xsection_suffix,
105  const std::string& xfiber_suffix,
106  bool xauto_access)
107 {
108  // cout << endl << "Entering sec_at0::new_host." << endl;
109 
110  // Preconditions:
111 
112  require(xns.state_is_auto_read_write_accessible(xauto_access));
113 
114  require(xbase_path.full());
115  require(xns.path_is_auto_read_accessible<base_space_poset>(xbase_path, xauto_access));
116 
117  require(xrep_path.empty() || xrep_path.full());
118  require(xrep_path.empty() || xns.path_is_auto_read_accessible<sec_rep_descriptor_poset>(xrep_path, xauto_access));
119 
120  require(xsection_suffix.empty() || poset_path::is_valid_name(xsection_suffix));
121 
122  require(xfiber_suffix.empty() || poset_path::is_valid_name(xfiber_suffix));
123 
124  require(standard_host_is_available<sec_at0>(xns, xbase_path, xrep_path, xsection_suffix, xfiber_suffix, xauto_access));
125  require(fiber_type::standard_host_is_available<fiber_type>(xns, xfiber_suffix, xauto_access));
126  require(schema_type::standard_host_is_available<sec_at0>(xns, xbase_path, xrep_path, xfiber_suffix, xauto_access));
127 
128  // Body:
129 
130  poset_path lstd_path = standard_host_path<sec_at0>(xbase_path, xrep_path, xsection_suffix, xfiber_suffix);
131 
132  host_type* lresult_ptr;
133 
134  if(xns.contains_path(lstd_path, xauto_access))
135  {
136  // Standard host already exists, just return it.
137 
138  lresult_ptr = &xns.member_poset<host_type>(lstd_path, xauto_access);
139  }
140  else
141  {
142  // Standard host doesn't exist, have to create it.
143 
144  // Apply default for rep path if needed.
145 
146  poset_path lrep_path = (!xrep_path.empty() ? xrep_path : standard_rep_path());
147 
148  // Find or create the standard schema member.
149 
150  poset_path lstd_schema_path =
151  schema_type::standard_member<sec_at0>(xns, xbase_path, lrep_path, xfiber_suffix, xauto_access);
152 
153  // Create the standard host.
154 
155  lresult_ptr = &new_host(xns, lstd_path, lstd_schema_path, xauto_access);
156  }
157 
158  host_type& result = *lresult_ptr;
159 
160  // Postconditions:
161 
162  ensure(xns.owns(result, xauto_access));
163  ensure(result.path(true) == standard_host_path<sec_at0>(xbase_path, xrep_path, xsection_suffix, xfiber_suffix));
164  ensure(result.state_is_not_read_accessible());
165  ensure(result.schema(true).path(xauto_access) ==
166  schema_type::standard_member_path<sec_at0>(xbase_path, xrep_path, xfiber_suffix));
167 
168  ensure(result.factor_ct(true) == result.schema(true).fiber_space<fiber_type::host_type>().factor_ct(xauto_access));
169  ensure(result.d(true) == result.schema(true).fiber_space<fiber_type::host_type>().d(xauto_access));
170  ensure(result.d(true) == result.dd(true));
171  ensure(result.d(true) == 1);
172  ensure(result.scalar_space_path(true) == result.path(true));
173  ensure(result.p(true) == result.schema(true).fiber_space<fiber_type::host_type>().p(xauto_access));
174  ensure(result.p(true) == 0);
175  ensure(result.dd(true) == result.schema(true).fiber_space<fiber_type::host_type>().dd(xauto_access));
176  ensure(result.dd(true) == 1);
177  ensure(result.vector_space_path(true) == result.path(true));
178 
179  // Exit:
180 
181  // cout << "Leaving sec_at0::new_host." << endl;
182  return result;
183 }
184 
185 // PROTECTED MEMBER FUNCTIONS
186 
187 // PRIVATE MEMBER FUNCTIONS
188 
189 //==============================================================================
190 // AT0 FACET OF CLASS SEC_AT0
191 //==============================================================================
192 
193 // PUBLIC MEMBER FUNCTIONS
194 
197 {
198  // Preconditions:
199 
200  // Body:
201 
202  // Postconditions:
203 
204  ensure(invariant());
205 }
206 
208 sec_at0(const sec_rep_space* xhost, pod_index_type xhub_id)
209 {
210  // Preconditions:
211 
212  require(xhost != 0);
213  require(xhost->state_is_read_accessible());
214  require(xhost->contains_member(xhub_id));
215 
216  // Body:
217 
218  attach_to_state(xhost, xhub_id);
219 
220  // Postconditions:
221 
222  ensure(invariant());
223  ensure(host() == xhost);
224  ensure(index() == xhub_id);
225  ensure(is_attached());
226  ensure(!is_restricted());
227 }
228 
230 sec_at0(const sec_rep_space* xhost, const scoped_index& xid)
231 {
232  // Preconditions:
233 
234  require(xhost != 0);
235  require(xhost->state_is_read_accessible());
236  require(xhost->contains_member(xid));
237 
238  // Body:
239 
240  attach_to_state(xhost, xid.hub_pod());
241 
242  // Postconditions:
243 
244  ensure(invariant());
245  ensure(host() == xhost);
246  ensure(index() ==~ xid);
247  ensure(is_attached());
248  ensure(!is_restricted());
249 }
250 
252 sec_at0(const sec_rep_space* xhost, const std::string& xname)
253 {
254  // Preconditions:
255 
256  require(xhost != 0);
257  require(xhost->state_is_read_accessible());
258  require(!xname.empty());
259  require(xhost->contains_member(xname));
260 
261  // Body:
262 
263  attach_to_state(xhost, xname);
264 
265  // Postconditions:
266 
267  ensure(invariant());
268  ensure(host() == xhost);
269  ensure(name() == xname);
270  ensure(is_attached());
271  ensure(!is_restricted());
272 
273 }
274 
276 sec_at0(const namespace_poset* xnamespace,
277  const poset_path& xpath,
278  bool xauto_access)
279 {
280  // Preconditions:
281 
282  require(precondition_of(attach_to_state(same args)));
283 
284  // Body:
285 
286  attach_to_state(xnamespace, xpath, xauto_access);
287 
288  // Postconditions:
289 
290  ensure(postcondition_of(attach_to_state(same args)));
291 
292  // Exit:
293 
294  return;
295 }
296 
298 sec_at0(const sec_at0* xother)
299 {
300  // Preconditions:
301 
302  require(xother != 0);
303 
304  // Body:
305 
306  attach_to_state(xother);
307  restrict_to_same(xother);
308 
309  // Postconditions:
310 
311  ensure(invariant());
312  ensure(is_attached());
313  ensure(is_same_state(xother));
314  ensure(is_same_restriction(xother));
315 
316  // Exit:
317 }
318 
320 sec_at0(const sec_rep_space_member* xother, abstract_poset_member* xfiber_schema_jim)
321 {
322  // Preconditions:
323 
324  require(xother != 0);
325  require(xother->state_is_read_accessible());
326  require(xfiber_schema_jim != 0);
327  require(xfiber_schema_jim->le(&(xother->fiber_schema())));
328  require(xfiber_schema_jim->is_jim());
329 
330  // Body:
331 
332  attach_to_state(xother);
333  restrict_to(&(xother->base()), xfiber_schema_jim);
334 
335  // Postconditions:
336 
337  ensure(invariant());
338  ensure(is_attached());
339  ensure(is_same_state(xother));
340  ensure(fiber_schema().is_same_state(xfiber_schema_jim));
341 
342 }
343 
345 sec_at0(sec_rep_space* xhost, section_dof_map* xdof_map, bool xauto_access)
346 {
347 
348  // Preconditions:
349 
350  require(precondition_of(new_jim_state(xhost, xdof_map, false, xauto_access)));
351 
352  // Body:
353 
354  new_jim_state(xhost, xdof_map, false, xauto_access);
355 
356  // Postconditions:
357 
358  ensure(postcondition_of(new_jim_state(xhost, xdof_map, false, xauto_access)));
359 
360  // Exit:
361 
362  return;
363 }
364 
365 
368  const abstract_poset_member& xbase_mbr,
369  int xbase_version, bool xauto_access)
370 {
371 
372  // Preconditions:
373 
374  require(precondition_of(\
375  new_jim_state(xhost, xbase_mbr, xbase_version, xauto_access)));
376 
377  // Body:
378 
379  new_jim_state(xhost, xbase_mbr, xbase_version, xauto_access);
380 
381  // Postconditions:
382 
383  ensure(postcondition_of(\
384  new_jim_state(xhost, xbase_mbr, xbase_version, xauto_access)));
385 
386  // Exit:
387 
388  return;
389 }
390 
392 sec_at0(sec_rep_space* xhost, const subposet& xbase_parts, bool xauto_access)
393 {
394  // Preconditions:
395 
396  require(precondition_of(new_jim_state(xhost, xbase_parts, xauto_access)));
397 
398  // Body:
399 
400  new_jrm_state(xhost, xbase_parts, xauto_access);
401 
402  // Postconditions:
403 
404  require(postcondition_of(new_jim_state(xhost, xbase_parts, xauto_access)));
405 
406  // Exit:
407 
408  return;
409 }
410 
414 {
415  // Preconditions:
416 
417  require(is_ancestor_of(&xother));
418  require(precondition_of(attach_to_state(&xother)));
419 
420  // Body:
421 
422  attach_to_state(&xother);
423 
424  // Postconditions:
425 
426  ensure(postcondition_of(attach_to_state(&xother)));
427 
428  // Exit:
429 
430  return *this;
431 }
432 
435 operator=(const sec_at0& xother)
436 {
437  // Preconditions:
438 
439  require(precondition_of(attach_to_state(&xother)));
440 
441  // Body:
442 
443  attach_to_state(&xother);
444 
445  // Postconditions:
446 
447  ensure(postcondition_of(attach_to_state(&xother)));
448 
449  // Exit:
450 
451  return *this;
452 }
453 
456 operator=(const at0& xfiber)
457 {
458  // Preconditions:
459 
460  require(precondition_of(sec_vd::operator=(xfiber)));
461 
462  // Body:
463 
464  sec_vd::operator=(xfiber);
465 
466  // Postconditions:
467 
468  ensure(postcondition_of(sec_vd::operator=(xfiber)));
469 
470  // Exit:
471 
472  return *this;
473 }
474 
477 operator=(const at0_lite& xfiber)
478 {
479  // Preconditions:
480 
481  require(precondition_of(sec_vd::operator=(xfiber)));
482 
483  // Body:
484 
485  sec_vd::operator=(xfiber);
486 
487  // Postconditions:
488 
489  ensure(postcondition_of(sec_vd::operator=(xfiber)));
490 
491  // Exit:
492 
493  return *this;
494 }
495 
498 {
499  // Preconditions:
500 
501  // Body:
502 
503  // Postconditions:
504 }
505 
509 {
510  // Preconditions:
511 
512  // Body:
513 
514  static const fiber_type result;
515 
516  // Postconditions:
517 
518  // Exit:
519 
520  return result;
521 }
522 
523 // PROTECTED MEMBER FUNCTIONS
524 
525 // PRIVATE MEMBER FUNCTIONS
526 
527 
528 //==============================================================================
529 // ATP FACET OF CLASS SEC_AT0
530 //==============================================================================
531 
532 // PUBLIC MEMBER FUNCTIONS
533 
534 // PROTECTED MEMBER FUNCTIONS
535 
536 // PRIVATE MEMBER FUNCTIONS
537 
538 
539 //==============================================================================
540 // TP FACET OF CLASS SEC_AT0
541 //==============================================================================
542 
543 // PUBLIC MEMBER FUNCTIONS
544 
545 // PROTECTED MEMBER FUNCTIONS
546 
547 // PRIVATE MEMBER FUNCTIONS
548 
549 
550 //==============================================================================
551 // VD FACET OF CLASS SEC_AT0
552 //==============================================================================
553 
554 // PUBLIC MEMBER FUNCTIONS
555 
556 // PROTECTED MEMBER FUNCTIONS
557 
558 // PRIVATE MEMBER FUNCTIONS
559 
560 
561 //==============================================================================
562 // TUPLE FACET OF CLASS SEC_AT0
563 //==============================================================================
564 
565 // PUBLIC MEMBER FUNCTIONS
566 
567 // PROTECTED MEMBER FUNCTIONS
568 
569 // PRIVATE MEMBER FUNCTIONS
570 
571 
572 //==============================================================================
573 // ABSTRACT POSET MEMBER FACET OF CLASS SEC_AT0
574 //==============================================================================
575 
576 // PUBLIC MEMBER FUNCTIONS
577 
578 const std::string&
580 class_name() const
581 {
582  // Preconditions:
583 
584  // Body:
585 
586  const string& result = static_class_name();
587 
588  // Postconditions:
589 
590  ensure(!result.empty());
591 
592  // Exit:
593 
594  return result;
595 }
596 
597 const std::string&
600 {
601  // Preconditions:
602 
603  // Body:
604 
605  static const string result("sec_at0");
606 
607  // Postconditions:
608 
609  ensure(!result.empty());
610 
611  // Exit:
612 
613  return result;
614 }
615 
618 clone() const
619 {
620 
621  // Preconditions:
622 
623  // Body:
624 
625  // create new handle of the current class.
626 
627  sec_at0 *result = new sec_at0();
628 
629  // Postconditions:
630 
631  ensure(result != 0);
632  ensure(result->invariant());
633 
634  // Exit:
635 
636  return result;
637 
638 }
639 
640 // PROTECTED MEMBER FUNCTIONS
641 
642 // PRIVATE MEMBER FUNCTIONS
643 
644 
645 // ===========================================================
646 // POSET_COMPONENT FACET
647 // ===========================================================
648 
649 // PUBLIC MEMBER FUNCTIONS
650 
653 host() const
654 {
655  return reinterpret_cast<host_type*>(_host);
656 }
657 
658 bool
661 {
662  return dynamic_cast<const host_type*>(xother) != 0;
663 }
664 
665 // PROTECTED MEMBER FUNCTIONS
666 
667 // PRIVATE MEMBER FUNCTIONS
668 
669 
670 //==============================================================================
671 // ANY FACET OF CLASS SEC_AT0
672 //==============================================================================
673 
674 // PUBLIC MEMBER FUNCTIONS
675 
676 bool
678 fiber_is_ancestor_of(const any* xother) const
679 {
680  // Preconditions:
681 
682  require(xother != 0);
683 
684  // Body:
685 
686  // If other may be dynamically cast to the type of this fiber then this
687  // fiber is an ancestor of xother.
688 
689  bool result = dynamic_cast<const at0*>(xother) != 0;
690 
691  // Postconditions:
692 
693  ensure(invariant());
694  ensure(xother->invariant());
695 
696  // Exit:
697 
698  return result;
699 }
700 
701 bool
703 is_ancestor_of(const any* xother) const
704 {
705  // Preconditions:
706 
707  require(xother != 0);
708 
709  // Body:
710 
711  // If other may be dynamically cast to the type of this then this is an
712  // ancestor of other.
713 
714  bool result = dynamic_cast<const sec_at0*>(xother) != 0;
715 
716  // Postconditions:
717 
718  // ensure(invariant());
719 
720  // Exit:
721 
722  return result;
723 }
724 
725 bool
727 invariant() const
728 {
729  bool result = true;
730 
731  // Preconditions:
732 
733  // Body:
734 
736 
737  // // Must satisfy base class invariant
738 
739  // invariance(sec_atp::invariant());
740 
741  if (invariant_check())
742  {
743  // Prevent recursive calls to invariant
744 
745  disable_invariant_check();
746 
747 
748  // Finished, turn invariant checking back on.
749 
750  enable_invariant_check();
751  }
752 
753  // Postconditions:
754 
755  ensure(is_derived_query);
756 
757  // Exit:
758 
759  return result;
760 }
761 
762 void
765 {
766  // Preconditions:
767 
768  require(state_is_read_accessible());
769  require(xschema != 0);
770  require(schema().is_ancestor_of(xschema));
771  require(xschema->leqv(host()->schema().index()));
772 
773  // Body:
774 
775  // Restrict this...
776 
777  sec_rep_space_member::restrict_to(xschema);
778 
779  // Postconditions:
780 
781  ensure(schema().is_same_state(xschema));
782  ensure(unexecutable(base().is_same_state(old base())));
783  ensure(invariant());
784 
785  // Exit:
786 }
787 
788 void
790 restrict_to(pod_index_type xbase_id, pod_index_type xfiber_schema_id)
791 {
792  // Preconditions:
793 
794  require(state_is_read_accessible());
795 
801 
802  // Body:
803 
804  // Restrict this...
805 
806  sec_rep_space_member::restrict_to(xbase_id, xfiber_schema_id);
807 
808  // Postconditions:
809 
810  // ensure(base().is_same_state(xbase));
811  // ensure(fiber_schema().is_same_state(xfiber_schema));
812  // ensure(invariant());
813 
814  // Exit:
815 }
816 
817 void
819 restrict_to(const abstract_poset_member* xbase, const abstract_poset_member* xfiber_schema)
820 {
821  // Preconditions:
822 
823  require(state_is_read_accessible());
824  require(xbase != 0);
825  require(xbase->le(&(host()->base())));
826  require(xfiber_schema != 0);
827  require(xfiber_schema->le(&(host()->fiber_schema())));
828 
829  // Body:
830 
831  // Restrict this...
832 
833  sec_rep_space_member::restrict_to(xbase, xfiber_schema);
834 
835  // Postconditions:
836 
837  ensure(base().is_same_state(xbase));
838  ensure(fiber_schema().is_same_state(xfiber_schema));
839  ensure(invariant());
840 
841  // Exit:
842 }
843 
844 void
847 {
848  // Preconditions:
849 
850  require(state_is_read_accessible());
851  require(xother != 0);
852  require(xother->state_is_read_accessible());
853  require(is_ancestor_of(xother));
854  require(has_same_host(xother));
855 
856  // Body:
857 
858  // Restrict this...
859 
860  sec_rep_space_member::restrict_to_same(xother);
861 
862  // Postconditions:
863 
864  ensure(is_same_restriction(xother));
865  ensure(invariant());
866 
867  // Exit:
868 }
869 
870 void
873 {
874  // Preconditions:
875 
876  require(state_is_read_accessible());
877 
878  // Body:
879 
880  // Restrict this...
881 
882  sec_rep_space_member::unrestrict();
883 
884  // Postconditions:
885 
886  ensure(!is_restricted());
887  ensure(invariant());
888 
889  // Exit:
890 }
891 
892 // PROTECTED MEMBER FUNCTIONS
893 
894 // PRIVATE MEMBER FUNCTIONS
895 
896 
897 //==============================================================================
898 // NON-MEMBER FUNCTIONS
899 //==============================================================================
900 
901 
902 // Insert sec_at0& v into ostream &os
903 std::ostream&
904 fiber_bundle::operator<<(std::ostream& xos, const sec_at0& xv)
905 {
906  sec_at0::dof_type ldof;
907  int i = 0;
908 
909  xos << "sec_at0 " << xv. name() << " dofs:" << endl;
910 
912 
913  while(!itr.is_done())
914  {
915  xos << setw(10) << xv.dof_map().dof(itr.index()).to_string();
916  if (i%5 == 4)
917  xos << endl;
918  itr.next();
919  i++;
920  }
921 
923 
924  return xos;
925 }
926 
927 //==============================================================================
928 // "MATH" FUNCTIONS
929 //==============================================================================
930 
931 namespace
932 {
933  using namespace fiber_bundle;
934 
935  class acos_functor
936  {
937  public:
938  void operator()(const at0_lite& xl0, at0_lite& xlresult) const
939  {
940  xlresult = std::acos(xl0);
941  }
942  };
943 
944  class asin_functor
945  {
946  public:
947  void operator()(const at0_lite& xl0, at0_lite& xlresult) const
948  {
949  xlresult = std::asin(xl0);
950  }
951  };
952 
953  class atan_functor
954  {
955  public:
956  void operator()(const at0_lite& xl0, at0_lite& xlresult) const
957  {
958  xlresult = std::atan(xl0);
959  }
960  };
961 
962  class atan2_functor
963  {
964  public:
965  void operator()(const at0_lite& xl0, const at0_lite& xl1,
966  at0_lite& xlresult) const
967  {
968  xlresult = std::atan2(xl0, xl1);
969  }
970  };
971 
972  class ceil_functor
973  {
974  public:
975  void operator()(const at0_lite& xl0, at0_lite& xlresult) const
976  {
977  xlresult = std::ceil(xl0);
978  }
979  };
980 
981  class cos_functor
982  {
983  public:
984  void operator()(const at0_lite& xl0, at0_lite& xlresult) const
985  {
986  xlresult = std::cos(xl0);
987  }
988  };
989 
990  class cosh_functor
991  {
992  public:
993  void operator()(const at0_lite& xl0, at0_lite& xlresult) const
994  {
995  xlresult = std::cosh(xl0);
996  }
997  };
998 
999  class exp_functor
1000  {
1001  public:
1002  void operator()(const at0_lite& xl0, at0_lite& xlresult) const
1003  {
1004  xlresult = std::exp(xl0);
1005  }
1006  };
1007 
1008  class fabs_functor
1009  {
1010  public:
1011  void operator()(const at0_lite& xl0, at0_lite& xlresult) const
1012  {
1013  xlresult = std::fabs(xl0);
1014  }
1015  };
1016 
1017  class floor_functor
1018  {
1019  public:
1020  void operator()(const at0_lite& xl0, at0_lite& xlresult) const
1021  {
1022  xlresult = std::floor(xl0);
1023  }
1024  };
1025 
1026  class fmod_functor
1027  {
1028  public:
1029  void operator()(const at0_lite& xl0, const at0_lite& xl1,
1030  at0_lite& xlresult) const
1031  {
1032  xlresult = std::fmod(xl0, xl1);
1033  }
1034  };
1035 
1036  class frexp_functor
1037  {
1038  public:
1039  void operator()(const at0_lite& xl0, at0_lite& xlsignificand,
1040  at0_lite& xlexp) const
1041  {
1042  // Need to pass a pointer to an integer to frexp.
1043 
1044  int lexp;
1045  xlsignificand = std::frexp(xl0, &lexp);
1046  xlexp = lexp;
1047  }
1048  };
1049 
1050  class ldexp_functor
1051  {
1052  public:
1053  void operator()(const at0_lite& xl0, const vd_value_type& xlexp,
1054  at0_lite& xlresult) const
1055  {
1056  const int lexp = static_cast<const int>(xlexp);
1057  xlresult = std::ldexp(xl0, lexp);
1058  }
1059  };
1060 
1061  class log_functor
1062  {
1063  public:
1064  void operator()(const at0_lite& xl0, at0_lite& xlresult) const
1065  {
1066  xlresult = std::log(xl0);
1067  }
1068  };
1069 
1070  class log10_functor
1071  {
1072  public:
1073  void operator()(const at0_lite& xl0, at0_lite& xlresult) const
1074  {
1075  xlresult = std::log10(xl0);
1076  }
1077  };
1078 
1079  class modf_functor
1080  {
1081  public:
1082  void operator()(const at0_lite& xl0, at0_lite& xlintpart,
1083  at0_lite& xlfractpart) const
1084  {
1085  xlfractpart = std::modf(xl0, &xlintpart[0]);
1086  }
1087  };
1088 
1089  class pow_functor
1090  {
1091  public:
1092  void operator()(const at0_lite& xl0, const vd_value_type& xlexp,
1093  at0_lite& xlresult) const
1094  {
1095  xlresult = std::pow(xl0, xlexp);
1096  }
1097  };
1098 
1099  class sin_functor
1100  {
1101  public:
1102  void operator()(const at0_lite& xl0, at0_lite& xlresult) const
1103  {
1104  xlresult = std::sin(xl0);
1105  }
1106  };
1107 
1108  class sinh_functor
1109  {
1110  public:
1111  void operator()(const at0_lite& xl0, at0_lite& xlresult) const
1112  {
1113  xlresult = std::sinh(xl0);
1114  }
1115  };
1116 
1117  class sqrt_functor
1118  {
1119  public:
1120  void operator()(const at0_lite& xl0, at0_lite& xlresult) const
1121  {
1122  xlresult = std::sqrt(xl0);
1123  }
1124  };
1125 
1126  class tan_functor
1127  {
1128  public:
1129  void operator()(const at0_lite& xl0, at0_lite& xlresult) const
1130  {
1131  xlresult = std::tan(xl0);
1132  }
1133  };
1134 
1135  class tanh_functor
1136  {
1137  public:
1138  void operator()(const at0_lite& xl0, at0_lite& xlresult) const
1139  {
1140  xlresult = std::tanh(xl0);
1141  }
1142  };
1143 
1144 } //end unnamed namespace
1145 
1146 //==============================================================================
1147 
1148 #include "SheafSystem/sec_vd.impl.h"
1149 
1150 using namespace fiber_bundle::sec_vd_algebra;
1151 
1152 void
1154 acos(const sec_at0& x0, sec_at0& xresult, bool xauto_access)
1155 {
1156  // Preconditions:
1157 
1158  require(x0.state_is_auto_read_accessible(xauto_access));
1159  require(xresult.state_is_auto_read_write_accessible(xauto_access));
1160 
1161  //$$TODO: WEM Fix
1162  //require(*max(x0, xauto_access) <= 1);
1163  //require(*min(x0, xauto_access) >= -1);
1164 
1167 
1168  // Body:
1169 
1170  unary_op(x0, xresult, acos_functor(), xauto_access);
1171 
1172  // Postconditions:
1173 
1174  // Exit:
1175 
1176  return;
1177 }
1178 
1179 void
1181 asin(const sec_at0& x0, sec_at0& xresult, bool xauto_access)
1182 {
1183  // Preconditions:
1184 
1185  require(x0.state_is_auto_read_accessible(xauto_access));
1186  require(xresult.state_is_auto_read_write_accessible(xauto_access));
1187 
1188  //$$TODO: WEM Fix
1189  //require(*max(x0, xauto_access) <= 1);
1190  //require(*min(x0, xauto_access) >= -1);
1191 
1194 
1195  // Body:
1196 
1197  unary_op(x0, xresult, asin_functor(), xauto_access);
1198 
1199  // Postconditions:
1200 
1201  // Exit:
1202 
1203  return;
1204 }
1205 
1206 void
1208 atan(const sec_at0& x0, sec_at0& xresult, bool xauto_access)
1209 {
1210  // Preconditions:
1211 
1212  require(x0.state_is_auto_read_accessible(xauto_access));
1213  require(xresult.state_is_auto_read_write_accessible(xauto_access));
1214 
1215  // Body:
1216 
1217  unary_op(x0, xresult, atan_functor(), xauto_access);
1218 
1219  // Postconditions:
1220 
1221  // Exit:
1222 
1223  return;
1224 }
1225 
1226 void
1228 atan2(const sec_at0& x0, const sec_at0& x1, sec_at0& xresult,
1229  bool xauto_access)
1230 {
1231  // Preconditions:
1232 
1233  require(x0.state_is_auto_read_accessible(xauto_access));
1234  require(x1.state_is_auto_read_accessible(xauto_access));
1235  require(xresult.state_is_auto_read_write_accessible(xauto_access));
1236 
1237  // Body:
1238 
1239  binary_op(x0, x1, xresult, atan2_functor(), xauto_access);
1240 
1241  // Postconditions:
1242 
1243  // Exit:
1244 
1245  return;
1246 }
1247 
1248 void
1250 ceil(const sec_at0& x0, sec_at0& xresult, bool xauto_access)
1251 {
1252  // Preconditions:
1253 
1254  require(x0.state_is_auto_read_accessible(xauto_access));
1255  require(xresult.state_is_auto_read_write_accessible(xauto_access));
1256 
1257  // Body:
1258 
1259  unary_op(x0, xresult, ceil_functor(), xauto_access);
1260 
1261  // Postconditions:
1262 
1263  // Exit:
1264 
1265  return;
1266 }
1267 
1268 void
1270 cos(const sec_at0& x0, sec_at0& xresult, bool xauto_access)
1271 {
1272  // Preconditions:
1273 
1274  require(x0.state_is_auto_read_accessible(xauto_access));
1275  require(xresult.state_is_auto_read_write_accessible(xauto_access));
1276 
1277  // Body:
1278 
1279  unary_op(x0, xresult, cos_functor(), xauto_access);
1280 
1281  // Postconditions:
1282 
1283  // Exit:
1284 
1285  return;
1286 }
1287 
1288 void
1290 cosh(const sec_at0& x0, sec_at0& xresult, bool xauto_access)
1291 {
1292  // Preconditions:
1293 
1294  require(x0.state_is_auto_read_accessible(xauto_access));
1295  require(xresult.state_is_auto_read_write_accessible(xauto_access));
1296 
1297  // Body:
1298 
1299  unary_op(x0, xresult, cosh_functor(), xauto_access);
1300 
1301  // Postconditions:
1302 
1303  // Exit:
1304 
1305  return;
1306 }
1307 
1308 void
1310 exp(const sec_at0& x0, sec_at0& xresult, bool xauto_access)
1311 {
1312  // Preconditions:
1313 
1314  require(x0.state_is_auto_read_accessible(xauto_access));
1315  require(xresult.state_is_auto_read_write_accessible(xauto_access));
1316 
1317  // Body:
1318 
1319  unary_op(x0, xresult, exp_functor(), xauto_access);
1320 
1321  // Postconditions:
1322 
1323  // Exit:
1324 
1325  return;
1326 }
1327 
1328 
1329 void
1331 fabs(const sec_at0& x0, sec_at0& xresult, bool xauto_access)
1332 {
1333  // Preconditions:
1334 
1335  require(x0.state_is_auto_read_accessible(xauto_access));
1336  require(xresult.state_is_auto_read_write_accessible(xauto_access));
1337 
1338  // Body:
1339 
1340  unary_op(x0, xresult, fabs_functor(), xauto_access);
1341 
1342  // Postconditions:
1343 
1344  // Exit:
1345 
1346  return;
1347 }
1348 
1349 void
1351 floor(const sec_at0& x0, sec_at0& xresult, bool xauto_access)
1352 {
1353  // Preconditions:
1354 
1355  require(x0.state_is_auto_read_accessible(xauto_access));
1356  require(xresult.state_is_auto_read_write_accessible(xauto_access));
1357 
1358  // Body:
1359 
1360  unary_op(x0, xresult, floor_functor(), xauto_access);
1361 
1362  // Postconditions:
1363 
1364  // Exit:
1365 
1366  return;
1367 }
1368 
1369 void
1371 fmod(const sec_at0& x0, const sec_at0& x1, sec_at0& xresult, bool xauto_access)
1372 {
1373  // Preconditions:
1374 
1375  require(x0.state_is_auto_read_accessible(xauto_access));
1376  require(x1.state_is_auto_read_accessible(xauto_access));
1377  require(xresult.state_is_auto_read_write_accessible(xauto_access));
1378 
1379  // Body:
1380 
1381  binary_op(x0, x1, xresult, fmod_functor(), xauto_access);
1382 
1383  // Postconditions:
1384 
1385  // Exit:
1386 
1387  return;
1388 }
1389 
1390 void
1392 frexp(const sec_at0& x0, sec_at0& xsignificand, sec_at0& xexp,
1393  bool xauto_access)
1394 {
1395  // Preconditions:
1396 
1397  require(x0.state_is_auto_read_accessible(xauto_access));
1398  require(xsignificand.state_is_auto_read_write_accessible(xauto_access));
1399 
1400  // Body:
1401 
1402  unary_op(x0, xsignificand, xexp, frexp_functor(), xauto_access);
1403 
1404  // Postconditions:
1405 
1406  // Exit:
1407 
1408  return;
1409 }
1410 
1411 void
1413 ldexp(const sec_at0& x0, int xexp, sec_at0& xresult, bool xauto_access)
1414 {
1415  // Preconditions:
1416 
1417  require(x0.state_is_auto_read_accessible(xauto_access));
1418  require(xresult.state_is_auto_read_write_accessible(xauto_access));
1419 
1420  // Body:
1421 
1422  binary_op(x0, static_cast<vd_value_type>(xexp), xresult, ldexp_functor(),
1423  xauto_access);
1424 
1425  // Postconditions:
1426 
1427  // Exit:
1428 
1429  return;
1430 }
1431 
1432 void
1434 log(const sec_at0& x0, sec_at0& xresult, bool xauto_access)
1435 {
1436  // Preconditions:
1437 
1438  require(x0.state_is_auto_read_accessible(xauto_access));
1439  require(xresult.state_is_auto_read_write_accessible(xauto_access));
1440 
1441  // Body:
1442 
1443  unary_op(x0, xresult, log_functor(), xauto_access);
1444 
1445  // Postconditions:
1446 
1447  // Exit:
1448 
1449  return;
1450 }
1451 
1452 void
1454 log10(const sec_at0& x0, sec_at0& xresult, bool xauto_access)
1455 {
1456  // Preconditions:
1457 
1458  require(x0.state_is_auto_read_accessible(xauto_access));
1459  require(xresult.state_is_auto_read_write_accessible(xauto_access));
1460 
1461  // Body:
1462 
1463  unary_op(x0, xresult, log10_functor(), xauto_access);
1464 
1465  // Postconditions:
1466 
1467  // Exit:
1468 
1469  return;
1470 }
1471 
1472 void
1474 modf(const sec_at0& x0, sec_at0& xintpart, sec_at0& xfractpart,
1475  bool xauto_access)
1476 {
1477  // Preconditions:
1478 
1479  require(x0.state_is_auto_read_accessible(xauto_access));
1480  require(xintpart.state_is_auto_read_write_accessible(xauto_access));
1481 
1482  // Body:
1483 
1484  unary_op(x0, xintpart, xfractpart, modf_functor(), xauto_access);
1485 
1486  // Postconditions:
1487 
1488  // Exit:
1489 
1490  return;
1491 }
1492 
1493 void
1495 pow(const sec_at0& x0, const vd_value_type& xexponent, sec_at0& xresult,
1496  bool xauto_access)
1497 {
1498  // Preconditions:
1499 
1500  require(x0.state_is_auto_read_accessible(xauto_access));
1501  require(xresult.state_is_auto_read_write_accessible(xauto_access));
1502 
1503  // Body:
1504 
1505  binary_op(x0, xexponent, xresult, pow_functor(), xauto_access);
1506 
1507  // Postconditions:
1508 
1509  // Exit:
1510 
1511  return;
1512 }
1513 
1514 void
1516 sin(const sec_at0& x0, sec_at0& xresult, bool xauto_access)
1517 {
1518  // Preconditions:
1519 
1520  require(x0.state_is_auto_read_accessible(xauto_access));
1521  require(xresult.state_is_auto_read_write_accessible(xauto_access));
1522 
1523  // Body:
1524 
1525  unary_op(x0, xresult, sin_functor(), xauto_access);
1526 
1527  // Postconditions:
1528 
1529  // Exit:
1530 
1531  return;
1532 }
1533 
1534 void
1536 sinh(const sec_at0& x0, sec_at0& xresult, bool xauto_access)
1537 {
1538  // Preconditions:
1539 
1540  require(x0.state_is_auto_read_accessible(xauto_access));
1541  require(xresult.state_is_auto_read_write_accessible(xauto_access));
1542 
1543  // Body:
1544 
1545  unary_op(x0, xresult, sinh_functor(), xauto_access);
1546 
1547  // Postconditions:
1548 
1549  // Exit:
1550 
1551  return;
1552 }
1553 
1554 void
1556 sqrt(const sec_at0& x0, sec_at0& xresult, bool xauto_access)
1557 {
1558  // Preconditions:
1559 
1560  require(x0.state_is_auto_read_accessible(xauto_access));
1561  require(xresult.state_is_auto_read_write_accessible(xauto_access));
1562 
1563  // Body:
1564 
1565  unary_op(x0, xresult, sqrt_functor(), xauto_access);
1566 
1567  // Postconditions:
1568 
1569  // Exit:
1570 
1571  return;
1572 }
1573 
1574 void
1576 tan(const sec_at0& x0, sec_at0& xresult, bool xauto_access)
1577 {
1578  // Preconditions:
1579 
1580  require(x0.state_is_auto_read_accessible(xauto_access));
1581  require(xresult.state_is_auto_read_write_accessible(xauto_access));
1582 
1583  // Body:
1584 
1585  unary_op(x0, xresult, tan_functor(), xauto_access);
1586 
1587  // Postconditions:
1588 
1589  // Exit:
1590 
1591  return;
1592 }
1593 
1594 void
1596 tanh(const sec_at0& x0, sec_at0& xresult, bool xauto_access)
1597 {
1598  // Preconditions:
1599 
1600  require(x0.state_is_auto_read_accessible(xauto_access));
1601  require(xresult.state_is_auto_read_write_accessible(xauto_access));
1602 
1603  // Body:
1604 
1605  unary_op(x0, xresult, tanh_functor(), xauto_access);
1606 
1607  // Postconditions:
1608 
1609  // Exit:
1610 
1611  return;
1612 }
1613 
1614 
virtual sec_at0 * clone() const
Make a new handle, no state instance of current.
Definition: sec_at0.cc:618
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.
SHEAF_DLL_SPEC void sqrt(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute sqrt of x0 (sqrt(x0)) (pre-allocated version).
Definition: sec_at0.cc:1556
SHEAF_DLL_SPEC void asin(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute asin of x0 (asin(x0)) (pre-allocated version).
Definition: sec_at0.cc:1181
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 ...
virtual const std::string & class_name() const
The name of this class.
Definition: sec_at0.cc:580
virtual bool is_jim(bool xin_current_version=true) const
True if this member is join irreducible in the current version of the host (xin_current_version == tr...
schema_poset_member & fiber_schema()
The schema of the restricted fiber of this section space member (mutable version) ...
A client handle for a subposet.
Definition: subposet.h:86
SHEAF_DLL_SPEC void frexp(const sec_at0 &x0, sec_at0 &xsignificand, sec_at0 &xexp, bool xauto_access)
Compute frexp of x0 (frexp(x0)) (pre-allocated version).
Definition: sec_at0.cc:1392
bool full() const
True if both poset name and member name are not empty.
Definition: poset_path.cc:311
virtual void restrict_to_same(const abstract_poset_member *xother)
Restricts this handle and its components to the same restriction as xother.
Definition: sec_at0.cc:846
const index_space_handle & row_dof_id_space() const
The row dof id space for the schema defined by this.
The abstract map from section dof ids to section dof values of heterogeneous type.
An abstract iterator over the ids of an id space.
virtual bool host_is_ancestor_of(const poset_state_handle *other) const
True if other conforms to host.
Definition: sec_at0.cc:660
SHEAF_DLL_SPEC void ldexp(const sec_at0 &x0, int xexp, sec_at0 &xresult, bool xauto_access)
Compute ldexp of x0 (ldexp(x0)) (pre-allocated version).
Definition: sec_at0.cc:1413
void unrestrict()
Removes any restriction to this handle and its components; restores base and fiber to the base and fi...
Definition: sec_at0.cc:872
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...
~sec_at0()
Destructor.
Definition: sec_at0.cc:497
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.
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 client handle for a general, abstract partially order set.
A path defined by a poset name and a member name separated by a forward slash (&#39;/&#39;). For example: "cell_definitions/triangle".
Definition: poset_path.h:48
A member of a sec_rep_space; a section.
poset_path vector_space_path() const
The path of the underlying vector space.
abstract_poset_member & base()
The restricted base of this section space member (mutable version)
STL namespace.
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.
SHEAF_DLL_SPEC void log10(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute log10 of x0 (log10(x0)) (pre-allocated version).
Definition: sec_at0.cc:1454
SHEAF_DLL_SPEC void ceil(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute ceil of x0 (ceil(x0)) (pre-allocated version).
Definition: sec_at0.cc:1250
virtual void next()=0
Makes id() the next id in the iteration.
static const std::string & static_class_name()
The name of this class.
Definition: sec_at0.cc:599
The poset for sec_rep_descriptors.
sec_at0()
Default constructor.
Definition: sec_at0.cc:196
Abstract base class with useful features for all objects.
Definition: any.h:39
int p() const
The tensor degree of this space.
A space of scalars viewed as an antisymmetric tensor section space of degree 0.
Definition: sec_at0_space.h:48
The lattice of closed cells of a cellular space; a lattice representation of a computational mesh...
virtual section_space_schema_member & schema()
The schema for this poset (mutable version)
bool is_done() const
True if iteration is finished.
SHEAF_DLL_SPEC void atan(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute atan of x0 (atan(x0)) (pre-allocated version).
Definition: sec_at0.cc:1208
A space of scalars viewed as an antisymmetric tensor space of degree 0.
Definition: at0_space.h:42
host_type * host() const
The poset this is a member of.
Definition: sec_at0.cc:653
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 leqv(pod_index_type xother_index) const
True if this is less than or equivalent to the member with index xother_index.
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.
static host_type & new_host(namespace_type &xns, const poset_path &xhost_path, const poset_path &xschema_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_at0.cc:53
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
A scalar viewed as an antisymmetric tensor of degree 0. As the degree is 0 there is nothing to be sym...
Definition: at0.h:424
bool contains_path(const poset_path &xpath, bool xauto_access=true) const
True if this contains the poset or poset member specified by xpath.
SHEAF_DLL_SPEC void atan2(const sec_at0 &x0, const sec_at0 &x1, sec_at0 &xresult, bool xauto_access)
Compute atan2 of x0/x1 (atan2(x0, x1)) (pre-allocated version).
Definition: sec_at0.cc:1228
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. ...
bool le(pod_index_type xother_index) const
True if this is less than or equal to the member with index xother_index.
int dd() const
The dimension of the underlying ("domain") vector space.
SHEAF_DLL_SPEC void fabs(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute fabs of x0 (fabs(x0)) (pre-allocated version).
Definition: sec_at0.cc:1331
SHEAF_DLL_SPEC void cosh(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute cosh of x0 (cosh(x0)) (pre-allocated version).
Definition: sec_at0.cc:1290
bool empty() const
True if both poset name and member name are empty.
Definition: poset_path.cc:291
bool is_ancestor_of(const any *xother) const
True if xother conforms to current.
Definition: sec_at0.cc:703
SHEAF_DLL_SPEC void modf(const sec_at0 &x0, sec_at0 &xintpart, sec_at0 &xfractpart, bool xauto_access)
Compute modf of x0 (modf(x0)) (pre-allocated version).
Definition: sec_at0.cc:1474
SHEAF_DLL_SPEC void sinh(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute sinh of x0 (sinh(x0)) (pre-allocated version).
Definition: sec_at0.cc:1536
virtual pod_type index() const =0
Index of this space.
SHEAF_DLL_SPEC void log(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute log of x0 (log(x0)) (pre-allocated version).
Definition: sec_at0.cc:1434
virtual index_space_iterator & get_iterator() const =0
Allocates an id space iterator from the iterator pool.
SHEAF_DLL_SPEC void fmod(const sec_at0 &x0, const sec_at0 &x1, sec_at0 &xresult, bool xauto_access)
Compute xsignificand = fmod(x0, xexp) (pre-allocated version).
Definition: sec_at0.cc:1371
SHEAF_DLL_SPEC void tanh(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute tanh of x0 (tanh(x0)) (pre-allocated version).
Definition: sec_at0.cc:1596
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_at0.cc:101
SHEAF_DLL_SPEC void cos(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute cos of x0 (cos(x0)) (pre-allocated version).
Definition: sec_at0.cc:1270
SHEAF_DLL_SPEC void tan(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute tan of x0 (tan(x0)) (pre-allocated version).
Definition: sec_at0.cc:1576
SHEAF_DLL_SPEC void floor(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute floor of x0 (floor(x0)) (pre-allocated version).
Definition: sec_at0.cc:1351
virtual section_space_schema_member & schema()
The restricted schema for this (mutable version).
SHEAF_DLL_SPEC void acos(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute acos of x0 (acos(x0)) (pre-allocated version).
Definition: sec_at0.cc:1154
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
virtual const fiber_type & fiber_prototype() const
Virtual constructor for the associated fiber type.
Definition: sec_at0.cc:508
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
Namespace containing the algrebra functions for a a section of a fiber bundle with a d-dimensional ve...
Definition: sec_vd.h:691
virtual void restrict_to(const abstract_poset_member *xschema)
Restricts this section and its components to schema member xschema.
Definition: sec_at0.cc:764
virtual sec_at0 & operator=(const abstract_poset_member &xother)
Assignment operator; synonym for attach_to_state(&xother).
Definition: sec_at0.cc:413
bool fiber_is_ancestor_of(const any *xother) const
True if xother conforms to an instance of the fiber of current.
Definition: sec_at0.cc:678
An abstract client handle for a member of a poset.
SHEAF_DLL_SPEC void exp(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute exp of x0 (exp(x0)) (pre-allocated version).
Definition: sec_at0.cc:1310
bool invariant() const
Class invariant.
Definition: sec_at0.cc:727
Namespace for the fiber_bundles component of the sheaf system.
SHEAF_DLL_SPEC void pow(const sec_at0 &x0, const vd_value_type &xexponent, sec_at0 &xresult, bool xauto_access)
Compute x0 to power xexponent (pow(x0, xexponent)) (pre-allocated version).
Definition: sec_at0.cc:1495
SHEAF_DLL_SPEC void sin(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute sin of x0 (sin(x0)) (pre-allocated version).
Definition: sec_at0.cc:1516
Antisymetric tensor of degree 0. As the degree is 0 there is nothing to be symmetric or antisymmetric...
Definition: sec_at0.h:51
virtual int d(int xp, int xdd) const
Dimension d() as a function of degree xp and domain dimension xdd.
bool state_is_not_read_accessible() const
True if this is attached and if the state is accessible for read or if access control is disabled...
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)
double vd_value_type
The type of component in the fiber; the scalar type in the fiber vector space.
Definition: fiber_bundle.h:63
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