From fed204aad6dab7f88f6a2521bf3c0ac1bac9c49d Mon Sep 17 00:00:00 2001 From: Mark Olesen <Mark.Olesen@Germany> Date: Wed, 2 Jun 2010 15:56:51 +0200 Subject: [PATCH] ENH: use residual from the first iteration for residualControl --- .../jobControl/residualControl/residualControl.C | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/postProcessing/functionObjects/jobControl/residualControl/residualControl.C b/src/postProcessing/functionObjects/jobControl/residualControl/residualControl.C index a7ad2233cfc..b8205f86243 100644 --- a/src/postProcessing/functionObjects/jobControl/residualControl/residualControl.C +++ b/src/postProcessing/functionObjects/jobControl/residualControl/residualControl.C @@ -47,8 +47,12 @@ bool Foam::residualControl::checkCriteria(const bool verbose) const if (maxResiduals_.readIfPresent(variableName, maxResidual)) { + // use the residual from the first solution const scalar eqnResidual = - lduMatrix::solverPerformance(iter().stream()).initialResidual(); + List<lduMatrix::solverPerformance> + ( + iter().stream() + ).first().initialResidual(); achieved = achieved && (eqnResidual < maxResidual); -- GitLab