Go to the documentation of this file.
30 cellFld[cellI] =
max(cellFld[cellI], faceData[cFaces[i]]);
60 cellFld[cellI] =
min(cellFld[cellI], faceData[cFaces[i]]);
85 const labelUList& own = cellData.mesh().owner();
86 const labelUList& nei = cellData.mesh().neighbour();
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
326 cellDeterminant.primitiveFieldRef() =
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)
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
label index() const noexcept
virtual const pointField & points() const
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A class for handling file names.
static constexpr const zero Zero
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
virtual label start() const
Selector class for finite volume differencing schemes. fvMesh is derived from fvSchemes so that all f...
static const wallDist & New(const fvMesh &mesh, Args &&... args)
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.
Ostream & endl(Ostream &os)
A HashTable with keys but without contents that is similar to std::unordered_set.
const Vector< label > & geometricD() const
label min(const labelHashSet &set, label minValue=labelMax)
tetrahedron< point, const point & > tetPointRef
A tetrahedron using referred points.
const List< T >::subList patchSlice(const List< T > &l) const
SubField is a Field obtained as a section of another Field, without its own allocation....
virtual label size() const
cellMask correctBoundaryConditions()
virtual void write(Ostream &os) const
Generic templated field type.
A subset of mesh faces organised as a primitive patch.
const cellZoneMesh & cellZones() const noexcept
virtual const labelList & faceOwner() const
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
const faceZoneMesh & faceZones() const noexcept
constexpr scalar radToDeg(const scalar rad) noexcept
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)
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))
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const labelUList & neighbour() const
Generic dimensioned Type class.
const labelIOList & zoneID
virtual bool write(const token &tok)=0
Mesh data needed to do the Finite Volume discretisation.
const scalarField & cellVolumes() const
(Rough approximation of) cell aspect ratio
const cellShapeList & cellShapes() const
const labelUList & owner() const
void correctBoundaryConditions()
label index() const noexcept
const fvBoundaryMesh & boundary() const
const vectorField & cellCentres() const
bool isInternalFace(const label faceIndex) const noexcept
virtual const faceList & faces() const
const fvPatch & patch() const
const word & name() const noexcept
Internal & ref(const bool updateAccessTime=true)
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
label nInternalFaces() const noexcept
dimensionedScalar acos(const dimensionedScalar &ds)
virtual const surfaceScalarField & weights() const
const vectorField & faceCentres() const
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
virtual const labelUList & faceCells() const
const Time & time() const
A List with indirect addressing.
label nFaces() const noexcept
A face is a list of labels corresponding to mesh vertices.
virtual void write(Ostream &os) const
Maps a geometry to a set of cell primitives.
const fvPatch & patch() const
const dimensionSet dimVolume(pow3(dimLength))
Generic GeometricField class.
A cell is defined as a list of faces with extra functionality.
virtual const labelList & faceNeighbour() const
const Boundary & boundaryField() const
void writeFields(const fvMesh &mesh, const wordHashSet &selectedFields, const bool writeFaceFields)
const dimensionSet dimless
const DimensionedField< scalar, volMesh > & V() const
const vectorField & faceAreas() const