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

The cosinus product function – its gradient.

The cosinus product function – its gradient

struct grad_u {
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;
};
see the Float page for the full documentation
see the point page for the full documentation
point operator()(const point &x) const