Skip to content

Commit c169b9e

Browse files
committed
Formatter
1 parent aa556d6 commit c169b9e

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/systems/imperative_affect.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ function Base.hash(a::ImperativeAffect, s::UInt)
9494
hash(a.ctx, s)
9595
end
9696

97-
9897
namespace_affects(af::ImperativeAffect, s) = namespace_affect(af, s)
9998
function namespace_affect(affect::ImperativeAffect, s)
10099
ImperativeAffect(func(affect),
@@ -175,15 +174,15 @@ function compile_user_affect(affect::ImperativeAffect, cb, sys, dvs, ps; kwargs.
175174
end
176175
obs_fun = build_explicit_observed_function(
177176
sys, Symbolics.scalarize.(obs_exprs);
178-
mkarray = (es,_) -> MakeTuple(es))
177+
mkarray = (es, _) -> MakeTuple(es))
179178
obs_sym_tuple = (obs_syms...,)
180179

181180
# okay so now to generate the stuff to assign it back into the system
182181
mod_pairs = mod_exprs .=> mod_syms
183182
mod_names = (mod_syms...,)
184183
mod_og_val_fun = build_explicit_observed_function(
185184
sys, Symbolics.scalarize.(first.(mod_pairs));
186-
mkarray = (es,_) -> MakeTuple(es))
185+
mkarray = (es, _) -> MakeTuple(es))
187186

188187
upd_funs = NamedTuple{mod_names}((setu.((sys,), first.(mod_pairs))...,))
189188

@@ -216,5 +215,4 @@ function compile_user_affect(affect::ImperativeAffect, cb, sys, dvs, ps; kwargs.
216215
end
217216
end
218217

219-
220218
scalarize_affects(affects::ImperativeAffect) = affects

test/symbolic_events.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@ end
936936
@named trigsys = ODESystem(eqs, t; continuous_events = [evt1, evt2])
937937
trigsys_ss = structural_simplify(trigsys)
938938
prob = ODEProblem(trigsys_ss, [], (0.0, 2π))
939-
sol = solve(prob, Tsit5(); dtmax=0.01)
939+
sol = solve(prob, Tsit5(); dtmax = 0.01)
940940
required_crossings_c1 =/ 2, 3 * π / 2]
941941
required_crossings_c2 =/ 6, π / 2, 5 * π / 6, 7 * π / 6, 3 * π / 2, 11 * π / 6]
942942
@test maximum(abs.(first.(cr1) .- required_crossings_c1)) < 1e-4
@@ -1079,8 +1079,8 @@ end
10791079
@test sort(canonicalize(Discrete(), prob.p)[1]) == [0.0, 1.0, 2.0]
10801080
sol = solve(prob, Tsit5())
10811081

1082-
@test sol[a] == [1.0,-1.0]
1083-
@test sol[b] == [2.0,5.0, 5.0]
1082+
@test sol[a] == [1.0, -1.0]
1083+
@test sol[b] == [2.0, 5.0, 5.0]
10841084
@test sol[c] == [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0]
10851085
end
10861086
@testset "Heater" begin

0 commit comments

Comments
 (0)