diff --git a/src/OpenFOAM/db/Time/Time.C b/src/OpenFOAM/db/Time/Time.C index 644db23f44..e3e9649745 100644 --- a/src/OpenFOAM/db/Time/Time.C +++ b/src/OpenFOAM/db/Time/Time.C @@ -53,8 +53,7 @@ Foam::Time::stopAtControlNames { stopAtControls::saNoWriteNow, "noWriteNow" }, { stopAtControls::saWriteNow, "writeNow" }, { stopAtControls::saNextWrite, "nextWrite" }, - // NOTE: stopAtControls::saUnknown is left untabulated here so that it can - // be used as fallback value to flag unknown settings + // Leave saUnknown untabulated - fallback to flag unknown settings }); @@ -64,11 +63,14 @@ const Foam::Enum > Foam::Time::writeControlNames ({ + { writeControls::wcNone, "none" }, { writeControls::wcTimeStep, "timeStep" }, { writeControls::wcRunTime, "runTime" }, + { writeControls::wcAdjustableRunTime, "adjustable" }, { writeControls::wcAdjustableRunTime, "adjustableRunTime" }, { writeControls::wcClockTime, "clockTime" }, { writeControls::wcCpuTime, "cpuTime" }, + // Leave wcUnknown untabulated - fallback to flag unknown settings }); @@ -1170,6 +1172,10 @@ Foam::Time& Foam::Time::operator++() switch (writeControl_) { + case wcNone: + case wcUnknown: + break; + case wcTimeStep: writeTime_ = !(timeIndex_ % label(writeInterval_)); break; diff --git a/src/OpenFOAM/db/Time/Time.H b/src/OpenFOAM/db/Time/Time.H index 0f1147519e..7a2a235ddc 100644 --- a/src/OpenFOAM/db/Time/Time.H +++ b/src/OpenFOAM/db/Time/Time.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -83,11 +83,13 @@ public: //- Write control options enum writeControls { + wcNone, //!< "none" wcTimeStep, //!< "timeStep" wcRunTime, //!< "runTime" - wcAdjustableRunTime, //!< "adjustableRunTime" + wcAdjustableRunTime, //!< "adjustable" / "adjustableRunTime" wcClockTime, //!< "clockTime" - wcCpuTime //!< "cpuTime" + wcCpuTime, //!< "cpuTime" + wcUnknown //!< Dummy no-op }; //- Stop-run control options, which are primarily used when diff --git a/src/OpenFOAM/db/functionObjects/timeControl/timeControl.C b/src/OpenFOAM/db/functionObjects/timeControl/timeControl.C index 2e2f220075..15b875284d 100644 --- a/src/OpenFOAM/db/functionObjects/timeControl/timeControl.C +++ b/src/OpenFOAM/db/functionObjects/timeControl/timeControl.C @@ -39,6 +39,7 @@ Foam::timeControl::timeControlNames_ { timeControl::ocTimeStep, "timeStep" }, { timeControl::ocWriteTime, "writeTime" }, { timeControl::ocOutputTime, "outputTime" }, + { timeControl::ocAdjustableRunTime, "adjustable" }, { timeControl::ocAdjustableRunTime, "adjustableRunTime" }, { timeControl::ocRunTime, "runTime" }, { timeControl::ocClockTime, "clockTime" },