Skip to content

Commit

Permalink
Change the ordering of the state-space model (#305)
Browse files Browse the repository at this point in the history
* Change the ordering of the state-space model: reorder the Kronecker

* Fix the Kronecker vectrick to do the correct thing

* Test the ldiv trick and fix it

* Make Kronecker h/v/hvcattable and change SolProj object

* Simplify and fix things that relied on the previous more complicated stuff

* JuliaFormatter.jl

* Check that ldiv actually works

* Fix some issues with the prior tests

* Fix more stuff in the diffusion

* Make the kronecker.jl file diff smaller

* Fix more kronecker vec trick issues

* Rename BlockDiag into BlocksOfDiagonals, as that's what it is now

* Make BlocksOfDiagonals work OK

* Fix the update and smooth parts

* Implement hcat and vcat. THIS FIXES 2nd ORDER ODES!

* Add the DiagonalEK1 back into the tests!

* Add the BlockArrays extension that replaces the BlockDiagonal one

* Fix more tests

* JuliaFormatter.jl

* Reduce the prior diff again

* Add DiagonalEK1 to second order ODE tests

* Fix the second order ODE tests

* Add a BlocksOfDiagonals docstring
  • Loading branch information
nathanaelbosch authored Feb 23, 2024
1 parent 665fdf1 commit 9554581
Show file tree
Hide file tree
Showing 30 changed files with 675 additions and 619 deletions.
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@ TaylorSeries = "6aa5eb33-94cf-58f4-a9d0-e4b2c4fc25ea"
ToeplitzMatrices = "c751599d-da0a-543b-9d20-d0a503d91d24"

[weakdeps]
BlockDiagonals = "0a1fb500-61f7-11e9-3c65-f5ef3456f9f0"
BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e"
DiffEqDevTools = "f3b72e0c-5b89-59e1-b016-84e28bfd966d"
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"

[extensions]
BlockDiagonalsExt = "BlockDiagonals"
BlockArraysExt = "BlockArrays"
DiffEqDevToolsExt = "DiffEqDevTools"
RecipesBaseExt = "RecipesBase"

[compat]
ArrayAllocators = "0.3"
BlockDiagonals = "0.1"
BlockArrays = "0.16"
DiffEqBase = "6.122"
DiffEqCallbacks = "2.36, 3"
DiffEqDevTools = "2"
Expand Down
13 changes: 13 additions & 0 deletions ext/BlockArraysExt.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module BlockArraysExt

import ProbNumDiffEq: BlocksOfDiagonals
import BlockArrays: BlockArray, mortar
import LinearAlgebra: Diagonal

BlockArray(M::BlocksOfDiagonals) = begin
d = length(M.blocks)
a, b = size(M.blocks[1])
return mortar([Diagonal([M.blocks[k][i, j] for k in 1:d]) for i in 1:a, j in 1:b])
end

end
8 changes: 0 additions & 8 deletions ext/BlockDiagonalsExt.jl

This file was deleted.

2 changes: 1 addition & 1 deletion src/ProbNumDiffEq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ add!(out, toadd) = (out .+= toadd)

include("fast_linalg.jl")
include("kronecker.jl")
include("blockdiagonals.jl")
include("blocksofdiagonals.jl")
include("covariance_structure.jl")
export IsometricKroneckerCovariance, DenseCovariance, BlockDiagonalCovariance

Expand Down
321 changes: 0 additions & 321 deletions src/blockdiagonals.jl

This file was deleted.

Loading

0 comments on commit 9554581

Please sign in to comment.