Skip to content

Commit

Permalink
more LAPACK bug workarounds
Browse files Browse the repository at this point in the history
  • Loading branch information
pablosanjose committed May 14, 2021
1 parent db363c9 commit 4825d77
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions test/test_greens.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ end
end

@testset "greens singleshot spectra" begin
h = LP.honeycomb() |> hamiltonian(hopping(1)) |> unitcell((1,-1), region = r->abs(r[2])<3)
g = greens(h, Schur1D())
dos = [-imag(tr(g(w))) for w in range(-3.2, 3.2, length = 101)]
@test all(x -> Quantica.chop(x) >= 0, dos)
# Broken until https://github.com/Reference-LAPACK/lapack/issues/477 comes to julia
if VERSION >= v"1.7.0-DEV"
h = LP.honeycomb() |> hamiltonian(hopping(1)) |> unitcell((1,-1), region = r->abs(r[2])<3)
g = greens(h, Schur1D())
dos = [-imag(tr(g(w))) for w in range(-3.2, 3.2, length = 101)]
@test all(x -> Quantica.chop(x) >= 0, dos)

h = LP.honeycomb() |> hamiltonian(hopping(1, range = 2)) |> unitcell((1,-1), region = r->abs(r[2])<3)
g = greens(h, Schur1D())
dos = [-imag(tr(g(w))) for w in range(-6, 6, length = 101)]
@test all(x -> Quantica.chop(x) >= 0, dos)
h = LP.honeycomb() |> hamiltonian(hopping(1, range = 2)) |> unitcell((1,-1), region = r->abs(r[2])<3)
g = greens(h, Schur1D())
dos = [-imag(tr(g(w))) for w in range(-6, 6, length = 101)]
@test all(x -> Quantica.chop(x) >= 0, dos)

h = LatticePresets.honeycomb() |> hamiltonian(hopping(1)) |> unitcell((1,-1),(2,2)) |> wrap(2)
g = greens(h, Schur1D())
dos = [-imag(tr(g(w))) for w in range(-3.2, 3.2, length = 101)]
@test all(x -> Quantica.chop(x) >= 0, dos)
h = LatticePresets.honeycomb() |> hamiltonian(hopping(1)) |> unitcell((1,-1),(2,2)) |> wrap(2)
g = greens(h, Schur1D())
dos = [-imag(tr(g(w))) for w in range(-3.2, 3.2, length = 101)]
@test all(x -> Quantica.chop(x) >= 0, dos)

# Broken until https://github.com/Reference-LAPACK/lapack/issues/477 comes to julia
if VERSION >= v"1.7.0-DEV"
h = LatticePresets.honeycomb() |> hamiltonian(hopping((r, dr) -> 1/(dr'*dr), range = 1)) |> unitcell((1,-1),(2,2)) |> wrap(2)
g = greens(h, Schur1D())
dos = [-imag(tr(g(w))) for w in range(-3.2, 3.2, length = 101)]
Expand Down

0 comments on commit 4825d77

Please sign in to comment.