Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hwpang committed Jan 24, 2024
1 parent 12ad318 commit c5be921
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Simulation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,9 @@ end
export rops

function getrate(rarray, cs, kfs, krevs, V, i)
if @inbounds rarray[2, i] == 0
if @inbounds rarray[1, i] == 0
fR = 0.0
elseif @inbounds rarray[2, i] == 0
@inbounds @fastmath fR = kfs[i] * cs[rarray[1, i]]
elseif @inbounds rarray[3, i] == 0
@inbounds @fastmath fR = kfs[i] * cs[rarray[1, i]] * cs[rarray[2, i]]
Expand All @@ -421,7 +423,9 @@ function getrate(rarray, cs, kfs, krevs, V, i)
else
@inbounds @fastmath fR = kfs[i] * cs[rarray[1, i]] * cs[rarray[2, i]] * cs[rarray[3, i]] * cs[rarray[4, i]]
end
if @inbounds rarray[6, i] == 0
if @inbounds rarray[5, i] == 0
rR = 0.0
elseif @inbounds rarray[6, i] == 0
@inbounds @fastmath rR = krevs[i] * cs[rarray[5, i]]
elseif @inbounds rarray[7, i] == 0
@inbounds @fastmath rR = krevs[i] * cs[rarray[5, i]] * cs[rarray[6, i]]
Expand Down

0 comments on commit c5be921

Please sign in to comment.