2 % Wrapper for calling the sparse ODE Jacobian routine
3 % in a format required by Matlab's ODE integrators
5 function J = KPP_ROOT_Jac_Chem(T, Y)
8 % To call the mex file uncomment one of the following lines:
9 % 1) LU prefix if SPARSE_LU_ROW option was used in code generation
10 % global LU_IROW LU_ICOL
11 % 2) if SPARSE_ROW option was used in code generation
17 KPP_ROOT_Update_RCONST;
19 % This line calls the Matlab ODE Jacobian routine
20 J = KPP_ROOT_Jac_SP( Y, FIX, RCONST );
22 % To call the mex routine instead, comment the line above and uncomment one of the following lines:
23 % 1) LU prefix if SPARSE_LU_ROW option was used in code generation
24 % J = sparse( LU_IROW, LU_ICOL, ...
25 % KPP_ROOT_mex_Jac_SP( Y, FIX, RCONST ), KPP_NVAR, KPP_NVAR);
26 % 2) if SPARSE_ROW option was used in code generation
27 % J = sparse( IROW, ICOL, ...
28 % KPP_ROOT_mex_Jac_SP( Y, FIX, RCONST ), KPP_NVAR, KPP_NVAR);