SheafSystem  0.0.0.0
st4_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 #ifndef ST4_E3_H
22 #define ST4_E3_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef ST4_H
29 #include "SheafSystem/st4.h"
30 #endif
31 
32 #ifndef E3_H
33 #include "SheafSystem/e3.h"
34 #endif
35 
36 namespace fiber_bundle
37 {
38 
39 //==============================================================================
40 // CLASS ST4_E3_ROW_DOFS_TYPE
41 //==============================================================================
42 
46 template <typename T>
48 {
49 public:
50 
54  typedef T dof_type;
55 
60 
64  static const std::string& static_class_name();
65 
69  static int d();
70 
75  T& operator[] (int xindex);
76 
81  const T& operator[] (int xindex) const;
82 
87 
92  st4_e3_row_dofs_type<T>* clone(bool xnew_state, bool xauto_access) const
93  {
94  return clone();
95  }
96 
116  T components[15];
117 
118 protected:
119 private:
120 
121 };
122 
123 
124 //==============================================================================
125 // CLASS ST4_E3_LITE
126 //==============================================================================
127 
128 class e3_lite;
129 
134 class SHEAF_DLL_SPEC st4_e3_lite : public st4_lite
135 {
136  //============================================================================
138  //============================================================================
140 
141 public:
142 
143  // Typedefs:
144 
149 
153  st4_e3_lite();
154 
158  st4_e3_lite(const st4_e3_lite& xother);
159 
163  st4_e3_lite& operator=(const st4_e3_lite& xother);
164 
168  virtual ~st4_e3_lite();
169 
173  st4_e3_lite(const row_dofs_type& xrow_dofs);
174 
178  st4_e3_lite& operator=(const row_dofs_type& xrow_dofs);
179 
184  operator row_dofs_type& ();
185 
190  operator const row_dofs_type& () const;
191 
192 // ///
193 // /// Creates a new instance with component xcomp.
194 // ///
195 // st4_e3_lite(const value_type& xcomp);
196 
197 
198 // using st4_lite::put_components;
199 
200 // ///
201 // /// Set the value of the component to xcomp.
202 // ///
203 // virtual void put_components(const value_type& xcomp);
204 
205 protected:
206 
210  row_dofs_type _row_dofs;
211 
212 private:
213 
215 
216 
217  //============================================================================
219  //============================================================================
221 
222 public:
223 protected:
224 private:
225 
227 
228 
229  //============================================================================
231  //============================================================================
233 
234 public:
235 protected:
236 private:
237 
239 
240 
241  //============================================================================
243  //============================================================================
245 
246 public:
247 
252 
256  virtual int dd() const;
257 
258 protected:
259 private:
260 
262 
263 
264  //============================================================================
266  //============================================================================
268 
269 public:
270 
275  virtual const tp_lite& tp_prototype(int xp) const;
276 
281  virtual const atp_lite& atp_prototype(int xp) const;
282 
287  virtual const stp_lite& stp_prototype(int xp) const;
288 
289 protected:
290 private:
291 
293 
294 
295  //============================================================================
297  //============================================================================
299 
300 public:
301 protected:
302 private:
303 
305 
306 
307  //============================================================================
309  //============================================================================
311 
312 public:
313 
317  virtual const std::string& class_name() const;
318 
322  static const std::string& static_class_name();
323 
327  virtual st4_e3_lite* clone() const;
328 
333  virtual st4_e3_lite* clone(bool xnew_state, bool xauto_access) const
334  {
335  return clone();
336  }
337 
338 protected:
339 private:
340 
342 
343 
344  //============================================================================
346  //============================================================================
348 
349 public:
350 
354  virtual bool is_ancestor_of(const any_lite& xother) const;
355 
359  bool invariant() const;
360 
364  virtual void* row_dofs();
365 
369  virtual const void* row_dofs() const;
370 
371 protected:
372 private:
373 
375 };
376 
377 
378 //==============================================================================
379 // CLASS ST4_E3
380 //==============================================================================
381 
386 class SHEAF_DLL_SPEC st4_e3 : public st4
387 {
388 
389  // ===========================================================
391  // ===========================================================
393 
394 public:
395 
399  static const poset_path& standard_schema_path();
400 
404  static void make_standard_schema(namespace_poset& xns);
405 
411  static host_type& new_host(namespace_type& xns,
412  const poset_path& xhost_path,
413  const poset_path& xschema_path,
414  const poset_path& xvector_space_path,
415  bool xauto_access);
416 
423  static host_type& standard_host(namespace_type& xns, const std::string& xsuffix, bool xauto_access);
424 
425 protected:
426 
427 private:
428 
430 
431 
432  //============================================================================
434  //============================================================================
436 
437 public:
438 
439  // Typedefs:
440 
445 
450 
455 
459  st4_e3();
460 
465  st4_e3(const poset_state_handle* xhost, pod_index_type xhub_id);
466 
471  st4_e3(const poset_state_handle* xhost, const scoped_index& xid);
472 
477  st4_e3(const poset_state_handle* xhost, const std::string& xname);
478 
482  explicit st4_e3(abstract_poset_member* xother);
483 
487  st4_e3(poset_state_handle* xhost, bool xauto_access = true);
488 
492  st4_e3(poset_state_handle& xhost,
493  const row_dofs_type& xrdt,
494  bool xauto_access = true);
495 
499  st4_e3& operator=(const row_dofs_type& xrdt);
500 
504  virtual st4_e3& operator=(const abstract_poset_member& xother);
505 
509  st4_e3& operator=(const st4_e3& xother);
510 
514  ~st4_e3();
515 
519  virtual const volatile_type& lite_prototype() const;
520 
524  virtual volatile_type* lite_type() const;
525 
526 
527  //============================================================================
528  // Row dof tuple related member functions
529  //============================================================================
530 
531  using st4::put_components;
532 
536  virtual void put_components(dof_type xcomp);
537 
542  operator row_dofs_type& ();
543 
548  operator const row_dofs_type& () const;
549 
550 protected:
551 private:
552 
554 
555 
556  //============================================================================
558  //============================================================================
560 
561 public:
562 protected:
563 private:
564 
566 
567 
568  //============================================================================
570  //============================================================================
572 
573 public:
574 protected:
575 private:
576 
578 
579 
580  //============================================================================
582  //============================================================================
584 
585 public:
586 protected:
587 private:
588 
590 
591 
592  //============================================================================
594  //============================================================================
596 
597 public:
598 protected:
599 private:
600 
602 
603 
604  //============================================================================
606  //============================================================================
608 
609 public:
610 
615  virtual tp* new_tp(int xp, bool xauto_access) const;
616 
621  virtual atp* new_atp(int xp, bool xauto_access) const;
622 
627  virtual stp* new_stp(int xp, bool xauto_access) const;
628 
629 protected:
630 private:
631 
633 
634 
635  //============================================================================
637  //============================================================================
639 
640 public:
641 
645  virtual const std::string& class_name() const;
646 
650  static const std::string& static_class_name();
651 
655  virtual st4_e3* clone() const;
656 
662  inline st4_e3* clone(bool xnew_state, bool xauto_access = true) const
663  {
664  return static_cast<st4_e3*>(st4::clone(xnew_state, xauto_access));
665  }
666 
667 protected:
668 private:
669 
671 
672 
673 
674  //============================================================================
676  //============================================================================
678 
679 public:
680 
684  bool is_ancestor_of(const any* xother) const;
685 
689  bool invariant() const;
690 
691 protected:
692 private:
693 
695 };
696 
697 //==============================================================================
698 // NON-MEMBER FUNCTIONS
699 //==============================================================================
700 
704 template <typename T>
705 std::ostream& operator<<(std::ostream& xos, const st4_e3_row_dofs_type<T>& xrdt);
706 
707 
708 } // namespace fiber_bundle
709 
710 #endif // ifndef ST4_E3_H
st4_e3_row_dofs_type< T > * clone() const
Creates a new instance of the same type as this.
Definition: st4_e3.impl.h:121
e3_lite vector_space_type
Type of underlying vector space.
Definition: st4_e3.h:251
A symmetric tensor of degree p over an abstract vector space.
Definition: stp.h:190
An antisymmetric tensor of degree p.
Definition: atp.h:190
Euclidean vector space of dimension 3 (volatile version).
Definition: e3.h:116
st4_e3_lite volatile_type
The associated volatile type.
Definition: st4_e3.h:449
The default name space; a poset which contains other posets as members.
virtual st4 * clone() const
Make a new handle, no state instance of current.
Definition: st4.cc:1038
The standard fiber bundles name space; extends the standard sheaves namespace by defining base space...
Row dofs type for class st4_e3.
Definition: st4_e3.h:47
e3 vector_space_type
Type of underlying vector space.
Definition: st4_e3.h:454
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
row_dofs_type _row_dofs
Row_dofs_type.
Definition: st4_e3.h:210
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).
An antisymmetric tensor of degree p over an abstract vector space (volatile version).
Definition: atp.h:44
A symmetric rank 4 tensor over an abstract vector space (persistent version).
Definition: st4.h:230
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
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
static int d()
The dimension of the row dof components.
Definition: st4_e3.impl.h:62
T components[15]
The components in the order:
Definition: st4_e3.h:116
T & operator[](int xindex)
Value of xindex-th component (row dof) (non const version).
Definition: st4_e3.impl.h:82
A general tensor of degree p over an abstract vector space (volatile version). Volatile version does ...
Definition: tp.h:59
st4_e3_row_dofs_type< double > row_dofs_type
The type of the row dofs.
Definition: st4_e3.h:444
st4_e3_row_dofs_type< T > row_dofs_type
The type of the row dofs (type of this).
Definition: st4_e3.h:59
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
static const std::string & static_class_name()
The name of this class.
Definition: st4_e3.impl.h:42
virtual st4_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: st4_e3.h:333
A symmetric rank 3 tensor over a 3D Euclidean vector space (persistent version).
Definition: st4_e3.h:386
st4_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: st4_e3.h:662
st4_e3_row_dofs_type< double > row_dofs_type
The type of the row dofs.
Definition: st4_e3.h:148
An abstract client handle for a member of a poset.
vd_dof_type dof_type
The type of the degrees of freedom. Note that although dof_type == value_type in this implementation...
Definition: vd.h:431
T dof_type
The type of the dofs.
Definition: st4_e3.h:54
A symmetric tensor of degree p over an abstract vector space (volatile version).
Definition: stp.h:44
An abstract symmetric tensor space of degree p.
Definition: stp_space.h:42
void put_components(const dof_type comps[], int comps_dimension)
Sets values of all the components to the values in comps.
Definition: vd.cc:1252
Namespace for the fiber_bundles component of the sheaf system.
A symmetric rank 4 tensor over an abstract vector space. (volatile version).
Definition: st4.h:43
st4_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: st4_e3.h:92