SheafSystem  0.0.0.0
jcb_e13.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 JCB_E13_H
22 #define JCB_E13_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef JCB_ED_H
29 #include "SheafSystem/jcb_ed.h"
30 #endif
31 
32 #ifndef GENERAL_MATRIX_3X1_H
33 #include "SheafSystem/general_matrix_3x1.h"
34 #endif
35 
36 #ifndef E1_H
37 #include "SheafSystem/e1.h"
38 #endif
39 
40 #ifndef E3_H
41 #include "SheafSystem/e3.h"
42 #endif
43 
44 namespace fiber_bundle
45 {
46  class e1;
47  class e3;
48 
49 //==============================================================================
50 // CLASS JCB_E13_ROW_DOFS_TYPE
51 //==============================================================================
52 
56 template <typename T>
58 {
59 public:
60 
64  typedef T dof_type;
65 
70 
75 
79  static const std::string& static_class_name();
80 
84  static int d();
85 
90  T& operator[] (int xindex);
91 
96  const T& operator[] (int xindex) const;
97 
102  operator typename jcb_e13_row_dofs_type<T>::matrix_type& ();
103 
108  operator const typename jcb_e13_row_dofs_type<T>::matrix_type& () const;
109 
114 
119  jcb_e13_row_dofs_type<T>* clone(bool xnew_state, bool xauto_access) const
120  {
121  return clone();
122  }
123 
131 
132 protected:
133 private:
134 
135 };
136 
137 
138 //==============================================================================
139 // CLASS JCB_E13_LITE
140 //==============================================================================
141 
147 class SHEAF_DLL_SPEC jcb_e13_lite : public jcb_ed_lite
148 {
149  //============================================================================
151  //============================================================================
153 
154 public:
155 
156  // Typedefs:
157 
162 
167 
171  jcb_e13_lite();
172 
176  jcb_e13_lite(const jcb_e13_lite& xother);
177 
181  jcb_e13_lite& operator=(const jcb_e13_lite& xother);
182 
186  virtual ~jcb_e13_lite();
187 
191  jcb_e13_lite(const row_dofs_type& xrow_dofs);
192 
196  jcb_e13_lite& operator=(const row_dofs_type& xrow_dofs);
197 
201  jcb_e13_lite(const matrix_type& xmatrix);
202 
206  jcb_e13_lite& operator=(const matrix_type& xmatrix);
207 
212  operator matrix_type& ();
213 
218  operator const matrix_type& () const;
219 
224  operator row_dofs_type& ();
225 
230  operator const row_dofs_type& () const;
231 
235  jcb_e13_lite(const value_type& dxdu,
236  const value_type& dydu,
237  const value_type& dzdu);
238 
240 
244  virtual void put_components(const value_type& dxdu,
245  const value_type& dydu,
246  const value_type& dzdu);
247 
248 protected:
249 
253  row_dofs_type _row_dofs;
254 
255 private:
256 
258 
259 
260  //============================================================================
262  //============================================================================
264 
265 public:
266 protected:
267 private:
268 
270 
271 
272  //============================================================================
274  //============================================================================
276 
277 public:
278 
283 
288 
292  virtual int dd() const;
293 
297  virtual int dr() const;
298 
299 protected:
300 private:
301 
303 
304 
305  //============================================================================
307  //============================================================================
309 
310 public:
311 
312 // ///
313 // /// Virtual constructor for general tensors
314 // /// of degree xp over this vector space.
315 // ///
316 // virtual tp_lite* new_tp_lite(int xp) const;
317 
318 // ///
319 // /// Virtual constructor for antisymmetric tensors
320 // /// of degree xp over this vector space.
321 // ///
322 // virtual atp_lite* new_atp_lite(int xp) const;
323 
324 // ///
325 // /// Virtual constructor for symmetric tensors
326 // /// of degree xp over this vector space.
327 // ///
328 // virtual stp_lite* new_stp_lite(int xp) const;
329 
330 // virtual const tp_lite& tp_prototype(int xp) const;
331 // virtual const atp_lite& atp_prototype(int xp) const;
332 // virtual const stp_lite& stp_prototype(int xp) const;
333 
334 protected:
335 private:
336 
338 
339 
340  //============================================================================
342  //============================================================================
344 
345 public:
346 protected:
347 private:
348 
350 
351 
352  //============================================================================
354  //============================================================================
356 
357 public:
358 
362  virtual const std::string& class_name() const;
363 
367  static const std::string& static_class_name();
368 
372  virtual jcb_e13_lite* clone() const;
373 
378  virtual jcb_e13_lite* clone(bool xnew_state, bool xauto_access) const
379  {
380  return clone();
381  }
382 
383 protected:
384 private:
385 
387 
388 
389  //============================================================================
391  //============================================================================
393 
394 public:
395 
399  virtual bool is_ancestor_of(const any_lite& xother) const;
400 
404  bool invariant() const;
405 
409  virtual void* row_dofs();
410 
414  virtual const void* row_dofs() const;
415 
416 protected:
417 private:
418 
420 };
421 
422 
423 //==============================================================================
424 // CLASS JCB_E13
425 //==============================================================================
426 
428 
433 class SHEAF_DLL_SPEC jcb_e13 : public jcb_ed
434 {
435  // ===========================================================
437  // ===========================================================
439 
440 public:
441 
445  static const poset_path& standard_schema_path();
446 
450  static void make_standard_schema(namespace_poset& xns);
451 
458  static host_type& new_host(namespace_type& xns,
459  const poset_path& xhost_path,
460  const poset_path& xschema_path,
461  const poset_path& xdomain_path,
462  const poset_path& xrange_path,
463  bool xauto_access);
464 
471  static host_type& standard_host(namespace_type& xns, const std::string& xsuffix, bool xauto_access);
472 
473 protected:
474 
475 private:
476 
478 
479 
480  //============================================================================
482  //============================================================================
484 
485 public:
486 
487  // Typedefs:
488 
492  typedef e1 domain_type;
493 
497  typedef e3 range_type;
498 
503 
508 
512  jcb_e13();
513 
518  jcb_e13(const poset_state_handle* xhost, pod_index_type xhub_id);
519 
524  jcb_e13(const poset_state_handle* xhost, const scoped_index& xid);
525 
530  jcb_e13(const poset_state_handle* xhost, const std::string& xname);
531 
535  explicit jcb_e13(abstract_poset_member* xother);
536 
540  jcb_e13(poset_state_handle* xhost, bool xauto_access = true);
541 
546  const row_dofs_type& xrdt,
547  bool xauto_access = true);
548 
552  jcb_e13& operator=(const row_dofs_type& xrdt);
553 
557  virtual jcb_e13& operator=(const abstract_poset_member& xother);
558 
562  jcb_e13& operator=(const jcb_e13& xother);
563 
567  ~jcb_e13();
568 
572  virtual const volatile_type& lite_prototype() const;
573 
577  virtual volatile_type* lite_type() const;
578 
579  //============================================================================
580  // ROW DOF RELATED MEMBER FUNCTIONS
581  //============================================================================
582 
586  virtual void put_components(dof_type dxdu_comp,
587  dof_type dydu_comp,
588  dof_type dzdu_comp);
589 
594  operator row_dofs_type& ();
595 
600  operator const row_dofs_type& () const;
601 
602 protected:
603 private:
604 
606 
607 
608  //============================================================================
610  //============================================================================
612 
613 public:
614 protected:
615 private:
616 
618 
619 
620  //============================================================================
622  //============================================================================
624 
625 public:
630 
635 
636 protected:
637 private:
638 
640 
641 
642  //============================================================================
644  //============================================================================
646 
647 public:
648 protected:
649 private:
650 
652 
653 
654  //============================================================================
656  //============================================================================
658 
659 public:
660 
661 protected:
662 
663 private:
664 
666 
667 
668  //============================================================================
670  //============================================================================
672 
673 public:
674 
678  virtual const std::string& class_name() const;
679 
683  static const std::string& static_class_name();
684 
688  virtual jcb_e13* clone() const;
689 
695  inline jcb_e13* clone(bool xnew_state, bool xauto_access = true) const
696  {
697  return static_cast<jcb_e13*>(jcb_ed::clone(xnew_state, xauto_access));
698  }
699 
700 protected:
701 private:
702 
704 
705 
706  //============================================================================
708  //============================================================================
710 
711 public:
712 
716  bool is_ancestor_of(const any* xother) const;
717 
721  bool invariant() const;
722 
723 
724 protected:
725 private:
726 
728 };
729 
730 //==============================================================================
731 // NON-MEMBER FUNCTIONS
732 //==============================================================================
733 
737 template <typename T>
738 std::ostream& operator<<(std::ostream& xos, const jcb_e13_row_dofs_type<T>& xrdt);
739 
740 
741 class e1;
742 class e3;
743 class e1_lite;
744 class e3_lite;
745 
746 //==============================================================================
747 // JCB FACET
748 //==============================================================================
749 
750 namespace jcb_algebra
751 {
752 
753 #ifndef DOXYGEN_SKIP_UNKNOWN
754 
758 SHEAF_DLL_SPEC void push(const jcb_e13& xjcb,
759  const e1& xvector,
760  e3& xresult,
761  bool xauto_access);
762 
766 SHEAF_DLL_SPEC void push(const jcb_e13_lite& xjcb,
767  const e1_lite& xvector,
768  e3_lite& xresult);
769 
773 SHEAF_DLL_SPEC e3_lite* push(const jcb_e13_lite& xjcb,
774  const e1_lite& xvector);
775 
776 #endif // ifndef DOXYGEN_SKIP_UNKNOWN
777 
781 SHEAF_DLL_SPEC void pull(const jcb_e13& xjcb,
782  const e3& xcovector,
783  e1& xresult,
784  bool xauto_access);
785 
789 SHEAF_DLL_SPEC void pull(const jcb_e13_lite& xjcb,
790  const e3_lite& xcovector,
791  e1_lite& xresult);
792 
796 SHEAF_DLL_SPEC e1_lite* pull(const jcb_e13_lite& xjcb,
797  const e3_lite& xcovector);
798 
799 } // namespace jcb_algebra
800 
801 } // namespace fiber_bundle
802 
803 
804 #endif // ifndef JCB_E13_H
vd_value_type value_type
The type of component in the fiber; the scalar type in the fiber vector space.
Definition: vd.h:129
Euclidean vector space of dimension 3 (volatile version).
Definition: e3.h:116
e3 range_space_type
Type of underlying range vector space.
Definition: jcb_e13.h:634
Abstract jacobian for d dimensional Euclidean space (volatile version).
Definition: jcb_ed.h:44
Jacobian of a map from a 1 dimensional domain (u) to a 3 dimensional Euclidean space (x...
Definition: jcb_e13.h:147
The default name space; a poset which contains other posets as members.
void pull(const SJCB &xjcb, const SCOVECTOR &xcovector, SR &xresult, bool xauto_access)
Definition: sec_jcb.impl.h:95
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.
static int d()
The dimension of the row dof components.
Definition: jcb_e13.impl.h:62
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
virtual jcb_ed * clone() const
Make a new handle, no state instance of current.
Definition: jcb_ed.cc:725
jcb_e13_row_dofs_type< double >::matrix_type matrix_type
The type of the associated matrix.
Definition: jcb_e13.h:166
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
void push(const SJCB &xjcb, const SVECTOR &xvector, SR &xresult, bool xauto_access)
Definition: sec_jcb.impl.h:143
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).
Euclidean vector space of dimension 1 (persistent version).
Definition: e1.h:400
e1_lite domain_space_type
Type of underlying domain vector space.
Definition: jcb_e13.h:282
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
general_matrix_3x1< T > matrix_type
The type of the associated matrix.
Definition: jcb_e13.h:74
e3_lite range_space_type
Type of underlying range vector space.
Definition: jcb_e13.h:287
static const std::string & static_class_name()
The name of this class.
Definition: jcb_e13.impl.h:42
Row dofs type for class jcb_e13.
Definition: jcb_e13.h:57
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
jcb_e13 * 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: jcb_e13.h:695
General matrix with 3 rows and 1 column.
jcb_e13_row_dofs_type< T > row_dofs_type
The type of the row dofs (type of this).
Definition: jcb_e13.h:69
T & operator[](int xindex)
Value of xindex-th component (row dof) (non const version).
Definition: jcb_e13.impl.h:82
T dof_type
The type of the dofs.
Definition: jcb_e13.h:64
Jacobian of a map from a 1 dimensional domain (u) to a 3 dimensional Euclidean space (x...
Definition: jcb_e13.h:433
jcb_e13_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: jcb_e13.h:119
jcb_e13_row_dofs_type< double > row_dofs_type
The type of the row dofs.
Definition: jcb_e13.h:502
row_dofs_type _row_dofs
Row_dofs_type.
Definition: jcb_e13.h:253
T components[3]
The dofs in the following order: components[0] => dx/du components[1] => dy/du components[2] => dz/du...
Definition: jcb_e13.h:130
An abstract space of Jacobians.
Definition: jcb_space.h:46
jcb_e13_row_dofs_type< T > * clone() const
Creates a new instance of the same type as this.
Definition: jcb_e13.impl.h:156
jcb_e13_row_dofs_type< double > row_dofs_type
The type of the row dofs.
Definition: jcb_e13.h:161
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
virtual jcb_e13_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: jcb_e13.h:378
jcb_e13_lite volatile_type
The associated volatile type.
Definition: jcb_e13.h:507
Euclidean vector space of dimension 1 (volatile version).
Definition: e1.h:113
e1 domain_space_type
Type of underlying domain vector space.
Definition: jcb_e13.h:629
e1 domain_type
The type of domain vector space.
Definition: jcb_e13.h:492
Abstract jacobian for d dimensional Euclidean space (persistent version).
Definition: jcb_ed.h:185
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
Namespace for the fiber_bundles component of the sheaf system.
e3 range_type
The type of range vector space.
Definition: jcb_e13.h:497