Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
harten.h

The Burgers problem: the Harten exact solution.

The Burgers problem: the Harten exact solution

#include "harten0.h"
struct harten {
Float operator() (const point& x) const {
Float x0 = x[0]-a*t+c;
Float shift = -2*floor((x0+1)/2);
Float xs = x0 + shift;
check_macro (xs >= -1 && xs <= 1, "invalid xs="<<xs);
return a + b*h0 (point(xs));
}
harten (Float t1=0, Float a1=1, Float b1=0.5, Float c1=0):
h0(b1*t1), t(t1), a(a1), b(b1), c(c1) {}
Float M() const { Float pi = acos(-1.0); return sqr(pi)*b; }
Float min() const { return a-b; }
Float max() const { return a+b; }
protected:
Float t, a, b, c;
};
using u_init = harten;
using g = harten;
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)")
The Burgers problem: the Harten exact solution at t=0.
Definition cavity_dg.h:25
Float b
Definition harten.h:41
Float min() const
Definition harten.h:37
Float a
Definition harten.h:41
Float c
Definition harten.h:41
Float t
Definition harten.h:41
Float max() const
Definition harten.h:38
Float M() const
Definition harten.h:36
harten0 h0
Definition harten.h:40
Float operator()(const point &x) const
Definition harten.h:27