Fix a numerical bug for the DIIS mixing
Description
The least square in the DIIS mixing was breaking up because the matrix was not scaled to unity before adding 1.0 on the last column. Close to convergence, this was causing the least square routine to return an eigevector been only made of 1.0.
The fix also seems to stabilize the code, as tested by valgrind+verrou, for the test periodic_systems/03-sodium_chain.01-ground_state.inp.
News snippet
Bugfix for the DIIS mixing.
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.