From 20eb89a10e97c010795d76dbbfc9f21e5cecb5cb Mon Sep 17 00:00:00 2001 From: William Dawson Date: Wed, 27 Sep 2023 16:12:39 +0900 Subject: [PATCH] Better for solution near zero gx trace --- Source/Fortran/DensityMatrixSolversModule.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Fortran/DensityMatrixSolversModule.F90 b/Source/Fortran/DensityMatrixSolversModule.F90 index 27c9e7bf..99fe22d6 100644 --- a/Source/Fortran/DensityMatrixSolversModule.F90 +++ b/Source/Fortran/DensityMatrixSolversModule.F90 @@ -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