csvSetWriter: Corrected axis header

Resolves bug-report https://bugs.openfoam.org/view.php?id=2455
This commit is contained in:
Henry Weller 2017-02-09 17:47:56 +00:00
parent b167c95f19
commit dd8b8bceac
2 changed files with 13 additions and 9 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -25,8 +25,6 @@ License
#include <cctype>
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
inline void Foam::word::stripInvalid()
@ -175,6 +173,5 @@ inline Foam::word Foam::operator&(const word& a, const word& b)
}
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -147,7 +147,7 @@ namespace Foam
os << nl;
}
} // end namespace
}
template<class Type>
@ -183,17 +183,24 @@ void Foam::csvSetWriter<Type>::writeCoordHeader
Ostream& os
) const
{
const word axisName(points.axis());
if (points.hasVectorAxis())
{
forAll(points, i)
for
(
word::const_iterator iter = axisName.begin();
iter != axisName.end();
++iter
)
{
os << points.axis()[i];
os << *iter;
writeSeparator(os);
}
}
else
{
os << points.axis();
os << axisName;
writeSeparator(os);
}
}