Skip to content

Call submesh_init less often

Kevin Lively requested to merge call_submesh_init_less into main

Description

At present, when ions are dynamic, submesh_init is called at least twice and in the case of periodic systems at least three times per time step. This turns out to be the dominating calculation in real time propagation, especially when gpu acceleration is activated. This merge request is to reduce the number of calls to submesh_init by recycling some of the submeshes generated, in particular in epot_local_potential / ion_electron_local_potential_calculate in cases when pseudopotentials have long range parts. There are also optimizations to the periodic part of the submesh_init mapping calculation.

News snippet

Dynamic ions in periodic systems are for most pseudopotentials faster.

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.

Merge request reports