From 3e3e55cdd9720e0d8aa5494c00d0bf88f4ea2295 Mon Sep 17 00:00:00 2001 From: lcrippa Date: Thu, 23 May 2024 16:09:40 +0200 Subject: [PATCH] BUGFIX: two conditions on offsets for the replica and general baths called linspace without checking how many bath replicas are present. If NBATH=1 (e.g. for debug) linspace would fail. --- src/ED_BATH/ED_BATH_DMFT.f90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ED_BATH/ED_BATH_DMFT.f90 b/src/ED_BATH/ED_BATH_DMFT.f90 index acdbe91d..e8372c56 100644 --- a/src/ED_BATH/ED_BATH_DMFT.f90 +++ b/src/ED_BATH/ED_BATH_DMFT.f90 @@ -230,7 +230,7 @@ subroutine init_dmft_bath(dmft_bath_,used) diagonal_hsym = is_diagonal(Hreplica_basis(isym)%O) one_lambdaval = Hreplica_lambda(Nbath,isym) all_lambdas_are_equal = all(Hreplica_lambda(:,isym)==one_lambdaval) - if(diagonal_hsym.AND.all_lambdas_are_equal)then + if(diagonal_hsym.AND.all_lambdas_are_equal.AND.Nbath>1)then offset=linspace(-ed_offset_bath,ed_offset_bath,Nbath) if(is_identity(Hreplica_basis(isym)%O).AND.mod(Nbath,2)==0)then offset(Nbath/2) = max(-1.d-1,offset(Nbath/2)) @@ -274,7 +274,7 @@ subroutine init_dmft_bath(dmft_bath_,used) diagonal_hsym = is_diagonal(Hgeneral_basis(isym)%O) one_lambdaval = Hgeneral_lambda(Nbath,isym) all_lambdas_are_equal = all(Hgeneral_lambda(:,isym)==one_lambdaval) - if(diagonal_hsym.AND.all_lambdas_are_equal)then + if(diagonal_hsym.AND.all_lambdas_are_equal.AND.Nbath>1)then offset=linspace(-ed_offset_bath,ed_offset_bath,Nbath) if(is_identity(Hgeneral_basis(isym)%O).AND.mod(Nbath,2)==0)then offset(Nbath/2) = max(-1.d-1,offset(Nbath/2))