Skip to content

Commit 2e3e2d4

Browse files
committed
ifx
1 parent 9ab6437 commit 2e3e2d4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/spatial_reaction_systems/spatial_ODE_systems.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,9 @@ function (f_func::LatticeTransportODEf)(du, u, p, t)
163163
end
164164
# add rates for entering a given vertex via an incoming edge
165165
for (e_idx, e) in f_func.enum_edges
166-
idx = get_index(e.dst, s, f_func.num_species)
167-
du[idx] += get_component_value(rates, e_idx) * u[idx]
166+
idx_dst = get_index(e.dst, s, f_func.num_species)
167+
idx_src = get_index(e.src, s, f_func.num_species)
168+
du[idx_dst] += get_component_value(rates, e_idx) * u[idx_src]
168169
end
169170
end
170171
end

0 commit comments

Comments
 (0)