32 forAll(phiPsiCorrs[0], facei)
39 if (phiPsiCorrs[
phasei][facei] > 0)
41 sumPos += phiPsiCorrs[
phasei][facei];
45 sumNeg += phiPsiCorrs[
phasei][facei];
49 const scalar
sum = sumPos + sumNeg;
51 if (sum > 0 && sumPos > vSmall)
53 const scalar
lambda = -sumNeg/sumPos;
57 if (phiPsiCorrs[
phasei][facei] > 0)
63 else if (sum < 0 && sumNeg < -vSmall)
65 const scalar
lambda = -sumPos/sumNeg;
69 if (phiPsiCorrs[
phasei][facei] < 0)
#define forAll(list, i)
Loop across all elements in list.
dimensionedScalar lambda(viscosity->lookup("lambda"))
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
void limitSum(UPtrList< scalarField > &phiPsiCorrs)
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
label size() const
Return the number of elements in the UPtrList.
MULES: Multidimensional universal limiter for explicit solution.