Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
characteristic.h
Go to the documentation of this file.
1#ifndef _RHEO_CHARACTERISTIC_H
2#define _RHEO_CHARACTERISTIC_H
3//
4// This file is part of Rheolef.
5//
6// Copyright (C) 2000-2009 Pierre Saramito <Pierre.Saramito@imag.fr>
7//
8// Rheolef is free software; you can redistribute it and/or modify
9// it under the terms of the GNU General Public License as published by
10// the Free Software Foundation; either version 2 of the License, or
11// (at your option) any later version.
12//
13// Rheolef is distributed in the hope that it will be useful,
14// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16// GNU General Public License for more details.
17//
18// You should have received a copy of the GNU General Public License
19// along with Rheolef; if not, write to the Free Software
20// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21//
22// =========================================================================
23
24namespace rheolef {
106} // namespace rheolef
107
108#include "rheolef/field.h"
109#include "rheolef/piola_on_pointset.h"
110
111namespace rheolef {
112
113// -------------------------------------------------------------------
114// characteristic_on_quadrature: store the localization in mesh of the
115// quadrature point tacking: y = x + d(x) : that belongs in K as hat_y
116// -------------------------------------------------------------------
117template <class T, class M>
119// allocators:
120 characteristic_on_quadrature_rep (quadrature_option qopt1 = quadrature_option(quadrature_option::max_family,0))
121 : _qopt (qopt1),
122 _quad (),
124 _ie2dis_ix (),
125 _hat_y (),
126 _yq ()
127 {}
128
130 : _qopt (x._qopt),
131 _quad (), // OK: DO NOT COPY !
133 _ie2dis_ix (),
134 _hat_y (),
135 _yq ()
136 {
137 error_macro ("physical copy of characteristic_on_quadrature_rep may not happened");
138 }
139
140public:
141// data:
142 quadrature_option _qopt;
148};
149template <class T, class M>
150class characteristic_on_quadrature : public smart_pointer<characteristic_on_quadrature_rep<T,M> > {
151public:
152// typedefs:
155// allocator:
157 (quadrature_option qopt = quadrature_option(quadrature_option::max_family,0))
158 : base (new_macro(rep(qopt)))
159 {}
160// data:
161};
162// -------------------------------------------------------------------
163// characteristic_rep: store a list of characteristic_on_quadrature(s)
164// together with the displacement field dh
165// -------------------------------------------------------------------
166template<class T, class M>
168public:
169 typedef std::map<std::string,characteristic_on_quadrature<T,M> > map_type;
170
171// allocator:
172
174
175// accesor:
176
177 const field_basic<T,M>& get_displacement() const { return _dh; }
178
181 const space_basic<T,M>& Xh,
182 const field_basic<T,M>& dh,
183 const piola_on_pointset<T>& pops) const;
184
185// data:
186protected:
189};
190
191
192// [verbatim_characteristic_basic]
193template<class T, class M = rheo_default_memory_model>
194class characteristic_basic : public smart_pointer<characteristic_rep<T,M> > {
195public:
198
199// allocator:
200
202
203// accesors:
204
206// [verbatim_characteristic_basic]
207
210 const space_basic<T,M>& Xh,
211 const field_basic<T,M>& dh,
212 const piola_on_pointset<T>& pops) const;
213// [verbatim_characteristic_basic_cont]
214};
215// [verbatim_characteristic_basic_cont]
216
217// [verbatim_characteristic]
218typedef characteristic_basic<Float> characteristic;
219// [verbatim_characteristic]
220
221template<class T, class M>
222inline
227template<class T, class M>
228inline
229const field_basic<T,M>&
231{
232 return base::data().get_displacement();
233}
234template<class T, class M>
235inline
238 const space_basic<T,M>& Xh,
239 const field_basic<T,M>& dh,
240 const piola_on_pointset<T>& pops) const
241{
242 return base::data().get_pre_computed (Xh,dh,pops);
243}
244// ===========================================================================
245// the temporary class returned by compose (phi_h,X)
246// ===========================================================================
247template<class T, class M>
249public:
250
251// allocator:
252
255
256// accesor:
257
258 const field_basic<T,M>& get_field() const { return _uh; }
260
261// data:
262protected:
265};
266
267}// namespace rheolef
268#endif // _RHEO_CHARACTERISTIC_H
const field_basic< T, M > & get_displacement() const
characteristic_rep< T, M > rep
const characteristic_on_quadrature< T, M > & get_pre_computed(const space_basic< T, M > &Xh, const field_basic< T, M > &dh, const piola_on_pointset< T > &pops) const
characteristic_basic(const field_basic< T, M > &dh)
characteristic_on_quadrature_rep< T, M > rep
characteristic_on_quadrature(quadrature_option qopt=quadrature_option(quadrature_option::max_family, 0))
const field_basic< T, M > & get_displacement() const
const characteristic_on_quadrature< T, M > & get_pre_computed(const space_basic< T, M > &Xh, const field_basic< T, M > &dh, const piola_on_pointset< T > &pops) const
std::map< std::string, characteristic_on_quadrature< T, M > > map_type
see the disarray page for the full documentation
Definition disarray.h:497
characteristic_basic< T, M > _X
const characteristic_basic< T, M > & get_characteristic() const
const field_basic< T, M > & get_field() const
field_o_characteristic(const field_basic< T, M > &uh, const characteristic_basic< T, M > &X)
see the smart_pointer page for the full documentation
the finite element space
Definition space.h:382
characteristic_basic< Float > characteristic
#define error_macro(message)
Definition dis_macros.h:49
This file is part of Rheolef.
characteristic_on_quadrature_rep(quadrature_option qopt1=quadrature_option(quadrature_option::max_family, 0))
disarray< point_basic< T >, M > _hat_y
disarray< point_basic< T >, M > _yq
characteristic_on_quadrature_rep(const characteristic_on_quadrature_rep< T, M > &x)
Expr1::memory_type M