Memosa-FVM  0.2
SuperbeeLimiter Struct Reference

#include <Limiters.h>

Public Member Functions

template<class T >
operator() (const T a, const T b) const
 

Detailed Description

Definition at line 26 of file Limiters.h.

Member Function Documentation

template<class T >
T SuperbeeLimiter::operator() ( const T  a,
const T  b 
) const
inline

Definition at line 29 of file Limiters.h.

30  {
31  if(b!=0.)
32  {
33  //T r = (4.*(a/b))-1.;
34  //return max(0., max(min(1., 2.*a/b), min(2., a/b)));
35  //return max(0., max(min(1., a/b), min(2., a/(2.*b))));
36  //return max(0., max(min(1., 2.*r), min(2., r)));
37  //if (b < T(2.0)*a)
38  //return (NumTypeTraits<T>::getUnity());
39 
40  const T eps(1e-16);
41  const T c = b*b + T(4.)*a*a;
42  return ((b*c+eps) / (b*b*b + a*c + eps));
43  }
44  }

The documentation for this struct was generated from the following file: