Skip to content

Commit 1d3da35

Browse files
committed
fix
1 parent 92c1cb9 commit 1d3da35

File tree

5 files changed

+4
-8
lines changed

5 files changed

+4
-8
lines changed

src/linearization.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,6 @@ function linearize_symbolic(sys::AbstractSystem, inputs,
535535
if !iszero(Bs)
536536
if !allow_input_derivatives
537537
der_inds = findall(vec(any(!iszero, Bs, dims = 1)))
538-
@show typeof(der_inds)
539538
error("Input derivatives appeared in expressions (-g_z\\g_u != 0), the following inputs appeared differentiated: $(ModelingToolkit.inputs(sys)[der_inds]). Call `linearize_symbolic` with keyword argument `allow_input_derivatives = true` to allow this and have the returned `B` matrix be of double width ($(2nu)), where the last $nu inputs are the derivatives of the first $nu inputs.")
540539
end
541540
B = [B [zeros(nx, nu); Bs]]

src/structural_transformation/symbolics_tearing.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,6 @@ function generate_derivative_variables!(
378378
# For variable x, make dummy derivative x_t if the
379379
# derivative is in the system
380380
for v in 1:length(var_to_diff)
381-
@show graph
382381
dv = var_to_diff[v]
383382
dv isa Int || continue
384383
solved = var_eq_matching[dv] isa Int

src/systems/diffeqs/abstractodesystem.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,8 @@ function generate_W(sys::AbstractODESystem, γ = 1., dvs = unknowns(sys),
146146
sparse && (M = SparseArrays.sparse(M))
147147
J = calculate_jacobian(sys; simplify, sparse, dvs)
148148
W = ˍ₋gamma*M + J
149-
@show W
150149

151150
p = reorder_parameters(sys, ps)
152-
@show length(p)
153151
return build_function_wrapper(sys, W,
154152
dvs,
155153
p...,

src/systems/diffeqs/odesystem.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,6 @@ function ODESystem(deqs::AbstractVector{<:Equation}, iv, dvs, ps;
323323
cons = get_constraintsystem(sys)
324324
cons !== nothing && push!(conssystems, cons)
325325
end
326-
@show conssystems
327326
@set! constraintsystem.systems = conssystems
328327
end
329328

test/jacobiansparsity.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using OrdinaryDiffEq, ModelingToolkit, SparseArrays
1+
using ModelingToolkit, SparseArrays#, OrdinaryDiffEq
22

33
N = 3
44
xyd_brusselator = range(0, stop = 1, length = N)
@@ -51,7 +51,7 @@ JP = prob.f.jac_prototype
5151

5252
# test sparse jacobian
5353
prob = ODEProblem(sys, u0, (0, 11.5), sparse = true, jac = true)
54-
@test_nowarn solve(prob, Rosenbrock23())
54+
#@test_nowarn solve(prob, Rosenbrock23())
5555
@test findnz(calculate_jacobian(sys, sparse = true))[1:2] ==
5656
findnz(prob.f.jac_prototype)[1:2]
5757

@@ -74,7 +74,7 @@ f = DiffEqBase.ODEFunction(sys, u0 = nothing, sparse = true, jac = false)
7474
# test when u0 is not Float64
7575
u0 = similar(init_brusselator_2d(xyd_brusselator), Float32)
7676
prob_ode_brusselator_2d = ODEProblem(brusselator_2d_loop,
77-
u0, (0.0, 11.5), p)
77+
u0, (0.0, 11.5), p)
7878
sys = complete(modelingtoolkitize(prob_ode_brusselator_2d))
7979

8080
prob = ODEProblem(sys, u0, (0, 11.5), sparse = true, jac = false)
@@ -85,6 +85,7 @@ prob = ODEProblem(sys, u0, (0, 11.5), sparse = true, jac = true)
8585

8686
@testset "W matrix sparsity" begin
8787
t = ModelingToolkit.t_nounits
88+
D = ModelingToolkit.D_nounits
8889
@parameters g
8990
@variables x(t) y(t) λ(t)
9091
eqs = [D(D(x)) ~ λ * x

0 commit comments

Comments
 (0)