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

The Zalesak full disk benchmark – the exact solution.

The Zalesak full disk benchmark – the exact solution

struct u {
point operator() (const point& x) const {
return point(-0.5*(x[1]-yc), 0.5*(x[0]-xc));
}
static Float period() {
Float pi = acos (Float(-1));
return 4*pi;
}
u() {}
protected:
static constexpr Float
xc = 0.5, // rotation center
yc = 0.5;
};
struct phi_exact {
Float operator() (const point& x) const {
Float xm = xr + cos(0.5*t)*(x[0]-xr) + sin(0.5*t)*(x[1]-yr);
Float ym = yr - sin(0.5*t)*(x[0]-xr) + cos(0.5*t)*(x[1]-yr);
return sqrt(sqr(xm-x0) + sqr(ym-y0)) - r;
}
Float perimeter() const { return 2*acos(Float(-1))*r; }
phi_exact (float t1) : t(t1) {}
protected:
static constexpr Float xr = 0.5, // rotation center
yr = 0.5,
x0 = 0.50, // circle center
y0 = 0.75,
r = 0.15; // circle radius
};
struct phi0 {
Float operator() (const point& x) const { return _phi(x); }
phi0() : _phi(0) {}
};
see the Float page for the full documentation
see the point page for the full documentation
Definition leveque.h:37
phi0()
Definition zalesak.h:116
phi_exact _phi
Definition zalesak.h:117
Float operator()(const point &x) const
Definition leveque.h:38
static constexpr Float x0
Definition zalesak.h:96
static constexpr Float yr
static constexpr Float r
Definition zalesak.h:98
static constexpr Float y0
Definition zalesak.h:97
static constexpr Float xr
Float t
Definition zalesak.h:92
Float perimeter() const
Definition zalesak.h:82
Float operator()(const point &x) const
Definition leveque.h:25
point operator()(const point &x) const
Definition leveque.h:26
static constexpr Float xc
Definition zalesak.h:36
static Float period()
Definition leveque.h:32
u()
Definition zalesak.h:33
static constexpr Float yc
Definition zalesak.h:37
Float pi
Definition leveque.h:34