62 const scalar cutValue,
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);
91 else if (faceStatus == -1)
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;
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.
label calcSubCell(const label celli, const scalar cutValue, const vector &normal)
Sets internal values and returns face status.
scalar cutValue() const noexcept
Returns cutValue.
const DynamicList< point > & facePoints()
Returns the points of the cutting PLICface.
void clearStorage()
Resets internal values.
cutCellPLIC(const fvMesh &mesh)
Construct from fvMesh.
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.
label calcSubFace(const label faceI, const vector &normal, const vector &base)
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 volVectorField & C() const
Return cell centres as volVectorField.
const cellList & cells() const
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)