Skip to content

Improve the Maxwell time propagation: better batchification and new Leapfrog propagator

Sebastian Ohlmann requested to merge maxwell_leapfrog into main

Description

Improve the usage of batches in the Maxwell code: now the RS state is by default a packed batch, i.e. it lives on the GPU for GPU runs. It is explicitly fetched for those parts that are not yet ported. A few new functions have been ported to GPUs, e.g. the computation of the energy and selecting some points for output.

In addition a new Leapfrog propagator has been implemented that uses a simpler scheme (always 3-component RS vectors) and is much faster as it applies the Hamiltonian only once. It is second order in time. It cannot be used for linear media with non-zero conductivities and for dispersive media because in those cases the eigenvalues have non-zero real parts and this makes the scheme unstable. I have checked that the results are very similar to the old scheme.

To do:

  • mention in documentation
  • some more refactoring

News snippet

Improved Maxwell propagation; new Leapfrog 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 Sebastian Ohlmann

Merge request reports