Skip to content

Commit

Permalink
Update linear_caches.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas authored Nov 21, 2024
1 parent 1e6685f commit a542c65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/OrdinaryDiffEqLinear/src/linear_caches.jl
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ function _phiv_timestep_caches(u_prototype, maxiter::Int, p::Int)
u = zero(u_prototype) # stores the current state
W = Matrix{T}(undef, n, p + 1) # stores the w vectors
P = Matrix{T}(undef, n, p + 2) # stores output from phiv!
Ks = KrylovSubspace{T}(n, maxiter) # stores output from arnoldi!
Ks = KrylovSubspace{T,T,typeof(similar(u_prototype,size(u_prototype,1),2))}(n, maxiter) # stores output from arnoldi!
phiv_cache = PhivCache(u_prototype, maxiter, p + 1) # cache used by phiv! (need +1 for error estimation)
return u, W, P, Ks, phiv_cache
end
Expand Down

2 comments on commit a542c65

@mcarmesin
Copy link
Contributor

Choose a reason for hiding this comment

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

We also need

W = similar(u_prototype, n, p+1)              # stores the w vectors                
P = similar(u_prototype, n, p+2)              # stores output from phiv!  

@ChrisRackauckas
Copy link
Member Author

Choose a reason for hiding this comment

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

Good point

Please sign in to comment.