openfoam/applications/utilities/postProcessing/dataConversion/foamToVTK/createMeshes.H
Mark Olesen 89cca8578c ENH: rewrite of foamToVTK to include parallel output (#926)
- Default format is now XML binary (base64) instead of legacy format.
  The old -xml option is redundant and ignored.
  The new -legacy option can be used to force legacy output instead.

- Polyhedral decomposition is now off by default (old -poly is ignored).
  The option -poly-decomp forces decomposition of polyhedrals into
  primitive shapes.

- reduced memory footprint by reading and converting fields
  successively.

- Creation of symlinks to processor files is no longer required or
  desired. The old -noLinks option is ignored.

- Ignore -useTimeName option. Always number according to timeIndex.
2018-10-09 20:00:55 +02:00

59 lines
1.2 KiB
C

PtrList<fvMesh> meshes(regionNames.size());
PtrList<fvMeshSubsetProxy> meshProxies(regionNames.size());
PtrList<vtk::vtuCells> vtuMappings(regionNames.size());
forAll(regionNames, regioni)
{
const word& regionName = regionNames[regioni];
Info<< "Create mesh";
if (regionName != fvMesh::defaultRegion)
{
Info<< ' ' << regionName;
}
Info<< " for time = " << runTime.timeName() << nl << endl;
meshes.set
(
regioni,
new fvMesh
(
IOobject
(
regionName,
runTime.timeName(),
runTime,
IOobject::MUST_READ
)
)
);
// Mesh subsetting, or pass through
meshProxies.set
(
regioni,
new fvMeshSubsetProxy
(
meshes[regioni],
cellSubsetType,
cellSelectionName
)
);
// VTU sizing and decomposition information
vtuMappings.set
(
regioni,
new vtk::vtuCells(writeOpts, decomposePoly)
);
}
Info<< "VTK mesh topology: "
<< timer.cpuTimeIncrement() << " s, "
<< mem.update().size() << " kB" << endl;
// ************************************************************************* //