SheafSystem  0.0.0.0
st3_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 ST3_E3_H
22 #define ST3_E3_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef ST3_H
29 #include "SheafSystem/st3.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 ST3_E3_ROW_DOFS_TYPE
41 //==============================================================================
42 
46 template <typename T>
47 class SHEAF_DLL_SPEC st3_e3_row_dofs_type
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 
86  st3_e3_row_dofs_type<T>* clone() const;
87 
92  st3_e3_row_dofs_type<T>* clone(bool xnew_state, bool xauto_access) const
93  {
94  return clone();
95  }
96 
100  T components[10];
101 
102 protected:
103 private:
104 
105 };
106 
107 
108 //==============================================================================
109 // CLASS ST3_E3_LITE
110 //==============================================================================
111 
112 class e3_lite;
113 
118 class SHEAF_DLL_SPEC st3_e3_lite : public st3_lite
119 {
120  //============================================================================
122  //============================================================================
124 
125 public:
126 
127  // Typedefs:
128 
133 
137  st3_e3_lite();
138 
142  st3_e3_lite(const st3_e3_lite& xother);
143 
147  st3_e3_lite& operator=(const st3_e3_lite& xother);
148 
152  virtual ~st3_e3_lite();
153 
157  st3_e3_lite(const row_dofs_type& xrow_dofs);
158 
162  st3_e3_lite& operator=(const row_dofs_type& xrow_dofs);
163 
168  operator row_dofs_type& ();
169 
174  operator const row_dofs_type& () const;
175 
176 // ///
177 // /// Creates a new instance with component xcomp.
178 // ///
179 // st3_e3_lite(const value_type& xcomp);
180 
181 
182 // using st3_lite::put_components;
183 
184 // ///
185 // /// Set the value of the component to xcomp.
186 // ///
187 // virtual void put_components(const value_type& xcomp);
188 
189 protected:
190 
194  row_dofs_type _row_dofs;
195 
196 private:
197 
199 
200 
201  //============================================================================
203  //============================================================================
205 
206 public:
207 protected:
208 private:
209 
211 
212 
213  //============================================================================
215  //============================================================================
217 
218 public:
219 protected:
220 private:
221 
223 
224 
225  //============================================================================
227  //============================================================================
229 
230 public:
231 
236 
240  virtual int dd() const;
241 
242 protected:
243 private:
244 
246 
247 
248  //============================================================================
250  //============================================================================
252 
253 public:
254 
259  virtual const tp_lite& tp_prototype(int xp) const;
260 
265  virtual const atp_lite& atp_prototype(int xp) const;
266 
271  virtual const stp_lite& stp_prototype(int xp) const;
272 
273 protected:
274 private:
275 
277 
278 
279  //============================================================================
281  //============================================================================
283 
284 public:
285 protected:
286 private:
287 
289 
290 
291  //============================================================================
293  //============================================================================
295 
296 public:
297 
301  virtual const std::string& class_name() const;
302 
306  static const std::string& static_class_name();
307 
311  virtual st3_e3_lite* clone() const;
312 
317  virtual st3_e3_lite* clone(bool xnew_state, bool xauto_access) const
318  {
319  return clone();
320  }
321 
322 protected:
323 private:
324 
326 
327 
328  //============================================================================
330  //============================================================================
332 
333 public:
334 
338  virtual bool is_ancestor_of(const any_lite& xother) const;
339 
343  bool invariant() const;
344 
348  virtual void* row_dofs();
349 
353  virtual const void* row_dofs() const;
354 
355 protected:
356 private:
357 
359 };
360 
361 
362 //==============================================================================
363 // CLASS ST3_E3
364 //==============================================================================
365 
370 class SHEAF_DLL_SPEC st3_e3 : public st3
371 {
372 
373  // ===========================================================
375  // ===========================================================
377 
378 public:
379 
383  static const poset_path& standard_schema_path();
384 
388  static void make_standard_schema(namespace_poset& xns);
389 
395  static host_type& new_host(namespace_type& xns,
396  const poset_path& xhost_path,
397  const poset_path& xschema_path,
398  const poset_path& xvector_space_path,
399  bool xauto_access);
400 
407  static host_type& standard_host(namespace_type& xns, const std::string& xsuffix, bool xauto_access);
408 
409 protected:
410 
411 private:
412 
414 
415 
416  //============================================================================
418  //============================================================================
420 
421 public:
422 
423  // Typedefs:
424 
429 
434 
439 
443  st3_e3();
444 
449  st3_e3(const poset_state_handle* xhost, pod_index_type xhub_id);
450 
455  st3_e3(const poset_state_handle* xhost, const scoped_index& xid);
456 
461  st3_e3(const poset_state_handle* xhost, const std::string& xname);
462 
466  explicit st3_e3(abstract_poset_member* xother);
467 
471  st3_e3(poset_state_handle* xhost, bool xauto_access = true);
472 
476  st3_e3(poset_state_handle& xhost,
477  const row_dofs_type& xrdt,
478  bool xauto_access = true);
479 
483  st3_e3& operator=(const row_dofs_type& xrdt);
484 
488  virtual st3_e3& operator=(const abstract_poset_member& xother);
489 
493  st3_e3& operator=(const st3_e3& xother);
494 
498  ~st3_e3();
499 
503  virtual const volatile_type& lite_prototype() const;
504 
508  virtual volatile_type* lite_type() const;
509 
510 
511  //============================================================================
512  // Row dof tuple related member functions
513  //============================================================================
514 
515  using st3::put_components;
516 
520  virtual void put_components(dof_type xcomp);
521 
526  operator row_dofs_type& ();
527 
532  operator const row_dofs_type& () const;
533 
534 protected:
535 private:
536 
538 
539 
540  //============================================================================
542  //============================================================================
544 
545 public:
546 protected:
547 private:
548 
550 
551 
552  //============================================================================
554  //============================================================================
556 
557 public:
558 protected:
559 private:
560 
562 
563 
564  //============================================================================
566  //============================================================================
568 
569 public:
570 protected:
571 private:
572 
574 
575 
576  //============================================================================
578  //============================================================================
580 
581 public:
582 protected:
583 private:
584 
586 
587 
588  //============================================================================
590  //============================================================================
592 
593 public:
594 
599  virtual tp* new_tp(int xp, bool xauto_access) const;
600 
605  virtual atp* new_atp(int xp, bool xauto_access) const;
606 
611  virtual stp* new_stp(int xp, bool xauto_access) const;
612 
613 protected:
614 private:
615 
617 
618 
619  //============================================================================
621  //============================================================================
623 
624 public:
625 
629  virtual const std::string& class_name() const;
630 
634  static const std::string& static_class_name();
635 
639  virtual st3_e3* clone() const;
640 
646  inline st3_e3* clone(bool xnew_state, bool xauto_access = true) const
647  {
648  return static_cast<st3_e3*>(st3::clone(xnew_state, xauto_access));
649  }
650 
651 protected:
652 private:
653 
655 
656 
657  //============================================================================
659  //============================================================================
661 
662 public:
663 
667  bool is_ancestor_of(const any* xother) const;
668 
672  bool invariant() const;
673 
674 protected:
675 private:
676 
678 };
679 
680 //==============================================================================
681 // NON-MEMBER FUNCTIONS
682 //==============================================================================
683 
687 template <typename T>
688 SHEAF_DLL_SPEC
689 std::ostream& operator<<(std::ostream& xos, const st3_e3_row_dofs_type<T>& xrdt);
690 
691 
692 } // namespace fiber_bundle
693 
694 #endif // ifndef ST3_E3_H
st3_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: st3_e3.h:646
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
Row dofs type for class st3_e3.
Definition: st3_e3.h:47
Euclidean vector space of dimension 3 (volatile version).
Definition: e3.h:116
st3_e3_row_dofs_type< T > row_dofs_type
The type of the row dofs (type of this).
Definition: st3_e3.h:59
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...
e3_lite vector_space_type
Type of underlying vector space.
Definition: st3_e3.h:235
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
virtual st3 * clone() const
Make a new handle, no state instance of current.
Definition: st3.cc:980
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
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
Abstract base class with useful features for all objects.
Definition: any.h:39
virtual st3_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: st3_e3.h:317
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: st3_e3.h:54
A symmetric rank 3 tensor over an abstract vector space (persistent version).
Definition: st3.h:230
row_dofs_type _row_dofs
Row_dofs_type.
Definition: st3_e3.h:194
A symmetric rank 3 tensor over an abstract vector space. (volatile version).
Definition: st3.h:43
A general tensor of degree p over an abstract vector space (volatile version). Volatile version does ...
Definition: tp.h:59
st3_e3_row_dofs_type< double > row_dofs_type
The type of the row dofs.
Definition: st3_e3.h:428
st3_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: st3_e3.h:92
st3_e3_lite volatile_type
The associated volatile type.
Definition: st3_e3.h:433
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
A symmetric rank 3 tensor over a Euclidean vector space of dimension 3. (volatile version)...
Definition: st3_e3.h:118
e3 vector_space_type
Type of underlying vector space.
Definition: st3_e3.h:438
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
st3_e3_row_dofs_type< double > row_dofs_type
The type of the row dofs.
Definition: st3_e3.h:132
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.