File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -288,20 +288,15 @@ sys = structural_simplify(ns; conservative = true)
288
288
@testset " Jacobian with observed equations that depend on unknowns" begin
289
289
@variables x y z
290
290
@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]
296
294
guesses = [x => 1.0 , y => 0.0 , z => 0.0 ]
297
295
ps = [σ => 10.0 , ρ => 26.0 , β => 8 / 3 ]
298
296
@mtkbuild ns = NonlinearSystem (eqs)
299
297
300
- @test isequal (calculate_jacobian (ns), [
301
- (- 1 - z+ ρ)* σ - x* σ
302
- 2 x* (- z+ ρ) - β- (x^ 2 )
303
- ])
304
-
298
+ @test isequal (calculate_jacobian (ns), [(- 1 - z + ρ)* σ - x* σ
299
+ 2 x* (- z + ρ) - β- (x^ 2 )])
305
300
# solve without analytical jacobian
306
301
prob = NonlinearProblem (ns, guesses, ps)
307
302
sol = solve (prob, NewtonRaphson ())
You can’t perform that action at this time.
0 commit comments