Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
leveque.h
Go to the documentation of this file.
1
25struct u {
26 point operator() (const point& x) const {
27 return cos(pi*t/tf)
28 *point (-sqr(sin(pi*x[0]))*sin(2*pi*x[1]),
29 sqr(sin(pi*x[1]))*sin(2*pi*x[0]));
30 }
31 u (size_t d, Float t1) : t(t1), pi(acos(Float(-1))) {}
32 static Float period() { return tf; }
33protected:
35 static constexpr Float tf = 8; // time period
36};
37struct phi0 {
38 Float operator() (const point& x) const {
39 return sqrt(sqr(x[0]-x0) + sqr(x[1]-y0)) - r;
40 }
41 phi0(size_t d) { check_macro(d==2, "3D: not yet, sorry"); }
42protected:
43 static constexpr Float
44 r = 0.15, // circle radius
45 x0 = 0.5, // circle center
46 y0 = 0.75;
47};
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
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
phi0(size_t d)
Definition leveque.h:41
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(size_t d, Float t1)
Definition leveque.h:31
Float pi
Definition leveque.h:34