Go to the documentation of this file.
37 forAll(phiPsiCorrs[0], facei)
44 if (phiPsiCorrs[
phasei][facei] > 0)
46 sumPos += phiPsiCorrs[
phasei][facei];
50 sumNeg += phiPsiCorrs[
phasei][facei];
54 scalar
sum = sumPos + sumNeg;
56 if (
sum > 0 && sumPos > VSMALL)
58 scalar
lambda = -sumNeg/sumPos;
62 if (phiPsiCorrs[
phasei][facei] > 0)
68 else if (
sum < 0 && sumNeg < -VSMALL)
70 scalar
lambda = -sumPos/sumNeg;
74 if (phiPsiCorrs[
phasei][facei] < 0)
94 forAll(phiPsiCorrs[0], facei)
96 scalar alphaNotFixed = 0, corrNotFixed = 0;
99 alphaNotFixed += alphas[iter.key()][facei];
100 corrNotFixed += phiPsiCorrs[iter.key()][facei];
103 scalar corrFixed = 0;
106 corrFixed += phiPsiCorrs[iter.key()][facei];
109 const scalar sumCorr = corrNotFixed + corrFixed;
111 const scalar
lambda = - sumCorr/alphaNotFixed;
115 phiPsiCorrs[iter.key()][facei] +=
lambda*alphas[iter.key()][facei];
label size() const noexcept
The number of elements in the list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object.
#define forAll(list, i)
Loop across all elements in list.
void limitSum(UPtrList< scalarField > &phiPsiCorrs)
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
IOstream & fixed(IOstream &io)
dimensionedScalar lambda("lambda", dimTime/sqr(dimLength), laminarTransport)
labelList identity(const label len, label start=0)
Create identity map of the given length with (map[i] == i)
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
MULES: Multidimensional universal limiter for explicit solution.