Skip to content

Commit b93bcb1

Browse files
TorkelEisaacsas
andcommitted
Update src/spatial_reaction_systems/spatial_ODE_systems.jl
Co-authored-by: Sam Isaacson <[email protected]>
1 parent 0392139 commit b93bcb1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/spatial_reaction_systems/spatial_ODE_systems.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ struct LatticeTransportODEf{R,S,T}
3131
end
3232
end
3333
work_vert_ps = zeros(lrs.num_verts)
34-
enum_v_ps_idx_types = enumerate(length.(vert_ps) .== 1) # Creates a Boolean vector whether each vertex parameter need expanding or (and enumerates it, since it always appear in this form).
34+
# 1 if ps are constant across the graph, 0 else
35+
enum_v_ps_idx_types = enumerate(map(vp -> length(vp) == 1, vert_ps))
3536
enum_edges = deepcopy(enumerate(edges(lrs.lattice))) # Creates an iterator over all the edges. Again, this is always used in the enumerated form.
3637
new{R,S,typeof(enum_edges)}(ofunc, lrs.num_verts, lrs.num_species, vert_ps, work_vert_ps, enum_v_ps_idx_types, transport_rates, leaving_rates, enum_edges)
3738
end

0 commit comments

Comments
 (0)