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

The sinus product function.

The sinus product function

struct u_exact {
Float operator() (const point& x) const {
switch (d) {
case 0: return 0;
case 1: return sin(pi*x[0]);
case 2: return sin(pi*x[0])*sin(pi*x[1]);
default: return sin(pi*x[0])*sin(pi*x[1])*sin(pi*x[2]);
}
}
u_exact(size_t d1=0) : 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
Float pi
Definition cosinusprod.h:29