Skip to content

Commit 9ec5720

Browse files
Merge pull request #18 from Shreyas-Ekanathan/upstream
Upstream
2 parents b820cee + ac135e6 commit 9ec5720

File tree

25 files changed

+277
-170
lines changed

25 files changed

+277
-170
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
- OrdinaryDiffEqExponentialRK
3535
- OrdinaryDiffEqExtrapolation
3636
- OrdinaryDiffEqFIRK
37+
- OrdinaryDiffEqFIRKGenerator
3738
- OrdinaryDiffEqFeagin
3839
- OrdinaryDiffEqFunctionMap
3940
- OrdinaryDiffEqHighOrderRK

.github/workflows/CompatHelper.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ jobs:
2323
- name: CompatHelper.main()
2424
env:
2525
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26-
run: julia -e 'using CompatHelper; CompatHelper.main(;subdirs=["", "docs", "test/downstream"])'
26+
run: julia -e 'using CompatHelper; CompatHelper.main(;subdirs=["", "docs", "test/downstream", "lib"])'

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "OrdinaryDiffEq"
22
uuid = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
33
authors = ["Chris Rackauckas <accounts@chrisrackauckas.com>", "Yingbo Ma <mayingbo5@gmail.com>"]
4-
version = "6.89.0"
4+
version = "6.90.1"
55

66
[deps]
77
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"

lib/OrdinaryDiffEqCore/Project.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "OrdinaryDiffEqCore"
22
uuid = "bbf590c4-e513-4bbe-9b18-05decba2e5d8"
33
authors = ["ParamThakkar123 <paramthakkar864@gmail.com>"]
4-
version = "1.10.0"
4+
version = "1.11.0"
55

66
[deps]
77
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
@@ -49,7 +49,7 @@ Accessors = "0.1.36"
4949
Adapt = "3.0, 4"
5050
ArrayInterface = "7"
5151
DataStructures = "0.18"
52-
DiffEqBase = "6.157"
52+
DiffEqBase = "6.160"
5353
DiffEqDevTools = "2.44.4"
5454
DocStringExtensions = "0.9"
5555
EnumX = "1"
@@ -70,7 +70,7 @@ Random = "<0.0.1, 1"
7070
RecursiveArrayTools = "2.36, 3"
7171
Reexport = "1.0"
7272
SafeTestsets = "0.1.0"
73-
SciMLBase = "2.57.2"
73+
SciMLBase = "2.60"
7474
SciMLOperators = "0.3"
7575
SciMLStructures = "1"
7676
SimpleUnPack = "1"

lib/OrdinaryDiffEqCore/src/alg_utils.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ end
1717

1818
SciMLBase.forwarddiffs_model_time(alg::RosenbrockAlgorithm) = true
1919

20+
SciMLBase.allows_late_binding_tstops(::OrdinaryDiffEqAlgorithm) = true
21+
SciMLBase.allows_late_binding_tstops(::DAEAlgorithm) = true
22+
2023
# isadaptive is defined below.
2124

2225
## OrdinaryDiffEq Internal Traits

lib/OrdinaryDiffEqCore/src/initialize_dae.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ function _initialize_dae!(integrator, prob::Union{ODEProblem, DAEProblem},
169169
end
170170

171171
alg = default_nlsolve(alg.nlsolve, isinplace, initializeprob.u0, initializeprob, isAD)
172-
nlsol = solve(initializeprob, alg)
172+
nlsol = solve(initializeprob, alg, abstol = integrator.opts.abstol, reltol = integrator.opts.reltol)
173173
if isinplace === Val{true}()
174174
integrator.u .= prob.f.initializeprobmap(nlsol)
175175
elseif isinplace === Val{false}()

lib/OrdinaryDiffEqCore/src/solve.jl

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,12 @@ function DiffEqBase.__init(
242242
resType = typeof(res_prototype)
243243
end
244244

245+
if tstops isa AbstractArray || tstops isa Tuple || tstops isa Number
246+
_tstops = nothing
247+
else
248+
_tstops = tstops
249+
tstops = ()
250+
end
245251
tstops_internal = initialize_tstops(tType, tstops, d_discontinuities, tspan)
246252
saveat_internal = initialize_saveat(tType, saveat, tspan)
247253
d_discontinuities_internal = initialize_d_discontinuities(tType, d_discontinuities,
@@ -264,29 +270,7 @@ function DiffEqBase.__init(
264270
end
265271

266272
### Algorithm-specific defaults ###
267-
if save_idxs === nothing
268-
saved_subsystem = nothing
269-
else
270-
if !(save_idxs isa AbstractArray) || symbolic_type(save_idxs) != NotSymbolic()
271-
_save_idxs = [save_idxs]
272-
else
273-
_save_idxs = save_idxs
274-
end
275-
saved_subsystem = SciMLBase.SavedSubsystem(prob, parameter_values(prob), _save_idxs)
276-
if saved_subsystem !== nothing
277-
_save_idxs = SciMLBase.get_saved_state_idxs(saved_subsystem)
278-
if isempty(_save_idxs)
279-
# no states to save
280-
save_idxs = Int[]
281-
elseif !(save_idxs isa AbstractArray) || symbolic_type(save_idxs) != NotSymbolic()
282-
# only a single state to save, and save it as a scalar timeseries instead of
283-
# single-element array
284-
save_idxs = only(_save_idxs)
285-
else
286-
save_idxs = _save_idxs
287-
end
288-
end
289-
end
273+
save_idxs, saved_subsystem = SciMLBase.get_save_idxs_and_saved_subsystem(prob, save_idxs)
290274

291275
if save_idxs === nothing
292276
ksEltype = Vector{rateType}
@@ -564,6 +548,13 @@ function DiffEqBase.__init(
564548
end
565549
end
566550

551+
if _tstops !== nothing
552+
tstops = _tstops(parameter_values(integrator), prob.tspan)
553+
for tstop in tstops
554+
add_tstop!(integrator, tstop)
555+
end
556+
end
557+
567558
handle_dt!(integrator)
568559
integrator
569560
end

lib/OrdinaryDiffEqDifferentiation/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "OrdinaryDiffEqDifferentiation"
22
uuid = "4302a76b-040a-498a-8c04-15b101fed76b"
33
authors = ["Chris Rackauckas <accounts@chrisrackauckas.com>", "Yingbo Ma <mayingbo5@gmail.com>"]
4-
version = "1.1.0"
4+
version = "1.2.0"
55

66
[deps]
77
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"

lib/OrdinaryDiffEqFIRK/Project.toml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,39 @@
11
name = "OrdinaryDiffEqFIRK"
22
uuid = "5960d6e9-dd7a-4743-88e7-cf307b64f125"
33
authors = ["ParamThakkar123 <paramthakkar864@gmail.com>"]
4-
version = "1.2.0"
4+
version = "1.4.0"
55

66
[deps]
77
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
88
FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898"
99
FastPower = "a4df4552-cc26-4903-aec0-212e50a0e84b"
10-
GenericLinearAlgebra = "14197337-ba66-59df-a3e3-ca00e7dcff7a"
11-
GenericSchur = "c145ed77-6b09-5dd9-b285-bf645a82121e"
1210
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1311
LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae"
1412
MuladdMacro = "46d2c3a1-f734-5fdb-9937-b9b9aeba4221"
1513
OrdinaryDiffEqCore = "bbf590c4-e513-4bbe-9b18-05decba2e5d8"
1614
OrdinaryDiffEqDifferentiation = "4302a76b-040a-498a-8c04-15b101fed76b"
1715
OrdinaryDiffEqNonlinearSolve = "127b3ac7-2247-4354-8eb6-78cf4e7c58e8"
18-
Polynomials = "f27b6e38-b328-58d1-80ce-0feddd5e7a45"
1916
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
2017
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
21-
RootedTrees = "47965b36-3f3e-11e9-0dcf-4570dfd42a8c"
2218
SciMLOperators = "c0aeaf25-5076-4817-a8d5-81caf7dfa961"
23-
Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"
2419

2520
[compat]
2621
DiffEqBase = "6.152.2"
2722
DiffEqDevTools = "2.44.4"
2823
FastBroadcast = "0.3.5"
2924
FastPower = "1"
30-
GenericLinearAlgebra = "0.3.13"
31-
GenericSchur = "0.5.4"
3225
LinearAlgebra = "<0.0.1, 1"
3326
LinearSolve = "2.32.0"
3427
MuladdMacro = "0.2.4"
3528
ODEProblemLibrary = "0.1.8"
3629
OrdinaryDiffEqCore = "1.1"
3730
OrdinaryDiffEqDifferentiation = "<0.0.1, 1"
3831
OrdinaryDiffEqNonlinearSolve = "<0.0.1, 1"
39-
Polynomials = "4.0.11"
4032
Random = "<0.0.1, 1"
4133
RecursiveArrayTools = "3.27.0"
4234
Reexport = "1.2.2"
43-
RootedTrees = "2.23.1"
4435
SafeTestsets = "0.1.0"
4536
SciMLOperators = "0.3.9"
46-
Symbolics = "6.15.3"
4737
Test = "<0.0.1, 1"
4838
julia = "1.10"
4939

lib/OrdinaryDiffEqFIRK/src/OrdinaryDiffEqFIRK.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import OrdinaryDiffEqCore: alg_order, calculate_residuals!,
1818
get_current_adaptive_order, get_fsalfirstlast,
1919
isfirk, generic_solver_docstring
2020
using MuladdMacro, DiffEqBase, RecursiveArrayTools
21-
using Polynomials, GenericLinearAlgebra, GenericSchur
2221
using SciMLOperators: AbstractSciMLOperator
2322
using LinearAlgebra: I, UniformScaling, mul!, lu
2423
import LinearSolve

0 commit comments

Comments
 (0)