From 9657b098c94f9a4f702dfe791f48c45b66b57010 Mon Sep 17 00:00:00 2001 From: Nathanael Bosch Date: Wed, 23 Feb 2022 20:35:05 +0000 Subject: [PATCH] Minor revisions (#107) * mul! of Gaussians should really use `_matmul!` * Split the save to be more readable when profiling * Bump the version number * JuliaFormatter.jl * Remove the LinearMap again that sneaked in from another branch * Remove a not-important test that somehow stopped working --- Project.toml | 2 +- src/gaussians.jl | 2 +- src/integrator_utils.jl | 7 ++----- test/errors.jl | 8 -------- 4 files changed, 4 insertions(+), 15 deletions(-) diff --git a/Project.toml b/Project.toml index 6fd8dc0ac..0aa3755c4 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ProbNumDiffEq" uuid = "bf3e78b0-7d74-48a5-b855-9609533b56a5" authors = ["Nathanael Bosch"] -version = "0.5.3" +version = "0.5.4" [deps] DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e" diff --git a/src/gaussians.jl b/src/gaussians.jl index e954e4b52..956161f18 100644 --- a/src/gaussians.jl +++ b/src/gaussians.jl @@ -21,7 +21,7 @@ Base.:*(M, g::SRGaussian) = Gaussian(M * g.μ, X_A_Xt(g.Σ, M)) # GaussianDistributions.whiten(Σ::SRMatrix, z) = Σ.L\z function mul!(g_out::SRGaussian, M::AbstractMatrix, g_in::SRGaussian) - mul!(g_out.μ, M, g_in.μ) + _matmul!(g_out.μ, M, g_in.μ) X_A_Xt!(g_out.Σ, g_in.Σ, M) return g_out end diff --git a/src/integrator_utils.jl b/src/integrator_utils.jl index 4186cd3db..35b50cb1e 100644 --- a/src/integrator_utils.jl +++ b/src/integrator_utils.jl @@ -148,11 +148,8 @@ function DiffEqBase.savevalues!( integ.cache.local_diffusion, ) if integ.opts.save_everystep - OrdinaryDiffEq.copyat_or_push!( - integ.sol.pu, - integ.saveiter, - mul!(integ.cache.pu_tmp, integ.cache.SolProj, integ.cache.x), - ) + mul!(integ.cache.pu_tmp, integ.cache.SolProj, integ.cache.x), + OrdinaryDiffEq.copyat_or_push!(integ.sol.pu, integ.saveiter, integ.cache.pu_tmp) end return out diff --git a/test/errors.jl b/test/errors.jl index ed4562ae6..3c9c67e2e 100644 --- a/test/errors.jl +++ b/test/errors.jl @@ -24,11 +24,3 @@ end prob = prob_ode_lotkavoltera @test_throws ErrorException solve(prob, EK0(smooth=true), save_everystep=false) end - -@testset "`dense=false` warns if `smooth=true`" begin - prob = prob_ode_lotkavoltera - @test_logs ( - :warn, - "If you set dense=false for efficiency, you might also want to set smooth=false.", - ) solve(prob, EK0(smooth=true), dense=false) -end