diff --git a/Project.toml b/Project.toml index e7650d9..50bca93 100644 --- a/Project.toml +++ b/Project.toml @@ -15,7 +15,7 @@ SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462" ConcreteStructs = "0.2" DiffEqBase = "6.140" DiffEqCallbacks = "3, 4" -NonlinearSolveBase = "2" +NonlinearSolveBase = "2.2" Reexport = "1.0" SciMLBase = "2" julia = "1.10" diff --git a/src/solve.jl b/src/solve.jl index 21fc58a..c65f45d 100644 --- a/src/solve.jl +++ b/src/solve.jl @@ -16,7 +16,7 @@ end function SciMLBase.__solve(prob::SciMLBase.AbstractSteadyStateProblem, alg::DynamicSS, args...; abstol = 1e-8, reltol = 1e-6, odesolve_kwargs = (;), save_idxs = nothing, termination_condition = NonlinearSolveBase.NormTerminationMode(infnorm), - kwargs...) + alias = SciMLBase.NonlinearAliasSpecifier(), kwargs...) tspan = __get_tspan(prob.u0, alg) f = if prob isa SteadyStateProblem @@ -54,7 +54,9 @@ function SciMLBase.__solve(prob::SciMLBase.AbstractSteadyStateProblem, alg::Dyna # Construct and solve the ODEProblem odeprob = ODEProblem{isinplace(prob), true}(f, prob.u0, tspan, prob.p) odesol = solve(odeprob, alg.alg, args...; abstol, reltol, kwargs..., - odesolve_kwargs..., callback, save_end = true) + odesolve_kwargs..., callback, save_end = true, + alias = SciMLBase.ODEAliasSpecifier(; alias_p = alias.alias_p, + alias_f = alias.alias_f, alias_u0 = alias.alias_u0)) resid, u, retcode = __get_result_from_sol(termination_condition, tc_cache, odesol) diff --git a/test/autodiff.jl b/test/autodiff.jl index 9724589..4bd01e4 100644 --- a/test/autodiff.jl +++ b/test/autodiff.jl @@ -34,7 +34,7 @@ eqs = [ D(y8) ~ (-k2 * y6 * y8 + k6 * y7) ] -@mtkbuild model = ODESystem(eqs, t) +@mtkcompile model = System(eqs, t) struct Tag end T = typeof(ForwardDiff.Tag(Tag(), Float64))