39 #ifndef limitedCubicV_H
40 #define limitedCubicV_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
95 vector fV = cdWeight*phiP + (1.0 - cdWeight)*phiN;
97 scalar fVphiP = fV & phiP;
98 scalar fVphiN = fV & phiN;
113 cdWeight*(fVphiP - 0.25*(fV & (d & gradcN)))
114 + (1 - cdWeight)*(fVphiN + 0.25*(fV & (d & gradcP)));
116 scalar fVphiCD = cdWeight*fVphiP + (1 - cdWeight)*fVphiN;
119 scalar cubicLimiter =
120 (fVphif - fVphiU)/
stabilise(fVphiCD - fVphiU, SMALL);
123 return max(
min(
min(twor, cubicLimiter), 2), 0);