Rheolef
7.1
an efficient C++ finite element environment
piola_fem_hdiv.cc
Go to the documentation of this file.
1
//
22
// Piola transformation for H(div,omega) approximations
23
//
24
// author: Pierre.Saramito@imag.fr
25
//
26
// date: 9 may 2019
27
//
28
// references:
29
// [1] P.-A. Raviart and J.-M. Thomas.
30
// A mixed finite element method for 2-nd order elliptic problems.
31
// in "Mathematical aspects of finite element methods",
32
// pages 292--315, Springer, 1977.
33
// [2] J. E. Roberts and J.-M. Thomas,
34
// Mixed and hybrid methods,
35
// In "Handbook of numerical analysis. Volume 2.
36
// Finite element methods (part 1)",
37
// chapter 4, Elsevier, 1991.
38
// see page 554
39
//
40
#include "
piola_fem_hdiv.h
"
41
#include "
piola_fem_grad_post.icc
"
42
namespace
rheolef
{
43
44
template
<
class
T>
45
void
46
piola_fem_hdiv<T>::transform
(
47
const
piola<T>
&
p
,
48
const
point_basic<T>
& hat_u_in,
49
point_basic<T>
&
u
)
const
50
{
51
point_basic<T>
hat_u = hat_u_in;
// avoid the aliasing problem (u,hat_u)
52
u
= (1/
p
.detDF)*(
p
.DF*hat_u);
// TODO: DVT_OPTIM_2D
53
}
54
template
<
class
T>
55
void
56
piola_fem_hdiv<T>::inv_transform
(
57
const
piola<T>
&
p
,
58
const
point_basic<T>
& u_in,
59
point_basic<T>
& hat_u)
const
60
{
61
point_basic<T>
u
= u_in;
// avoid the aliasing problem (u,hat_u)
62
hat_u =
p
.detDF*(
p
.invDF*
u
);
// TODO: DVT_OPTIM_2D
63
}
64
template
<
class
T>
65
void
66
piola_fem_hdiv<T>::grad_transform
(
67
const
piola<T>
&
p
,
68
const
point_basic<T>
& hat_u_in,
69
const
tensor_basic<T>
& hat_grad_u_in,
70
const
details::differentiate_option
& gopt,
71
tensor_basic<T>
&
grad_u
)
const
72
{
73
point_basic<T>
hat_u = hat_u_in;
// avoid the aliasing problem (u,hat_u)
74
tensor_basic<T>
hat_grad_u = hat_grad_u_in;
75
grad_u
= (1/
p
.detDF)*
p
.DF*hat_grad_u*
p
.invDF;
// TODO: DVT_OPTIM_2D
76
point_basic<T>
u
;
77
transform (
p
, hat_u,
u
);
// TODO: used only in the axi case: could be optimized
78
grad_post (
p
, gopt,
u
,
grad_u
);
79
}
80
// ----------------------------------------------------------------------------
81
// instanciation in library
82
// ----------------------------------------------------------------------------
83
#define _RHEOLEF_instanciation(T) \
84
template class piola_fem_hdiv<T>; \
85
86
_RHEOLEF_instanciation
(
Float
)
87
88
}
// namespace rheolef
rheolef::point_basic
Definition:
point.h:87
rheolef::_RHEOLEF_instanciation
_RHEOLEF_instanciation(Float, sequential, std::allocator< Float >) _RHEOLEF_instanciation(Float
rheolef::tensor_basic
Definition:
tensor.h:90
rheolef::piola_fem_hdiv::transform
void transform(const piola< T > &p, const point_basic< T > &hat_u, point_basic< T > &u) const
Definition:
piola_fem_hdiv.cc:46
p
Definition:
sphere.icc:25
piola_fem_hdiv.h
rheolef::details::differentiate_option
Definition:
piola.h:41
rheolef::piola_fem_hdiv::grad_transform
void grad_transform(const piola< T > &p, const point_basic< T > &hat_u, const tensor_basic< T > &hat_grad_u, const details::differentiate_option &gopt, tensor_basic< T > &grad_u) const
Definition:
piola_fem_hdiv.cc:66
rheolef
This file is part of Rheolef.
Definition:
compiler_eigen.h:37
u
Definition:
leveque.h:25
piola_fem_grad_post.icc
Float
see the Float page for the full documentation
u
Float u(const point &x)
Definition:
transmission_error.cc:26
rheolef::piola_fem_hdiv::inv_transform
void inv_transform(const piola< T > &p, const point_basic< T > &u, point_basic< T > &hat_u) const
Definition:
piola_fem_hdiv.cc:56
grad_u
Definition:
combustion_exact.icc:34
rheolef::piola
Definition:
piola.h:67