mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: probes: reformat output for third-party readers
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2015-2022 OpenCFD Ltd.
|
||||
Copyright (C) 2015-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -105,6 +105,7 @@ void Foam::probes::createProbeFiles(const wordList& fieldNames)
|
||||
DebugInfo<< "open probe stream: " << os.name() << endl;
|
||||
|
||||
const unsigned int width(IOstream::defaultPrecision() + 7);
|
||||
os << setf(ios_base::left);
|
||||
|
||||
forAll(*this, probei)
|
||||
{
|
||||
@ -139,8 +140,7 @@ void Foam::probes::createProbeFiles(const wordList& fieldNames)
|
||||
os << nl;
|
||||
}
|
||||
|
||||
os << '#' << setw(IOstream::defaultPrecision() + 6)
|
||||
<< "Probe";
|
||||
os << setw(width) << "# Time";
|
||||
|
||||
forAll(*this, probei)
|
||||
{
|
||||
@ -149,10 +149,7 @@ void Foam::probes::createProbeFiles(const wordList& fieldNames)
|
||||
os << ' ' << setw(width) << probei;
|
||||
}
|
||||
}
|
||||
os << nl;
|
||||
|
||||
os << '#' << setw(IOstream::defaultPrecision() + 6)
|
||||
<< "Time" << endl;
|
||||
os << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,6 +31,7 @@ License
|
||||
#include "surfaceFields.H"
|
||||
#include "IOmanip.H"
|
||||
#include "interpolation.H"
|
||||
#include "SpanStream.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -137,11 +138,15 @@ void Foam::probes::writeValues
|
||||
|
||||
os << setw(width) << timeValue;
|
||||
|
||||
OCharStream buf;
|
||||
|
||||
forAll(values, probei)
|
||||
{
|
||||
if (includeOutOfBounds_ || processor_[probei] != -1)
|
||||
{
|
||||
os << ' ' << setw(width) << values[probei];
|
||||
buf.rewind();
|
||||
buf << values[probei];
|
||||
os << ' ' << setw(width) << buf.str().data();
|
||||
}
|
||||
}
|
||||
os << endl;
|
||||
|
||||
Reference in New Issue
Block a user