Skip to content

Commit

Permalink
pybamm-team#3431 fix some vstudio compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjrobins committed Oct 12, 2023
1 parent e1585f7 commit 7e1930c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pybamm/solvers/c_solvers/idaklu/CasadiSolverOpenMP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ Solution CasadiSolverOpenMP::solve(

// set inputs
auto p_inputs = inputs.unchecked<2>();
for (uint i = 0; i < functions->inputs.size(); i++)
for (int i = 0; i < functions->inputs.size(); i++)
functions->inputs[i] = p_inputs(i, 0);

// set initial conditions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ int jacobian_casadi(realtype tt, realtype cj, N_Vector yy, N_Vector yp,
jac_colptrs[i] = p_jac_times_cjmass_colptrs[i];
}
} else if (SUNSparseMatrix_SparseType(JJ) == CSR_MAT) {
realtype newjac[SUNSparseMatrix_NNZ(JJ)];
const int JJ_nnz = SUNSparseMatrix_NNZ(JJ);
realtype newjac[JJ_nnz];
sunindextype *jac_ptrs = SUNSparseMatrix_IndexPointers(JJ);
sunindextype *jac_vals = SUNSparseMatrix_IndexValues(JJ);

Expand Down

0 comments on commit 7e1930c

Please sign in to comment.