From 092f361dfe92f77e216eb6db6bad7004abff5b01 Mon Sep 17 00:00:00 2001 From: Ashton Bradley Date: Tue, 30 Apr 2024 13:27:25 +1200 Subject: [PATCH 1/4] udpate all deps; Tsit5->Vern6 --- Project.toml | 10 +++++----- src/types.jl | 10 +++++----- test/test_dynamics.jl | 4 ++-- test/test_groundstate.jl | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Project.toml b/Project.toml index 6bca881..2666ec6 100644 --- a/Project.toml +++ b/Project.toml @@ -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" diff --git a/src/types.jl b/src/types.jl index 6d2a54e..e3b21ea 100644 --- a/src/types.jl +++ b/src/types.jl @@ -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 @@ -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 diff --git a/test/test_dynamics.jl b/test/test_dynamics.jl index 37432cb..1e2d716 100644 --- a/test/test_dynamics.jl +++ b/test/test_dynamics.jl @@ -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) diff --git a/test/test_groundstate.jl b/test/test_groundstate.jl index a403ee0..d7a7d77 100644 --- a/test/test_groundstate.jl +++ b/test/test_groundstate.jl @@ -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) From 5cdb8eda138d77e636248b0095cf846b53d2a828 Mon Sep 17 00:00:00 2001 From: Ashton Bradley Date: Tue, 30 Apr 2024 13:28:57 +1200 Subject: [PATCH 2/4] @JuliaRegistrator register() --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 2666ec6..36eccb8 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "FourierGPE" uuid = "f013a474-557c-11e9-3596-438edcad9d97" authors = ["Ashton Bradley "] -version = "0.1.0" +version = "0.1.1" [deps] DiffEqCallbacks = "459566f4-90b8-5000-8ac3-15dfb0a30def" From b3b36a1fedb3caddb7736b4df2846cb8e47c278e Mon Sep 17 00:00:00 2001 From: Ashton Bradley Date: Tue, 30 Apr 2024 13:32:18 +1200 Subject: [PATCH 3/4] update julia in CI --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5510219..dfd3feb 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -10,7 +10,7 @@ jobs: fail-fast: false matrix: version: - - '1.6' + - '1.10' - 'nightly' os: - ubuntu-latest From 2443ba450d68920a735948703e696a5b89a58a84 Mon Sep 17 00:00:00 2001 From: Ashton Bradley Date: Tue, 30 Apr 2024 13:37:24 +1200 Subject: [PATCH 4/4] test on current release --- .github/workflows/CI.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index dfd3feb..7312fdd 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -10,8 +10,7 @@ jobs: fail-fast: false matrix: version: - - '1.10' - - 'nightly' + - '1' os: - ubuntu-latest arch: