mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: adding hook adjustTimeStep to function objects. The hook is called in
Time::adjustDeltaT(). It allows function objects to manipulate the time step to
dump at adjustable times. The following options are available for output in
function objects: timeStep, outputTime, adjustableTime, runTime, clockTime
and cpuTime.
This commit is contained in:
@ -211,6 +211,27 @@ bool Foam::functionObjectList::timeSet()
|
||||
}
|
||||
|
||||
|
||||
bool Foam::functionObjectList::adjustTimeStep()
|
||||
{
|
||||
bool ok = true;
|
||||
|
||||
if (execution_)
|
||||
{
|
||||
if (!updated_)
|
||||
{
|
||||
read();
|
||||
}
|
||||
|
||||
forAll(*this, objectI)
|
||||
{
|
||||
ok = operator[](objectI).adjustTimeStep() && ok;
|
||||
}
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
bool Foam::functionObjectList::read()
|
||||
{
|
||||
bool ok = true;
|
||||
|
||||
Reference in New Issue
Block a user