Residuals
Tolerances
Equation tolerances are described in terms of absolute and relative quantities:
tolerance 1e-6;
relTol 0.1;
If the equation initial residual satisfies either of the specified values, the system of equations are assumed solved and will not be evolved.
Calculation
The residual calculation is solver-specific. However, the general approach follows:
For a matrix system
the residual is defined as
We then apply residual scaling using the following normalisation procedure:
where is the average of the solution vector. The scaled residual is finally given by:
This form leads to a normalised residual of 1 for uniform systems, i.e. where . However, this also shows that if the initial solution changes, e.g. using non-uniform conditions, the normalisation also changes, leading to a different convergence history.