BUG: foamToVTK produces invalid files (fixes #154)

- broken by commit 2027059b (2016-03-09) where the pTraits
  nComponents type was changed from int to Foam::direction
This commit is contained in:
Mark Olesen
2016-06-21 10:21:17 +02:00
parent a39ffa66f2
commit db467dbcf8
7 changed files with 31 additions and 19 deletions

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -119,8 +119,9 @@ void writeVTKFields
forAll(values, fieldI)
{
Info<< " writing field " << fieldNames[fieldI] << endl;
os << nl << fieldNames[fieldI] << ' ' << pTraits<Type>::nComponents
<< ' ' << values[fieldI].size() << " float" << nl;
os << nl << fieldNames[fieldI] << ' '
<< int(pTraits<Type>::nComponents) << ' '
<< values[fieldI].size() << " float" << nl;
label offset = 0;
forAll(addr, trackI)
{