mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
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:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user