Iterative solver cleanup
This MR removes duplicate code in iterative solvers by moving
- convergence check
- invalid defect norm check (inf or NaN)
- output
to a class Iteration
. A instance of this class is created with IterativeSolver::startIteration
and is intended to be kept in the local scope of the apply method. During iteration the method Iteration::step
checks for all the things mentioned above. The destructor fills all fields of InverseOperatorResult
and prints the final statistics if verbose
is positive.