SheafSystem  0.0.0.0
t3_e3.h
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 
22 #ifndef T3_E3_H
23 #define T3_E3_H
24 
25 #ifndef SHEAF_DLL_SPEC_H
26 #include "SheafSystem/sheaf_dll_spec.h"
27 #endif
28 
29 #ifndef T3_H
30 #include "SheafSystem/t3.h"
31 #endif
32 
33 #ifndef E3_H
34 #include "SheafSystem/e3.h"
35 #endif
36 
37 namespace fiber_bundle
38 {
39 
40 //==============================================================================
41 // CLASS T3_E3_ROW_DOFS_TYPE
42 //==============================================================================
43 
47 template <typename T>
49 {
50 public:
51 
55  typedef T dof_type;
56 
61 
65  static const std::string& static_class_name();
66 
70  static int d();
71 
76  T& operator[] (int xindex);
77 
82  const T& operator[] (int xindex) const;
83 
88 
93  t3_e3_row_dofs_type<T>* clone(bool xnew_state, bool xauto_access) const
94  {
95  return clone();
96  }
97 
132  T components[27];
133 
134 protected:
135 private:
136 
137 };
138 
139 //==============================================================================
140 // CLASS T3_E3_LITE
141 //==============================================================================
142 
143 class at3_e3_lite;
144 class e3_lite;
145 class st3_e3_lite;
146 
151 class SHEAF_DLL_SPEC t3_e3_lite : public t3_lite
152 {
153 
154  //============================================================================
156  //============================================================================
158 
159 public:
160 
161  // Typedefs:
162 
167 
171  t3_e3_lite();
172 
176  t3_e3_lite(const t3_e3_lite& xother);
177 
181  t3_e3_lite& operator=(const t3_e3_lite& xother);
182 
186  virtual ~t3_e3_lite();
187 
191  t3_e3_lite(const at3_e3_lite& xother);
192 
196  t3_e3_lite& operator=(const at3_e3_lite& xother);
197 
201  t3_e3_lite(const st3_e3_lite& xother);
202 
206  t3_e3_lite& operator=(const st3_e3_lite& xother);
207 
211  t3_e3_lite(const row_dofs_type& xrow_dofs);
212 
216  t3_e3_lite& operator=(const row_dofs_type& xrow_dofs);
217 
222  operator row_dofs_type& ();
223 
228  operator const row_dofs_type& () const;
229 
230 protected:
231 
235  row_dofs_type _row_dofs;
236 
237 private:
238 
240 
241 
242  //============================================================================
244  //============================================================================
246 
247 public:
248 protected:
249 private:
250 
252 
253 
254  //============================================================================
256  //============================================================================
258 
259 public:
260 
265 
269  virtual int dd() const;
270 
271 protected:
272 private:
273 
275 
276 
277  //============================================================================
279  //============================================================================
281 
282 public:
283 
288  virtual const tp_lite& tp_prototype(int xp) const;
289 
294  virtual const atp_lite& atp_prototype(int xp) const;
295 
300  virtual const stp_lite& stp_prototype(int xp) const;
301 
302 protected:
303 private:
304 
306 
307 
308  //============================================================================
310  //============================================================================
312 
313 public:
314 protected:
315 private:
316 
318 
319 
320  //============================================================================
322  //============================================================================
324 
325 public:
326 
330  virtual const std::string& class_name() const;
331 
335  static const std::string& static_class_name();
336 
340  virtual t3_e3_lite* clone() const;
341 
346  virtual t3_e3_lite* clone(bool xnew_state, bool xauto_access) const
347  {
348  return clone();
349  }
350 
351 protected:
352 private:
353 
355 
356 
357  //============================================================================
359  //============================================================================
361 
362 public:
363 
367  virtual bool is_ancestor_of(const any_lite& xother) const;
368 
372  bool invariant() const;
373 
377  virtual void* row_dofs();
378 
382  virtual const void* row_dofs() const;
383 
384 protected:
385 private:
386 
388 };
389 
390 
391 //==============================================================================
392 // CLASS T3_E3
393 //==============================================================================
394 
395 class tp_space;
396 
401 class SHEAF_DLL_SPEC t3_e3 : public t3
402 {
403 
404  // ===========================================================
406  // ===========================================================
408 
409 public:
410 
414  static const poset_path& standard_schema_path();
415 
419  static void make_standard_schema(namespace_poset& xns);
420 
426  static host_type& new_host(namespace_type& xns,
427  const poset_path& xhost_path,
428  const poset_path& xschema_path,
429  const poset_path& xvector_space_path,
430  bool xauto_access);
431 
438  static host_type& standard_host(namespace_type& xns, const std::string& xsuffix, bool xauto_access);
439 
440 protected:
441 
442 private:
443 
445 
446 
447  //============================================================================
449  //============================================================================
451 
452 public:
453 
454  // Typedefs:
455 
460 
465 
470 
474  t3_e3();
475 
479  t3_e3(const t3_e3& xother);
480 
484  virtual t3_e3& operator=(const abstract_poset_member& xother);
485 
489  t3_e3& operator=(const t3_e3& xother);
490 
494  virtual ~t3_e3();
495 
499  virtual const volatile_type& lite_prototype() const;
500 
504  virtual volatile_type* lite_type() const;
505 
509  t3_e3(poset* xhost, bool xauto_access = true);
510 
513 
517  t3_e3(poset_state_handle& xhost,
518  const row_dofs_type& xrdt,
519  bool xauto_access = true);
520 
524  t3_e3& operator=(const row_dofs_type& xrdt);
525 
530  t3_e3(const poset* xhost, pod_index_type xhub_id);
531 
536  t3_e3(const poset* xhost, const scoped_index& xid);
537 
542  t3_e3(const poset* xhost, const std::string& xname);
543 
548  operator row_dofs_type& ();
549 
554  operator const row_dofs_type& () const;
555 
556  //============================================================================
558  //============================================================================
560 
561 public:
562 protected:
563 private:
564 
566 
567 
568  //============================================================================
570  //============================================================================
571 
573 
574 public:
575 protected:
576 private:
577 
579 
580 
581  //============================================================================
583  //============================================================================
585 
586 public:
587 protected:
588 private:
589 
591 
592 
593  //============================================================================
595  //============================================================================
597 
598 public:
599 protected:
600 private:
601 
603 
604 
605 
606  //============================================================================
608  //============================================================================
610 
611 public:
612 protected:
613 private:
614 
616 
617 
618  //============================================================================
620  //============================================================================
622 
623 public:
624 
629  virtual tp* new_tp(int xp, bool xauto_access) const;
630 
635  virtual atp* new_atp(int xp, bool xauto_access) const;
636 
641  virtual stp* new_stp(int xp, bool xauto_access) const;
642 
643 protected:
644 private:
645 
647 
648 
649  //============================================================================
651  //============================================================================
653 
654 public:
655 
659  virtual const std::string& class_name() const;
660 
664  static const std::string& static_class_name();
665 
669  virtual t3_e3* clone() const;
670 
676  inline t3_e3* clone(bool xnew_state, bool xauto_access = true) const
677  {
678  return static_cast<t3_e3*>(t3::clone(xnew_state, xauto_access));
679  }
680 
681 protected:
682 private:
683 
685 
686 
687  //============================================================================
689  //============================================================================
691 
692 public:
693 
697  virtual bool invariant() const;
698 
702  virtual bool is_ancestor_of(const any* other) const;
703 
704 protected:
705 private:
706 
708 };
709 
710 //==============================================================================
711 // NON-MEMBER FUNCTIONS
712 //==============================================================================
713 
717 template <typename T>
718 std::ostream& operator<<(std::ostream& xos, const t3_e3_row_dofs_type<T>& xrdt);
719 
720 
721 class at3_e3;
722 class at3_e3_lite;
723 class st3_e3;
724 class st3_e3_lite;
725 
726 namespace tp_algebra
727 {
728 
733 SHEAF_DLL_SPEC void alt(const t3_e3_lite& x0, at3_e3_lite& xresult);
734 
739 SHEAF_DLL_SPEC void alt(const t3_e3& x0, at3_e3& xresult, bool xauto_access);
740 
745 SHEAF_DLL_SPEC void sym(const t3_e3_lite& x0, st3_e3_lite& xresult);
746 
751 SHEAF_DLL_SPEC void sym(const t3_e3& x0, st3_e3& xresult, bool xauto_access);
752 
753 } // namespace tp_algebra
754 
755 } // namespace fiber_bundle
756 
757 
758 #endif // ifndef T3_E3_H
A tensor of degree 3 over an abstract vector space (volatile version).
Definition: t3.h:43
void alt(const GT &x0, AT &xresult, bool xauto_access)
Definition: sec_tp.impl.h:140
A symmetric tensor of degree p over an abstract vector space.
Definition: stp.h:190
void sym(const GT &x0, ST &xresult, bool xauto_access)
Definition: sec_tp.impl.h:184
Row dofs type for class t3_e3.
Definition: t3_e3.h:48
An antisymmetric tensor of degree p.
Definition: atp.h:190
Euclidean vector space of dimension 3 (volatile version).
Definition: e3.h:116
An antisymmetric rank 3 tensor over a Euclidean vector space of dimension 3. (volatile version)...
Definition: at3_e3.h:120
The default name space; a poset which contains other posets as members.
The standard fiber bundles name space; extends the standard sheaves namespace by defining base space...
A tensor of degree 3 over an abstract vector space (persistent version).
Definition: t3.h:222
T dof_type
The type of the dofs.
Definition: t3_e3.h:55
static const std::string & static_class_name()
The name of this class.
Definition: t3_e3.impl.h:42
A client handle for a general, abstract partially order set.
A symmetric rank 3 tensor over a 3D Euclidean vector space (persistent version).
Definition: st3_e3.h:370
t3_e3_lite volatile_type
The associated volatile type.
Definition: t3_e3.h:464
t3_e3 * clone(bool xnew_state, bool xauto_access=true) const
Make a new handle instance of current. Attach the new instance to a new state if xnew_state is true...
Definition: t3_e3.h:676
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
row_dofs_type _row_dofs
Row_dofs_type.
Definition: t3_e3.h:235
t3_e3_row_dofs_type< T > * clone(bool xnew_state, bool xauto_access) const
Virtual constructor, makes a new instance of the same type as this; synonym for clone(), intended for use only in certain templates.
Definition: t3_e3.h:93
T & operator[](int xindex)
Value of xindex-th component (row dof) (non const version).
Definition: t3_e3.impl.h:82
Euclidean vector space of dimension 3 (persistent version).
Definition: e3.h:467
T::row_dofs_type & row_dofs(T &x0)
The row dofs pod type for x0 (mutable version).
An antisymmetric tensor of degree p over an abstract vector space (volatile version).
Definition: atp.h:44
A general tensor of "degree" p and given "variance" over an abstract vector space.
Definition: tp.h:253
Abstract base class with useful features for all volatile objects.
Definition: any_lite.h:48
An antisymmetric rank 3 tensor over a 3D Euclidean vector space.
Definition: at3_e3.h:372
Abstract base class with useful features for all objects.
Definition: any.h:39
A tensor of degree 3 over a Euclidean vector space of dimension 3 (volatile version).
Definition: t3_e3.h:151
t3_e3_row_dofs_type< double > row_dofs_type
The type of the row dofs.
Definition: t3_e3.h:459
t3_e3_row_dofs_type< T > row_dofs_type
The type of the row dofs (type of this).
Definition: t3_e3.h:60
A client handle for a mutable partially ordered set.
Definition: poset.h:40
e3_lite vector_space_type
Type of underlying vector space.
Definition: t3_e3.h:264
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
t3_e3_row_dofs_type< T > * clone() const
Creates a new instance of the same type as this.
Definition: t3_e3.impl.h:121
T components[27]
The dofs in the following order:
Definition: t3_e3.h:132
virtual t3 * clone() const
Make a new handle, no state instance of current.
Definition: t3.cc:1009
A general tensor of degree p over an abstract vector space (volatile version). Volatile version does ...
Definition: tp.h:59
t3_e3_row_dofs_type< double > row_dofs_type
The type of the row dofs.
Definition: t3_e3.h:166
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
e3 vector_space_type
Type of underlying vector space.
Definition: t3_e3.h:469
A symmetric rank 3 tensor over a Euclidean vector space of dimension 3. (volatile version)...
Definition: st3_e3.h:118
virtual t3_e3_lite * clone(bool xnew_state, bool xauto_access) const
Virtual constructor, makes a new instance of the same type as this; synonym for clone(), intended for use only in certain templates.
Definition: t3_e3.h:346
An abstract client handle for a member of a poset.
An abstract tensor space of degree p.
Definition: tp_space.h:47
static int d()
The dimension of the row dof components.
Definition: t3_e3.impl.h:62
A symmetric tensor of degree p over an abstract vector space (volatile version).
Definition: stp.h:44
Namespace for the fiber_bundles component of the sheaf system.
A tensor of degree 3 over a Euclidean vector space of dimension 3 (persistent version).
Definition: t3_e3.h:401