43 #ifndef filteredLinear3_H
44 #define filteredLinear3_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,
96 scalar df = phiN - phiP;
99 scalar dP = 2*(d & gradcP);
100 scalar dN = 2*(d & gradcN);
103 scalar
limiter = 1 - k_*(dN - df)*(dP - df)/
max(
sqr(dN + dP), small);
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Class to generate weighting factors for the filteredLinear interpolation scheme.
filteredLinear3Limiter(Istream &is)
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
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if successful.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)