functionObject::timeControl: Rationalised naming timeStart -> startTime, timeEnd -> endTime
Support for timeStart and timeEnd is maintained for backward-compatibility but these names are deprecated.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -48,8 +48,8 @@ Description
|
||||
libs ("libMyFunctionObjectlib.so");
|
||||
region defaultRegion;
|
||||
enabled yes;
|
||||
timeStart 0;
|
||||
timeEnd 10;
|
||||
startTime 0;
|
||||
endTime 10;
|
||||
writeControl writeTime;
|
||||
writeInterval 1;
|
||||
...
|
||||
@ -65,8 +65,8 @@ Description
|
||||
region | Name of region for multi-region cases | no |
|
||||
enabled | On/off switch | no | yes
|
||||
log | Log information to standard output | no | yes
|
||||
timeStart| Start time | no |
|
||||
timeEnd | End time | no |
|
||||
startTime| Start time | no |
|
||||
endTime | End time | no |
|
||||
executeControl | See time controls below | no | timeStep
|
||||
executeInterval | Steps between each execute phase | no |
|
||||
writeControl | See time controls below | no | timeStep
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -43,8 +43,16 @@ namespace functionObjects
|
||||
|
||||
void Foam::functionObjects::timeControl::readControls()
|
||||
{
|
||||
dict_.readIfPresent("timeStart", timeStart_);
|
||||
dict_.readIfPresent("timeEnd", timeEnd_);
|
||||
if (!dict_.readIfPresent("startTime", startTime_))
|
||||
{
|
||||
dict_.readIfPresent("timeStart", startTime_);
|
||||
}
|
||||
|
||||
if (!dict_.readIfPresent("endTime", endTime_))
|
||||
{
|
||||
dict_.readIfPresent("timeEnd", endTime_);
|
||||
}
|
||||
|
||||
dict_.readIfPresent("nStepsToStartTimeChange", nStepsToStartTimeChange_);
|
||||
}
|
||||
|
||||
@ -52,8 +60,8 @@ void Foam::functionObjects::timeControl::readControls()
|
||||
bool Foam::functionObjects::timeControl::active() const
|
||||
{
|
||||
return
|
||||
time_.value() >= timeStart_
|
||||
&& time_.value() <= timeEnd_;
|
||||
time_.value() >= startTime_
|
||||
&& time_.value() <= endTime_;
|
||||
}
|
||||
|
||||
|
||||
@ -69,8 +77,8 @@ Foam::functionObjects::timeControl::timeControl
|
||||
functionObject(name),
|
||||
time_(t),
|
||||
dict_(dict),
|
||||
timeStart_(-vGreat),
|
||||
timeEnd_(vGreat),
|
||||
startTime_(-vGreat),
|
||||
endTime_(vGreat),
|
||||
nStepsToStartTimeChange_
|
||||
(
|
||||
dict.lookupOrDefault("nStepsToStartTimeChange", 3)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -71,10 +71,10 @@ class timeControl
|
||||
// Optional user inputs
|
||||
|
||||
//- Activation time - defaults to -vGreat
|
||||
scalar timeStart_;
|
||||
scalar startTime_;
|
||||
|
||||
//- De-activation time - defaults to vGreat
|
||||
scalar timeEnd_;
|
||||
scalar endTime_;
|
||||
|
||||
//- Number of steps before the dump-time during which deltaT
|
||||
// may be changed (valid for adjustableRunTime)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -29,7 +29,7 @@ Description
|
||||
solvers with adjustTimeStep control (e.g. pimpleFoam). Makes no attempt
|
||||
to cooperate with other timeStep 'controllers' (maxCo, other
|
||||
functionObjects). Supports 'enabled' flag but none of the other ones
|
||||
'timeStart', 'timeEnd', 'writeControl' etc.
|
||||
'startTime', 'endTime', 'writeControl' etc.
|
||||
|
||||
SourceFiles
|
||||
setTimeStepFunctionObject.C
|
||||
|
||||
@ -63,7 +63,7 @@ functions
|
||||
writeControl adjustableRunTime;
|
||||
writeInterval 0.01;
|
||||
|
||||
timeStart 10;
|
||||
startTime 10;
|
||||
|
||||
surfaceFormat vtk;
|
||||
fields (p_rgh U);
|
||||
|
||||
Reference in New Issue
Block a user