diff --git a/src/problems/bvp_problems.jl b/src/problems/bvp_problems.jl index 86d7763b5..658f3ab1e 100644 --- a/src/problems/bvp_problems.jl +++ b/src/problems/bvp_problems.jl @@ -342,5 +342,5 @@ function SecondOrderBVProblem(f, bc, u0, tspan, p = NullParameters(); kwargs...) end function SecondOrderBVProblem(f::AbstractBVPFunction, u0, tspan, p = NullParameters(); kwargs...) - return SecondOrderBVProblem{isinplace(f)}(f, u0, tspan, p; kwargs...) + return SecondOrderBVProblem{isinplace(f, 5)}(f, u0, tspan, p; kwargs...) end \ No newline at end of file diff --git a/src/scimlfunctions.jl b/src/scimlfunctions.jl index 38faab837..e464a71bd 100644 --- a/src/scimlfunctions.jl +++ b/src/scimlfunctions.jl @@ -3751,8 +3751,11 @@ function BVPFunction{iip, specialize, twopoint}(f, bc; end bciip = if !twopoint - # bc in SecondOrderBVProblem should have 5 arguments - isinplace(f, 5) ? isinplace(bc, 5, "bc", iip) : isinplace(bc, 4, "bc", iip) + try + isinplace(bc, 4, "bc", iip) + catch e + isinplace(bc, 5, "bc", iip) + end else @assert length(bc) == 2 bc = Tuple(bc) diff --git a/test/function_building_error_messages.jl b/test/function_building_error_messages.jl index c5e7a6921..daf1c8565 100644 --- a/test/function_building_error_messages.jl +++ b/test/function_building_error_messages.jl @@ -544,7 +544,7 @@ bcjac(u, p, t) = [1.0] bciip, jac = bjac, bcjac = bcjac) -@test_throws SciMLBase.TooFewArgumentsError BVPFunction(bfoop, +@test_throws SciMLBase.NonconformingFunctionsError BVPFunction(bfoop, bciip, jac = bjac, bcjac = bcjac)