ENH: use residual from the first iteration for residualControl

This commit is contained in:
Mark Olesen
2010-06-02 15:56:51 +02:00
parent db8b5e6b8a
commit fed204aad6

View File

@ -47,8 +47,12 @@ bool Foam::residualControl::checkCriteria(const bool verbose) const
if (maxResiduals_.readIfPresent(variableName, maxResidual)) if (maxResiduals_.readIfPresent(variableName, maxResidual))
{ {
// use the residual from the first solution
const scalar eqnResidual = const scalar eqnResidual =
lduMatrix::solverPerformance(iter().stream()).initialResidual(); List<lduMatrix::solverPerformance>
(
iter().stream()
).first().initialResidual();
achieved = achieved && (eqnResidual < maxResidual); achieved = achieved && (eqnResidual < maxResidual);