SolverPerformance: Complete the integration of the templated SolverPerformance<Type>

Now solvers return solver performance information for all components
with backward compatibility provided by the "max" function which created
the scalar solverPerformance from the maximum component residuals from
the SolverPerformance<Type>.

The residuals functionObject has been upgraded to support
SolverPerformance<Type> so that now the initial residuals for all
(valid) components are tabulated, e.g. for the cavity tutorial case the
residuals for p, Ux and Uy are listed vs time.

Currently the residualControl option of pimpleControl and simpleControl
is supported in backward compatibility mode (only the maximum component
residual is considered) but in the future this will be upgraded to
support convergence control for the components individually.

This development started from patches provided by Bruno Santos, See
http://www.openfoam.org/mantisbt/view.php?id=1824
This commit is contained in:
Henry Weller
2015-11-10 08:50:11 +00:00
parent e8003b3967
commit 78d7482e5b
31 changed files with 428 additions and 142 deletions

View File

@ -70,15 +70,15 @@ bool Foam::pimpleControl::criteriaSatisfied()
const label fieldI = applyToField(variableName);
if (fieldI != -1)
{
const List<solverPerformance> sp(iter().stream());
const scalar residual = sp.last().initialResidual();
scalar residual = 0;
const scalar firstResidual =
maxResidual(variableName, iter().stream(), residual);
checked = true;
if (storeIni)
{
residualControl_[fieldI].initialResidual =
sp.first().initialResidual();
residualControl_[fieldI].initialResidual = firstResidual;
}
const bool absCheck = residual < residualControl_[fieldI].absTol;