Rheolef
7.2
an efficient C++ finite element environment
Loading...
Searching...
No Matches
piola.h
Go to the documentation of this file.
1
#ifndef _RHEOLEF_PIOLA_H
2
#define _RHEOLEF_PIOLA_H
23
//
24
// piola transformation:
25
//
26
// F : hat_K ---> K
27
// hat_x +--> x = F(hat_x)
28
//
29
// i.e. map any geo_element K from a reference_element hat_K
30
//
31
#include "rheolef/tensor.h"
32
#include "rheolef/space_constant.h"
33
namespace
rheolef
{
34
35
36
// ----------------------------------------------------------------------------
37
// options for gradient computations
38
// ----------------------------------------------------------------------------
39
namespace
details {
40
41
struct
differentiate_option
{
42
typedef
enum
{
43
none
= 0,
44
gradient
= 1,
45
divergence
= 2,
46
curl
= 3
47
}
type
;
48
49
bool
symmetrized
;
// compute D(u): symmetrize grad(u) when u is a vector
50
bool
surfacic
;
// compute grad_s(u): applies also the P=I-nxn projector on the surface
51
bool
broken
;
// compute grad_h(u): applies also for discontinuous Galerkin
52
bool
batchelor_curl
;
// for computing the stream function: Batchelor trick in axisymmetric geometries
53
54
differentiate_option
()
55
:
symmetrized
(false),
56
surfacic
(false),
57
broken
(false),
58
batchelor_curl
(false)
59
{}
60
};
61
62
}
// namespace details
63
// ----------------------------------------------------------------------------
64
// the piola class
65
// ----------------------------------------------------------------------------
66
template
<
class
T>
67
struct
piola
{
68
69
typedef
typename
tensor_basic<T>::size_type
size_type
;
70
typedef
space_constant::coordinate_type
coordinate_type
;
71
72
piola
();
73
void
clear
();
74
75
// data:
76
size_type
d
,
map_d
;
77
coordinate_type
sys_coord
;
78
bool
ignore_sys_coord
;
79
point_basic<T>
F
;
80
tensor_basic<T>
DF
,
invDF
,
P
;
81
T
detDF
;
82
bool
has_nt_basis
;
// for vector-valued space with block_n boundary condition
83
point_basic<T>
normal
;
// idem
84
};
85
template
<
class
T>
86
inline
87
piola<T>::piola
()
88
:
d
(0),
89
map_d(0),
90
sys_coord(space_constant::cartesian),
91
ignore_sys_coord(false),
92
F(),
93
DF(),
94
invDF(),
95
P(),
96
detDF(0),
97
has_nt_basis(false),
98
normal
()
99
{
100
}
101
template
<
class
T>
102
inline
103
void
104
piola<T>::clear
()
105
{
106
d
= 0;
107
map_d = 0;
108
sys_coord =
space_constant::cartesian
;
109
ignore_sys_coord =
false
;
110
F =
point_basic<T>
(0,0,0);
111
DF.fill(0);
112
invDF.fill(0);
113
P.fill(0);
114
detDF = 0;
115
has_nt_basis =
false
;
116
normal
=
point_basic<T>
(0,0,0);
117
}
118
119
}
// namespace rheolef
120
#endif
// _RHEOLEF_PIOLA_H
rheolef::point_basic
Definition
point.h:86
rheolef::tensor_basic
Definition
tensor.h:90
rheolef::tensor_basic::size_type
size_t size_type
Definition
tensor.h:93
T
Expr1::float_type T
Definition
field_expr.h:230
rheolef::space_constant::coordinate_type
coordinate_type
Definition
space_constant.h:119
rheolef::space_constant::cartesian
@ cartesian
Definition
space_constant.h:120
rheolef
This file is part of Rheolef.
Definition
compiler_eigen.h:39
rheolef::normal
details::field_expr_v2_nonlinear_terminal_function< details::normal_pseudo_function< Float > > normal()
normal: see the expression page for the full documentation
Definition
field_expr_terminal.h:432
d
size_t d
Definition
neumann-laplace-lambda.cc:28
rheolef::details::differentiate_option
Definition
piola.h:41
rheolef::details::differentiate_option::symmetrized
bool symmetrized
Definition
piola.h:49
rheolef::details::differentiate_option::differentiate_option
differentiate_option()
Definition
piola.h:54
rheolef::details::differentiate_option::type
type
Definition
piola.h:42
rheolef::details::differentiate_option::divergence
@ divergence
Definition
piola.h:45
rheolef::details::differentiate_option::gradient
@ gradient
Definition
piola.h:44
rheolef::details::differentiate_option::none
@ none
Definition
piola.h:43
rheolef::details::differentiate_option::curl
@ curl
Definition
piola.h:46
rheolef::details::differentiate_option::broken
bool broken
Definition
piola.h:51
rheolef::details::differentiate_option::batchelor_curl
bool batchelor_curl
Definition
piola.h:52
rheolef::details::differentiate_option::surfacic
bool surfacic
Definition
piola.h:50
rheolef::piola
Definition
piola.h:67
rheolef::piola::coordinate_type
space_constant::coordinate_type coordinate_type
Definition
piola.h:70
rheolef::piola::P
tensor_basic< T > P
Definition
piola.h:80
rheolef::piola::d
size_type d
Definition
piola.h:76
rheolef::piola::DF
tensor_basic< T > DF
Definition
piola.h:80
rheolef::piola::sys_coord
coordinate_type sys_coord
Definition
piola.h:77
rheolef::piola::has_nt_basis
bool has_nt_basis
Definition
piola.h:82
rheolef::piola::map_d
size_type map_d
Definition
piola.h:76
rheolef::piola::size_type
tensor_basic< T >::size_type size_type
Definition
piola.h:69
rheolef::piola::detDF
T detDF
Definition
piola.h:81
rheolef::piola::invDF
tensor_basic< T > invDF
Definition
piola.h:80
rheolef::piola::ignore_sys_coord
bool ignore_sys_coord
Definition
piola.h:78
rheolef::piola::clear
void clear()
Definition
piola.h:104
rheolef::piola::F
point_basic< T > F
Definition
piola.h:79
rheolef::piola::normal
point_basic< T > normal
Definition
piola.h:83
rheolef::piola::piola
piola()
Definition
piola.h:87