Go to the documentation of this file.
69 const cell&
c = mesh_.cells()[cellI_];
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_);
83 cutFaceCentres_.append(cutFace_.subFaceCentre());
84 cutFaceAreas_.append(cutFace_.subFaceArea());
85 isoFaceEdges_.append(cutFace_.surfacePoints());
89 else if (faceStatus == -1)
91 cutFaceCentres_.append(cutFace_.subFaceCentre());
92 cutFaceAreas_.append(cutFace_.subFaceArea());
94 nFaceBelowInterface++;
102 if (!fullyBelow && !fullyAbove)
118 if (
mag(faceArea_) < 10*SMALL)
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 return subCellCentre_;
181 return subCellVolume_;
187 if (facePoints_.size() == 0)
190 calcIsoFacePointsFromEdges
237 cutFaceCentres_.clear();
238 cutFaceAreas_.clear();
239 isoFaceEdges_.clear();
243 subCellCentre_ =
Zero;
244 subCellVolume_ = -10;
static constexpr const zero Zero
Global zero (0)
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
scalar subCellVolume() const
Returns subCellVolume.
label cellStatus() const
Returns cellStatus.
const DynamicList< point > & facePoints()
Returns the points of the cutting isoface.
scalar cutValue() const
Returns cutValue.
scalar VolumeOfFluid() const
Returns volume of fluid value.
cutCellIso(const fvMesh &mesh, scalarField &f)
Construct from fvMesh and a scalarField.
const point & subCellCentre() const
Returns subCellCentre.
const point & faceCentre() const
Returns the centre of the cutting isoface.
const vector & faceArea() const
Returns the area normal vector of the cutting isoface.
Service routines for cutting a cell, celli, of an fvMesh, mesh_, at its intersection with a surface.
Mesh data needed to do the Finite Volume discretisation.
label calcSubCell(const label cellI, const scalar cutValue)
Sets internal values and returns face status.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
const dimensionedScalar c
Speed of light in a vacuum.
void clearStorage()
Resets internal values.
Class for cutting a face, faceI, of an fvMesh, mesh_, at its intersection with an isosurface defined ...
A cell is defined as a list of faces with extra functionality.
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)