sampledSurface: Added support for writing surfaces in binary format

by specifying

    writeFormat binary;

in the sampledSurface dictionary.
This commit is contained in:
Henry Weller
2020-01-29 12:42:05 +00:00
parent 3631f13a98
commit 84759ee0b8
23 changed files with 154 additions and 88 deletions

View File

@ -523,7 +523,7 @@ void Foam::writeAMIWeightsSum
// Write the surface
if (Pstream::master())
{
vtkSurfaceWriter().write
vtkSurfaceWriter(mesh.time().writeFormat()).write
(
file.path(),
file.name(),

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -163,7 +163,11 @@ int main(int argc, char *argv[])
autoPtr<writer<scalar>> setWriter;
if (writeSets)
{
surfWriter = surfaceWriter::New(surfaceFormat);
surfWriter = surfaceWriter::New
(
surfaceFormat,
mesh.time().writeFormat()
);
setWriter = writer<scalar>::New(vtkSetWriter<scalar>::typeName);
}