Skip to content

Commit

Permalink
Minor revisions (#107)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
nathanaelbosch authored Feb 23, 2022
1 parent 5c27d38 commit 9657b09
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/gaussians.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 2 additions & 5 deletions src/integrator_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions test/errors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

2 comments on commit 9657b09

@nathanaelbosch
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/55324

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.5.4 -m "<description of version>" 9657b098c94f9a4f702dfe791f48c45b66b57010
git push origin v0.5.4

Please sign in to comment.