43 #ifndef filteredLinear2_H 44 #define filteredLinear2_H 57 template<
class LimiterFunc>
88 <<
"coefficient = " << k_
89 <<
" should be >= 0 and <= 1" 96 <<
"coefficient = " << l_
97 <<
" should be >= 0 and <= 1" 106 const scalar cdWeight,
107 const scalar faceFlux,
108 const typename LimiterFunc::phiType& phiP,
109 const typename LimiterFunc::phiType& phiN,
110 const typename LimiterFunc::gradPhiType& gradcP,
111 const typename LimiterFunc::gradPhiType& gradcN,
116 scalar df = phiN - phiP;
119 scalar tdcP = 2*(d & gradcP);
120 scalar tdcN = 2*(d & gradcN);
128 - k_*
min(
max(df - tdcP, 0),
max(df - tdcN, 0))
134 - k_*
min(
max(tdcP - df, 0),
max(tdcN - df, 0))
139 return max(
min(limiter, 1), 0);
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
filteredLinear2Limiter(Istream &is)
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if successful.
Class to generate weighting factors for the filteredLinear2 differencing scheme.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
dimensioned< scalar > mag(const dimensioned< Type > &)
scalar limiter(const scalar cdWeight, const scalar faceFlux, const typename LimiterFunc::phiType &phiP, const typename LimiterFunc::phiType &phiN, const typename LimiterFunc::gradPhiType &gradcP, const typename LimiterFunc::gradPhiType &gradcN, const vector &d) const