Skip to content

Fixed one body for state combination outside of batch dimension

Francesco Troisi requested to merge further_fix_in_body_me into main

Description

The one body matrix element for combination of states outside of the batch dimensions were 0. For instance, the dimension of the state batch on Ada is 32 states. The one body <1|H|j> /= 0 for j <= 32, but <1|H|j> == 0 for j > 32. This is because we were reading the upper triangular part of matrix, while only the lower triangular was had non zero elements.

Also, I think it is better to feed the subroutine X(mesh_batch_dotp_matrix) with a temporary array instead of the one where we return the result, to avoid possible noise. The difference is between the two approaches is quite big: order of 10^-3

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 Francesco Troisi

Merge request reports