Skip to content

Commit

Permalink
save_flow performance: avoid splatting long arrays (#856)
Browse files Browse the repository at this point in the history
  • Loading branch information
visr authored Nov 30, 2023
1 parent 958626e commit 692977f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/src/bmi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -500,10 +500,10 @@ end

"Copy the current flow to the SavedValues"
function save_flow(u, t, integrator)
[
get_tmp(integrator.p.graph[].flow_vertical, 0.0)...,
get_tmp(integrator.p.graph[].flow, 0.0)...,
]
vcat(
get_tmp(integrator.p.graph[].flow_vertical, 0.0),
get_tmp(integrator.p.graph[].flow, 0.0),
)
end

function update_subgrid_level!(integrator)::Nothing
Expand Down

0 comments on commit 692977f

Please sign in to comment.