33 const primitiveMesh& mesh,
37 const cell&
c = mesh.cells()[celli];
41 const label ow = mesh.faceOwner()[
c[i]];
51 Foam::scalar Foam::MPLICcellStorage::calcAlphaMin()
const
54 scalar cellAlphaMin(pointsAlpha_.first());
57 for (
label i = 1; i < cPoints_.size(); ++i)
59 const label pI = cPoints_[i];
60 cellAlphaMin =
min(cellAlphaMin, pointsAlpha_[pI]);
68 Foam::scalar Foam::MPLICcellStorage::calcAlphaMax()
const
71 scalar cellAlphaMax(pointsAlpha_.first());
74 for (
label i = 1; i < cPoints_.size(); ++i)
76 const label pI = cPoints_[i];
77 cellAlphaMax =
max(cellAlphaMax, pointsAlpha_[pI]);
92 const face&
f = faces_[cFaces_[facei]];
95 scalar fAlphaMin(pointsAlpha_[
f.
first()]);
100 fAlphaMin =
min(fAlphaMin, pointsAlpha_[
f[i]]);
103 facesAlphaMin[facei] = fAlphaMin;
107 return facesAlphaMin;
118 const face&
f = faces_[cFaces_[facei]];
121 scalar fAlphaMax(pointsAlpha_[
f.
first()]);
126 fAlphaMax =
max(fAlphaMax, pointsAlpha_[
f[i]]);
129 facesAlphaMax[facei] = fAlphaMax;
133 return facesAlphaMax;
144 const scalar cellAlpha,
150 faces_(mesh.faces()),
151 edges_(mesh.edges()),
152 edgeFaces_(mesh.faceEdges()),
153 cPoints_(mesh.cellPoints()[celli]),
154 cFaces_(mesh.
cells()[celli]),
155 cEdges_(mesh.cellEdges()[celli]),
156 pointsAlpha_(pointsAlpha),
158 cellAlpha_(cellAlpha),
160 owns_(calcIsOwner(mesh, celli)),
161 volume_(mesh.cellVolumes()[celli]),
162 centre_(mesh.cellCentres()[celli]),
163 Sf_(mesh.faceAreas(), cFaces_),
164 Cf_(mesh.faceCentres(), cFaces_),
165 magSf_(mesh.magFaceAreas(), cFaces_),
166 cellAlphaMin_(calcAlphaMin()),
167 cellAlphaMax_(calcAlphaMax()),
168 facesAlphaMin_(calcFacesAlphaMin()),
169 facesAlphaMax_(calcFacesAlphaMax()),
170 faceEdges_(mesh.faceEdges())
#define forAll(list, i)
Loop across all elements in list.
void size(const label)
Override size to be inconsistent with allocated storage.
MPLICcellStorage(const primitiveMesh &mesh, const scalarField &pointsAlpha, const vectorField &pointsU, const scalar cellAlpha, const vector &cellU, const label celli)
Construct from components.
T & first()
Return the first element of the list.
Cell-face mesh analysis engine.
const dimensionedScalar c
Speed of light in a vacuum.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
List< bool > boolList
Bool container classes.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)