mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
- skip loading of fields with -no-internal, -no-boundary - suppress reporting fields with -no-internal, -no-boundary - cache loaded volume field for reuse with point interpolation. Trade off some memory overhead against reading twice. NOTE: this issue will not be evident with foamToEnsight since there it only handles cell data *or* point data (not both), so a field is only ever loaded/processed once.
78 lines
1.8 KiB
C
78 lines
1.8 KiB
C
/*---------------------------------------------------------------------------*\
|
|
========= |
|
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
\\ / O peration |
|
|
\\ / A nd | www.openfoam.com
|
|
\\/ M anipulation |
|
|
-------------------------------------------------------------------------------
|
|
Copyright (C) 2018-2021 OpenCFD Ltd.
|
|
-------------------------------------------------------------------------------
|
|
License
|
|
This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
|
|
|
Description
|
|
Code chunk for converting face and point sets - included by foamToVTK.
|
|
|
|
\*---------------------------------------------------------------------------*/
|
|
|
|
// flag to top-level code to signal early stop.
|
|
bool wroteTopoSet = false;
|
|
|
|
// Write faceSet (as PolyData)
|
|
if (faceSetName.size())
|
|
{
|
|
// Load
|
|
faceSet set(mesh, faceSetName);
|
|
|
|
fileName outputName
|
|
(
|
|
outputDir/regionDir/"face-set"
|
|
/ set.name()/set.name() + timeDesc
|
|
);
|
|
|
|
Info<< " faceSet : "
|
|
<< args.relativePath(outputName) << nl;
|
|
|
|
vtk::writeFaceSet
|
|
(
|
|
mesh,
|
|
set,
|
|
writeOpts,
|
|
outputName,
|
|
Pstream::parRun()
|
|
);
|
|
|
|
wroteTopoSet = true;
|
|
}
|
|
|
|
|
|
// Write pointSet (as PolyData)
|
|
if (pointSetName.size())
|
|
{
|
|
// Load
|
|
pointSet set(mesh, pointSetName);
|
|
|
|
fileName outputName
|
|
(
|
|
outputDir/regionDir/"point-set"
|
|
/ set.name()/set.name() + timeDesc
|
|
);
|
|
|
|
Info<< " pointSet : "
|
|
<< args.relativePath(outputName) << nl;
|
|
|
|
vtk::writePointSet
|
|
(
|
|
mesh,
|
|
set,
|
|
writeOpts,
|
|
outputName,
|
|
Pstream::parRun()
|
|
);
|
|
|
|
wroteTopoSet = true;
|
|
}
|
|
|
|
|
|
// ************************************************************************* //
|