@@ -304,15 +304,19 @@ function rops!(ropmat,rarray,cs,kfs,krevs,V,start)
304304 @inbounds @fastmath fR = kfs[i]* cs[rarray[1 ,i]]
305305 elseif @inbounds rarray[3 ,i] == 0
306306 @inbounds @fastmath fR = kfs[i]* cs[rarray[1 ,i]]* cs[rarray[2 ,i]]
307- else
307+ elseif @inbounds rarray[ 4 ,i] == 0
308308 @inbounds @fastmath fR = kfs[i]* cs[rarray[1 ,i]]* cs[rarray[2 ,i]]* cs[rarray[3 ,i]]
309+ else
310+ @inbounds @fastmath fR = kfs[i]* cs[rarray[1 ,i]]* cs[rarray[2 ,i]]* cs[rarray[3 ,i]]* cs[rarray[4 ,i]]
309311 end
310- if @inbounds rarray[5 ,i] == 0
311- @inbounds @fastmath rR = krevs[i]* cs[rarray[4 ,i]]
312- elseif @inbounds rarray[6 ,i] == 0
313- @inbounds @fastmath rR = krevs[i]* cs[rarray[4 ,i]]* cs[rarray[5 ,i]]
312+ if @inbounds rarray[6 ,i] == 0
313+ @inbounds @fastmath rR = krevs[i]* cs[rarray[5 ,i]]
314+ elseif @inbounds rarray[7 ,i] == 0
315+ @inbounds @fastmath rR = krevs[i]* cs[rarray[5 ,i]]* cs[rarray[6 ,i]]
316+ elseif rarray[8 ,i] == 0
317+ @inbounds @fastmath rR = krevs[i]* cs[rarray[5 ,i]]* cs[rarray[6 ,i]]* cs[rarray[7 ,i]]
314318 else
315- @inbounds @fastmath rR = krevs[i]* cs[rarray[4 ,i]]* cs[rarray[5 ,i]]* cs[rarray[6 ,i]]
319+ @inbounds @fastmath rR = krevs[i]* cs[rarray[5 ,i]]* cs[rarray[6 ,i]]* cs[rarray[7 ,i]] * cs[rarray[ 8 ,i]]
316320 end
317321 @fastmath R = (fR - rR)* V
318322
@@ -321,35 +325,45 @@ function rops!(ropmat,rarray,cs,kfs,krevs,V,start)
321325 @inbounds @fastmath ropmat[i+ start,rarray[2 ,i]] -= R
322326 if @inbounds rarray[3 ,i] != 0
323327 @inbounds @fastmath ropmat[i+ start,rarray[3 ,i]] -= R
328+ if @inbounds rarray[4 ,i] != 0
329+ @inbounds @fastmath ropmat[i+ start,rarray[4 ,i]] -= R
330+ end
324331 end
325332 end
326- @inbounds @fastmath ropmat[i+ start,rarray[4 ,i]] += R
327- if @inbounds rarray[5 ,i] != 0
328- @inbounds @fastmath ropmat[i+ start,rarray[5 ,i]] += R
329- if @inbounds rarray[6 ,i] != 0
330- @inbounds @fastmath ropmat[i+ start,rarray[6 ,i]] += R
333+ @inbounds @fastmath ropmat[i+ start,rarray[5 ,i]] += R
334+ if @inbounds rarray[6 ,i] != 0
335+ @inbounds @fastmath ropmat[i+ start,rarray[6 ,i]] += R
336+ if @inbounds rarray[7 ,i] != 0
337+ @inbounds @fastmath ropmat[i+ start,rarray[7 ,i]] += R
338+ if @inbounds rarray[8 ,i] != 0
339+ @inbounds @fastmath ropmat[i+ start,rarray[8 ,i]] += R
340+ end
331341 end
332342 end
333343 end
334344end
335345
336346function rops! (ropvec,rarray,cs,kfs,krevs,V,start,ind)
337347 for i = 1 : length (kfs)
338- c = count (isequal (ind),rarray[4 : 6 ,i])- count (isequal (ind),rarray[1 : 3 ,i])
348+ c = count (isequal (ind),rarray[5 : 8 ,i])- count (isequal (ind),rarray[1 : 4 ,i])
339349 if c != 0.0
340350 if @inbounds rarray[2 ,i] == 0
341351 @inbounds @fastmath fR = kfs[i]* cs[rarray[1 ,i]]
342352 elseif @inbounds rarray[3 ,i] == 0
343353 @inbounds @fastmath fR = kfs[i]* cs[rarray[1 ,i]]* cs[rarray[2 ,i]]
344- else
354+ elseif @inbounds rarray[ 4 ,i] == 0
345355 @inbounds @fastmath fR = kfs[i]* cs[rarray[1 ,i]]* cs[rarray[2 ,i]]* cs[rarray[3 ,i]]
356+ else
357+ @inbounds @fastmath fR = kfs[i]* cs[rarray[1 ,i]]* cs[rarray[2 ,i]]* cs[rarray[3 ,i]]* cs[rarray[4 ,i]]
346358 end
347- if @inbounds rarray[5 ,i] == 0
348- @inbounds @fastmath rR = krevs[i]* cs[rarray[4 ,i]]
349- elseif @inbounds rarray[6 ,i] == 0
350- @inbounds @fastmath rR = krevs[i]* cs[rarray[4 ,i]]* cs[rarray[5 ,i]]
359+ if @inbounds rarray[6 ,i] == 0
360+ @inbounds @fastmath rR = krevs[i]* cs[rarray[5 ,i]]
361+ elseif @inbounds rarray[7 ,i] == 0
362+ @inbounds @fastmath rR = krevs[i]* cs[rarray[5 ,i]]* cs[rarray[6 ,i]]
363+ elseif rarray[8 ,i] == 0
364+ @inbounds @fastmath rR = krevs[i]* cs[rarray[5 ,i]]* cs[rarray[6 ,i]]* cs[rarray[7 ,i]]
351365 else
352- @inbounds @fastmath rR = krevs[i]* cs[rarray[4 ,i]]* cs[rarray[5 ,i]]* cs[rarray[6 ,i]]
366+ @inbounds @fastmath rR = krevs[i]* cs[rarray[5 ,i]]* cs[rarray[6 ,i]]* cs[rarray[7 ,i]] * cs[rarray[ 8 ,i]]
353367 end
354368 @fastmath R = (fR - rR)* V
355369 @fastmath @inbounds ropvec[i+ start] = c* R
0 commit comments