solutionControl: Execute function objects after residual check
Function objects that write need to execute after the residual checks so
that the associated modification of the time state correctly makes them
write on the final iteration.
This reverts commit c6089ae3a6, meaning
that residual controls can no longer apply to fields solved for as part
of function object executions.
Creating a system which permits solutions done within function objects
to be subject to residual control, *and* which correctly causes function
objects to write on final iterations, would be significantly more
complex.
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) 2018-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2018-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -101,14 +101,12 @@ bool Foam::pimpleControl::run(Time& time)
|
||||
{
|
||||
read();
|
||||
|
||||
time.run();
|
||||
|
||||
if (!endIfConverged(time))
|
||||
{
|
||||
storePrevIterFields();
|
||||
}
|
||||
|
||||
return time.running();
|
||||
return time.run();
|
||||
}
|
||||
|
||||
|
||||
@ -116,22 +114,12 @@ bool Foam::pimpleControl::loop(Time& time)
|
||||
{
|
||||
read();
|
||||
|
||||
time.run();
|
||||
|
||||
if (!endIfConverged(time))
|
||||
{
|
||||
storePrevIterFields();
|
||||
}
|
||||
|
||||
if (time.running())
|
||||
{
|
||||
time ++;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return time.loop();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2018-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2018-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -309,8 +309,6 @@ bool Foam::pimpleMultiRegionControl::run(Time& time)
|
||||
{
|
||||
read();
|
||||
|
||||
time.run();
|
||||
|
||||
if (!endIfConverged(time))
|
||||
{
|
||||
forAll(pimpleControls_, i)
|
||||
@ -323,7 +321,7 @@ bool Foam::pimpleMultiRegionControl::run(Time& time)
|
||||
}
|
||||
}
|
||||
|
||||
return time.running();
|
||||
return time.run();
|
||||
}
|
||||
|
||||
|
||||
@ -331,8 +329,6 @@ bool Foam::pimpleMultiRegionControl::loop(Time& time)
|
||||
{
|
||||
read();
|
||||
|
||||
time.run();
|
||||
|
||||
if (!endIfConverged(time))
|
||||
{
|
||||
forAll(pimpleControls_, i)
|
||||
@ -345,15 +341,7 @@ bool Foam::pimpleMultiRegionControl::loop(Time& time)
|
||||
}
|
||||
}
|
||||
|
||||
if (time.running())
|
||||
{
|
||||
time ++;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return time.loop();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2018-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2018-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -66,14 +66,12 @@ bool Foam::simpleControl::run(Time& time)
|
||||
{
|
||||
read();
|
||||
|
||||
time.run();
|
||||
|
||||
if (!endIfConverged(time))
|
||||
{
|
||||
storePrevIterFields();
|
||||
}
|
||||
|
||||
return time.running();
|
||||
return time.run();
|
||||
}
|
||||
|
||||
|
||||
@ -81,22 +79,12 @@ bool Foam::simpleControl::loop(Time& time)
|
||||
{
|
||||
read();
|
||||
|
||||
time.run();
|
||||
|
||||
if (!endIfConverged(time))
|
||||
{
|
||||
storePrevIterFields();
|
||||
}
|
||||
|
||||
if (time.running())
|
||||
{
|
||||
time ++;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return time.loop();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user