48#ifndef filteredLinear2_H
49#define filteredLinear2_H
62template<
class LimiterFunc>
93 <<
"coefficient = " << k_
94 <<
" should be >= 0 and <= 1"
101 <<
"coefficient = " << l_
102 <<
" should be >= 0 and <= 1"
111 const scalar cdWeight,
112 const scalar faceFlux,
113 const typename LimiterFunc::phiType& phiP,
114 const typename LimiterFunc::phiType& phiN,
115 const typename LimiterFunc::gradPhiType& gradcP,
116 const typename LimiterFunc::gradPhiType& gradcN,
121 scalar df = phiN - phiP;
124 scalar tdcP = 2*(d & gradcP);
125 scalar tdcN = 2*(d & gradcN);
133 - k_*
min(
max(df - tdcP, 0),
max(df - tdcN, 0))
139 - k_*
min(
max(tdcP - df, 0),
max(tdcN - df, 0))
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
filteredLinear2Limiter(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
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
Represents 0/1 range or concept. Used for tagged dispatch or clamping.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionSet clamp(const dimensionSet &a, const dimensionSet &range)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
errorManipArg< error, int > exit(error &err, const int errNo=1)