Skip to content

Change the logic of the checks in the routines taking care of the nonlocal...

Nicolas Tancogne-Dejean requested to merge return_to_asserts into develop

Description

Change the logic of the checks in the routines taking care of the nonlocal part of the pseudopotentials. This avoid getting into the return clause when the code should fail. At the moment the code is not correct for the calculation of the electronic current in the batchified version, as some pseudopotentials are not treated using the projections matrices. With this change, this will be protected by the assertion and the code will fail, instead of doing silently something wrong (or to lead to a segmentation fault).

News snippet

Adding a safeguard for some routines.

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