Alamo
Superbee.H
Go to the documentation of this file.
1#ifndef NUMERIC_ADVECT_LIMITER_SUPERBEE_H
2#define NUMERIC_ADVECT_LIMITER_SUPERBEE_H
3
4#include "IO/ParmParse.H"
5#include "Util/Util.H"
6
7namespace Numeric
8{
9namespace Advect
10{
11namespace Limiter
12{
14{
15public:
16 static constexpr const char* name = "superbee";
17
18 AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE
20 {
21 Set::Scalar dl = mid - lo;
22 Set::Scalar dr = hi - mid;
23 Set::Scalar slope_a = Util::MinMod(Set::Scalar(2.0) * dl, dr);
24 Set::Scalar slope_b = Util::MinMod(dl, Set::Scalar(2.0) * dr);
25 return Util::Abs(slope_a) > Util::Abs(slope_b) ? slope_a : slope_b;
26 }
27
28 void Parse(Superbee & /*value*/, IO::ParmParse &/*pp*/) {}
29};
30}
31}
32}
33
34#endif
AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE Set::Scalar operator()(Set::Scalar lo, Set::Scalar mid, Set::Scalar hi) const
Definition Superbee.H:19
void Parse(Superbee &, IO::ParmParse &)
Definition Superbee.H:28
static constexpr const char * name
Definition Superbee.H:16
This namespace contains some numerical tools.
Definition Advect.H:14
amrex::Real Scalar
Definition Base.H:19
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T MinMod(T a, T b)
Definition Util.H:404
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T Abs(T a)
Definition Util.H:362