Skip to content

Commit

Permalink
Better for solution near zero gx trace
Browse files Browse the repository at this point in the history
  • Loading branch information
william-dawson committed Sep 27, 2023
1 parent bd2af00 commit 7eada88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Fortran/DensityMatrixSolversModule.F90
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ SUBROUTINE TRS4(H, ISQ, trace, K, &

!! Compute Sigma - avoiding overflow
IF (ABS(trace_gx) .LT. 1.0e-14_NTREAL) THEN
sigma_array(II) = sigma_max + 1.0_NTREAL
sigma_array(II) = 0.5_NTREAL * (sigma_max - sigma_min)
ELSE
sigma_array(II) = (trace - trace_fx) / trace_gx
END IF
Expand Down

0 comments on commit 7eada88

Please sign in to comment.