Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "OrdinaryDiffEqOperatorSplitting"
uuid = "760fc936-9fa0-4281-9c1a-468957eedc89"
version = "0.2.3"
version = "0.2.4"
authors = ["Dennis Ogiermann <termi-official@users.noreply.github.com> and contributors"]

[deps]
Expand All @@ -27,7 +27,7 @@ OrdinaryDiffEqTsit5 = "1.1.0"
PrecompileTools = "1.0"
RecursiveArrayTools = "3.39.0"
SafeTestsets = "0.1.0"
SciMLBase = "2.77.0"
SciMLBase = "2.77.0, 3.1"
TimerOutputs = "0.5.28"
Unrolled = "0.1.5"
julia = "1.10"
Expand Down
8 changes: 8 additions & 0 deletions src/integrator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1115,3 +1115,11 @@ end

DiffEqBase.u_modified!(i::OperatorSplittingIntegrator, bool) = i.u_modified = bool
DiffEqBase.u_modified!(i::SplitSubIntegrator, bool) = i.u_modified = bool

# SciMLBase v3 renamed `u_modified!` → `derivative_discontinuity!`. On v3+,
# also provide the overloads under the new name so callers using the new
# API dispatch correctly instead of hitting the generic `error(...)` fallback.
@static if isdefined(SciMLBase, :derivative_discontinuity!)
SciMLBase.derivative_discontinuity!(i::OperatorSplittingIntegrator, bool) = i.u_modified = bool
SciMLBase.derivative_discontinuity!(i::SplitSubIntegrator, bool) = i.u_modified = bool
end
8 changes: 7 additions & 1 deletion src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,13 @@ function forward_sync_internal!(u_source, child::DEIntegrator, solution_indices)
@views usrc = u_source[solution_indices]
sync_vectors!(child.u, usrc)
sync_vectors!(child.uprev, child.u)
SciMLBase.u_modified!(child, true)
# SciMLBase v3 renamed this to `derivative_discontinuity!`; call the
# appropriate name based on which SciMLBase is loaded.
@static if isdefined(SciMLBase, :derivative_discontinuity!)
SciMLBase.derivative_discontinuity!(child, true)
else
SciMLBase.u_modified!(child, true)
end
return nothing
end

Expand Down
Loading