SheafSystem  0.0.0.0
st4_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 #ifndef ST4_E2_H
22 #define ST4_E2_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 E2_H
33 #include "SheafSystem/e2.h"
34 #endif
35 
36 namespace fiber_bundle
37 {
38 
39 //==============================================================================
40 // CLASS ST4_E2_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_e2_row_dofs_type<T>* clone(bool xnew_state, bool xauto_access) const
93  {
94  return clone();
95  }
96 
107 
108 protected:
109 private:
110 
111 };
112 
113 
114 //==============================================================================
115 // CLASS ST4_E2_LITE
116 //==============================================================================
117 
118 class e2_lite;
119 
124 class SHEAF_DLL_SPEC st4_e2_lite : public st4_lite
125 {
126  //============================================================================
128  //============================================================================
130 
131 public:
132 
133  // Typedefs:
134 
139 
143  st4_e2_lite();
144 
148  st4_e2_lite(const st4_e2_lite& xother);
149 
153  st4_e2_lite& operator=(const st4_e2_lite& xother);
154 
158  virtual ~st4_e2_lite();
159 
163  st4_e2_lite(const row_dofs_type& xrow_dofs);
164 
168  st4_e2_lite& operator=(const row_dofs_type& xrow_dofs);
169 
174  operator row_dofs_type& ();
175 
180  operator const row_dofs_type& () const;
181 
182 // ///
183 // /// Creates a new instance with component xcomp.
184 // ///
185 // st4_e2_lite(const value_type& xcomp);
186 
187 
188 // using st4_lite::put_components;
189 
190 // ///
191 // /// Set the value of the component to xcomp.
192 // ///
193 // virtual void put_components(const value_type& xcomp);
194 
195 protected:
196 
200  row_dofs_type _row_dofs;
201 
202 private:
203 
205 
206 
207  //============================================================================
209  //============================================================================
211 
212 public:
213 protected:
214 private:
215 
217 
218 
219  //============================================================================
221  //============================================================================
223 
224 public:
225 protected:
226 private:
227 
229 
230 
231  //============================================================================
233  //============================================================================
235 
236 public:
237 
242 
246  virtual int dd() const;
247 
248 protected:
249 private:
250 
252 
253 
254  //============================================================================
256  //============================================================================
258 
259 public:
260 
265  virtual const tp_lite& tp_prototype(int xp) const;
266 
271  virtual const atp_lite& atp_prototype(int xp) const;
272 
277  virtual const stp_lite& stp_prototype(int xp) const;
278 
279 protected:
280 private:
281 
283 
284 
285  //============================================================================
287  //============================================================================
289 
290 public:
291 protected:
292 private:
293 
295 
296 
297  //============================================================================
299  //============================================================================
301 
302 public:
303 
307  virtual const std::string& class_name() const;
308 
312  static const std::string& static_class_name();
313 
317  virtual st4_e2_lite* clone() const;
318 
323  virtual st4_e2_lite* clone(bool xnew_state, bool xauto_access) const
324  {
325  return clone();
326  }
327 
328 protected:
329 private:
330 
332 
333 
334  //============================================================================
336  //============================================================================
338 
339 public:
340 
344  virtual bool is_ancestor_of(const any_lite& xother) const;
345 
349  bool invariant() const;
350 
354  virtual void* row_dofs();
355 
359  virtual const void* row_dofs() const;
360 
361 protected:
362 private:
363 
365 };
366 
367 
368 //==============================================================================
369 // CLASS ST4_E2
370 //==============================================================================
371 
376 class SHEAF_DLL_SPEC st4_e2 : public st4
377 {
378 
379  // ===========================================================
381  // ===========================================================
383 
384 public:
385 
389  static const poset_path& standard_schema_path();
390 
394  static void make_standard_schema(namespace_poset& xns);
395 
401  static host_type& new_host(namespace_type& xns,
402  const poset_path& xhost_path,
403  const poset_path& xschema_path,
404  const poset_path& xvector_space_path,
405  bool xauto_access);
406 
413  static host_type& standard_host(namespace_type& xns, const std::string& xsuffix, bool xauto_access);
414 
415 protected:
416 
417 private:
418 
420 
421 
422  //============================================================================
424  //============================================================================
426 
427 public:
428 
429  // Typedefs:
430 
435 
440 
445 
449  st4_e2();
450 
455  st4_e2(const poset_state_handle* xhost, pod_index_type xhub_id);
456 
461  st4_e2(const poset_state_handle* xhost, const scoped_index& xid);
462 
467  st4_e2(const poset_state_handle* xhost, const std::string& xname);
468 
472  explicit st4_e2(abstract_poset_member* xother);
473 
477  st4_e2(poset_state_handle* xhost, bool xauto_access = true);
478 
482  st4_e2(poset_state_handle& xhost,
483  const row_dofs_type& xrdt,
484  bool xauto_access = true);
485 
489  st4_e2& operator=(const row_dofs_type& xrdt);
490 
494  virtual st4_e2& operator=(const abstract_poset_member& xother);
495 
499  st4_e2& operator=(const st4_e2& xother);
500 
504  ~st4_e2();
505 
509  virtual const volatile_type& lite_prototype() const;
510 
514  virtual volatile_type* lite_type() const;
515 
516 
517  //============================================================================
518  // Row dof tuple related member functions
519  //============================================================================
520 
521  using st4::put_components;
522 
526  virtual void put_components(dof_type xcomp);
527 
532  operator row_dofs_type& ();
533 
538  operator const row_dofs_type& () const;
539 
540 protected:
541 private:
542 
544 
545 
546  //============================================================================
548  //============================================================================
550 
551 public:
552 protected:
553 private:
554 
556 
557 
558  //============================================================================
560  //============================================================================
562 
563 public:
564 protected:
565 private:
566 
568 
569 
570  //============================================================================
572  //============================================================================
574 
575 public:
576 protected:
577 private:
578 
580 
581 
582  //============================================================================
584  //============================================================================
586 
587 public:
588 protected:
589 private:
590 
592 
593 
594  //============================================================================
596  //============================================================================
598 
599 public:
600 
605  virtual tp* new_tp(int xp, bool xauto_access) const;
606 
611  virtual atp* new_atp(int xp, bool xauto_access) const;
612 
617  virtual stp* new_stp(int xp, bool xauto_access) const;
618 
619 protected:
620 private:
621 
623 
624 
625  //============================================================================
627  //============================================================================
629 
630 public:
631 
635  virtual const std::string& class_name() const;
636 
640  static const std::string& static_class_name();
641 
645  virtual st4_e2* clone() const;
646 
652  inline st4_e2* clone(bool xnew_state, bool xauto_access = true) const
653  {
654  return static_cast<st4_e2*>(st4::clone(xnew_state, xauto_access));
655  }
656 
657 protected:
658 private:
659 
661 
662 
663 
664  //============================================================================
666  //============================================================================
668 
669 public:
670 
674  bool is_ancestor_of(const any* xother) const;
675 
679  bool invariant() const;
680 
681 protected:
682 private:
683 
685 };
686 
687 //==============================================================================
688 // NON-MEMBER FUNCTIONS
689 //==============================================================================
690 
694 template <typename T>
695 std::ostream& operator<<(std::ostream& xos, const st4_e2_row_dofs_type<T>& xrdt);
696 
697 
698 } // namespace fiber_bundle
699 
700 #endif // ifndef ST4_E2_H
st4_e2_row_dofs_type< T > * clone() const
Creates a new instance of the same type as this.
Definition: st4_e2.impl.h:121
A symmetric tensor of degree p over an abstract vector space.
Definition: stp.h:190
st4_e2_row_dofs_type< double > row_dofs_type
The type of the row dofs.
Definition: st4_e2.h:138
An antisymmetric tensor of degree p.
Definition: atp.h:190
Euclidean vector space of dimension 2 (persistent version).
Definition: e2.h:405
Row dofs type for class st4_e2.
Definition: st4_e2.h:47
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...
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: st4_e2.impl.h:42
T::row_dofs_type & row_dofs(T &x0)
The row dofs pod type for x0 (mutable version).
st4_e2_lite volatile_type
The associated volatile type.
Definition: st4_e2.h:439
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
row_dofs_type _row_dofs
Row_dofs_type.
Definition: st4_e2.h:200
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
st4_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: st4_e2.h:92
Euclidean vector space of dimension 2 (volatile version).
Definition: e2.h:112
T dof_type
The type of the dofs.
Definition: st4_e2.h:54
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
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
e2_lite vector_space_type
Type of underlying vector space.
Definition: st4_e2.h:241
st4_e2_row_dofs_type< T > row_dofs_type
The type of the row dofs (type of this).
Definition: st4_e2.h:59
A symmetric rank 4 tensor over a Euclidean vector space of dimension 3. (volatile version)...
Definition: st4_e2.h:124
T & operator[](int xindex)
Value of xindex-th component (row dof) (non const version).
Definition: st4_e2.impl.h:82
static int d()
The dimension of the row dof components.
Definition: st4_e2.impl.h:62
virtual st4_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: st4_e2.h:323
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
T components[5]
The components in the order:
Definition: st4_e2.h:106
e2 vector_space_type
Type of underlying vector space.
Definition: st4_e2.h:444
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
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.
st4_e2_row_dofs_type< double > row_dofs_type
The type of the row dofs.
Definition: st4_e2.h:434
A symmetric rank 4 tensor over an abstract vector space. (volatile version).
Definition: st4.h:43
st4_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: st4_e2.h:652