db7fac3f24
git-svn-id: https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Core/OpenFOAM-1.5-dev@1731 e4e07f05-0c2f-0410-a05a-b8ba57e0c909
33 lines
887 B
C++
33 lines
887 B
C++
if (Pstream::master())
|
|
{
|
|
ensightCaseFile << nl << "TIME" << nl
|
|
<< "time set: " << 1 << nl
|
|
<< "number of steps: " << nTimeSteps << nl
|
|
<< "filename start number: " << 0 << nl
|
|
<< "filename increment: " << 1 << nl;
|
|
|
|
ensightCaseFile << "time values:" << nl;
|
|
|
|
ensightCaseFile.setf(ios_base::scientific, ios_base::floatfield);
|
|
ensightCaseFile.precision(5);
|
|
|
|
label count = 0;
|
|
scalar Tcorr = 0.0;
|
|
if (Times[0].value() < 0)
|
|
{
|
|
Tcorr = - Times[0].value();
|
|
Info << "Correcting time values. Adding " << Tcorr << endl;
|
|
}
|
|
|
|
for (int n=startTime; n<endTime; n++)
|
|
{
|
|
ensightCaseFile << setw(12) << Times[n].value() + Tcorr << " ";
|
|
|
|
if (++count % 6 == 0)
|
|
{
|
|
ensightCaseFile << nl;
|
|
}
|
|
}
|
|
|
|
ensightCaseFile << nl;
|
|
}
|