numericalEFT / Lehmann.jl

Compact Spectral Representation for Imaginary-time/Matsubara-frequency Green's Functions
https://numericalEFT.github.io/Lehmann.jl/dev
MIT License
18 stars 1 forks source link

dlr operation with sumrule needs proper warning when input is multidimensional object #23

Open fsxbhyy opened 2 years ago

fsxbhyy commented 2 years ago

When doing fourier transform of objects with dimension D > 1, sumrule needs to be an array with dimension D-1. When incorrectly using sumrule = 1.0 for an 2D object, the code pops out with:

ERROR: LoadError: MethodError: no method matching reshape(::Float64, ::Int64) Stacktrace: [1] tau2dlr(dlrGrid::DLRGrid, green::Matrix{ComplexF64}, τGrid::Vector{Float64}; error::Nothing, axis::Int64, sumrule::Float64, verbose::Bool) @ Lehmann ~/Julia_manybody3/Lehmann.jl/src/operation.jl:219 [2] tau2matfreq(dlrGrid::DLRGrid, green::Matrix{ComplexF64}, nNewGrid::Vector{Int64}, τGrid::Vector{Float64}; error::Nothing, axis::Int64, sumrule::Float64, verbose::Bool) @ Lehmann ~/Julia_manybody3/Lehmann.jl/src/operation.jl:390