You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/spatial_reaction_systems/spatial_ODE_systems.jl
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -73,14 +73,16 @@ function DiffEqBase.ODEProblem(lrs::LatticeReactionSystem, u0_in, tspan,
73
73
jac =true, sparse = jac, kwargs...)
74
74
is_transport_system(lrs) ||error("Currently lattice ODE simulations are only supported when all spatial reactions are TransportReactions.")
75
75
76
-
# Converts potential symmaps to varmaps.
76
+
# Converts potential symmaps to varmaps (parameter conversion is more involved since the vertex and edge parameters may be given in a tuple, or in a common vector).
77
77
u0_in =symmap_to_varmap(lrs, u0_in)
78
-
p_in = (p_in isa Tuple{<:Any,<:Any}) ? (symmap_to_varmap(lrs, p_in[1]),symmap_to_varmap(lrs, p_in[2])) :symmap_to_varmap(lrs, p_in) # Parameters can be given in Tuple form (where the first element is the vertex parameters and the second the edge parameters). In this case, we have to covert each element separately.
vert_ps, edge_ps =lattice_process_p(p_in, vertex_parameters(lrs), edge_parameters(lrs), lrs) # Both vert_ps and edge_ps becomes vectors of vectors. Each have 1 element for each parameter. These elements are length 1 vectors (if the parameter is uniform), or length num_verts/nE, with unique values for each vertex/edge (for vert_ps/edge_ps, respectively).
83
+
# Both vert_ps and edge_ps becomes vectors of vectors. Each have 1 element for each parameter.
84
+
# These elements are length 1 vectors (if the parameter is uniform), or length num_verts/nE, with unique values for each vertex/edge (for vert_ps/edge_ps, respectively).
0 commit comments