@@ -2661,6 +2661,35 @@ function NonlinearFunction{iip}(f::ODEFunction) where {iip}
2661
2661
colorvec = f. colorvec)
2662
2662
end
2663
2663
2664
+ function unwrapped_f (f:: NonlinearFunction , newf = unwrapped_f (f. f))
2665
+ if specialization (f) === NoSpecialize
2666
+ return NonlinearFunction{isinplace (f), specialization (f), Any, Any,
2667
+ Any, Any, Any, Any, Any, Any, Any,
2668
+ Any, Any, Any, Any, Any,
2669
+ typeof (f. colorvec), Any, Any}(newf, f. mass_matrix,
2670
+ f. analytic, f. tgrad, f. jac,
2671
+ f. jvp, f. vjp, f. jac_prototype,
2672
+ f. sparsity, f. Wfact,
2673
+ f. Wfact_t, f. paramjac,
2674
+ f. observed, f. colorvec, f. sys,
2675
+ f. resid_prototype)
2676
+ else
2677
+ return NonlinearFunction{isinplace (f), specialization (f), typeof (newf),
2678
+ typeof (f. mass_matrix), typeof (f. analytic), typeof (f. tgrad),
2679
+ typeof (f. jac), typeof (f. jvp), typeof (f. vjp), typeof (f. jac_prototype),
2680
+ typeof (f. sparsity), typeof (f. Wfact), typeof (f. Wfact_t),
2681
+ typeof (f. paramjac),
2682
+ typeof (f. observed), typeof (f. colorvec),
2683
+ typeof (f. sys), typeof (f. resid_prototype)}(newf, f. mass_matrix,
2684
+ f. analytic, f. tgrad, f. jac,
2685
+ f. jvp, f. vjp, f. jac_prototype,
2686
+ f. sparsity, f. Wfact,
2687
+ f. Wfact_t, f. paramjac,
2688
+ f. observed, f. colorvec, f. sys,
2689
+ f. resid_prototype)
2690
+ end
2691
+ end
2692
+
2664
2693
@add_kwonly function SplitFunction (f1, f2, mass_matrix, cache, analytic, tgrad, jac, jvp,
2665
2694
vjp, jac_prototype, W_prototype, sparsity, Wfact, Wfact_t, paramjac,
2666
2695
observed, colorvec, sys, initializeprob, update_initializeprob!,
0 commit comments