@@ -518,7 +518,7 @@ information on generating the SplitFunction from this symbolic engine.
518518struct SplitFunction{
519519 iip, specialize, F1, F2, TMM, C, Ta, Tt, TJ, JVP, VJP, JP, SP, TW, TWt,
520520 TPJ, O,
521- TCV, SYS} <: AbstractODEFunction{iip}
521+ TCV, SYS, IProb, IProbMap } <: AbstractODEFunction{iip}
522522 f1:: F1
523523 f2:: F2
524524 mass_matrix:: TMM
@@ -536,6 +536,8 @@ struct SplitFunction{
536536 observed:: O
537537 colorvec:: TCV
538538 sys:: SYS
539+ initializeprob:: IProb
540+ initializeprobmap:: IProbMap
539541end
540542
541543@doc doc"""
@@ -2599,7 +2601,7 @@ end
25992601
26002602@add_kwonly function SplitFunction (f1, f2, mass_matrix, cache, analytic, tgrad, jac, jvp,
26012603 vjp, jac_prototype, sparsity, Wfact, Wfact_t, paramjac,
2602- observed, colorvec, sys)
2604+ observed, colorvec, sys, initializeprob, initializeprobmap )
26032605 f1 = ODEFunction (f1)
26042606 f2 = ODEFunction (f2)
26052607
@@ -2613,8 +2615,10 @@ end
26132615 typeof (cache), typeof (analytic), typeof (tgrad), typeof (jac), typeof (jvp),
26142616 typeof (vjp), typeof (jac_prototype), typeof (sparsity),
26152617 typeof (Wfact), typeof (Wfact_t), typeof (paramjac), typeof (observed), typeof (colorvec),
2616- typeof (sys)}(f1, f2, mass_matrix, cache, analytic, tgrad, jac, jvp, vjp,
2617- jac_prototype, sparsity, Wfact, Wfact_t, paramjac, observed, colorvec, sys)
2618+ typeof (sys), typeof (initializeprob), typeof (initializeprobmap)}(f1, f2, mass_matrix,
2619+ cache, analytic, tgrad, jac, jvp, vjp,
2620+ jac_prototype, sparsity, Wfact, Wfact_t, paramjac, observed, colorvec, sys,
2621+ initializeprob, initializeprobmap)
26182622end
26192623function SplitFunction {iip, specialize} (f1, f2;
26202624 mass_matrix = __has_mass_matrix (f1) ?
@@ -2642,28 +2646,36 @@ function SplitFunction{iip, specialize}(f1, f2;
26422646 DEFAULT_OBSERVED,
26432647 colorvec = __has_colorvec (f1) ? f1. colorvec :
26442648 nothing ,
2645- sys = __has_sys (f1) ? f1. sys : nothing ) where {iip,
2649+ sys = __has_sys (f1) ? f1. sys : nothing ,
2650+ initializeprob = __has_initializeprob (f1) ? f1. initializeprob : nothing ,
2651+ initializeprobmap = __has_initializeprobmap (f1) ? f1. initializeprobmap : nothing
2652+ ) where {iip,
26462653 specialize
26472654}
26482655 sys = sys_or_symbolcache (sys, syms, paramsyms, indepsym)
2656+ @assert typeof (initializeprob) < :
2657+ Union{Nothing, NonlinearProblem, NonlinearLeastSquaresProblem}
2658+
26492659 if specialize === NoSpecialize
26502660 SplitFunction{iip, specialize, Any, Any, Any, Any, Any, Any, Any, Any, Any,
26512661 Any, Any, Any, Any, Any,
2652- Any, Any, Any}(f1, f2, mass_matrix, _func_cache,
2662+ Any, Any, Any, Any, Any }(f1, f2, mass_matrix, _func_cache,
26532663 analytic,
26542664 tgrad, jac, jvp, vjp, jac_prototype,
26552665 sparsity, Wfact, Wfact_t, paramjac,
2656- observed, colorvec, sys)
2666+ observed, colorvec, sys, initializeprob, initializeprobmap )
26572667 else
26582668 SplitFunction{iip, specialize, typeof (f1), typeof (f2), typeof (mass_matrix),
26592669 typeof (_func_cache), typeof (analytic),
26602670 typeof (tgrad), typeof (jac), typeof (jvp), typeof (vjp),
26612671 typeof (jac_prototype), typeof (sparsity),
26622672 typeof (Wfact), typeof (Wfact_t), typeof (paramjac), typeof (observed),
26632673 typeof (colorvec),
2664- typeof (sys)}(f1, f2, mass_matrix, _func_cache, analytic, tgrad, jac,
2674+ typeof (sys), typeof (initializeprob), typeof (initializeprobmap)}(f1, f2,
2675+ mass_matrix, _func_cache, analytic, tgrad, jac,
26652676 jvp, vjp, jac_prototype,
2666- sparsity, Wfact, Wfact_t, paramjac, observed, colorvec, sys)
2677+ sparsity, Wfact, Wfact_t, paramjac, observed, colorvec, sys,
2678+ initializeprob, initializeprobmap)
26672679 end
26682680end
26692681
0 commit comments