Files
openfoam/src/fileFormats/vtk/read/vtkUnstructuredReaderTemplates.C
Mark Olesen 6c4a1b17ad ENH: update vtk reading to handle new legacy format (#2094)
- with the changes in vtkCellArray, the legacy files now have
  OFFSET, CONNECTIVITY information.

- support reading of both versions.

- continue to generate legacy format 2.0, since this is what
  many programs still expect
2021-05-30 21:02:59 +02:00

57 lines
2.0 KiB
C

/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2012 OpenFOAM Foundation
Copyright (C) 2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "vtkUnstructuredReader.H"
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
void Foam::vtkUnstructuredReader::printFieldStats(const objectRegistry& obj)
{
const wordList fieldNames(obj.names(Type::typeName));
if (fieldNames.size())
{
Info<< "Read " << fieldNames.size() << ' ' << Type::typeName
<< " fields:" << nl
<< "Size\tName" << nl
<< "----\t----" << nl;
for (const word& fieldName : fieldNames)
{
Info<< obj.lookupObject<Type>(fieldName).size()
<< '\t' << fieldName
<< nl;
}
Info<< endl;
}
}
// ************************************************************************* //