MERGE: Clean-up of time classes
This commit is contained in:
parent
b76f2a810e
commit
e3af38c8d7
5 changed files with 30 additions and 13 deletions
|
@ -54,7 +54,7 @@ Foam::TimePaths::TimePaths
|
|||
}
|
||||
else
|
||||
{
|
||||
globalCaseName_ = caseName(pos-1);
|
||||
globalCaseName_ = caseName(pos - 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -110,6 +110,12 @@ public:
|
|||
return rootPath_;
|
||||
}
|
||||
|
||||
//- Return global case name
|
||||
const fileName& globalCaseName() const
|
||||
{
|
||||
return globalCaseName_;
|
||||
}
|
||||
|
||||
//- Return case name
|
||||
const fileName& caseName() const
|
||||
{
|
||||
|
|
|
@ -61,6 +61,7 @@ protected:
|
|||
bool deltaTchanged_;
|
||||
|
||||
label outputTimeIndex_;
|
||||
|
||||
//- Is outputTime because of primary?
|
||||
bool primaryOutputTime_;
|
||||
|
||||
|
@ -88,10 +89,10 @@ public:
|
|||
virtual scalar timeToUserTime(const scalar t) const;
|
||||
|
||||
//- Return current time value
|
||||
scalar timeOutputValue() const;
|
||||
virtual scalar timeOutputValue() const;
|
||||
|
||||
//- Return current time index
|
||||
label timeIndex() const;
|
||||
virtual label timeIndex() const;
|
||||
|
||||
//- Return time step value
|
||||
inline scalar deltaTValue() const
|
||||
|
@ -106,16 +107,16 @@ public:
|
|||
}
|
||||
|
||||
//- Return time step
|
||||
dimensionedScalar deltaT() const;
|
||||
virtual dimensionedScalar deltaT() const;
|
||||
|
||||
//- Return old time step
|
||||
dimensionedScalar deltaT0() const;
|
||||
virtual dimensionedScalar deltaT0() const;
|
||||
|
||||
|
||||
// Check
|
||||
|
||||
//- Return true if this is an output time (primary or secondary)
|
||||
bool outputTime() const;
|
||||
//- Return true if this is an output time
|
||||
virtual bool outputTime() const;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ void Foam::Time::adjustDeltaT()
|
|||
adjustTime = true;
|
||||
timeToNextWrite = max
|
||||
(
|
||||
0.0,
|
||||
scalar(0),
|
||||
(outputTimeIndex_ + 1)*writeInterval_ - (value() - startTime_)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -109,8 +109,8 @@ public:
|
|||
//- Supported time directory name formats
|
||||
enum fmtflags
|
||||
{
|
||||
general = 0,
|
||||
fixed = ios_base::fixed,
|
||||
general = 0,
|
||||
fixed = ios_base::fixed,
|
||||
scientific = ios_base::scientific
|
||||
};
|
||||
|
||||
|
@ -132,10 +132,10 @@ protected:
|
|||
scalar startTime_;
|
||||
|
||||
//- End time
|
||||
scalar endTime_;
|
||||
mutable scalar endTime_;
|
||||
|
||||
//- Stop at
|
||||
stopAtControls stopAt_;
|
||||
mutable stopAtControls stopAt_;
|
||||
|
||||
//- Write control
|
||||
writeControls writeControl_;
|
||||
|
@ -143,6 +143,14 @@ protected:
|
|||
//- Write interval
|
||||
scalar writeInterval_;
|
||||
|
||||
// Additional writing
|
||||
|
||||
//- Secondary write control
|
||||
writeControls secondaryWriteControl_;
|
||||
|
||||
//- Secondary write interval
|
||||
scalar secondaryWriteInterval_;
|
||||
|
||||
//- Purge write
|
||||
label purgeWrite_;
|
||||
mutable FIFOStack<word> previousOutputTimes_;
|
||||
|
@ -162,6 +170,7 @@ protected:
|
|||
//- If time is being sub-cycled this is the previous TimeState
|
||||
autoPtr<TimeState> prevTimeState_;
|
||||
|
||||
|
||||
//- Time directory name format
|
||||
static fmtflags format_;
|
||||
|
||||
|
@ -395,7 +404,8 @@ public:
|
|||
IOstream::compressionType
|
||||
) const;
|
||||
|
||||
//- Write the objects now and continue the run
|
||||
//- Write the objects now (not at end of iteration) and continue
|
||||
// the run
|
||||
bool writeNow();
|
||||
|
||||
//- Write the objects now (not at end of iteration) and end the run
|
||||
|
|
Reference in a new issue