Skip to content

Commit 84c4d65

Browse files
Use BrownFullBasicInit for callback modifiers
- Callbacks have their own initializealg handled by DiffEqBase - handle_callback_modifiers! is for reinit after modifications - BrownFullBasicInit is appropriate as it only modifies algebraic variables - This matches the behavior expected for DAE callback handling
1 parent cc922c2 commit 84c4d65

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/common_interface/integrator_utils.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ end
157157

158158
function handle_callback_modifiers!(integrator::IDAIntegrator)
159159
# Implicitly does IDAReinit!
160-
DiffEqBase.initialize_dae!(integrator, integrator.initializealg)
160+
# Use BrownFullBasicInit as it only modifies algebraic variables
161+
# which is appropriate after callbacks have modified the solution
162+
DiffEqBase.initialize_dae!(integrator, DiffEqBase.BrownFullBasicInit())
161163
end
162164

163165
function DiffEqBase.add_tstop!(integrator::AbstractSundialsIntegrator, t)

0 commit comments

Comments
 (0)