Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
TorkelE committed Nov 21, 2023
1 parent efa91d0 commit 1f9386d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ ModelingToolkit = "8.66"
Parameters = "0.12"
Reexport = "0.2, 1.0"
Requires = "1.0"
RuntimeGeneratedFunctions = "0.5.12"
SymbolicUtils = "1.0.3"
Symbolics = "5.0.3"
Unitful = "1.12.4"
Expand Down
5 changes: 2 additions & 3 deletions src/spatial_reaction_systems/utility.jl
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,13 @@ function compute_transport_rates(rate_law::Num,

# If all these parameters are spatially uniform. `rates` becomes a vector with 1 value.
if all(length(p_val_dict[P]) == 1 for P in relevant_ps)
rates = [rate_law_func([p_val_dict[p][1] for p in relevant_ps]...)]
return [rate_law_func([p_val_dict[p][1] for p in relevant_ps]...)]

Check warning on line 213 in src/spatial_reaction_systems/utility.jl

View check run for this annotation

Codecov / codecov/patch

src/spatial_reaction_systems/utility.jl#L212-L213

Added lines #L212 - L213 were not covered by tests
# If at least on parameter the rate depends on have a value varying across all edges,
# we have to compute one rate value for each edge.
else
rates = [rate_law_func([get_component_value(p_val_dict[p], idxE) for p in relevant_ps]...)
return [rate_law_func([get_component_value(p_val_dict[p], idxE) for p in relevant_ps]...)

Check warning on line 217 in src/spatial_reaction_systems/utility.jl

View check run for this annotation

Codecov / codecov/patch

src/spatial_reaction_systems/utility.jl#L217

Added line #L217 was not covered by tests
for idxE in 1:num_edges]
end
return Symbolics.value.(rates)
end

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

0 comments on commit 1f9386d

Please sign in to comment.