SheafSystem  0.0.0.0
t4_e2.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 T4_E2_H
23 #define T4_E2_H
24 
25 #ifndef SHEAF_DLL_SPEC_H
26 #include "SheafSystem/sheaf_dll_spec.h"
27 #endif
28 
29 #ifndef T4_H
30 #include "SheafSystem/t4.h"
31 #endif
32 
33 #ifndef E2_H
34 #include "SheafSystem/e2.h"
35 #endif
36 
37 namespace fiber_bundle
38 {
39 
40 //==============================================================================
41 // CLASS T4_E2_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  t4_e2_row_dofs_type<T>* clone(bool xnew_state, bool xauto_access) const
94  {
95  return clone();
96  }
97 
111 
121 
122  T components[16];
123 
124 protected:
125 private:
126 
127 };
128 
129 //==============================================================================
130 // CLASS T4_E2_LITE
131 //==============================================================================
132 
133 class e2_lite;
134 class st4_e2_lite;
135 
140 class SHEAF_DLL_SPEC t4_e2_lite : public t4_lite
141 {
142 
143  //============================================================================
145  //============================================================================
147 
148 public:
149 
150  // Typedefs:
151 
156 
160  t4_e2_lite();
161 
165  t4_e2_lite(const t4_e2_lite& xother);
166 
170  t4_e2_lite& operator=(const t4_e2_lite& xother);
171 
175  virtual ~t4_e2_lite();
176 
180  t4_e2_lite(const st4_e2_lite& xother);
181 
185  t4_e2_lite& operator=(const st4_e2_lite& xother);
186 
190  t4_e2_lite(const row_dofs_type& xrow_dofs);
191 
195  t4_e2_lite& operator=(const row_dofs_type& xrow_dofs);
196 
201  operator row_dofs_type& ();
202 
207  operator const row_dofs_type& () const;
208 
209 protected:
210 
214  row_dofs_type _row_dofs;
215 
216 private:
217 
219 
220 
221  //============================================================================
223  //============================================================================
225 
226 public:
227 protected:
228 private:
229 
231 
232 
233  //============================================================================
235  //============================================================================
237 
238 public:
239 
244 
248  virtual int dd() const;
249 
250 protected:
251 private:
252 
254 
255 
256  //============================================================================
258  //============================================================================
260 
261 public:
262 
267  virtual const tp_lite& tp_prototype(int xp) const;
268 
273  virtual const atp_lite& atp_prototype(int xp) const;
274 
279  virtual const stp_lite& stp_prototype(int xp) const;
280 
281 protected:
282 private:
283 
285 
286 
287  //============================================================================
289  //============================================================================
291 
292 public:
293 protected:
294 private:
295 
297 
298 
299  //============================================================================
301  //============================================================================
303 
304 public:
305 
309  virtual const std::string& class_name() const;
310 
314  static const std::string& static_class_name();
315 
319  virtual t4_e2_lite* clone() const;
320 
325  virtual t4_e2_lite* clone(bool xnew_state, bool xauto_access) const
326  {
327  return clone();
328  }
329 
330 protected:
331 private:
332 
334 
335 
336  //============================================================================
338  //============================================================================
340 
341 public:
342 
346  virtual bool is_ancestor_of(const any_lite& xother) const;
347 
351  bool invariant() const;
352 
356  virtual void* row_dofs();
357 
361  virtual const void* row_dofs() const;
362 
363 protected:
364 private:
365 
367 };
368 
369 
370 //==============================================================================
371 // CLASS T4_E2
372 //==============================================================================
373 
378 class SHEAF_DLL_SPEC t4_e2 : public t4
379 {
380 
381  // ===========================================================
383  // ===========================================================
385 
386 public:
387 
391  static const poset_path& standard_schema_path();
392 
396  static void make_standard_schema(namespace_poset& xns);
397 
403  static host_type& new_host(namespace_type& xns,
404  const poset_path& xhost_path,
405  const poset_path& xschema_path,
406  const poset_path& xvector_space_path,
407  bool xauto_access);
408 
415  static host_type& standard_host(namespace_type& xns, const std::string& xsuffix, bool xauto_access);
416 
417 protected:
418 
419 private:
420 
422 
423 
424  //============================================================================
426  //============================================================================
428 
429 public:
430 
431  // Typedefs:
432 
437 
442 
447 
451  t4_e2();
452 
456  t4_e2(const t4_e2& xother);
457 
461  virtual t4_e2& operator=(const abstract_poset_member& xother);
462 
466  t4_e2& operator=(const t4_e2& xother);
467 
471  virtual ~t4_e2();
472 
476  virtual const volatile_type& lite_prototype() const;
477 
481  virtual volatile_type* lite_type() const;
482 
486  t4_e2(poset* xhost, bool xauto_access = true);
487 
490 
494  t4_e2(poset_state_handle& xhost,
495  const row_dofs_type& xrdt,
496  bool xauto_access = true);
497 
501  t4_e2& operator=(const row_dofs_type& xrdt);
502 
507  t4_e2(const poset* xhost, pod_index_type xhub_id);
508 
513  t4_e2(const poset* xhost, const scoped_index& xid);
514 
519  t4_e2(const poset* xhost, const std::string& xname);
520 
525  operator row_dofs_type& ();
526 
531  operator const row_dofs_type& () const;
532 
533  //============================================================================
535  //============================================================================
537 
538 public:
539 protected:
540 private:
541 
543 
544 
545  //============================================================================
547  //============================================================================
549 
550 public:
551 protected:
552 private:
553 
555 
556 
557 
558  //============================================================================
560  //============================================================================
562 
563 public:
564 protected:
565 private:
566 
568 
569 
570  //============================================================================
572  //============================================================================
574 
575 public:
576 
581  virtual tp* new_tp(int xp, bool xauto_access) const;
582 
587  virtual atp* new_atp(int xp, bool xauto_access) const;
588 
593  virtual stp* new_stp(int xp, bool xauto_access) const;
594 
595 protected:
596 private:
597 
599 
600 
601  //============================================================================
603  //============================================================================
605 
606 public:
607 
611  virtual const std::string& class_name() const;
612 
616  static const std::string& static_class_name();
617 
621  virtual t4_e2* clone() const;
622 
628  inline t4_e2* clone(bool xnew_state, bool xauto_access = true) const
629  {
630  return static_cast<t4_e2*>(t4::clone(xnew_state, xauto_access));
631  }
632 
633 protected:
634 private:
635 
637 
638 
639  //============================================================================
641  //============================================================================
643 
644 public:
645 
649  virtual bool invariant() const;
650 
654  virtual bool is_ancestor_of(const any* other) const;
655 
656 protected:
657 private:
658 
660 };
661 
662 //==============================================================================
663 // NON-MEMBER FUNCTIONS
664 //==============================================================================
665 
669 template <typename T>
670 std::ostream& operator<<(std::ostream& xos, const t4_e2_row_dofs_type<T>& xrdt);
671 
672 class st4_e2;
673 class st4_e2_lite;
674 
675 namespace tp_algebra
676 {
677 
682 SHEAF_DLL_SPEC void sym(const t4_e2_lite& x0, st4_e2_lite& xresult);
683 
688 SHEAF_DLL_SPEC void sym(const t4_e2& x0, st4_e2& xresult, bool xauto_access);
689 
690 } // namespace tp_algebra
691 
692 } // namespace fiber_bundle
693 
694 
695 #endif // ifndef T4_E2_H
t4_e2_row_dofs_type< T > row_dofs_type
The type of the row dofs (type of this).
Definition: t4_e2.h:60
A symmetric tensor of degree p over an abstract vector space.
Definition: stp.h:190
static const std::string & static_class_name()
The name of this class.
Definition: t4_e2.impl.h:42
void sym(const GT &x0, ST &xresult, bool xauto_access)
Definition: sec_tp.impl.h:184
t4_e2_row_dofs_type< double > row_dofs_type
The type of the row dofs.
Definition: t4_e2.h:436
An antisymmetric tensor of degree p.
Definition: atp.h:190
T components[16]
The dofs are in the following order:
Definition: t4_e2.h:122
Euclidean vector space of dimension 2 (persistent version).
Definition: e2.h:405
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...
static int d()
The dimension of the row dof components.
Definition: t4_e2.impl.h:62
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 tensor of degree 4 over a Euclidean vector space of dimension 2 (persistent version).
Definition: t4_e2.h:378
e2 vector_space_type
Type of underlying vector space.
Definition: t4_e2.h:446
T::row_dofs_type & row_dofs(T &x0)
The row dofs pod type for x0 (mutable version).
t4_e2_row_dofs_type< double > row_dofs_type
The type of the row dofs.
Definition: t4_e2.h:155
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
Abstract base class with useful features for all objects.
Definition: any.h:39
t4_e2_row_dofs_type< T > * clone() const
Creates a new instance of the same type as this.
Definition: t4_e2.impl.h:121
T dof_type
The type of the dofs.
Definition: t4_e2.h:55
Euclidean vector space of dimension 2 (volatile version).
Definition: e2.h:112
A client handle for a mutable partially ordered set.
Definition: poset.h:40
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
virtual t4_e2_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: t4_e2.h:325
T & operator[](int xindex)
Value of xindex-th component (row dof) (non const version).
Definition: t4_e2.impl.h:82
row_dofs_type _row_dofs
Row_dofs_type.
Definition: t4_e2.h:214
A symmetric rank 3 tensor over a 3D Euclidean vector space (persistent version).
Definition: st4_e2.h:376
A general tensor of degree p over an abstract vector space (volatile version). Volatile version does ...
Definition: tp.h:59
A symmetric rank 4 tensor over a Euclidean vector space of dimension 3. (volatile version)...
Definition: st4_e2.h:124
A tensor of degree 4 over an abstract vector space (volatile version).
Definition: t4.h:43
t4_e2 * 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: t4_e2.h:628
t4_e2_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: t4_e2.h:93
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
An abstract client handle for a member of a poset.
A tensor of degree 4 over a Euclidean vector space of dimension 2 (volatile version).
Definition: t4_e2.h:140
An abstract tensor space of degree p.
Definition: tp_space.h:47
e2_lite vector_space_type
Type of underlying vector space.
Definition: t4_e2.h:243
A symmetric tensor of degree p over an abstract vector space (volatile version).
Definition: stp.h:44
virtual t4 * clone() const
Make a new handle, no state instance of current.
Definition: t4.cc:998
Namespace for the fiber_bundles component of the sheaf system.
t4_e2_lite volatile_type
The associated volatile type.
Definition: t4_e2.h:441
Row dofs type for class t4_e2.
Definition: t4_e2.h:48
A tensor of degree 4 over an abstract vector space (persistent version).
Definition: t4.h:223