Rheolef
7.1
an efficient C++ finite element environment
nu.h
Go to the documentation of this file.
1
template
<
class
Function>
26
struct
nu
{
27
tensor
operator()
(
const
point
&
grad_u
)
const
{
28
Float
x2 =
norm2
(
grad_u
);
29
Float
a
=
f
(x2);
30
Float
b
= 2*
f
.derivative(x2);
31
tensor
value;
32
for
(
size_t
i = 0; i <
d
; i++) {
33
value(i,i) =
a
+
b
*
grad_u
[i]*
grad_u
[i];
34
for
(
size_t
j = 0; j < i; j++)
35
value(j,i) = value(i,j) =
b
*
grad_u
[i]*
grad_u
[j];
36
}
37
return
value;
38
}
39
nu
(
const
Function& f1,
size_t
d1) :
f
(f1),
d
(d1) {}
40
Function
f
;
41
size_t
d
;
42
};
tensor
see the tensor page for the full documentation
mkgeo_ball.b
int b
Definition:
mkgeo_ball.sh:152
nu
Definition:
nu.h:26
nu::operator()
tensor operator()(const point &grad_u) const
Definition:
nu.h:27
rheolef::norm2
T norm2(const vec< T, M > &x)
norm2(x): see the expression page for the full documentation
Definition:
vec.h:379
a
Definition:
diffusion_isotropic.h:25
Float
see the Float page for the full documentation
nu::d
size_t d
Definition:
nu.h:41
point
see the point page for the full documentation
nu::f
Function f
Definition:
nu.h:40
f
Definition:
cavity_dg.h:29
nu::nu
nu(const Function &f1, size_t d1)
Definition:
nu.h:39
grad_u
Definition:
combustion_exact.icc:34