CG improvements to reach very accurate convergence
Description
Improve CG to be able to converge the relative density down to 1e-15. Normalize the CG vectors and the preconditioned SD vectors to have vectors of similar size. This makes the convergence better-behaved. Also change the exit criteria to reach these high accuracies: do not use the energy as criterion as the energy can converge much faster than the residue. Only use the residue as a criterion. Allow an early exit if the iteration if the residue is small enough compared to the initial residue or if it does not change considerably anymore; but allow this only if the residue is far away from the tolerance we want to reach. Otherwise, convergence can be spoiled.
News snippet
CG improvements to reach very accurate convergence
Checklist
-
I have checked that my code follows the Octopus coding standards -
I have added tests for all the new features added in this request.
Edited by Sebastian Ohlmann