Skip to content

Commit 1f9386d

Browse files
committed
up
1 parent efa91d0 commit 1f9386d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ ModelingToolkit = "8.66"
4141
Parameters = "0.12"
4242
Reexport = "0.2, 1.0"
4343
Requires = "1.0"
44+
RuntimeGeneratedFunctions = "0.5.12"
4445
SymbolicUtils = "1.0.3"
4546
Symbolics = "5.0.3"
4647
Unitful = "1.12.4"

src/spatial_reaction_systems/utility.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,14 +210,13 @@ function compute_transport_rates(rate_law::Num,
210210

211211
# If all these parameters are spatially uniform. `rates` becomes a vector with 1 value.
212212
if all(length(p_val_dict[P]) == 1 for P in relevant_ps)
213-
rates = [rate_law_func([p_val_dict[p][1] for p in relevant_ps]...)]
213+
return [rate_law_func([p_val_dict[p][1] for p in relevant_ps]...)]
214214
# If at least on parameter the rate depends on have a value varying across all edges,
215215
# we have to compute one rate value for each edge.
216216
else
217-
rates = [rate_law_func([get_component_value(p_val_dict[p], idxE) for p in relevant_ps]...)
217+
return [rate_law_func([get_component_value(p_val_dict[p], idxE) for p in relevant_ps]...)
218218
for idxE in 1:num_edges]
219219
end
220-
return Symbolics.value.(rates)
221220
end
222221

223222
# Creates a map, taking each species (with transportation) to its transportation rate.

0 commit comments

Comments
 (0)