Rheolef  7.1
an efficient C++ finite element environment
piola.h
Go to the documentation of this file.
1 #ifndef _RHEOLEF_PIOLA_H
2 #define _RHEOLEF_PIOLA_H
3 //
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 
42  typedef enum {
43  none = 0,
44  gradient = 1,
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 
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 
71 
72  piola();
73  void clear();
74 
75 // data:
82  bool has_nt_basis; // for vector-valued space with block_n boundary condition
84 };
85 template<class T>
86 inline
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
105 {
106  d = 0;
107  map_d = 0;
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::tensor_basic::size_type
size_t size_type
Definition: tensor.h:93
rheolef::piola::ignore_sys_coord
bool ignore_sys_coord
Definition: piola.h:78
rheolef::piola::size_type
tensor_basic< T >::size_type size_type
Definition: piola.h:69
rheolef::piola::map_d
size_type map_d
Definition: piola.h:76
rheolef::details::differentiate_option::divergence
@ divergence
Definition: piola.h:45
rheolef::point_basic
Definition: point.h:87
rheolef::piola::invDF
tensor_basic< T > invDF
Definition: piola.h:80
rheolef::piola::F
point_basic< T > F
Definition: piola.h:79
rheolef::piola::has_nt_basis
bool has_nt_basis
Definition: piola.h:82
rheolef::piola::DF
tensor_basic< T > DF
Definition: piola.h:80
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:439
rheolef::space_constant::cartesian
@ cartesian
Definition: space_constant.h:122
rheolef::piola::piola
piola()
Definition: piola.h:87
rheolef::details::differentiate_option::none
@ none
Definition: piola.h:43
rheolef::piola::coordinate_type
space_constant::coordinate_type coordinate_type
Definition: piola.h:70
rheolef::tensor_basic
Definition: tensor.h:90
rheolef::piola::sys_coord
coordinate_type sys_coord
Definition: piola.h:77
mkgeo_ball.d
int d
Definition: mkgeo_ball.sh:154
rheolef::details::differentiate_option::symmetrized
bool symmetrized
Definition: piola.h:49
rheolef::details::differentiate_option
Definition: piola.h:41
rheolef::piola::normal
point_basic< T > normal
Definition: piola.h:83
rheolef::details::differentiate_option::curl
@ curl
Definition: piola.h:46
rheolef::piola::P
tensor_basic< T > P
Definition: piola.h:80
rheolef::details::differentiate_option::gradient
@ gradient
Definition: piola.h:44
rheolef
This file is part of Rheolef.
Definition: compiler_eigen.h:37
rheolef::piola::detDF
T detDF
Definition: piola.h:81
rheolef::details::differentiate_option::broken
bool broken
Definition: piola.h:51
mkgeo_grid.sys_coord
string sys_coord
Definition: mkgeo_grid.sh:171
rheolef::point_basic< T >
point_basic< T >
Definition: piola_fem.h:135
rheolef::piola::clear
void clear()
Definition: piola.h:104
rheolef::details::differentiate_option::differentiate_option
differentiate_option()
Definition: piola.h:54
rheolef::piola::d
size_type d
Definition: piola.h:76
rheolef::details::differentiate_option::surfacic
bool surfacic
Definition: piola.h:50
rheolef::space_constant::coordinate_type
coordinate_type
Definition: space_constant.h:121
rheolef::details::differentiate_option::type
type
Definition: piola.h:42
T
Expr1::float_type T
Definition: field_expr.h:261
rheolef::details::differentiate_option::batchelor_curl
bool batchelor_curl
Definition: piola.h:52
rheolef::piola
Definition: piola.h:67