Skip to content

Commit 39d5bdc

Browse files
committed
fixed rops bug
1 parent 683c51a commit 39d5bdc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Simulation.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,10 @@ end
254254

255255
function rops(ssys::SystemSimulation, t)
256256
domains = getfield.(ssys.sims, :domain)
257-
Nrxns = sum([length(sim.domain.phase.reactions) for sim in ssys.sims]) + sum([length(inter.reactions) for inter in ssys.interfaces if hasproperty(inter, :reactions)])
257+
Nrxns = sum([length(sim.domain.phase.reactions) for sim in ssys.sims])
258+
Nrxns_interface = [length(inter.reactions) for inter in ssys.interfaces if hasproperty(inter, :reactions)]
259+
if Nrxns_interface != Union{}[]
260+
Nxrns += sum(Nrxns_interface)
258261
Nspcs = sum([length(getphasespecies(sim.domain.phase)) for sim in ssys.sims])
259262
cstot = zeros(Nspcs)
260263
vns = Array{Any,1}(undef, length(domains))

0 commit comments

Comments
 (0)