Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
zalesak_circle.h
Go to the documentation of this file.
1
25struct u {
26 point operator() (const point& x) const {
27 return point(-0.5*(x[1]-yc), 0.5*(x[0]-xc));
28 }
29 static Float period() {
30 Float pi = acos (Float(-1));
31 return 4*pi;
32 }
33 u() {}
34protected:
35 static constexpr Float
36 xc = 0.5, // rotation center
37 yc = 0.5;
38};
39struct phi_exact {
40 Float operator() (const point& x) const {
41 Float xm = xr + cos(0.5*t)*(x[0]-xr) + sin(0.5*t)*(x[1]-yr);
42 Float ym = yr - sin(0.5*t)*(x[0]-xr) + cos(0.5*t)*(x[1]-yr);
43 return sqrt(sqr(xm-x0) + sqr(ym-y0)) - r;
44 }
45 Float perimeter() const { return 2*acos(Float(-1))*r; }
46 phi_exact (float t1) : t(t1) {}
47protected:
48 Float t;
49 static constexpr Float xr = 0.5, // rotation center
50 yr = 0.5,
51 x0 = 0.50, // circle center
52 y0 = 0.75,
53 r = 0.15; // circle radius
54};
55struct phi0 {
56 Float operator() (const point& x) const { return _phi(x); }
57 phi0() : _phi(0) {}
59};
see the Float page for the full documentation
see the point page for the full documentation
Definition leveque.h:37
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
phi_exact(float t1)
Float perimeter() const
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()
static constexpr Float yc
Definition zalesak.h:37
Float pi
Definition leveque.h:34