Go to the documentation of this file.00001
00002
00003 word timeName = "0";
00004
00005 if
00006 (
00007 runTime.timeName() != "constant"
00008 && runTime.timeName() != "0"
00009 )
00010 {
00011 IOobject io
00012 (
00013 "time",
00014 runTime.timeName(),
00015 "uniform",
00016 runTime,
00017 IOobject::READ_IF_PRESENT,
00018 IOobject::NO_WRITE,
00019 false
00020 );
00021
00022 if (io.headerOk())
00023 {
00024 IOdictionary timeObject
00025 (
00026 IOobject
00027 (
00028 "time",
00029 runTime.timeName(),
00030 "uniform",
00031 runTime,
00032 IOobject::MUST_READ,
00033 IOobject::NO_WRITE,
00034 false
00035 )
00036 );
00037
00038 label index;
00039 timeObject.lookup("index") >> index;
00040 timeName = Foam::name(index);
00041 }
00042 else
00043 {
00044 timeName = runTime.timeName();
00045
00046
00047 }
00048 }
00049
00050 Info<< "\nTime [" << timeName << "] = " << runTime.timeName() << nl;
00051
00052
00053