HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
LimiterVanLeer.c File Reference

van Leer limiter More...

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

Go to the source code of this file.

Functions

double LimiterVanLeer (double r)
 

Detailed Description

van Leer limiter

Author
Debojyoti Ghosh

Definition in file LimiterVanLeer.c.

Function Documentation

double LimiterVanLeer ( double  r)

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