We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3ea11c commit 2c55750Copy full SHA for 2c55750
src/systems/nonlinear/modelingtoolkitize.jl
@@ -41,11 +41,14 @@ function modelingtoolkitize(
41
if prob isa NonlinearLeastSquaresProblem
42
rhs = ArrayInterface.restructure(
43
prob.f.resid_prototype, similar(prob.f.resid_prototype, Num))
44
+ prob.f(rhs, vars, params)
45
+ eqs = vcat([0.0 ~ rhs[i] for i in 1:length(prob.f.resid_prototype)]...)
46
else
47
rhs = ArrayInterface.restructure(prob.u0, similar(vars, Num))
48
49
+ eqs = vcat([0.0 ~ rhs[i] for i in 1:length(rhs)]...)
50
end
- prob.f(rhs, vars, params)
- eqs = vcat([0.0 ~ rhs[i] for i in 1:length(prob.f.resid_prototype)]...)
51
+
52
53
rhs = prob.f(vars, params)
54
out_def = prob.f(prob.u0, prob.p)
0 commit comments