/usr/share/doc/rheolef-doc/examples/cosinusprod_grad.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 | struct grad_u : field_functor<grad_u,point> {
point operator() (const point& x) const {
return -pi*point(
sin(pi*x[0])*cos(pi*x[1])*cos(pi*x[2]),
cos(pi*x[0])*sin(pi*x[1])*cos(pi*x[2]),
cos(pi*x[0])*cos(pi*x[1])*sin(pi*x[2])); }
grad_u(size_t d1) : d(d1), pi(acos(Float(-1.0))) {}
size_t d; Float pi;
};
|