Skip to content

Commit 94a9ad3

Browse files
Merge pull request #233 from SciML/ap/v4
feat: move to v4
2 parents a959181 + 06b4bd8 commit 94a9ad3

File tree

12 files changed

+541
-210
lines changed

12 files changed

+541
-210
lines changed

.JuliaFormatter.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
style = "sciml"
2-
format_markdown = true
2+
format_markdown = true
3+
annotate_untyped_fields_with_any = false

.github/workflows/Downgrade.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
with:
2323
version: ${{ matrix.version }}
2424
- uses: julia-actions/julia-downgrade-compat@v1
25-
# if: ${{ matrix.version == '1.6' }}
2625
with:
2726
skip: Pkg,TOML
2827
- uses: julia-actions/julia-buildpkg@v1

Project.toml

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,54 @@
11
name = "DiffEqCallbacks"
22
uuid = "459566f4-90b8-5000-8ac3-15dfb0a30def"
33
authors = ["Chris Rackauckas <[email protected]>"]
4-
version = "3.9.1"
4+
version = "4.0.0"
55

66
[deps]
7+
ConcreteStructs = "2569d6c7-a4a2-43d3-a901-331e8e4be471"
78
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
89
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
9-
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
10+
DifferentiationInterface = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63"
1011
Functors = "d9f16b24-f501-4c13-a1f2-28368ffc5196"
1112
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1213
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
13-
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
14-
Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a"
1514
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
1615
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
1716
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
1817
StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c"
1918

20-
[weakdeps]
21-
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
22-
OrdinaryDiffEqCore = "bbf590c4-e513-4bbe-9b18-05decba2e5d8"
23-
Sundials = "c3572dad-4567-51f8-b174-8c6c989267f4"
24-
2519
[compat]
20+
ADTypes = "1.9.0"
2621
Aqua = "0.8"
27-
DataInterpolations = "4.6"
22+
ConcreteStructs = "0.2.3"
23+
DataInterpolations = "4.6, 5, 6"
2824
DataStructures = "0.18.13"
29-
DiffEqBase = "6.154"
25+
DiffEqBase = "6.155.3"
26+
DifferentiationInterface = "0.6.1"
3027
ForwardDiff = "0.10.36"
3128
Functors = "0.4"
3229
LinearAlgebra = "1.10"
3330
Markdown = "1.10"
34-
NonlinearSolve = "3.7.2"
35-
ODEProblemLibrary = "0.1.5"
31+
NonlinearSolve = "3.14"
32+
ODEProblemLibrary = "0.1.8"
3633
OrdinaryDiffEq = "6.88"
37-
OrdinaryDiffEqCore = "1"
38-
Parameters = "0.12"
3934
QuadGK = "2.9"
4035
RecipesBase = "1.3.4"
41-
RecursiveArrayTools = "3.9"
42-
SciMLBase = "2.26"
43-
SciMLSensitivity = "7.56"
44-
StaticArrays = "1.8"
36+
RecursiveArrayTools = "3.27"
37+
SciMLBase = "2.54"
38+
SciMLSensitivity = "7.68"
39+
StaticArrays = "1.9.7"
4540
StaticArraysCore = "1.4"
4641
Sundials = "4.19.2"
47-
Test = "1"
48-
Tracker = "0.2.26"
42+
Test = "1.10"
43+
Tracker = "0.2.35"
4944
Zygote = "0.6.69"
5045
julia = "1.10"
5146

5247
[extras]
48+
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
5349
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
5450
DataInterpolations = "82cc6244-b520-54b8-b5a6-8a565e85f1d0"
51+
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
5552
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
5653
ODEProblemLibrary = "fdc4e326-1af4-4b90-96e7-779fcce2daa5"
5754
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
@@ -64,4 +61,4 @@ Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"
6461
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
6562

6663
[targets]
67-
test = ["Aqua", "DataInterpolations", "OrdinaryDiffEq", "ODEProblemLibrary", "Test", "QuadGK", "SciMLSensitivity", "StaticArrays", "Tracker", "Zygote", "NonlinearSolve"]
64+
test = ["ADTypes", "Aqua", "DataInterpolations", "ForwardDiff", "NonlinearSolve", "ODEProblemLibrary", "OrdinaryDiffEq", "QuadGK", "SciMLSensitivity", "StaticArrays", "Test", "Tracker", "Zygote"]

docs/Project.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
[deps]
2+
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
23
DiffEqCallbacks = "459566f4-90b8-5000-8ac3-15dfb0a30def"
34
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
45
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
56
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
67
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
78

89
[compat]
9-
DiffEqCallbacks = "3"
10+
ADTypes = "1.9.0"
11+
DiffEqCallbacks = "4"
1012
Documenter = "1"
1113
OrdinaryDiffEq = "6.88"
1214
Plots = "1.36"

docs/src/projection.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ManifoldProjection
1212
Here we solve the harmonic oscillator:
1313

1414
```@example manifold
15-
using OrdinaryDiffEq, DiffEqCallbacks, Plots
15+
using OrdinaryDiffEq, DiffEqCallbacks, Plots, ADTypes
1616
1717
u0 = ones(2)
1818
function f(du, u, p, t)
@@ -28,14 +28,13 @@ to conserve the sum of squares:
2828
```@example manifold
2929
function g(resid, u, p, t)
3030
resid[1] = u[2]^2 + u[1]^2 - 2
31-
resid[2] = 0
3231
end
3332
```
3433

3534
To build the callback, we just call
3635

3736
```@example manifold
38-
cb = ManifoldProjection(g)
37+
cb = ManifoldProjection(g; autodiff = AutoForwardDiff(), resid_prototype = zeros(1))
3938
```
4039

4140
Using this callback, the Runge-Kutta method `Vern7` conserves energy. Note that the

src/DiffEqCallbacks.jl

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
module DiffEqCallbacks
22

3-
using DiffEqBase, RecursiveArrayTools, DataStructures, RecipesBase, LinearAlgebra,
4-
StaticArraysCore, NonlinearSolve, ForwardDiff, Functors
5-
6-
import Base.Iterators
7-
8-
using Markdown
9-
10-
using Parameters: @unpack
11-
12-
import SciMLBase
13-
14-
using DiffEqBase: get_tstops, get_tstops_array, get_tstops_max
3+
using ConcreteStructs: @concrete
4+
using DataStructures: DataStructures, BinaryMaxHeap, BinaryMinHeap
5+
using DiffEqBase: DiffEqBase, get_tstops, get_tstops_array, get_tstops_max
6+
using DifferentiationInterface: DifferentiationInterface, Constant
7+
using Functors: fmap
8+
using LinearAlgebra: LinearAlgebra, adjoint, axpy!, copyto!, mul!, ldiv!
9+
using Markdown: @doc_str
10+
using RecipesBase: @recipe
11+
using RecursiveArrayTools: RecursiveArrayTools, DiffEqArray, copyat_or_push!
12+
using SciMLBase: SciMLBase, CallbackSet, DiscreteCallback, NonlinearFunction,
13+
NonlinearLeastSquaresProblem, NonlinearProblem, RODEProblem,
14+
ReturnCode, SDEProblem, add_tstop!, check_error, get_du,
15+
get_proposed_dt, get_tmp_cache, init, reinit!,
16+
set_proposed_dt!, solve!, terminate!, u_modified!
17+
using StaticArraysCore: StaticArraysCore
18+
19+
const DI = DifferentiationInterface
1520

1621
include("functor_helpers.jl")
1722
include("autoabstol.jl")

0 commit comments

Comments
 (0)