HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
LimiterGeneralizedMinMod.c File Reference

Generalized MinMod limiter. More...

#include <mathfunctions.h>
#include <limiters.h>

Go to the source code of this file.

Functions

double LimiterGeneralizedMinMod (double r)
 

Detailed Description

Generalized MinMod limiter.

Author
Debojyoti Ghosh

Definition in file LimiterGeneralizedMinMod.c.

Function Documentation

◆ LimiterGeneralizedMinMod()

double LimiterGeneralizedMinMod ( double  r)

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