@@ -292,15 +292,19 @@ function rops!(ropmat,rarray,cs,kfs,krevs,V,start)
292292            @inbounds  @fastmath  fR =  kfs[i]* cs[rarray[1 ,i]]
293293        elseif  @inbounds  rarray[3 ,i] ==  0 
294294            @inbounds  @fastmath  fR =  kfs[i]* cs[rarray[1 ,i]]* cs[rarray[2 ,i]]
295-         else 
295+         elseif   @inbounds  rarray[ 4 ,i]  ==   0   
296296            @inbounds  @fastmath  fR =  kfs[i]* cs[rarray[1 ,i]]* cs[rarray[2 ,i]]* cs[rarray[3 ,i]]
297+         else 
298+             @inbounds  @fastmath  fR =  kfs[i]* cs[rarray[1 ,i]]* cs[rarray[2 ,i]]* cs[rarray[3 ,i]]* cs[rarray[4 ,i]]  
297299        end 
298-         if  @inbounds  rarray[5 ,i] ==  0 
299-             @inbounds  @fastmath  rR =  krevs[i]* cs[rarray[4 ,i]]
300-         elseif  @inbounds  rarray[6 ,i] ==  0 
301-             @inbounds  @fastmath  rR =  krevs[i]* cs[rarray[4 ,i]]* cs[rarray[5 ,i]]
300+         if  @inbounds  rarray[6 ,i] ==  0 
301+             @inbounds  @fastmath  rR =  krevs[i]* cs[rarray[5 ,i]]
302+         elseif  @inbounds  rarray[7 ,i] ==  0 
303+             @inbounds  @fastmath  rR =  krevs[i]* cs[rarray[5 ,i]]* cs[rarray[6 ,i]]
304+         elseif  rarray[8 ,i] ==  0  
305+             @inbounds  @fastmath  rR =  krevs[i]* cs[rarray[5 ,i]]* cs[rarray[6 ,i]]* cs[rarray[7 ,i]]
302306        else 
303-             @inbounds  @fastmath  rR =  krevs[i]* cs[rarray[4 ,i]]* cs[rarray[5 ,i]]* cs[rarray[6 ,i]]
307+             @inbounds  @fastmath  rR =  krevs[i]* cs[rarray[5 ,i]]* cs[rarray[6 ,i]]* cs[rarray[7 ,i]] * cs[rarray[ 8 ,i]]
304308        end 
305309        @fastmath  R =  (fR -  rR)* V
306310
@@ -309,35 +313,45 @@ function rops!(ropmat,rarray,cs,kfs,krevs,V,start)
309313            @inbounds  @fastmath  ropmat[i+ start,rarray[2 ,i]] -=  R
310314            if  @inbounds  rarray[3 ,i] !=  0 
311315                @inbounds  @fastmath  ropmat[i+ start,rarray[3 ,i]] -=  R
316+                 if  @inbounds  rarray[4 ,i] !=  0 
317+                     @inbounds  @fastmath  ropmat[i+ start,rarray[4 ,i]] -=  R
318+                 end 
312319            end 
313320        end 
314-         @inbounds  @fastmath  ropmat[i+ start,rarray[4 ,i]] +=  R
315-         if  @inbounds  rarray[5 ,i] !=  0 
316-             @inbounds  @fastmath  ropmat[i+ start,rarray[5 ,i]] +=  R
317-             if  @inbounds  rarray[6 ,i] !=  0 
318-                 @inbounds  @fastmath  ropmat[i+ start,rarray[6 ,i]] +=  R
321+         @inbounds  @fastmath  ropmat[i+ start,rarray[5 ,i]] +=  R
322+         if  @inbounds  rarray[6 ,i] !=  0 
323+             @inbounds  @fastmath  ropmat[i+ start,rarray[6 ,i]] +=  R
324+             if  @inbounds  rarray[7 ,i] !=  0 
325+                 @inbounds  @fastmath  ropmat[i+ start,rarray[7 ,i]] +=  R
326+                 if  @inbounds  rarray[8 ,i] !=  0 
327+                     @inbounds  @fastmath  ropmat[i+ start,rarray[8 ,i]] +=  R
328+                 end  
319329            end 
320330        end    
321331    end 
322332end 
323333
324334function  rops! (ropvec,rarray,cs,kfs,krevs,V,start,ind)
325335    for  i =  1 : length (kfs)
326-         c =  count (isequal (ind),rarray[4 : 6 ,i])- count (isequal (ind),rarray[1 : 3 ,i])
336+         c =  count (isequal (ind),rarray[5 : 8 ,i])- count (isequal (ind),rarray[1 : 4 ,i])
327337        if  c !=  0.0 
328338            if  @inbounds  rarray[2 ,i] ==  0 
329339                @inbounds  @fastmath  fR =  kfs[i]* cs[rarray[1 ,i]]
330340            elseif  @inbounds  rarray[3 ,i] ==  0 
331341                @inbounds  @fastmath  fR =  kfs[i]* cs[rarray[1 ,i]]* cs[rarray[2 ,i]]
332-             else 
342+             elseif   @inbounds  rarray[ 4 ,i]  ==   0   
333343                @inbounds  @fastmath  fR =  kfs[i]* cs[rarray[1 ,i]]* cs[rarray[2 ,i]]* cs[rarray[3 ,i]]
344+             else 
345+                 @inbounds  @fastmath  fR =  kfs[i]* cs[rarray[1 ,i]]* cs[rarray[2 ,i]]* cs[rarray[3 ,i]]* cs[rarray[4 ,i]]  
334346            end 
335-             if  @inbounds  rarray[5 ,i] ==  0 
336-                 @inbounds  @fastmath  rR =  krevs[i]* cs[rarray[4 ,i]]
337-             elseif  @inbounds  rarray[6 ,i] ==  0 
338-                 @inbounds  @fastmath  rR =  krevs[i]* cs[rarray[4 ,i]]* cs[rarray[5 ,i]]
347+             if  @inbounds  rarray[6 ,i] ==  0 
348+                 @inbounds  @fastmath  rR =  krevs[i]* cs[rarray[5 ,i]]
349+             elseif  @inbounds  rarray[7 ,i] ==  0 
350+                 @inbounds  @fastmath  rR =  krevs[i]* cs[rarray[5 ,i]]* cs[rarray[6 ,i]]
351+             elseif  rarray[8 ,i] ==  0  
352+                 @inbounds  @fastmath  rR =  krevs[i]* cs[rarray[5 ,i]]* cs[rarray[6 ,i]]* cs[rarray[7 ,i]]
339353            else 
340-                 @inbounds  @fastmath  rR =  krevs[i]* cs[rarray[4 ,i]]* cs[rarray[5 ,i]]* cs[rarray[6 ,i]]
354+                 @inbounds  @fastmath  rR =  krevs[i]* cs[rarray[5 ,i]]* cs[rarray[6 ,i]]* cs[rarray[7 ,i]] * cs[rarray[ 8 ,i]]
341355            end 
342356            @fastmath  R =  (fR -  rR)* V
343357            @fastmath  @inbounds  ropvec[i+ start] =  c* R
0 commit comments