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"
33namespace rheolef {
34
35
36// ----------------------------------------------------------------------------
37// options for gradient computations
38// ----------------------------------------------------------------------------
39namespace details {
40
42 typedef enum {
43 none = 0,
46 curl = 3
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// ----------------------------------------------------------------------------
66template<class T>
67struct 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};
85template<class T>
86inline
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}
101template<class T>
102inline
103void
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
Expr1::float_type T
Definition field_expr.h:230
This file is part of Rheolef.
details::field_expr_v2_nonlinear_terminal_function< details::normal_pseudo_function< Float > > normal()
normal: see the expression page for the full documentation
space_constant::coordinate_type coordinate_type
Definition piola.h:70
tensor_basic< T > P
Definition piola.h:80
size_type d
Definition piola.h:76
tensor_basic< T > DF
Definition piola.h:80
coordinate_type sys_coord
Definition piola.h:77
bool has_nt_basis
Definition piola.h:82
size_type map_d
Definition piola.h:76
tensor_basic< T >::size_type size_type
Definition piola.h:69
tensor_basic< T > invDF
Definition piola.h:80
bool ignore_sys_coord
Definition piola.h:78
void clear()
Definition piola.h:104
point_basic< T > F
Definition piola.h:79
point_basic< T > normal
Definition piola.h:83