Hotfix magnus
Description
The Magnus propagator was broken in three different ways:
- X(magnus) was broken, adding the wrong terms and (it looks to me) making wrong assumptions about the behavior of hamiltonian_apply.
- The interpolation of the time-dependent terms of the Kohn-Sham potential was broken in 087deac5
- The times at which the interpolation were done were incorrect.
With these changes I now obtain stable propagations that conserve the total energy over long simulations and reasonable time-steps.
Also, the corresponding test is more or less useless. I'll fix this in a different merge request.
News snippet
Fixed Magnus propagator.
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 Micael Oliveira