@@ -3,8 +3,8 @@ David F. Anderson, Masanori Koyama; An asymptotic relationship between coupling
33methods for stochastically modeled population processes. IMA J Numer Anal 2015;
4435 (4): 1757-1778. doi: 10.1093/imanum/dru044
55"""
6- function SplitCoupledJumpProblem (prob:: DiffEqBase .AbstractJumpProblem ,
7- prob_control:: DiffEqBase .AbstractJumpProblem ,
6+ function SplitCoupledJumpProblem (prob:: SciMLBase .AbstractJumpProblem ,
7+ prob_control:: SciMLBase .AbstractJumpProblem ,
88 aggregator:: AbstractAggregatorAlgorithm ,
99 coupling_map:: Vector{Tuple{Int, Int}} ; kwargs... )
1010 JumpProblem (cat_problems (prob. prob, prob_control. prob), aggregator,
@@ -17,8 +17,8 @@ function cat_problems(prob::DiscreteProblem, prob_control::DiscreteProblem)
1717 DiscreteProblem (u0_coupled, prob. tspan, prob. p)
1818end
1919
20- function cat_problems (prob:: DiffEqBase .AbstractODEProblem ,
21- prob_control:: DiffEqBase .AbstractODEProblem )
20+ function cat_problems (prob:: SciMLBase .AbstractODEProblem ,
21+ prob_control:: SciMLBase .AbstractODEProblem )
2222 l = length (prob. u0) # add l_c = length(prob_control.u0)
2323
2424 _f = SciMLBase. unwrapped_f (prob. f)
@@ -32,9 +32,9 @@ function cat_problems(prob::DiffEqBase.AbstractODEProblem,
3232 ODEProblem (new_f, u0_coupled, prob. tspan, prob. p)
3333end
3434
35- function cat_problems (prob:: DiscreteProblem , prob_control:: DiffEqBase .AbstractODEProblem )
35+ function cat_problems (prob:: DiscreteProblem , prob_control:: SciMLBase .AbstractODEProblem )
3636 l = length (prob. u0) # add l_c = length(prob_control.u0)
37- if ! (prob. f isa typeof (DiffEqBase . DISCRETE_INPLACE_DEFAULT))
37+ if ! (prob. f isa typeof (SciMLBase . DISCRETE_INPLACE_DEFAULT))
3838 @warn (" Coupling to DiscreteProblem with nontrivial f. Note that, unless scale_by_time=true, the meaning of f will change when using an ODE/SDE/DDE/DAE solver." )
3939 end
4040
@@ -49,8 +49,8 @@ function cat_problems(prob::DiscreteProblem, prob_control::DiffEqBase.AbstractOD
4949 ODEProblem (new_f, u0_coupled, prob. tspan, prob. p)
5050end
5151
52- function cat_problems (prob:: DiffEqBase .AbstractSDEProblem ,
53- prob_control:: DiffEqBase .AbstractSDEProblem )
52+ function cat_problems (prob:: SciMLBase .AbstractSDEProblem ,
53+ prob_control:: SciMLBase .AbstractSDEProblem )
5454 l = length (prob. u0)
5555 new_f = function (du, u, p, t)
5656 prob. f (@view (du[1 : l]), u. u, p, t)
@@ -64,8 +64,8 @@ function cat_problems(prob::DiffEqBase.AbstractSDEProblem,
6464 SDEProblem (new_f, new_g, u0_coupled, prob. tspan, prob. p)
6565end
6666
67- function cat_problems (prob:: DiffEqBase .AbstractSDEProblem ,
68- prob_control:: DiffEqBase .AbstractODEProblem )
67+ function cat_problems (prob:: SciMLBase .AbstractSDEProblem ,
68+ prob_control:: SciMLBase .AbstractODEProblem )
6969 l = length (prob. u0)
7070
7171 _f = SciMLBase. unwrapped_f (prob. f)
@@ -85,9 +85,9 @@ function cat_problems(prob::DiffEqBase.AbstractSDEProblem,
8585 SDEProblem (new_f, new_g, u0_coupled, prob. tspan, prob. p)
8686end
8787
88- function cat_problems (prob:: DiffEqBase .AbstractSDEProblem , prob_control:: DiscreteProblem )
88+ function cat_problems (prob:: SciMLBase .AbstractSDEProblem , prob_control:: DiscreteProblem )
8989 l = length (prob. u0)
90- if ! (prob_control. f isa typeof (DiffEqBase . DISCRETE_INPLACE_DEFAULT))
90+ if ! (prob_control. f isa typeof (SciMLBase . DISCRETE_INPLACE_DEFAULT))
9191 @warn (" Coupling to DiscreteProblem with nontrivial f. Note that, unless scale_by_time=true, the meaning of f will change when using an ODE/SDE/DDE/DAE solver." )
9292 end
9393 new_f = function (du, u, p, t)
@@ -104,20 +104,20 @@ function cat_problems(prob::DiffEqBase.AbstractSDEProblem, prob_control::Discret
104104 SDEProblem (new_f, new_g, u0_coupled, prob. tspan)
105105end
106106
107- function cat_problems (prob_control:: DiffEqBase .AbstractODEProblem , prob:: DiscreteProblem )
107+ function cat_problems (prob_control:: SciMLBase .AbstractODEProblem , prob:: DiscreteProblem )
108108 cat_problems (prob, prob_control)
109109end
110- function cat_problems (prob_control:: DiscreteProblem , prob:: DiffEqBase .AbstractSDEProblem )
110+ function cat_problems (prob_control:: DiscreteProblem , prob:: SciMLBase .AbstractSDEProblem )
111111 cat_problems (prob, prob_control)
112112end
113- function cat_problems (prob_control:: DiffEqBase .AbstractODEProblem ,
114- prob:: DiffEqBase .AbstractSDEProblem )
113+ function cat_problems (prob_control:: SciMLBase .AbstractODEProblem ,
114+ prob:: SciMLBase .AbstractSDEProblem )
115115 cat_problems (prob, prob_control)
116116end
117117
118118# this only depends on the jumps in prob, not prob.prob
119- function build_split_jumps (prob:: DiffEqBase .AbstractJumpProblem ,
120- prob_control:: DiffEqBase .AbstractJumpProblem ,
119+ function build_split_jumps (prob:: SciMLBase .AbstractJumpProblem ,
120+ prob_control:: SciMLBase .AbstractJumpProblem ,
121121 coupling_map:: Vector{Tuple{Int, Int}} )
122122 num_jumps = length (prob. discrete_jump_aggregation. rates)
123123 num_jumps_control = length (prob_control. discrete_jump_aggregation. rates)
0 commit comments