43 #ifndef filteredLinear3V_H 44 #define filteredLinear3V_H 57 template<
class LimiterFunc>
78 <<
"coefficient = " << k_
79 <<
" should be >= 0 and <= 1" 86 const scalar cdWeight,
87 const scalar faceFlux,
88 const typename LimiterFunc::phiType& phiP,
89 const typename LimiterFunc::phiType& phiN,
90 const typename LimiterFunc::gradPhiType& gradcP,
91 const typename LimiterFunc::gradPhiType& gradcN,
100 scalar df = dfV & dfV;
104 scalar dP = 2*(dfV & (d & gradcP));
105 scalar dN = 2*(dfV & (d & gradcN));
108 scalar
limiter = 1 - k_*(dN - df)*(dP - df)/
max(
sqr(dN + dP), small);
111 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 > &)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
filteredLinear3VLimiter(Istream &is)
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if successful.
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
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Class to generate weighting factors for the filteredLinear3V differencing scheme. ...