@@ -151,15 +151,13 @@ int jacobian_casadi(realtype tt, realtype cj, N_Vector yy, N_Vector yp,
151151 realtype *jac_data;
152152 if (p_python_functions->options .using_sparse_matrix )
153153 {
154- DEBUG (" sparse jacobian_casadi" );
155154 jac_data = SUNSparseMatrix_Data (JJ);
156155 }
157156 else if (p_python_functions->options .using_banded_matrix ) {
158157 jac_data = p_python_functions->get_tmp_sparse_jacobian_data ();
159158 }
160159 else
161160 {
162- DEBUG (" dense jacobian_casadi" );
163161 jac_data = SUNDenseMatrix_Data (JJ);
164162 }
165163
@@ -177,16 +175,14 @@ int jacobian_casadi(realtype tt, realtype cj, N_Vector yy, N_Vector yp,
177175 if (p_python_functions->options .using_banded_matrix )
178176 {
179177 // copy data from temporary matrix to the banded matrix
180- DEBUG (" banded jacobian_casadi" );
181- realtype *ret_jac_data = SUNBandMatrix_Data (JJ);
182178 auto jac_colptrs = p_python_functions->jac_times_cjmass_colptrs .data ();
183179 auto jac_rowvals = p_python_functions->jac_times_cjmass_rowvals .data ();
184- auto ncols = p_python_functions->number_of_states ;
180+ int ncols = p_python_functions->number_of_states ;
185181 for (int col_ij = 0 ; col_ij < ncols; col_ij++) {
186- auto banded_col = SM_COLUMN_B (JJ, col_ij);
182+ realtype * banded_col = SM_COLUMN_B (JJ, col_ij);
187183 for (auto data_i = jac_colptrs[col_ij]; data_i < jac_colptrs[col_ij+1 ]; data_i++) {
188184 auto row_ij = jac_rowvals[data_i];
189- auto value_ij = jac_data[data_i];
185+ const realtype value_ij = jac_data[data_i];
190186 DEBUG (" (" << row_ij << " , " << col_ij << " ) = " << value_ij);
191187 SM_COLUMN_ELEMENT_B (banded_col, row_ij, col_ij) = value_ij;
192188 }
0 commit comments