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
83 changes: 72 additions & 11 deletions lib/DiffEqDevTools/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,73 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a"

[sources]
DelayDiffEq = {path = "../DelayDiffEq"}
DiffEqBase = {path = "../DiffEqBase"}
ImplicitDiscreteSolve = {path = "../ImplicitDiscreteSolve"}
OrdinaryDiffEq = {path = "../../"}
OrdinaryDiffEqBDF = {path = "../OrdinaryDiffEqBDF"}
OrdinaryDiffEqCore = {path = "../OrdinaryDiffEqCore"}
OrdinaryDiffEqFIRK = {path = "../OrdinaryDiffEqFIRK"}
OrdinaryDiffEqLowOrderRK = {path = "../OrdinaryDiffEqLowOrderRK"}
OrdinaryDiffEqNonlinearSolve = {path = "../OrdinaryDiffEqNonlinearSolve"}
OrdinaryDiffEqRosenbrock = {path = "../OrdinaryDiffEqRosenbrock"}
OrdinaryDiffEqTsit5 = {path = "../OrdinaryDiffEqTsit5"}
OrdinaryDiffEqVerner = {path = "../OrdinaryDiffEqVerner"}
StochasticDiffEq = {path = "../StochasticDiffEq"}
StochasticDiffEqCore = {path = "../StochasticDiffEqCore"}
StochasticDiffEqHighOrder = {path = "../StochasticDiffEqHighOrder"}
StochasticDiffEqIIF = {path = "../StochasticDiffEqIIF"}
StochasticDiffEqImplicit = {path = "../StochasticDiffEqImplicit"}
StochasticDiffEqLeaping = {path = "../StochasticDiffEqLeaping"}
StochasticDiffEqLevyArea = {path = "../StochasticDiffEqLevyArea"}
StochasticDiffEqLowOrder = {path = "../StochasticDiffEqLowOrder"}
StochasticDiffEqMilstein = {path = "../StochasticDiffEqMilstein"}
StochasticDiffEqROCK = {path = "../StochasticDiffEqROCK"}
StochasticDiffEqRODE = {path = "../StochasticDiffEqRODE"}
StochasticDiffEqWeak = {path = "../StochasticDiffEqWeak"}

[compat]
BVProblemLibrary = "0.1"
BoundaryValueDiffEq = "5"
DDEProblemLibrary = "0.1"
DelayDiffEq = "5.20"
DelayDiffEq = "5.74"
DiffEqBase = "7"
DiffEqNoiseProcess = "5.0"
DiffEqNoiseProcess = "5.30"
Distributed = "1.9"
ImplicitDiscreteSolve = "1.11"
LinearAlgebra = "1.9"
Logging = "1.9"
NLsolve = "4.2"
NonlinearSolve = "3.13, 4"
ODEProblemLibrary = "0.1"
OrdinaryDiffEq = "6, 7"
ParameterizedFunctions = "5"
NonlinearSolve = "4.17.1"
ODEProblemLibrary = "1"
OrdinaryDiffEq = "7"
OrdinaryDiffEqBDF = "1.16"
OrdinaryDiffEqCore = "4"
OrdinaryDiffEqFIRK = "1"
OrdinaryDiffEqLowOrderRK = "1.5"
OrdinaryDiffEqNonlinearSolve = "1"
OrdinaryDiffEqRosenbrock = "1.19"
OrdinaryDiffEqTsit5 = "1.4"
OrdinaryDiffEqVerner = "1.5"
ParameterizedFunctions = "5.24"
RecipesBase = "1"
RecursiveArrayTools = "4"
RootedTrees = "2"
SDEProblemLibrary = "0.1"
SDEProblemLibrary = "1"
SciMLBase = "3"
Statistics = "1"
StochasticDelayDiffEq = "1"
StochasticDiffEq = "6"
StochasticDiffEq = "6.102"
StochasticDiffEqCore = "1"
StochasticDiffEqHighOrder = "1"
StochasticDiffEqIIF = "1"
StochasticDiffEqImplicit = "1"
StochasticDiffEqLeaping = "1"
StochasticDiffEqLevyArea = "1"
StochasticDiffEqLowOrder = "1"
StochasticDiffEqMilstein = "1"
StochasticDiffEqROCK = "1"
StochasticDiffEqRODE = "1"
StochasticDiffEqWeak = "1"
StructArrays = "0.6, 0.7"
julia = "1.10"

Expand All @@ -51,16 +93,35 @@ BVProblemLibrary = "ded0fc24-dfea-4565-b1d9-79c027d14d84"
BoundaryValueDiffEq = "764a87c0-6b3e-53db-9096-fe964310641d"
DDEProblemLibrary = "f42792ee-6ffc-4e2a-ae83-8ee2f22de800"
DelayDiffEq = "bcd4f6db-9728-5f36-b5f7-82caef46ccdb"
ImplicitDiscreteSolve = "3263718b-31ed-49cf-8a0f-35a466e8af96"
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
ODEProblemLibrary = "fdc4e326-1af4-4b90-96e7-779fcce2daa5"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
OrdinaryDiffEqBDF = "6ad6398a-0878-4a85-9266-38940aa047c8"
OrdinaryDiffEqCore = "bbf590c4-e513-4bbe-9b18-05decba2e5d8"
OrdinaryDiffEqFIRK = "5960d6e9-dd7a-4743-88e7-cf307b64f125"
OrdinaryDiffEqLowOrderRK = "1344f307-1e59-4825-a18e-ace9aa3fa4c6"
OrdinaryDiffEqNonlinearSolve = "127b3ac7-2247-4354-8eb6-78cf4e7c58e8"
OrdinaryDiffEqRosenbrock = "43230ef6-c299-4910-a778-202eb28ce4ce"
OrdinaryDiffEqTsit5 = "b1df2697-797e-41e3-8120-5422d3b24e4a"
OrdinaryDiffEqVerner = "79d7bb75-1356-48c1-b8c0-6832512096c2"
ParameterizedFunctions = "65888b18-ceab-5e60-b2b9-181511a3b968"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
SDEProblemLibrary = "c72e72a9-a271-4b2b-8966-303ed956772e"
StochasticDelayDiffEq = "29a0d76e-afc8-11e9-03a4-eda52ae4b960"
StochasticDiffEq = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0"
StochasticDiffEqCore = "19c5a474-6cd1-4a5f-be79-46dc34e54d7f"
StochasticDiffEqHighOrder = "0520c28c-50fd-4d16-9c96-902fc80b3bab"
StochasticDiffEqIIF = "ebf54054-c36b-4494-9aba-657e36df524f"
StochasticDiffEqImplicit = "5080b986-4c76-4669-b5dc-373a41579d5b"
StochasticDiffEqLeaping = "aefaaa88-39f2-4e89-b162-d61b7e8cc81b"
StochasticDiffEqLevyArea = "90dbc90e-856a-4131-af2c-e8c5aa0f35b5"
StochasticDiffEqLowOrder = "d15fe365-ce7f-450a-828a-7985bd5b681b"
StochasticDiffEqMilstein = "8c95a807-c8e7-4581-8419-890d001af53e"
StochasticDiffEqROCK = "db241ea8-0e6b-4abc-8f2d-1adff2294fd9"
StochasticDiffEqRODE = "49714585-0aa1-4f53-b1e6-a9b8c0d5e03f"
StochasticDiffEqWeak = "af2a2fcd-1c36-4cbe-a6d0-5afda784a085"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["BoundaryValueDiffEq", "BVProblemLibrary", "DelayDiffEq", "DDEProblemLibrary", "NonlinearSolve", "ODEProblemLibrary", "SDEProblemLibrary", "OrdinaryDiffEq", "ParameterizedFunctions", "Random", "StochasticDiffEq", "StochasticDelayDiffEq", "Plots", "Test"]
test = ["BoundaryValueDiffEq", "BVProblemLibrary", "DelayDiffEq", "DDEProblemLibrary", "ImplicitDiscreteSolve", "NonlinearSolve", "ODEProblemLibrary", "OrdinaryDiffEq", "OrdinaryDiffEqBDF", "OrdinaryDiffEqCore", "OrdinaryDiffEqFIRK", "OrdinaryDiffEqLowOrderRK", "OrdinaryDiffEqNonlinearSolve", "OrdinaryDiffEqRosenbrock", "OrdinaryDiffEqTsit5", "OrdinaryDiffEqVerner", "ParameterizedFunctions", "Plots", "Random", "SDEProblemLibrary", "StochasticDiffEq", "StochasticDiffEqCore", "StochasticDiffEqHighOrder", "StochasticDiffEqIIF", "StochasticDiffEqImplicit", "StochasticDiffEqLeaping", "StochasticDiffEqLevyArea", "StochasticDiffEqLowOrder", "StochasticDiffEqMilstein", "StochasticDiffEqROCK", "StochasticDiffEqRODE", "StochasticDiffEqWeak", "Test"]
10 changes: 6 additions & 4 deletions lib/DiffEqDevTools/test/analyticless_convergence_tests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using OrdinaryDiffEq, StochasticDelayDiffEq, ParameterizedFunctions, Test, Random
using OrdinaryDiffEq, DelayDiffEq, StochasticDiffEq, ParameterizedFunctions, Test, Random
using ParameterizedFunctions.ModelingToolkit # macro hygiene
f = @ode_def LotkaVolterra begin
dx = 1.5x - x * y
Expand Down Expand Up @@ -49,7 +49,9 @@ sim2 = analyticless_test_convergence(

# EnsembleProblem

function prob_func(prob, i, repeat)
function prob_func(prob, ctx)
i = ctx.sim_id
repeat = ctx.repeat
return remake(prob, seed = seeds[i])
end

Expand Down Expand Up @@ -77,7 +79,7 @@ Random.seed!(seed)
seeds = rand(UInt, numtraj)
ensemble_prob = EnsembleProblem(
prob;
output_func = (sol, i) -> (h2(sol[1, end]), false),
output_func = (sol, ctx) -> (h2(sol[1, end]), false),
prob_func = prob_func
)
sim = test_convergence(
Expand Down Expand Up @@ -113,7 +115,7 @@ prob = SDDEProblem(
dts = (1 / 2) .^ (7:-1:3)
test_dt = 1 / 2^8
sim2 = analyticless_test_convergence(
dts, prob, RKMil(), test_dt, trajectories = 100,
dts, prob, MethodOfSteps(RKMil()), test_dt, trajectories = 100,
use_noise_grid = false
)
@test abs(sim2.𝒪est[:final] - 1.0) < 0.3
6 changes: 4 additions & 2 deletions lib/DiffEqDevTools/test/analyticless_stochastic_wp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ se2 = get_sample_errors(

# Ensemble Problem with non-commutative noise process

function prob_func(prob, i, repeat)
function prob_func(prob, ctx)
i = ctx.sim_id
repeat = ctx.repeat
return remake(prob, seed = seeds[i])
end

Expand Down Expand Up @@ -95,7 +97,7 @@ Random.seed!(seed)
seeds = rand(UInt, numtraj)
ensemble_prob = EnsembleProblem(
prob;
output_func = (sol, i) -> (h2(sol[1, end]), false),
output_func = (sol, ctx) -> (h2(sol[1, end]), false),
prob_func = prob_func
)

Expand Down
7 changes: 7 additions & 0 deletions lib/DiffEqDevTools/test/benchmark_tests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
using OrdinaryDiffEq, DelayDiffEq, BoundaryValueDiffEq, DiffEqDevTools, DiffEqBase, Test
using OrdinaryDiffEqLowOrderRK: Euler, Midpoint, Heun, BS3, BS5, DP5, RK4
using OrdinaryDiffEqTsit5: Tsit5
using OrdinaryDiffEqVerner: Vern6, Vern7, Vern9
using OrdinaryDiffEqRosenbrock: Rodas4, Rodas5, RosShamp4
using OrdinaryDiffEqFIRK: RadauIIA5
using OrdinaryDiffEqBDF: DFBDF
using OrdinaryDiffEqNonlinearSolve: NLFunctional
using ODEProblemLibrary: prob_ode_2Dlinear, prob_ode_linear
using DDEProblemLibrary: prob_dde_constant_1delay_ip
using BVProblemLibrary: prob_bvp_linear_1
Expand Down
Loading