Skip to content

Commit

Permalink
Restore canonical equation form 0 ~ rhs - lhs
Browse files Browse the repository at this point in the history
  • Loading branch information
hersle committed Oct 3, 2024
1 parent 28e9e5f commit 9182a7d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/systems/nonlinear/nonlinearsystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ function NonlinearSystem(eqs, unknowns, ps;
eqs = [eqs]
end

# Copy equations to canonical form, but do not touch array expressions
eqs = [wrap(eq.lhs) isa Symbolics.Arr ? eq : 0 ~ eq.rhs - eq.lhs for eq in eqs]

jac = RefValue{Any}(EMPTY_JAC)
defaults = todict(defaults)
defaults = Dict{Any, Any}(value(k) => value(v)
Expand Down

0 comments on commit 9182a7d

Please sign in to comment.