functionObjects/setTimeStep: Compatibility with 'adjustableRunTime'
setTimeStep is now compatible with a 'writeControl adjustableRunTime;' setting in the systemControlDict. If 'adjustableRunTime' is selected then the time-step values set by this function object will not be exactly as specified, but write intervals will be matched exactly. All function object time adjustment is now done during the execute methods, so the specific setTimeStep hooks have been removed.
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-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -628,43 +628,6 @@ bool Foam::functionObjectList::end()
|
||||
}
|
||||
|
||||
|
||||
bool Foam::functionObjectList::setTimeStep()
|
||||
{
|
||||
bool set = true;
|
||||
|
||||
if (execution_)
|
||||
{
|
||||
if (!updated_)
|
||||
{
|
||||
read();
|
||||
}
|
||||
|
||||
wordList names;
|
||||
|
||||
forAll(*this, oi)
|
||||
{
|
||||
if (operator[](oi).setTimeStep())
|
||||
{
|
||||
names.append(operator[](oi).name());
|
||||
set = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (names.size() > 1)
|
||||
{
|
||||
WarningInFunction << "Multiple function objects (" << names[0];
|
||||
for (label i = 1; i < names.size(); ++ i)
|
||||
{
|
||||
WarningInFunction << ", " << names[i];
|
||||
}
|
||||
WarningInFunction << ") are setting the time step." << endl;
|
||||
}
|
||||
}
|
||||
|
||||
return set;
|
||||
}
|
||||
|
||||
|
||||
Foam::scalar Foam::functionObjectList::timeToNextWrite()
|
||||
{
|
||||
scalar result = vGreat;
|
||||
|
||||
Reference in New Issue
Block a user