HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
limiters.h File Reference

Definitions for limiter functions used in MUSCL-type reconstruction schemes. More...

Go to the source code of this file.

Macros

#define _LIM_GM_   "gmm"
 
#define _LIM_MM_   "minmod"
 
#define _LIM_VANLEER_   "vanleer"
 
#define _LIM_SUPERBEE_   "superbee"
 

Functions

double LimiterGeneralizedMinMod (double)
 
double LimiterMinMod (double)
 
double LimiterVanLeer (double)
 
double LimiterSuperBee (double)
 

Detailed Description

Definitions for limiter functions used in MUSCL-type reconstruction schemes.

Author
Debojyoti Ghosh

Definition in file limiters.h.

Macro Definition Documentation

◆ _LIM_GM_

#define _LIM_GM_   "gmm"

Generalized MinMod Limiter: LimiterGeneralizedMinMod()

Definition at line 10 of file limiters.h.

◆ _LIM_MM_

#define _LIM_MM_   "minmod"

MinMod Limiter: LimiterMinMod()

Definition at line 12 of file limiters.h.

◆ _LIM_VANLEER_

#define _LIM_VANLEER_   "vanleer"

van Leer Limiter: LimiterVanLeer()

Definition at line 14 of file limiters.h.

◆ _LIM_SUPERBEE_

#define _LIM_SUPERBEE_   "superbee"

Superbee Limiter: LimiterSuperBee()

Definition at line 16 of file limiters.h.

Function Documentation

◆ LimiterGeneralizedMinMod()

double LimiterGeneralizedMinMod ( double  r)

Generalized MinMod Limiter

Generalized MinMod limiter

Reference:

  • Van Leer, B. (1979), "Towards the ultimate conservative difference scheme V. A second order sequel to Godunov's method", J. Comput. Phys., 32: 101–136, doi:10.1016/0021-9991(79)90145-1
Parameters
rInput slope ratio

Definition at line 16 of file LimiterGeneralizedMinMod.c.

19 {
20  double theta = 1.0;
21  double retval = max(0.0,min3(theta*r,0.5*(1.0+r),theta));
22  return retval;
23 }
#define max(a, b)
Definition: math_ops.h:18
#define min3(a, b, c)
Definition: math_ops.h:23

◆ LimiterMinMod()

double LimiterMinMod ( double  r)

MinMod Limiter

MinMod limiter

Reference:

  • Roe, P.L. (1986), "Characteristic-based schemes for the Euler equations", Annu. Rev. Fluid Mech., 18: 337–365, doi:10.1146/annurev.fl.18.010186.002005
Parameters
rInput slope ratio

Definition at line 16 of file LimiterMinMod.c.

19 {
20  double retval = max(0.0,min(1.0,r));
21  return retval;
22 }
#define min(a, b)
Definition: math_ops.h:14
#define max(a, b)
Definition: math_ops.h:18

◆ LimiterVanLeer()

double LimiterVanLeer ( double  r)

van Leer Limiter

van Leer limiter

Reference:

  • Van Leer, B. (1974), "Towards the ultimate conservative difference scheme II. Monotonicity and conservation combined in a second order scheme", J. Comput. Phys., 14 (4): 361–370, doi:10.1016/0021-9991(74)90019-9
Parameters
rInput slope ratio

Definition at line 17 of file LimiterVanLeer.c.

20 {
21  double retval = (r+absolute(r)) / (1.0+absolute(r));
22  return retval;
23 }
#define absolute(a)
Definition: math_ops.h:32

◆ LimiterSuperBee()

double LimiterSuperBee ( double  r)

Superbee Limiter

Superbee limiter

Reference:

  • Roe, P.L. (1986), "Characteristic-based schemes for the Euler equations", Annu. Rev. Fluid Mech., 18: 337–365, doi:10.1146/annurev.fl.18.010186.002005
Parameters
rInput slope ratio

Definition at line 16 of file LimiterSuperBee.c.

19 {
20  double retval = max3(0, min(2*r,1), min(r,2));
21  return retval;
22 }
#define max3(a, b, c)
Definition: math_ops.h:27
#define min(a, b)
Definition: math_ops.h:14