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

The Leveque benchmark – function definition.

The Leveque benchmark – function definition

struct u {
point operator() (const point& x) const {
return cos(pi*t/tf)
*point (-sqr(sin(pi*x[0]))*sin(2*pi*x[1]),
sqr(sin(pi*x[1]))*sin(2*pi*x[0]));
}
u (size_t d, Float t1) : t(t1), pi(acos(Float(-1))) {}
static Float period() { return tf; }
protected:
static constexpr Float tf = 8; // time period
};
struct phi0 {
Float operator() (const point& x) const {
return sqrt(sqr(x[0]-x0) + sqr(x[1]-y0)) - r;
}
phi0(size_t d) { check_macro(d==2, "3D: not yet, sorry"); }
protected:
static constexpr Float
r = 0.15, // circle radius
x0 = 0.5, // circle center
y0 = 0.75;
};
see the Float page for the full documentation
see the point page for the full documentation
check_macro(expr1.have_homogeneous_space(Xh1), "dual(expr1,expr2); expr1 should have homogeneous space. HINT: use dual(interpolate(Xh, expr1),expr2)")
Definition leveque.h:37
phi0()
Definition zalesak.h:116
static constexpr Float r
Definition leveque.h:44
static constexpr Float y0
Definition leveque.h:46
static constexpr Float x0
Definition leveque.h:45
Float operator()(const point &x) const
Definition leveque.h:38
Definition leveque.h:25
static constexpr Float tf
Definition leveque.h:35
size_t d
point operator()(const point &x) const
Definition leveque.h:26
Float t
Definition leveque.h:34
static Float period()
Definition leveque.h:32
u()
Definition zalesak.h:33
Float pi
Definition leveque.h:34