Rheolef
7.1
an efficient C++ finite element environment
nu.h
The p-Laplacian problem – the nu function
template
<
class
Function>
struct
nu
{
tensor
operator()
(
const
point
&
grad_u
)
const
{
Float
x2 =
norm2
(
grad_u
);
Float
a
=
f
(x2);
Float
b
= 2*
f
.derivative(x2);
tensor
value;
for
(
size_t
i = 0; i <
d
; i++) {
value(i,i) =
a
+
b
*
grad_u
[i]*
grad_u
[i];
for
(
size_t
j = 0; j < i; j++)
value(j,i) = value(i,j) =
b
*
grad_u
[i]*
grad_u
[j];
}
return
value;
}
nu
(
const
Function& f1,
size_t
d1) :
f
(f1),
d
(d1) {}
Function
f
;
size_t
d
;
};
tensor
see the tensor page for the full documentation
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
mkgeo_ball.b
b
Definition:
mkgeo_ball.sh:152
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