/usr/share/doc/rheolef-doc/examples/nu.icc is in rheolef-doc 6.5-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | template<class Function>
struct nu : std::unary_function<point,tensor> {
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, Float d1) : f(f1), d(d1) {}
Function f;
size_t d;
};
|