Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
applications
utilities
postProcessing
dataConversion
foamToEnsightParts
getTimeIndex.H
Go to the documentation of this file.
1
// Read time index from */uniform/time, but treat 0 and constant specially
2
// or simply increment from the '-index' option if it was supplied
3
4
label
timeIndex
= 0;
5
6
if
(optIndex)
7
{
8
timeIndex
= indexingNumber++;
9
}
10
else
if
11
(
12
runTime.timeName() !=
"constant"
13
&& runTime.timeName() !=
"0"
14
)
15
{
16
IOobject io
17
(
18
"time"
,
19
runTime.timeName(),
20
"uniform"
,
21
runTime,
22
IOobject::READ_IF_PRESENT,
23
IOobject::NO_WRITE,
24
false
25
);
26
27
if
(io.headerOk())
28
{
29
io.readOpt() = IOobject::MUST_READ;
30
IOdictionary timeObject(io);
31
32
timeObject.lookup(
"index"
) >>
timeIndex
;
33
}
34
else
35
{
36
Info
<<
"skip ... missing entry "
<< io.objectPath() <<
endl
;
37
continue
;
38
}
39
}
40
41
timeIndices.insert(
timeIndex
,
timeDirs
[timeI].value());
42
Info
<<
"\nTime ["
<<
timeIndex
<<
"] = "
<< runTime.timeName() <<
nl
;
43
44
45
// ************************ vim: set sw=4 sts=4 et: ************************ //