Loading...
Searching...
No Matches
sinusprod_grad.h

The sinus product function – its gradient.

The sinus product function – its gradient

struct grad_u {
point operator() (const point& x) const {
switch (d) {
case 0: return point();
case 1: return pi*point(cos(pi*x[0]));
case 2: return pi*point(cos(pi*x[0])*sin(pi*x[1]),
sin(pi*x[0])*cos(pi*x[1]));
default: return pi*point(cos(pi*x[0])*sin(pi*x[1])*sin(pi*x[2]),
sin(pi*x[0])*cos(pi*x[1])*sin(pi*x[2]),
sin(pi*x[0])*sin(pi*x[1])*cos(pi*x[2]));
}
}
grad_u (size_t d1) : d(d1), pi(acos(Float(-1.0))) {}
size_t d; Float pi;
};
Float
see the Float page for the full documentation
point
see the point page for the full documentation
grad_u
tensor grad_u
Definition diffusion_transport_tensor_exact.icc:26
d
size_t d
Definition neumann-laplace-lambda.cc:28
grad_u
Definition combustion_exact.icc:34
grad_u::d
size_t d
Definition cosinusprod_grad.h:32
grad_u::operator()
point operator()(const point &x) const
Definition combustion_exact.icc:35
grad_u::pi
Float pi
Definition cosinusprod_grad.h:32