39 #ifndef limitedCubic_H
40 #define limitedCubic_H
53 template<
class LimiterFunc>
70 <<
"coefficient = " <<
k_
71 <<
" should be >= 0 and <= 1"
81 const scalar cdWeight,
82 const scalar faceFlux,
83 const typename LimiterFunc::phiType& phiP,
84 const typename LimiterFunc::phiType& phiN,
85 const typename LimiterFunc::gradPhiType& gradcP,
86 const typename LimiterFunc::gradPhiType& gradcN,
90 scalar twor =
twoByk_*LimiterFunc::r
92 faceFlux, phiP, phiN, gradcP, gradcN, d
108 cdWeight*(phiP - 0.25*(d & gradcN))
109 + (1 - cdWeight)*(phiN + 0.25*(d & gradcP));
111 scalar phiCD = cdWeight*phiP + (1 - cdWeight)*phiN;
114 scalar cubicLimiter = (phif - phiU)/
stabilise(phiCD - phiU, SMALL);
126 return max(
min(
min(twor, cubicLimiter), 2), 0);