Skip to content

Commit

Permalink
Add two TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
hersle committed Jul 16, 2024
1 parent 15c44d5 commit b477f73
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/systems/nonlinear/nonlinearsystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ function calculate_jacobian(sys::NonlinearSystem; sparse = false, simplify = fal
end

# observed equations may depend on unknowns, so substitute them in first
# TODO: must do the same fix in e.g. calculate_hessian?
# TODO: rather keep observed derivatives unexpanded, like "Differential(obs)(expr)"?
obs = map(eq -> eq.lhs => eq.rhs, observed(sys))
rhs = map(eq -> substitute(eq.rhs, obs), equations(sys))
vals = [dv for dv in unknowns(sys)]
Expand Down

0 comments on commit b477f73

Please sign in to comment.