Skip to content

Commit c06abfe

Browse files
committed
Format code
1 parent 32613f3 commit c06abfe

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/structural_transformation/symbolics_tearing.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ function tearing_reassemble(state::TearingState, var_eq_matching,
576576
arg1 = arguments(lhs)[1]
577577
haskey(obs_arr_subs, arg1) && continue
578578
obs_arr_subs[arg1] = [arg1[i] for i in eachindex(arg1)] # e.g. p => [p[1], p[2]]
579-
index_first = eachindex(arg1)[1]
579+
index_first = eachindex(arg1)[1]
580580
obs_arr_subs[arg1] = Origin(index_first)(obs_arr_subs[arg1]) # respect non-1-indexed arrays
581581
end
582582
for i in eachindex(neweqs)

test/odesystem.jl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,10 +1162,7 @@ end
11621162

11631163
@testset "Non-1-indexed variable array (issue #2670)" begin
11641164
@variables x(t)[0:1] # 0-indexed variable array
1165-
sys = ODESystem([
1166-
x[0] ~ 0.0
1167-
D(x[1]) ~ x[0]
1168-
], t, [x], []; name=:sys)
1165+
@named sys = ODESystem([x[0] ~ 0.0, D(x[1]) ~ x[0]], t, [x], [])
11691166
@test_nowarn sys = structural_simplify(sys)
11701167
@test equations(sys) == [D(x[1]) ~ 0.0]
1171-
end
1168+
end

0 commit comments

Comments
 (0)