Skip to content

Commit 59bc714

Browse files
committed
format
1 parent 28a1ebe commit 59bc714

File tree

4 files changed

+21
-15
lines changed

4 files changed

+21
-15
lines changed

src/remake.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ function remake(
191191
props = @delete props._func_cache
192192
props = @insert props._func_cache = forig._func_cache
193193
end
194-
194+
195195
args = (args..., f2)
196196
end
197197
end

src/scimlfunctions.jl

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3067,7 +3067,7 @@ function ImplicitDiscreteFunction{iip, specialize}(f;
30673067
f.observed :
30683068
DEFAULT_OBSERVED,
30693069
resid_prototype = __has_resid_prototype(f) ?
3070-
f.resid_prototype :
3070+
f.resid_prototype :
30713071
nothing,
30723072
sys = __has_sys(f) ? f.sys : nothing,
30733073
initialization_data = __has_initialization_data(f) ? f.initialization_data :
@@ -3083,11 +3083,12 @@ function ImplicitDiscreteFunction{iip, specialize}(f;
30833083
analytic,
30843084
observed,
30853085
sys,
3086-
resid_prototype,
3086+
resid_prototype,
30873087
initialization_data)
30883088
else
30893089
ImplicitDiscreteFunction{
3090-
iip, specialize, typeof(_f), typeof(analytic), typeof(observed), typeof(sys), typeof(resid_prototype),
3090+
iip, specialize, typeof(_f), typeof(analytic),
3091+
typeof(observed), typeof(sys), typeof(resid_prototype),
30913092
typeof(initialization_data)}(
30923093
_f, analytic, observed, sys, resid_prototype, initialization_data)
30933094
end
@@ -3097,7 +3098,9 @@ function ImplicitDiscreteFunction{iip}(f; kwargs...) where {iip}
30973098
ImplicitDiscreteFunction{iip, FullSpecialize}(f; kwargs...)
30983099
end
30993100
ImplicitDiscreteFunction{iip}(f::ImplicitDiscreteFunction; kwargs...) where {iip} = f
3100-
function ImplicitDiscreteFunction(f; resid_prototype = __has_resid_prototype(f) ? f.resid_prototype : nothing, kwargs...)
3101+
function ImplicitDiscreteFunction(
3102+
f; resid_prototype = __has_resid_prototype(f) ? f.resid_prototype : nothing,
3103+
kwargs...)
31013104
ImplicitDiscreteFunction{isinplace(f, 5), FullSpecialize}(f; resid_prototype, kwargs...)
31023105
end
31033106
ImplicitDiscreteFunction(f::ImplicitDiscreteFunction; kwargs...) = f
@@ -3107,11 +3110,13 @@ function unwrapped_f(f::ImplicitDiscreteFunction, newf = unwrapped_f(f.f))
31073110

31083111
if specialize === NoSpecialize
31093112
ImplicitDiscreteFunction{isinplace(f, 5), specialize, Any, Any, Any,
3110-
Any, Any, Any}(newf, f.analytic, f.observed, f.sys, f.resid_prototype, f.initialization_data)
3113+
Any, Any, Any}(
3114+
newf, f.analytic, f.observed, f.sys, f.resid_prototype, f.initialization_data)
31113115
else
31123116
ImplicitDiscreteFunction{isinplace(f, 5), specialize, typeof(newf),
31133117
typeof(f.analytic),
3114-
typeof(f.observed), typeof(f.sys), typeof(resid_prototype), typeof(f.initialization_data)}(newf,
3118+
typeof(f.observed), typeof(f.sys), typeof(resid_prototype), typeof(f.initialization_data)}(
3119+
newf,
31153120
f.analytic, f.observed, f.sys, f.resid_prototype, f.initialization_data)
31163121
end
31173122
end

src/solutions/rode_solutions.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ function ConstructionBase.setproperties(sol::RODESolution, patch::NamedTuple)
6464
patch = merge(getproperties(sol), patch)
6565
return RODESolution{
6666
T, N, typeof(patch.u), typeof(patch.u_analytic), typeof(patch.errors),
67-
typeof(patch.t), typeof(patch.W), typeof(patch.discretes), typeof(patch.prob), typeof(patch.alg), typeof(patch.interp),
67+
typeof(patch.t), typeof(patch.W), typeof(patch.discretes),
68+
typeof(patch.prob), typeof(patch.alg), typeof(patch.interp),
6869
typeof(patch.stats), typeof(patch.alg_choice), typeof(patch.saved_subsystem)}(
6970
patch.u, patch.u_analytic, patch.errors, patch.t, patch.W, patch.discretes,
7071
patch.prob, patch.alg, patch.interp, patch.dense, patch.tslocation, patch.stats,
@@ -137,7 +138,7 @@ function build_solution(prob::Union{AbstractRODEProblem, AbstractSDDEProblem},
137138
u_analytic = Vector{typeof(prob.u0)}()
138139
errors = Dict{Symbol, real(eltype(prob.u0))}()
139140
sol = RODESolution{T, N, typeof(u), typeof(u_analytic), typeof(errors), typeof(t),
140-
typeof(W), typeof(discretes),
141+
typeof(W), typeof(discretes),
141142
typeof(prob), typeof(alg), typeof(interp), typeof(stats),
142143
typeof(alg_choice), typeof(saved_subsystem)}(u,
143144
u_analytic,
@@ -162,7 +163,7 @@ function build_solution(prob::Union{AbstractRODEProblem, AbstractSDDEProblem},
162163
return sol
163164
else
164165
return RODESolution{T, N, typeof(u), Nothing, Nothing, typeof(t),
165-
typeof(W), typeof(discretes), typeof(prob), typeof(alg), typeof(interp),
166+
typeof(W), typeof(discretes), typeof(prob), typeof(alg), typeof(interp),
166167
typeof(stats), typeof(alg_choice), typeof(saved_subsystem)}(
167168
u, nothing, nothing, t, W, discretes,
168169
prob, alg, interp,
@@ -189,7 +190,7 @@ end
189190

190191
function SymbolicIndexingInterface.is_parameter_timeseries(::Type{S}) where {
191192
T1, T2, T3, T4, T5, T6, T7,
192-
S <: RODESolution{T1, T2, T3, T4, T5, T6, T7, <: ParameterTimeseriesCollection}}
193+
S <: RODESolution{T1, T2, T3, T4, T5, T6, T7, <:ParameterTimeseriesCollection}}
193194
Timeseries()
194195
end
195196

test/downstream/comprehensive_indexing.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -982,14 +982,14 @@ end
982982
@parameters k(t)
983983
@variables A(t)
984984
function affect2!(integ, u, p, ctx)
985-
integ.ps[p.k] += 1.
985+
integ.ps[p.k] += 1.0
986986
end
987-
db = 1. => (affect2!, [], [k], [k], nothing)
987+
db = 1.0 => (affect2!, [], [k], [k], nothing)
988988

989989
@named ssys = SDESystem(D(A) ~ k * A, [0.0], t, [A], [k], discrete_events = db)
990990
ssys = complete(ssys)
991-
prob = SDEProblem(ssys, [A => 1.], (0., 4.), [k => 1.])
991+
prob = SDEProblem(ssys, [A => 1.0], (0.0, 4.0), [k => 1.0])
992992
sol = solve(prob, RI5())
993993
@test sol[k] isa AbstractVector
994-
@test sol[k] == [1., 2., 3., 4.]
994+
@test sol[k] == [1.0, 2.0, 3.0, 4.0]
995995
end

0 commit comments

Comments
 (0)