Rheolef  7.2
an efficient C++ finite element environment
sinusrad_laplace.h
Go to the documentation of this file.
1 struct f {
26  Float operator() (const point& x) const {
27  Float r = sqrt(sqr(x[0])+sqr(x[1])+sqr(x[2]));
28  return (n == 2) ? 4 : n*n*pow(r,n-2);
29  }
30  f(size_t=0) : n(2) {}
31  size_t n;
32 };
33 struct g {
34  Float operator() (const point& x) const {
35  Float r = sqrt(sqr(x[0])+sqr(x[1])+sqr(x[2]));
36  return 1-pow(r,n);
37  }
38  g(size_t=0) : n(2) {}
39  size_t n;
40 };
see the Float page for the full documentation
see the point page for the full documentation
space_mult_list< T, M > pow(const space_basic< T, M > &X, size_t n)
Definition: space_mult.h:120
Definition: cavity_dg.h:29
point operator()(const point &x) const
Definition: cavity_dg.h:30
size_t n
f(size_t=0)
Definition: cavity_dg.h:25
point operator()(const point &x) const
Definition: cavity_dg.h:26
size_t n
g(size_t=0)
Float r
Definition: phi.h:54