NEWS.md: document VectorContinuousCallback simultaneous-events change#3568
Merged
ChrisRackauckas merged 1 commit intoApr 27, 2026
Merged
Conversation
PR SciML#3230 was rolled into the v7 mega-PR SciML#3242 and ships in 7.0.0, but NEWS.md never picked up an entry for it. Two distinct user-visible changes need calling out: 1. Behavior: when multiple conditions of the same VCC cross zero on the same step, all of them now fire. The old implementation invoked the user's affect! only for the first crossing. 2. Breaking API: the VCC affect! signature changed from affect!(integrator, event_index::Int) to affect!(integrator, simultaneous_events::Vector{Int8}) where each entry is 0 / -1 / +1 to encode "did not fire" / "upcrossing" / "downcrossing". affect_neg! is no longer called for VCC since direction lives in the mask. Add a "Callback changes" section right after "DiffEqBase changes" (callbacks.jl lives in lib/DiffEqBase) with the encoding table, a side-by-side migration example, links to SciML#3230 / SciML#3242 / SciML#3549, and a short note explaining why the mask is Int8 rather than Bool. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR #3230 was rolled into the v7 merge (#3242, shipped in 7.0.0), but NEWS.md never picked up an entry for it. The change has two user-visible aspects worth documenting separately:
VectorContinuousCallbacknow fires every condition that crosses zero on a step, not just the first. Bouncing-balls-style and friction state-machine callbacks were affected.affect!signature changed fromaffect!(integrator, event_index::Int)toaffect!(integrator, simultaneous_events::Vector{Int8}), with each entry being0/-1/+1for "did not fire" / "upcrossing" / "downcrossing".affect_neg!is no longer called for VCC because the direction now rides on the mask.This PR adds a new Callback changes section to NEWS.md, placed right after the existing DiffEqBase changes section (the affected code is in
lib/DiffEqBase/src/callbacks.jl). The section covers:Int8encoding table.Int8rather thanBool(folding direction into the mask removes theaffect!/affect_neg!split for VCC).Test plan
lib/DiffEqBase/src/callbacks.jl(docstring at line 488,apply_callback!dispatch at line 540).🤖 Generated with Claude Code