@@ -1884,10 +1884,7 @@ For more details on this argument, see the ODEFunction documentation.
18841884The fields of the NonlinearFunction type directly match the names of the inputs.
18851885"""
18861886struct NonlinearFunction{iip, specialize, F, TMM, Ta, Tt, TJ, JVP, VJP, JP, SP, TW, TWt,
1887- TPJ,
1888- S, S2, O, TCV,
1889- SYS,
1890- } <: AbstractNonlinearFunction{iip}
1887+ TPJ, S, S2, O, TCV, SYS, RP} <: AbstractNonlinearFunction{iip}
18911888 f:: F
18921889 mass_matrix:: TMM
18931890 analytic:: Ta
@@ -1905,6 +1902,7 @@ struct NonlinearFunction{iip, specialize, F, TMM, Ta, Tt, TJ, JVP, VJP, JP, SP,
19051902 observed:: O
19061903 colorvec:: TCV
19071904 sys:: SYS
1905+ resid_prototype:: RP
19081906end
19091907
19101908TruncatedStacktraces. @truncate_stacktrace NonlinearFunction 1 2
@@ -3648,7 +3646,8 @@ function NonlinearFunction{iip, specialize}(f;
36483646 DEFAULT_OBSERVED_NO_TIME,
36493647 colorvec = __has_colorvec (f) ? f. colorvec :
36503648 nothing ,
3651- sys = __has_sys (f) ? f. sys : nothing ) where {
3649+ sys = __has_sys (f) ? f. sys : nothing ,
3650+ resid_prototype = __has_resid_prototype (f) ? f. resid_prototype : nothing ) where {
36523651 iip,
36533652 specialize,
36543653}
@@ -3687,14 +3686,14 @@ function NonlinearFunction{iip, specialize}(f;
36873686 Any, Any, Any, Any, Any,
36883687 Any, Any, Any, Any, Any,
36893688 Any, Any, typeof (syms), typeof (paramsyms), Any,
3690- typeof (_colorvec), Any}(f, mass_matrix,
3689+ typeof (_colorvec), Any, Any }(f, mass_matrix,
36913690 analytic, tgrad, jac,
36923691 jvp, vjp,
36933692 jac_prototype,
36943693 sparsity, Wfact,
36953694 Wfact_t, paramjac,
36963695 syms, paramsyms, observed,
3697- _colorvec, sys)
3696+ _colorvec, sys, resid_prototype )
36983697 else
36993698 NonlinearFunction{iip, specialize,
37003699 typeof (f), typeof (mass_matrix), typeof (analytic), typeof (tgrad),
@@ -3703,13 +3702,13 @@ function NonlinearFunction{iip, specialize}(f;
37033702 typeof (Wfact_t), typeof (paramjac), typeof (syms),
37043703 typeof (paramsyms),
37053704 typeof (observed),
3706- typeof (_colorvec), typeof (sys)}(f, mass_matrix, analytic, tgrad ,
3707- jac,
3705+ typeof (_colorvec), typeof (sys), typeof (resid_prototype) }(f, mass_matrix,
3706+ analytic, tgrad, jac,
37083707 jvp, vjp, jac_prototype, sparsity,
37093708 Wfact,
37103709 Wfact_t, paramjac, syms,
37113710 paramsyms,
3712- observed, _colorvec, sys)
3711+ observed, _colorvec, sys, resid_prototype )
37133712 end
37143713end
37153714
@@ -3978,6 +3977,7 @@ __has_analytic(f) = isdefined(f, :analytic)
39783977__has_colorvec (f) = isdefined (f, :colorvec )
39793978__has_sys (f) = isdefined (f, :sys )
39803979__has_analytic_full (f) = isdefined (f, :analytic_full )
3980+ __has_resid_prototype (f) = isdefined (f, :resid_prototype )
39813981
39823982# compatibility
39833983has_invW (f:: AbstractSciMLFunction ) = false
0 commit comments