4
/// This file is part of Rheolef.
6
/// Copyright (C) 2000-2009 Pierre Saramito <Pierre.Saramito@imag.fr>
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.
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.
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
22
/// =========================================================================
24
#include "rheolef/form_element.h"
28
NAME: @code{2D} -- rate of deformation tensor
30
@cindex rate of deformation tensor
40
form (const space V, const space& T, "2D");
44
Assembly the form associated to the rate of deformation
45
tensor, i.e. the symmetric part of the gradient of a
47
These derivative are usefull in fluid mechanic and
52
b({\bf u},\tau) = \int_\Omega
53
2D({\bf u}) : \, \tau \, dx,
54
\forall u \in V \ {\rm and }\ q \in T.
58
2 D({\bf u}) = \nabla {\bf u} + \nabla {\bf u}^T
66
b(u,tau) = | 2 D(u) : tau dx,
72
2 D(u) = grad u + (grad u)^T
77
If the V space is a vector-valued @code{P1} (resp. @code{P2})
78
finite element space, the T space may be
79
a tensor-valued @code{P0} (resp. @code{P1d}) one.
83
The following piece of code build the Laplacian form
84
associated to the P1 approximation:
87
space V (omega, "P1", "vector");
88
space T (omega, "P0", "tensor");
92
LMC-IMAG, 38041 Grenoble cedex 9, France
93
| Pierre.Saramito@imag.fr
100
template<class T, class M>
101
class _2D: public form_element_rep<T,M> {
103
typedef form_element_rep<T,M> base;
104
typedef typename base::size_type size_type;
105
typedef typename base::geo_type geo_type;
106
typedef typename base::space_type space_type;
110
_2D (const space_type& X, const space_type& Y, const geo_type& omega,
111
const quadrature_option_type& qopt)
112
: form_element_rep<T,M> (X,Y,omega,qopt) { base::initialize_all(); }
114
void operator() (const geo_element& K, ublas::matrix<T>& m) const;
115
void initialize () const;
116
bool is_symmetric () const { return false; }
119
}// namespace rheolef
120
#endif // _RHEOLEF_TWO_D_H