Transferred copyright to the OpenFOAM Foundation
[OpenFOAM-2.0.x.git] / applications / utilities / postProcessing / dataConversion / foamToEnsight / ensightCaseTail.H
blob6ec8373fcf07b708d36a899f60a03f09ac01a793
1 if (Pstream::master())
3     ensightCaseFile << nl << "TIME" << nl
4         << "time set:                      " << 1 << nl
5         << "number of steps:               " << nTimeSteps << nl
6         << "filename start number:         " << 0 << nl
7         << "filename increment:            " << 1 << nl;
9     ensightCaseFile << "time values:" << nl;
11     ensightCaseFile.setf(ios_base::scientific, ios_base::floatfield);
12     ensightCaseFile.precision(5);
14     label count = 0;
15     scalar Tcorr = 0.0;
16     if (Times[0].value() < 0)
17     {
18         Tcorr = - Times[0].value();
19         Info<< "Correcting time values. Adding " << Tcorr << endl;
20     }
22     forAll(Times, n)
23     {
24         ensightCaseFile << setw(12) << Times[n].value() + Tcorr << " ";
26         if (++count % 6 == 0)
27         {
28             ensightCaseFile << nl;
29         }
30     }
32     ensightCaseFile << nl;