62 const scalar cutValue,
70 const cell&
c = mesh_.cells()[celli];
72 vector base = mesh_.C()[cellI_] + normal_ * cutValue_;
73 bool fullyBelow =
true;
74 bool fullyAbove =
true;
76 label nFaceBelowInterface = 0;
79 for (
const label faceI :
c)
81 const label faceStatus = cutFace_.calcSubFace(faceI, normal_, base);
85 cutFaceCentres_.append(cutFace_.subFaceCentre());
86 cutFaceAreas_.append(cutFace_.subFaceArea());
87 plicFaceEdges_.append(cutFace_.surfacePoints());
91 else if (faceStatus == -1)
93 cutFaceCentres_.append(cutFace_.subFaceCentre());
94 cutFaceAreas_.append(cutFace_.subFaceArea());
96 nFaceBelowInterface++;
104 if (!fullyBelow && !fullyAbove)
120 if (
mag(faceArea_) < ROOTVSMALL)
122 if (nFaceBelowInterface == 0)
126 subCellCentre_ =
Zero;
135 subCellCentre_ = mesh_.C()[cellI_];
136 subCellVolume_ = mesh_.V()[cellI_];
142 cutFaceCentres_.append(faceCentre_);
143 cutFaceAreas_.append(faceArea_);
154 VOF_ = subCellVolume_ / mesh_.V()[cellI_];
159 subCellCentre_ =
Zero;
166 subCellCentre_ = mesh_.C()[cellI_];
167 subCellVolume_ = mesh_.V()[cellI_];
177 if (facePoints_.empty())
180 calcIsoFacePointsFromEdges
197 cutFaceCentres_.clear();
198 cutFaceAreas_.clear();
199 plicFaceEdges_.clear();
203 subCellCentre_ =
Zero;
204 subCellVolume_ = -10;
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &f1)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Service routines for cutting a cell, celli, of an fvMesh, mesh_, at its intersection with a surface...
label calcSubCell(const label celli, const scalar cutValue, const vector &normal)
Sets internal values and returns face status.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
const DynamicList< point > & facePoints()
Returns the points of the cutting PLICface.
void clearStorage()
Resets internal values.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
A cell is defined as a list of faces with extra functionality.
Mesh data needed to do the Finite Volume discretisation.
const dimensionedScalar c
Speed of light in a vacuum.
cutCellPLIC(const fvMesh &mesh)
Construct from fvMesh.
static constexpr const zero Zero
Global zero (0)