rheolef  7.0
characteristic.h
Go to the documentation of this file.
1 #ifndef _RHEO_CHARACTERISTIC_H
2 #define _RHEO_CHARACTERISTIC_H
3 #include "rheolef/field.h"
4 #include "rheolef/quadrature.h"
5 #include "rheolef/basis_on_pointset.h"
6 
7 namespace rheolef {
8 
9 template <class T, class M>
12  : _qopt (qopt1),
13  _quad (),
15  _ie2dis_ix (),
16  _hat_y (),
17  _yq ()
18  {}
19 
21  : _qopt (x._qopt),
22  _quad (), // OK: DO NOT COPY !
24  _ie2dis_ix (),
25  _hat_y (),
26  _yq ()
27  {
28  error_macro ("physical copy of characteristic_on_quadrature_rep may not happened");
29  }
30 
31 public:
34  basis_on_pointset<T> _piola_on_quad;
38 };
39 template <class T, class M>
40 class characteristic_on_quadrature : public smart_pointer<characteristic_on_quadrature_rep<T,M> > {
41 public:
46  : base (new_macro(rep(qopt)))
47  {}
48 };
49 template<class T, class M>
51 public:
52  typedef std::map<std::string,characteristic_on_quadrature<T,M> > map_type;
53 
54 
56 
57 
58  const field_basic<T,M>& get_displacement() const { return _dh; }
59 
61  get_pre_computed (
62  const space_basic<T,M>& Xh,
63  const field_basic<T,M>& dh,
64  const quadrature_option& qopt) const;
65 
66 protected:
68  mutable map_type _coq_map;
69 };
70 
123 template<class T, class M = rheo_default_memory_model>
124 class characteristic_basic : public smart_pointer<characteristic_rep<T,M> > {
125 public:
128 
129 
131 
132 
133  const field_basic<T,M>& get_displacement() const;
134 
136  get_pre_computed (
137  const space_basic<T,M>& Xh,
138  const field_basic<T,M>& dh,
139  const quadrature_option& qopt) const;
140 
141 };
143 @endcode
144 
145 template<class T, class M>
146 inline
148  : base (new_macro(rep(dh)))
149 {
150 }
151 template<class T, class M>
152 inline
153 const field_basic<T,M>&
155 {
156  return base::data().get_displacement();
157 }
158 template<class T, class M>
159 inline
162  const space_basic<T,M>& Xh,
163  const field_basic<T,M>& dh,
164  const quadrature_option& qopt) const
165 {
166  return base::data().get_pre_computed (Xh,dh,qopt);
167 }
168 template<class T, class M>
170 public:
171 
172 
174  : _uh(uh), _X(X) {}
175 
176 
177  const field_basic<T,M>& get_field() const { return _uh; }
178  const characteristic_basic<T,M>& get_characteristic() const { return _X; }
179 
180 protected:
183 };
184 
185 }// namespace rheolef
186 #endif // _RHEO_CHARACTERISTIC_H
disarray< point_basic< T >, M > _hat_y
field_basic< T, M > _dh
#define error_macro(message)
Definition: compiler.h:100
#define new_macro(obj)
Definition: compiler.h:361
field - piecewise polynomial finite element field
characteristic_basic(const field_basic< T, M > &dh)
characteristic_basic< T, M > _X
characteristic_rep< T, M > rep
characteristic_on_quadrature_rep(const characteristic_on_quadrature_rep< T, M > &x)
quadrature_option - send options to the integrate function
const field_basic< T, M > & get_displacement() const
characteristic_on_quadrature_rep(quadrature_option qopt1=quadrature_option(quadrature_option::max_family, 0))
irheostream, orheostream - large data streams
Definition: compiler.h:7
const field_basic< T, M > & get_displacement() const
const characteristic_basic< T, M > & get_characteristic() const
field_o_characteristic(const field_basic< T, M > &uh, const characteristic_basic< T, M > &X)
space – piecewise polynomial finite element space
Definition: space.h:229
smart_pointer< rep > base
const field_basic< T, M > & get_field() const
characteristic_on_quadrature_rep< T, M > rep
disarray< point_basic< T >, M > _yq
characteristic_basic< Float > characteristic
std::map< std::string, characteristic_on_quadrature< T, M > > map_type
const characteristic_on_quadrature< T, M > & get_pre_computed(const space_basic< T, M > &Xh, const field_basic< T, M > &dh, const quadrature_option &qopt) const
Expr1::memory_type M
Definition: vec_expr_v2.h:310
characteristic - the Lagrange-Galerkin method implemented