Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hwpang committed Feb 17, 2024
1 parent c86e172 commit 1c580db
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 @@ -413,7 +413,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 @@ -422,7 +424,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 1c580db

Please sign in to comment.