@@ -18,7 +18,7 @@ function generate_ODENLStepData(sys::System, u0, p, mm = calculate_massmatrix(sy
18
18
set_gamma_c = setsym (nlsys, (ODE_GAMMA... , ODE_C))
19
19
set_outer_tmp = setsym (nlsys, outer_tmp)
20
20
set_inner_tmp = setsym (nlsys, inner_tmp)
21
- nlprobmap = getsym (nlsys, unknowns (sys) )
21
+ nlprobmap = generate_nlprobmap (sys, nlsys )
22
22
23
23
return SciMLBase. ODENLStepData (nlprob, subsetidxs, set_gamma_c, set_outer_tmp, set_inner_tmp, nlprobmap)
24
24
end
@@ -58,3 +58,19 @@ function inner_nlsystem(sys::System, mm)
58
58
nlsys = mtkcompile (System (new_eqs, new_dvs, new_ps; name = :nlsys ); split = is_split (sys))
59
59
return nlsys, outer_tmp, inner_tmp
60
60
end
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