Skip to content

Commit bcfc57e

Browse files
committed
Correct smooth cutoff
1 parent a26d0c4 commit bcfc57e

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

ChainOhmT/quadohmT.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ function ohmicspectraldensity_finiteT(x,i,α,s,ωc,β; smooth=false)
7474
y = 0
7575
elseif i==2
7676
if smooth
77-
y = -2 .*( α*abs.(x).^s ./ ωc^(s-1)) .* (coth.((β/2).*x) .+ 1)./2 .* exp(-abs(x)/wc)
77+
y = -2 .*( α*abs.(x).^s ./ ωc^(s-1)) .* (coth.((β/2).*x) .+ 1)./2 .* exp.(-abs.(x) ./ ωc)
7878
else
7979
y = -2 .*( α*abs.(x).^s ./ ωc^(s-1)) .* (coth.((β/2).*x) .+ 1)./2
8080
end
8181
elseif i==3
8282
if smooth
83-
y = 2 .*( α*abs.(x).^s ./ ωc^(s-1)) .* (coth.((β/2).*x) .+ 1)./2 .* exp(-abs(x)/wc)
83+
y = 2 .*( α*abs.(x).^s ./ ωc^(s-1)) .* (coth.((β/2).*x) .+ 1)./2 .* exp.(-abs.(x) ./ ωc)
8484
else
8585
y = 2 .*( α*abs.(x).^s ./ ωc^(s-1)) .* (coth.((β/2).*x) .+ 1)./2
8686
end

examples/bath-observables.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ tfinal = 60.0 # simulation time
3434
if β ==
3535
cpars = chaincoeffs_ohmic(N, α, s; ωc=ωc) # chain parameters, i.e. on-site energies ϵ_i, hopping energies t_i, and system-chain coupling c_0
3636
else
37-
cpars = chaincoeffs_finiteT(N, β; α=α, s=s, J=nothing, ωc=ωc, mc=4, mp=0, AB=nothing, iq=1, idelta=2, procedure=:Lanczos, Mmax=5000, save=false) # chain parameters, i.e. on-site energies ϵ_i, hopping energies t_i, and system-chain coupling c_0
37+
cpars = chaincoeffs_finiteT(N, β; α=α, s=s, J=nothing, ωc=ωc, mc=4, mp=0, AB=nothing, iq=1, idelta=2, procedure=:Lanczos, Mmax=5000, save=false, smooth=false) # chain parameters, i.e. on-site energies ϵ_i, hopping energies t_i, and system-chain coupling c_0
3838
#=
3939
#If cpars is stored in "../ChainOhmT/ohmicT"
4040
curdir = @__DIR__

examples/puredephasing.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ s = 1 # ohmicity
3838
if β ==
3939
cpars = chaincoeffs_ohmic(N, α, s; ωc=ωc) # chain parameters, i.e. on-site energies ϵ_i, hopping energies t_i, and system-chain coupling c_0
4040
else
41-
cpars = chaincoeffs_finiteT(N, β; α=α, s=s, J=nothing, ωc=ωc, mc=4, mp=0, AB=nothing, iq=1, idelta=2, procedure=:Lanczos, Mmax=5000, save=true) # chain parameters, i.e. on-site energies ϵ_i, hopping energies t_i, and system-chain coupling c_0
41+
cpars = chaincoeffs_finiteT(N, β; α=α, s=s, J=nothing, ωc=ωc, mc=4, mp=0, AB=nothing, iq=1, idelta=2, procedure=:Lanczos, Mmax=5000, save=false, smooth=false) # chain parameters, i.e. on-site energies ϵ_i, hopping energies t_i, and system-chain coupling c_0
4242
#=#If cpars is stored in "../ChainOhmT/ohmicT"
4343
curdir = @__DIR__
4444
dir_chaincoeff = abspath(joinpath(curdir, "../ChainOhmT/ohmicT"))

examples/sbm_tailored_specdensity.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ if Jω_type==:Discrete
105105

106106
elseif Jω_type==:Continuous
107107

108-
cpars = chaincoeffs_finiteT(N, β, false; α=α, s=s, J=Jω_fct, ωc=ωc, mc=size(AB)[1], mp=0, AB=AB, iq=1, idelta=2, procedure=:Lanczos, Mmax=5000, save=false) # chain parameters, i.e. on-site energies ϵ_i, hopping energies t_i, and system-chain coupling c_0
108+
cpars = chaincoeffs_finiteT(N, β, false; α=α, s=s, J=Jω_fct, ωc=ωc, mc=size(AB)[1], mp=0, AB=AB, iq=1, idelta=2, procedure=:Lanczos, Mmax=5000, save=false, smooth=false) # chain parameters, i.e. on-site energies ϵ_i, hopping energies t_i, and system-chain coupling c_0
109109

110110
end
111111

src/finitetemperature.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ Users can provide their own spectral density.
2727
* AB: component intervals. The defaut intervals are [[-Inf -ωc];[-ωc 0];[0 ωc];[ωc Inf]].
2828
* Mmax: maximum number of integration points
2929
* save: if true the coefficients are saved
30+
* smooth: if true the spectral density is multiplied by a decreasing exponential instead of a Heaviside function.
3031
"""
31-
function chaincoeffs_finiteT(nummodes, β, ohmic=true; α=1, s=1, J=nothing, ωc=1, mc=4, mp=0, AB=nothing, iq=1, idelta=2, procedure=:Lanczos, Mmax=5000, save=true)
32+
function chaincoeffs_finiteT(nummodes, β, ohmic=true; α=1, s=1, J=nothing, ωc=1, mc=4, mp=0, AB=nothing, iq=1, idelta=2, procedure=:Lanczos, Mmax=5000, save=true, smooth=false)
3233

3334
N = nummodes #Number of bath modes
3435

@@ -45,7 +46,7 @@ function chaincoeffs_finiteT(nummodes, β, ohmic=true; α=1, s=1, J=nothing, ωc
4546

4647
# Express the spectral density according to the intervals
4748
if ohmic==true
48-
wf(x,i) = ohmicspectraldensity_finiteT(x,i,α,s,ωc,β)
49+
wf(x,i) = ohmicspectraldensity_finiteT(x,i,α,s,ωc,β; smooth=smooth)
4950
elseif J==nothing
5051
throw(ArgumentError("A spectral density should have been provided."))
5152
else

0 commit comments

Comments
 (0)