Skip to content

Commit

Permalink
udpate all deps; Tsit5->Vern6
Browse files Browse the repository at this point in the history
  • Loading branch information
AshtonSBradley committed Apr 30, 2024
1 parent 5f582c8 commit 092f361
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"

[compat]
DiffEqCallbacks = "2, 2.1"
DiffEqCallbacks = "2,3"
FFTW = "1, 1.4"
FileIO = "1, 1.8, 1.9"
FillArrays = "0.12"
FillArrays = "~1"
JLD2 = "0.4"
LazyArrays = "0.22"
LazyArrays = "~1"
OrdinaryDiffEq = "5, 5.6, 6"
PaddedViews = "0.5.1"
Parameters = "0.12"
ProgressMeter = "1, 1.5, 1.6, 1.7"
RecursiveArrayTools = "2, 2.2"
RecursiveArrayTools = "~3"
Reexport = "1, 1.2"
julia = "1.7, 1.8"
julia = "1.9,1.10"
10 changes: 5 additions & 5 deletions src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ struct KField{D} <: Field
end

@with_kw mutable struct Transforms{D,N} <: TransformLibrary
Txk::AbstractFFTs.ScaledPlan{Complex{Float64},FFTW.cFFTWPlan{Complex{Float64},-1,false,D,UnitRange{Int64}},Float64} = 0.1*plan_fft(crandn_array(D))
Txk!::AbstractFFTs.ScaledPlan{Complex{Float64},FFTW.cFFTWPlan{Complex{Float64},-1,true,D,UnitRange{Int64}},Float64} = 0.1*plan_fft!(crandn_array(D))
Tkx::AbstractFFTs.ScaledPlan{Complex{Float64},FFTW.cFFTWPlan{Complex{Float64},1,false,D,UnitRange{Int64}},Float64} = 0.1*plan_ifft(crandn_array(D))
Tkx!::AbstractFFTs.ScaledPlan{Complex{Float64},FFTW.cFFTWPlan{Complex{Float64},1,true,D,UnitRange{Int64}},Float64} = 0.1*plan_ifft!(crandn_array(D))
Txk = 0.1*plan_fft(crandn_array(D))
Txk! = 0.1*plan_fft!(crandn_array(D))
Tkx = 0.1*plan_ifft(crandn_array(D))
Tkx! = 0.1*plan_ifft!(crandn_array(D))
psi::ArrayPartition = crandnpartition(D,N)
end

Expand All @@ -46,7 +46,7 @@ end
V0::Array{Float64,D} = zeros(N)
t::LinRange{Float64} = LinRange(ti,tf,Nt) # time of saves
ϕi::Array{Complex{Float64},D} = zeros(N) |> complex # initial condition
alg::OrdinaryDiffEq.OrdinaryDiffEqAdaptiveAlgorithm = Tsit5() # default solver
alg::OrdinaryDiffEq.OrdinaryDiffEqAdaptiveAlgorithm = Vern6() # default solver
reltol::Float64 = 1e-6 # default tolerance; may need to use 1e-7 for corner cases
flags::UInt32 = FFTW.MEASURE # choose a plan. PATIENT, NO_TIMELIMIT, EXHAUSTIVE
# === saving
Expand Down
4 changes: 2 additions & 2 deletions test/test_dynamics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ t = LinRange(0.,tf,Nt)
sim2 = Sim(sim;γ = 0.0,tf=tf,t=t)

#make initial state
ϕi = sol[end]
ϕi = sol.u[end]
@pack! sim2 = ϕi

sol2,err = testsim(sim2)
@test err == false

psitest = xspace(sol2[end],sim2)
psitest = xspace(sol2.u[end],sim2)
npeak = abs2.(psitest[256])
@test isapprox(g*npeak,μ,rtol=1e-2)
2 changes: 1 addition & 1 deletion test/test_groundstate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ runsim(sim;info=false)
sol,err = testsim(sim)
@test err == false

psitest = xspace(sol[end],sim)
psitest = xspace(sol.u[end],sim)
npeak = abs2.(psitest[256])
@test isapprox(g*npeak,μ,rtol=1e-2)

0 comments on commit 092f361

Please sign in to comment.