Skip to content

Commit

Permalink
some progress
Browse files Browse the repository at this point in the history
  • Loading branch information
maggul committed Jul 11, 2024
1 parent 62de914 commit 8a9af6c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/arkode/C_serial/lsrk_analytic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion examples/arkode/C_serial/lsrk_analytic_VarJac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion src/arkode/arkode_lsrkstep.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion src/arkode/arkode_lsrkstep_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 8a9af6c

Please sign in to comment.