Skip to content

Commit 832a359

Browse files
committed
Format
1 parent 42291f3 commit 832a359

File tree

4 files changed

+19
-7
lines changed

4 files changed

+19
-7
lines changed

src/forwarddiff.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,10 @@ function anyeltypedual(x::NamedTuple, ::Type{Val{counter}} = Val{0}) where {coun
347347
anyeltypedual(values(x))
348348
end
349349

350-
DiffEqBase.anyeltypedual(f::SciMLBase.AbstractSciMLFunction, ::Type{Val{counter}}) where {counter} = Any
350+
function DiffEqBase.anyeltypedual(
351+
f::SciMLBase.AbstractSciMLFunction, ::Type{Val{counter}}) where {counter}
352+
Any
353+
end
351354

352355
@inline promote_u0(::Nothing, p, t0) = nothing
353356

src/integrator_accessors.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# the following are setup per how integrators are implemented in OrdinaryDiffEq and
22
# StochasticDiffEq and provide dispatch points that JumpProcesses and others can use.
33

4-
get_tstops(integ::DEIntegrator) =
4+
function get_tstops(integ::DEIntegrator)
55
error("get_tstops not implemented for integrators of type $(nameof(typeof(integ)))")
6-
get_tstops_array(integ::DEIntegrator) =
6+
end
7+
function get_tstops_array(integ::DEIntegrator)
78
error("get_tstops_array not implemented for integrators of type $(nameof(typeof(integ)))")
8-
get_tstops_max(integ::DEIntegrator) =
9+
end
10+
function get_tstops_max(integ::DEIntegrator)
911
error("get_tstops_max not implemented for integrators of type $(nameof(typeof(integ)))")
12+
end

src/solve.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1389,7 +1389,8 @@ function __solve(
13891389
kwargs...)
13901390
if second_time
13911391
throw(NoDefaultAlgorithmError())
1392-
elseif length(args) > 0 && !(first(args) isa Union{Nothing, AbstractDEAlgorithm, AbstractNonlinearAlgorithm})
1392+
elseif length(args) > 0 && !(first(args) isa
1393+
Union{Nothing, AbstractDEAlgorithm, AbstractNonlinearAlgorithm})
13931394
throw(NonSolverError())
13941395
else
13951396
__solve(prob, nothing, args...; default_set = false, second_time = true, kwargs...)
@@ -1400,7 +1401,8 @@ function __init(prob::AbstractDEProblem, args...; default_set = false, second_ti
14001401
kwargs...)
14011402
if second_time
14021403
throw(NoDefaultAlgorithmError())
1403-
elseif length(args) > 0 && !(first(args) isa Union{Nothing, AbstractDEAlgorithm, AbstractNonlinearAlgorithm})
1404+
elseif length(args) > 0 && !(first(args) isa
1405+
Union{Nothing, AbstractDEAlgorithm, AbstractNonlinearAlgorithm})
14041406
throw(NonSolverError())
14051407
else
14061408
__init(prob, nothing, args...; default_set = false, second_time = true, kwargs...)

test/downstream/tables.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ sol1 = solve(prob, Euler(); dt = 1 // 2^(4));
55
df = DataFrame(sol1)
66
@test names(df) == ["timestamp", "value1", "value2", "value3", "value4"]
77

8-
prob = ODEProblem(ODEFunction(f_2dlinear, sys = SymbolicIndexingInterface.SymbolCache([:a, :b, :c, :d], [], :t)), rand(2, 2), (0.0, 1.0));
8+
prob = ODEProblem(
9+
ODEFunction(
10+
f_2dlinear, sys = SymbolicIndexingInterface.SymbolCache([:a, :b, :c, :d], [], :t)),
11+
rand(2, 2),
12+
(0.0, 1.0));
913
sol2 = solve(prob, Euler(); dt = 1 // 2^(4));
1014
df = DataFrame(sol2)
1115
@test names(df) == ["timestamp", "a", "b", "c", "d"]

0 commit comments

Comments
 (0)