SheafSystem  0.0.0.0
jcb_e33.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_E33_H
22 #define JCB_E33_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_3X3_H
33 #include "SheafSystem/general_matrix_3x3.h"
34 #endif
35 
36 namespace fiber_bundle
37 {
38  class e3;
39 
40 //==============================================================================
41 // CLASS JCB_E33_ROW_DOFS_TYPE
42 //==============================================================================
43 
47 template <typename T>
49 {
50 public:
51 
55  typedef T dof_type;
56 
61 
66 
70  static const std::string& static_class_name();
71 
75  static int d();
76 
81  T& operator[] (int xindex);
82 
87  const T& operator[] (int xindex) const;
88 
93  operator typename jcb_e33_row_dofs_type<T>::matrix_type& ();
94 
99  operator const typename jcb_e33_row_dofs_type<T>::matrix_type& () const;
100 
105 
110  jcb_e33_row_dofs_type<T>* clone(bool xnew_state, bool xauto_access) const
111  {
112  return clone();
113  }
114 
128 
129 protected:
130 private:
131 
132 };
133 
134 
135 //==============================================================================
136 // CLASS JCB_E33_LITE
137 //==============================================================================
138 
144 class SHEAF_DLL_SPEC jcb_e33_lite : public jcb_ed_lite
145 {
146  //============================================================================
148  //============================================================================
150 
151 public:
152 
153  // Typedefs:
154 
159 
164 
168  jcb_e33_lite();
169 
173  jcb_e33_lite(const jcb_e33_lite& xother);
174 
178  jcb_e33_lite& operator=(const jcb_e33_lite& xother);
179 
183  virtual ~jcb_e33_lite();
184 
188  jcb_e33_lite(const row_dofs_type& xrow_dofs);
189 
193  jcb_e33_lite& operator=(const row_dofs_type& xrow_dofs);
194 
198  jcb_e33_lite(const matrix_type& xmatrix);
199 
203  jcb_e33_lite& operator=(const matrix_type& xmatrix);
204 
209  operator matrix_type& ();
210 
215  operator const matrix_type& () const;
216 
221  operator row_dofs_type& ();
222 
227  operator const row_dofs_type& () const;
228 
229 
234  jcb_e33_lite(const value_type& dxdu,
235  const value_type& dxdv,
236  const value_type& dxdw,
237  const value_type& dydu,
238  const value_type& dydv,
239  const value_type& dydw,
240  const value_type& dzdu,
241  const value_type& dzdv,
242  const value_type& dzdw);
243 
245 
249  virtual void put_components(const value_type& dxdu,
250  const value_type& dxdv,
251  const value_type& dxdw,
252  const value_type& dydu,
253  const value_type& dydv,
254  const value_type& dydw,
255  const value_type& dzdu,
256  const value_type& dzdv,
257  const value_type& dzdw);
258 
259 protected:
260 
264  row_dofs_type _row_dofs;
265 
266 private:
267 
269 
270 
271  //============================================================================
273  //============================================================================
275 
276 public:
277 protected:
278 private:
279 
281 
282 
283  //============================================================================
285  //============================================================================
287 
288 public:
289 
293  virtual int dd() const;
294 
298  virtual int dr() const;
299 
300 protected:
301 private:
302 
304 
305 
306  //============================================================================
308  //============================================================================
310 
311 public:
312 
313 // ///
314 // /// Virtual constructor for general tensors
315 // /// of degree xp over this vector space.
316 // ///
317 // virtual tp_lite* new_tp_lite(int xp) const;
318 
319 // ///
320 // /// Virtual constructor for antisymmetric tensors
321 // /// of degree xp over this vector space.
322 // ///
323 // virtual atp_lite* new_atp_lite(int xp) const;
324 
325 // ///
326 // /// Virtual constructor for symmetric tensors
327 // /// of degree xp over this vector space.
328 // ///
329 // virtual stp_lite* new_stp_lite(int xp) const;
330 
331 // virtual const tp_lite& tp_prototype(int xp) const;
332 // virtual const atp_lite& atp_prototype(int xp) const;
333 // virtual const stp_lite& stp_prototype(int xp) const;
334 
335 protected:
336 private:
337 
339 
340 
341  //============================================================================
343  //============================================================================
345 
346 public:
347 protected:
348 private:
349 
351 
352 
353  //============================================================================
355  //============================================================================
357 
358 public:
359 
363  virtual const std::string& class_name() const;
364 
368  static const std::string& static_class_name();
369 
373  virtual jcb_e33_lite* clone() const;
374 
379  virtual jcb_e33_lite* clone(bool xnew_state, bool xauto_access) const
380  {
381  return clone();
382  }
383 
384 protected:
385 private:
386 
388 
389 
390  //============================================================================
392  //============================================================================
394 
395 public:
396 
400  virtual bool is_ancestor_of(const any_lite& xother) const;
401 
405  bool invariant() const;
406 
410  virtual void* row_dofs();
411 
415  virtual const void* row_dofs() const;
416 
417 protected:
418 private:
419 
421 };
422 
423 
424 //==============================================================================
425 // CLASS JCB_E33
426 //==============================================================================
427 
429 
434 class SHEAF_DLL_SPEC jcb_e33 : public jcb_ed
435 {
436 
437  // ===========================================================
439  // ===========================================================
441 
442 public:
443 
447  static const poset_path& standard_schema_path();
448 
452  static void make_standard_schema(namespace_poset& xns);
453 
460  static host_type& new_host(namespace_type& xns,
461  const poset_path& xhost_path,
462  const poset_path& xschema_path,
463  const poset_path& xdomain_path,
464  const poset_path& xrange_path,
465  bool xauto_access);
466 
473  static host_type& standard_host(namespace_type& xns, const std::string& xsuffix, bool xauto_access);
474 
475 protected:
476 
477 private:
478 
480 
481 
482  //============================================================================
484  //============================================================================
486 
487 public:
488 
489  // Typedefs:
490 
494  typedef e3 domain_type;
495 
499  typedef e3 range_type;
500 
505 
510 
514  jcb_e33();
515 
520  jcb_e33(const poset_state_handle* xhost, pod_index_type xhub_id);
521 
526  jcb_e33(const poset_state_handle* xhost, const scoped_index& xid);
527 
532  jcb_e33(const poset_state_handle* xhost, const std::string& xname);
533 
537  explicit jcb_e33(abstract_poset_member* xother);
538 
543  jcb_e33(poset_state_handle* xhost, bool xauto_access = true);
544 
549  const row_dofs_type& xrdt,
550  bool xauto_access = true);
551 
555  jcb_e33& operator=(const row_dofs_type& xrdt);
556 
560  virtual jcb_e33& operator=(const abstract_poset_member& xother);
561 
565  jcb_e33& operator=(const jcb_e33& xother);
566 
570  ~jcb_e33();
571 
575  virtual const volatile_type& lite_prototype() const;
576 
580  virtual volatile_type* lite_type() const;
581 
586  operator row_dofs_type& ();
587 
592  operator const row_dofs_type& () const;
593 
594 protected:
595 private:
596 
598 
599 
600  //============================================================================
602  //============================================================================
604 
605 public:
606 protected:
607 private:
608 
610 
611 
612  //============================================================================
614  //============================================================================
616 
617 public:
618 protected:
619 private:
620 
622 
623 
624  //============================================================================
626  //============================================================================
628 
629 public:
630 
631 protected:
632 
633 private:
634 
636 
637 
638  //============================================================================
640  //============================================================================
642 
643 public:
644 
648  virtual const std::string& class_name() const;
649 
653  static const std::string& static_class_name();
654 
658  virtual jcb_e33* clone() const;
659 
665  inline jcb_e33* clone(bool xnew_state, bool xauto_access = true) const
666  {
667  return static_cast<jcb_e33*>(jcb_ed::clone(xnew_state, xauto_access));
668  }
669 
670 protected:
671 private:
672 
674 
675 
676 
677  //============================================================================
679  //============================================================================
681 
682 public:
683 
687  bool is_ancestor_of(const any* xother) const;
688 
692  bool invariant() const;
693 
694 protected:
695 private:
696 
698 };
699 
700 //==============================================================================
701 // NON-MEMBER FUNCTIONS
702 //==============================================================================
703 
707 template <typename T>
708 SHEAF_DLL_SPEC
709 std::ostream& operator<<(std::ostream& xos, const jcb_e33_row_dofs_type<T>& xrdt);
710 
711 
712 class e3;
713 class e3_lite;
714 
715 //==============================================================================
716 // JCB FACET
717 //==============================================================================
718 
719 namespace jcb_algebra
720 {
721 
722 #ifndef DOXYGEN_SKIP_UNKNOWN
723 
727 SHEAF_DLL_SPEC void push(const jcb_e33& xjcb,
728  const e3& xvector,
729  e3& xresult,
730  bool xauto_access);
731 
735 SHEAF_DLL_SPEC void push(const jcb_e33_lite& xjcb,
736  const e3_lite& xvector,
737  e3_lite& xresult);
738 
742 SHEAF_DLL_SPEC e3_lite* push(const jcb_e33_lite& xjcb, const e3_lite& xvector);
743 
744 #endif // ifndef DOXYGEN_SKIP_UNKNOWN
745 
749 SHEAF_DLL_SPEC void pull(const jcb_e33& xjcb,
750  const e3& xcovector,
751  e3& xresult,
752  bool xauto_access);
753 
757 SHEAF_DLL_SPEC void pull(const jcb_e33_lite& xjcb,
758  const e3_lite& xcovector,
759  e3_lite& xresult);
760 
764 SHEAF_DLL_SPEC e3_lite* pull(const jcb_e33_lite& xjcb, const e3_lite& xcovector);
765 
766 } // namespace jcb_algebra
767 
768 } // namespace fiber_bundle
769 
770 
771 #endif // ifndef JCB_E33_H
jcb_e33_lite volatile_type
The associated volatile type.
Definition: jcb_e33.h:509
e3 range_type
The type of range vector space.
Definition: jcb_e33.h:499
Jacobian of a map from a 3 dimensional domain (u, v, w) to a 3 dimensional Euclidean space (x...
Definition: jcb_e33.h:144
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 domain_type
The type of domain vector space.
Definition: jcb_e33.h:494
Abstract jacobian for d dimensional Euclidean space (volatile version).
Definition: jcb_ed.h:44
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...
jcb_e33_row_dofs_type< double > row_dofs_type
The type of the row dofs.
Definition: jcb_e33.h:158
general_matrix_3x3< T > matrix_type
The type of the associated matrix.
Definition: jcb_e33.h:65
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
virtual jcb_ed * clone() const
Make a new handle, no state instance of current.
Definition: jcb_ed.cc:725
T & operator[](int xindex)
Value of xindex-th component (row dof) (non const version).
Definition: jcb_e33.impl.h:82
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
virtual jcb_e33_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_e33.h:379
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).
static int d()
The dimension of the row dof components.
Definition: jcb_e33.impl.h:62
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
T dof_type
The type of the dofs.
Definition: jcb_e33.h:55
jcb_e33_row_dofs_type< double > row_dofs_type
The type of the row dofs.
Definition: jcb_e33.h:504
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
jcb_e33 * 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_e33.h:665
jcb_e33_row_dofs_type< T > row_dofs_type
The type of the row dofs (type of this).
Definition: jcb_e33.h:60
static const std::string & static_class_name()
The name of this class.
Definition: jcb_e33.impl.h:42
row_dofs_type _row_dofs
Row_dofs_type.
Definition: jcb_e33.h:264
jcb_e33_row_dofs_type< double >::matrix_type matrix_type
The type of the associated matrix.
Definition: jcb_e33.h:163
Jacobian of a map from a 3 dimensional domain (u, v, w) to a 3 dimensional Euclidean space (x...
Definition: jcb_e33.h:434
Row dofs type for class jcb_e33.
Definition: jcb_e33.h:48
An abstract space of Jacobians.
Definition: jcb_space.h:46
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
T components[9]
The dofs in the following order: components[0] => dx/du components[1] => dx/dv components[2] => dx/dw...
Definition: jcb_e33.h:127
General matrix with 3 rows and 3 columns.
Abstract jacobian for d dimensional Euclidean space (persistent version).
Definition: jcb_ed.h:185
An abstract client handle for a member of a poset.
Namespace for the fiber_bundles component of the sheaf system.
jcb_e33_row_dofs_type< T > * clone() const
Creates a new instance of the same type as this.
Definition: jcb_e33.impl.h:156
jcb_e33_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_e33.h:110