SheafSystem  0.0.0.0
t2_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 T2_E3_H
23 #define T2_E3_H
24 
25 #ifndef SHEAF_DLL_SPEC_H
26 #include "SheafSystem/sheaf_dll_spec.h"
27 #endif
28 
29 #ifndef T2_H
30 #include "SheafSystem/t2.h"
31 #endif
32 
33 #ifndef GENERAL_MATRIX_3X3_H
34 #include "SheafSystem/general_matrix_3x3.h"
35 #endif
36 
37 #ifndef E3_H
38 #include "SheafSystem/e3.h"
39 #endif
40 
41 namespace fiber_bundle
42 {
43 
44 //==============================================================================
45 // CLASS T2_E3_ROW_DOFS_TYPE
46 //==============================================================================
47 
51 template <typename T>
52 class SHEAF_DLL_SPEC t2_e3_row_dofs_type
53 {
54 public:
55 
59  typedef T dof_type;
60 
65 
70 
74  static const std::string& static_class_name();
75 
79  static int d();
80 
85  T& operator[] (int xindex);
86 
91  const T& operator[] (int xindex) const;
92 
97  operator typename t2_e3_row_dofs_type<T>::matrix_type& ();
98 
103  operator const typename t2_e3_row_dofs_type<T>::matrix_type& () const;
104 
108  t2_e3_row_dofs_type<T>* clone() const;
109 
114  t2_e3_row_dofs_type<T>* clone(bool xnew_state, bool xauto_access) const
115  {
116  return clone();
117  }
118 
131 
132  T components[9];
133 
134 protected:
135 private:
136 
137 };
138 
139 //==============================================================================
140 // CLASS T2_E3_LITE
141 //==============================================================================
142 
143 class at2_e3_lite;
144 class e3_lite;
145 class st2_e3_lite;
146 
151 class SHEAF_DLL_SPEC t2_e3_lite : public t2_lite
152 {
153 
154  //============================================================================
156  //============================================================================
158 
159 public:
160 
161  // Typedefs:
162 
167 
172 
176  t2_e3_lite();
177 
181  t2_e3_lite(const t2_e3_lite& xother);
182 
186  t2_e3_lite& operator=(const t2_e3_lite& xother);
187 
191  virtual ~t2_e3_lite();
192 
196  t2_e3_lite(const at2_e3_lite& xother);
197 
201  t2_e3_lite& operator=(const at2_e3_lite& xother);
202 
206  t2_e3_lite(const st2_e3_lite& xother);
207 
211  t2_e3_lite& operator=(const st2_e3_lite& xother);
212 
216  t2_e3_lite(const row_dofs_type& xrow_dofs);
217 
221  t2_e3_lite& operator=(const row_dofs_type& xrow_dofs);
222 
226  t2_e3_lite(const matrix_type& xmatrix);
227 
231  t2_e3_lite& operator=(const matrix_type& xmatrix);
232 
237  operator matrix_type& ();
238 
243  operator const matrix_type& () const;
244 
249  operator row_dofs_type& ();
250 
255  operator const row_dofs_type& () const;
256 
257 
264  t2_e3_lite(const value_type& xx_comp,
265  const value_type& xy_comp,
266  const value_type& xz_comp,
267  const value_type& yx_comp,
268  const value_type& yy_comp,
269  const value_type& yz_comp,
270  const value_type& zx_comp,
271  const value_type& zy_comp,
272  const value_type& zz_comp);
273 
275 
279  virtual void put_components(const value_type& xx_comp,
280  const value_type& xy_comp,
281  const value_type& xz_comp,
282  const value_type& yx_comp,
283  const value_type& yy_comp,
284  const value_type& yz_comp,
285  const value_type& zx_comp,
286  const value_type& zy_comp,
287  const value_type& zz_comp);
288 
289 protected:
290 
294  row_dofs_type _row_dofs;
295 
296 private:
297 
299 
300 
301  //============================================================================
303  //============================================================================
305 
306 public:
307 protected:
308 private:
309 
311 
312 
313  //============================================================================
315  //============================================================================
317 
318 public:
319 
324 
328  virtual int dd() const;
329 
330 protected:
331 private:
332 
334 
335 
336  //============================================================================
338  //============================================================================
340 
341 public:
342 
347  virtual const tp_lite& tp_prototype(int xp) const;
348 
353  virtual const atp_lite& atp_prototype(int xp) const;
354 
359  virtual const stp_lite& stp_prototype(int xp) const;
360 
361 protected:
362 private:
363 
365 
366 
367  //============================================================================
369  //============================================================================
371 
372 public:
373 protected:
374 private:
375 
377 
378 
379  //============================================================================
381  //============================================================================
383 
384 public:
385 
389  virtual const std::string& class_name() const;
390 
394  static const std::string& static_class_name();
395 
399  virtual t2_e3_lite* clone() const;
400 
405  virtual t2_e3_lite* clone(bool xnew_state, bool xauto_access) const
406  {
407  return clone();
408  }
409 
410 protected:
411 private:
412 
414 
415 
416  //============================================================================
418  //============================================================================
420 
421 public:
422 
426  virtual bool is_ancestor_of(const any_lite& xother) const;
427 
431  bool invariant() const;
432 
436  virtual void* row_dofs();
437 
441  virtual const void* row_dofs() const;
442 
443 protected:
444 private:
445 
447 };
448 
449 //==============================================================================
450 // CLASS T2_E3
451 //==============================================================================
452 
457 class SHEAF_DLL_SPEC t2_e3 : public t2
458 {
459 
460  // ===========================================================
462  // ===========================================================
464 
465 public:
466 
470  static const poset_path& standard_schema_path();
471 
475  static void make_standard_schema(namespace_poset& xns);
476 
482  static host_type& new_host(namespace_type& xns,
483  const poset_path& xhost_path,
484  const poset_path& xschema_path,
485  const poset_path& xvector_space_path,
486  bool xauto_access);
487 
494  static host_type& standard_host(namespace_type& xns, const std::string& xsuffix, bool xauto_access);
495 
496 protected:
497 
498 private:
499 
501 
502 
503  //============================================================================
505  //============================================================================
507 
508 public:
509 
510  // Typedefs:
511 
516 
521 
526 
530  t2_e3();
531 
535  t2_e3(const t2_e3& xother);
536 
540  virtual t2_e3& operator=(const abstract_poset_member& xother);
541 
545  t2_e3& operator=(const t2_e3& xother);
546 
550  virtual ~t2_e3();
551 
555  virtual const volatile_type& lite_prototype() const;
556 
560  virtual volatile_type* lite_type() const;
561 
565  t2_e3(poset* xhost, bool xauto_access = true);
566 
569 
573  t2_e3(poset_state_handle& xhost,
574  const row_dofs_type& xrdt,
575  bool xauto_access = true);
576 
580  t2_e3& operator=(const row_dofs_type& xrdt);
581 
586  t2_e3(const poset* xhost, pod_index_type xhub_id);
587 
592  t2_e3(const poset* xhost, const scoped_index& xid);
593 
598  t2_e3(const poset* xhost, const std::string& xname);
599 
604  operator row_dofs_type& ();
605 
610  operator const row_dofs_type& () const;
611 
612  //============================================================================
614  //============================================================================
616 
617 public:
618 protected:
619 private:
620 
622 
623 
624  //============================================================================
626  //============================================================================
628 
629 public:
630 protected:
631 private:
632 
634 
635 
636 
637  //============================================================================
639  //============================================================================
641 
642 public:
643 protected:
644 private:
645 
647 
648 
649  //============================================================================
651  //============================================================================
653 
654 public:
655 
660  virtual tp* new_tp(int xp, bool xauto_access) const;
661 
666  virtual atp* new_atp(int xp, bool xauto_access) const;
667 
672  virtual stp* new_stp(int xp, bool xauto_access) const;
673 
674 protected:
675 private:
676 
678 
679 
680  //============================================================================
682  //============================================================================
684 
685 public:
686 
690  virtual const std::string& class_name() const;
691 
695  static const std::string& static_class_name();
696 
700  virtual t2_e3* clone() const;
701 
707  inline t2_e3* clone(bool xnew_state, bool xauto_access = true) const
708  {
709  return static_cast<t2_e3*>(t2::clone(xnew_state, xauto_access));
710  }
711 
712 protected:
713 private:
714 
716 
717 
718  //============================================================================
720  //============================================================================
722 
723 public:
724 
728  virtual bool invariant() const;
729 
733  virtual bool is_ancestor_of(const any* other) const;
734 
735 protected:
736 private:
737 
739 };
740 
741 //==============================================================================
742 // NON-MEMBER FUNCTIONS
743 //==============================================================================
744 
748 template <typename T>
749 SHEAF_DLL_SPEC
750 std::ostream& operator<<(std::ostream& xos, const t2_e3_row_dofs_type<T>& xrdt);
751 
752 
753 } // namespace fiber_bundle
754 
755 #endif // ifndef T2_E3_H
A symmetric tensor of degree p over an abstract vector space.
Definition: stp.h:190
vd_value_type value_type
The type of component in the fiber; the scalar type in the fiber vector space.
Definition: vd.h:129
An antisymmetric tensor of degree p.
Definition: atp.h:190
Euclidean vector space of dimension 3 (volatile version).
Definition: e3.h:116
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 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
t2_e3_row_dofs_type< double > row_dofs_type
The type of the row dofs.
Definition: t2_e3.h:515
A tensor of degree 2 over a Euclidean vector space of dimension 3 (persistent version).
Definition: t2_e3.h:457
row_dofs_type _row_dofs
Row_dofs_type.
Definition: t2_e3.h:294
t2_e3_lite volatile_type
The associated volatile type.
Definition: t2_e3.h:520
virtual void put_components(const dof_type xcomps[], int xcomps_dimension)
Set values of all the components to the values in xcomps.
Definition: vd.cc:278
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).
virtual t2 * clone() const
Make a new handle, no state instance of current.
Definition: t2.cc:984
e3_lite vector_space_type
Type of underlying vector space.
Definition: t2_e3.h:323
A tensor of degree 2 over an abstract vector space (volatile version).
Definition: t2.h:43
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
e3 vector_space_type
Type of underlying vector space.
Definition: t2_e3.h:525
Abstract base class with useful features for all objects.
Definition: any.h:39
virtual t2_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: t2_e3.h:405
A client handle for a mutable partially ordered set.
Definition: poset.h:40
A symmetric tensor of degree 2 over a Euclidean vector space of dimension 3 (volatile version)...
Definition: st2_e3.h:148
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
T dof_type
The type of the dofs.
Definition: t2_e3.h:59
t2_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: t2_e3.h:707
t2_e3_row_dofs_type< T > row_dofs_type
The type of the row dofs (type of this).
Definition: t2_e3.h:64
A tensor of degree 2 over a Euclidean vector space of dimension 3 (volatile version).
Definition: t2_e3.h:151
Row dofs type for class t2_e3.
Definition: t2_e3.h:52
A general tensor of degree p over an abstract vector space (volatile version). Volatile version does ...
Definition: tp.h:59
general_matrix_3x3< T > matrix_type
The type of the associated matrix.
Definition: t2_e3.h:69
t2_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: t2_e3.h:114
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
General matrix with 3 rows and 3 columns.
An antisymmetric rank 2 tensor over a Euclidean vector space of dimension 3. (volatile version)...
Definition: at2_e3.h:142
An abstract client handle for a member of a poset.
An abstract tensor space of degree p.
Definition: tp_space.h:47
t2_e3_row_dofs_type< double >::matrix_type matrix_type
The type of the associated matrix.
Definition: t2_e3.h:171
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.
t2_e3_row_dofs_type< double > row_dofs_type
The type of the row dofs.
Definition: t2_e3.h:166
A tensor of degree 2 over an abstract vector space (persistent version).
Definition: t2.h:226