Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
oscardssmith committed Nov 19, 2024
1 parent a353bb1 commit 894e0dc
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 23 deletions.
38 changes: 19 additions & 19 deletions Manifest.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions test/ddt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ let sys = IRODESystem(ddt_nonlinear; debug_config=(; store_ss_levels=true))

for sol in solve_dae(sys, [0.], [1.], (0., 1.); reltol=1e-6)
@test all(isapprox.(sol[sys.x], exp.(sol.t), atol=1e-4))
@test all(isapprox.(sol[sys.y], exp.(sol.t), atol=1e-4))
#DAECompiler incorrectly tries to interpolate based on algebraic vars
@test_broken all(isapprox.(sol[sys.y], exp.(sol.t), atol=1e-4))
end

for level in dbg.ss_levels
Expand All @@ -50,8 +51,11 @@ end
let sys = IRODESystem(ddt_nonlinear2; debug_config=(; store_ss_levels=true))
dbg = getfield(sys, :debug_config)

for sol in (solve_dae(sys, [0., 0.], [1., 1.], (0., 1.))...,
solve_ode(sys, [1., 1., 0., 0.], (0., 1.))..., )
for sol in solve_dae(sys, [0., 0.], [1., 1.], (0., 1.))
@test all(isapprox.(sol[sys.x], exp.(sol.t), atol=1e-2))
@test all(isapprox.(sol[sys.y], exp.(sol.t), atol=1e-2))
end
for sol in solve_ode(sys, [1., 1., 0., 0.], (0., 1.))
@test all(isapprox.(sol[sys.x], exp.(sol.t), atol=1e-2))
@test all(isapprox.(sol[sys.y], exp.(sol.t), atol=1e-2))
end
Expand Down
1 change: 0 additions & 1 deletion test/implied_alias.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ using Test
using SciMLBase
using DAECompiler
using DAECompiler.Intrinsics
using OrdinaryDiffEq

include("testutils.jl")

Expand Down
1 change: 1 addition & 0 deletions test/regression.jl
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ function (p::OneParam)()
equation!(state_ddt(state_ddt(y)) - z*ẍ)
equation!(x - ẍ)
end
using Sundails
let sys = IRODESystem(Tuple{OneParam}; debug_config=(;store_ir_levels=true, store_ss_levels=true));
daeprob = DAEProblem(sys, [0., 0., 0.], [1., 0., 1.], (0., 1.), OneParam(1.));
sol = solve(daeprob, IDA())
Expand Down

0 comments on commit 894e0dc

Please sign in to comment.