27 using reportFields = foamToVtkReportFields;
29 autoPtr<faMesh> faMeshPtr;
31 const label nAreaFields =
34 if (nAreaFields || withMeshIds)
36 faMeshPtr = faMesh::TryNew(meshProxy.baseMesh());
39 if (faMeshPtr && (nAreaFields || withMeshIds))
41 const faMesh& areaMesh = faMeshPtr();
45 const auto&
pp = faMeshPtr->patch();
53 /
"finiteArea" + timeDesc
60 writer.beginFile(areaMesh.name());
62 writer.writeTimeValue(timeValue);
68 (withMeshIds ? 3 + (
writer.parallel() ? 1 : 0) : 0)
74 const globalIndex
procAddr(areaMesh.nFaces());
80 const polyBoundaryMesh&
pbm = areaMesh.mesh().boundaryMesh();
84 pbm.patchID(areaMesh.faceLabels())
91 writer.writeCellData(
"faceLabels", areaMesh.faceLabels());
108 if (UPstream::master())
112 fileName seriesName(vtk::seriesWriter::base(
outputName));
114 vtk::seriesWriter& series = vtkSeries(seriesName);
121 series.load(seriesName,
true, timeValue);
125 series.write(seriesName);
const polyBoundaryMesh & pbm
vtk::lineWriter writer(edgeCentres, edgeList::null(), fileName(aMesh.time().globalPath()/"finiteArea-edgesCentres"))
constexpr char nl
The newline '\n' character (0x0a)
label writeAllAreaFields(ensightCase &ensCase, const ensightFaMesh &ensMesh, const IOobjectList &objects)
word outputName("finiteArea-edges.obj")
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i)
const wordList area
Standard area field types (scalar, vector, tensor, etc)
fileName relativePath(const fileName &input, const bool caseTag=false) const
Return the input relative to the globalPath by stripping off a leading value of the globalPath...
globalIndex procAddr(aMesh.nFaces())
messageStream Info
Information stream (stdout output on master, null elsewhere)
List< label > labelList
A List of labels.
Foam::argList args(argc, argv)
vtk::uindirectPatchGeoFieldsWriter vtkWriterType_areaMesh
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())