Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
nu.h

The p-Laplacian problem – the nu function.

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;
};
see the Float page for the full documentation
see the point page for the full documentation
see the tensor page for the full documentation
Definition cavity_dg.h:29
Definition nu.h:26
size_t d
Definition nu.h:41
tensor operator()(const point &grad_u) const
Definition nu.h:27
Function f
Definition nu.h:40
Float derivative(const Float &x) const
Definition phi.h:47