Rheolef  7.2
an efficient C++ finite element environment
sinusprod_grad.h
Go to the documentation of this file.
1 struct grad_u {
26  point operator() (const point& x) const {
27  switch (d) {
28  case 0: return point();
29  case 1: return pi*point(cos(pi*x[0]));
30  case 2: return pi*point(cos(pi*x[0])*sin(pi*x[1]),
31  sin(pi*x[0])*cos(pi*x[1]));
32  default: return pi*point(cos(pi*x[0])*sin(pi*x[1])*sin(pi*x[2]),
33  sin(pi*x[0])*cos(pi*x[1])*sin(pi*x[2]),
34  sin(pi*x[0])*sin(pi*x[1])*cos(pi*x[2]));
35  }
36  }
37  grad_u (size_t d1) : d(d1), pi(acos(Float(-1.0))) {}
38  size_t d; Float pi;
39 };
see the Float page for the full documentation
see the point page for the full documentation
size_t d
point operator()(const point &x) const
grad_u(size_t d1)