Rheolef
7.1
an efficient C++ finite element environment
zalesak_circle.h
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
:
Float
t
;
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) {}
phi_exact
_phi
;
};
u::operator()
point operator()(const point &x) const
Definition:
leveque.h:26
phi_exact::phi_exact
phi_exact(Float w1)
Definition:
transport_dg2.h:32
u::xc
static constexpr Float xc
Definition:
zalesak.h:36
u::pi
Float pi
Definition:
leveque.h:34
phi_exact::perimeter
Float perimeter() const
Definition:
zalesak.h:82
phi0::operator()
Float operator()(const point &x) const
Definition:
leveque.h:38
phi_exact
Definition:
transport_dg2.h:30
u::u
u()
Definition:
zalesak.h:33
u::period
static Float period()
Definition:
leveque.h:32
phi0::phi0
phi0()
Definition:
zalesak.h:116
phi_exact::yr
static constexpr Float yr
Definition:
zalesak_circle.h:50
phi_exact::t
Float t
Definition:
zalesak.h:92
phi_exact::operator()
Float operator()(const point &x) const
Definition:
transport_dg2.h:31
phi0::_phi
phi_exact _phi
Definition:
zalesak.h:117
phi0
Definition:
leveque.h:37
phi_exact::xr
static constexpr Float xr
Definition:
zalesak_circle.h:49
phi_exact::y0
static constexpr Float y0
Definition:
zalesak.h:97
u
Definition:
leveque.h:25
Float
see the Float page for the full documentation
point
see the point page for the full documentation
u::yc
static constexpr Float yc
Definition:
zalesak.h:37
phi_exact::r
static constexpr Float r
Definition:
zalesak.h:98
phi_exact::x0
static constexpr Float x0
Definition:
zalesak.h:96