Skip to content

Commit 46f8fda

Browse files
committed
Make DiffEqProblemLibrary repeat safe
1 parent b5da828 commit 46f8fda

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/DiffEqProblemLibrary.jl

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,28 @@ __precompile__(true)
33
module DiffEqProblemLibrary
44

55
module ODEProblemLibrary
6-
importodeproblems() = include(joinpath(@__DIR__, "ode/ode_premade_problems.jl"))
6+
importodeproblems() =
7+
@isdefined(prob_ode_linear) || include(joinpath(@__DIR__, "ode/ode_premade_problems.jl"))
78
end # module
89

910
module DAEProblemLibrary
10-
importdaeproblems() = include(joinpath(@__DIR__, "dae_premade_problems.jl"))
11+
importdaeproblems() =
12+
@isdefined(prob_dae_resrob) || include(joinpath(@__DIR__, "dae_premade_problems.jl"))
1113
end # module
1214

1315
module DDEProblemLibrary
14-
importddeproblems() = include(joinpath(@__DIR__, "dde_premade_problems.jl"))
16+
importddeproblems() =
17+
@isdefined(prob_dde_1delay) || include(joinpath(@__DIR__, "dde_premade_problems.jl"))
1518
end # module
1619

1720
module SDEProblemLibrary
18-
importsdeproblems() = include(joinpath(@__DIR__, "sde_premade_problems.jl"))
21+
importsdeproblems() =
22+
@isdefined(prob_sde_wave) || include(joinpath(@__DIR__, "sde_premade_problems.jl"))
1923
end # module
2024

2125
module JumpProblemLibrary
22-
importjumpproblems() = include(joinpath(@__DIR__, "jump_premade_problems.jl"))
26+
importjumpproblems() =
27+
@isdefined(prob_jump_dnarepressor) || include(joinpath(@__DIR__, "jump_premade_problems.jl"))
2328
end # module
2429

2530
end # module

0 commit comments

Comments
 (0)