30 cellFld[cellI] =
max(cellFld[cellI], faceData[cFaces[i]]);
60 cellFld[cellI] =
min(cellFld[cellI], faceData[cFaces[i]]);
91 cellFld[own[facei]] =
min(cellFld[own[facei]], faceData[facei]);
92 cellFld[nei[facei]] =
min(cellFld[nei[facei]], faceData[facei]);
103 cellFld[fc[i]] =
min(cellFld[fc[i]], fvp[i]);
120 void writeSurfaceField
142 calculatedFvsPatchScalarField::typeName
144 fld.primitiveFieldRef() = faceData;
146 Info<<
" Writing face data to " << fName <<
endl;
155 const bool writeFaceFields
158 if (selectedFields.
empty())
163 Info<<
"Writing fields with mesh quality parameters" <<
endl;
165 if (selectedFields.
found(
"nonOrthoAngle"))
201 calculatedFvPatchScalarField::typeName
204 maxFaceToCell(nonOrthoAngle, cellNonOrthoAngle);
205 Info<<
" Writing non-orthogonality (angle) to " 206 << cellNonOrthoAngle.name() <<
endl;
207 cellNonOrthoAngle.
write();
214 "face_nonOrthoAngle",
220 if (selectedFields.
found(
"faceWeight"))
238 calculatedFvPatchScalarField::typeName
244 Info<<
" Writing face interpolation weights (0..0.5) to " 245 << cellWeights.name() <<
endl;
258 if (selectedFields.
found(
"skewness"))
287 calculatedFvPatchScalarField::typeName
290 maxFaceToCell(faceSkewness, cellSkewness);
291 Info<<
" Writing face skewness to " << cellSkewness.name() <<
endl;
292 cellSkewness.
write();
309 if (selectedFields.
found(
"cellDeterminant"))
324 zeroGradientFvPatchScalarField::typeName
334 cellDeterminant.correctBoundaryConditions();
335 Info<<
" Writing cell determinant to " 336 << cellDeterminant.name() <<
endl;
337 cellDeterminant.
write();
344 if (selectedFields.
found(
"aspectRatio"))
359 zeroGradientFvPatchScalarField::typeName
374 aspectRatio.correctBoundaryConditions();
375 Info<<
" Writing aspect ratio to " << aspectRatio.name() <<
endl;
379 if (selectedFields.
found(
"cellAspectRatio"))
394 zeroGradientFvPatchScalarField::typeName
399 aspectRatio.correctBoundaryConditions();
400 Info<<
" Writing approximate aspect ratio to " 401 << aspectRatio.name() <<
endl;
409 if (selectedFields.
found(
"cellShapes"))
424 zeroGradientFvPatchScalarField::typeName
430 shape[cellI] = model.
index();
432 shape.correctBoundaryConditions();
433 Info<<
" Writing cell shape (hex, tet etc.) to " << shape.name()
438 if (selectedFields.
found(
"cellVolume"))
453 calculatedFvPatchScalarField::typeName
456 Info<<
" Writing cell volume to " << V.name() <<
endl;
460 if (selectedFields.
found(
"cellVolumeRatio"))
484 calculatedFvPatchScalarField::typeName
487 minFaceToCell(faceVolumeRatio, cellVolumeRatio);
488 Info<<
" Writing cell volume ratio to " 489 << cellVolumeRatio.name() <<
endl;
490 cellVolumeRatio.
write();
497 "face_cellVolumeRatio",
504 if (selectedFields.
found(
"minTetVolume"))
519 zeroGradientFvPatchScalarField::typeName
533 scalar& ownVol = minTetVolume[own[facei]];
543 ownVol =
min(ownVol, tetQual);
549 scalar& neiVol = minTetVolume[nei[facei]];
559 neiVol =
min(neiVol, tetQual);
564 minTetVolume.correctBoundaryConditions();
565 Info<<
" Writing minTetVolume to " << minTetVolume.name() <<
endl;
566 minTetVolume.
write();
570 if (selectedFields.
found(
"minPyrVolume"))
585 zeroGradientFvPatchScalarField::typeName
611 cellFld[own[facei]] =
min(cellFld[own[facei]], ownPyrVol[facei]);
612 cellFld[nei[facei]] =
min(cellFld[nei[facei]], neiPyrVol[facei]);
616 for (
const auto& fvp : minPyrVolume.boundaryField())
623 cellFld[fc[i]] =
min(cellFld[fc[i]], ownPyrVol[meshFacei]);
627 minPyrVolume.correctBoundaryConditions();
628 Info<<
" Writing minPyrVolume to " << minPyrVolume.name() <<
endl;
629 minPyrVolume.
write();
639 writeSurfaceField(
mesh,
"face_minPyrVolume", minFacePyrVol);
643 if (selectedFields.
found(
"cellRegion"))
658 calculatedFvPatchScalarField::typeName
664 cellRegion[celli] = rs[celli];
666 cellRegion.correctBoundaryConditions();
667 Info<<
" Writing cell region to " << cellRegion.name() <<
endl;
671 if (selectedFields.
found(
"wallDistance"))
677 if (schemesDict.
found(
"wallDist"))
683 Info<<
" Writing wall distance to " <<
y.name() <<
endl;
694 if (selectedFields.
found(
"cellZone"))
709 calculatedFvPatchScalarField::typeName
713 for (
const auto&
zone : czs)
718 cellZone.correctBoundaryConditions();
722 if (selectedFields.
found(
"faceZone"))
728 for (
const auto&
zone : czs)
748 calculatedFvsPatchScalarField::typeName
754 for (
auto& pfld : bfld)
This class separates the mesh into distinct unconnected regions, each of which is then given a label ...
dimensionedScalar acos(const dimensionedScalar &ds)
A class for handling file names.
A face is a list of labels corresponding to mesh vertices.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
const fvPatch & patch() const noexcept
Return the patch.
virtual label start() const
Return start label of this patch in the polyMesh face list.
bool found(const Key &key) const
True if hashed key is found in table.
virtual const labelList & faceNeighbour() const
Return face neighbour.
tetrahedron< point, const point & > tetPointRef
A tetrahedron using referred points.
static const wallDist & New(const fvMesh &mesh, Args &&... args)
Get existing or create a new MeshObject.
(Rough approximation of) cell aspect ratio
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
const cellShapeList & cellShapes() const
Return cell shapes.
wordList types() const
Return a list of the patch types.
cellMask correctBoundaryConditions()
Ostream & endl(Ostream &os)
Add newline and flush stream.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
const fvPatch & patch() const noexcept
Return the patch.
const dimensionSet dimless
Dimensionless.
const Time & time() const
Return the top-level database.
label nFaces() const noexcept
Number of mesh faces.
const DimensionedField< scalar, volMesh > & V() const
Return cell volumes.
SubField is a Field obtained as a section of another Field, without its own allocation. SubField is derived from a SubList rather than a List.
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
bool isInternalFace(const label faceIndex) const noexcept
Return true if given face label is internal to the mesh.
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find an entry (const access) with the given keyword.
const labelUList & neighbour() const
Internal face neighbour.
virtual const pointField & points() const
Return raw points.
#define forAll(list, i)
Loop across all elements in list.
const Vector< label > & geometricD() const
Return the vector of geometric directions in mesh.
const dimensionSet dimVolume(pow3(dimLength))
virtual const surfaceScalarField & weights() const
Return reference to linear difference weighting factors.
Base class for mesh zones.
virtual const labelUList & faceCells() const
Return faceCells.
label size() const noexcept
The number of elements in the list.
virtual const labelList & faceOwner() const
Return face owner.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
label nInternalFaces() const noexcept
Number of internal faces.
virtual const faceList & faces() const
Return raw faces.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
const vectorField & cellCentres() const
void writeFields(const fvMesh &mesh, const wordHashSet &selectedFields, const bool writeFaceFields)
virtual label size() const
Return size.
virtual void write(Ostream &os) const
Write.
const Mesh & mesh() const noexcept
Return mesh.
bool empty() const noexcept
True if the hash table is empty.
label index() const noexcept
The index of this zone in the zone list.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
static word timeName(const scalar t, const int precision=precision_)
Return time name of given scalar time formatted with the given precision.
const faceZoneMesh & faceZones() const noexcept
Return face zone mesh.
virtual void write(Ostream &os) const
Write.
const List< T >::subList patchSlice(const List< T > &l) const
Slice List to patch, using the virtual patch size.
const labelUList & owner() const
Internal face owner. Note bypassing virtual mechanism so.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
const Field< Type > & field() const noexcept
Return const-reference to the field values.
const vectorField & faceCentres() const
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field values.
label index() const noexcept
Return index of model in the model list.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
constexpr scalar radToDeg(const scalar rad) noexcept
Conversion from radians to degrees.
A cell is defined as a list of faces with extra functionality.
Selector class for finite volume differencing schemes. fvMesh is derived from fvSchemes so that all f...
Mesh data needed to do the Finite Volume discretisation.
A List with indirect addressing. Like IndirectList but does not store addressing. ...
const vectorField & faceAreas() const
const word & name() const noexcept
The zone name.
Automatically write from objectRegistry::writeObject()
Maps a geometry to a set of cell primitives.
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
const cellZoneMesh & cellZones() const noexcept
Return cell zone mesh.
void correctBoundaryConditions()
Correct boundary field.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Internal & ref(const bool updateAccessTime=true)
Same as internalFieldRef()
A subset of mesh faces organised as a primitive patch.
Defines the attributes of an object for which implicit objectRegistry management is supported...
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
const scalarField & cellVolumes() const
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
static constexpr const zero Zero
Global zero (0)