nu.h
Go to the documentation of this file.
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;
};
Float
see the Float page for the full documentation
point
see the point page for the full documentation
tensor
see the tensor page for the full documentation
mkgeo_ball.b
int b
Definition: mkgeo_ball.sh:152
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
f
Definition: cavity_dg.h:29
grad_u
Definition: combustion_exact.icc:34
nu
Definition: nu.h:26
nu::d
size_t d
Definition: nu.h:41
nu::operator()
tensor operator()(const point &grad_u) const
Definition: nu.h:27
nu::f
Function f
Definition: nu.h:40
nu::nu
nu(const Function &f1, size_t d1)
Definition: nu.h:39
phi::derivative
Float derivative(const Float &x) const
Definition: phi.h:47