Rheolef
7.1
an efficient C++ finite element environment
leveque.h
Go to the documentation of this file.
1
struct
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
; }
33
protected
:
34
Float
t
,
pi
;
35
static
constexpr
Float
tf
= 8;
// time period
36
};
37
struct
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"
); }
42
protected
:
43
static
constexpr
Float
44
r
= 0.15,
// circle radius
45
x0
= 0.5,
// circle center
46
y0
= 0.75;
47
};
u::operator()
point operator()(const point &x) const
Definition:
leveque.h:26
check_macro
check_macro(expr1.have_homogeneous_space(Xh1), "dual(expr1,expr2); expr1 should have homogeneous space. HINT: use dual(interpolate(Xh, expr1),expr2)")
u::tf
static constexpr Float tf
Definition:
leveque.h:35
u::pi
Float pi
Definition:
leveque.h:34
phi0::r
static constexpr Float r
Definition:
leveque.h:44
mkgeo_ball.d
int d
Definition:
mkgeo_ball.sh:154
phi0::x0
static constexpr Float x0
Definition:
leveque.h:45
phi0::operator()
Float operator()(const point &x) const
Definition:
leveque.h:38
phi0::y0
static constexpr Float y0
Definition:
leveque.h:46
u::period
static Float period()
Definition:
leveque.h:32
u::d
size_t d
Definition:
rotating-hill.h:29
phi0
Definition:
leveque.h:37
u
Definition:
leveque.h:25
u::t
Float t
Definition:
leveque.h:34
Float
see the Float page for the full documentation
point
see the point page for the full documentation
phi0::phi0
phi0(size_t d)
Definition:
leveque.h:41
u::u
u(size_t d, Float t1)
Definition:
leveque.h:31