numericaleft / lehmann.jl Goto Github PK
View Code? Open in Web Editor NEWCompact Spectral Representation for Imaginary-time/Matsubara-frequency Green's Functions
Home Page: https://numericalEFT.github.io/Lehmann.jl/dev
License: MIT License
Compact Spectral Representation for Imaginary-time/Matsubara-frequency Green's Functions
Home Page: https://numericalEFT.github.io/Lehmann.jl/dev
License: MIT License
kernel\Omage could return complex or float depending on isFermi and symmetry arguments. Replace the argument with ::Val{isFermi} and ::Val{symmetry} to allow multiple dispatch to improve the type stability
matfreq2dlr, tau2dlr, on axis=3 will transpose other axes.
Hi, I really like this package you have designed! It offers some really cool functionality that is useful in a wide variety of contexts!
However, looking at the docs, many of the doc strings are not formatted correctly and are rendering improperly.
It is very challenging to read the package API as things stand right now.
Would it be possible to have them fixed?
error is Weight, so it can not be 0
Polarization: wrapped: Error During Test at /home/runner/work/ElectronGas.jl/ElectronGas.jl/test/polarization.jl:83
Got exception outside of a @test
InexactError: Int32(1.0e10)
Stacktrace:
[1] Int32
@ ./float.jl:702 [inlined]
[2] (::Lehmann.var"#filename#8"{Symbol})(lambda::Float64, errpower::Int32)
@ Lehmann ~/.julia/packages/Lehmann/uKJiS/src/dlr.jl:102
[3] Lehmann.DLRGrid(Euv::Float64, β::Float64, rtol::Float64, isFermi::Bool, symmetry::Symbol; rebuild::Bool, folder::Nothing, algorithm::Symbol, verbose::Bool)
@ Lehmann ~/.julia/packages/Lehmann/uKJiS/src/dlr.jl:142
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
Dear Kun,
Thank you for the nice Julia implementation of DLR. I am trying to use Lehmann.jl
in a project but have stumbled on an issue when calling the DLRGrid
builder at high temperatures.
Here is an example code that breaks throwing an ArgumentError
using Lehmann: DLRGrid
for n in range(1, 10)
β = 1000.0/2^n
dlr = DLRGrid(Euv=1., β=β, isFermi=true, rtol=1e-9, rebuild=true, verbose=false)
@show β, n, length(dlr.τ)
end
For the output please see below.
Do you think it would be possible to "harden" the behaviour of the grid builder so that it performs ok also for high temperatures?
Cheers, Hugo
(β, n, length(dlr.τ)) = (500.0, 1, 41)
(β, n, length(dlr.τ)) = (250.0, 2, 37)
(β, n, length(dlr.τ)) = (125.0, 3, 31)
(β, n, length(dlr.τ)) = (62.5, 4, 25)
(β, n, length(dlr.τ)) = (31.25, 5, 20)
(β, n, length(dlr.τ)) = (15.625, 6, 16)
(β, n, length(dlr.τ)) = (7.8125, 7, 13)
ArgumentError: reducing over an empty collection is not allowed
Stacktrace:
[1] _empty_reduce_error()
@ Base ./reduce.jl:301
[2] reduce_empty(op::Function, #unused#::Type{Float64})
@ Base ./reduce.jl:311
[3] mapreduce_empty(#unused#::typeof(identity), op::Function, T::Type)
@ Base ./reduce.jl:345
[4] reduce_empty(op::Base.MappingRF{typeof(identity), typeof(max)}, #unused#::Type{Float64})
@ Base ./reduce.jl:331
[5] reduce_empty_iter
@ ./reduce.jl:357 [inlined]
[6] mapreduce_empty_iter(f::Function, op::Function, itr::Vector{Float64}, ItrEltype::Base.HasEltype)
@ Base ./reduce.jl:353
[7] _mapreduce(f::typeof(identity), op::typeof(max), #unused#::IndexLinear, A::Vector{Float64})
@ Base ./reduce.jl:402
[8] _mapreduce_dim
@ ./reducedim.jl:330 [inlined]
[9] #mapreduce#725
@ ./reducedim.jl:322 [inlined]
[10] mapreduce
@ ./reducedim.jl:322 [inlined]
[11] #_maximum#743
@ ./reducedim.jl:894 [inlined]
[12] _maximum
@ ./reducedim.jl:894 [inlined]
[13] #_maximum#742
@ ./reducedim.jl:893 [inlined]
[14] _maximum
@ ./reducedim.jl:893 [inlined]
[15] #maximum#740
@ ./reducedim.jl:889 [inlined]
[16] maximum
@ ./reducedim.jl:889 [inlined]
[17] testInterpolation(dlrGrid::DLRGrid{Float64, :none}, τ::Lehmann.Discrete.CompositeChebyshevGrid, ω::Lehmann.Discrete.CompositeChebyshevGrid, kernel::Matrix{Float64}, print::Bool)
@ Lehmann.Discrete ~/.julia/packages/Lehmann/v7X4o/src/discrete/kernel.jl:137
[18] build(dlrGrid::DLRGrid{Float64, :none}, print::Bool)
@ Lehmann.Discrete ~/.julia/packages/Lehmann/v7X4o/src/discrete/builder.jl:119
[19] _build!(dlrGrid::DLRGrid{Float64, :none}, folder::Nothing, filename::String, algorithm::Symbol, verbose::Bool)
@ Lehmann ~/.julia/packages/Lehmann/v7X4o/src/dlr.jl:338
[20] DLRGrid(Euv::Float64, β::Float64, rtol::Float64, isFermi::Bool, symmetry::Symbol; rebuild::Bool, folder::Nothing, algorithm::Symbol, verbose::Bool, dtype::Type)
@ Lehmann ~/.julia/packages/Lehmann/v7X4o/src/dlr.jl:172
[21] #DLRGrid#7
@ ~/.julia/packages/Lehmann/v7X4o/src/dlr.jl:189 [inlined]
[22] top-level scope
@ ./In[20]:5
so that user don't need to call fourier transform like tau2dlr(:fermi, fdlr, ... ), instead just tau2dlr( fdlr, ...)
In the current implementation dlr2matfreq and tau2matfreq only accept n grid of Int type as the aim grid.
It's more convenient to allow grid of Real number for the purpose of interpolation between different temperatures and perform calculation on an interpolated continuous frequency grid.
_tensor2matrix and _matrix2tensor are type unstable
Which could imply that Lehmann representation failed.
This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml
to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix
on this issue.
I'll open a PR within a few hours, please be patient!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.