SheafSystem  0.0.0.0
t4_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 T4_E3_H
23 #define T4_E3_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 E3_H
34 #include "SheafSystem/e3.h"
35 #endif
36 
37 namespace fiber_bundle
38 {
39 
40 //==============================================================================
41 // CLASS T4_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  t4_e3_row_dofs_type<T>* clone(bool xnew_state, bool xauto_access) const
94  {
95  return clone();
96  }
97 
130 
150 
160 
192  T components[81];
193 
194 protected:
195 private:
196 
197 };
198 
199 //==============================================================================
200 // CLASS T4_E3_LITE
201 //==============================================================================
202 
203 class e3_lite;
204 class st4_e3_lite;
205 
210 class SHEAF_DLL_SPEC t4_e3_lite : public t4_lite
211 {
212 
213  //============================================================================
215  //============================================================================
217 
218 public:
219 
220  // Typedefs:
221 
226 
230  t4_e3_lite();
231 
235  t4_e3_lite(const t4_e3_lite& xother);
236 
240  t4_e3_lite& operator=(const t4_e3_lite& xother);
241 
245  virtual ~t4_e3_lite();
246 
250  t4_e3_lite(const row_dofs_type& xrow_dofs);
251 
255  t4_e3_lite& operator=(const row_dofs_type& xrow_dofs);
256 
261  operator row_dofs_type& ();
262 
267  operator const row_dofs_type& () const;
268 
269 protected:
270 
274  row_dofs_type _row_dofs;
275 
276 private:
277 
279 
280 
281  //============================================================================
283  //============================================================================
285 
286 public:
287 protected:
288 private:
289 
291 
292 
293  //============================================================================
295  //============================================================================
297 
298 public:
299 
304 
308  virtual int dd() const;
309 
310 protected:
311 private:
312 
314 
315 
316  //============================================================================
318  //============================================================================
320 
321 public:
322 
327  virtual const tp_lite& tp_prototype(int xp) const;
328 
333  virtual const atp_lite& atp_prototype(int xp) const;
334 
339  virtual const stp_lite& stp_prototype(int xp) const;
340 
341 protected:
342 private:
343 
345 
346 
347  //============================================================================
349  //============================================================================
351 
352 public:
353 protected:
354 private:
355 
357 
358 
359  //============================================================================
361  //============================================================================
363 
364 public:
365 
369  virtual const std::string& class_name() const;
370 
374  static const std::string& static_class_name();
375 
379  virtual t4_e3_lite* clone() const;
380 
385  virtual t4_e3_lite* clone(bool xnew_state, bool xauto_access) const
386  {
387  return clone();
388  }
389 
390 protected:
391 private:
392 
394 
395 
396  //============================================================================
398  //============================================================================
400 
401 public:
402 
406  virtual bool is_ancestor_of(const any_lite& xother) const;
407 
411  bool invariant() const;
412 
416  virtual void* row_dofs();
417 
421  virtual const void* row_dofs() const;
422 
423 protected:
424 private:
425 
427 };
428 
429 
430 //==============================================================================
431 // CLASS T4_E3
432 //==============================================================================
433 
438 class SHEAF_DLL_SPEC t4_e3 : public t4
439 {
440 
441  // ===========================================================
443  // ===========================================================
445 
446 public:
447 
451  static const poset_path& standard_schema_path();
452 
456  static void make_standard_schema(namespace_poset& xns);
457 
463  static host_type& new_host(namespace_type& xns,
464  const poset_path& xhost_path,
465  const poset_path& xschema_path,
466  const poset_path& xvector_space_path,
467  bool xauto_access);
468 
475  static host_type& standard_host(namespace_type& xns, const std::string& xsuffix, bool xauto_access);
476 
477 protected:
478 
479 private:
480 
482 
483 
484  //============================================================================
486  //============================================================================
488 
489 public:
490 
491  // Typedefs:
492 
497 
502 
507 
511  t4_e3();
512 
516  t4_e3(const t4_e3& xother);
517 
521  virtual t4_e3& operator=(const abstract_poset_member& xother);
522 
526  t4_e3& operator=(const t4_e3& xother);
527 
531  virtual ~t4_e3();
532 
536  virtual const volatile_type& lite_prototype() const;
537 
541  virtual volatile_type* lite_type() const;
542 
546  t4_e3(poset* xhost, bool xauto_access = true);
547 
550 
554  t4_e3(poset_state_handle& xhost,
555  const row_dofs_type& xrdt,
556  bool xauto_access = true);
557 
561  t4_e3& operator=(const row_dofs_type& xrdt);
562 
567  t4_e3(const poset* xhost, pod_index_type xhub_id);
568 
573  t4_e3(const poset* xhost, const scoped_index& xid);
574 
579  t4_e3(const poset* xhost, const std::string& xname);
580 
585  operator row_dofs_type& ();
586 
591  operator const row_dofs_type& () const;
592 
593  //============================================================================
595  //============================================================================
597 
598 public:
599 protected:
600 private:
601 
603 
604 
605  //============================================================================
607  //============================================================================
609 
610 public:
611 protected:
612 private:
613 
615 
616 
617  //============================================================================
619  //============================================================================
621 
622 public:
623 protected:
624 private:
625 
627 
628 
629  //============================================================================
631  //============================================================================
633 
634 public:
635 
640  virtual tp* new_tp(int xp, bool xauto_access) const;
641 
646  virtual atp* new_atp(int xp, bool xauto_access) const;
647 
652  virtual stp* new_stp(int xp, bool xauto_access) const;
653 
654 protected:
655 private:
656 
658 
659 
660  //============================================================================
662  //============================================================================
664 
665 public:
666 
670  virtual const std::string& class_name() const;
671 
675  static const std::string& static_class_name();
676 
680  virtual t4_e3* clone() const;
681 
687  inline t4_e3* clone(bool xnew_state, bool xauto_access = true) const
688  {
689  return static_cast<t4_e3*>(t4::clone(xnew_state, xauto_access));
690  }
691 
692 protected:
693 private:
694 
696 
697 
698  //============================================================================
700  //============================================================================
702 
703 public:
704 
708  virtual bool invariant() const;
709 
713  virtual bool is_ancestor_of(const any* other) const;
714 
715 protected:
716 private:
717 
719 };
720 
721 //==============================================================================
722 // NON-MEMBER FUNCTIONS
723 //==============================================================================
724 
728 template <typename T>
729 std::ostream& operator<<(std::ostream& xos, const t4_e3_row_dofs_type<T>& xrdt);
730 
731 
732 class st4_e3;
733 class st4_e3_lite;
734 
735 // No alt versions here because at4_e3 is 0.
736 
737 namespace tp_algebra
738 {
739 
744 SHEAF_DLL_SPEC void sym(const t4_e3_lite& x0, st4_e3_lite& xresult);
745 
750 SHEAF_DLL_SPEC void sym(const t4_e3& x0, st4_e3& xresult, bool xauto_access);
751 
752 } // namespace tp_algebra
753 
754 } // end namespace fiber_bundle
755 
756 
757 #endif // ifndef T4_E3_H
t4_e3_row_dofs_type< T > row_dofs_type
The type of the row dofs (type of this).
Definition: t4_e3.h:60
e3_lite vector_space_type
Type of underlying vector space.
Definition: t4_e3.h:303
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
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
static const std::string & static_class_name()
The name of this class.
Definition: t4_e3.impl.h:42
T components[81]
The dofs are in the following order:
Definition: t4_e3.h:192
virtual t4_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: t4_e3.h:385
t4_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: t4_e3.h:93
A symmetric rank 4 tensor over a Euclidean vector space of dimension 3. (volatile version)...
Definition: st4_e3.h:134
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).
A tensor of degree 4 over a Euclidean vector space of dimension 3 (persistent version).
Definition: t4_e3.h:438
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_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: t4_e3.h:687
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
A tensor of degree 4 over a Euclidean vector space of dimension 3 (volatile version).
Definition: t4_e3.h:210
T & operator[](int xindex)
Value of xindex-th component (row dof) (non const version).
Definition: t4_e3.impl.h:82
t4_e3_row_dofs_type< T > * clone() const
Creates a new instance of the same type as this.
Definition: t4_e3.impl.h:121
t4_e3_lite volatile_type
The associated volatile type.
Definition: t4_e3.h:501
e3 vector_space_type
Type of underlying vector space.
Definition: t4_e3.h:506
A general tensor of degree p over an abstract vector space (volatile version). Volatile version does ...
Definition: tp.h:59
Row dofs type for class t4_e3.
Definition: t4_e3.h:48
A tensor of degree 4 over an abstract vector space (volatile version).
Definition: t4.h:43
t4_e3_row_dofs_type< double > row_dofs_type
The type of the row dofs.
Definition: t4_e3.h:225
static int d()
The dimension of the row dof components.
Definition: t4_e3.impl.h:62
T dof_type
The type of the dofs.
Definition: t4_e3.h:55
row_dofs_type _row_dofs
Row_dofs_type.
Definition: t4_e3.h:274
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
A symmetric rank 3 tensor over a 3D Euclidean vector space (persistent version).
Definition: st4_e3.h:386
t4_e3_row_dofs_type< double > row_dofs_type
The type of the row dofs.
Definition: t4_e3.h:496
An abstract client handle for a member of a poset.
An abstract tensor space of degree p.
Definition: tp_space.h:47
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.
A tensor of degree 4 over an abstract vector space (persistent version).
Definition: t4.h:223