diff --git a/Project.toml b/Project.toml index a14d73463..d97c63a52 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "SciMLBase" uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" authors = ["Chris Rackauckas and contributors"] -version = "1.96.1" +version = "1.96.2" [deps] ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b" diff --git a/src/problems/bvp_problems.jl b/src/problems/bvp_problems.jl index 73f39463a..3beec8702 100644 --- a/src/problems/bvp_problems.jl +++ b/src/problems/bvp_problems.jl @@ -94,9 +94,9 @@ struct BVProblem{uType, tType, isinplace, P, F, BF, PT, K} <: kwargs...) where {iip} _tspan = promote_tspan(tspan) warn_paramtype(p) - new{typeof(u0), typeof(_tspan), iip, typeof(p), - typeof(f.f), typeof(bc), - typeof(problem_type), typeof(kwargs)}(f.f, bc, u0, _tspan, p, + new{typeof(u0), typeof(_tspan), isinplace(f), typeof(p), + typeof(f), typeof(f.bc), + typeof(problem_type), typeof(kwargs)}(f, f.bc, u0, _tspan, p, problem_type, kwargs) end @@ -107,12 +107,12 @@ end TruncatedStacktraces.@truncate_stacktrace BVProblem 3 1 2 -function BVProblem(f, bc, u0, tspan, p = NullParameters(); kwargs...) - BVProblem(BVPFunction(f, bc), u0, tspan, p; kwargs...) +function BVProblem(f::AbstractBVPFunction, u0, tspan, p = NullParameters(); kwargs...) + BVProblem{isinplace(f)}(f, f.bc, u0, tspan, p; kwargs...) end -function BVProblem(f::AbstractBVPFunction, u0, tspan, p = NullParameters(); kwargs...) - BVProblem{isinplace(f)}(f.f, f.bc, u0, tspan, p; kwargs...) +function BVProblem(f, bc, u0, tspan, p = NullParameters(); kwargs...) + BVProblem(BVPFunction(f, bc), u0, tspan, p; kwargs...) end """ diff --git a/src/scimlfunctions.jl b/src/scimlfunctions.jl index 102e0c041..ab6a8cff4 100644 --- a/src/scimlfunctions.jl +++ b/src/scimlfunctions.jl @@ -2236,8 +2236,7 @@ struct BVPFunction{iip, specialize, F, BF, TMM, Ta, Tt, TJ, BCTJ, JVP, VJP, JP, BCJP, SP, TW, TWt, TPJ, S, S2, S3, O, TCV, BCTCV, - SYS} <: - AbstractBVPFunction{iip} + SYS} <: AbstractBVPFunction{iip} f::F bc::BF mass_matrix::TMM @@ -2262,6 +2261,8 @@ struct BVPFunction{iip, specialize, F, BF, TMM, Ta, Tt, TJ, BCTJ, JVP, VJP, JP, sys::SYS end +TruncatedStacktraces.@truncate_stacktrace BVPFunction 1 2 + ######### Backwards Compatibility Overloads (f::ODEFunction)(args...) = f.f(args...) @@ -3928,17 +3929,6 @@ function BVPFunction{iip, specialize}(f, bc; indepsym, paramsyms, observed, _colorvec, _bccolorvec, sys) - elseif specialize === false - BVPFunction{iip, FunctionWrapperSpecialize, - typeof(f), typeof(bc), typeof(mass_matrix), typeof(analytic), typeof(tgrad), - typeof(jac), typeof(jvp), typeof(vjp), typeof(jac_prototype), - typeof(sparsity), typeof(Wfact), typeof(Wfact_t), typeof(paramjac), - typeof(syms), typeof(indepsym), typeof(paramsyms), typeof(observed), - typeof(_colorvec), typeof(_bccolorvec), - typeof(sys)}(f, bc, mass_matrix, analytic, tgrad, jac, bcjac, - jvp, vjp, jac_prototype, bcjac_prototype, sparsity, Wfact, - Wfact_t, paramjac, syms, indepsym, paramsyms, - observed, _colorvec, _bccolorvec, sys) else BVPFunction{iip, specialize, typeof(f), typeof(bc), typeof(mass_matrix), typeof(analytic),