71 bool fullyBelow =
true;
72 bool fullyAbove =
true;
74 label nFaceBelowInterface = 0;
77 for (
const label facei : c)
79 const label faceStatus = cutFace_.
calcSubFace(facei, cutValue_);
89 else if (faceStatus == -1)
94 nFaceBelowInterface++;
102 if (!fullyBelow && !fullyAbove)
118 if (
mag(faceArea_) < ROOTVSMALL)
120 if (nFaceBelowInterface == 0)
124 subCellCentre_ =
Zero;
133 subCellCentre_ = mesh_.C()[cellI_];
134 subCellVolume_ = mesh_.V()[cellI_];
140 cutFaceCentres_.append(faceCentre_);
141 cutFaceAreas_.append(faceArea_);
152 VOF_ = subCellVolume_ / mesh_.V()[cellI_];
157 subCellCentre_ =
Zero;
164 subCellCentre_ = mesh_.C()[cellI_];
165 subCellVolume_ = mesh_.V()[cellI_];
175 if (facePoints_.empty())
178 calcIsoFacePointsFromEdges
195 cutFaceCentres_.
clear();
196 cutFaceAreas_.clear();
197 isoFaceEdges_.clear();
201 subCellCentre_ =
Zero;
202 subCellVolume_ = -10;
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void clear() noexcept
Clear the addressed list, i.e. set the size to zero.
void append(const T &val)
Copy append an element to the end of this list.
A cell is defined as a list of faces with extra functionality.
scalar cutValue() const noexcept
Returns cutValue.
label calcSubCell(const label cellI, const scalar cutValue)
Sets internal values and returns face status.
const DynamicList< point > & facePoints()
Returns the points of the cutting PLICface.
void clearStorage()
Resets internal values.
cutCellIso(const fvMesh &mesh, scalarField &f)
Construct from fvMesh and a scalarField.
static void calcCellData(const DynamicList< point > &cutFaceCentres, const DynamicList< vector > &cutFaceAreas, vector &subCellCentre, scalar &subCellVolume)
Calculates volume and centre of the cutted cell.
cutCell(const fvMesh &mesh)
Construct from fvMesh.
static void calcIsoFacePointsFromEdges(const vector &faceArea, const vector &faceCentre, const DynamicList< DynamicList< point > > &faceEdges, DynamicList< point > &facePoints)
Calculates the point of the cutting face.
static void calcGeomDataCutFace(const DynamicList< DynamicList< point > > &faceEdges, const vector &subCellCentre, vector &faceArea, vector &faceCentre)
Calculates area and centre of the cutting face.
Class for cutting a face, faceI, of an fvMesh, mesh_, at its intersection with an isosurface defined ...
label calcSubFace(const label faceI, const scalar cutValue)
Calculate cut points along edges of faceI.
const vector & subFaceArea() const noexcept
Returns area vector of cutted face.
const DynamicList< point > & surfacePoints() const noexcept
Returns point of the face in sorted of cutted face.
const point & subFaceCentre() const noexcept
Returns centre of cutted face.
Mesh data needed to do the Finite Volume discretisation.
const cellList & cells() const
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
static constexpr const zero Zero
Global zero (0).
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &f1, const label comm)