diff --git a/Project.toml b/Project.toml index 34abb67..df78eef 100644 --- a/Project.toml +++ b/Project.toml @@ -34,7 +34,7 @@ IntegralsZygoteExt = ["Zygote", "ChainRulesCore"] [compat] Aqua = "0.8" Arblib = "1" -ChainRulesCore = "1.16" +ChainRulesCore = "1.18" CommonSolve = "0.2.4" Cuba = "2.2" Cubature = "1.5" @@ -50,7 +50,7 @@ Pkg = "1.10" QuadGK = "2.9" Reexport = "1.0" SafeTestsets = "0.1" -SciMLBase = "2.6" +SciMLBase = "2.24" StaticArrays = "1" Test = "1.10" Zygote = "0.6.69" diff --git a/src/common.jl b/src/common.jl index cd31327..51d347b 100644 --- a/src/common.jl +++ b/src/common.jl @@ -17,7 +17,8 @@ init_cacheval(::SciMLBase.AbstractIntegralAlgorithm, args...) = nothing function SciMLBase.init(prob::IntegralProblem{iip}, alg::SciMLBase.AbstractIntegralAlgorithm; sensealg = ReCallVJP(ZygoteVJP()), - do_inf_transformation = nothing, kwargs...) where {iip} + do_inf_transformation = nothing, kws...) where {iip} + kwargs = pairs((; prob.kwargs..., kws...)) checkkwargs(kwargs...) prob = transformation_if_inf(prob, do_inf_transformation) cacheval = init_cacheval(alg, prob) diff --git a/test/interface_tests.jl b/test/interface_tests.jl index 272aed5..c760222 100644 --- a/test/interface_tests.jl +++ b/test/interface_tests.jl @@ -386,3 +386,13 @@ end end end end + +@testset "issue242" begin + f242(x, p) = p / (x^2 + p^2) + domain242 = (-1, 1) + p242 = 1e-3 + for abstol in [1e-2, 1e-4, 1e-6, 1e-8] + @test solve(IntegralProblem(f242, domain242, p242; abstol), QuadGKJL()).u == + solve(IntegralProblem(f242, domain242, p242), QuadGKJL(); abstol).u + end +end