ENH: improvements to Time

- expose the names of write and stopAt controls for reuse elsewhere and
  provide a stopAtControls enum for 'unknown'

- track the requested number of sub-cycles (was previously a bool)
This commit is contained in:
Mark Olesen
2017-11-28 10:11:06 +01:00
parent fab9fb4332
commit ca5b0dcbaa
8 changed files with 205 additions and 132 deletions

View File

@ -112,10 +112,10 @@ class subCycle
// Private Member Functions
//- Disallow default bitwise copy construct
subCycle(const subCycle<GeometricField>&);
subCycle(const subCycle<GeometricField>&) = delete;
//- Disallow default bitwise assignment
void operator=(const subCycle<GeometricField>&);
void operator=(const subCycle<GeometricField>&) = delete;
public:
@ -123,10 +123,10 @@ public:
// Constructors
//- Construct field and number of sub-cycles
subCycle(GeometricField& gf, const label nSubCycles)
subCycle(GeometricField& gf, const label nCycles)
:
subCycleField<GeometricField>(gf),
subCycleTime(const_cast<Time&>(gf.time()), nSubCycles)
subCycleTime(const_cast<Time&>(gf.time()), nCycles)
{
// Update the field time index to correspond to the sub-cycle time
this->updateTimeIndex();