Go to the documentation of this file.
36 const label nPhases = phiPsiCorrs.
size();
38 forAll(phiPsiCorrs[0], facei)
45 if (phiPsiCorrs[
phasei][facei] > 0)
47 sumPos += phiPsiCorrs[
phasei][facei];
51 sumNeg += phiPsiCorrs[
phasei][facei];
55 scalar
sum = sumPos + sumNeg;
57 if (
sum > 0 && sumPos > VSMALL)
59 scalar
lambda = -sumNeg/sumPos;
63 if (phiPsiCorrs[
phasei][facei] > 0)
69 else if (
sum < 0 && sumNeg < -VSMALL)
71 scalar
lambda = -sumPos/sumNeg;
75 if (phiPsiCorrs[
phasei][facei] < 0)
95 forAll(phiPsiCorrs[0], facei)
97 scalar alphaNotFixed = 0, corrNotFixed = 0;
98 for (
const label
phasei : notFixed)
100 alphaNotFixed += alphas[
phasei][facei];
101 corrNotFixed += phiPsiCorrs[
phasei][facei];
104 scalar corrFixed = 0;
107 corrFixed += phiPsiCorrs[
phasei][facei];
110 const scalar sumCorr = corrNotFixed + corrFixed;
112 const scalar
lambda = - sumCorr/alphaNotFixed;
114 for (
const label
phasei : notFixed)
label size() const noexcept
The number of elements in the list.
#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.