29 cellFld[cellI] =
max(cellFld[cellI], faceData[cFaces[i]]);
59 cellFld[cellI] =
min(cellFld[cellI], faceData[cFaces[i]]);
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]);
119 void writeSurfaceField
142 fld.primitiveFieldRef() = faceData;
144 Info<<
" Writing face data to " << fName <<
endl;
153 const bool writeFaceFields
156 if (selectedFields.
empty())
161 Info<<
"Writing fields with mesh quality parameters" <<
endl;
163 if (selectedFields.
found(
"nonOrthoAngle"))
201 maxFaceToCell(nonOrthoAngle, cellNonOrthoAngle);
202 Info<<
" Writing non-orthogonality (angle) to " 203 << cellNonOrthoAngle.name() <<
endl;
204 cellNonOrthoAngle.
write();
211 "face_nonOrthoAngle",
217 if (selectedFields.
found(
"faceWeight"))
241 Info<<
" Writing face interpolation weights (0..0.5) to " 242 << cellWeights.name() <<
endl;
255 if (selectedFields.
found(
"skewness"))
286 maxFaceToCell(faceSkewness, cellSkewness);
287 Info<<
" Writing face skewness to " << cellSkewness.name() <<
endl;
288 cellSkewness.
write();
305 if (selectedFields.
found(
"cellDeterminant"))
330 cellDeterminant.correctBoundaryConditions();
331 Info<<
" Writing cell determinant to " 332 << cellDeterminant.name() <<
endl;
333 cellDeterminant.
write();
340 if (selectedFields.
found(
"aspectRatio"))
370 aspectRatio.correctBoundaryConditions();
371 Info<<
" Writing aspect ratio to " << aspectRatio.name() <<
endl;
375 if (selectedFields.
found(
"cellAspectRatio"))
395 aspectRatio.correctBoundaryConditions();
396 Info<<
" Writing approximate aspect ratio to " 397 << aspectRatio.name() <<
endl;
405 if (selectedFields.
found(
"cellShapes"))
426 shape[cellI] = model.
index();
428 shape.correctBoundaryConditions();
429 Info<<
" Writing cell shape (hex, tet etc.) to " << shape.name()
434 if (selectedFields.
found(
"cellVolume"))
451 Info<<
" Writing cell volume to " << V.name() <<
endl;
455 if (selectedFields.
found(
"cellVolumeRatio"))
481 minFaceToCell(faceVolumeRatio, cellVolumeRatio);
482 Info<<
" Writing cell volume ratio to " 483 << cellVolumeRatio.name() <<
endl;
484 cellVolumeRatio.
write();
491 "face_cellVolumeRatio",
498 if (selectedFields.
found(
"minTetVolume"))
527 scalar& ownVol = minTetVolume[own[facei]];
537 ownVol =
min(ownVol, tetQual);
543 scalar& neiVol = minTetVolume[nei[facei]];
553 neiVol =
min(neiVol, tetQual);
558 minTetVolume.correctBoundaryConditions();
559 Info<<
" Writing minTetVolume to " << minTetVolume.name() <<
endl;
560 minTetVolume.
write();
564 if (selectedFields.
found(
"minPyrVolume"))
605 cellFld[own[facei]] =
min(cellFld[own[facei]], ownPyrVol[facei]);
606 cellFld[nei[facei]] =
min(cellFld[nei[facei]], neiPyrVol[facei]);
610 for (
const auto& fvp : minPyrVolume.boundaryField())
617 cellFld[fc[i]] =
min(cellFld[fc[i]], ownPyrVol[meshFacei]);
621 minPyrVolume.correctBoundaryConditions();
622 Info<<
" Writing minPyrVolume to " << minPyrVolume.name() <<
endl;
623 minPyrVolume.
write();
633 writeSurfaceField(
mesh,
"face_minPyrVolume", minFacePyrVol);
637 if (selectedFields.
found(
"cellRegion"))
657 cellRegion[celli] = rs[celli];
659 cellRegion.correctBoundaryConditions();
660 Info<<
" Writing cell region to " << cellRegion.name() <<
endl;
664 if (selectedFields.
found(
"wallDistance"))
670 if (schemesDict.
found(
"wallDist"))
676 Info<<
" Writing wall distance to " <<
y.name() <<
endl;
687 if (selectedFields.
found(
"cellZone"))
705 for (
const auto&
zone : czs)
710 cellZone.correctBoundaryConditions();
714 if (selectedFields.
found(
"faceZone"))
720 for (
const auto&
zone : czs)
745 for (
auto& pfld : bfld)
static const word & zeroGradientType() noexcept
The type name for zeroGradient patch fields.
label start() const noexcept
The patch start within the polyMesh face list.
This class separates the mesh into distinct unconnected regions, each of which is then given a label ...
const List< T >::subList patchSlice(const List< T > &values) const
This patch slice from the complete list, which has size mesh::nFaces(), using the virtual patch size...
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.
bool found(const Key &key) const
Same as contains()
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. Registered with typeName.
(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.
Ignore writing from objectRegistry::writeObject()
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.
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 entries in the list.
virtual const labelList & faceOwner() const
Return face owner.
static const word null
An empty word.
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
Patch size is the number of faces, but can be overloaded.
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 a time name for the given scalar time value formatted with the given precision.
const faceZoneMesh & faceZones() const noexcept
Return face zone mesh.
virtual void write(Ostream &os) const
Write.
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.
static const word & calculatedType() noexcept
The type name for calculated patch fields.
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()
const fvBoundaryMesh & boundary() const noexcept
Return reference to boundary mesh.
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.
Do not request registration (bool: false)
const scalarField & cellVolumes() const
static constexpr const zero Zero
Global zero (0)