Skip to content

Commit 8d361fe

Browse files
committed
#1477 fix bug in idaklu
1 parent c7543b1 commit 8d361fe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pybamm/solvers/c_solvers/idaklu.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,9 @@ Solution solve(np_array t_np, np_array y0_np, np_array yp0_np,
343343

344344
// set initial value
345345
yval = N_VGetArrayPointer(yy);
346-
ySval = N_VGetArrayPointer(yyS[0]);
346+
if (number_of_parameters > 0) {
347+
ySval = N_VGetArrayPointer(yyS[0]);
348+
}
347349
ypval = N_VGetArrayPointer(yp);
348350
atval = N_VGetArrayPointer(avtol);
349351
int i;

0 commit comments

Comments
 (0)