Skip to content

Commit 597a56b

Browse files
committed
Format
1 parent b477f73 commit 597a56b

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

test/nonlinearsystem.jl

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -288,20 +288,15 @@ sys = structural_simplify(ns; conservative = true)
288288
@testset "Jacobian with observed equations that depend on unknowns" begin
289289
@variables x y z
290290
@parameters σ ρ β
291-
eqs = [
292-
0 ~ σ * (y - x)
293-
0 ~ x *- z) - y
294-
0 ~ x * y - β * z
295-
]
291+
eqs = [0 ~ σ * (y - x)
292+
0 ~ x *- z) - y
293+
0 ~ x * y - β * z]
296294
guesses = [x => 1.0, y => 0.0, z => 0.0]
297295
ps ==> 10.0, ρ => 26.0, β => 8 / 3]
298296
@mtkbuild ns = NonlinearSystem(eqs)
299297

300-
@test isequal(calculate_jacobian(ns), [
301-
(-1-z+ρ)*σ -x*σ
302-
2x*(-z+ρ) -β-(x^2)
303-
])
304-
298+
@test isequal(calculate_jacobian(ns), [(-1 - z + ρ)*σ -x*σ
299+
2x*(-z + ρ) -β-(x^2)])
305300
# solve without analytical jacobian
306301
prob = NonlinearProblem(ns, guesses, ps)
307302
sol = solve(prob, NewtonRaphson())

0 commit comments

Comments
 (0)