22 using reportFields = foamToVtkReportFields;
26 (doInternal || doBoundary)
33 (doInternal || doBoundary)
46 if (doInternal || doBoundary)
48 reportFields::volume(Info, objects);
52 reportFields::internal(Info, objects);
74 autoPtr<volPointInterpolation>
pInterp;
78 typedef vtk::internalWriter writerType;
80 if (vtuMeshCells.empty())
83 vtuMeshCells.reset(meshProxy.mesh());
85 if (doPointValues && vtuMeshCells.manifold())
87 doPointValues =
false;
91 <<
"Manifold cells detected (eg, AMI) - disabling PointData"
97 auto writer = autoPtr<writerType>::New
118 Info<<
" Internal : "
136 const polyBoundaryMesh&
patches =
mesh.boundaryMesh();
139 PtrList<PrimitivePatchInterpolation<primitivePatch>>
patchInterps;
149 typedef vtk::patchWriter writerType;
151 auto writer = autoPtr<writerType>::New
162 / (meshProxy.useSubMesh() ? meshProxy.name() :
"boundary")
172 writer->useCellValue(nearCellValue);
182 Info<<
" Boundaries: "
185 writer->writeTimeValue(timeValue);
197 typedef vtk::patchWriter writerType;
206 label nPatchInterps = 0;
214 auto writer = autoPtr<writerType>::New
225 / (meshProxy.useSubMesh() ? meshProxy.name() :
pp.name())
235 writer->useCellValue(nearCellValue);
256 Info<<
" Boundary : "
259 writer->writeTimeValue(timeValue);
270 new PrimitivePatchInterpolation<primitivePatch>(
pp)
298 IOobject::NO_REGISTER
331 (withMeshIds ? 2 : 0)
377 + (withPointIds ? 1 : 0)
388 const label nPatchFields =
450 if (UPstream::master())
455 if (writeOpts.legacy())
463 fileName seriesName(vtk::seriesWriter::base(
outputName));
465 vtk::seriesWriter& series = vtkSeries(seriesName);
472 series.load(seriesName,
true, timeValue);
475 series.append(timeValue, timeDesc);
476 series.write(seriesName);
487 fileName seriesName(vtk::seriesWriter::base(
outputName));
494 vtk::seriesWriter& series = vtkSeries(seriesName);
501 series.load(seriesName,
true, timeValue);
505 series.write(seriesName);
vtk::lineWriter writer(edgeCentres, edgeList::null(), fileName(aMesh.time().globalPath()/(vtkBaseFileName+"-edgesCentres")))
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
fileName vtmOutputBase(outputDir/regionDir/vtkName+timeDesc)
labelList selectedPatchId(1)
autoPtr< vtk::internalWriter > internalWriter
PtrList< vtk::patchWriter > patchWriters
const polyBoundaryMesh & patches
Foam::word regionName(args.getOrDefault< word >("region", Foam::polyMesh::defaultRegion))
word outputName("finiteArea-edges.obj")
PtrList< PrimitivePatchInterpolation< primitivePatch > > patchInterps
std::unique_ptr< objectRegistry > cacheFieldsPtr
fileName vtmOutputBase(outputDir/regionDir/vtkName+timeDesc)
writeAllDimFields(internalWriter, meshProxy, objects, true, cacheFieldsPtr.get())
autoPtr< volPointInterpolation > pInterp
vtk::vtmWriter vtmBoundaries
bool is_volume(const word &clsName)
Test if the class name appears to be a volume field.
bool is_point(const word &clsName)
Test if the class name appears to be a point field.
bool is_internal(const word &clsName)
Test if the class name appears to be a volume internal field.
List< label > labelList
A List of labels.
label writeAllVolFields(ensightCase &ensCase, const ensightMesh &ensMesh, const IOobjectList &objects, const bool nearCellValue=false)
label writeAllPointFields(ensightCase &ensCase, const ensightMesh &ensMesh, const IOobjectList &objects)
messageStream Info
Information stream (stdout output on master, null elsewhere).
constexpr char nl
The newline '\n' character (0x0a).
Foam::argList args(argc, argv)
#define forAll(list, i)
Loop across all elements in list.