@@ -75,6 +75,8 @@ Because of this, if you want to calculate the filling at a different chemical po
75
75
Eks = reshape (getindex .(M. Ham. bands, Ref (1 : N÷ 2 )), prod (M. bz. gridSize))
76
76
U11s = reshape (getindex .(M. Ham. states, Ref (1 : N÷ 2 ), Ref (1 : N÷ 2 )), prod (M. bz. gridSize))
77
77
U21s = reshape (getindex .(M. Ham. states, Ref (N÷ 2 + 1 : N), Ref (1 : N÷ 2 )), prod (M. bz. gridSize))
78
+ U12s = reshape (getindex .(M. Ham. states, Ref (1 : N÷ 2 ), Ref (N÷ 2 + 1 : N)) , prod (M. bz. gridSize))
79
+ U22s = reshape (getindex .(M. Ham. states, Ref (N÷ 2 + 1 : N), Ref (N÷ 2 + 1 : N)) , prod (M. bz. gridSize))
78
80
79
81
nFs = DistFunction .(Eks; T= M. T, mu= 0.0 , stat= M. stat)
80
82
@@ -134,7 +136,7 @@ Finding the Greens functions, and anomalous greens functions in momentum space a
134
136
nFs = DistFunction .(Eks; T= M. T, mu= 0.0 , stat= M. stat)
135
137
136
138
@reduce Gk[k1][i, j] |= sum (l) ((conj (U11s[k1][i, l]) * U11s[k1][j, l] * nFs[k1][l])
137
- + (conj (U12s [k1][i, l]) * U12s [k1][j, l] * (1 - nFs[k1][l])))
139
+ + (conj (U21s [k1][i, l]) * U21s [k1][j, l] * (1 - nFs[k1][l])))
138
140
139
141
@reduce Fk[k1][i, j] |= sum (l) ((conj (U11s[k1][i, l]) * U21s[k1][j, l] * nFs[k1][l])
140
142
+ (conj (U12s[k1][i, l]) * U22s[k1][j, l] * (1 - nFs[k1][l])))
@@ -171,7 +173,8 @@ one-step function to find all the attributes in BdGModel after it has been init
171
173
"""
172
174
function SolveModel! (M:: BdGModel ; mu_guess:: Float64 = 2 * M. Ham. bandwidth[1 ] + 2 * M. filling * (M. Ham. bandwidth[2 ] - M. Ham. bandwidth[1 ]), get_correlations:: Bool = true , get_gap:: Bool = false , verbose:: Bool = true , mu_tol:: Float64 = 1e-3 , filling_tol:: Float64 = 1e-6 )
173
175
@assert M. Ham. is_BdG== true " Use other format for pure hopping Hamiltonian"
174
-
176
+ # println(mu_guess)
177
+ # println(M.Ham.bandwidth)
175
178
if M. filling< 0 # #### Must imply that filling was not provided by user and hence needs to be calculated from given mu
176
179
GetFilling! (M)
177
180
else
0 commit comments