Loading...
Searching...
No Matches
zalesak_circle.h
Go to the documentation of this file.
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;
};
Float
see the Float page for the full documentation
point
see the point page for the full documentation
phi0
Definition leveque.h:37
phi0::phi0
phi0()
Definition zalesak_circle.h:57
phi0::_phi
phi_exact _phi
Definition zalesak.h:117
phi0::operator()
Float operator()(const point &x) const
Definition leveque.h:38
phi_exact
Definition transport_dg2.h:30
phi_exact::x0
static constexpr Float x0
Definition zalesak.h:96
phi_exact::yr
static constexpr Float yr
Definition zalesak_circle.h:50
phi_exact::r
static constexpr Float r
Definition zalesak.h:98
phi_exact::y0
static constexpr Float y0
Definition zalesak.h:97
phi_exact::xr
static constexpr Float xr
Definition zalesak_circle.h:49
phi_exact::t
Float t
Definition zalesak.h:92
phi_exact::phi_exact
phi_exact(float t1)
Definition zalesak_circle.h:46
phi_exact::perimeter
Float perimeter() const
Definition zalesak_circle.h:45
phi_exact::operator()
Float operator()(const point &x) const
Definition transport_dg2.h:31
u
Definition leveque.h:25
u::operator()
point operator()(const point &x) const
Definition leveque.h:26
u::xc
static constexpr Float xc
Definition zalesak.h:36
u::period
static Float period()
Definition zalesak_circle.h:29
u::u
u()
Definition zalesak_circle.h:33
u::yc
static constexpr Float yc
Definition zalesak.h:37
u::pi
Float pi
Definition leveque.h:34