2 int KppDecomp( double *JVS
)
8 for( k
= 0; k
< KPP_NVAR
; k
++ ) {
9 if( JVS
[ LU_DIAG
[k
] ] == 0.0 ) return k
+1;
10 for( kk
= LU_CROW
[k
]; kk
< LU_CROW
[k
+1]; kk
++ )
11 W
[ LU_ICOL
[kk
] ] = JVS
[kk
];
12 for( kk
= LU_CROW
[k
]; kk
< LU_DIAG
[k
]; kk
++ ) {
14 a
= -W
[j
] / JVS
[ LU_DIAG
[j
] ];
16 for( jj
= LU_DIAG
[j
]+1; jj
< LU_CROW
[j
+1]; jj
++ )
17 W
[ LU_ICOL
[jj
] ] += a
*JVS
[jj
];
19 for( kk
= LU_CROW
[k
]; kk
< LU_CROW
[k
+1]; kk
++ )
20 JVS
[kk
] = W
[ LU_ICOL
[kk
] ];