5 #ifndef _FLUXLIMITERS_H_
6 #define _FLUXLIMITERS_H_
15 {
return max(0.,
min(1., r));}
25 return (a/b+
fabs(a/b))/(1+
fabs(a/b));
55 {
return (pow(r,2)+r)/(pow(r,2)+1.);}
65 return 1.5*(pow(a/b,2)+a/b)/(pow(a/b,2)+a/b+1.);
71 template<
class T,
class LimitFunc>
73 const T&
min,
const T&
max,
const LimitFunc& f)
79 thislc = f(-dx,x-min);
84 template<
class T,
class LimitFunc>
86 const T&
min,
const T&
max,
const LimitFunc& f)
90 thislc = f(dx/(max-x));
92 thislc = f(-dx/(x-min));
T operator()(const T r) const
double max(double x, double y)
void computeLimitCoeff(T &lc, const T x, const T &dx, const T &min, const T &max, const LimitFunc &f)
T operator()(const T a, const T b) const
void computeLimitCoeff2(T &lc, const T x, const T &dx, const T &min, const T &max, const LimitFunc &f)
Tangent fabs(const Tangent &a)
T operator()(const T a, const T b) const
double min(double x, double y)
T operator()(const T a, const T b) const