Skip to content

Commit

Permalink
horrible nasty hack
Browse files Browse the repository at this point in the history
  • Loading branch information
oscardssmith authored Sep 19, 2024
1 parent 4c0109f commit 2b3ec9c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/utility_tests.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
using StochasticDiffEq, LinearAlgebra, SparseArrays, Random, LinearSolve, Test
using StochasticDiffEq.OrdinaryDiffEq: WOperator, calc_W!, calc_W
using StochasticDiffEq.SciMLOperators: MatrixOperator
using OrdinaryDiffEq

#horid nasty hack to deal with temporary calc_W refactor
# if there is a method that takes a W_transform argument, define the version that doesn't to set W_transform to true
if hasmethod(calc_W, (Any, Any, Any, Any, Any))
OrdinaryDiffEq.calc_W(integ, nlsolver, dgamma, repeat_step::Bool) = OrdinaryDiffEq.calc_W(integ, nlsolver, dgamma, repeat_step, true)
OrdinaryDiffEq.calc_W!(integ, nlsolver, cache, dgamma, repeat_step::Bool) = OrdinaryDiffEq.calc_W(integ, nlsolver, dgamma, cacherepeat_step, true)
end
@testset "Derivative Utilities" begin
@testset "calc_W!" begin
A = [-1.0 0.0; 0.0 -0.5]; σ = [0.9 0.0; 0.0 0.8]
Expand Down

0 comments on commit 2b3ec9c

Please sign in to comment.