BUGFIX: Illegal use of uninitialised value (backport)
[foam-extend-3.2.git] / applications / utilities / postProcessing / dataConversion / foamToEnsight / ensightCaseTail.H
blob43c1a3f801bcf9f3373de9bace53b32a790d66d6
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     for (int n=startTime; n<endTime; n++)
23     {
24         ensightCaseFile << setw(12) << Times[n].value() + Tcorr << " ";
26         if (++count % 6 == 0)
27         {
28             ensightCaseFile << nl;
29         }
30     }
32     ensightCaseFile << nl;