From 78b206125c641676d06a62bb54c67d5fa4e14834 Mon Sep 17 00:00:00 2001 From: oscarddssmith Date: Wed, 25 Sep 2024 16:44:15 -0400 Subject: [PATCH 1/7] add nlfunc to ODEFunction --- src/scimlfunctions.jl | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/src/scimlfunctions.jl b/src/scimlfunctions.jl index 22981e8dd..384db99fa 100644 --- a/src/scimlfunctions.jl +++ b/src/scimlfunctions.jl @@ -289,6 +289,7 @@ the usage of `f`. These include: based on the sparsity pattern. Defaults to `nothing`, which means a color vector will be internally computed on demand when required. The cost of this operation is highly dependent on the sparsity pattern. +- `nlfunc`: a `NonlinearFunction` ## iip: In-Place vs Out-Of-Place @@ -401,8 +402,8 @@ automatically symbolically generating the Jacobian and more from the numerically-defined functions. """ struct ODEFunction{iip, specialize, F, TMM, Ta, Tt, TJ, JVP, VJP, JP, SP, TW, TWt, WP, TPJ, - O, TCV, - SYS, IProb, UIProb, IProbMap, IProbPmap} <: AbstractODEFunction{iip} + O, TCV, SYS, + IProb, UIProb, IProbMap, IProbPmap, NLF} <: AbstractODEFunction{iip} f::F mass_matrix::TMM analytic::Ta @@ -423,6 +424,7 @@ struct ODEFunction{iip, specialize, F, TMM, Ta, Tt, TJ, JVP, VJP, JP, SP, TW, TW update_initializeprob!::UIProb initializeprobmap::IProbMap initializeprobpmap::IProbPmap + nlfunc::NLF end @doc doc""" @@ -525,8 +527,8 @@ information on generating the SplitFunction from this symbolic engine. """ struct SplitFunction{ iip, specialize, F1, F2, TMM, C, Ta, Tt, TJ, JVP, VJP, JP, WP, SP, TW, TWt, - TPJ, O, - TCV, SYS, IProb, UIProb, IProbMap, IProbPmap} <: AbstractODEFunction{iip} + TPJ, O, TCV, SYS, + IProb, UIProb, IProbMap, IProbPmap, NLF} <: AbstractODEFunction{iip} f1::F1 f2::F2 mass_matrix::TMM @@ -549,6 +551,7 @@ struct SplitFunction{ update_initializeprob!::UIProb initializeprobmap::IProbMap initializeprobpmap::IProbPmap + nlfunc::NLF end @doc doc""" @@ -2426,7 +2429,8 @@ function ODEFunction{iip, specialize}(f; update_initializeprob! = __has_update_initializeprob!(f) ? f.update_initializeprob! : nothing, initializeprobmap = __has_initializeprobmap(f) ? f.initializeprobmap : nothing, - initializeprobpmap = __has_initializeprobpmap(f) ? f.initializeprobpmap : nothing + initializeprobpmap = __has_initializeprobpmap(f) ? f.initializeprobpmap : nothing, + nlfunc = __has_nlfunc(f) ? f.nlfunc : nothing, ) where {iip, specialize } @@ -2484,11 +2488,11 @@ function ODEFunction{iip, specialize}(f; typeof(sparsity), Any, Any, typeof(W_prototype), Any, Any, typeof(_colorvec), - typeof(sys), Any, Any, Any, Any}(_f, mass_matrix, analytic, tgrad, jac, + typeof(sys), Any, Any, Any, Any, Any}(_f, mass_matrix, analytic, tgrad, jac, jvp, vjp, jac_prototype, sparsity, Wfact, Wfact_t, W_prototype, paramjac, observed, _colorvec, sys, initializeprob, update_initializeprob!, initializeprobmap, - initializeprobpmap) + initializeprobpmap, nlfunc) elseif specialize === false ODEFunction{iip, FunctionWrapperSpecialize, typeof(_f), typeof(mass_matrix), typeof(analytic), typeof(tgrad), @@ -2497,13 +2501,15 @@ function ODEFunction{iip, specialize}(f; typeof(paramjac), typeof(observed), typeof(_colorvec), - typeof(sys), typeof(initializeprob), typeof(update_initializeprob!), - typeof(initializeprobmap), typeof(initializeprobpmap)}(_f, mass_matrix, + typeof(sys), typeof(initializeprob), + typeof(update_initializeprob!), + typeof(initializeprobmap), + typeof(initializeprobpmap), + typeof(nlfunc)}(_f, mass_matrix, analytic, tgrad, jac, jvp, vjp, jac_prototype, sparsity, Wfact, Wfact_t, W_prototype, paramjac, - observed, _colorvec, sys, initializeprob, update_initializeprob!, initializeprobmap, - initializeprobpmap) + observed, _colorvec, sys, initializeprob, initializeprobmap, nlfunc) else ODEFunction{iip, specialize, typeof(_f), typeof(mass_matrix), typeof(analytic), typeof(tgrad), @@ -2514,11 +2520,12 @@ function ODEFunction{iip, specialize}(f; typeof(_colorvec), typeof(sys), typeof(initializeprob), typeof(update_initializeprob!), typeof(initializeprobmap), - typeof(initializeprobpmap)}(_f, mass_matrix, analytic, tgrad, jac, + typeof(initializeprobpmap) + typeof(nlfunc)}(_f, mass_matrix, analytic, tgrad, jac, jvp, vjp, jac_prototype, sparsity, Wfact, Wfact_t, W_prototype, paramjac, observed, _colorvec, sys, initializeprob, update_initializeprob!, initializeprobmap, - initializeprobpmap) + initializeprobpmap, nlfunc) end end @@ -2535,13 +2542,13 @@ function unwrapped_f(f::ODEFunction, newf = unwrapped_f(f.f)) Any, Any, Any, Any, typeof(f.jac_prototype), typeof(f.sparsity), Any, Any, Any, Any, typeof(f.colorvec), - typeof(f.sys), Any, Any, Any, Any}( + typeof(f.sys), Any, Any, Any, Any, Any}( newf, f.mass_matrix, f.analytic, f.tgrad, f.jac, f.jvp, f.vjp, f.jac_prototype, f.sparsity, f.Wfact, f.Wfact_t, f.W_prototype, f.paramjac, f.observed, f.colorvec, f.sys, f.initializeprob, f.update_initializeprob!, f.initializeprobmap, - f.initializeprobpmap) + f.initializeprobpmap, f.nlfunc) else ODEFunction{isinplace(f), specialization(f), typeof(newf), typeof(f.mass_matrix), typeof(f.analytic), typeof(f.tgrad), @@ -2551,11 +2558,12 @@ function unwrapped_f(f::ODEFunction, newf = unwrapped_f(f.f)) typeof(f.observed), typeof(f.colorvec), typeof(f.sys), typeof(f.initializeprob), typeof(f.update_initializeprob!), typeof(f.initializeprobmap), - typeof(f.initializeprobpmap)}(newf, f.mass_matrix, f.analytic, f.tgrad, f.jac, + typeof(f.initializeprobpmap), + typof(f.nlfunc)}(newf, f.mass_matrix, f.analytic, f.tgrad, f.jac, f.jvp, f.vjp, f.jac_prototype, f.sparsity, f.Wfact, f.Wfact_t, f.W_prototype, f.paramjac, f.observed, f.colorvec, f.sys, f.initializeprob, f.update_initializeprob!, - f.initializeprobmap, f.initializeprobpmap) + f.initializeprobmap, f.initializeprobpmap, f.nlfunc) end end @@ -4376,6 +4384,7 @@ __has_initializeprob(f) = isdefined(f, :initializeprob) __has_update_initializeprob!(f) = isdefined(f, :update_initializeprob!) __has_initializeprobmap(f) = isdefined(f, :initializeprobmap) __has_initializeprobpmap(f) = isdefined(f, :initializeprobpmap) +__has_nlfunc(f) = isdefined(f, :nl_func) # compatibility has_invW(f::AbstractSciMLFunction) = false From b83145ada6f36ee59785cc3cfb50cd0aecf9a99d Mon Sep 17 00:00:00 2001 From: Oscar Smith Date: Tue, 15 Oct 2024 09:14:02 -0400 Subject: [PATCH 2/7] typo --- src/scimlfunctions.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scimlfunctions.jl b/src/scimlfunctions.jl index 384db99fa..ca95384c3 100644 --- a/src/scimlfunctions.jl +++ b/src/scimlfunctions.jl @@ -2520,7 +2520,7 @@ function ODEFunction{iip, specialize}(f; typeof(_colorvec), typeof(sys), typeof(initializeprob), typeof(update_initializeprob!), typeof(initializeprobmap), - typeof(initializeprobpmap) + typeof(initializeprobpmap), typeof(nlfunc)}(_f, mass_matrix, analytic, tgrad, jac, jvp, vjp, jac_prototype, sparsity, Wfact, Wfact_t, W_prototype, paramjac, From fbc07374e4a4c32830c383d8a746cd182894d9ff Mon Sep 17 00:00:00 2001 From: Oscar Smith Date: Tue, 15 Oct 2024 10:08:57 -0400 Subject: [PATCH 3/7] typo --- src/scimlfunctions.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scimlfunctions.jl b/src/scimlfunctions.jl index ca95384c3..1fc0717e1 100644 --- a/src/scimlfunctions.jl +++ b/src/scimlfunctions.jl @@ -2559,7 +2559,7 @@ function unwrapped_f(f::ODEFunction, newf = unwrapped_f(f.f)) typeof(f.sys), typeof(f.initializeprob), typeof(f.update_initializeprob!), typeof(f.initializeprobmap), typeof(f.initializeprobpmap), - typof(f.nlfunc)}(newf, f.mass_matrix, f.analytic, f.tgrad, f.jac, + typeof(f.nlfunc)}(newf, f.mass_matrix, f.analytic, f.tgrad, f.jac, f.jvp, f.vjp, f.jac_prototype, f.sparsity, f.Wfact, f.Wfact_t, f.W_prototype, f.paramjac, f.observed, f.colorvec, f.sys, f.initializeprob, f.update_initializeprob!, From a7e282aef3c9084beca35db28671e942044cd79a Mon Sep 17 00:00:00 2001 From: oscarddssmith Date: Mon, 21 Oct 2024 11:01:17 -0400 Subject: [PATCH 4/7] fixes --- src/scimlfunctions.jl | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/scimlfunctions.jl b/src/scimlfunctions.jl index 1fc0717e1..a503b0bf1 100644 --- a/src/scimlfunctions.jl +++ b/src/scimlfunctions.jl @@ -2666,7 +2666,7 @@ end @add_kwonly function SplitFunction(f1, f2, mass_matrix, cache, analytic, tgrad, jac, jvp, vjp, jac_prototype, W_prototype, sparsity, Wfact, Wfact_t, paramjac, observed, colorvec, sys, initializeprob, update_initializeprob!, - initializeprobmap, initializeprobpmap) + initializeprobmap, initializeprobpmap, nlfunc) f1 = ODEFunction(f1) f2 = ODEFunction(f2) @@ -2681,11 +2681,11 @@ end typeof(vjp), typeof(jac_prototype), typeof(W_prototype), typeof(sparsity), typeof(Wfact), typeof(Wfact_t), typeof(paramjac), typeof(observed), typeof(colorvec), typeof(sys), typeof(initializeprob), typeof(update_initializeprob!), typeof(initializeprobmap), - typeof(initializeprobpmap)}( + typeof(initializeprobpmap), typeof(nlfunc)}( f1, f2, mass_matrix, cache, analytic, tgrad, jac, jvp, vjp, jac_prototype, W_prototype, sparsity, Wfact, Wfact_t, paramjac, observed, colorvec, sys, - initializeprob, update_initializeprob!, initializeprobmap, initializeprobpmap) + initializeprob, update_initializeprob!, initializeprobmap, initializeprobpmap, nlfunc) end function SplitFunction{iip, specialize}(f1, f2; mass_matrix = __has_mass_matrix(f1) ? @@ -2721,7 +2721,8 @@ function SplitFunction{iip, specialize}(f1, f2; update_initializeprob! = __has_update_initializeprob!(f1) ? f1.update_initializeprob! : nothing, initializeprobmap = __has_initializeprobmap(f1) ? f1.initializeprobmap : nothing, - initializeprobpmap = __has_initializeprobpmap(f1) ? f1.initializeprobpmap : nothing + initializeprobpmap = __has_initializeprobpmap(f1) ? f1.initializeprobpmap : nothing, + nlfunc = __has_nlfunc(f1) ? f1.nlfunc : nothing ) where {iip, specialize } @@ -2732,12 +2733,12 @@ function SplitFunction{iip, specialize}(f1, f2; if specialize === NoSpecialize SplitFunction{iip, specialize, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, - Any, Any, Any, Any, Any, Any}(f1, f2, mass_matrix, _func_cache, + Any, Any, Any, Any, Any, Any, Any}(f1, f2, mass_matrix, _func_cache, analytic, tgrad, jac, jvp, vjp, jac_prototype, W_prototype, sparsity, Wfact, Wfact_t, paramjac, observed, colorvec, sys, initializeprob.update_initializeprob!, initializeprobmap, - initializeprobpmap, initializeprobpmap) + initializeprobpmap, initializeprobpmap, nlfunc) else SplitFunction{iip, specialize, typeof(f1), typeof(f2), typeof(mass_matrix), typeof(_func_cache), typeof(analytic), @@ -2747,11 +2748,11 @@ function SplitFunction{iip, specialize}(f1, f2; typeof(colorvec), typeof(sys), typeof(initializeprob), typeof(update_initializeprob!), typeof(initializeprobmap), - typeof(initializeprobpmap)}(f1, f2, + typeof(initializeprobpmap), typeof(nlfunc)}(f1, f2, mass_matrix, _func_cache, analytic, tgrad, jac, jvp, vjp, jac_prototype, W_prototype, sparsity, Wfact, Wfact_t, paramjac, observed, colorvec, sys, - initializeprob, update_initializeprob!, initializeprobmap, initializeprobpmap) + initializeprob, update_initializeprob!, initializeprobmap, initializeprobpmap, nlfunc) end end @@ -3094,7 +3095,7 @@ SDEFunction(f::SDEFunction; kwargs...) = f @add_kwonly function SplitSDEFunction(f1, f2, g, mass_matrix, cache, analytic, tgrad, jac, jvp, vjp, - jac_prototype, W_prototype, Wfact, Wfact_t, paramjac, observed, + jac_prototype, Wfact, Wfact_t, paramjac, observed, colorvec, sys) f1 = f1 isa AbstractSciMLOperator ? f1 : SDEFunction(f1) f2 = SDEFunction(f2) @@ -3105,7 +3106,7 @@ SDEFunction(f::SDEFunction; kwargs...) = f typeof(Wfact), typeof(Wfact_t), typeof(paramjac), typeof(observed), typeof(colorvec), typeof(sys)}(f1, f2, mass_matrix, cache, analytic, tgrad, jac, - jac_prototype, W_prototype, Wfact, Wfact_t, paramjac, observed, colorvec, sys) + jac_prototype, Wfact, Wfact_t, paramjac, observed, colorvec, sys) end function SplitSDEFunction{iip, specialize}(f1, f2, g; From 86eebabdb71c98a2d725763b517e078a9f29e3e1 Mon Sep 17 00:00:00 2001 From: oscarddssmith Date: Mon, 21 Oct 2024 11:15:00 -0400 Subject: [PATCH 5/7] fixes --- src/scimlfunctions.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scimlfunctions.jl b/src/scimlfunctions.jl index a503b0bf1..d81a63fc8 100644 --- a/src/scimlfunctions.jl +++ b/src/scimlfunctions.jl @@ -2509,7 +2509,8 @@ function ODEFunction{iip, specialize}(f; analytic, tgrad, jac, jvp, vjp, jac_prototype, sparsity, Wfact, Wfact_t, W_prototype, paramjac, - observed, _colorvec, sys, initializeprob, initializeprobmap, nlfunc) + observed, _colorvec, sys, initializeprob, update_initializeprob!, + initializeprobmap, initializeprobpmap, nlfunc) else ODEFunction{iip, specialize, typeof(_f), typeof(mass_matrix), typeof(analytic), typeof(tgrad), From b2fa45aaaa7ded2e6fdd68744167e17b3b705532 Mon Sep 17 00:00:00 2001 From: Oscar Smith Date: Tue, 22 Oct 2024 09:38:49 -0400 Subject: [PATCH 6/7] add docs. --- src/scimlfunctions.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/scimlfunctions.jl b/src/scimlfunctions.jl index d81a63fc8..e74af51a5 100644 --- a/src/scimlfunctions.jl +++ b/src/scimlfunctions.jl @@ -289,7 +289,10 @@ the usage of `f`. These include: based on the sparsity pattern. Defaults to `nothing`, which means a color vector will be internally computed on demand when required. The cost of this operation is highly dependent on the sparsity pattern. -- `nlfunc`: a `NonlinearFunction` +- `nlfunc`: a `NonlinearFunction` with signature `f(u, (u_tmp, _t, p)) = u_tmp`. + where `u` and `u_tmp` are of the same type as `u`, and `_t` is of the same type of t. + This will be used as the nonlinear function inside an implicit solver by specifying `u, u_tmp` and `_t` + such that solving this function produces a solution to the implicit step of your solver. ## iip: In-Place vs Out-Of-Place From a91d8b35923b360de00c99764da8e223ce526865 Mon Sep 17 00:00:00 2001 From: Oscar Smith Date: Tue, 29 Oct 2024 14:43:19 -0400 Subject: [PATCH 7/7] address review --- src/scimlfunctions.jl | 48 +++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/src/scimlfunctions.jl b/src/scimlfunctions.jl index e74af51a5..31fd0e0ce 100644 --- a/src/scimlfunctions.jl +++ b/src/scimlfunctions.jl @@ -289,9 +289,9 @@ the usage of `f`. These include: based on the sparsity pattern. Defaults to `nothing`, which means a color vector will be internally computed on demand when required. The cost of this operation is highly dependent on the sparsity pattern. -- `nlfunc`: a `NonlinearFunction` with signature `f(u, (u_tmp, _t, p)) = u_tmp`. - where `u` and `u_tmp` are of the same type as `u`, and `_t` is of the same type of t. - This will be used as the nonlinear function inside an implicit solver by specifying `u, u_tmp` and `_t` +- `nlprob`: a `NonlinearProblem` that solves `f(u, t, p) = u_tmp` + where the nonlinear parameters are the tuple `(t, u_tmp, p)`. + This will be used as the nonlinear problem inside an implicit solver by specifying `u, u_tmp` and `t` such that solving this function produces a solution to the implicit step of your solver. ## iip: In-Place vs Out-Of-Place @@ -406,7 +406,7 @@ numerically-defined functions. """ struct ODEFunction{iip, specialize, F, TMM, Ta, Tt, TJ, JVP, VJP, JP, SP, TW, TWt, WP, TPJ, O, TCV, SYS, - IProb, UIProb, IProbMap, IProbPmap, NLF} <: AbstractODEFunction{iip} + IProb, UIProb, IProbMap, IProbPmap, NLP} <: AbstractODEFunction{iip} f::F mass_matrix::TMM analytic::Ta @@ -427,7 +427,7 @@ struct ODEFunction{iip, specialize, F, TMM, Ta, Tt, TJ, JVP, VJP, JP, SP, TW, TW update_initializeprob!::UIProb initializeprobmap::IProbMap initializeprobpmap::IProbPmap - nlfunc::NLF + nlprob::NLP end @doc doc""" @@ -531,7 +531,7 @@ information on generating the SplitFunction from this symbolic engine. struct SplitFunction{ iip, specialize, F1, F2, TMM, C, Ta, Tt, TJ, JVP, VJP, JP, WP, SP, TW, TWt, TPJ, O, TCV, SYS, - IProb, UIProb, IProbMap, IProbPmap, NLF} <: AbstractODEFunction{iip} + IProb, UIProb, IProbMap, IProbPmap, NLP} <: AbstractODEFunction{iip} f1::F1 f2::F2 mass_matrix::TMM @@ -554,7 +554,7 @@ struct SplitFunction{ update_initializeprob!::UIProb initializeprobmap::IProbMap initializeprobpmap::IProbPmap - nlfunc::NLF + nlprob::NLP end @doc doc""" @@ -2433,7 +2433,7 @@ function ODEFunction{iip, specialize}(f; f.update_initializeprob! : nothing, initializeprobmap = __has_initializeprobmap(f) ? f.initializeprobmap : nothing, initializeprobpmap = __has_initializeprobpmap(f) ? f.initializeprobpmap : nothing, - nlfunc = __has_nlfunc(f) ? f.nlfunc : nothing, + nlprob = __has_nlprob(f) ? f.nlprob : nothing, ) where {iip, specialize } @@ -2495,7 +2495,7 @@ function ODEFunction{iip, specialize}(f; jvp, vjp, jac_prototype, sparsity, Wfact, Wfact_t, W_prototype, paramjac, observed, _colorvec, sys, initializeprob, update_initializeprob!, initializeprobmap, - initializeprobpmap, nlfunc) + initializeprobpmap, nlprob) elseif specialize === false ODEFunction{iip, FunctionWrapperSpecialize, typeof(_f), typeof(mass_matrix), typeof(analytic), typeof(tgrad), @@ -2508,12 +2508,12 @@ function ODEFunction{iip, specialize}(f; typeof(update_initializeprob!), typeof(initializeprobmap), typeof(initializeprobpmap), - typeof(nlfunc)}(_f, mass_matrix, + typeof(nlprob)}(_f, mass_matrix, analytic, tgrad, jac, jvp, vjp, jac_prototype, sparsity, Wfact, Wfact_t, W_prototype, paramjac, observed, _colorvec, sys, initializeprob, update_initializeprob!, - initializeprobmap, initializeprobpmap, nlfunc) + initializeprobmap, initializeprobpmap, nlprob) else ODEFunction{iip, specialize, typeof(_f), typeof(mass_matrix), typeof(analytic), typeof(tgrad), @@ -2525,11 +2525,11 @@ function ODEFunction{iip, specialize}(f; typeof(sys), typeof(initializeprob), typeof(update_initializeprob!), typeof(initializeprobmap), typeof(initializeprobpmap), - typeof(nlfunc)}(_f, mass_matrix, analytic, tgrad, jac, + typeof(nlprob)}(_f, mass_matrix, analytic, tgrad, jac, jvp, vjp, jac_prototype, sparsity, Wfact, Wfact_t, W_prototype, paramjac, observed, _colorvec, sys, initializeprob, update_initializeprob!, initializeprobmap, - initializeprobpmap, nlfunc) + initializeprobpmap, nlprob) end end @@ -2552,7 +2552,7 @@ function unwrapped_f(f::ODEFunction, newf = unwrapped_f(f.f)) f.Wfact_t, f.W_prototype, f.paramjac, f.observed, f.colorvec, f.sys, f.initializeprob, f.update_initializeprob!, f.initializeprobmap, - f.initializeprobpmap, f.nlfunc) + f.initializeprobpmap, f.nlprob) else ODEFunction{isinplace(f), specialization(f), typeof(newf), typeof(f.mass_matrix), typeof(f.analytic), typeof(f.tgrad), @@ -2563,11 +2563,11 @@ function unwrapped_f(f::ODEFunction, newf = unwrapped_f(f.f)) typeof(f.sys), typeof(f.initializeprob), typeof(f.update_initializeprob!), typeof(f.initializeprobmap), typeof(f.initializeprobpmap), - typeof(f.nlfunc)}(newf, f.mass_matrix, f.analytic, f.tgrad, f.jac, + typeof(f.nlprob)}(newf, f.mass_matrix, f.analytic, f.tgrad, f.jac, f.jvp, f.vjp, f.jac_prototype, f.sparsity, f.Wfact, f.Wfact_t, f.W_prototype, f.paramjac, f.observed, f.colorvec, f.sys, f.initializeprob, f.update_initializeprob!, - f.initializeprobmap, f.initializeprobpmap, f.nlfunc) + f.initializeprobmap, f.initializeprobpmap, f.nlprob) end end @@ -2670,7 +2670,7 @@ end @add_kwonly function SplitFunction(f1, f2, mass_matrix, cache, analytic, tgrad, jac, jvp, vjp, jac_prototype, W_prototype, sparsity, Wfact, Wfact_t, paramjac, observed, colorvec, sys, initializeprob, update_initializeprob!, - initializeprobmap, initializeprobpmap, nlfunc) + initializeprobmap, initializeprobpmap, nlprob) f1 = ODEFunction(f1) f2 = ODEFunction(f2) @@ -2685,11 +2685,11 @@ end typeof(vjp), typeof(jac_prototype), typeof(W_prototype), typeof(sparsity), typeof(Wfact), typeof(Wfact_t), typeof(paramjac), typeof(observed), typeof(colorvec), typeof(sys), typeof(initializeprob), typeof(update_initializeprob!), typeof(initializeprobmap), - typeof(initializeprobpmap), typeof(nlfunc)}( + typeof(initializeprobpmap), typeof(nlprob)}( f1, f2, mass_matrix, cache, analytic, tgrad, jac, jvp, vjp, jac_prototype, W_prototype, sparsity, Wfact, Wfact_t, paramjac, observed, colorvec, sys, - initializeprob, update_initializeprob!, initializeprobmap, initializeprobpmap, nlfunc) + initializeprob, update_initializeprob!, initializeprobmap, initializeprobpmap, nlprob) end function SplitFunction{iip, specialize}(f1, f2; mass_matrix = __has_mass_matrix(f1) ? @@ -2726,7 +2726,7 @@ function SplitFunction{iip, specialize}(f1, f2; f1.update_initializeprob! : nothing, initializeprobmap = __has_initializeprobmap(f1) ? f1.initializeprobmap : nothing, initializeprobpmap = __has_initializeprobpmap(f1) ? f1.initializeprobpmap : nothing, - nlfunc = __has_nlfunc(f1) ? f1.nlfunc : nothing + nlprob = __has_nlprob(f1) ? f1.nlprob : nothing ) where {iip, specialize } @@ -2742,7 +2742,7 @@ function SplitFunction{iip, specialize}(f1, f2; tgrad, jac, jvp, vjp, jac_prototype, W_prototype, sparsity, Wfact, Wfact_t, paramjac, observed, colorvec, sys, initializeprob.update_initializeprob!, initializeprobmap, - initializeprobpmap, initializeprobpmap, nlfunc) + initializeprobpmap, initializeprobpmap, nlprob) else SplitFunction{iip, specialize, typeof(f1), typeof(f2), typeof(mass_matrix), typeof(_func_cache), typeof(analytic), @@ -2752,11 +2752,11 @@ function SplitFunction{iip, specialize}(f1, f2; typeof(colorvec), typeof(sys), typeof(initializeprob), typeof(update_initializeprob!), typeof(initializeprobmap), - typeof(initializeprobpmap), typeof(nlfunc)}(f1, f2, + typeof(initializeprobpmap), typeof(nlprob)}(f1, f2, mass_matrix, _func_cache, analytic, tgrad, jac, jvp, vjp, jac_prototype, W_prototype, sparsity, Wfact, Wfact_t, paramjac, observed, colorvec, sys, - initializeprob, update_initializeprob!, initializeprobmap, initializeprobpmap, nlfunc) + initializeprob, update_initializeprob!, initializeprobmap, initializeprobpmap, nlprob) end end @@ -4389,7 +4389,7 @@ __has_initializeprob(f) = isdefined(f, :initializeprob) __has_update_initializeprob!(f) = isdefined(f, :update_initializeprob!) __has_initializeprobmap(f) = isdefined(f, :initializeprobmap) __has_initializeprobpmap(f) = isdefined(f, :initializeprobpmap) -__has_nlfunc(f) = isdefined(f, :nl_func) +__has_nlprob(f) = isdefined(f, :nlprob) # compatibility has_invW(f::AbstractSciMLFunction) = false