@@ -18,7 +18,7 @@ function generate_ODENLStepData(sys::System, u0, p, mm = calculate_massmatrix(sy
1818 set_gamma_c = setsym (nlsys, (ODE_GAMMA... , ODE_C))
1919 set_outer_tmp = setsym (nlsys, outer_tmp)
2020 set_inner_tmp = setsym (nlsys, inner_tmp)
21- nlprobmap = getsym (nlsys, unknowns (sys) )
21+ nlprobmap = generate_nlprobmap (sys, nlsys )
2222
2323 return SciMLBase. ODENLStepData (nlprob, subsetidxs, set_gamma_c, set_outer_tmp, set_inner_tmp, nlprobmap)
2424end
@@ -58,3 +58,19 @@ function inner_nlsystem(sys::System, mm)
5858 nlsys = mtkcompile (System (new_eqs, new_dvs, new_ps; name = :nlsys ); split = is_split (sys))
5959 return nlsys, outer_tmp, inner_tmp
6060end
61+
62+ struct NLStep_probmap{F}
63+ f:: F
64+ end
65+
66+ function (nlp:: NLStep_probmap )(buffer, nlsol)
67+ nlp. f (buffer, state_values (nlsol), parameter_values (nlsol))
68+ end
69+
70+ function (nlp:: NLStep_probmap )(nlsol)
71+ nlp. f (state_values (nlsol), parameter_values (nlsol))
72+ end
73+
74+ function generate_nlprobmap (sys:: System , nlsys:: System )
75+ return NLStep_probmap (build_explicit_observed_function (nlsys, unknowns (sys)))
76+ end
0 commit comments