diff --git a/examples/arkode/C_serial/lsrk_analytic.c b/examples/arkode/C_serial/lsrk_analytic.c index d3b392b860..4fb965950a 100644 --- a/examples/arkode/C_serial/lsrk_analytic.c +++ b/examples/arkode/C_serial/lsrk_analytic.c @@ -137,7 +137,7 @@ int main(void) if (check_flag(&flag, "LSRKodeSetSprRadSafetyFactor", 1)) { return 1; } /* Specify the LSRK method */ - flag = LSRKodeSetMethod(arkode_mem, 1); + flag = LSRKodeSetMethod(arkode_mem, 2); if (check_flag(&flag, "LSRKodeSetMethod", 1)) { return 1; } /* Open output stream for results, output comment line */ diff --git a/examples/arkode/C_serial/lsrk_analytic_VarJac.c b/examples/arkode/C_serial/lsrk_analytic_VarJac.c index f0363a62d0..25d4694134 100644 --- a/examples/arkode/C_serial/lsrk_analytic_VarJac.c +++ b/examples/arkode/C_serial/lsrk_analytic_VarJac.c @@ -137,7 +137,7 @@ int main(void) if (check_flag(&flag, "LSRKodeSetSprRadSafetyFactor", 1)) { return 1; } /* Specify the LSRK method */ - flag = LSRKodeSetMethod(arkode_mem, 1); + flag = LSRKodeSetMethod(arkode_mem, 2); if (check_flag(&flag, "LSRKodeSetMethod", 1)) { return 1; } /* Open output stream for results, output comment line */ diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 5241f7aa4b..80da7c65a3 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -780,7 +780,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* determine the number of required stages */ for(int ss = 1; ss < step_mem->stagemaxlimit; ss++) { - if((SUNSQR(ss) + ss - 2) >= (ark_mem->h*step_mem->sprad)) + if((SUNSQR(ss) + ss - 2) >= 2*(ark_mem->h*step_mem->sprad)) { step_mem->reqstages = SUNMAX(ss, 2); break; diff --git a/src/arkode/arkode_lsrkstep_io.c b/src/arkode/arkode_lsrkstep_io.c index 4f0310837f..1672cf7364 100644 --- a/src/arkode/arkode_lsrkstep_io.c +++ b/src/arkode/arkode_lsrkstep_io.c @@ -51,13 +51,15 @@ int LSRKodeSetMethod(void* arkode_mem, int method) { case 1: ark_mem->step = lsrkStep_TakeStepRKC; + printf("\nSolving with RKC method\n\n"); break; case 2: ark_mem->step = lsrkStep_TakeStepRKL; + printf("\nSolving with RKL method\n\n"); break; - case 3: ark_mem->step = lsrkStep_TakeStepRKG; + printf("\nSolving with RKG method\n\n"); break; default: