ginkgo
ginkgo copied to clipboard
Adding a progress or quality of the convergence value to the stopping criterion for logging
Currently when using logging, you can get information such as the current residual_norm
which gives you an idea on the quality of your current solution is. There is a problem though with using only this information in order to tell the user the quality of the convergence, because this can be un-intuitive depending on the stopping criterion. In other words, this value needs to be interpreted depending on the context.
When using the real (absolute) Residual Norm
stopping criterion, the user sets a tolerance of tau
and the output result once the solver has converged should be in the order of tau
. Therefore, checking that the solver has converged is intuitive as you except a value similar to your parameter.
When using the Residual Norm Reduction
stopping criterion, the user sets a tolerance of tau
and the current output, which is the residual norm, depends on the initial tau
. In other words, the output is in the order of tau - initial tau
. Other stopping criterion can have similar problems. In this case verifying whether everything went correctly implies some extra calculations.
It may be useful to define a progress real
(?) value which each criterion can log to represent how close you are to the given parameter, when passing a parameter of type tau
the final output after convergence would always be in the order of tau. It may also be useful to have this sort of value for every RHS.
Another way to view it, is to consider that the criteria are basically functions which takes as input the residual, solution, residual norm and iteration count and produce a value between 0 (not converged) and 1 (converged).
s: R^m x R^n x R x N --> {0, 1}
The idea of this issue is to directly output this function to the user.
(the current priority for this is very low)