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

The sinus product function – right-hand-side and boundary condition for the Poisson problem with Neumann boundary condition.

The sinus product function – right-hand-side and boundary condition for the Poisson problem with Neumann boundary condition

#include "sinusprod.h"
struct f {
Float operator() (const point& x) const { return d*sqr(pi)*_u(x); }
f(size_t d1) : d(d1), _u(d1), pi(acos(Float(-1))) {}
size_t d;
};
struct g {
Float operator() (const point& x) const {
switch (d) {
case 0: return 0;
case 1: return -pi;
case 2: return -pi*(sin(pi*x[0]) + sin(pi*x[1]));
default: return -pi*( sin(pi*x[0])*sin(pi*x[1])
+ sin(pi*x[1])*sin(pi*x[2])
+ sin(pi*x[2])*sin(pi*x[0]));
}
}
g(size_t d1) : d(d1), pi(acos(Float(-1))) {}
size_t d; Float pi;
};
see the Float page for the full documentation
see the point page for the full documentation
The sinus product function.
Definition cavity_dg.h:29
point operator()(const point &x) const
Definition cavity_dg.h:30
f()
Definition taylor.h:34
const Float pi
u_exact _u
Definition cavity_dg.h:25
size_t d
point operator()(const point &x) const
Definition cavity_dg.h:26
g()
Definition taylor.h:29
const Float pi