40 for (GeoField&
fld :
mesh_.objectRegistry::sorted<GeoField>())
42 const word& fldName =
fld.name();
44 if (!fldName.
contains(
"PrevIter") &&
mesh_.relaxField(fldName))
Info<< nl;Info<< "Write faMesh in vtk format:"<< nl;{ vtk::uindirectPatchWriter writer(aMesh.patch(), fileName(aMesh.time().globalPath()/vtkBaseFileName));writer.writeGeometry();globalIndex procAddr(aMesh.nFaces());labelList cellIDs;if(UPstream::master()) { cellIDs.resize(procAddr.totalSize());for(const labelRange &range :procAddr.ranges()) { auto slice=cellIDs.slice(range);slice=identity(range);} } writer.beginCellData(4);writer.writeProcIDs();writer.write("cellID", cellIDs);writer.write("area", aMesh.S().field());writer.write("normal", aMesh.faceAreaNormals());writer.beginPointData(1);writer.write("normal", aMesh.pointAreaNormals());Info<< " "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.time().globalPath()/(vtkBaseFileName+"-edges")));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
Generic GeometricField class.
void storePrevIter() const
Store previous iteration field for vol<Type>Fields.
const word algorithmName_
The dictionary name, e.g. SIMPLE, PIMPLE.
fvMesh & mesh_
Reference to the mesh database.
bool contains(char c) const noexcept
True if string contains given character (cf. C++23).
A class for handling words, derived from Foam::string.
#define DebugInfo
Report an information message using Foam::Info.
Ostream & endl(Ostream &os)
Add newline and flush stream.