Go to the documentation of this file.
29 cellFld[cellI] =
max(cellFld[cellI], faceData[cFaces[i]]);
59 cellFld[cellI] =
min(cellFld[cellI], faceData[cFaces[i]]);
84 const labelUList& own = cellData.mesh().owner();
85 const labelUList& nei = cellData.mesh().neighbour();
90 cellFld[own[facei]] =
min(cellFld[own[facei]], faceData[facei]);
91 cellFld[nei[facei]] =
min(cellFld[nei[facei]], faceData[facei]);
102 cellFld[fc[i]] =
min(cellFld[fc[i]], fvp[i]);
125 if (selectedFields.
empty())
130 Info<<
"Writing fields with mesh quality parameters" <<
endl;
132 if (selectedFields.
found(
"nonOrthoAngle"))
168 calculatedFvPatchScalarField::typeName
171 maxFaceToCell(nonOrthoAngle, cellNonOrthoAngle);
172 Info<<
" Writing non-orthogonality (angle) to "
173 << cellNonOrthoAngle.name() <<
endl;
174 cellNonOrthoAngle.
write();
177 if (selectedFields.
found(
"faceWeight"))
195 calculatedFvPatchScalarField::typeName
201 Info<<
" Writing face interpolation weights (0..0.5) to "
202 << cellWeights.name() <<
endl;
210 if (selectedFields.
found(
"skewness"))
239 calculatedFvPatchScalarField::typeName
242 maxFaceToCell(faceSkewness, cellSkewness);
243 Info<<
" Writing face skewness to " << cellSkewness.name() <<
endl;
244 cellSkewness.
write();
251 if (selectedFields.
found(
"cellDeterminant"))
266 zeroGradientFvPatchScalarField::typeName
276 cellDeterminant.correctBoundaryConditions();
277 Info<<
" Writing cell determinant to "
278 << cellDeterminant.name() <<
endl;
279 cellDeterminant.
write();
286 if (selectedFields.
found(
"aspectRatio"))
301 zeroGradientFvPatchScalarField::typeName
316 aspectRatio.correctBoundaryConditions();
317 Info<<
" Writing aspect ratio to " << aspectRatio.name() <<
endl;
325 if (selectedFields.
found(
"cellShapes"))
340 zeroGradientFvPatchScalarField::typeName
346 shape[cellI] = model.
index();
348 shape.correctBoundaryConditions();
349 Info<<
" Writing cell shape (hex, tet etc.) to " << shape.name()
354 if (selectedFields.
found(
"cellVolume"))
369 calculatedFvPatchScalarField::typeName
372 Info<<
" Writing cell volume to " << V.name() <<
endl;
376 if (selectedFields.
found(
"cellVolumeRatio"))
400 calculatedFvPatchScalarField::typeName
403 minFaceToCell(faceVolumeRatio, cellVolumeRatio);
404 Info<<
" Writing cell volume ratio to "
405 << cellVolumeRatio.name() <<
endl;
406 cellVolumeRatio.
write();
410 if (selectedFields.
found(
"minTetVolume"))
425 zeroGradientFvPatchScalarField::typeName
439 scalar& ownVol = minTetVolume[own[facei]];
449 ownVol =
min(ownVol, tetQual);
455 scalar& neiVol = minTetVolume[nei[facei]];
465 neiVol =
min(neiVol, tetQual);
470 minTetVolume.correctBoundaryConditions();
471 Info<<
" Writing minTetVolume to " << minTetVolume.name() <<
endl;
472 minTetVolume.
write();
476 if (selectedFields.
found(
"minPyrVolume"))
491 zeroGradientFvPatchScalarField::typeName
517 cellFld[own[facei]] =
min(cellFld[own[facei]], ownPyrVol[facei]);
518 cellFld[nei[facei]] =
min(cellFld[nei[facei]], neiPyrVol[facei]);
522 for (
const auto& fvp : minPyrVolume.boundaryField())
529 cellFld[fc[i]] =
min(cellFld[fc[i]], ownPyrVol[meshFacei]);
533 minPyrVolume.correctBoundaryConditions();
534 Info<<
" Writing minPyrVolume to " << minPyrVolume.name() <<
endl;
535 minPyrVolume.
write();
538 if (selectedFields.
found(
"cellRegion"))
553 calculatedFvPatchScalarField::typeName
559 cellRegion[celli] = rs[celli];
561 cellRegion.correctBoundaryConditions();
562 Info<<
" Writing cell region to " << cellRegion.name() <<
endl;
566 if (selectedFields.
found(
"wallDistance"))
572 if (schemesDict.
found(
"wallDist"))
578 Info<<
" Writing wall distance to " <<
y.name() <<
endl;
589 if (selectedFields.
found(
"cellZone"))
604 calculatedFvPatchScalarField::typeName
608 for (
const auto&
zone : czs)
613 cellZone.correctBoundaryConditions();
617 if (selectedFields.
found(
"faceZone"))
632 calculatedFvsPatchScalarField::typeName
636 for (
const auto&
zone : czs)
virtual const pointField & points() const
Return raw points.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Dimensionless.
static constexpr const zero Zero
Global zero (0)
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search for an entry (const access) with the given keyword.
virtual label start() const
Return start label of this patch in the polyMesh face list.
label nInternalFaces() const
Number of internal faces.
Selector class for finite volume differencing schemes. fvMesh is derived from fvShemes so that all fi...
label nFaces() const
Number of mesh faces.
static const wallDist & New(const fvMesh &mesh, Args &&... args)
Get existing or create a new MeshObject.
static word timeName(const scalar t, const int precision=precision_)
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
Base class for mesh zones.
const cellZoneMesh & cellZones() const
Return cell zone mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const Vector< label > & geometricD() const
Return the vector of geometric directions in mesh.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
tetrahedron< point, const point & > tetPointRef
const List< T >::subList patchSlice(const List< T > &l) const
Slice list to patch.
#define forAll(list, i)
Loop across all elements in list.
const faceZoneMesh & faceZones() const
Return face zone mesh.
cellMask correctBoundaryConditions()
virtual void write(Ostream &os) const
Write.
A subset of mesh faces organised as a primitive patch.
messageStream Info
Information stream (uses stdout - output is on the master only)
void writeFields(const fvMesh &mesh, const wordHashSet &selectedFields)
virtual const labelList & faceOwner() const
Return face owner.
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
constexpr scalar radToDeg(const scalar rad) noexcept
Conversion from radians to degrees.
This class separates the mesh into distinct unconnected regions, each of which is then given a label ...
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const labelUList & neighbour() const
Internal face neighbour.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
Mesh data needed to do the Finite Volume discretisation.
const scalarField & cellVolumes() const
const word & name() const
Return name.
const cellShapeList & cellShapes() const
Return cell shapes.
const labelUList & owner() const
Internal face owner. Note bypassing virtual mechanism so.
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field.
void correctBoundaryConditions()
Correct boundary field.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
const vectorField & cellCentres() const
virtual const faceList & faces() const
Return raw faces.
const fvPatch & patch() const
Return patch.
Internal & ref(const bool updateAccessTime=true)
Return a reference to the dimensioned internal field.
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
dimensionedScalar acos(const dimensionedScalar &ds)
const surfaceScalarField & weights() const
Return reference to linear difference weighting factors.
const vectorField & faceCentres() const
virtual const labelUList & faceCells() const
Return faceCells.
const Time & time() const
Return the top-level database.
A List with indirect addressing.
A face is a list of labels corresponding to mesh vertices.
virtual void write(Ostream &os) const
Write.
bool empty() const noexcept
True if the hash table is empty.
Maps a geometry to a set of cell primitives.
const fvPatch & patch() const
Return patch.
bool found(const Key &key) const
Return true if hashed entry is found in table.
const dimensionSet dimVolume(pow3(dimLength))
label index() const
Return index of model in the model list.
label index() const
Return the index of this zone in zone list.
A cell is defined as a list of faces with extra functionality.
virtual const labelList & faceNeighbour() const
Return face neighbour.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
const DimensionedField< scalar, volMesh > & V() const
Return cell volumes.
const vectorField & faceAreas() const