Skip to content

Commit 11f873a

Browse files
Merge pull request #90 from SciML/fix-parsing-error-and-format
Fix parsing error and apply JuliaFormatter code formatting
2 parents 33a0719 + c2cb73b commit 11f873a

13 files changed

+391
-364
lines changed

src/StochasticDelayDiffEq.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import FastPower
1717
import SciMLBase
1818
using DiffEqBase: AbstractSDDEProblem, AbstractSDDEAlgorithm, AbstractRODESolution,
1919
AbstractRODEFunction, AbstractSDEIntegrator, AbstractSDDEIntegrator,
20-
DEIntegrator, DEAlgorithm, AbstractRODEAlgorithm, AbstractSDEAlgorithm
20+
DEIntegrator, DEAlgorithm, AbstractRODEAlgorithm, AbstractSDEAlgorithm, @..
2121

2222
import DelayDiffEq: constant_extrapolant!, constant_extrapolant,
2323
AbstractMethodOfStepsAlgorithm, iscomposite, MethodOfSteps

src/functionwrapper.jl

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ end
88
(g::SDEDiffusionTermWrapper{true})(du, u, p, t) = g.g(du, u, g.h, p, t)
99
(g::SDEDiffusionTermWrapper{false})(u, p, t) = g.g(u, g.h, p, t)
1010

11-
struct SDEFunctionWrapper{iip, F, G, H, TMM, Ta, Tt, TJ, JVP, VJP, JP, SP, TW, TWt, TPJ, GG,
12-
TCV, ID, S} <: DiffEqBase.AbstractRODEFunction{iip}
11+
struct SDEFunctionWrapper{
12+
iip, F, G, H, TMM, Ta, Tt, TJ, JVP, VJP, JP, SP, TW, TWt, TPJ, GG,
13+
TCV, ID, S} <: DiffEqBase.AbstractRODEFunction{iip}
1314
f::F
1415
g::G
1516
h::H
@@ -51,13 +52,13 @@ function wrap_functions_and_history(f::SDDEFunction, g, h)
5152
end
5253

5354
SDEFunctionWrapper{isinplace(f), typeof(f.f), typeof(gwh), typeof(h),
54-
typeof(f.mass_matrix),
55-
typeof(f.analytic), typeof(f.tgrad), typeof(jac), typeof(f.jvp),
56-
typeof(f.vjp), typeof(f.jac_prototype), typeof(f.sparsity),
57-
typeof(f.Wfact), typeof(f.Wfact_t), typeof(f.paramjac),
58-
typeof(f.ggprime), typeof(f.colorvec), typeof(f.initialization_data),
59-
typeof(f.sys)}(f.f, gwh, h, f.mass_matrix, f.analytic, f.tgrad, jac,
60-
f.jvp, f.vjp, f.jac_prototype, f.sparsity, f.Wfact, f.Wfact_t, f.paramjac,
61-
f.ggprime, f.colorvec, f.initialization_data, f.sys),
55+
typeof(f.mass_matrix),
56+
typeof(f.analytic), typeof(f.tgrad), typeof(jac), typeof(f.jvp),
57+
typeof(f.vjp), typeof(f.jac_prototype), typeof(f.sparsity),
58+
typeof(f.Wfact), typeof(f.Wfact_t), typeof(f.paramjac),
59+
typeof(f.ggprime), typeof(f.colorvec), typeof(f.initialization_data),
60+
typeof(f.sys)}(f.f, gwh, h, f.mass_matrix, f.analytic, f.tgrad, jac,
61+
f.jvp, f.vjp, f.jac_prototype, f.sparsity, f.Wfact, f.Wfact_t, f.paramjac,
62+
f.ggprime, f.colorvec, f.initialization_data, f.sys),
6263
gwh
6364
end

src/integrators/interface.jl

Lines changed: 83 additions & 78 deletions
Large diffs are not rendered by default.

src/integrators/type.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ function (integrator::HistorySDEIntegrator)(t, deriv::Type = Val{0}; idxs = noth
1818
end
1919

2020
function (integrator::HistorySDEIntegrator)(val::AbstractArray,
21-
t::Union{Number, AbstractArray},
22-
deriv::Type = Val{0}; idxs = nothing)
21+
t::Union{Number, AbstractArray},
22+
deriv::Type = Val{0}; idxs = nothing)
2323
StochasticDiffEq.current_interpolant!(val, t, integrator, idxs, deriv)
2424
end
2525

2626
mutable struct SDDEIntegrator{algType, IIP, uType, uEltype, tType, P, eigenType,
27-
tTypeNoUnits, uEltypeNoUnits, randType, randType2, rateType,
28-
solType, cacheType, F, G, F6, OType, noiseType,
29-
EventErrorType, CallbackCacheType, H, IType, IA} <:
27+
tTypeNoUnits, uEltypeNoUnits, randType, randType2, rateType,
28+
solType, cacheType, F, G, F6, OType, noiseType,
29+
EventErrorType, CallbackCacheType, H, IType, IA} <:
3030
AbstractSDDEIntegrator{algType, IIP, uType, tType}
3131
f::F
3232
g::G
@@ -89,6 +89,6 @@ function (integrator::SDDEIntegrator)(t, deriv::Type = Val{0}; idxs = nothing)
8989
end
9090

9191
function (integrator::SDDEIntegrator)(val::AbstractArray, t::Union{Number, AbstractArray},
92-
deriv::Type = Val{0}; idxs = nothing)
92+
deriv::Type = Val{0}; idxs = nothing)
9393
StochasticDiffEq.current_interpolant!(val, t, integrator, idxs, deriv)
9494
end

src/integrators/utils.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
elseif tdir_t > tdir_ts_top
1010
if !integrator.dtchangeable
1111
change_t_via_interpolation!(integrator, integrator.tdir * pop!(tstops),
12-
Val{true})
12+
Val{true})
1313
integrator.just_hit_tstop = true
1414
else
1515
error("Something went wrong. Integrator stepped past tstops but the algorithm was dtchangeable. Please report this error.")
@@ -55,7 +55,8 @@ function handle_discontinuities!(integrator::SDDEIntegrator)
5555
maxΔt = 10eps(integrator.t)
5656

5757
while !isempty(integrator.opts.d_discontinuities) &&
58-
abs(first(integrator.opts.d_discontinuities).t - integrator.tdir * integrator.t) <
58+
abs(first(integrator.opts.d_discontinuities).t -
59+
integrator.tdir * integrator.t) <
5960
maxΔt
6061
d2 = pop!(integrator.opts.d_discontinuities)
6162
order = min(order, d2.order)

0 commit comments

Comments
 (0)