Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
rotating-hill.h
Go to the documentation of this file.
1
25struct u {
26 point operator() (const point & x) const {
27 return (d == 1) ? point(u0) : point(x[1], -x[0]); }
28 u (size_t d1) : d(d1), u0 (0.5/acos(Float(-1))) {}
29 protected: size_t d; Float u0;
30};
31struct phi {
32 Float operator() (const point& x) const {
33 return exp(-4*nu*(t/t0) - dist2(x,x0t())/(t0+4*nu*t)); }
34 phi (size_t d1, Float nu1, Float t1=0) : d(d1), nu(nu1), t(t1),
35 u0 (0.5/acos(Float(-1))), x0(-0.5,0) {}
36 static Float sigma(size_t d, Float nu1, Float t=0) {
37 return 4*nu1/t0 - 2*d*nu1/(t0 + 4*nu1*t); }
38 point x0t() const {
39 if (d == 1) return point(x0[0] + u0*t);
40 return point( x0[0]*cos(t) + x0[1]*sin(t),
41 -x0[0]*sin(t) + x0[1]*cos(t)); }
42 point d_x0t_dt() const {
43 if (d == 1) return point(u0);
44 return point(-x0[0]*sin(t) + x0[1]*cos(t),
45 -x0[0]*cos(t) - x0[1]*sin(t)); }
46 protected: size_t d; Float nu, t, u0; point x0;
47 static constexpr Float t0 = 0.2;
48};
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)
Definition tensor-exp.cc:92
T dist2(const point_basic< T > &x, const point_basic< T > &y)
Definition point.h:292
Definition nu.h:26
Definition phi.h:25
size_t d
phi(size_t d1, Float nu1, Float t1=0)
Float t
point x0
Float u0
point x0t() const
static constexpr Float t0
point d_x0t_dt() const
Float nu
Float operator()(const Float &x) const
Definition phi.h:27
static Float sigma(size_t d, Float nu1, Float t=0)
Definition leveque.h:25
size_t d
point operator()(const point &x) const
Definition leveque.h:26
Float u0
u(size_t d1)