Convection-diffusion equation – the rotating hill benchmark.
Convection-diffusion equation – the rotating hill benchmark
u (
size_t d1) :
d(d1),
u0 (0.5/acos(
Float(-1))) {}
};
phi (
size_t d1, Float nu1, Float t1=0) :
d(d1),
nu(nu1),
t(t1),
u0 (0.5/acos(Float(-1))),
x0(-0.5,0) {}
static Float
sigma(
size_t d, Float nu1, Float
t=0) {
return 4*nu1/
t0 - 2*
d*nu1/(
t0 + 4*nu1*
t); }
if (
d == 1)
return point(
x0[0] +
u0*
t);
return point(
x0[0]*cos(
t) +
x0[1]*sin(
t),
-
x0[0]*sin(
t) +
x0[1]*cos(
t)); }
if (
d == 1)
return point(
u0);
return point(-
x0[0]*sin(
t) +
x0[1]*cos(
t),
-
x0[0]*cos(
t) -
x0[1]*sin(
t)); }
protected:
size_t d; Float
nu,
t,
u0; point
x0;
static constexpr Float
t0 = 0.2;
};
see the Float page for the full documentation
see the point page for the full documentation
tensor_basic< T > exp(const tensor_basic< T > &a, size_t d)
T dist2(const point_basic< T > &x, const point_basic< T > &y)
phi(Float n1=2, Float c1=1, Float r1=0)
static constexpr Float t0
Float operator()(const Float &x) const
point operator()(const point &x) const