vtkUnstructuredReader: Added support for VTK files with METADATA

Patch contributed by Timo Niemi, VTT.
Resolves patch request https://bugs.openfoam.org/view.php?id=3149
This commit is contained in:
Henry Weller
2019-01-16 11:21:59 +00:00
parent 6257b17a4c
commit 96e04780bf

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -29,6 +29,7 @@ License
#include "stringIOList.H"
#include "cellModeller.H"
#include "vectorIOField.H"
#include "stringOps.H"
/* * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * */
@ -907,6 +908,19 @@ void Foam::vtkUnstructuredReader::read(ISstream& inFile)
}
}
}
else if (tag == "METADATA")
{
// Read rest of the line
string line;
inFile.getLine(line);
// Skip until an empty line is found
inFile.getLine(line);
while (!stringOps::trim(line).empty())
{
inFile.getLine(line);
}
}
else
{
FatalIOErrorInFunction(inFile)