48 #ifndef filteredLinear3_H 49 #define filteredLinear3_H 62 template<
class LimiterFunc>
83 <<
"coefficient = " << k_
84 <<
" should be >= 0 and <= 1" 91 const scalar cdWeight,
92 const scalar faceFlux,
93 const typename LimiterFunc::phiType& phiP,
94 const typename LimiterFunc::phiType& phiN,
95 const typename LimiterFunc::gradPhiType& gradcP,
96 const typename LimiterFunc::gradPhiType& gradcN,
101 scalar df = phiN - phiP;
104 scalar dP = 2*(d & gradcP);
105 scalar dN = 2*(d & gradcN);
108 scalar
limiter = 1 - k_*(dN - df)*(dP - df)/
max(
sqr(dN + dP), SMALL);
errorManipArg< error, int > exit(error &err, const int errNo=1)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
filteredLinear3Limiter(Istream &is)
Class to generate weighting factors for the filteredLinear differencing scheme.
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.
dimensionSet clamp(const dimensionSet &a, const dimensionSet &range)
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...