Skip to content

Commit 1b304d6

Browse files
authored
SciMLOperators v1 compat (#45)
1 parent 986f60c commit 1b304d6

File tree

4 files changed

+34
-49
lines changed

4 files changed

+34
-49
lines changed

NEWS.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,18 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [0.2.6] - unreleased
8+
## [0.2.6] - 2025-10-21
99

1010
### Changed
1111

1212
* `CompatHelper` bumped to v3.
13+
* Compatibility with `SciMLOperators` v1.
1314

1415
## [0.2.5] - 2025-10-18
1516

1617
### Added
1718

18-
* Compatibility with SciMLOperators v0.4
19+
* Compatibility with `SciMLOperators` v0.4
1920

2021
### Fixed
2122

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ManifoldDiffEq"
22
uuid = "1143c485-9b25-4e23-a65f-701df382ec90"
3-
version = "0.2.5"
3+
version = "0.2.6"
44
authors = ["Seth Axen <[email protected]>", "Mateusz Baran <[email protected]>", "Ronny Bergmann <[email protected]>", "Antoine Levitt <[email protected]>"]
55

66
[deps]
@@ -31,7 +31,7 @@ Markdown = "1.6"
3131
OrdinaryDiffEqCore = "1"
3232
RecursiveArrayTools = "2, 3"
3333
SciMLBase = "1, 2"
34-
SciMLOperators = "0.3.13, 0.4"
34+
SciMLOperators = "1"
3535
SimpleUnPack = "1"
3636
julia = "1.10"
3737

src/ManifoldDiffEq.jl

Lines changed: 25 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -438,73 +438,57 @@ function SciMLBase.__init(
438438
save_everystep || isempty(saveat) || saveat isa Number || prob.tspan[2] in saveat :
439439
save_end
440440

441+
save_idxs = nothing
442+
internalnorm = ODE_DEFAULT_NORM
443+
save_discretes = true
444+
441445
opts = DEOptions{
442-
typeof(abstol_internal),
443-
typeof(reltol_internal),
444-
QT,
445-
tType,
446-
typeof(controller),
447-
typeof(ODE_DEFAULT_NORM),
448-
typeof(internalopnorm),
446+
typeof(abstol_internal), typeof(reltol_internal),
447+
QT, tType, typeof(controller),
448+
typeof(internalnorm), typeof(internalopnorm),
449449
typeof(save_end_user),
450450
typeof(callbacks_internal),
451451
typeof(isoutofdomain),
452-
typeof(progress_message),
453-
typeof(unstable_check),
452+
typeof(progress_message), typeof(unstable_check),
454453
typeof(tstops_internal),
455-
typeof(d_discontinuities_internal),
456-
typeof(userdata),
457-
typeof(nothing),
458-
typeof(maxiters),
459-
typeof(tstops),
460-
typeof(saveat),
461-
typeof(d_discontinuities),
454+
typeof(d_discontinuities_internal), typeof(userdata),
455+
typeof(save_idxs),
456+
typeof(maxiters), typeof(tstops),
457+
typeof(saveat), typeof(d_discontinuities),
462458
}(
463-
maxiters,
464-
save_everystep,
465-
adaptive,
466-
abstol_internal,
459+
maxiters, save_everystep,
460+
adaptive, abstol_internal,
467461
reltol_internal,
468-
QT(gamma),
469-
QT(qmax),
462+
QT(gamma), QT(qmax),
470463
QT(qmin),
471464
QT(qsteady_max),
472465
QT(qsteady_min),
473466
QT(qoldinit),
474467
QT(failfactor),
475-
tType(dtmax),
476-
tType(dtmin),
468+
tType(dtmax), tType(dtmin),
477469
controller,
478-
ODE_DEFAULT_NORM,
470+
internalnorm,
479471
internalopnorm,
480-
nothing, # save_idxs
481-
tstops_internal,
472+
save_idxs, tstops_internal,
482473
saveat_internal,
483474
d_discontinuities_internal,
484-
tstops,
485-
saveat,
475+
tstops, saveat,
486476
d_discontinuities,
487-
userdata,
488-
progress,
477+
userdata, progress,
489478
progress_steps,
490479
progress_name,
491480
progress_message,
492481
progress_id,
493482
timeseries_errors,
494-
dense_errors,
495-
dense,
496-
save_on,
497-
save_start,
498-
save_end,
499-
save_end_user,
483+
dense_errors, dense,
484+
save_on, save_start,
485+
save_end, save_discretes, save_end_user,
500486
callbacks_internal,
501487
isoutofdomain,
502488
unstable_check,
503-
verbose,
504-
calck,
505-
force_dtmin,
489+
verbose, calck, force_dtmin,
506490
advance_to_tstop,
507-
stop_at_next_tstop,
491+
stop_at_next_tstop
508492
)
509493

510494
stats = SciMLBase.DEStats(0)

src/operators.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ function FrozenManifoldDiffEqOperator{T}(f) where {T <: Number}
5151
)
5252
end
5353

54-
function (L::FrozenManifoldDiffEqOperator)(du, u, p, t)
54+
function (L::FrozenManifoldDiffEqOperator)(du, u, _u, p, t)
5555
return copyto!(du, L.func(u, p, t))
5656
end
57-
function (L::FrozenManifoldDiffEqOperator)(u, p, t)
57+
function (L::FrozenManifoldDiffEqOperator)(u, _u, p, t)
5858
return L.func(u, p, t)
5959
end
6060

@@ -72,9 +72,9 @@ function LieManifoldDiffEqOperator{T}(f) where {T <: Number}
7272
return LieManifoldDiffEqOperator{T, typeof(f)}(f)
7373
end
7474

75-
function (L::LieManifoldDiffEqOperator)(du, u, p, t)
75+
function (L::LieManifoldDiffEqOperator)(du, u, _u, p, t)
7676
return copyto!(du, L.func(u, p, t))
7777
end
78-
function (L::LieManifoldDiffEqOperator)(u, p, t)
78+
function (L::LieManifoldDiffEqOperator)(u, _u, p, t)
7979
return L.func(u, p, t)
8080
end

0 commit comments

Comments
 (0)