@@ -74,7 +74,7 @@ f = DiffEqBase.ODEFunction(sys, u0 = nothing, sparse = true, jac = false)
7474# test when u0 is not Float64
7575u0 = similar (init_brusselator_2d (xyd_brusselator), Float32)
7676prob_ode_brusselator_2d = ODEProblem (brusselator_2d_loop,
77- u0, (0.0 , 11.5 ), p)
77+ u0, (0.0 , 11.5 ), p)
7878sys = complete (modelingtoolkitize (prob_ode_brusselator_2d))
7979
8080prob = ODEProblem (sys, u0, (0 , 11.5 ), sparse = true , jac = false )
@@ -94,7 +94,8 @@ prob = ODEProblem(sys, u0, (0, 11.5), sparse = true, jac = true)
9494 @mtkbuild pend = ODESystem (eqs, t)
9595
9696 u0 = [x => 1 , y => 0 ]
97- prob = ODEProblem (pend, u0, (0 , 11.5 ), [g => 1 ], guesses = [λ => 1 ], sparse = true , jac = true )
97+ prob = ODEProblem (
98+ pend, u0, (0 , 11.5 ), [g => 1 ], guesses = [λ => 1 ], sparse = true , jac = true )
9899 jac, jac! = generate_jacobian (pend; expression = Val{false }, sparse = true )
99100 jac_prototype = ModelingToolkit. jacobian_sparsity (pend)
100101 W_prototype = ModelingToolkit. W_sparsity (pend)
@@ -109,8 +110,9 @@ prob = ODEProblem(sys, u0, (0, 11.5), sparse = true, jac = true)
109110 @test_throws AssertionError jac! (similar (jac_prototype, Float64), u, p, t)
110111
111112 W, W! = generate_W (pend; expression = Val{false }, sparse = true )
112- γ = .1
113+ γ = 0 .1
113114 M = sparse (calculate_massmatrix (pend))
114115 @test_throws AssertionError W! (similar (jac_prototype, Float64), u, p, γ, t)
115- @test W! (similar (W_prototype, Float64), u, p, γ, t) == 0.1 * M + jac! (similar (W_prototype, Float64), u, p, t)
116+ @test W! (similar (W_prototype, Float64), u, p, γ, t) ==
117+ 0.1 * M + jac! (similar (W_prototype, Float64), u, p, t)
116118end
0 commit comments