65 <<
"coefficient = " << k_
66 <<
" should be >= 0 and <= 1" 73 const scalar cdWeight,
74 const scalar faceFlux,
81 scalar phiP = Sf&PhiP;
82 scalar phiN = Sf&PhiN;
95 scalar phiCD = cdWeight*phiP + (1 - cdWeight)*phiN;
102 ((faceFlux - phiU)/
stabilise(phiCD - phiU, small) + k_);
105 return max(
min(PLimiter, 1), 0);
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
errorManipArg< error, int > exit(error &err, const int errNo=1)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
scalar limiter(const scalar cdWeight, const scalar faceFlux, const vector &PhiP, const vector &PhiN, const vector &Sf, const scalar &) const
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.
tmp< DimensionedField< scalar, GeoMesh > > stabilise(const DimensionedField< scalar, GeoMesh > &dsf, const dimensioned< scalar > &ds)
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Class with limiter function which returns the limiter for the Phi interpolation scheme.