Add Kerker preconditioner for Broyden mixing
Description
Implement Kerker preconditioning in real space for Broyden mixing according to: Shiihara, Y., Kuwazuru, O., Yoshikawa, N., 2008. Real-space Kerker method for self-consistent calculation using non-orthogonal basis functions. Modelling Simul. Mater. Sci. Eng. 16, 035004.
The implementation uses the linear CG solver to solve: A (\Delta - q_0^2)^-1 \Delta f which corresponds to A q^2/(q^2 + q_0^2) in Fourier space.
Results
Benchmark set results run with commit b3a91673 demonstrate that in ~ 50% of the tests, using preconditioning slightly outperforms or breaks even with no preconditioning of the potential. In cases such as Fe, it may be that the calculation parameters simply are not converged, hindering SCF convergence. This should be investigated further. In the figure, the left column is the Kerker parameter, and the right column is the mixing coefficient.
Update 5-6 March 2023
After looking at the code structure, it became clear that one could do away with all the if-statements in broyden_extrapolation
and inject the (preconditioned) residual in (f and df) from the caller. This automatically resolves issue #946 (closed). This also ensures that preconditioned residuals are consistently used in all parts of the mixing algorithm.
Use of preconditioned residuals was also extended to external fields (i.e. LDA + U) in the Broyden mixing scheme. As such:
-
Re-run calculations on ADA following and post the timings here
Benchmark set results where I ensure that the preconditioned residuals are saved in the history. The qualitative trends are the same. Unfortunately there's still no improvement over the use of no preconditioning.
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.