Skip to content

Commit d477d7d

Browse files
committed
make k generic
1 parent 2d72836 commit d477d7d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/OrdinaryDiffEqRosenbrock/src/rosenbrock_perform_step.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1370,11 +1370,13 @@ end
13701370
end
13711371

13721372
if integrator.opts.calck
1373-
integrator.k[1] .= 0
1374-
integrator.k[2] .= 0
1373+
for j in 1:length(integrator.k)
1374+
integrator.k[j] .= 0
1375+
end
13751376
for i in 1:length(ks)
1376-
@.. integrator.k[1] += H[1, i] * ks[i]
1377-
@.. integrator.k[2] += H[2, i] * ks[i]
1377+
for j in 1:length(integrator.k)
1378+
@.. integrator.k[j] += H[j, i] * ks[i]
1379+
end
13781380
end
13791381
end
13801382
cache.linsolve = linres.cache

0 commit comments

Comments
 (0)