ensightCaseTail.H
Go to the documentation of this file.
1 if (Pstream::master())
2 {
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;
8 
9  ensightCaseFile << "time values:" << nl;
10 
11  ensightCaseFile.setf(ios_base::scientific, ios_base::floatfield);
12  ensightCaseFile.precision(5);
13 
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  }
21 
22  forAll(Times, n)
23  {
24  ensightCaseFile << setw(12) << Times[n].value() + Tcorr << " ";
25 
26  if (++count % 6 == 0)
27  {
28  ensightCaseFile << nl;
29  }
30  }
31 
32  ensightCaseFile << nl;
33 }
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:428
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:253
static const char nl
Definition: Ostream.H:262
messageStream Info
label n
Omanip< int > setw(const int i)
Definition: IOmanip.H:199
IOstream & scientific(IOstream &io)
Definition: IOstream.H:582