Skip to content

Commit d8c8a53

Browse files
ChrisRackauckas-ClaudeChrisRackauckasclaude
committed
Remove dead has_destats re-export; revert Hard DAE assertion (#3479)
- `has_destats` was removed from SciMLBase v3 but DiffEqBase still re-exported it, producing `UndefVarError: has_destats` at precompile on the registered DiffEqBase used by Julia 1.10 (which ignores [sources]). The symbol is unused in this repo — drop it from the import list. - `test/regression/hard_dae.jl:305`: revert the assertion to `abs(sol(2-2^-10, idxs=1)) <= 1e-4`. The `hardstop!` DAE with mass matrix `Diagonal([1,0,1])` only makes `u[2]` algebraic; gravity (`du[3] = pg` for `t<2`) drives `u[1]` from 5 down, and the `y<=0` branch of the algebraic law pins `y≈0` well before `t=2`. The earlier `≈ 5.0` assertion was wrong. Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com> Co-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>
1 parent 12b0db6 commit d8c8a53

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

lib/DiffEqBase/src/DiffEqBase.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ using SciMLBase: @def, DEIntegrator, AbstractDEProblem,
9090
calculate_ensemble_errors, isconstant,
9191
DEFAULT_REDUCTION, isautodifferentiable,
9292
isadaptive, isdiscrete, has_syms, AbstractAnalyticalSolution,
93-
RECOMPILE_BY_DEFAULT, wrap_sol, has_destats
93+
RECOMPILE_BY_DEFAULT, wrap_sol
9494

9595
import SciMLBase: solve, init, step!, solve!, __init, __solve, update_coefficients!,
9696
update_coefficients, isadaptive, wrapfun_oop, wrapfun_iip,

test/regression/hard_dae.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,6 @@ for prob in [prob1, prob2], alg in [simple_implicit_euler, alg_switch]
300300
)
301301
@test sol.retcode == ReturnCode.Success
302302
@test sol(0, idxs = 1) == 5
303-
# The algebraic constraint u[2]=u[1] makes du[1]=0, so u[1]=5 (constant)
304-
# until the callback resets u[1]=1e-6 at t=2. After the reset u[1] recovers.
305-
@test sol(2 - 2^-10, idxs = 1) 5.0 atol = 1.0e-4
303+
@test abs(sol(2 - 2^-10, idxs = 1)) <= 1.0e-4
306304
@test sol(4, idxs = 1) > 10
307305
end

0 commit comments

Comments
 (0)