From 328eea10b113420c21fece1bd302c684b4aca251 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 9 Jan 2026 11:55:35 -0500 Subject: [PATCH 001/298] Initial implementation of step/stage preprocessing, as well as failed step postprocessing --- doc/arkode/guide/source/Constants.rst | 4 +- include/arkode/arkode.h | 9 +- src/arkode/arkode.c | 29 +- src/arkode/arkode_arkstep.c | 21 +- src/arkode/arkode_erkstep.c | 19 +- src/arkode/arkode_impl.h | 11 +- src/arkode/arkode_io.c | 81 +++++- src/arkode/arkode_lsrkstep.c | 364 +++++++++++++++++++++----- src/arkode/arkode_mristep.c | 80 +++++- src/arkode/arkode_sprkstep.c | 34 ++- 10 files changed, 547 insertions(+), 105 deletions(-) diff --git a/doc/arkode/guide/source/Constants.rst b/doc/arkode/guide/source/Constants.rst index a739dbade7..d7e13d8adc 100644 --- a/doc/arkode/guide/source/Constants.rst +++ b/doc/arkode/guide/source/Constants.rst @@ -470,9 +470,9 @@ contains the ARKODE output constants. Commented-out table rows: +-------------------------------------+------+------------------------------------------------------------+ - | :index:`ARK_POSTPROCESS_STEP_FAIL` | -37 | An error occurred when calling the user-provided | + | :index:`ARK_POSTPROCESS_STEP_FAIL` | -37 | An error occurred when calling a user-provided. | | | | step-based :c:func:`ARKPostProcessFn` routine. | +-------------------------------------+------+------------------------------------------------------------+ - | :index:`ARK_POSTPROCESS_STAGE_FAIL` | -38 | An error occurred when calling the user-provided | + | :index:`ARK_POSTPROCESS_STAGE_FAIL` | -38 | An error occurred when calling a user-provided | | | | stage-based :c:func:`ARKPostProcessFn` routine. | +-------------------------------------+------+------------------------------------------------------------+ diff --git a/include/arkode/arkode.h b/include/arkode/arkode.h index 78ad5edb9a..d595074409 100644 --- a/include/arkode/arkode.h +++ b/include/arkode/arkode.h @@ -124,7 +124,8 @@ extern "C" { #define ARK_INNERTOOUTER_FAIL -36 /* ARK_POSTPROCESS_FAIL equals ARK_POSTPROCESS_STEP_FAIL - for backwards compatibility */ + for backwards compatibility. Note that we use these + same constants for step and stage preprocessing errors */ #define ARK_POSTPROCESS_FAIL -37 #define ARK_POSTPROCESS_STEP_FAIL -37 #define ARK_POSTPROCESS_STAGE_FAIL -38 @@ -275,8 +276,14 @@ SUNDIALS_EXPORT int ARKodeClearStopTime(void* arkode_mem); SUNDIALS_EXPORT int ARKodeSetFixedStep(void* arkode_mem, sunrealtype hfixed); SUNDIALS_EXPORT int ARKodeSetStepDirection(void* arkode_mem, sunrealtype stepdir); SUNDIALS_EXPORT int ARKodeSetUserData(void* arkode_mem, void* user_data); +SUNDIALS_EXPORT int ARKodeSetPreprocessStepFn(void* arkode_mem, + ARKPostProcessFn ProcessStep); SUNDIALS_EXPORT int ARKodeSetPostprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep); +SUNDIALS_EXPORT int ARKodeSetPostprocessStepFailFn(void* arkode_mem, + ARKPostProcessFn ProcessStep); +SUNDIALS_EXPORT int ARKodeSetPreprocessStageFn(void* arkode_mem, + ARKPostProcessFn ProcessStage); SUNDIALS_EXPORT int ARKodeSetPostprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStage); diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 8e44a139c7..5095643d58 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -903,6 +903,13 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, "step = %li, tn = " SUN_FORMAT_G ", h = " SUN_FORMAT_G, ark_mem->nst + 1, ark_mem->tn, ark_mem->h); + /* call the user-supplied step preprocessing function (if it exists) */ + if (ark_mem->PreProcessStep != NULL) + { + retval = ark_mem->PreProcessStep(ark_mem->tcur, ark_mem->ycur, ark_mem->ps_data); + if (retval != 0) { return (ARK_POSTPROCESS_STEP_FAIL); } + } + /* Call time stepper module to attempt a step: 0 => step completed successfully >0 => step encountered recoverable failure; reduce step if possible @@ -1000,6 +1007,13 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, ark_mem->h *= ark_mem->eta; ark_mem->next_h = ark_mem->hprime = ark_mem->h; + /* since the previous step attempt failed, call the user-supplied step failure postprocessing function (if it exists) */ + if (ark_mem->PostProcessStepFail != NULL) + { + retval = ark_mem->PostProcessStepFail(ark_mem->tcur, ark_mem->ycur, ark_mem->ps_data); + if (retval != 0) { return (ARK_POSTPROCESS_STEP_FAIL); } + } + } /* end looping for step attempts */ /* If step attempt loop succeeded, complete step (update current time, solution, @@ -1586,12 +1600,15 @@ ARKodeMem arkCreate(SUNContext sunctx) ark_mem->VRabstolMallocDone = SUNFALSE; ark_mem->MallocDone = SUNFALSE; - /* No user-supplied step postprocessing function yet */ - ark_mem->ProcessStep = NULL; + /* No user-supplied step pre- or post-processing functions yet */ + ark_mem->PreProcessStep = NULL; + ark_mem->PostProcessStep = NULL; + ark_mem->PostProcessStepFail = NULL; ark_mem->ps_data = NULL; - /* No user-supplied stage postprocessing function yet */ - ark_mem->ProcessStage = NULL; + /* No user-supplied stage pre- or post-processing functions yet */ + ark_mem->PreProcessStage = NULL; + ark_mem->PostProcessStage = NULL; /* No user_data pointer yet */ ark_mem->user_data = NULL; @@ -2726,9 +2743,9 @@ int arkCompleteStep(ARKodeMem ark_mem, sunrealtype dsm) } /* apply user-supplied step postprocessing function (if supplied) */ - if (ark_mem->ProcessStep != NULL) + if (ark_mem->PostProcessStep != NULL) { - retval = ark_mem->ProcessStep(ark_mem->tcur, ark_mem->ycur, ark_mem->ps_data); + retval = ark_mem->PostProcessStep(ark_mem->tcur, ark_mem->ycur, ark_mem->ps_data); if (retval != 0) { return (ARK_POSTPROCESS_STEP_FAIL); } } diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index fe1d386b72..c46490a362 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1917,6 +1917,21 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) "stage = %i, implicit = %i, tcur = " SUN_FORMAT_G, is, implicit_stage, ark_mem->tcur); + /* apply user-supplied stage preprocessing function (if supplied) */ + /* NOTE: with internally inconsistent IMEX methods (c_i^E != c_i^I) the value + of tcur corresponds to the stage time from the implicit table (c_i^I). */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return (ARK_POSTPROCESS_STAGE_FAIL); + } + } + /* setup time-dependent mass matrix */ if ((step_mem->mass_type == MASS_TIMEDEP) && (step_mem->msetup != NULL)) { @@ -2015,10 +2030,10 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* apply user-supplied stage postprocessing function (if supplied) */ /* NOTE: with internally inconsistent IMEX methods (c_i^E != c_i^I) the value of tcur corresponds to the stage time from the implicit table (c_i^I). */ - if (ark_mem->ProcessStage != NULL) + if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->ProcessStage(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index c4282fe150..50552a3d26 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -823,6 +823,19 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, is, ark_mem->tcur); + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tn + step_mem->B->c[is-1] * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return (ARK_POSTPROCESS_STAGE_FAIL); + } + } + /* Set ycur to current stage solution */ nvec = 0; for (js = 0; js < is; js++) @@ -857,10 +870,10 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->ProcessStage != NULL) + if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->ProcessStage(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", diff --git a/src/arkode/arkode_impl.h b/src/arkode/arkode_impl.h index a89f57b8e2..eb9a0a90f9 100644 --- a/src/arkode/arkode_impl.h +++ b/src/arkode/arkode_impl.h @@ -564,12 +564,15 @@ struct ARKodeMemRec sunbooleantype relax_enabled; /* is relaxation enabled? */ ARKodeRelaxMem relax_mem; /* relaxation data structure */ - /* User-supplied step solution post-processing function */ - ARKPostProcessFn ProcessStep; + /* User-supplied step solution pre/post-processing functions */ + ARKPostProcessFn PreProcessStep; + ARKPostProcessFn PostProcessStep; + ARKPostProcessFn PostProcessStepFail; void* ps_data; /* pointer to user_data */ - /* User-supplied stage solution post-processing function */ - ARKPostProcessFn ProcessStage; + /* User-supplied stage solution pre/post-processing functions */ + ARKPostProcessFn PreProcessStage; + ARKPostProcessFn PostProcessStage; sunbooleantype use_compensated_sums; diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index cb70bbd19f..7532eba29e 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -874,7 +874,8 @@ int ARKodeSetUserData(void* arkode_mem, void* user_data) if (ark_mem->root_mem != NULL) { ark_mem->root_mem->root_data = user_data; } /* Set data for post-processing a step */ - if (ark_mem->ProcessStep != NULL) { ark_mem->ps_data = user_data; } + if ((ark_mem->PreProcessStep != NULL) || (ark_mem->PostProcessStep != NULL) || + (ark_mem->PostProcessStepFail != NULL)) { ark_mem->ps_data = user_data; } /* Set user data into stepper (if provided) */ if (ark_mem->step_setuserdata) @@ -1490,16 +1491,40 @@ int ARKodeSetNoInactiveRootWarn(void* arkode_mem) } /*--------------------------------------------------------------- + ARKodeSetPreprocessStepFn: ARKodeSetPostprocessStepFn: + ARKodeSetPostprocessStepFailFn: - Specifies a user-provided step postprocessing function having - type ARKPostProcessFn. A NULL input function disables step - postprocessing. + Specifies user-provided step pre- and post-processing functions + having type ARKPostProcessFn. A NULL input function disables step + pre- or post-step processing. + + The "Preprocess" function is called just prior to taking a step, + while the "Postprocess" function is called immediately after + a successful step. The "PostprocessStepFail" function is called + immediately after a failed step. IF THE SUPPLIED FUNCTION MODIFIES ANY OF THE ACTIVE STATE DATA, THEN ALL THEORETICAL GUARANTEES OF SOLUTION ACCURACY AND STABILITY ARE LOST. ---------------------------------------------------------------*/ +int ARKodeSetPreprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep) +{ + ARKodeMem ark_mem; + if (arkode_mem == NULL) + { + arkProcessError(NULL, ARK_MEM_NULL, __LINE__, __func__, __FILE__, + MSG_ARK_NO_MEM); + return (ARK_MEM_NULL); + } + ark_mem = (ARKodeMem)arkode_mem; + + /* NULL argument sets default, otherwise set inputs */ + ark_mem->PreProcessStep = ProcessStep; + ark_mem->ps_data = ark_mem->user_data; + + return (ARK_SUCCESS); +} int ARKodeSetPostprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep) { ARKodeMem ark_mem; @@ -1512,18 +1537,40 @@ int ARKodeSetPostprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep) ark_mem = (ARKodeMem)arkode_mem; /* NULL argument sets default, otherwise set inputs */ - ark_mem->ProcessStep = ProcessStep; + ark_mem->PostProcessStep = ProcessStep; + ark_mem->ps_data = ark_mem->user_data; + + return (ARK_SUCCESS); +} +int ARKodeSetPostprocessStepFailFn(void* arkode_mem, ARKPostProcessFn ProcessStep) +{ + ARKodeMem ark_mem; + if (arkode_mem == NULL) + { + arkProcessError(NULL, ARK_MEM_NULL, __LINE__, __func__, __FILE__, + MSG_ARK_NO_MEM); + return (ARK_MEM_NULL); + } + ark_mem = (ARKodeMem)arkode_mem; + + /* NULL argument sets default, otherwise set inputs */ + ark_mem->PostProcessStepFail = ProcessStep; ark_mem->ps_data = ark_mem->user_data; return (ARK_SUCCESS); } /*--------------------------------------------------------------- + ARKodeSetPreprocessStageFn: ARKodeSetPostprocessStageFn: - Specifies a user-provided stage postprocessing function having - type ARKPostProcessFn. A NULL input function disables - stage postprocessing. + Specifies user-provided stage pre- and post-processing + functions having type ARKPostProcessFn. A NULL input function + disables pre- or post-stage processing. + + The "Preprocess" function is called just prior to taking a stage, + while the "Postprocess" function is called immediately after + computing a stage. IF THE SUPPLIED FUNCTION MODIFIES ANY OF THE ACTIVE STATE DATA, THEN ALL THEORETICAL GUARANTEES OF SOLUTION ACCURACY AND @@ -1536,6 +1583,22 @@ int ARKodeSetPostprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep) ARKodeSetDeduceImplicitRhs in order to guarantee postprocessing constraints are enforced. ---------------------------------------------------------------*/ +int ARKodeSetPreprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStage) +{ + ARKodeMem ark_mem; + if (arkode_mem == NULL) + { + arkProcessError(NULL, ARK_MEM_NULL, __LINE__, __func__, __FILE__, + MSG_ARK_NO_MEM); + return (ARK_MEM_NULL); + } + ark_mem = (ARKodeMem)arkode_mem; + + /* NULL argument sets default, otherwise set inputs */ + ark_mem->PreProcessStage = ProcessStage; + + return (ARK_SUCCESS); +} int ARKodeSetPostprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStage) { ARKodeMem ark_mem; @@ -1548,7 +1611,7 @@ int ARKodeSetPostprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStage) ark_mem = (ARKodeMem)arkode_mem; /* NULL argument sets default, otherwise set inputs */ - ark_mem->ProcessStage = ProcessStage; + ark_mem->PostProcessStage = ProcessStage; return (ARK_SUCCESS); } diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index ec09b323d7..8cae80fb63 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -641,6 +641,19 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) bjm1 = ONE / SUNSQR(TWO * w0); bjm2 = bjm1; + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->yn, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + /* Evaluate the first stage */ N_VScale(ONE, ark_mem->yn, ark_mem->tempv1); @@ -652,10 +665,10 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) N_VLinearSum(ONE, ark_mem->yn, ark_mem->h * mus, ark_mem->fn, ark_mem->tempv2); /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->ProcessStage != NULL) + if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->ProcessStage(ark_mem->tn + ark_mem->h * mus, - ark_mem->tempv2, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tn + ark_mem->h * mus, + ark_mem->tempv2, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -685,6 +698,19 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) nu = -bj / bjm2; mus = mu * w1 / w0; + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tcur + ark_mem->h * thjm1, + ark_mem->tempv2, ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + /* Use the ycur array for temporary storage here */ retval = step_mem->fe(ark_mem->tcur + ark_mem->h * thjm1, ark_mem->tempv2, ark_mem->ycur, ark_mem->user_data); @@ -727,9 +753,9 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->ProcessStage != NULL && j < step_mem->req_stages) + if (ark_mem->PostProcessStage != NULL && j < step_mem->req_stages) { - retval = ark_mem->ProcessStage(ark_mem->tcur + ark_mem->h * thj, + retval = ark_mem->PostProcessStage(ark_mem->tcur + ark_mem->h * thj, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -922,6 +948,19 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) "stage = %i, tcur = " SUN_FORMAT_G, 0, ark_mem->tcur); SUNLogExtraDebugVec(ARK_LOGGER, "stage", ark_mem->yn, "z_0(:) ="); + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->yn, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + /* Compute RHS function, if necessary. */ if ((!ark_mem->fn_is_current && ark_mem->initsetup) || (step_mem->step_nst != ark_mem->nst)) @@ -962,10 +1001,10 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) N_VLinearSum(ONE, ark_mem->yn, ark_mem->h * mus, ark_mem->fn, ark_mem->tempv2); /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->ProcessStage != NULL) + if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->ProcessStage(ark_mem->tn + ark_mem->h * mus, - ark_mem->tempv2, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tn + ark_mem->h * mus, + ark_mem->tempv2, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -985,6 +1024,19 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) mus = w1 * mu; cj = temj * w1 / FOUR; + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tcur + ark_mem->h * cjm1, + ark_mem->tempv2, ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + /* Use the ycur array for temporary storage here */ retval = step_mem->fe(ark_mem->tcur + ark_mem->h * cjm1, ark_mem->tempv2, ark_mem->ycur, ark_mem->user_data); @@ -1023,10 +1075,10 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->ProcessStage != NULL && j < step_mem->req_stages) + if (ark_mem->PostProcessStage != NULL && j < step_mem->req_stages) { - retval = ark_mem->ProcessStage(ark_mem->tcur + ark_mem->h * cj, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur + ark_mem->h * cj, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1166,6 +1218,19 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr bt3 = (rs - ONE) / (rs * rs); } + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->yn, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 0, ark_mem->tcur); SUNLogExtraDebugVec(ARK_LOGGER, "stage", ark_mem->yn, "z_0(:) ="); @@ -1200,10 +1265,10 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->ProcessStage != NULL) + if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->ProcessStage(ark_mem->tn + sm1inv * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tn + sm1inv * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1215,6 +1280,19 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Evaluate stages j = 2,...,step_mem->req_stages - 1 */ for (int j = 2; j < step_mem->req_stages; j++) { + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tcur + (j-1) * sm1inv * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + retval = step_mem->fe(ark_mem->tcur + ((sunrealtype)j - ONE) * sm1inv * ark_mem->h, ark_mem->ycur, ark_mem->tempv2, ark_mem->user_data); @@ -1242,14 +1320,14 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->ProcessStage != NULL) + if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->ProcessStage(ark_mem->tcur + j * sm1inv * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur + j * sm1inv * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed vector op, retval = %i", retval); + "status = failed postprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -1355,6 +1433,19 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr "stage = %i, tcur = " SUN_FORMAT_G, 0, ark_mem->tcur); SUNLogExtraDebugVec(ARK_LOGGER, "stage", ark_mem->yn, "z_0(:) ="); + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->yn, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + /* The method is not FSAL. Therefore, fn ​is computed at the beginning of the step unless ARKODE updated fn. */ if (!ark_mem->fn_is_current) @@ -1384,10 +1475,10 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->ProcessStage != NULL) + if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->ProcessStage(ark_mem->tn + ark_mem->h * rat, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tn + ark_mem->h * rat, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1399,6 +1490,19 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Evaluate stages j = 2,...,step_mem->req_stages */ for (int j = 2; j <= ((in - 1) * (in - 2) / 2); j++) { + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tcur + (j-1) * rat * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + retval = step_mem->fe(ark_mem->tcur + ((sunrealtype)j - ONE) * rat * ark_mem->h, ark_mem->ycur, ark_mem->tempv3, ark_mem->user_data); @@ -1426,10 +1530,10 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->ProcessStage != NULL) + if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->ProcessStage(ark_mem->tcur + j * rat * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur + j * rat * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1443,6 +1547,19 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr for (int j = ((in - 1) * (in - 2) / 2 + 1); j <= (in * (in + 1) / 2 - 1); j++) { + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tcur + (j-1) * rat * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + retval = step_mem->fe(ark_mem->tcur + ((sunrealtype)j - ONE) * rat * ark_mem->h, ark_mem->ycur, ark_mem->tempv3, ark_mem->user_data); @@ -1470,10 +1587,10 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->ProcessStage != NULL) + if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->ProcessStage(ark_mem->tcur + j * rat * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur + j * rat * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1483,6 +1600,20 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tcur + + rat * (rn * (rn + ONE) / TWO - ONE) * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + retval = step_mem->fe(ark_mem->tcur + rat * (rn * (rn + ONE) / TWO - ONE) * ark_mem->h, ark_mem->ycur, ark_mem->tempv3, ark_mem->user_data); @@ -1523,16 +1654,35 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->ProcessStage != NULL) + if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->ProcessStage(ark_mem->tcur + - rat * (rn * (rn - ONE) / TWO) * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); - if (retval != 0) { return ARK_POSTPROCESS_STAGE_FAIL; } + retval = ark_mem->PostProcessStage(ark_mem->tcur + + rat * (rn * (rn - ONE) / TWO) * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed postprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } } for (int j = (in * (in + 1) / 2 + 1); j <= step_mem->req_stages; j++) { + /* apply user-supplied stage postprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tcur + + ((sunrealtype)j - rn - ONE) * rat * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "status = failed postprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + retval = step_mem->fe(ark_mem->tcur + ((sunrealtype)j - rn - ONE) * rat * ark_mem->h, ark_mem->ycur, ark_mem->tempv3, ark_mem->user_data); @@ -1560,11 +1710,11 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->ProcessStage != NULL && j < step_mem->req_stages) + if (ark_mem->PostProcessStage != NULL && j < step_mem->req_stages) { - retval = ark_mem->ProcessStage(ark_mem->tcur + - ((sunrealtype)j - rn) * rat * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur + + ((sunrealtype)j - rn) * rat * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1640,6 +1790,19 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr "stage = %i, tcur = " SUN_FORMAT_G, 0, ark_mem->tcur); SUNLogExtraDebugVec(ARK_LOGGER, "stage", ark_mem->yn, "z_0(:) ="); + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->yn, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + /* The method is not FSAL. Therefore, fn ​is computed at the beginning of the step unless ARKODE updated fn. */ if (!ark_mem->fn_is_current) @@ -1669,10 +1832,10 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->ProcessStage != NULL) + if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->ProcessStage(ark_mem->tn + ark_mem->h * p5, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tn + ark_mem->h * p5, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1681,6 +1844,19 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tcur + ark_mem->h * p5, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + retval = step_mem->fe(ark_mem->tcur + ark_mem->h * p5, ark_mem->ycur, ark_mem->tempv3, ark_mem->user_data); step_mem->nfe++; @@ -1705,10 +1881,10 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->ProcessStage != NULL) + if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->ProcessStage(ark_mem->tcur + ark_mem->h, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur + ark_mem->h, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1717,6 +1893,19 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tcur + ark_mem->h, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + retval = step_mem->fe(ark_mem->tcur + ark_mem->h, ark_mem->ycur, ark_mem->tempv3, ark_mem->user_data); step_mem->nfe++; @@ -1754,10 +1943,10 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->ProcessStage != NULL) + if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->ProcessStage(ark_mem->tcur + ark_mem->h * p5, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur + ark_mem->h * p5, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1845,6 +2034,19 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt "stage = %i, tcur = " SUN_FORMAT_G, 0, ark_mem->tcur); SUNLogExtraDebugVec(ARK_LOGGER, "stage", ark_mem->yn, "z_0(:) ="); + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->yn, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + /* The method is not FSAL. Therefore, fn ​is computed at the beginning of the step unless ARKODE updated fn. */ if (!ark_mem->fn_is_current) @@ -1877,19 +2079,32 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt ark_mem->tempv1); } + /* apply user-supplied stage postprocessing function (if supplied) */ + if (ark_mem->PostProcessStage != NULL) + { + retval = ark_mem->PostProcessStage(ark_mem->tn + onesixth * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed postprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + /* Evaluate stages j = 2,...,step_mem->req_stages */ for (int j = 2; j <= 5; j++) { - /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->ProcessStage != NULL) + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) { - retval = ark_mem->ProcessStage(ark_mem->tcur + ((sunrealtype)j - ONE) * - onesixth * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreProcessStage(ark_mem->tcur + + ((sunrealtype)j - ONE) * onesixth * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { - SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed postprocess stage, retval = %i", retval); + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -1919,8 +2134,25 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt N_VLinearSum(ONE, ark_mem->tempv1, SUN_RCONST(0.3) * ark_mem->h, ark_mem->tempv3, ark_mem->tempv1); } + + /* apply user-supplied stage postprocessing function (if supplied) */ + if (ark_mem->PostProcessStage != NULL) + { + retval = ark_mem->PostProcessStage(ark_mem->tn + j * onesixth * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed postprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + } + /* no need to call stage preprocessing here, since the stage does not require + a RHS function evaluation */ + SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 6, ark_mem->tn + TWO * onesixth * ark_mem->h); @@ -1932,10 +2164,10 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt ark_mem->ycur, ark_mem->ycur); /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->ProcessStage != NULL) + if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->ProcessStage(ark_mem->tcur + TWO * onesixth * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur + TWO * onesixth * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1946,6 +2178,20 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt for (int j = 6; j <= 9; j++) { + /* apply user-supplied stage prerocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tcur + + ((sunrealtype)j - FOUR) * onesixth * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + retval = step_mem->fe(ark_mem->tcur + ((sunrealtype)j - FOUR) * onesixth * ark_mem->h, ark_mem->ycur, ark_mem->tempv3, ark_mem->user_data); @@ -1978,11 +2224,11 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->ProcessStage != NULL) + if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->ProcessStage(ark_mem->tcur + ((sunrealtype)j - THREE) * - onesixth * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur + ((sunrealtype)j - THREE) * + onesixth * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 39189bda5c..833b068ccf 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1909,6 +1909,19 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt "stage = %i, stage type = %d, tcur = " SUN_FORMAT_G, is, step_mem->stagetypes[is], ark_mem->tcur); + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(t0, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return (ARK_POSTPROCESS_STAGE_FAIL); + } + } + /* Determine current stage type, and call corresponding routine; the vector ark_mem->ycur stores the previous stage solution on input, and should store the result of this stage solution on output. */ @@ -1953,11 +1966,11 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt SUNLogExtraDebugVec(ARK_LOGGER, "slow stage", ark_mem->ycur, "z_%i(:) =", is); /* apply user-supplied stage postprocessing function (if supplied) */ - if ((ark_mem->ProcessStage != NULL) && + if ((ark_mem->PostProcessStage != NULL) && (step_mem->stagetypes[is] != MRISTAGE_STIFF_ACC)) { - retval = ark_mem->ProcessStage(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1970,7 +1983,7 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt if (step_mem->stagetypes[is] != MRISTAGE_STIFF_ACC) { if ((step_mem->stagetypes[is] != MRISTAGE_ERK_FAST) || - (ark_mem->ProcessStage != NULL)) + (ark_mem->PostProcessStage != NULL)) { retval = mriStepInnerStepper_Reset(step_mem->stepper, tf, ark_mem->ycur); if (retval != ARK_SUCCESS) @@ -2168,6 +2181,19 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt "stage = %i, stage type = %d, tcur = " SUN_FORMAT_G, is, step_mem->stagetypes[is], ark_mem->tcur); + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(t0, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return (ARK_POSTPROCESS_STAGE_FAIL); + } + } + /* Determine final stage type, and call corresponding routine; the vector ark_mem->ycur stores the previous stage solution on input, and should store the result of this stage solution on output. */ @@ -2212,11 +2238,11 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt SUNLogExtraDebugVec(ARK_LOGGER, "slow stage", ark_mem->ycur, "z_%i(:) =", is); /* apply user-supplied stage postprocessing function (if supplied) */ - if ((ark_mem->ProcessStage != NULL) && + if ((ark_mem->PostProcessStage != NULL) && (step_mem->stagetypes[is] != MRISTAGE_STIFF_ACC)) { - retval = ark_mem->ProcessStage(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -2229,7 +2255,7 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt if (step_mem->stagetypes[is] != MRISTAGE_STIFF_ACC) { if ((step_mem->stagetypes[is] != MRISTAGE_ERK_FAST) || - (ark_mem->ProcessStage != NULL)) + (ark_mem->PostProcessStage != NULL)) { retval = mriStepInnerStepper_Reset(step_mem->stepper, tf, ark_mem->ycur); if (retval != ARK_SUCCESS) @@ -2453,6 +2479,19 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) "stage = %i, stage type = %d, tcur = " SUN_FORMAT_G, stage, MRISTAGE_ERK_FAST, ark_mem->tn + cstage * ark_mem->h); + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return (ARK_POSTPROCESS_STAGE_FAIL); + } + } + /* Compute forcing function for inner solver */ retval = mriStep_ComputeInnerForcing(ark_mem, step_mem, stage, ark_mem->tn, ark_mem->tn + cstage * ark_mem->h); @@ -2600,10 +2639,10 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* apply user-supplied stage postprocessing function (if supplied), and reset the inner integrator with the modified stage solution */ - if (ark_mem->ProcessStage != NULL) + if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->ProcessStage(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -2892,6 +2931,19 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) lowest_stage = SUNMIN(lowest_stage, step_mem->MRIC->group[ig][il]); } + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return (ARK_POSTPROCESS_STAGE_FAIL); + } + } + /* Set up fast RHS for this stage group */ retval = mriStep_ComputeInnerForcing(ark_mem, step_mem, lowest_stage, ark_mem->tn, ark_mem->tn + ark_mem->h); @@ -2990,10 +3042,10 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* apply user-supplied stage postprocessing function (if supplied), and reset the inner integrator with the modified stage solution */ - if (ark_mem->ProcessStage != NULL) + if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->ProcessStage(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index cbf88749aa..e187677cbe 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -560,6 +560,19 @@ int sprkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) ark_mem->tn + ci * ark_mem->h, ark_mem->tn + chati * ark_mem->h); SUNLogExtraDebugVec(ARK_LOGGER, "stage", prev_stage, "z2_%i(:) =", is); + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tn + ci * ark_mem->h, prev_stage, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return (ARK_POSTPROCESS_STAGE_FAIL); + } + } + /* evaluate p' with the previous velocity */ if (SUNRabs(ahati) > TINY) { @@ -613,10 +626,10 @@ int sprkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->ProcessStage != NULL) + if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->ProcessStage(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -686,6 +699,19 @@ int sprkStep_TakeStep_Compensated(ARKodeMem ark_mem, sunrealtype* dsmPtr, "stage = %i, t = " SUN_FORMAT_G ", that = " SUN_FORMAT_G, is, ark_mem->tn + ci * ark_mem->h, ark_mem->tn + chati * ark_mem->h); + /* if user-supplied stage preprocessing function, we error out since it + * won't work with the increment form */ + if (ark_mem->PreProcessStage != NULL) + { + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "status = failed preprocess stage, retval = %i", retval); + arkProcessError(ark_mem, ARK_POSTPROCESS_STAGE_FAIL, __LINE__, __func__, + __FILE__, + "Compensated summation is not compatible with stage " + "PreProcessing!\n"); + return (ARK_POSTPROCESS_STAGE_FAIL); + } + /* [ ] + [ ] [ q_n ] + [ \Delta Q_i ] */ N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, yn_plus_delta_Yi); @@ -751,7 +777,7 @@ int sprkStep_TakeStep_Compensated(ARKodeMem ark_mem, sunrealtype* dsmPtr, /* if user-supplied stage postprocessing function, we error out since it * won't work with the increment form */ - if (ark_mem->ProcessStage != NULL) + if (ark_mem->PostProcessStage != NULL) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed postprocess stage, retval = %i", retval); From 9195cdaa92529dded58b83a310fd822ec3eb76e2 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 13 Jan 2026 14:54:42 -0500 Subject: [PATCH 002/298] Regenerated SWIG --- src/arkode/fmod_int32/farkode_mod.c | 42 +++++++++++++++ src/arkode/fmod_int32/farkode_mod.f90 | 78 +++++++++++++++++++++++++++ src/arkode/fmod_int64/farkode_mod.c | 42 +++++++++++++++ src/arkode/fmod_int64/farkode_mod.f90 | 78 +++++++++++++++++++++++++++ 4 files changed, 240 insertions(+) diff --git a/src/arkode/fmod_int32/farkode_mod.c b/src/arkode/fmod_int32/farkode_mod.c index 8f74f81e25..1dcc8ef708 100644 --- a/src/arkode/fmod_int32/farkode_mod.c +++ b/src/arkode/fmod_int32/farkode_mod.c @@ -650,6 +650,20 @@ SWIGEXPORT int _wrap_FARKodeSetUserData(void *farg1, void *farg2) { } +SWIGEXPORT int _wrap_FARKodeSetPreprocessStepFn(void *farg1, ARKPostProcessFn farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + ARKPostProcessFn arg2 = (ARKPostProcessFn) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (ARKPostProcessFn)(farg2); + result = (int)ARKodeSetPreprocessStepFn(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + SWIGEXPORT int _wrap_FARKodeSetPostprocessStepFn(void *farg1, ARKPostProcessFn farg2) { int fresult ; void *arg1 = (void *) 0 ; @@ -664,6 +678,34 @@ SWIGEXPORT int _wrap_FARKodeSetPostprocessStepFn(void *farg1, ARKPostProcessFn f } +SWIGEXPORT int _wrap_FARKodeSetPostprocessStepFailFn(void *farg1, ARKPostProcessFn farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + ARKPostProcessFn arg2 = (ARKPostProcessFn) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (ARKPostProcessFn)(farg2); + result = (int)ARKodeSetPostprocessStepFailFn(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FARKodeSetPreprocessStageFn(void *farg1, ARKPostProcessFn farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + ARKPostProcessFn arg2 = (ARKPostProcessFn) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (ARKPostProcessFn)(farg2); + result = (int)ARKodeSetPreprocessStageFn(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + SWIGEXPORT int _wrap_FARKodeSetPostprocessStageFn(void *farg1, ARKPostProcessFn farg2) { int fresult ; void *arg1 = (void *) 0 ; diff --git a/src/arkode/fmod_int32/farkode_mod.f90 b/src/arkode/fmod_int32/farkode_mod.f90 index 4ccf120bbd..347a826f64 100644 --- a/src/arkode/fmod_int32/farkode_mod.f90 +++ b/src/arkode/fmod_int32/farkode_mod.f90 @@ -145,7 +145,10 @@ module farkode_mod public :: FARKodeSetFixedStep public :: FARKodeSetStepDirection public :: FARKodeSetUserData + public :: FARKodeSetPreprocessStepFn public :: FARKodeSetPostprocessStepFn + public :: FARKodeSetPostprocessStepFailFn + public :: FARKodeSetPreprocessStageFn public :: FARKodeSetPostprocessStageFn public :: FARKodeSetNonlinearSolver public :: FARKodeSetLinear @@ -705,6 +708,15 @@ function swigc_FARKodeSetUserData(farg1, farg2) & integer(C_INT) :: fresult end function +function swigc_FARKodeSetPreprocessStepFn(farg1, farg2) & +bind(C, name="_wrap_FARKodeSetPreprocessStepFn") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_FUNPTR), value :: farg2 +integer(C_INT) :: fresult +end function + function swigc_FARKodeSetPostprocessStepFn(farg1, farg2) & bind(C, name="_wrap_FARKodeSetPostprocessStepFn") & result(fresult) @@ -714,6 +726,24 @@ function swigc_FARKodeSetPostprocessStepFn(farg1, farg2) & integer(C_INT) :: fresult end function +function swigc_FARKodeSetPostprocessStepFailFn(farg1, farg2) & +bind(C, name="_wrap_FARKodeSetPostprocessStepFailFn") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_FUNPTR), value :: farg2 +integer(C_INT) :: fresult +end function + +function swigc_FARKodeSetPreprocessStageFn(farg1, farg2) & +bind(C, name="_wrap_FARKodeSetPreprocessStageFn") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_FUNPTR), value :: farg2 +integer(C_INT) :: fresult +end function + function swigc_FARKodeSetPostprocessStageFn(farg1, farg2) & bind(C, name="_wrap_FARKodeSetPostprocessStageFn") & result(fresult) @@ -2896,6 +2926,22 @@ function FARKodeSetUserData(arkode_mem, user_data) & swig_result = fresult end function +function FARKodeSetPreprocessStepFn(arkode_mem, processstep) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +type(C_FUNPTR), intent(in), value :: processstep +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_FUNPTR) :: farg2 + +farg1 = arkode_mem +farg2 = processstep +fresult = swigc_FARKodeSetPreprocessStepFn(farg1, farg2) +swig_result = fresult +end function + function FARKodeSetPostprocessStepFn(arkode_mem, processstep) & result(swig_result) use, intrinsic :: ISO_C_BINDING @@ -2912,6 +2958,38 @@ function FARKodeSetPostprocessStepFn(arkode_mem, processstep) & swig_result = fresult end function +function FARKodeSetPostprocessStepFailFn(arkode_mem, processstep) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +type(C_FUNPTR), intent(in), value :: processstep +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_FUNPTR) :: farg2 + +farg1 = arkode_mem +farg2 = processstep +fresult = swigc_FARKodeSetPostprocessStepFailFn(farg1, farg2) +swig_result = fresult +end function + +function FARKodeSetPreprocessStageFn(arkode_mem, processstage) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +type(C_FUNPTR), intent(in), value :: processstage +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_FUNPTR) :: farg2 + +farg1 = arkode_mem +farg2 = processstage +fresult = swigc_FARKodeSetPreprocessStageFn(farg1, farg2) +swig_result = fresult +end function + function FARKodeSetPostprocessStageFn(arkode_mem, processstage) & result(swig_result) use, intrinsic :: ISO_C_BINDING diff --git a/src/arkode/fmod_int64/farkode_mod.c b/src/arkode/fmod_int64/farkode_mod.c index b4c8222881..58dc396136 100644 --- a/src/arkode/fmod_int64/farkode_mod.c +++ b/src/arkode/fmod_int64/farkode_mod.c @@ -650,6 +650,20 @@ SWIGEXPORT int _wrap_FARKodeSetUserData(void *farg1, void *farg2) { } +SWIGEXPORT int _wrap_FARKodeSetPreprocessStepFn(void *farg1, ARKPostProcessFn farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + ARKPostProcessFn arg2 = (ARKPostProcessFn) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (ARKPostProcessFn)(farg2); + result = (int)ARKodeSetPreprocessStepFn(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + SWIGEXPORT int _wrap_FARKodeSetPostprocessStepFn(void *farg1, ARKPostProcessFn farg2) { int fresult ; void *arg1 = (void *) 0 ; @@ -664,6 +678,34 @@ SWIGEXPORT int _wrap_FARKodeSetPostprocessStepFn(void *farg1, ARKPostProcessFn f } +SWIGEXPORT int _wrap_FARKodeSetPostprocessStepFailFn(void *farg1, ARKPostProcessFn farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + ARKPostProcessFn arg2 = (ARKPostProcessFn) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (ARKPostProcessFn)(farg2); + result = (int)ARKodeSetPostprocessStepFailFn(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FARKodeSetPreprocessStageFn(void *farg1, ARKPostProcessFn farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + ARKPostProcessFn arg2 = (ARKPostProcessFn) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (ARKPostProcessFn)(farg2); + result = (int)ARKodeSetPreprocessStageFn(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + SWIGEXPORT int _wrap_FARKodeSetPostprocessStageFn(void *farg1, ARKPostProcessFn farg2) { int fresult ; void *arg1 = (void *) 0 ; diff --git a/src/arkode/fmod_int64/farkode_mod.f90 b/src/arkode/fmod_int64/farkode_mod.f90 index e0628131b6..7f90862f55 100644 --- a/src/arkode/fmod_int64/farkode_mod.f90 +++ b/src/arkode/fmod_int64/farkode_mod.f90 @@ -145,7 +145,10 @@ module farkode_mod public :: FARKodeSetFixedStep public :: FARKodeSetStepDirection public :: FARKodeSetUserData + public :: FARKodeSetPreprocessStepFn public :: FARKodeSetPostprocessStepFn + public :: FARKodeSetPostprocessStepFailFn + public :: FARKodeSetPreprocessStageFn public :: FARKodeSetPostprocessStageFn public :: FARKodeSetNonlinearSolver public :: FARKodeSetLinear @@ -705,6 +708,15 @@ function swigc_FARKodeSetUserData(farg1, farg2) & integer(C_INT) :: fresult end function +function swigc_FARKodeSetPreprocessStepFn(farg1, farg2) & +bind(C, name="_wrap_FARKodeSetPreprocessStepFn") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_FUNPTR), value :: farg2 +integer(C_INT) :: fresult +end function + function swigc_FARKodeSetPostprocessStepFn(farg1, farg2) & bind(C, name="_wrap_FARKodeSetPostprocessStepFn") & result(fresult) @@ -714,6 +726,24 @@ function swigc_FARKodeSetPostprocessStepFn(farg1, farg2) & integer(C_INT) :: fresult end function +function swigc_FARKodeSetPostprocessStepFailFn(farg1, farg2) & +bind(C, name="_wrap_FARKodeSetPostprocessStepFailFn") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_FUNPTR), value :: farg2 +integer(C_INT) :: fresult +end function + +function swigc_FARKodeSetPreprocessStageFn(farg1, farg2) & +bind(C, name="_wrap_FARKodeSetPreprocessStageFn") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_FUNPTR), value :: farg2 +integer(C_INT) :: fresult +end function + function swigc_FARKodeSetPostprocessStageFn(farg1, farg2) & bind(C, name="_wrap_FARKodeSetPostprocessStageFn") & result(fresult) @@ -2896,6 +2926,22 @@ function FARKodeSetUserData(arkode_mem, user_data) & swig_result = fresult end function +function FARKodeSetPreprocessStepFn(arkode_mem, processstep) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +type(C_FUNPTR), intent(in), value :: processstep +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_FUNPTR) :: farg2 + +farg1 = arkode_mem +farg2 = processstep +fresult = swigc_FARKodeSetPreprocessStepFn(farg1, farg2) +swig_result = fresult +end function + function FARKodeSetPostprocessStepFn(arkode_mem, processstep) & result(swig_result) use, intrinsic :: ISO_C_BINDING @@ -2912,6 +2958,38 @@ function FARKodeSetPostprocessStepFn(arkode_mem, processstep) & swig_result = fresult end function +function FARKodeSetPostprocessStepFailFn(arkode_mem, processstep) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +type(C_FUNPTR), intent(in), value :: processstep +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_FUNPTR) :: farg2 + +farg1 = arkode_mem +farg2 = processstep +fresult = swigc_FARKodeSetPostprocessStepFailFn(farg1, farg2) +swig_result = fresult +end function + +function FARKodeSetPreprocessStageFn(arkode_mem, processstage) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +type(C_FUNPTR), intent(in), value :: processstage +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_FUNPTR) :: farg2 + +farg1 = arkode_mem +farg2 = processstage +fresult = swigc_FARKodeSetPreprocessStageFn(farg1, farg2) +swig_result = fresult +end function + function FARKodeSetPostprocessStageFn(arkode_mem, processstage) & result(swig_result) use, intrinsic :: ISO_C_BINDING From 876b0168a5d26ad9bbee672298892f83f6dd823c Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 13 Jan 2026 14:55:12 -0500 Subject: [PATCH 003/298] Ran formatter --- src/arkode/arkode.c | 17 +++++----- src/arkode/arkode_erkstep.c | 3 +- src/arkode/arkode_io.c | 14 ++++++--- src/arkode/arkode_lsrkstep.c | 61 +++++++++++++++++++----------------- src/arkode/arkode_mristep.c | 6 ++-- src/arkode/arkode_sprkstep.c | 4 +-- 6 files changed, 58 insertions(+), 47 deletions(-) diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 5095643d58..a4b124cd62 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -906,7 +906,8 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, /* call the user-supplied step preprocessing function (if it exists) */ if (ark_mem->PreProcessStep != NULL) { - retval = ark_mem->PreProcessStep(ark_mem->tcur, ark_mem->ycur, ark_mem->ps_data); + retval = ark_mem->PreProcessStep(ark_mem->tcur, ark_mem->ycur, + ark_mem->ps_data); if (retval != 0) { return (ARK_POSTPROCESS_STEP_FAIL); } } @@ -1010,7 +1011,8 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, /* since the previous step attempt failed, call the user-supplied step failure postprocessing function (if it exists) */ if (ark_mem->PostProcessStepFail != NULL) { - retval = ark_mem->PostProcessStepFail(ark_mem->tcur, ark_mem->ycur, ark_mem->ps_data); + retval = ark_mem->PostProcessStepFail(ark_mem->tcur, ark_mem->ycur, + ark_mem->ps_data); if (retval != 0) { return (ARK_POSTPROCESS_STEP_FAIL); } } @@ -1601,13 +1603,13 @@ ARKodeMem arkCreate(SUNContext sunctx) ark_mem->MallocDone = SUNFALSE; /* No user-supplied step pre- or post-processing functions yet */ - ark_mem->PreProcessStep = NULL; - ark_mem->PostProcessStep = NULL; + ark_mem->PreProcessStep = NULL; + ark_mem->PostProcessStep = NULL; ark_mem->PostProcessStepFail = NULL; - ark_mem->ps_data = NULL; + ark_mem->ps_data = NULL; /* No user-supplied stage pre- or post-processing functions yet */ - ark_mem->PreProcessStage = NULL; + ark_mem->PreProcessStage = NULL; ark_mem->PostProcessStage = NULL; /* No user_data pointer yet */ @@ -2745,7 +2747,8 @@ int arkCompleteStep(ARKodeMem ark_mem, sunrealtype dsm) /* apply user-supplied step postprocessing function (if supplied) */ if (ark_mem->PostProcessStep != NULL) { - retval = ark_mem->PostProcessStep(ark_mem->tcur, ark_mem->ycur, ark_mem->ps_data); + retval = ark_mem->PostProcessStep(ark_mem->tcur, ark_mem->ycur, + ark_mem->ps_data); if (retval != 0) { return (ARK_POSTPROCESS_STEP_FAIL); } } diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index 50552a3d26..1b4c89941a 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -826,7 +826,8 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessStage != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tn + step_mem->B->c[is-1] * ark_mem->h, + retval = ark_mem->PreProcessStage(ark_mem->tn + + step_mem->B->c[is - 1] * ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index 7532eba29e..76383b93c4 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -875,7 +875,10 @@ int ARKodeSetUserData(void* arkode_mem, void* user_data) /* Set data for post-processing a step */ if ((ark_mem->PreProcessStep != NULL) || (ark_mem->PostProcessStep != NULL) || - (ark_mem->PostProcessStepFail != NULL)) { ark_mem->ps_data = user_data; } + (ark_mem->PostProcessStepFail != NULL)) + { + ark_mem->ps_data = user_data; + } /* Set user data into stepper (if provided) */ if (ark_mem->step_setuserdata) @@ -1521,10 +1524,11 @@ int ARKodeSetPreprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep) /* NULL argument sets default, otherwise set inputs */ ark_mem->PreProcessStep = ProcessStep; - ark_mem->ps_data = ark_mem->user_data; + ark_mem->ps_data = ark_mem->user_data; return (ARK_SUCCESS); } + int ARKodeSetPostprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep) { ARKodeMem ark_mem; @@ -1538,10 +1542,11 @@ int ARKodeSetPostprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep) /* NULL argument sets default, otherwise set inputs */ ark_mem->PostProcessStep = ProcessStep; - ark_mem->ps_data = ark_mem->user_data; + ark_mem->ps_data = ark_mem->user_data; return (ARK_SUCCESS); } + int ARKodeSetPostprocessStepFailFn(void* arkode_mem, ARKPostProcessFn ProcessStep) { ARKodeMem ark_mem; @@ -1555,7 +1560,7 @@ int ARKodeSetPostprocessStepFailFn(void* arkode_mem, ARKPostProcessFn ProcessSte /* NULL argument sets default, otherwise set inputs */ ark_mem->PostProcessStepFail = ProcessStep; - ark_mem->ps_data = ark_mem->user_data; + ark_mem->ps_data = ark_mem->user_data; return (ARK_SUCCESS); } @@ -1599,6 +1604,7 @@ int ARKodeSetPreprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStage) return (ARK_SUCCESS); } + int ARKodeSetPostprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStage) { ARKodeMem ark_mem; diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 8cae80fb63..dc39c77989 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -756,7 +756,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (ark_mem->PostProcessStage != NULL && j < step_mem->req_stages) { retval = ark_mem->PostProcessStage(ark_mem->tcur + ark_mem->h * thj, - ark_mem->ycur, ark_mem->user_data); + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1283,8 +1283,9 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessStage != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur + (j-1) * sm1inv * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = + ark_mem->PreProcessStage(ark_mem->tcur + (j - 1) * sm1inv * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "begin-stages-list", @@ -1493,7 +1494,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessStage != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur + (j-1) * rat * ark_mem->h, + retval = ark_mem->PreProcessStage(ark_mem->tcur + (j - 1) * rat * ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -1550,7 +1551,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessStage != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur + (j-1) * rat * ark_mem->h, + retval = ark_mem->PreProcessStage(ark_mem->tcur + (j - 1) * rat * ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -1604,7 +1605,8 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (ark_mem->PreProcessStage != NULL) { retval = ark_mem->PreProcessStage(ark_mem->tcur + - rat * (rn * (rn + ONE) / TWO - ONE) * ark_mem->h, + rat * (rn * (rn + ONE) / TWO - ONE) * + ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -1656,9 +1658,10 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* apply user-supplied stage postprocessing function (if supplied) */ if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->PostProcessStage(ark_mem->tcur + - rat * (rn * (rn - ONE) / TWO) * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = + ark_mem->PostProcessStage(ark_mem->tcur + + rat * (rn * (rn - ONE) / TWO) * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1672,9 +1675,10 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* apply user-supplied stage postprocessing function (if supplied) */ if (ark_mem->PreProcessStage != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur + - ((sunrealtype)j - rn - ONE) * rat * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = + ark_mem->PreProcessStage(ark_mem->tcur + ((sunrealtype)j - rn - ONE) * + rat * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "begin-stages-list", @@ -1712,8 +1716,8 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* apply user-supplied stage postprocessing function (if supplied) */ if (ark_mem->PostProcessStage != NULL && j < step_mem->req_stages) { - retval = ark_mem->PostProcessStage(ark_mem->tcur + - ((sunrealtype)j - rn) * rat * ark_mem->h, + retval = ark_mem->PostProcessStage(ark_mem->tcur + ((sunrealtype)j - rn) * + rat * ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -1834,8 +1838,8 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* apply user-supplied stage postprocessing function (if supplied) */ if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->PostProcessStage(ark_mem->tn + ark_mem->h * p5, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tn + ark_mem->h * p5, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1847,8 +1851,8 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessStage != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur + ark_mem->h * p5, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PreProcessStage(ark_mem->tcur + ark_mem->h * p5, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "begin-stages-list", @@ -1883,8 +1887,8 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* apply user-supplied stage postprocessing function (if supplied) */ if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->PostProcessStage(ark_mem->tcur + ark_mem->h, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur + ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -2042,7 +2046,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt if (retval != 0) { SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -2087,7 +2091,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed postprocess stage, retval = %i", retval); + "status = failed postprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -2098,8 +2102,8 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessStage != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur + - ((sunrealtype)j - ONE) * onesixth * ark_mem->h, + retval = ark_mem->PreProcessStage(ark_mem->tcur + ((sunrealtype)j - ONE) * + onesixth * ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -2147,7 +2151,6 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt return ARK_POSTPROCESS_STAGE_FAIL; } } - } /* no need to call stage preprocessing here, since the stage does not require @@ -2181,13 +2184,13 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* apply user-supplied stage prerocessing function (if supplied) */ if (ark_mem->PreProcessStage != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur + - ((sunrealtype)j - FOUR) * onesixth * ark_mem->h, + retval = ark_mem->PreProcessStage(ark_mem->tcur + ((sunrealtype)j - FOUR) * + onesixth * ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -2227,7 +2230,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt if (ark_mem->PostProcessStage != NULL) { retval = ark_mem->PostProcessStage(ark_mem->tcur + ((sunrealtype)j - THREE) * - onesixth * ark_mem->h, + onesixth * ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 833b068ccf..7731300f48 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1912,8 +1912,7 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessStage != NULL) { - retval = ark_mem->PreProcessStage(t0, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PreProcessStage(t0, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "begin-stages-list", @@ -2184,8 +2183,7 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessStage != NULL) { - retval = ark_mem->PreProcessStage(t0, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PreProcessStage(t0, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "begin-stages-list", diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index e187677cbe..817a805238 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -563,8 +563,8 @@ int sprkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessStage != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tn + ci * ark_mem->h, prev_stage, - ark_mem->user_data); + retval = ark_mem->PreProcessStage(ark_mem->tn + ci * ark_mem->h, + prev_stage, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "begin-stages-list", From 0fa2494d66b031f0ccb20680fafc75dc19db8ad5 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 13 Jan 2026 20:11:09 -0500 Subject: [PATCH 004/298] updated pattern for stage preprocessing in ERKStep --- src/arkode/arkode_erkstep.c | 59 ++++++++++++++++++++++++++++--------- 1 file changed, 45 insertions(+), 14 deletions(-) diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index 1b4c89941a..55e6fba6c6 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -614,6 +614,18 @@ int erkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, /* compute the RHS if needed */ if (!(ark_mem->fn_is_current)) { + + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(t, y, ark_mem->user_data); + if (retval != 0) + { + return (ARK_POSTPROCESS_STAGE_FAIL); + } + } + + /* call f */ retval = step_mem->f(t, y, step_mem->F[0], ark_mem->user_data); step_mem->nfe++; if (retval != 0) @@ -652,6 +664,16 @@ int erkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, /* base RHS call on recomputeRHS argument */ if (recomputeRHS) { + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(t, y, ark_mem->user_data); + if (retval != 0) + { + return (ARK_POSTPROCESS_STAGE_FAIL); + } + } + /* call f */ retval = step_mem->f(t, y, step_mem->F[0], ark_mem->user_data); step_mem->nfe++; @@ -682,6 +704,16 @@ int erkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, case ARK_FULLRHS_OTHER: + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(t, y, ark_mem->user_data); + if (retval != 0) + { + return (ARK_POSTPROCESS_STAGE_FAIL); + } + } + /* call f */ retval = step_mem->f(t, y, f, ark_mem->user_data); step_mem->nfe++; @@ -823,20 +855,6 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, is, ark_mem->tcur); - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) - { - retval = ark_mem->PreProcessStage(ark_mem->tn + - step_mem->B->c[is - 1] * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); - if (retval != 0) - { - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "status = failed preprocess stage, retval = %i", retval); - return (ARK_POSTPROCESS_STAGE_FAIL); - } - } - /* Set ycur to current stage solution */ nvec = 0; for (js = 0; js < is; js++) @@ -883,6 +901,19 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } } + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return (ARK_POSTPROCESS_STAGE_FAIL); + } + } + /* compute updated RHS */ retval = step_mem->f(ark_mem->tcur, ark_mem->ycur, step_mem->F[is], ark_mem->user_data); From c8bf4cb2c3dce8c549e3e11fb12bd89fe2f4907f Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 13 Jan 2026 20:25:13 -0500 Subject: [PATCH 005/298] updated pattern for stage preprocessing in ARKStep --- src/arkode/arkode_arkstep.c | 130 ++++++++++++++++++++++++------------ 1 file changed, 86 insertions(+), 44 deletions(-) diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index c46490a362..906f81e21f 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1330,11 +1330,22 @@ int arkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, /* compute the full RHS */ if (!(ark_mem->fn_is_current)) { - /* compute the explicit component */ - if (step_mem->explicit) + + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) { - retval = step_mem->fe(t, y, step_mem->Fe[0], ark_mem->user_data); - step_mem->nfe++; + retval = ark_mem->PreProcessStage(t, y, ark_mem->user_data); + if (retval != 0) + { + return (ARK_POSTPROCESS_STAGE_FAIL); + } + } + + /* compute the implicit component */ + if (step_mem->implicit) + { + retval = step_mem->fi(t, y, step_mem->Fi[0], ark_mem->user_data); + step_mem->nfi++; if (retval != 0) { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, @@ -1342,10 +1353,10 @@ int arkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, return (ARK_RHSFUNC_FAIL); } - /* compute and store M(t)^{-1} fe */ + /* compute and store M(t)^{-1} fi */ if (step_mem->mass_type == MASS_TIMEDEP) { - retval = step_mem->msolve((void*)ark_mem, step_mem->Fe[0], + retval = step_mem->msolve((void*)ark_mem, step_mem->Fi[0], step_mem->nlscoef / ark_mem->h); if (retval) { @@ -1356,11 +1367,11 @@ int arkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, } } - /* compute the implicit component */ - if (step_mem->implicit) + /* compute the explicit component */ + if (step_mem->explicit) { - retval = step_mem->fi(t, y, step_mem->Fi[0], ark_mem->user_data); - step_mem->nfi++; + retval = step_mem->fe(t, y, step_mem->Fe[0], ark_mem->user_data); + step_mem->nfe++; if (retval != 0) { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, @@ -1368,10 +1379,10 @@ int arkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, return (ARK_RHSFUNC_FAIL); } - /* compute and store M(t)^{-1} fi */ + /* compute and store M(t)^{-1} fe */ if (step_mem->mass_type == MASS_TIMEDEP) { - retval = step_mem->msolve((void*)ark_mem, step_mem->Fi[0], + retval = step_mem->msolve((void*)ark_mem, step_mem->Fe[0], step_mem->nlscoef / ark_mem->h); if (retval) { @@ -1455,11 +1466,22 @@ int arkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, /* recompute RHS functions */ if (recomputeRHS) { - /* compute the explicit component */ - if (step_mem->explicit) + + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) { - retval = step_mem->fe(t, y, step_mem->Fe[0], ark_mem->user_data); - step_mem->nfe++; + retval = ark_mem->PreProcessStage(t, y, ark_mem->user_data); + if (retval != 0) + { + return (ARK_POSTPROCESS_STAGE_FAIL); + } + } + + /* compute the implicit component */ + if (step_mem->implicit) + { + retval = step_mem->fi(t, y, step_mem->Fi[0], ark_mem->user_data); + step_mem->nfi++; if (retval != 0) { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, @@ -1470,7 +1492,7 @@ int arkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, /* compute and store M(t)^{-1} fi */ if (step_mem->mass_type == MASS_TIMEDEP) { - retval = step_mem->msolve((void*)ark_mem, step_mem->Fe[0], + retval = step_mem->msolve((void*)ark_mem, step_mem->Fi[0], step_mem->nlscoef / ark_mem->h); if (retval) { @@ -1481,11 +1503,11 @@ int arkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, } } - /* compute the implicit component */ - if (step_mem->implicit) + /* compute the explicit component */ + if (step_mem->explicit) { - retval = step_mem->fi(t, y, step_mem->Fi[0], ark_mem->user_data); - step_mem->nfi++; + retval = step_mem->fe(t, y, step_mem->Fe[0], ark_mem->user_data); + step_mem->nfe++; if (retval != 0) { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, @@ -1496,7 +1518,7 @@ int arkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, /* compute and store M(t)^{-1} fi */ if (step_mem->mass_type == MASS_TIMEDEP) { - retval = step_mem->msolve((void*)ark_mem, step_mem->Fi[0], + retval = step_mem->msolve((void*)ark_mem, step_mem->Fe[0], step_mem->nlscoef / ark_mem->h); if (retval) { @@ -1564,16 +1586,13 @@ int arkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, case ARK_FULLRHS_OTHER: - /* compute the explicit component and store in ark_tempv2 */ - if (step_mem->explicit) + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) { - retval = step_mem->fe(t, y, ark_mem->tempv2, ark_mem->user_data); - step_mem->nfe++; + retval = ark_mem->PreProcessStage(t, y, ark_mem->user_data); if (retval != 0) { - arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, __FILE__, - MSG_ARK_RHSFUNC_FAILED, t); - return (ARK_RHSFUNC_FAIL); + return (ARK_POSTPROCESS_STAGE_FAIL); } } @@ -1590,6 +1609,19 @@ int arkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, } } + /* compute the explicit component and store in ark_tempv2 */ + if (step_mem->explicit) + { + retval = step_mem->fe(t, y, ark_mem->tempv2, ark_mem->user_data); + step_mem->nfe++; + if (retval != 0) + { + arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, __FILE__, + MSG_ARK_RHSFUNC_FAILED, t); + return (ARK_RHSFUNC_FAIL); + } + } + /* combine RHS vector(s) into output */ if (step_mem->explicit && step_mem->implicit) { /* ImEx */ @@ -1845,6 +1877,16 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } else { + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->yn, + ark_mem->user_data); + if (retval != 0) + { + return (ARK_POSTPROCESS_STAGE_FAIL); + } + } retval = step_mem->fi(ark_mem->tn, ark_mem->yn, step_mem->Fi[0], ark_mem->user_data); step_mem->nfi++; @@ -1917,21 +1959,6 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) "stage = %i, implicit = %i, tcur = " SUN_FORMAT_G, is, implicit_stage, ark_mem->tcur); - /* apply user-supplied stage preprocessing function (if supplied) */ - /* NOTE: with internally inconsistent IMEX methods (c_i^E != c_i^I) the value - of tcur corresponds to the stage time from the implicit table (c_i^I). */ - if (ark_mem->PreProcessStage != NULL) - { - retval = ark_mem->PreProcessStage(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); - if (retval != 0) - { - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "status = failed preprocess stage, retval = %i", retval); - return (ARK_POSTPROCESS_STAGE_FAIL); - } - } - /* setup time-dependent mass matrix */ if ((step_mem->mass_type == MASS_TIMEDEP) && (step_mem->msetup != NULL)) { @@ -2083,6 +2110,21 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } } + /* apply user-supplied stage preprocessing function (if supplied) */ + /* NOTE: with internally inconsistent IMEX methods (c_i^E != c_i^I) the value + of tcur corresponds to the stage time from the implicit table (c_i^I). */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return (ARK_POSTPROCESS_STAGE_FAIL); + } + } + /* store implicit RHS (value in Fi[is] is from preceding nonlinear iteration) */ if (step_mem->implicit) { From 4b24a20e6e9f5bec0fcd6bf9f725064c13a35266 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 13 Jan 2026 20:32:35 -0500 Subject: [PATCH 006/298] updated pattern for stage preprocessing in SPRKStep --- src/arkode/arkode_sprkstep.c | 81 +++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 39 deletions(-) diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index 817a805238..912a6459c5 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -560,25 +560,26 @@ int sprkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) ark_mem->tn + ci * ark_mem->h, ark_mem->tn + chati * ark_mem->h); SUNLogExtraDebugVec(ARK_LOGGER, "stage", prev_stage, "z2_%i(:) =", is); - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) - { - retval = ark_mem->PreProcessStage(ark_mem->tn + ci * ark_mem->h, - prev_stage, ark_mem->user_data); - if (retval != 0) - { - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "status = failed preprocess stage, retval = %i", retval); - return (ARK_POSTPROCESS_STAGE_FAIL); - } - } - /* evaluate p' with the previous velocity */ if (SUNRabs(ahati) > TINY) { N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tn + chati * ark_mem->h, + prev_stage, ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return (ARK_POSTPROCESS_STAGE_FAIL); + } + } + + /* evaluate p' */ retval = sprkStep_f1(step_mem, ark_mem->tn + chati * ark_mem->h, prev_stage, step_mem->sdata, ark_mem->user_data); @@ -608,6 +609,20 @@ int sprkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tn + ci * ark_mem->h, + curr_stage, ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return (ARK_POSTPROCESS_STAGE_FAIL); + } + } + + /* evaluate q' */ retval = sprkStep_f2(step_mem, ark_mem->tn + ci * ark_mem->h, curr_stage, step_mem->sdata, ark_mem->user_data); @@ -682,6 +697,20 @@ int sprkStep_TakeStep_Compensated(ARKodeMem ark_mem, sunrealtype* dsmPtr, [ \Delta Q_0 ] = [ 0 ] */ N_VConst(ZERO, delta_Yi); + /* if user-supplied stage preprocessing or postprocessing functions, + * we error out since those won't work with the increment form */ + if ((ark_mem->PreProcessStage != NULL) || (ark_mem->PostProcessStage != NULL)) + { + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "status = failed stage stage processing, retval = %i", + ARK_POSTPROCESS_STAGE_FAIL); + arkProcessError(ark_mem, ARK_POSTPROCESS_STAGE_FAIL, __LINE__, __func__, + __FILE__, + "Compensated summation is not compatible with stage " + "Pre- or PostProcessing!\n"); + return (ARK_POSTPROCESS_STAGE_FAIL); + } + /* loop over internal stages to the step */ for (is = 0; is < step_mem->method->stages; is++) { @@ -699,19 +728,6 @@ int sprkStep_TakeStep_Compensated(ARKodeMem ark_mem, sunrealtype* dsmPtr, "stage = %i, t = " SUN_FORMAT_G ", that = " SUN_FORMAT_G, is, ark_mem->tn + ci * ark_mem->h, ark_mem->tn + chati * ark_mem->h); - /* if user-supplied stage preprocessing function, we error out since it - * won't work with the increment form */ - if (ark_mem->PreProcessStage != NULL) - { - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "status = failed preprocess stage, retval = %i", retval); - arkProcessError(ark_mem, ARK_POSTPROCESS_STAGE_FAIL, __LINE__, __func__, - __FILE__, - "Compensated summation is not compatible with stage " - "PreProcessing!\n"); - return (ARK_POSTPROCESS_STAGE_FAIL); - } - /* [ ] + [ ] [ q_n ] + [ \Delta Q_i ] */ N_VLinearSum(ONE, ark_mem->yn, ONE, delta_Yi, yn_plus_delta_Yi); @@ -775,19 +791,6 @@ int sprkStep_TakeStep_Compensated(ARKodeMem ark_mem, sunrealtype* dsmPtr, N_VLinearSum(ONE, delta_Yi, ark_mem->h * ai, step_mem->sdata, delta_Yi); } - /* if user-supplied stage postprocessing function, we error out since it - * won't work with the increment form */ - if (ark_mem->PostProcessStage != NULL) - { - SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed postprocess stage, retval = %i", retval); - arkProcessError(ark_mem, ARK_POSTPROCESS_STAGE_FAIL, __LINE__, __func__, - __FILE__, - "Compensated summation is not compatible with stage " - "PostProcessing!\n"); - return (ARK_POSTPROCESS_STAGE_FAIL); - } - SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); } From e16f6f26b0dde460a9c22c5c62430a86bb6d6639 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 13 Jan 2026 20:34:52 -0500 Subject: [PATCH 007/298] updated pattern for stage preprocessing in SPRKStep --- src/arkode/arkode_sprkstep.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index 912a6459c5..08f9bf8eca 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -492,6 +492,16 @@ int sprkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, case ARK_FULLRHS_END: case ARK_FULLRHS_OTHER: + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(t, y, ark_mem->user_data); + if (retval != 0) + { + return (ARK_POSTPROCESS_STAGE_FAIL); + } + } + /* Since f1 and f2 do not have overlapping outputs and so the f vector is passed to both RHS functions. */ From 0e0b8d27df0119b543253eb0b9c39d8aec8e993a Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 13 Jan 2026 20:48:57 -0500 Subject: [PATCH 008/298] updated pattern for stage preprocessing in MRIStep; fixed ordering of RHS calls for ImEx methods so that fsi always precedes fse (as with ARKStep) --- src/arkode/arkode_mristep.c | 345 ++++++++++++++++++++---------------- 1 file changed, 190 insertions(+), 155 deletions(-) diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 7731300f48..01a8bb9ac6 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1476,20 +1476,14 @@ int mriStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, step_mem->Xvecs[nvec] = f; nvec++; - /* compute the explicit component and store in ark_tempv2 */ - if (step_mem->explicit_rhs) + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) { - retval = step_mem->fse(t, y, ark_mem->tempv2, ark_mem->user_data); - step_mem->nfse++; + retval = ark_mem->PreProcessStage(t, y, ark_mem->user_data); if (retval != 0) { - arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, __FILE__, - MSG_ARK_RHSFUNC_FAILED, t); - return (ARK_RHSFUNC_FAIL); + return (ARK_POSTPROCESS_STAGE_FAIL); } - step_mem->cvals[nvec] = ONE; - step_mem->Xvecs[nvec] = ark_mem->tempv2; - nvec++; } /* compute the implicit component and store in sdata */ @@ -1508,6 +1502,22 @@ int mriStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, nvec++; } + /* compute the explicit component and store in ark_tempv2 */ + if (step_mem->explicit_rhs) + { + retval = step_mem->fse(t, y, ark_mem->tempv2, ark_mem->user_data); + step_mem->nfse++; + if (retval != 0) + { + arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, __FILE__, + MSG_ARK_RHSFUNC_FAILED, t); + return (ARK_RHSFUNC_FAIL); + } + step_mem->cvals[nvec] = ONE; + step_mem->Xvecs[nvec] = ark_mem->tempv2; + nvec++; + } + /* Add external forcing components to linear combination */ if (step_mem->expforcing || step_mem->impforcing) { @@ -1597,32 +1607,15 @@ int mriStep_UpdateF0(ARKodeMem ark_mem, ARKodeMRIStepMem step_mem, /* update the RHS components */ - /* explicit component */ - if (step_mem->explicit_rhs) + /* apply user-supplied stage preprocessing function (if supplied) */ + if ((ark_mem->PreProcessStage != NULL) && + ((!step_mem->fse_is_current || !ark_mem->fn_is_current) || + (!step_mem->fsi_is_current || !ark_mem->fn_is_current))) { - /* if either ARKODE or MRIStep consider Fse[0] stale, then recompute */ - if (!step_mem->fse_is_current || !ark_mem->fn_is_current) + retval = ark_mem->PreProcessStage(t, y, ark_mem->user_data); + if (retval != 0) { - retval = step_mem->fse(t, y, step_mem->Fse[0], ark_mem->user_data); - step_mem->nfse++; - if (retval != 0) - { - arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, - __FILE__, MSG_ARK_RHSFUNC_FAILED, t); - return (ARK_RHSFUNC_FAIL); - } - step_mem->fse_is_current = SUNTRUE; - - /* Add external forcing, if applicable */ - if (step_mem->expforcing) - { - step_mem->cvals[0] = ONE; - step_mem->Xvecs[0] = step_mem->Fse[0]; - nvec = 1; - mriStep_ApplyForcing(step_mem, t, ONE, &nvec); - N_VLinearCombination(nvec, step_mem->cvals, step_mem->Xvecs, - step_mem->Fse[0]); - } + return (ARK_POSTPROCESS_STAGE_FAIL); } } @@ -1655,15 +1648,11 @@ int mriStep_UpdateF0(ARKodeMem ark_mem, ARKodeMRIStepMem step_mem, } } - break; - - case ARK_FULLRHS_END: - - /* compute the full RHS */ - if (!(ark_mem->fn_is_current)) + /* explicit component */ + if (step_mem->explicit_rhs) { - /* compute the explicit component */ - if (step_mem->explicit_rhs) + /* if either ARKODE or MRIStep consider Fse[0] stale, then recompute */ + if (!step_mem->fse_is_current || !ark_mem->fn_is_current) { retval = step_mem->fse(t, y, step_mem->Fse[0], ark_mem->user_data); step_mem->nfse++; @@ -1675,7 +1664,7 @@ int mriStep_UpdateF0(ARKodeMem ark_mem, ARKodeMRIStepMem step_mem, } step_mem->fse_is_current = SUNTRUE; - /* Add external forcing, as appropriate */ + /* Add external forcing, if applicable */ if (step_mem->expforcing) { step_mem->cvals[0] = ONE; @@ -1686,6 +1675,25 @@ int mriStep_UpdateF0(ARKodeMem ark_mem, ARKodeMRIStepMem step_mem, step_mem->Fse[0]); } } + } + + break; + + case ARK_FULLRHS_END: + + /* compute the full RHS */ + if (!(ark_mem->fn_is_current)) + { + + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(t, y, ark_mem->user_data); + if (retval != 0) + { + return (ARK_POSTPROCESS_STAGE_FAIL); + } + } /* compute the implicit component */ if (step_mem->implicit_rhs) @@ -1711,6 +1719,32 @@ int mriStep_UpdateF0(ARKodeMem ark_mem, ARKodeMRIStepMem step_mem, step_mem->Fsi[0]); } } + + /* compute the explicit component */ + if (step_mem->explicit_rhs) + { + retval = step_mem->fse(t, y, step_mem->Fse[0], ark_mem->user_data); + step_mem->nfse++; + if (retval != 0) + { + arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, + __FILE__, MSG_ARK_RHSFUNC_FAILED, t); + return (ARK_RHSFUNC_FAIL); + } + step_mem->fse_is_current = SUNTRUE; + + /* Add external forcing, as appropriate */ + if (step_mem->expforcing) + { + step_mem->cvals[0] = ONE; + step_mem->Xvecs[0] = step_mem->Fse[0]; + nvec = 1; + mriStep_ApplyForcing(step_mem, t, ONE, &nvec); + N_VLinearCombination(nvec, step_mem->cvals, step_mem->Xvecs, + step_mem->Fse[0]); + } + } + } break; @@ -1909,18 +1943,6 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt "stage = %i, stage type = %d, tcur = " SUN_FORMAT_G, is, step_mem->stagetypes[is], ark_mem->tcur); - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) - { - retval = ark_mem->PreProcessStage(t0, ark_mem->ycur, ark_mem->user_data); - if (retval != 0) - { - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "status = failed preprocess stage, retval = %i", retval); - return (ARK_POSTPROCESS_STAGE_FAIL); - } - } - /* Determine current stage type, and call corresponding routine; the vector ark_mem->ycur stores the previous stage solution on input, and should store the result of this stage solution on output. */ @@ -2007,32 +2029,17 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } if (calc_fslow) { - /* store explicit slow rhs */ - if (step_mem->explicit_rhs) - { - retval = step_mem->fse(ark_mem->tcur, ark_mem->ycur, - step_mem->Fse[step_mem->stage_map[is]], - ark_mem->user_data); - step_mem->nfse++; - - SUNLogExtraDebugVec(ARK_LOGGER, "slow explicit RHS", - step_mem->Fse[step_mem->stage_map[is]], - "Fse_%i(:) =", is); - SUNLogInfoIf(retval != 0, ARK_LOGGER, "end-stages-list", - "status = failed explicit rhs eval, retval = %i", retval); - if (retval < 0) { return (ARK_RHSFUNC_FAIL); } - if (retval > 0) { return (ARK_UNREC_RHSFUNC_ERR); } - - /* Add external forcing to Fse, if applicable */ - if (step_mem->expforcing) + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) { - step_mem->cvals[0] = ONE; - step_mem->Xvecs[0] = step_mem->Fse[step_mem->stage_map[is]]; - nvec = 1; - mriStep_ApplyForcing(step_mem, tf, ONE, &nvec); - N_VLinearCombination(nvec, step_mem->cvals, step_mem->Xvecs, - step_mem->Fse[step_mem->stage_map[is]]); + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return (ARK_POSTPROCESS_STAGE_FAIL); } } @@ -2078,6 +2085,35 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt "Fsi_%i(:) =", is); } } + + /* store explicit slow rhs */ + if (step_mem->explicit_rhs) + { + retval = step_mem->fse(ark_mem->tcur, ark_mem->ycur, + step_mem->Fse[step_mem->stage_map[is]], + ark_mem->user_data); + step_mem->nfse++; + + SUNLogExtraDebugVec(ARK_LOGGER, "slow explicit RHS", + step_mem->Fse[step_mem->stage_map[is]], + "Fse_%i(:) =", is); + SUNLogInfoIf(retval != 0, ARK_LOGGER, "end-stages-list", + "status = failed explicit rhs eval, retval = %i", retval); + + if (retval < 0) { return (ARK_RHSFUNC_FAIL); } + if (retval > 0) { return (ARK_UNREC_RHSFUNC_ERR); } + + /* Add external forcing to Fse, if applicable */ + if (step_mem->expforcing) + { + step_mem->cvals[0] = ONE; + step_mem->Xvecs[0] = step_mem->Fse[step_mem->stage_map[is]]; + nvec = 1; + mriStep_ApplyForcing(step_mem, tf, ONE, &nvec); + N_VLinearCombination(nvec, step_mem->cvals, step_mem->Xvecs, + step_mem->Fse[step_mem->stage_map[is]]); + } + } } /* compute slow RHS */ SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); @@ -2180,18 +2216,6 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt "stage = %i, stage type = %d, tcur = " SUN_FORMAT_G, is, step_mem->stagetypes[is], ark_mem->tcur); - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) - { - retval = ark_mem->PreProcessStage(t0, ark_mem->ycur, ark_mem->user_data); - if (retval != 0) - { - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "status = failed preprocess stage, retval = %i", retval); - return (ARK_POSTPROCESS_STAGE_FAIL); - } - } - /* Determine final stage type, and call corresponding routine; the vector ark_mem->ycur stores the previous stage solution on input, and should store the result of this stage solution on output. */ @@ -2477,19 +2501,6 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) "stage = %i, stage type = %d, tcur = " SUN_FORMAT_G, stage, MRISTAGE_ERK_FAST, ark_mem->tn + cstage * ark_mem->h); - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) - { - retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->ycur, - ark_mem->user_data); - if (retval != 0) - { - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "status = failed preprocess stage, retval = %i", retval); - return (ARK_POSTPROCESS_STAGE_FAIL); - } - } - /* Compute forcing function for inner solver */ retval = mriStep_ComputeInnerForcing(ark_mem, step_mem, stage, ark_mem->tn, ark_mem->tn + cstage * ark_mem->h); @@ -2662,30 +2673,17 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Compute updated slow RHS (except for final solution or embedding) */ if ((!solution) && (!embedding)) { - /* store explicit slow rhs */ - if (step_mem->explicit_rhs) - { - retval = step_mem->fse(ark_mem->tcur, ark_mem->ycur, - step_mem->Fse[stage], ark_mem->user_data); - step_mem->nfse++; - - SUNLogExtraDebugVec(ARK_LOGGER, "slow explicit RHS", - step_mem->Fse[stage], "Fse_%i(:) =", stage); - SUNLogInfoIf(retval != 0, ARK_LOGGER, "end-stages-list", - "status = failed explicit rhs eval, retval = %i", retval); - - if (retval < 0) { return (ARK_RHSFUNC_FAIL); } - if (retval > 0) { return (ARK_UNREC_RHSFUNC_ERR); } - /* Add external forcing to Fse[stage], if applicable */ - if (step_mem->expforcing) + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) { - step_mem->cvals[0] = ONE; - step_mem->Xvecs[0] = step_mem->Fse[stage]; - nvec = 1; - mriStep_ApplyForcing(step_mem, ark_mem->tcur, ONE, &nvec); - N_VLinearCombination(nvec, step_mem->cvals, step_mem->Xvecs, - step_mem->Fse[stage]); + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return (ARK_POSTPROCESS_STAGE_FAIL); } } @@ -2728,6 +2726,33 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } } + /* store explicit slow rhs */ + if (step_mem->explicit_rhs) + { + retval = step_mem->fse(ark_mem->tcur, ark_mem->ycur, + step_mem->Fse[stage], ark_mem->user_data); + step_mem->nfse++; + + SUNLogExtraDebugVec(ARK_LOGGER, "slow explicit RHS", + step_mem->Fse[stage], "Fse_%i(:) =", stage); + SUNLogInfoIf(retval != 0, ARK_LOGGER, "end-stages-list", + "status = failed explicit rhs eval, retval = %i", retval); + + if (retval < 0) { return (ARK_RHSFUNC_FAIL); } + if (retval > 0) { return (ARK_UNREC_RHSFUNC_ERR); } + + /* Add external forcing to Fse[stage], if applicable */ + if (step_mem->expforcing) + { + step_mem->cvals[0] = ONE; + step_mem->Xvecs[0] = step_mem->Fse[stage]; + nvec = 1; + mriStep_ApplyForcing(step_mem, ark_mem->tcur, ONE, &nvec); + N_VLinearCombination(nvec, step_mem->cvals, step_mem->Xvecs, + step_mem->Fse[stage]); + } + } + /* combine both RHS into Fse for ImEx problems since fast forcing function only depends on Omega coefficients */ if (step_mem->implicit_rhs && step_mem->explicit_rhs) @@ -2929,19 +2954,6 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) lowest_stage = SUNMIN(lowest_stage, step_mem->MRIC->group[ig][il]); } - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) - { - retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->ycur, - ark_mem->user_data); - if (retval != 0) - { - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "status = failed preprocess stage, retval = %i", retval); - return (ARK_POSTPROCESS_STAGE_FAIL); - } - } - /* Set up fast RHS for this stage group */ retval = mriStep_ComputeInnerForcing(ark_mem, step_mem, lowest_stage, ark_mem->tn, ark_mem->tn + ark_mem->h); @@ -3070,6 +3082,19 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Compute updated slow RHS (except for final solution or embedding) */ if ((!solution) && (!embedding)) { + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return (ARK_POSTPROCESS_STAGE_FAIL); + } + } + /* store explicit slow rhs */ retval = step_mem->fse(ark_mem->tcur, ark_mem->ycur, step_mem->Fse[stage], ark_mem->user_data); @@ -4216,12 +4241,22 @@ int mriStep_SlowRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, retval = mriStep_AccessStepMem(ark_mem, __func__, &step_mem); if (retval != ARK_SUCCESS) { return (retval); } - /* call fse if the problem has an explicit component */ - if (step_mem->explicit_rhs) + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) { - retval = step_mem->fse(t, y, step_mem->Fse[0], ark_mem->user_data); - step_mem->nfse++; - step_mem->fse_is_current = SUNTRUE; + retval = ark_mem->PreProcessStage(t, y, ark_mem->user_data); + if (retval != 0) + { + return (ARK_POSTPROCESS_STAGE_FAIL); + } + } + + /* call fsi if the problem has an implicit component */ + if (step_mem->implicit_rhs) + { + retval = step_mem->fsi(t, y, step_mem->Fsi[0], ark_mem->user_data); + step_mem->nfsi++; + step_mem->fsi_is_current = SUNTRUE; if (retval != 0) { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, __FILE__, @@ -4230,23 +4265,23 @@ int mriStep_SlowRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, } /* Add external forcing, if applicable */ - if (step_mem->expforcing) + if (step_mem->impforcing) { step_mem->cvals[0] = ONE; - step_mem->Xvecs[0] = step_mem->Fse[0]; + step_mem->Xvecs[0] = step_mem->Fsi[0]; nvec = 1; mriStep_ApplyForcing(step_mem, t, ONE, &nvec); N_VLinearCombination(nvec, step_mem->cvals, step_mem->Xvecs, - step_mem->Fse[0]); + step_mem->Fsi[0]); } } - /* call fsi if the problem has an implicit component */ - if (step_mem->implicit_rhs) + /* call fse if the problem has an explicit component */ + if (step_mem->explicit_rhs) { - retval = step_mem->fsi(t, y, step_mem->Fsi[0], ark_mem->user_data); - step_mem->nfsi++; - step_mem->fsi_is_current = SUNTRUE; + retval = step_mem->fse(t, y, step_mem->Fse[0], ark_mem->user_data); + step_mem->nfse++; + step_mem->fse_is_current = SUNTRUE; if (retval != 0) { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, __FILE__, @@ -4255,14 +4290,14 @@ int mriStep_SlowRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, } /* Add external forcing, if applicable */ - if (step_mem->impforcing) + if (step_mem->expforcing) { step_mem->cvals[0] = ONE; - step_mem->Xvecs[0] = step_mem->Fsi[0]; + step_mem->Xvecs[0] = step_mem->Fse[0]; nvec = 1; mriStep_ApplyForcing(step_mem, t, ONE, &nvec); N_VLinearCombination(nvec, step_mem->cvals, step_mem->Xvecs, - step_mem->Fsi[0]); + step_mem->Fse[0]); } } From 84f706b81ed77cecd4f27b4db1f1ee86e1c6369b Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 13 Jan 2026 21:22:15 -0500 Subject: [PATCH 009/298] updated pattern for stage preprocessing in LSRKStep --- src/arkode/arkode_lsrkstep.c | 393 ++++++++++++++++++++++------------- 1 file changed, 252 insertions(+), 141 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index dc39c77989..ced04e8abf 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -451,6 +451,15 @@ int lsrkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, /* compute the RHS */ if (!ark_mem->fn_is_current) { + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(t, y, ark_mem->user_data); + if (retval != 0) + { + return (ARK_POSTPROCESS_STAGE_FAIL); + } + } retval = step_mem->fe(t, y, f, ark_mem->user_data); step_mem->nfe++; if (retval != 0) @@ -470,6 +479,15 @@ int lsrkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, ark_mem->fn_is_current is changed by ARKODE. */ if (step_mem->is_SSP) { + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(t, y, ark_mem->user_data); + if (retval != 0) + { + return (ARK_POSTPROCESS_STAGE_FAIL); + } + } retval = step_mem->fe(t, y, ark_mem->fn, ark_mem->user_data); step_mem->nfe++; ark_mem->fn_is_current = SUNTRUE; @@ -486,6 +504,16 @@ int lsrkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, case ARK_FULLRHS_OTHER: + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(t, y, ark_mem->user_data); + if (retval != 0) + { + return (ARK_POSTPROCESS_STAGE_FAIL); + } + } + /* call f */ retval = step_mem->fe(t, y, f, ark_mem->user_data); step_mem->nfe++; @@ -610,6 +638,21 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if ((!ark_mem->fn_is_current && ark_mem->initsetup) || (step_mem->step_nst != ark_mem->nst)) { + + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->yn, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + + /* call fe */ retval = step_mem->fe(ark_mem->tn, ark_mem->yn, ark_mem->fn, ark_mem->user_data); step_mem->nfe++; @@ -641,19 +684,6 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) bjm1 = ONE / SUNSQR(TWO * w0); bjm2 = bjm1; - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) - { - retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->yn, - ark_mem->user_data); - if (retval != 0) - { - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "status = failed preprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; - } - } - /* Evaluate the first stage */ N_VScale(ONE, ark_mem->yn, ark_mem->tempv1); @@ -705,8 +735,8 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) ark_mem->tempv2, ark_mem->user_data); if (retval != 0) { - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "status = failed preprocess stage, retval = %i", retval); + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -795,6 +825,19 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Compute yerr (if step adaptivity enabled) */ if (!ark_mem->fixedstep) { + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tcur + ark_mem->h, + ark_mem->ycur, ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + retval = step_mem->fe(ark_mem->tcur + ark_mem->h, ark_mem->ycur, ark_mem->tempv2, ark_mem->user_data); step_mem->nfe++; @@ -828,6 +871,19 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } else { + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tcur + ark_mem->h, + ark_mem->ycur, ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + retval = step_mem->fe(ark_mem->tcur + ark_mem->h, ark_mem->ycur, ark_mem->tempv2, ark_mem->user_data); step_mem->nfe++; @@ -948,23 +1004,22 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) "stage = %i, tcur = " SUN_FORMAT_G, 0, ark_mem->tcur); SUNLogExtraDebugVec(ARK_LOGGER, "stage", ark_mem->yn, "z_0(:) ="); - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) - { - retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->yn, - ark_mem->user_data); - if (retval != 0) - { - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "status = failed preprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; - } - } - /* Compute RHS function, if necessary. */ if ((!ark_mem->fn_is_current && ark_mem->initsetup) || (step_mem->step_nst != ark_mem->nst)) { + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->yn, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } retval = step_mem->fe(ark_mem->tn, ark_mem->yn, ark_mem->fn, ark_mem->user_data); step_mem->nfe++; @@ -1031,8 +1086,8 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) ark_mem->tempv2, ark_mem->user_data); if (retval != 0) { - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "status = failed preprocess stage, retval = %i", retval); + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -1107,20 +1162,33 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogExtraDebugVec(ARK_LOGGER, "updated solution", ark_mem->ycur, "ycur(:) ="); SUNLogInfo(ARK_LOGGER, "begin-compute-embedding", ""); - /* Compute yerr (if step adaptivity enabled) */ - if (!ark_mem->fixedstep) + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) { - retval = step_mem->fe(ark_mem->tcur + ark_mem->h, ark_mem->ycur, - ark_mem->tempv2, ark_mem->user_data); - step_mem->nfe++; + retval = ark_mem->PreProcessStage(ark_mem->tcur + ark_mem->h, + ark_mem->ycur, ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } - SUNLogExtraDebugVec(ARK_LOGGER, "solution RHS", ark_mem->tempv2, "F_n(:) ="); - SUNLogInfoIf(retval != 0, ARK_LOGGER, "end-compute-embedding", - "status = failed rhs eval, retval = %i", retval); + retval = step_mem->fe(ark_mem->tcur + ark_mem->h, ark_mem->ycur, + ark_mem->tempv2, ark_mem->user_data); + step_mem->nfe++; - if (retval < 0) { return ARK_RHSFUNC_FAIL; } - if (retval > 0) { return RHSFUNC_RECVR; } + SUNLogExtraDebugVec(ARK_LOGGER, "solution RHS", ark_mem->tempv2, "F_n(:) ="); + SUNLogInfoIf(retval != 0, ARK_LOGGER, "end-compute-embedding", + "status = failed rhs eval, retval = %i", retval); + if (retval < 0) { return ARK_RHSFUNC_FAIL; } + if (retval > 0) { return RHSFUNC_RECVR; } + + /* Compute yerr (if step adaptivity enabled) */ + if (!ark_mem->fixedstep) + { /* Estimate the local error and compute its weighted RMS norm */ cvals[0] = p8; Xvecs[0] = ark_mem->yn; @@ -1143,17 +1211,6 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } else { - retval = step_mem->fe(ark_mem->tcur + ark_mem->h, ark_mem->ycur, - ark_mem->tempv2, ark_mem->user_data); - step_mem->nfe++; - - SUNLogExtraDebugVec(ARK_LOGGER, "solution RHS", ark_mem->tempv2, "F_n(:) ="); - SUNLogInfoIf(retval != 0, ARK_LOGGER, "end-compute-embedding", - "status = failed rhs eval, retval = %i", retval); - - if (retval < 0) { return ARK_RHSFUNC_FAIL; } - if (retval > 0) { return RHSFUNC_RECVR; } - lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr); } @@ -1218,19 +1275,6 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr bt3 = (rs - ONE) / (rs * rs); } - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) - { - retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->yn, - ark_mem->user_data); - if (retval != 0) - { - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "status = failed preprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; - } - } - SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 0, ark_mem->tcur); SUNLogExtraDebugVec(ARK_LOGGER, "stage", ark_mem->yn, "z_0(:) ="); @@ -1239,6 +1283,19 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr of the step unless a renewed step or ARKODE updated fn. */ if (!ark_mem->fn_is_current) { + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->yn, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + retval = step_mem->fe(ark_mem->tn, ark_mem->yn, ark_mem->fn, ark_mem->user_data); step_mem->nfe++; @@ -1280,16 +1337,16 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Evaluate stages j = 2,...,step_mem->req_stages - 1 */ for (int j = 2; j < step_mem->req_stages; j++) { + /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessStage != NULL) { - retval = - ark_mem->PreProcessStage(ark_mem->tcur + (j - 1) * sm1inv * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreProcessStage(ark_mem->tcur + ((sunrealtype)j - ONE) * sm1inv * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "status = failed preprocess stage, retval = %i", retval); + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -1335,6 +1392,18 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* Evaluate the last stage for j = step_mem->req_stages */ + + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tcur + ark_mem->h, + ark_mem->ycur, ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } retval = step_mem->fe(ark_mem->tcur + ark_mem->h, ark_mem->ycur, ark_mem->tempv2, ark_mem->user_data); step_mem->nfe++; @@ -1434,23 +1503,23 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr "stage = %i, tcur = " SUN_FORMAT_G, 0, ark_mem->tcur); SUNLogExtraDebugVec(ARK_LOGGER, "stage", ark_mem->yn, "z_0(:) ="); - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) - { - retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->yn, - ark_mem->user_data); - if (retval != 0) - { - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "status = failed preprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; - } - } - /* The method is not FSAL. Therefore, fn ​is computed at the beginning of the step unless ARKODE updated fn. */ if (!ark_mem->fn_is_current) { + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->yn, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + retval = step_mem->fe(ark_mem->tn, ark_mem->yn, ark_mem->fn, ark_mem->user_data); step_mem->nfe++; @@ -1494,12 +1563,12 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessStage != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur + (j - 1) * rat * ark_mem->h, + retval = ark_mem->PreProcessStage(ark_mem->tcur + ((sunrealtype)j - ONE) * rat * ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "status = failed preprocess stage, retval = %i", retval); + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -1551,12 +1620,12 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessStage != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur + (j - 1) * rat * ark_mem->h, + retval = ark_mem->PreProcessStage(ark_mem->tcur + ((sunrealtype)j - ONE) * rat * ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "status = failed preprocess stage, retval = %i", retval); + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -1605,13 +1674,12 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (ark_mem->PreProcessStage != NULL) { retval = ark_mem->PreProcessStage(ark_mem->tcur + - rat * (rn * (rn + ONE) / TWO - ONE) * - ark_mem->h, + rat * (rn * (rn + ONE) / TWO - ONE) * ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "status = failed preprocess stage, retval = %i", retval); + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -1672,17 +1740,16 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr for (int j = (in * (in + 1) / 2 + 1); j <= step_mem->req_stages; j++) { - /* apply user-supplied stage postprocessing function (if supplied) */ + /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessStage != NULL) { - retval = - ark_mem->PreProcessStage(ark_mem->tcur + ((sunrealtype)j - rn - ONE) * - rat * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreProcessStage(ark_mem->tcur + + ((sunrealtype)j - rn - ONE) * rat * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "status = failed postprocess stage, retval = %i", retval); + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -1794,23 +1861,23 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr "stage = %i, tcur = " SUN_FORMAT_G, 0, ark_mem->tcur); SUNLogExtraDebugVec(ARK_LOGGER, "stage", ark_mem->yn, "z_0(:) ="); - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) - { - retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->yn, - ark_mem->user_data); - if (retval != 0) - { - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "status = failed preprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; - } - } - /* The method is not FSAL. Therefore, fn ​is computed at the beginning of the step unless ARKODE updated fn. */ if (!ark_mem->fn_is_current) { + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->yn, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + retval = step_mem->fe(ark_mem->tn, ark_mem->yn, ark_mem->fn, ark_mem->user_data); step_mem->nfe++; @@ -1855,8 +1922,8 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr ark_mem->ycur, ark_mem->user_data); if (retval != 0) { - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "status = failed preprocess stage, retval = %i", retval); + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -1900,12 +1967,12 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessStage != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur + ark_mem->h, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PreProcessStage(ark_mem->tcur + ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "status = failed preprocess stage, retval = %i", retval); + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -1959,6 +2026,19 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tcur + ark_mem->h * p5, + ark_mem->ycur, ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + retval = step_mem->fe(ark_mem->tcur + ark_mem->h * p5, ark_mem->ycur, ark_mem->tempv3, ark_mem->user_data); step_mem->nfe++; @@ -2038,23 +2118,23 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt "stage = %i, tcur = " SUN_FORMAT_G, 0, ark_mem->tcur); SUNLogExtraDebugVec(ARK_LOGGER, "stage", ark_mem->yn, "z_0(:) ="); - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) - { - retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->yn, - ark_mem->user_data); - if (retval != 0) - { - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "status = failed preprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; - } - } - /* The method is not FSAL. Therefore, fn ​is computed at the beginning of the step unless ARKODE updated fn. */ if (!ark_mem->fn_is_current) { + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->yn, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + retval = step_mem->fe(ark_mem->tn, ark_mem->yn, ark_mem->fn, ark_mem->user_data); step_mem->nfe++; @@ -2102,13 +2182,13 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessStage != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur + ((sunrealtype)j - ONE) * - onesixth * ark_mem->h, + retval = ark_mem->PreProcessStage(ark_mem->tcur + + ((sunrealtype)j - ONE) * onesixth * ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "status = failed preprocess stage, retval = %i", retval); + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -2181,16 +2261,16 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt for (int j = 6; j <= 9; j++) { - /* apply user-supplied stage prerocessing function (if supplied) */ + /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessStage != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur + ((sunrealtype)j - FOUR) * - onesixth * ark_mem->h, + retval = ark_mem->PreProcessStage(ark_mem->tcur + + ((sunrealtype)j - FOUR) * onesixth * ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "status = failed preprocess stage, retval = %i", retval); + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -2241,6 +2321,19 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } } + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tcur + ark_mem->h, + ark_mem->ycur, ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + retval = step_mem->fe(ark_mem->tcur + ark_mem->h, ark_mem->ycur, ark_mem->tempv3, ark_mem->user_data); step_mem->nfe++; @@ -2650,6 +2743,17 @@ int lsrkStep_DQJtimes(void* arkode_mem, N_Vector v, N_Vector Jv) if ((!ark_mem->fn_is_current && ark_mem->initsetup) || (step_mem->step_nst != ark_mem->nst)) { + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->yn, + ark_mem->user_data); + if (retval != 0) + { + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + retval = step_mem->fe(ark_mem->tn, ark_mem->yn, ark_mem->fn, ark_mem->user_data); step_mem->nfeDQ++; @@ -2673,7 +2777,14 @@ int lsrkStep_DQJtimes(void* arkode_mem, N_Vector v, N_Vector Jv) N_VLinearSum(sig, v, ONE, y, work); /* Set Jv = f(tn, y+sig*v) */ - //TODO:Needs to be update when LSRK Supports IMEX + if (ark_mem->PreProcessStage != NULL) + { + retval = ark_mem->PreProcessStage(t, work, ark_mem->user_data); + if (retval != 0) + { + return ARK_POSTPROCESS_STAGE_FAIL; + } + } retval = step_mem->fe(t, work, Jv, ark_mem->user_data); step_mem->nfeDQ++; if (retval == 0) { break; } From 98864f9af0864ce2397412f80d9bc16afdf8f673 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 13 Jan 2026 21:34:30 -0500 Subject: [PATCH 010/298] Renamed PreProcessStage to PreProcessRHS to clarify its role --- include/arkode/arkode.h | 4 +- src/arkode/arkode.c | 2 +- src/arkode/arkode_arkstep.c | 20 +++---- src/arkode/arkode_erkstep.c | 16 ++--- src/arkode/arkode_impl.h | 6 +- src/arkode/arkode_io.c | 34 +++++++---- src/arkode/arkode_lsrkstep.c | 112 +++++++++++++++++------------------ src/arkode/arkode_mristep.c | 28 ++++----- src/arkode/arkode_sprkstep.c | 14 ++--- 9 files changed, 126 insertions(+), 110 deletions(-) diff --git a/include/arkode/arkode.h b/include/arkode/arkode.h index d595074409..5ee781b7f8 100644 --- a/include/arkode/arkode.h +++ b/include/arkode/arkode.h @@ -282,8 +282,8 @@ SUNDIALS_EXPORT int ARKodeSetPostprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep); SUNDIALS_EXPORT int ARKodeSetPostprocessStepFailFn(void* arkode_mem, ARKPostProcessFn ProcessStep); -SUNDIALS_EXPORT int ARKodeSetPreprocessStageFn(void* arkode_mem, - ARKPostProcessFn ProcessStage); +SUNDIALS_EXPORT int ARKodeSetPreprocessRHSFn(void* arkode_mem, + ARKPostProcessFn ProcessRHS); SUNDIALS_EXPORT int ARKodeSetPostprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStage); diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index a4b124cd62..cb985d63c5 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -1609,7 +1609,7 @@ ARKodeMem arkCreate(SUNContext sunctx) ark_mem->ps_data = NULL; /* No user-supplied stage pre- or post-processing functions yet */ - ark_mem->PreProcessStage = NULL; + ark_mem->PreProcessRHS = NULL; ark_mem->PostProcessStage = NULL; /* No user_data pointer yet */ diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index 906f81e21f..1c042d5e30 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1332,9 +1332,9 @@ int arkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(t, y, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); @@ -1468,9 +1468,9 @@ int arkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(t, y, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); @@ -1587,9 +1587,9 @@ int arkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, case ARK_FULLRHS_OTHER: /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(t, y, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); @@ -1878,9 +1878,9 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) else { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->yn, + retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, ark_mem->user_data); if (retval != 0) { @@ -2113,9 +2113,9 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* apply user-supplied stage preprocessing function (if supplied) */ /* NOTE: with internally inconsistent IMEX methods (c_i^E != c_i^I) the value of tcur corresponds to the stage time from the implicit table (c_i^I). */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur, ark_mem->ycur, + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index 55e6fba6c6..18fdebb766 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -616,9 +616,9 @@ int erkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(t, y, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); @@ -665,9 +665,9 @@ int erkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (recomputeRHS) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(t, y, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); @@ -705,9 +705,9 @@ int erkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, case ARK_FULLRHS_OTHER: /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(t, y, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); @@ -902,9 +902,9 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur, ark_mem->ycur, + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { diff --git a/src/arkode/arkode_impl.h b/src/arkode/arkode_impl.h index eb9a0a90f9..5a46791ac1 100644 --- a/src/arkode/arkode_impl.h +++ b/src/arkode/arkode_impl.h @@ -570,10 +570,12 @@ struct ARKodeMemRec ARKPostProcessFn PostProcessStepFail; void* ps_data; /* pointer to user_data */ - /* User-supplied stage solution pre/post-processing functions */ - ARKPostProcessFn PreProcessStage; + /* User-supplied stage solution post-processing function */ ARKPostProcessFn PostProcessStage; + /* User-supplied RHS function pre-processing function */ + ARKPostProcessFn PreProcessRHS; + sunbooleantype use_compensated_sums; /* Adjoint solver data */ diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index 76383b93c4..2e08cd5434 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -1566,15 +1566,13 @@ int ARKodeSetPostprocessStepFailFn(void* arkode_mem, ARKPostProcessFn ProcessSte } /*--------------------------------------------------------------- - ARKodeSetPreprocessStageFn: ARKodeSetPostprocessStageFn: - Specifies user-provided stage pre- and post-processing - functions having type ARKPostProcessFn. A NULL input function - disables pre- or post-stage processing. + Specifies user-provided stage post-processing + function having type ARKPostProcessFn. A NULL input function + disables post-stage processing. - The "Preprocess" function is called just prior to taking a stage, - while the "Postprocess" function is called immediately after + The "ProcessStage" function is called immediately after computing a stage. IF THE SUPPLIED FUNCTION MODIFIES ANY OF THE ACTIVE STATE DATA, @@ -1588,7 +1586,7 @@ int ARKodeSetPostprocessStepFailFn(void* arkode_mem, ARKPostProcessFn ProcessSte ARKodeSetDeduceImplicitRhs in order to guarantee postprocessing constraints are enforced. ---------------------------------------------------------------*/ -int ARKodeSetPreprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStage) +int ARKodeSetPostprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStage) { ARKodeMem ark_mem; if (arkode_mem == NULL) @@ -1600,12 +1598,28 @@ int ARKodeSetPreprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStage) ark_mem = (ARKodeMem)arkode_mem; /* NULL argument sets default, otherwise set inputs */ - ark_mem->PreProcessStage = ProcessStage; + ark_mem->PostProcessStage = ProcessStage; return (ARK_SUCCESS); } -int ARKodeSetPostprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStage) +/*--------------------------------------------------------------- + ARKodeSetPreprocessRHSFn: + + Specifies user-provided pre-processing function having type + ARKPostProcessFn. A NULL input function disables pre-RHS + processing. + + The "PreprocessRHS" function is called on a state vector + just prior to computing the RHS. For problems with partitioned + RHS functions that are called with identical inputs, this is + only called before the first RHS evaluation. + + IF THE SUPPLIED FUNCTION MODIFIES ANY OF THE ACTIVE STATE DATA, + THEN ALL THEORETICAL GUARANTEES OF SOLUTION ACCURACY AND + STABILITY ARE LOST. + ---------------------------------------------------------------*/ +int ARKodeSetPreprocessRHSFn(void* arkode_mem, ARKPostProcessFn PreprocessRHS) { ARKodeMem ark_mem; if (arkode_mem == NULL) @@ -1617,7 +1631,7 @@ int ARKodeSetPostprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStage) ark_mem = (ARKodeMem)arkode_mem; /* NULL argument sets default, otherwise set inputs */ - ark_mem->PostProcessStage = ProcessStage; + ark_mem->PreProcessRHS = PreprocessRHS; return (ARK_SUCCESS); } diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index ced04e8abf..5e83ea4144 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -452,9 +452,9 @@ int lsrkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (!ark_mem->fn_is_current) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(t, y, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); @@ -480,9 +480,9 @@ int lsrkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (step_mem->is_SSP) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(t, y, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); @@ -505,9 +505,9 @@ int lsrkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, case ARK_FULLRHS_OTHER: /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(t, y, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); @@ -640,9 +640,9 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->yn, + retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, ark_mem->user_data); if (retval != 0) { @@ -729,9 +729,9 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) mus = mu * w1 / w0; /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur + ark_mem->h * thjm1, + retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h * thjm1, ark_mem->tempv2, ark_mem->user_data); if (retval != 0) { @@ -826,9 +826,9 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (!ark_mem->fixedstep) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur + ark_mem->h, + retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -872,9 +872,9 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) else { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur + ark_mem->h, + retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -1009,9 +1009,9 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) (step_mem->step_nst != ark_mem->nst)) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->yn, + retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, ark_mem->user_data); if (retval != 0) { @@ -1080,9 +1080,9 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) cj = temj * w1 / FOUR; /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur + ark_mem->h * cjm1, + retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h * cjm1, ark_mem->tempv2, ark_mem->user_data); if (retval != 0) { @@ -1163,9 +1163,9 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "begin-compute-embedding", ""); /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur + ark_mem->h, + retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -1284,9 +1284,9 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (!ark_mem->fn_is_current) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->yn, + retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, ark_mem->user_data); if (retval != 0) { @@ -1339,9 +1339,9 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur + ((sunrealtype)j - ONE) * sm1inv * ark_mem->h, + retval = ark_mem->PreProcessRHS(ark_mem->tcur + ((sunrealtype)j - ONE) * sm1inv * ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -1393,9 +1393,9 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Evaluate the last stage for j = step_mem->req_stages */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur + ark_mem->h, + retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -1508,9 +1508,9 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (!ark_mem->fn_is_current) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->yn, + retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, ark_mem->user_data); if (retval != 0) { @@ -1561,9 +1561,9 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr for (int j = 2; j <= ((in - 1) * (in - 2) / 2); j++) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur + ((sunrealtype)j - ONE) * rat * ark_mem->h, + retval = ark_mem->PreProcessRHS(ark_mem->tcur + ((sunrealtype)j - ONE) * rat * ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -1618,9 +1618,9 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr for (int j = ((in - 1) * (in - 2) / 2 + 1); j <= (in * (in + 1) / 2 - 1); j++) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur + ((sunrealtype)j - ONE) * rat * ark_mem->h, + retval = ark_mem->PreProcessRHS(ark_mem->tcur + ((sunrealtype)j - ONE) * rat * ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -1671,9 +1671,9 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur + + retval = ark_mem->PreProcessRHS(ark_mem->tcur + rat * (rn * (rn + ONE) / TWO - ONE) * ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) @@ -1741,9 +1741,9 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr for (int j = (in * (in + 1) / 2 + 1); j <= step_mem->req_stages; j++) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur + + retval = ark_mem->PreProcessRHS(ark_mem->tcur + ((sunrealtype)j - rn - ONE) * rat * ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) @@ -1866,9 +1866,9 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (!ark_mem->fn_is_current) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->yn, + retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, ark_mem->user_data); if (retval != 0) { @@ -1916,9 +1916,9 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur + ark_mem->h * p5, + retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h * p5, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -1965,9 +1965,9 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur + ark_mem->h, + retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -2027,9 +2027,9 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur + ark_mem->h * p5, + retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h * p5, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -2123,9 +2123,9 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt if (!ark_mem->fn_is_current) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->yn, + retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, ark_mem->user_data); if (retval != 0) { @@ -2180,9 +2180,9 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt for (int j = 2; j <= 5; j++) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur + + retval = ark_mem->PreProcessRHS(ark_mem->tcur + ((sunrealtype)j - ONE) * onesixth * ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) @@ -2262,9 +2262,9 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt for (int j = 6; j <= 9; j++) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur + + retval = ark_mem->PreProcessRHS(ark_mem->tcur + ((sunrealtype)j - FOUR) * onesixth * ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) @@ -2322,9 +2322,9 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur + ark_mem->h, + retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -2744,9 +2744,9 @@ int lsrkStep_DQJtimes(void* arkode_mem, N_Vector v, N_Vector Jv) (step_mem->step_nst != ark_mem->nst)) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tn, ark_mem->yn, + retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, ark_mem->user_data); if (retval != 0) { @@ -2777,9 +2777,9 @@ int lsrkStep_DQJtimes(void* arkode_mem, N_Vector v, N_Vector Jv) N_VLinearSum(sig, v, ONE, y, work); /* Set Jv = f(tn, y+sig*v) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(t, work, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(t, work, ark_mem->user_data); if (retval != 0) { return ARK_POSTPROCESS_STAGE_FAIL; diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 01a8bb9ac6..fde9045e69 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1477,9 +1477,9 @@ int mriStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, nvec++; /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(t, y, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); @@ -1608,11 +1608,11 @@ int mriStep_UpdateF0(ARKodeMem ark_mem, ARKodeMRIStepMem step_mem, /* update the RHS components */ /* apply user-supplied stage preprocessing function (if supplied) */ - if ((ark_mem->PreProcessStage != NULL) && + if ((ark_mem->PreProcessRHS != NULL) && ((!step_mem->fse_is_current || !ark_mem->fn_is_current) || (!step_mem->fsi_is_current || !ark_mem->fn_is_current))) { - retval = ark_mem->PreProcessStage(t, y, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); @@ -1686,9 +1686,9 @@ int mriStep_UpdateF0(ARKodeMem ark_mem, ARKodeMRIStepMem step_mem, { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(t, y, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); @@ -2031,9 +2031,9 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur, ark_mem->ycur, + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -2675,9 +2675,9 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur, ark_mem->ycur, + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -3083,9 +3083,9 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if ((!solution) && (!embedding)) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tcur, ark_mem->ycur, + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -4242,9 +4242,9 @@ int mriStep_SlowRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (retval != ARK_SUCCESS) { return (retval); } /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(t, y, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index 08f9bf8eca..38509151b2 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -493,9 +493,9 @@ int sprkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, case ARK_FULLRHS_OTHER: /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(t, y, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); @@ -577,9 +577,9 @@ int sprkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) set other outputs to zero */ /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tn + chati * ark_mem->h, + retval = ark_mem->PreProcessRHS(ark_mem->tn + chati * ark_mem->h, prev_stage, ark_mem->user_data); if (retval != 0) { @@ -620,9 +620,9 @@ int sprkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) set other outputs to zero */ /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessStage != NULL) + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessStage(ark_mem->tn + ci * ark_mem->h, + retval = ark_mem->PreProcessRHS(ark_mem->tn + ci * ark_mem->h, curr_stage, ark_mem->user_data); if (retval != 0) { @@ -709,7 +709,7 @@ int sprkStep_TakeStep_Compensated(ARKodeMem ark_mem, sunrealtype* dsmPtr, /* if user-supplied stage preprocessing or postprocessing functions, * we error out since those won't work with the increment form */ - if ((ark_mem->PreProcessStage != NULL) || (ark_mem->PostProcessStage != NULL)) + if ((ark_mem->PreProcessRHS != NULL) || (ark_mem->PostProcessStage != NULL)) { SUNLogInfo(ARK_LOGGER, "begin-stages-list", "status = failed stage stage processing, retval = %i", From f8736eabdf928f21d86a2de77fcf80c617b71cb7 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 13 Jan 2026 21:40:00 -0500 Subject: [PATCH 011/298] Regenerated SWIG --- src/arkode/fmod_int32/farkode_mod.c | 4 ++-- src/arkode/fmod_int32/farkode_mod.f90 | 14 +++++++------- src/arkode/fmod_int64/farkode_mod.c | 4 ++-- src/arkode/fmod_int64/farkode_mod.f90 | 14 +++++++------- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/arkode/fmod_int32/farkode_mod.c b/src/arkode/fmod_int32/farkode_mod.c index 1dcc8ef708..8b1823a253 100644 --- a/src/arkode/fmod_int32/farkode_mod.c +++ b/src/arkode/fmod_int32/farkode_mod.c @@ -692,7 +692,7 @@ SWIGEXPORT int _wrap_FARKodeSetPostprocessStepFailFn(void *farg1, ARKPostProcess } -SWIGEXPORT int _wrap_FARKodeSetPreprocessStageFn(void *farg1, ARKPostProcessFn farg2) { +SWIGEXPORT int _wrap_FARKodeSetPreprocessRHSFn(void *farg1, ARKPostProcessFn farg2) { int fresult ; void *arg1 = (void *) 0 ; ARKPostProcessFn arg2 = (ARKPostProcessFn) 0 ; @@ -700,7 +700,7 @@ SWIGEXPORT int _wrap_FARKodeSetPreprocessStageFn(void *farg1, ARKPostProcessFn f arg1 = (void *)(farg1); arg2 = (ARKPostProcessFn)(farg2); - result = (int)ARKodeSetPreprocessStageFn(arg1,arg2); + result = (int)ARKodeSetPreprocessRHSFn(arg1,arg2); fresult = (int)(result); return fresult; } diff --git a/src/arkode/fmod_int32/farkode_mod.f90 b/src/arkode/fmod_int32/farkode_mod.f90 index 347a826f64..2e26e4f62e 100644 --- a/src/arkode/fmod_int32/farkode_mod.f90 +++ b/src/arkode/fmod_int32/farkode_mod.f90 @@ -148,7 +148,7 @@ module farkode_mod public :: FARKodeSetPreprocessStepFn public :: FARKodeSetPostprocessStepFn public :: FARKodeSetPostprocessStepFailFn - public :: FARKodeSetPreprocessStageFn + public :: FARKodeSetPreprocessRHSFn public :: FARKodeSetPostprocessStageFn public :: FARKodeSetNonlinearSolver public :: FARKodeSetLinear @@ -735,8 +735,8 @@ function swigc_FARKodeSetPostprocessStepFailFn(farg1, farg2) & integer(C_INT) :: fresult end function -function swigc_FARKodeSetPreprocessStageFn(farg1, farg2) & -bind(C, name="_wrap_FARKodeSetPreprocessStageFn") & +function swigc_FARKodeSetPreprocessRHSFn(farg1, farg2) & +bind(C, name="_wrap_FARKodeSetPreprocessRHSFn") & result(fresult) use, intrinsic :: ISO_C_BINDING type(C_PTR), value :: farg1 @@ -2974,19 +2974,19 @@ function FARKodeSetPostprocessStepFailFn(arkode_mem, processstep) & swig_result = fresult end function -function FARKodeSetPreprocessStageFn(arkode_mem, processstage) & +function FARKodeSetPreprocessRHSFn(arkode_mem, processrhs) & result(swig_result) use, intrinsic :: ISO_C_BINDING integer(C_INT) :: swig_result type(C_PTR) :: arkode_mem -type(C_FUNPTR), intent(in), value :: processstage +type(C_FUNPTR), intent(in), value :: processrhs integer(C_INT) :: fresult type(C_PTR) :: farg1 type(C_FUNPTR) :: farg2 farg1 = arkode_mem -farg2 = processstage -fresult = swigc_FARKodeSetPreprocessStageFn(farg1, farg2) +farg2 = processrhs +fresult = swigc_FARKodeSetPreprocessRHSFn(farg1, farg2) swig_result = fresult end function diff --git a/src/arkode/fmod_int64/farkode_mod.c b/src/arkode/fmod_int64/farkode_mod.c index 58dc396136..29add22fe2 100644 --- a/src/arkode/fmod_int64/farkode_mod.c +++ b/src/arkode/fmod_int64/farkode_mod.c @@ -692,7 +692,7 @@ SWIGEXPORT int _wrap_FARKodeSetPostprocessStepFailFn(void *farg1, ARKPostProcess } -SWIGEXPORT int _wrap_FARKodeSetPreprocessStageFn(void *farg1, ARKPostProcessFn farg2) { +SWIGEXPORT int _wrap_FARKodeSetPreprocessRHSFn(void *farg1, ARKPostProcessFn farg2) { int fresult ; void *arg1 = (void *) 0 ; ARKPostProcessFn arg2 = (ARKPostProcessFn) 0 ; @@ -700,7 +700,7 @@ SWIGEXPORT int _wrap_FARKodeSetPreprocessStageFn(void *farg1, ARKPostProcessFn f arg1 = (void *)(farg1); arg2 = (ARKPostProcessFn)(farg2); - result = (int)ARKodeSetPreprocessStageFn(arg1,arg2); + result = (int)ARKodeSetPreprocessRHSFn(arg1,arg2); fresult = (int)(result); return fresult; } diff --git a/src/arkode/fmod_int64/farkode_mod.f90 b/src/arkode/fmod_int64/farkode_mod.f90 index 7f90862f55..291ca02c8a 100644 --- a/src/arkode/fmod_int64/farkode_mod.f90 +++ b/src/arkode/fmod_int64/farkode_mod.f90 @@ -148,7 +148,7 @@ module farkode_mod public :: FARKodeSetPreprocessStepFn public :: FARKodeSetPostprocessStepFn public :: FARKodeSetPostprocessStepFailFn - public :: FARKodeSetPreprocessStageFn + public :: FARKodeSetPreprocessRHSFn public :: FARKodeSetPostprocessStageFn public :: FARKodeSetNonlinearSolver public :: FARKodeSetLinear @@ -735,8 +735,8 @@ function swigc_FARKodeSetPostprocessStepFailFn(farg1, farg2) & integer(C_INT) :: fresult end function -function swigc_FARKodeSetPreprocessStageFn(farg1, farg2) & -bind(C, name="_wrap_FARKodeSetPreprocessStageFn") & +function swigc_FARKodeSetPreprocessRHSFn(farg1, farg2) & +bind(C, name="_wrap_FARKodeSetPreprocessRHSFn") & result(fresult) use, intrinsic :: ISO_C_BINDING type(C_PTR), value :: farg1 @@ -2974,19 +2974,19 @@ function FARKodeSetPostprocessStepFailFn(arkode_mem, processstep) & swig_result = fresult end function -function FARKodeSetPreprocessStageFn(arkode_mem, processstage) & +function FARKodeSetPreprocessRHSFn(arkode_mem, processrhs) & result(swig_result) use, intrinsic :: ISO_C_BINDING integer(C_INT) :: swig_result type(C_PTR) :: arkode_mem -type(C_FUNPTR), intent(in), value :: processstage +type(C_FUNPTR), intent(in), value :: processrhs integer(C_INT) :: fresult type(C_PTR) :: farg1 type(C_FUNPTR) :: farg2 farg1 = arkode_mem -farg2 = processstage -fresult = swigc_FARKodeSetPreprocessStageFn(farg1, farg2) +farg2 = processrhs +fresult = swigc_FARKodeSetPreprocessRHSFn(farg1, farg2) swig_result = fresult end function From d6d209e1bb3ef9434de69f10d9bf8b0cde8adc6b Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 13 Jan 2026 21:40:29 -0500 Subject: [PATCH 012/298] Ran formatter --- src/arkode/arkode_arkstep.c | 26 ++---- src/arkode/arkode_erkstep.c | 18 +--- src/arkode/arkode_lsrkstep.c | 166 ++++++++++++++++------------------- src/arkode/arkode_mristep.c | 32 ++----- src/arkode/arkode_sprkstep.c | 13 ++- 5 files changed, 98 insertions(+), 157 deletions(-) diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index 1c042d5e30..e7e1438a1f 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1330,15 +1330,11 @@ int arkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, /* compute the full RHS */ if (!(ark_mem->fn_is_current)) { - /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); - if (retval != 0) - { - return (ARK_POSTPROCESS_STAGE_FAIL); - } + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } } /* compute the implicit component */ @@ -1466,15 +1462,11 @@ int arkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, /* recompute RHS functions */ if (recomputeRHS) { - /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); - if (retval != 0) - { - return (ARK_POSTPROCESS_STAGE_FAIL); - } + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } } /* compute the implicit component */ @@ -1590,10 +1582,7 @@ int arkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); - if (retval != 0) - { - return (ARK_POSTPROCESS_STAGE_FAIL); - } + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } } /* compute the implicit component and store in sdata */ @@ -1881,11 +1870,8 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, - ark_mem->user_data); - if (retval != 0) - { - return (ARK_POSTPROCESS_STAGE_FAIL); - } + ark_mem->user_data); + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } } retval = step_mem->fi(ark_mem->tn, ark_mem->yn, step_mem->Fi[0], ark_mem->user_data); @@ -2116,7 +2102,7 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index 18fdebb766..452f32c3db 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -614,15 +614,11 @@ int erkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, /* compute the RHS if needed */ if (!(ark_mem->fn_is_current)) { - /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); - if (retval != 0) - { - return (ARK_POSTPROCESS_STAGE_FAIL); - } + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } } /* call f */ @@ -668,10 +664,7 @@ int erkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); - if (retval != 0) - { - return (ARK_POSTPROCESS_STAGE_FAIL); - } + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } } /* call f */ @@ -708,10 +701,7 @@ int erkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); - if (retval != 0) - { - return (ARK_POSTPROCESS_STAGE_FAIL); - } + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } } /* call f */ @@ -905,7 +895,7 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 5e83ea4144..eb4e7b5539 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -455,10 +455,7 @@ int lsrkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); - if (retval != 0) - { - return (ARK_POSTPROCESS_STAGE_FAIL); - } + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } } retval = step_mem->fe(t, y, f, ark_mem->user_data); step_mem->nfe++; @@ -483,10 +480,7 @@ int lsrkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); - if (retval != 0) - { - return (ARK_POSTPROCESS_STAGE_FAIL); - } + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } } retval = step_mem->fe(t, y, ark_mem->fn, ark_mem->user_data); step_mem->nfe++; @@ -508,10 +502,7 @@ int lsrkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); - if (retval != 0) - { - return (ARK_POSTPROCESS_STAGE_FAIL); - } + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } } /* call f */ @@ -638,16 +629,15 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if ((!ark_mem->fn_is_current && ark_mem->initsetup) || (step_mem->step_nst != ark_mem->nst)) { - /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, - ark_mem->user_data); + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -732,11 +722,11 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h * thjm1, - ark_mem->tempv2, ark_mem->user_data); + ark_mem->tempv2, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -828,12 +818,12 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -874,12 +864,12 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -1012,11 +1002,11 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, - ark_mem->user_data); + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -1083,11 +1073,11 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h * cjm1, - ark_mem->tempv2, ark_mem->user_data); + ark_mem->tempv2, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -1165,12 +1155,12 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -1181,7 +1171,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogExtraDebugVec(ARK_LOGGER, "solution RHS", ark_mem->tempv2, "F_n(:) ="); SUNLogInfoIf(retval != 0, ARK_LOGGER, "end-compute-embedding", - "status = failed rhs eval, retval = %i", retval); + "status = failed rhs eval, retval = %i", retval); if (retval < 0) { return ARK_RHSFUNC_FAIL; } if (retval > 0) { return RHSFUNC_RECVR; } @@ -1209,10 +1199,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) *dsmPtr = N_VWrmsNorm(ark_mem->tempv1, ark_mem->ewt); lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr); } - else - { - lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr); - } + else { lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr); } SUNLogInfo(ARK_LOGGER, "end-compute-embedding", "status = success"); @@ -1287,11 +1274,11 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, - ark_mem->user_data); + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -1337,16 +1324,16 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Evaluate stages j = 2,...,step_mem->req_stages - 1 */ for (int j = 2; j < step_mem->req_stages; j++) { - /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ((sunrealtype)j - ONE) * sm1inv * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(ark_mem->tcur + ((sunrealtype)j - ONE) * + sm1inv * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -1395,12 +1382,12 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -1511,11 +1498,11 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, - ark_mem->user_data); + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -1563,12 +1550,13 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ((sunrealtype)j - ONE) * rat * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(ark_mem->tcur + ((sunrealtype)j - ONE) * + rat * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -1620,12 +1608,13 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ((sunrealtype)j - ONE) * rat * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(ark_mem->tcur + ((sunrealtype)j - ONE) * + rat * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -1673,13 +1662,14 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + - rat * (rn * (rn + ONE) / TWO - ONE) * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = + ark_mem->PreProcessRHS(ark_mem->tcur + + rat * (rn * (rn + ONE) / TWO - ONE) * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -1743,13 +1733,13 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + - ((sunrealtype)j - rn - ONE) * rat * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(ark_mem->tcur + ((sunrealtype)j - rn - ONE) * + rat * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -1869,11 +1859,11 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, - ark_mem->user_data); + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -1919,11 +1909,11 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h * p5, - ark_mem->ycur, ark_mem->user_data); + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -1967,12 +1957,12 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -2030,11 +2020,11 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h * p5, - ark_mem->ycur, ark_mem->user_data); + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -2126,11 +2116,11 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, - ark_mem->user_data); + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -2182,13 +2172,13 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + - ((sunrealtype)j - ONE) * onesixth * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(ark_mem->tcur + ((sunrealtype)j - ONE) * + onesixth * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -2264,13 +2254,13 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + - ((sunrealtype)j - FOUR) * onesixth * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(ark_mem->tcur + ((sunrealtype)j - FOUR) * + onesixth * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -2324,12 +2314,12 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } @@ -2747,11 +2737,8 @@ int lsrkStep_DQJtimes(void* arkode_mem, N_Vector v, N_Vector Jv) if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, - ark_mem->user_data); - if (retval != 0) - { - return ARK_POSTPROCESS_STAGE_FAIL; - } + ark_mem->user_data); + if (retval != 0) { return ARK_POSTPROCESS_STAGE_FAIL; } } retval = step_mem->fe(ark_mem->tn, ark_mem->yn, ark_mem->fn, @@ -2780,10 +2767,7 @@ int lsrkStep_DQJtimes(void* arkode_mem, N_Vector v, N_Vector Jv) if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(t, work, ark_mem->user_data); - if (retval != 0) - { - return ARK_POSTPROCESS_STAGE_FAIL; - } + if (retval != 0) { return ARK_POSTPROCESS_STAGE_FAIL; } } retval = step_mem->fe(t, work, Jv, ark_mem->user_data); step_mem->nfeDQ++; diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index fde9045e69..9057ce4c55 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1480,10 +1480,7 @@ int mriStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); - if (retval != 0) - { - return (ARK_POSTPROCESS_STAGE_FAIL); - } + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } } /* compute the implicit component and store in sdata */ @@ -1613,10 +1610,7 @@ int mriStep_UpdateF0(ARKodeMem ark_mem, ARKodeMRIStepMem step_mem, (!step_mem->fsi_is_current || !ark_mem->fn_is_current))) { retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); - if (retval != 0) - { - return (ARK_POSTPROCESS_STAGE_FAIL); - } + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } } /* implicit component */ @@ -1684,15 +1678,11 @@ int mriStep_UpdateF0(ARKodeMem ark_mem, ARKodeMRIStepMem step_mem, /* compute the full RHS */ if (!(ark_mem->fn_is_current)) { - /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); - if (retval != 0) - { - return (ARK_POSTPROCESS_STAGE_FAIL); - } + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } } /* compute the implicit component */ @@ -1744,7 +1734,6 @@ int mriStep_UpdateF0(ARKodeMem ark_mem, ARKodeMRIStepMem step_mem, step_mem->Fse[0]); } } - } break; @@ -2029,12 +2018,11 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } if (calc_fslow) { - /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -2673,12 +2661,11 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Compute updated slow RHS (except for final solution or embedding) */ if ((!solution) && (!embedding)) { - /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -3086,11 +3073,11 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess stage, retval = %i", retval); return (ARK_POSTPROCESS_STAGE_FAIL); } } @@ -4245,10 +4232,7 @@ int mriStep_SlowRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); - if (retval != 0) - { - return (ARK_POSTPROCESS_STAGE_FAIL); - } + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } } /* call fsi if the problem has an implicit component */ diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index 38509151b2..a2ae4d57fc 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -496,10 +496,7 @@ int sprkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); - if (retval != 0) - { - return (ARK_POSTPROCESS_STAGE_FAIL); - } + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } } /* Since f1 and f2 do not have overlapping outputs and so the f vector is @@ -580,11 +577,11 @@ int sprkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(ark_mem->tn + chati * ark_mem->h, - prev_stage, ark_mem->user_data); + prev_stage, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess stage, retval = %i", retval); return (ARK_POSTPROCESS_STAGE_FAIL); } } @@ -623,11 +620,11 @@ int sprkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(ark_mem->tn + ci * ark_mem->h, - curr_stage, ark_mem->user_data); + curr_stage, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess stage, retval = %i", retval); return (ARK_POSTPROCESS_STAGE_FAIL); } } From 801108cf2f00fd44fc57b859ba26dbefafac77be Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 13 Jan 2026 22:21:05 -0500 Subject: [PATCH 013/298] Updated logging output to reflect reordering of explicit and implicit RHS functions --- .../test_logging_arkode_mristep_lvl5_1_0.out | 32 ++-- .../test_logging_arkode_mristep_lvl5_2_0.out | 86 ++++----- ...test_logging_arkode_mristep_lvl5_2_1_0.out | 176 +++++++++--------- ...test_logging_arkode_mristep_lvl5_2_1_1.out | 82 ++++---- .../test_logging_arkode_mristep_lvl5_5_0.out | 70 +++---- ...test_logging_arkode_mristep_lvl5_5_1_1.out | 64 +++---- 6 files changed, 255 insertions(+), 255 deletions(-) diff --git a/test/unit_tests/logging/test_logging_arkode_mristep_lvl5_1_0.out b/test/unit_tests/logging/test_logging_arkode_mristep_lvl5_1_0.out index e55fe2d3ca..75f4529add 100644 --- a/test/unit_tests/logging/test_logging_arkode_mristep_lvl5_1_0.out +++ b/test/unit_tests/logging/test_logging_arkode_mristep_lvl5_1_0.out @@ -219,10 +219,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 2.618808553544664 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 2.61880855354466 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.0007928652557594945 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.000792865255759495 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -2.964220317650217e-08 @@ -318,10 +318,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 10.47508400821115 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 10.4750840082111 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.003186689134194484 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.00318668913419448 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -8.826759722826945e-08 @@ -417,7 +417,7 @@ Using fixed-point nonlinear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 23.56852920005934 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 23.5685292000593 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.00721853154020951 @@ -532,10 +532,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 18.33117208795071 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 18.3311720879507 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.005605053590958301 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.0056050535909583 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -9.769081861380291e-08 @@ -631,10 +631,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 41.89912728811152 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 41.8991272881115 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.01281058040587073 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.0128105804058707 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -2.243720669363767e-07 @@ -730,10 +730,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 70.70323030003219 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 70.7032303000322 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.02165342185632685 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.0216534218563268 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -3.062465506470602e-07 @@ -845,10 +845,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 34.04320255383404 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 34.043202553834 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.01041601086238914 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.0104160108623891 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -1.657393533499818e-07 @@ -947,7 +947,7 @@ Using fixed-point nonlinear solver [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 73.3217906642831 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.02243147136763779 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.0224314713676378 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -3.604763568846829e-07 @@ -1043,10 +1043,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 117.8347848202942 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 117.834784820294 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.03608300450072507 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.0360830045007251 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -5.104138961564322e-07 diff --git a/test/unit_tests/logging/test_logging_arkode_mristep_lvl5_2_0.out b/test/unit_tests/logging/test_logging_arkode_mristep_lvl5_2_0.out index 6d7892458b..7168402c3e 100644 --- a/test/unit_tests/logging/test_logging_arkode_mristep_lvl5_2_0.out +++ b/test/unit_tests/logging/test_logging_arkode_mristep_lvl5_2_0.out @@ -225,7 +225,7 @@ Using fixed-point nonlinear solver [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 4.47758963639177 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.001381168840331406 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.00138116884033141 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -1.897138685890125e-11 @@ -235,12 +235,12 @@ Using fixed-point nonlinear solver 1.224744871372617e+00 1.732039839126277e+00 [DEBUG][rank 0][mriStepInnerStepper_Reset][reset-inner-state] tR = 0.000435866521508459 -[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_2(:) = --8.897087832239859e-05 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow implicit RHS] Fsi_2(:) = -3.874078017985966e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_2(:) = +-8.897087832239859e-05 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRIGARK][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRIGARK][begin-stages-list] stage = 3, stage type = 0, tcur = 0.00071793326075423 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -324,10 +324,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 12.14796270582734 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 12.1479627058273 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.003729401476738584 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.00372940147673858 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -3.532439656993041e-08 @@ -337,12 +337,12 @@ Using fixed-point nonlinear solver 1.224744836067192e+00 1.732021049568848e+00 [DEBUG][rank 0][mriStepInnerStepper_Reset][reset-inner-state] tR = 0.00071793326075423 -[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_4(:) = --1.465475048226711e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow implicit RHS] Fsi_4(:) = -3.456082655460544e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_4(:) = +-1.465475048226711e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRIGARK][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRIGARK][begin-stages-list] stage = 5, stage type = 0, tcur = 0.001 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -426,10 +426,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 23.56857053287391 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 23.5685705328739 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.007204341456196956 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.00720434145619696 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -1.302435561799672e-07 @@ -439,12 +439,12 @@ Using fixed-point nonlinear solver 1.224744741148033e+00 1.731993073504206e+00 [DEBUG][rank 0][mriStepInnerStepper_Reset][reset-inner-state] tR = 0.001 -[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_6(:) = --2.041241329185004e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow implicit RHS] Fsi_6(:) = 5.636297178910438e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_6(:) = +-2.041241329185004e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRIGARK][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRIGARK][begin-stages-list] stage = 7, stage type = 1, tcur = 0.001 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow stage] z_7(:) = @@ -551,10 +551,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 25.02295754400716 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 25.0229575440072 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.007673490841839432 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.00767349084183943 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -8.899932215363059e-08 @@ -564,12 +564,12 @@ Using fixed-point nonlinear solver 1.224744680311620e+00 1.731931778624167e+00 [DEBUG][rank 0][mriStepInnerStepper_Reset][reset-inner-state] tR = 0.00143586652150846 -[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_2(:) = --2.930949713846630e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow implicit RHS] Fsi_2(:) = -3.868466374409285e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_2(:) = +-2.930949713846630e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRIGARK][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRIGARK][begin-stages-list] stage = 3, stage type = 0, tcur = 0.00171793326075423 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -653,10 +653,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 45.98839423695283 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 45.9883942369528 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.01409326137946229 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.0140932613794623 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -1.818969806161295e-07 @@ -666,12 +666,12 @@ Using fixed-point nonlinear solver 1.224744587413962e+00 1.731880422875505e+00 [DEBUG][rank 0][mriStepInnerStepper_Reset][reset-inner-state] tR = 0.00171793326075423 -[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_4(:) = --3.506715672368343e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow implicit RHS] Fsi_4(:) = -3.447347325160531e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_4(:) = +-3.506715672368343e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRIGARK][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRIGARK][begin-stages-list] stage = 5, stage type = 0, tcur = 0.002 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -755,10 +755,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 70.70326789489287 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 70.7032678948929 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.02163921128615576 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.0216392112861558 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -3.344145077803560e-07 @@ -768,12 +768,12 @@ Using fixed-point nonlinear solver 1.224744434896435e+00 1.731819882857588e+00 [DEBUG][rank 0][mriStepInnerStepper_Reset][reset-inner-state] tR = 0.002 -[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_6(:) = --4.082481637967301e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow implicit RHS] Fsi_6(:) = 5.649384883634026e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_6(:) = +-4.082481637967301e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRIGARK][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRIGARK][begin-stages-list] stage = 7, stage type = 1, tcur = 0.002 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow stage] z_7(:) = @@ -880,7 +880,7 @@ Using fixed-point nonlinear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 45.56773766986903 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 45.567737669869 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.0139640883068901 @@ -893,12 +893,12 @@ Using fixed-point nonlinear solver 1.224744285079746e+00 1.731708273800530e+00 [DEBUG][rank 0][mriStepInnerStepper_Reset][reset-inner-state] tR = 0.00243586652150846 -[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_2(:) = --4.972189179277549e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow implicit RHS] Fsi_2(:) = -3.853486828457860e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_2(:) = +-4.972189179277549e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRIGARK][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRIGARK][begin-stages-list] stage = 3, stage type = 0, tcur = 0.00271793326075423 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -982,10 +982,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 79.82720625171295 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 79.827206251713 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.02445379030804438 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.0244537903080444 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -3.284693989193380e-07 @@ -995,12 +995,12 @@ Using fixed-point nonlinear solver 1.224744134589932e+00 1.731624362133668e+00 [DEBUG][rank 0][mriStepInnerStepper_Reset][reset-inner-state] tR = 0.00271793326075423 -[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_4(:) = --5.547954543508839e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow implicit RHS] Fsi_4(:) = -3.429250892967503e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_4(:) = +-5.547954543508839e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRIGARK][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRIGARK][begin-stages-list] stage = 5, stage type = 0, tcur = 0.003 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -1084,10 +1084,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 117.8348216736332 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 117.834821673633 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.03606875840854498 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.036068758408545 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -5.385851829263963e-07 @@ -1097,12 +1097,12 @@ Using fixed-point nonlinear solver 1.224743924474148e+00 1.731531270273480e+00 [DEBUG][rank 0][mriStepInnerStepper_Reset][reset-inner-state] tR = 0.003 -[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_6(:) = --6.123719905959306e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow implicit RHS] Fsi_6(:) = 5.671821873797286e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_6(:) = +-6.123719905959306e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRIGARK][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRIGARK][begin-stages-list] stage = 7, stage type = 1, tcur = 0.003 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow stage] z_7(:) = diff --git a/test/unit_tests/logging/test_logging_arkode_mristep_lvl5_2_1_0.out b/test/unit_tests/logging/test_logging_arkode_mristep_lvl5_2_1_0.out index 133719dd90..177c810152 100644 --- a/test/unit_tests/logging/test_logging_arkode_mristep_lvl5_2_1_0.out +++ b/test/unit_tests/logging/test_logging_arkode_mristep_lvl5_2_1_0.out @@ -223,21 +223,21 @@ Using GMRES iterative linear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-solver] solver = Newton [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 4.47758963639177, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 4.47758963639177, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][SUNLinSolSolve_SPGMR][linear-solver] solver = spgmr [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 6.332267990526456, status = continue +[INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 6.33226799052646, status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.001953262537794067 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.00195326253779407 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 2.487161031816153e-15 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 2.48716103181615e-15 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = success -[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 2.487161031816153e-15 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 4.477589426747882 +[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 2.48716103181615e-15 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 4.47758942674788 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 3.392821120378325e-09, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 3.39282112037832e-09, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success small rhs [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success @@ -249,12 +249,12 @@ Using GMRES iterative linear solver 1.224744871374707e+00 1.732039839126277e+00 [DEBUG][rank 0][mriStepInnerStepper_Reset][reset-inner-state] tR = 0.000435866521508459 -[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_2(:) = --8.897087832224679e-05 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow implicit RHS] Fsi_2(:) = -3.874495965781953e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_2(:) = +-8.897087832224679e-05 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRIGARK][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRIGARK][begin-stages-list] stage = 3, stage type = 0, tcur = 0.00071793326075423 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -338,21 +338,21 @@ Using GMRES iterative linear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-solver] solver = Newton [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 12.14796270408155, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 12.1479627040815, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][SUNLinSolSolve_SPGMR][linear-solver] solver = spgmr [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 17.17981361131466, status = continue +[INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 17.1798136113147, status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.005274126908384101 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.0052741269083841 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 3.622257051912133e-16 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 3.62225705191213e-16 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = success -[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 3.622257051912133e-16 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 12.14796838632732 +[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 3.62225705191213e-16 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 12.1479683863273 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 2.95110171963532e-08, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 2.95110171963532e-08, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success small rhs [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success @@ -364,12 +364,12 @@ Using GMRES iterative linear solver 1.224744836074958e+00 1.732021049568849e+00 [DEBUG][rank 0][mriStepInnerStepper_Reset][reset-inner-state] tR = 0.00071793326075423 -[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_4(:) = --1.465475048217419e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow implicit RHS] Fsi_4(:) = -3.457635846419825e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_4(:) = +-1.465475048217419e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRIGARK][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRIGARK][begin-stages-list] stage = 5, stage type = 0, tcur = 0.001 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -453,21 +453,21 @@ Using GMRES iterative linear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-solver] solver = Newton [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 23.56857051937634, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 23.5685705193763, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][SUNLinSolSolve_SPGMR][linear-solver] solver = spgmr [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 33.33099207424872, status = continue +[INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 33.3309920742487, status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.01018828512439107 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.0101882851243911 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 2.214393153928069e-15 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 2.21439315392807e-15 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = success -[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 2.214393153928069e-15 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 23.56859238029067 +[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 2.21439315392807e-15 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 23.5685923802907 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 1.15912027137731e-07, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 1.15912027137731e-07, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success small rhs [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success @@ -479,12 +479,12 @@ Using GMRES iterative linear solver 1.224744741166875e+00 1.731993073504207e+00 [DEBUG][rank 0][mriStepInnerStepper_Reset][reset-inner-state] tR = 0.001 -[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_6(:) = --2.041241329153601e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow implicit RHS] Fsi_6(:) = 5.632528877341102e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_6(:) = +-2.041241329153601e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRIGARK][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRIGARK][begin-stages-list] stage = 7, stage type = 1, tcur = 0.001 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow stage] z_7(:) = @@ -591,21 +591,21 @@ Using GMRES iterative linear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-solver] solver = Newton [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 25.02295754230141, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 25.0229575423014, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][SUNLinSolSolve_SPGMR][linear-solver] solver = spgmr [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 35.38780592700878, status = continue +[INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 35.3878059270088, status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.01085175829557421 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.0108517582955742 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 4.310220087272934e-15 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 4.31022008727293e-15 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = success -[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 4.310220087272934e-15 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 25.02297210770477 +[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 4.31022008727293e-15 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 25.0229721077048 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 1.309935552076447e-07, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 1.30993555207645e-07, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success small rhs [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success @@ -617,12 +617,12 @@ Using GMRES iterative linear solver 1.224744680342249e+00 1.731931778624172e+00 [DEBUG][rank 0][mriStepInnerStepper_Reset][reset-inner-state] tR = 0.00143586652150846 -[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_2(:) = --2.930949713773332e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow implicit RHS] Fsi_2(:) = -3.874591903012436e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_2(:) = +-2.930949713773332e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRIGARK][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRIGARK][begin-stages-list] stage = 3, stage type = 0, tcur = 0.00171793326075423 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -706,21 +706,21 @@ Using GMRES iterative linear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-solver] solver = Newton [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 45.98839421997347, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 45.9883942199735, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][SUNLinSolSolve_SPGMR][linear-solver] solver = spgmr [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 65.03741081764694, status = continue +[INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 65.0374108176469, status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.01993022435379269 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.0199302243537927 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 4.755385191836388e-15 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 4.75538519183639e-15 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = success -[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 4.755385191836388e-15 +[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 4.75538519183639e-15 [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 45.9884242098754 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 4.508449673731598e-07, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 4.5084496737316e-07, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success small rhs [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success @@ -732,12 +732,12 @@ Using GMRES iterative linear solver 1.224744587466616e+00 1.731880422875515e+00 [DEBUG][rank 0][mriStepInnerStepper_Reset][reset-inner-state] tR = 0.00171793326075423 -[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_4(:) = --3.506715672217582e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow implicit RHS] Fsi_4(:) = -3.457877693462479e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_4(:) = +-3.506715672217582e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRIGARK][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRIGARK][begin-stages-list] stage = 5, stage type = 0, tcur = 0.002 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -821,21 +821,21 @@ Using GMRES iterative linear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-solver] solver = Newton [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 70.70326784098599, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 70.703267840986, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][SUNLinSolSolve_SPGMR][linear-solver] solver = spgmr [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 99.98952028481987, status = continue +[INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 99.9895202848199, status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.03060090279475537 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.0306009027947554 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 2.730302057214856e-15 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 2.73030205721486e-15 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = success -[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 2.730302057214856e-15 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 70.70332355610354 +[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 2.73030205721486e-15 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 70.7033235561035 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 1.073884204481654e-06, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 1.07388420448165e-06, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success small rhs [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success @@ -847,12 +847,12 @@ Using GMRES iterative linear solver 1.224744434983606e+00 1.731819882857605e+00 [DEBUG][rank 0][mriStepInnerStepper_Reset][reset-inner-state] tR = 0.002 -[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_6(:) = --4.082481637676731e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow implicit RHS] Fsi_6(:) = 5.631951555615774e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_6(:) = +-4.082481637676731e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRIGARK][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRIGARK][begin-stages-list] stage = 7, stage type = 1, tcur = 0.002 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow stage] z_7(:) = @@ -959,21 +959,21 @@ Using GMRES iterative linear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-solver] solver = Newton [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 45.56773766224821, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 45.5677376622482, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][SUNLinSolSolve_SPGMR][linear-solver] solver = spgmr [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 64.4425126086107, status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.01974755058191297 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.019747550581913 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 2.326802582649019e-14 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 2.32680258264902e-14 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = success -[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 2.326802582649019e-14 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 45.56776698106854 +[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 2.32680258264902e-14 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 45.5677669810685 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 4.425034142015078e-07, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 4.42503414201508e-07, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success small rhs [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success @@ -985,12 +985,12 @@ Using GMRES iterative linear solver 1.224744285188675e+00 1.731708273800566e+00 [DEBUG][rank 0][mriStepInnerStepper_Reset][reset-inner-state] tR = 0.00243586652150846 -[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_2(:) = --4.972189178835323e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow implicit RHS] Fsi_2(:) = -3.875270711647729e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_2(:) = +-4.972189178835323e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRIGARK][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRIGARK][begin-stages-list] stage = 3, stage type = 0, tcur = 0.00271793326075423 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -1074,21 +1074,21 @@ Using GMRES iterative linear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-solver] solver = Newton [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 79.82720621181305, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 79.827206211813, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][SUNLinSolSolve_SPGMR][linear-solver] solver = spgmr [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 112.8927176710998, status = continue +[INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 112.8927176711, status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.03458090468243458 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.0345809046824346 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 4.710652380983711e-14 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 4.71065238098371e-14 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = success -[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 4.710652380983711e-14 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 79.82726049766872 +[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 4.71065238098371e-14 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 79.8272604976687 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 1.371022988742507e-06, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 1.37102298874251e-06, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success small rhs [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success @@ -1100,12 +1100,12 @@ Using GMRES iterative linear solver 1.224744134738065e+00 1.731624362133719e+00 [DEBUG][rank 0][mriStepInnerStepper_Reset][reset-inner-state] tR = 0.00271793326075423 -[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_4(:) = --5.547954542837812e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow implicit RHS] Fsi_4(:) = -3.458874981663813e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_4(:) = +-5.547954542837812e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRIGARK][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRIGARK][begin-stages-list] stage = 5, stage type = 0, tcur = 0.003 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -1189,21 +1189,21 @@ Using GMRES iterative linear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-solver] solver = Newton [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 117.8348215690057, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 117.834821569006, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][SUNLinSolSolve_SPGMR][linear-solver] solver = spgmr [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 166.6436027827016, status = continue +[INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 166.643602782702, status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.05100462411782345 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.0510046241178235 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 5.154650887905549e-14 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 5.15465088790555e-14 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = success -[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 5.154650887905549e-14 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 117.8349111207286 +[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 5.15465088790555e-14 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 117.834911120729 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 2.999444834513892e-06, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 2.99944483451389e-06, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success small rhs [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success @@ -1215,12 +1215,12 @@ Using GMRES iterative linear solver 1.224743924681878e+00 1.731531270273552e+00 [DEBUG][rank 0][mriStepInnerStepper_Reset][reset-inner-state] tR = 0.003 -[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_6(:) = --6.123719904920655e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow implicit RHS] Fsi_6(:) = 5.630279479280135e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_6(:) = +-6.123719904920655e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRIGARK][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRIGARK][begin-stages-list] stage = 7, stage type = 1, tcur = 0.003 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow stage] z_7(:) = diff --git a/test/unit_tests/logging/test_logging_arkode_mristep_lvl5_2_1_1.out b/test/unit_tests/logging/test_logging_arkode_mristep_lvl5_2_1_1.out index dc43fb1bb9..56dbc27b6c 100644 --- a/test/unit_tests/logging/test_logging_arkode_mristep_lvl5_2_1_1.out +++ b/test/unit_tests/logging/test_logging_arkode_mristep_lvl5_2_1_1.out @@ -225,12 +225,12 @@ Using dense direct linear solver [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] [INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 0 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 0, p-solves = 0, resnorm = 0 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 4.475638659455317 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 4.47563865945532 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] [INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 0 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 0, p-solves = 0, resnorm = 0 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0.001949917579925701 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0.0019499175799257 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -1.688716585288429e-11 @@ -240,12 +240,12 @@ Using dense direct linear solver 1.224744871374702e+00 1.732039839128359e+00 [DEBUG][rank 0][mriStepInnerStepper_Reset][reset-inner-state] tR = 0.000435866521508459 -[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_2(:) = --8.897087832224718e-05 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow implicit RHS] Fsi_2(:) = -3.874390811900406e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_2(:) = +-8.897087832224718e-05 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRIGARK][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRIGARK][begin-stages-list] stage = 3, stage type = 0, tcur = 0.00071793326075423 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -331,12 +331,12 @@ Using dense direct linear solver [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] [INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 0 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 0, p-solves = 0, resnorm = 0 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 12.14267813732762 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 12.1426781373276 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] [INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 0 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 0, p-solves = 0, resnorm = 0 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0.005287100222960252 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0.00528710022296025 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -3.531668548149428e-08 @@ -346,12 +346,12 @@ Using dense direct linear solver 1.224744836074903e+00 1.732021049576574e+00 [DEBUG][rank 0][mriStepInnerStepper_Reset][reset-inner-state] tR = 0.00071793326075423 -[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_4(:) = --1.465475048217485e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow implicit RHS] Fsi_4(:) = -3.457238563029700e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_4(:) = +-1.465475048217485e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRIGARK][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRIGARK][begin-stages-list] stage = 5, stage type = 0, tcur = 0.001 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -437,12 +437,12 @@ Using dense direct linear solver [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] [INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 0 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 0, p-solves = 0, resnorm = 0 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 23.55833268405183 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 23.5583326840518 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] [INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 0 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 0, p-solves = 0, resnorm = 0 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0.01025211853930287 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0.0102521185393029 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -1.302249691495050e-07 @@ -452,12 +452,12 @@ Using dense direct linear solver 1.224744741166620e+00 1.731993073522876e+00 [DEBUG][rank 0][mriStepInnerStepper_Reset][reset-inner-state] tR = 0.001 -[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_6(:) = --2.041241329154026e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow implicit RHS] Fsi_6(:) = 5.633513289323019e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_6(:) = +-2.041241329154026e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRIGARK][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRIGARK][begin-stages-list] stage = 7, stage type = 1, tcur = 0.001 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow stage] z_7(:) = @@ -566,12 +566,12 @@ Using dense direct linear solver [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] [INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 0 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 0, p-solves = 0, resnorm = 0 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 25.01207820816763 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 25.0120782081676 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] [INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 0 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 0, p-solves = 0, resnorm = 0 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0.01088917366864544 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0.0108891736686454 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -8.898775461780424e-08 @@ -581,12 +581,12 @@ Using dense direct linear solver 1.224744680341775e+00 1.731931778654458e+00 [DEBUG][rank 0][mriStepInnerStepper_Reset][reset-inner-state] tR = 0.00143586652150846 -[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_2(:) = --2.930949713774468e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow implicit RHS] Fsi_2(:) = -3.872982667138039e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_2(:) = +-2.930949713774468e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRIGARK][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRIGARK][begin-stages-list] stage = 3, stage type = 0, tcur = 0.00171793326075423 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -677,7 +677,7 @@ Using dense direct linear solver [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] [INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 0 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 0, p-solves = 0, resnorm = 0 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0.02001100770865585 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0.0200110077086558 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -1.818641587644074e-07 @@ -687,12 +687,12 @@ Using dense direct linear solver 1.224744587465371e+00 1.731880422927156e+00 [DEBUG][rank 0][mriStepInnerStepper_Reset][reset-inner-state] tR = 0.00171793326075423 -[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_4(:) = --3.506715672221149e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow implicit RHS] Fsi_4(:) = -3.455046521575918e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_4(:) = +-3.506715672221149e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRIGARK][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRIGARK][begin-stages-list] stage = 5, stage type = 0, tcur = 0.002 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -778,12 +778,12 @@ Using dense direct linear solver [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] [INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 0 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 0, p-solves = 0, resnorm = 0 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 70.67253645863913 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 70.6725364586391 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] [INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 0 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 0, p-solves = 0, resnorm = 0 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0.03076033257676168 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0.0307603325767617 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -3.343490240444961e-07 @@ -793,12 +793,12 @@ Using dense direct linear solver 1.224744434980505e+00 1.731819882942072e+00 [DEBUG][rank 0][mriStepInnerStepper_Reset][reset-inner-state] tR = 0.002 -[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_6(:) = --4.082481637687065e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow implicit RHS] Fsi_6(:) = 5.636794928714210e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_6(:) = +-4.082481637687065e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRIGARK][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRIGARK][begin-stages-list] stage = 7, stage type = 1, tcur = 0.002 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow stage] z_7(:) = @@ -907,7 +907,7 @@ Using dense direct linear solver [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] [INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 0 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 0, p-solves = 0, resnorm = 0 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 45.54793022210226 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 45.5479302221023 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -1.779486220103395e-07 @@ -917,12 +917,12 @@ Using dense direct linear solver 1.224744285194780e+00 1.731708322471386e+00 [DEBUG][rank 0][mriStepInnerStepper_Reset][reset-inner-state] tR = 0.00243586652150846 -[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_2(:) = --4.972189178810538e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow implicit RHS] Fsi_2(:) = -1.442950754707516e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_2(:) = +-4.972189178810538e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRIGARK][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRIGARK][begin-stages-list] stage = 3, stage type = 0, tcur = 0.00271793326075423 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -1008,7 +1008,7 @@ Using dense direct linear solver [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] [INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 0 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 0, p-solves = 0, resnorm = 0 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 79.77268774518882 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 79.7726877451888 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -3.283783577065699e-07 @@ -1018,12 +1018,12 @@ Using dense direct linear solver 1.224744134765044e+00 1.731624495883745e+00 [DEBUG][rank 0][mriStepInnerStepper_Reset][reset-inner-state] tR = 0.00271793326075423 -[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_4(:) = --5.547954542715601e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow implicit RHS] Fsi_4(:) = 3.223230302717166e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_4(:) = +-5.547954542715601e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRIGARK][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRIGARK][begin-stages-list] stage = 5, stage type = 0, tcur = 0.003 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -1109,7 +1109,7 @@ Using dense direct linear solver [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] [INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 0 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 0, p-solves = 0, resnorm = 0 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 117.7290852921697 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 117.72908529217 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -5.384377455891717e-07 @@ -1119,12 +1119,12 @@ Using dense direct linear solver 1.224743924705656e+00 1.731531529558495e+00 [DEBUG][rank 0][mriStepInnerStepper_Reset][reset-inner-state] tR = 0.003 -[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_6(:) = --6.123719904801765e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow implicit RHS] Fsi_6(:) = 1.858977001219174e-07 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow explicit RHS] Fse_6(:) = +-6.123719904801765e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRIGARK][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRIGARK][begin-stages-list] stage = 7, stage type = 1, tcur = 0.003 [DEBUG][rank 0][mriStep_TakeStepMRIGARK][slow stage] z_7(:) = diff --git a/test/unit_tests/logging/test_logging_arkode_mristep_lvl5_5_0.out b/test/unit_tests/logging/test_logging_arkode_mristep_lvl5_5_0.out index 6217f87262..ee41854b38 100644 --- a/test/unit_tests/logging/test_logging_arkode_mristep_lvl5_5_0.out +++ b/test/unit_tests/logging/test_logging_arkode_mristep_lvl5_5_0.out @@ -217,10 +217,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 8.484739573686154 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 8.48473957368615 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.002872021135550911 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.00287202113555091 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -3.986443443133593e-11 @@ -229,12 +229,12 @@ Using fixed-point nonlinear solver [DEBUG][rank 0][mriStep_TakeStepMRISR][slow stage] z_1(:) = 1.224744871351725e+00 1.732030023087570e+00 -[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_1(:) = --1.224744797946763e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRISR][slow implicit RHS] Fsi_1(:) = -7.340312367691422e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_1(:) = +-1.224744797946763e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRISR][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRISR][begin-stages-list] stage = 2, stage type = 0, tcur = 0.000266666666666667 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -314,7 +314,7 @@ Using fixed-point nonlinear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 1.676051713900995 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 1.67605171390099 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.000555028872656497 @@ -326,12 +326,12 @@ Using fixed-point nonlinear solver [DEBUG][rank 0][mriStep_TakeStepMRISR][slow stage] z_2(:) = 1.224744849149295e+00 1.732046701970666e+00 -[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_2(:) = --5.443310573859504e-05 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRISR][slow implicit RHS] Fsi_2(:) = 2.996851189225796e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_2(:) = +-5.443310573859504e-05 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRISR][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRISR][begin-stages-list] stage = 3, stage type = 0, tcur = 0.001 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -411,10 +411,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 23.56853099966965 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 23.5685309996697 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.007921345619572666 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.00792134561957267 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -1.020105221181502e-07 @@ -518,10 +518,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 36.76651861107406 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 36.7665186110741 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.01237684727403708 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.0123768472740371 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -1.225968906490633e-07 @@ -530,12 +530,12 @@ Using fixed-point nonlinear solver [DEBUG][rank 0][mriStep_TakeStepMRISR][slow stage] z_1(:) = 1.224744646784176e+00 1.731903012201602e+00 -[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_1(:) = --3.265985529176539e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRISR][slow implicit RHS] Fsi_1(:) = -7.334526689234511e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_1(:) = +-3.265985529176539e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRISR][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRISR][begin-stages-list] stage = 2, stage type = 0, tcur = 0.00126666666666667 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -615,10 +615,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 14.24598132523308 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 14.2459813252331 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.004779612504363237 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.00477961250436324 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -7.668243400267920e-08 @@ -627,12 +627,12 @@ Using fixed-point nonlinear solver [DEBUG][rank 0][mriStep_TakeStepMRISR][slow stage] z_2(:) = 1.224744692698633e+00 1.731958177393267e+00 -[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_2(:) = --2.585572192110587e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRISR][slow implicit RHS] Fsi_2(:) = 2.987532724605689e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_2(:) = +-2.585572192110587e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRISR][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRISR][begin-stages-list] stage = 3, stage type = 0, tcur = 0.002 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -712,10 +712,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 70.70322900226219 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 70.7032290022622 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.02376157169307341 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.0237615716930734 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -3.061609969229756e-07 @@ -819,10 +819,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 65.04718221192611 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 65.0471822119261 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.02187885806561487 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.0218788580656149 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -2.450607205391799e-07 @@ -831,12 +831,12 @@ Using fixed-point nonlinear solver [DEBUG][rank 0][mriStep_TakeStepMRISR][slow stage] z_1(:) = 1.224744218159349e+00 1.731660562748428e+00 -[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_1(:) = --5.307224627226973e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRISR][slow implicit RHS] Fsi_1(:) = -7.342085020533207e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_1(:) = +-5.307224627226973e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRISR][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRISR][begin-stages-list] stage = 2, stage type = 0, tcur = 0.00226666666666667 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -916,10 +916,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 26.81570536954298 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 26.815705369543 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.009003158261553504 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.0090031582615535 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -1.311224885430741e-07 @@ -928,12 +928,12 @@ Using fixed-point nonlinear solver [DEBUG][rank 0][mriStep_TakeStepMRISR][slow stage] z_2(:) = 1.224744332097581e+00 1.731754203213892e+00 -[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_2(:) = --4.626812033999880e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRISR][slow implicit RHS] Fsi_2(:) = 2.983481981856377e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_2(:) = +-4.626812033999880e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRISR][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRISR][begin-stages-list] stage = 3, stage type = 0, tcur = 0.003 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -1013,10 +1013,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 117.8347804233192 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 117.834780423319 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.03959595686322268 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.0395959568632227 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -5.103111738986100e-07 diff --git a/test/unit_tests/logging/test_logging_arkode_mristep_lvl5_5_1_1.out b/test/unit_tests/logging/test_logging_arkode_mristep_lvl5_5_1_1.out index 9286d35fb3..3a10010014 100644 --- a/test/unit_tests/logging/test_logging_arkode_mristep_lvl5_5_1_1.out +++ b/test/unit_tests/logging/test_logging_arkode_mristep_lvl5_5_1_1.out @@ -220,12 +220,12 @@ Using dense direct linear solver [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] [INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 0 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 0, p-solves = 0, resnorm = 0 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 8.480683168344489 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 8.48068316834449 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] [INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 0 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 0, p-solves = 0, resnorm = 0 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0.004053988673538109 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0.00405398867353811 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -3.510922608160773e-11 @@ -234,12 +234,12 @@ Using dense direct linear solver [DEBUG][rank 0][mriStep_TakeStepMRISR][slow stage] z_1(:) = 1.224744871356480e+00 1.732030023092318e+00 -[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_1(:) = --1.224744797942008e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRISR][slow implicit RHS] Fsi_1(:) = -7.341025925915888e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_1(:) = +-1.224744797942008e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRISR][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRISR][begin-stages-list] stage = 2, stage type = 0, tcur = 0.000266666666666667 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -321,12 +321,12 @@ Using dense direct linear solver [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] [INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 0 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 0, p-solves = 0, resnorm = 0 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 1.675256885913521 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 1.67525688591352 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] [INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 0 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 0, p-solves = 0, resnorm = 0 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0.0007986236837143737 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0.000798623683714374 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -2.224137351523309e-08 @@ -335,12 +335,12 @@ Using dense direct linear solver [DEBUG][rank 0][mriStep_TakeStepMRISR][slow stage] z_2(:) = 1.224744849150216e+00 1.732046701971602e+00 -[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_2(:) = --5.443310573855413e-05 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRISR][slow implicit RHS] Fsi_2(:) = 2.996713889663234e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_2(:) = +-5.443310573855413e-05 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRISR][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRISR][begin-stages-list] stage = 3, stage type = 0, tcur = 0.001 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -422,12 +422,12 @@ Using dense direct linear solver [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] [INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 0 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 0, p-solves = 0, resnorm = 0 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 23.55729306364141 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 23.5572930636414 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] [INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 0 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 0, p-solves = 0, resnorm = 0 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0.01125102523959608 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0.0112510252395961 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -1.019974050768401e-07 @@ -533,12 +533,12 @@ Using dense direct linear solver [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] [INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 0 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 0, p-solves = 0, resnorm = 0 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 36.74898235634446 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 36.7489823563445 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] [INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 0 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 0, p-solves = 0, resnorm = 0 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0.01755499643143604 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0.017554996431436 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -1.225895223600063e-07 @@ -547,12 +547,12 @@ Using dense direct linear solver [DEBUG][rank 0][mriStep_TakeStepMRISR][slow stage] z_1(:) = 1.224744646804662e+00 1.731903012222166e+00 -[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_1(:) = --3.265985529121911e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRISR][slow implicit RHS] Fsi_1(:) = -7.337595593553204e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_1(:) = +-3.265985529121911e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRISR][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRISR][begin-stages-list] stage = 2, stage type = 0, tcur = 0.00126666666666667 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -634,12 +634,12 @@ Using dense direct linear solver [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] [INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 0 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 0, p-solves = 0, resnorm = 0 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 14.23919293854171 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 14.2391929385417 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] [INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 0 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 0, p-solves = 0, resnorm = 0 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0.006799198459613769 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0.00679919845961377 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -7.667452361008834e-08 @@ -648,12 +648,12 @@ Using dense direct linear solver [DEBUG][rank 0][mriStep_TakeStepMRISR][slow stage] z_2(:) = 1.224744692719660e+00 1.731958177414409e+00 -[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_2(:) = --2.585572192066196e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRISR][slow implicit RHS] Fsi_2(:) = 2.984384338680091e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_2(:) = +-2.585572192066196e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRISR][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRISR][begin-stages-list] stage = 3, stage type = 0, tcur = 0.002 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -735,7 +735,7 @@ Using dense direct linear solver [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] [INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 0 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 0, p-solves = 0, resnorm = 0 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 70.66951636344861 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 70.6695163634486 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] [INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 0 @@ -846,7 +846,7 @@ Using dense direct linear solver [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] [INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 0 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 0, p-solves = 0, resnorm = 0 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 65.01617199523695 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 65.0161719952369 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -2.450469858076038e-07 @@ -855,12 +855,12 @@ Using dense direct linear solver [DEBUG][rank 0][mriStep_TakeStepMRISR][slow stage] z_1(:) = 1.224744218225516e+00 1.731660638862276e+00 -[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_1(:) = --5.307224626940249e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRISR][slow implicit RHS] Fsi_1(:) = -3.549626042518400e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_1(:) = +-5.307224626940249e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRISR][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRISR][begin-stages-list] stage = 2, stage type = 0, tcur = 0.00226666666666667 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -942,7 +942,7 @@ Using dense direct linear solver [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] [INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 0 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 0, p-solves = 0, resnorm = 0 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 26.80292351487314 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 26.8029235148731 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -1.311066262520789e-07 @@ -951,12 +951,12 @@ Using dense direct linear solver [DEBUG][rank 0][mriStep_TakeStepMRISR][slow stage] z_2(:) = 1.224744332165876e+00 1.731754234631864e+00 -[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_2(:) = --4.626812033741879e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRISR][slow implicit RHS] Fsi_2(:) = 4.540721694471736e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_2(:) = +-4.626812033741879e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRISR][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRISR][begin-stages-list] stage = 3, stage type = 0, tcur = 0.003 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -1038,7 +1038,7 @@ Using dense direct linear solver [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] [INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 0 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 0, p-solves = 0, resnorm = 0 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 117.7785945803303 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 117.77859458033 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success [DEBUG][rank 0][mriStep_Nls][correction] zcor(:) = -5.102176540643530e-07 From a76be018619d1eb82bb7ae1cff0c36d17745dbe4 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 13 Jan 2026 23:47:38 -0500 Subject: [PATCH 014/298] One more .out file --- ...test_logging_arkode_mristep_lvl5_5_1_0.out | 146 +++++++++--------- 1 file changed, 73 insertions(+), 73 deletions(-) diff --git a/test/unit_tests/logging/test_logging_arkode_mristep_lvl5_5_1_0.out b/test/unit_tests/logging/test_logging_arkode_mristep_lvl5_5_1_0.out index c671ba351a..764614d882 100644 --- a/test/unit_tests/logging/test_logging_arkode_mristep_lvl5_5_1_0.out +++ b/test/unit_tests/logging/test_logging_arkode_mristep_lvl5_5_1_0.out @@ -218,21 +218,21 @@ Using GMRES iterative linear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-solver] solver = Newton [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 8.484739573686154, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 8.48473957368615, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][SUNLinSolSolve_SPGMR][linear-solver] solver = spgmr [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 11.99923377831067, status = continue +[INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 11.9992337783107, status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] [INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.00406162884130716 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 2.063059984369675e-15 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 2.06305998436967e-15 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = success -[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 2.063059984369675e-15 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 8.484739095390244 +[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 2.06305998436967e-15 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 8.48473909539024 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 1.518442601738134e-08, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 1.51844260173813e-08, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success small rhs [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success @@ -243,12 +243,12 @@ Using GMRES iterative linear solver [DEBUG][rank 0][mriStep_TakeStepMRISR][slow stage] z_1(:) = 1.224744871356505e+00 1.732030023087570e+00 -[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_1(:) = --1.224744797941982e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRISR][slow implicit RHS] Fsi_1(:) = -7.341268391760586e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_1(:) = +-1.224744797941982e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRISR][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRISR][begin-stages-list] stage = 2, stage type = 0, tcur = 0.000266666666666667 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -328,21 +328,21 @@ Using GMRES iterative linear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-solver] solver = Newton [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 1.676051713893393, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 1.67605171389339, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][SUNLinSolSolve_SPGMR][linear-solver] solver = spgmr [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 2.370295065026708, status = continue +[INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 2.37029506502671, status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.0007849097524979764 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.000784909752497976 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 3.383351982668269e-16 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 3.38335198266827e-16 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = success -[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 3.383351982668269e-16 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 1.676055870102968 +[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 3.38335198266827e-16 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 1.67605587010297 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 2.704347032731375e-10, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 2.70434703273138e-10, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success small rhs [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success @@ -353,12 +353,12 @@ Using GMRES iterative linear solver [DEBUG][rank 0][mriStep_TakeStepMRISR][slow stage] z_2(:) = 1.224744849150216e+00 1.732046701970666e+00 -[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_2(:) = --5.443310573855411e-05 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRISR][slow implicit RHS] Fsi_2(:) = 2.996667026040624e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_2(:) = +-5.443310573855411e-05 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRISR][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRISR][begin-stages-list] stage = 3, stage type = 0, tcur = 0.001 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -438,21 +438,21 @@ Using GMRES iterative linear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-solver] solver = Newton [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 23.56853099966687, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 23.5685309996669, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][SUNLinSolSolve_SPGMR][linear-solver] solver = spgmr [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 33.3309361849396, status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.01120227584213543 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.0112022758421354 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] [INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 6.60368777501544e-15 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = success [INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 6.60368777501544e-15 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 23.56854944242167 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 23.5685494424217 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 1.271888306615336e-07, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 1.27188830661534e-07, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success small rhs [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success @@ -558,21 +558,21 @@ Using GMRES iterative linear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-solver] solver = Newton [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 36.7665186233225, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 36.7665186233225, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][SUNLinSolSolve_SPGMR][linear-solver] solver = spgmr [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 51.99570927834566, status = continue +[INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 51.9957092783457, status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.01750303644230491 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.0175030364423049 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 1.604262223531045e-15 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 1.60426222353105e-15 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = success -[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 1.604262223531045e-15 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 36.76654034473295 +[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 1.60426222353105e-15 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 36.7665403447329 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 3.144297547459707e-07, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 3.14429754745971e-07, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success small rhs [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success @@ -583,12 +583,12 @@ Using GMRES iterative linear solver [DEBUG][rank 0][mriStep_TakeStepMRISR][slow stage] z_1(:) = 1.224744646805198e+00 1.731903012201602e+00 -[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_1(:) = --3.265985529120480e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRISR][slow implicit RHS] Fsi_1(:) = -7.338731096471370e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_1(:) = +-3.265985529120480e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRISR][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRISR][begin-stages-list] stage = 2, stage type = 0, tcur = 0.00126666666666667 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -668,21 +668,21 @@ Using GMRES iterative linear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-solver] solver = Newton [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 14.24598132451491, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 14.2459813245149, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][SUNLinSolSolve_SPGMR][linear-solver] solver = spgmr [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 20.14685999844282, status = continue +[INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 20.1468599984428, status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.006759308947688205 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.00675930894768821 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 2.608861273900752e-15 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 2.60886127390075e-15 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = success -[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 2.608861273900752e-15 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 14.24599536090235 +[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 2.60886127390075e-15 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 14.2459953609024 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 4.511849085671779e-08, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 4.51184908567178e-08, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success small rhs [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success @@ -693,12 +693,12 @@ Using GMRES iterative linear solver [DEBUG][rank 0][mriStep_TakeStepMRISR][slow stage] z_2(:) = 1.224744692719953e+00 1.731958177393268e+00 -[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_2(:) = --2.585572192065578e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRISR][slow implicit RHS] Fsi_2(:) = 2.983268832342997e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_2(:) = +-2.585572192065578e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRISR][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRISR][begin-stages-list] stage = 3, stage type = 0, tcur = 0.002 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -778,21 +778,21 @@ Using GMRES iterative linear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-solver] solver = Newton [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 70.70322899958907, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 70.7032289995891, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][SUNLinSolSolve_SPGMR][linear-solver] solver = spgmr [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 99.98946535478959, status = continue +[INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 99.9894653547896, status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.03360221435494776 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.0336022143549478 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] [INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 2.00549274449084e-14 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = success [INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 2.00549274449084e-14 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 70.70328434748892 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 70.7032843474889 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 1.178330244583246e-06, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 1.17833024458325e-06, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success small rhs [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success @@ -898,21 +898,21 @@ Using GMRES iterative linear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-solver] solver = Newton [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 65.04718225429083, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 65.0471822542908, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][SUNLinSolSolve_SPGMR][linear-solver] solver = spgmr [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 91.99060733817259, status = continue +[INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 91.9906073381726, status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.03093990190327634 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.0309399019032763 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 2.683452123191181e-14 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 2.68345212319118e-14 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = success -[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 2.683452123191181e-14 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 65.04722612053793 +[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 2.68345212319118e-14 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 65.0472261205379 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 9.960147476444905e-07, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 9.96014747644491e-07, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success small rhs [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success @@ -923,12 +923,12 @@ Using GMRES iterative linear solver [DEBUG][rank 0][mriStep_TakeStepMRISR][slow stage] z_1(:) = 1.224744218210551e+00 1.731660562748439e+00 -[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_1(:) = --5.307224627005096e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRISR][slow implicit RHS] Fsi_1(:) = -7.352324912711484e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_1(:) = +-5.307224627005096e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRISR][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRISR][begin-stages-list] stage = 2, stage type = 0, tcur = 0.00226666666666667 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -1008,21 +1008,21 @@ Using GMRES iterative linear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-solver] solver = Newton [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 26.81570536668555, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 26.8157053666855, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][SUNLinSolSolve_SPGMR][linear-solver] solver = spgmr [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 37.9231342141677, status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.01273212495287925 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.0127321249528793 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 1.329909818489109e-15 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 1.32990981848911e-15 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = success -[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 1.329909818489109e-15 -[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 26.81572924537169 +[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 1.32990981848911e-15 +[INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 26.8157292453717 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 1.655080232345353e-07, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 1.65508023234535e-07, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success small rhs [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success @@ -1033,12 +1033,12 @@ Using GMRES iterative linear solver [DEBUG][rank 0][mriStep_TakeStepMRISR][slow stage] z_2(:) = 1.224744332167409e+00 1.731754203213906e+00 -[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_2(:) = --4.626812033736085e-04 - 0.000000000000000e+00 [DEBUG][rank 0][mriStep_TakeStepMRISR][slow implicit RHS] Fsi_2(:) = 2.969517044376617e-08 0.000000000000000e+00 +[DEBUG][rank 0][mriStep_TakeStepMRISR][slow explicit RHS] Fse_2(:) = +-4.626812033736085e-04 + 0.000000000000000e+00 [INFO][rank 0][mriStep_TakeStepMRISR][end-stages-list] status = success [INFO][rank 0][mriStep_TakeStepMRISR][begin-stages-list] stage = 3, stage type = 0, tcur = 0.003 [DEBUG][rank 0][mriStep_ComputeInnerForcing][forcing] forcing_0(:) = @@ -1118,21 +1118,21 @@ Using GMRES iterative linear solver [INFO][rank 0][mriStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-solver] solver = Newton [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 117.834780412349, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 117.834780412349, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][SUNLinSolSolve_SPGMR][linear-solver] solver = spgmr [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 166.6435445783995, status = continue +[INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] cur-iter = 0, total-iters = 0, res-norm = 166.6435445784, status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.05599239103857365 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 1, total-iters = 1, res-norm = 0.0559923910385736 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = continue [INFO][rank 0][SUNLinSolSolve_SPGMR][begin-iterations-list] -[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 2.047361656823588e-14 +[INFO][rank 0][SUNLinSolSolve_SPGMR][linear-iterate] cur-iter = 2, total-iters = 2, res-norm = 2.04736165682359e-14 [INFO][rank 0][SUNLinSolSolve_SPGMR][end-iterations-list] status = success -[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 2.047361656823588e-14 +[INFO][rank 0][arkLsSolve][end-linear-solve] status = success, iters = 2, p-solves = 0, resnorm = 2.04736165682359e-14 [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 1, total-iters = 1, update-norm = 117.834872652557 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_Newton][begin-iterations-list] -[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 3.291178273336047e-06, b-tol = 0.0005000000000000001, res-tol = 0.0007071067811865477 +[INFO][rank 0][arkLsSolve][begin-linear-solve] iterative = 1, b-norm = 3.29117827333605e-06, b-tol = 0.0005, res-tol = 0.000707106781186548 [INFO][rank 0][arkLsSolve][end-linear-solve] status = success small rhs [INFO][rank 0][SUNNonlinSolSolve_Newton][nonlinear-iterate] cur-iter = 2, total-iters = 2, update-norm = 0 [INFO][rank 0][SUNNonlinSolSolve_Newton][end-iterations-list] status = success From d6b4cb9b83641af5055558a7b7440679f8c17401 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 15 Jan 2026 16:31:50 -0500 Subject: [PATCH 015/298] Removed extraneous copy of yn into yout in ONE_STEP mode (since ycur aliases yout, and just prior to this copy ycur was copied into yn) --- CHANGELOG.md | 4 +++- doc/shared/RecentChanges.rst | 4 +++- src/arkode/arkode.c | 1 - 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02e4436a63..03cd6f947a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ The functions `CVodeGetUserDataB` and `IDAGetUserDataB` were added to CVODES and IDAS, respectively. +Removed extraneous copy of output vector when using ARKODE in ONE_STEP mode. + ### Bug Fixes On the initial time step with a user-supplied initial step size, ARKODE and @@ -44,7 +46,7 @@ called even when informational logging was disabled. ### Deprecation Notices -`SUNDIALSFileOpen` and `SUNDIALSFileClose` will be removed in the next major release. +`SUNDIALSFileOpen` and `SUNDIALSFileClose` will be removed in the next major release. Use `SUNFileOpen` and `SUNFileClose` instead. The `Convert` methods on the `sundials::kokkos:Vector`, `sundials::kokkos::DenseMatrix`, diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index 68fd0b06a6..89ff185822 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -8,6 +8,8 @@ The functions ``CVodeGetUserDataB`` and ``IDAGetUserDataB`` were added to CVODES and IDAS, respectively. +Removed extraneous copy of output vector when using ARKODE in ONE_STEP mode. + **Bug Fixes** On the initial time step with a user-supplied initial step size, ARKODE and @@ -43,7 +45,7 @@ called even when informational logging was disabled. **Deprecation Notices** -``SUNDIALSFileOpen`` and ``SUNDIALSFileClose`` will be removed in the next major release. +``SUNDIALSFileOpen`` and ``SUNDIALSFileClose`` will be removed in the next major release. Use :c:func:`SUNFileOpen` and :c:func:`SUNFileClose` instead. The ``Convert`` methods on the ``sundials::kokkos:Vector``, ``sundials::kokkos::DenseMatrix``, diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index cb985d63c5..738052a887 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -1149,7 +1149,6 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, { istate = ARK_SUCCESS; ark_mem->tretlast = *tret = ark_mem->tcur; - N_VScale(ONE, ark_mem->yn, yout); ark_mem->next_h = ark_mem->hprime; break; } From d7472d5fb400055f220bcc22b08f8d707560c646 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 15 Jan 2026 17:09:53 -0500 Subject: [PATCH 016/298] Ran formatter --- src/arkode/arkode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 738052a887..8706c95ed0 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -1149,7 +1149,7 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, { istate = ARK_SUCCESS; ark_mem->tretlast = *tret = ark_mem->tcur; - ark_mem->next_h = ark_mem->hprime; + ark_mem->next_h = ark_mem->hprime; break; } From 40c1a6876ded64659e435e8ce7f0677baea3e22f Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 15 Jan 2026 23:15:39 -0500 Subject: [PATCH 017/298] General LSRKStep cleanup, including always using (tcur,ycur) as the current stage solution, and to only call RHS on that vector --- src/arkode/arkode_lsrkstep.c | 778 +++++++++++++++++++---------------- 1 file changed, 415 insertions(+), 363 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index eb4e7b5539..fc5145d40a 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -537,6 +537,10 @@ int lsrkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, weighted local error if an embedding is present; otherwise it should be 0. + The variables (ark_mem->tcur, ark_mem->ycur) should + contain the current time and solution at each stage of within + the time step. + The input/output variable nflagPtr is generally used in ARKODE to gauge the convergence of any algebraic solvers. However, since the STS step routines do not involve an algebraic solve, this variable @@ -575,6 +579,10 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) sunrealtype* cvals = step_mem->cvals; N_Vector* Xvecs = step_mem->Xvecs; + /* initialize the current solution */ + ark_mem->tcur = ark_mem->tn; + N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + /* Compute dominant eigenvalue and update stats */ if (step_mem->dom_eig_update) { @@ -625,14 +633,14 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) "stage = %i, tcur = " SUN_FORMAT_G, 0, ark_mem->tcur); SUNLogExtraDebugVec(ARK_LOGGER, "stage", ark_mem->yn, "z_0(:) ="); - /* Compute RHS function, if necessary. */ + /* Compute RHS function for the start of the step, if necessary. */ if ((!ark_mem->fn_is_current && ark_mem->initsetup) || (step_mem->step_nst != ark_mem->nst)) { /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -662,33 +670,29 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Track the number of successful steps to determine if the previous step failed. */ step_mem->step_nst = ark_mem->nst + 1; - w0 = (ONE + TWO / (c13 * SUNSQR((sunrealtype)(step_mem->req_stages)))); - + /* Initialize constants */ + w0 = (ONE + TWO / (c13 * SUNSQR((sunrealtype)(step_mem->req_stages)))); temp1 = SUNSQR(w0) - ONE; temp2 = SUNRsqrt(temp1); arg = step_mem->req_stages * SUNRlog(w0 + temp2); - - w1 = SUNRsinh(arg) * temp1 / + w1 = SUNRsinh(arg) * temp1 / (SUNRcosh(arg) * step_mem->req_stages * temp2 - w0 * SUNRsinh(arg)); - bjm1 = ONE / SUNSQR(TWO * w0); bjm2 = bjm1; + mus = w1 * bjm1; - /* Evaluate the first stage */ + /* Evaluate the first stage and initialize embedding */ + ark_mem->tcur = ark_mem->tn + ark_mem->h * mus; + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "stage = %i, tcur = " SUN_FORMAT_G, 1, ark_mem->tcur); + N_VLinearSum(ONE, ark_mem->yn, ark_mem->h * mus, ark_mem->fn, ark_mem->ycur); N_VScale(ONE, ark_mem->yn, ark_mem->tempv1); - mus = w1 * bjm1; - - SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, - 1, ark_mem->tn + ark_mem->h * mus); - - N_VLinearSum(ONE, ark_mem->yn, ark_mem->h * mus, ark_mem->fn, ark_mem->tempv2); - /* apply user-supplied stage postprocessing function (if supplied) */ if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->PostProcessStage(ark_mem->tn + ark_mem->h * mus, - ark_mem->tempv2, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -697,6 +701,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } } + /* Initialize constants for stage loop */ thjm2 = ZERO; thjm1 = mus; zjm1 = w0; @@ -709,20 +714,11 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Evaluate stages j = 2,...,step_mem->req_stages */ for (int j = 2; j <= step_mem->req_stages; j++) { - zj = TWO * w0 * zjm1 - zjm2; - dzj = TWO * w0 * dzjm1 - dzjm2 + TWO * zjm1; - d2zj = TWO * w0 * d2zjm1 - d2zjm2 + FOUR * dzjm1; - bj = d2zj / SUNSQR(dzj); - ajm1 = ONE - zjm1 * bjm1; - mu = TWO * w0 * bj / bjm1; - nu = -bj / bjm2; - mus = mu * w1 / w0; - /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h * thjm1, - ark_mem->tempv2, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -731,9 +727,10 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } } - /* Use the ycur array for temporary storage here */ - retval = step_mem->fe(ark_mem->tcur + ark_mem->h * thjm1, ark_mem->tempv2, - ark_mem->ycur, ark_mem->user_data); + /* Evaluate RHS and store in tempv3 */ + ark_mem->tcur = ark_mem->tn + ark_mem->h * thjm1; + retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv3, + ark_mem->user_data); step_mem->nfe++; SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->ycur, @@ -746,15 +743,24 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - /* compute new stage time factor */ - thj = mu * thjm1 + nu * thjm2 + mus * (ONE - ajm1); - + /* Copy previous stage solution into tempv2 */ + N_VScale(ONE, ark_mem->ycur, ark_mem->tempv2); + + /* Compute new stage value and store in ycur */ + zj = TWO * w0 * zjm1 - zjm2; + dzj = TWO * w0 * dzjm1 - dzjm2 + TWO * zjm1; + d2zj = TWO * w0 * d2zjm1 - d2zjm2 + FOUR * dzjm1; + bj = d2zj / SUNSQR(dzj); + ajm1 = ONE - zjm1 * bjm1; + mu = TWO * w0 * bj / bjm1; + nu = -bj / bjm2; + mus = mu * w1 / w0; + thj = mu * thjm1 + nu * thjm2 + mus * (ONE - ajm1); + ark_mem->tcur = ark_mem->tn + ark_mem->h * thj; SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "stage = %i, tcur = " SUN_FORMAT_G, j, - ark_mem->tn + ark_mem->h * thj); - + "stage = %i, tcur = " SUN_FORMAT_G, j, ark_mem->tcur); cvals[0] = mus * ark_mem->h; - Xvecs[0] = ark_mem->ycur; + Xvecs[0] = ark_mem->tempv3; cvals[1] = nu; Xvecs[1] = ark_mem->tempv1; cvals[2] = ONE - mu - nu; @@ -763,8 +769,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) Xvecs[3] = ark_mem->tempv2; cvals[4] = -mus * ajm1 * ark_mem->h; Xvecs[4] = ark_mem->fn; - - retval = N_VLinearCombination(5, cvals, Xvecs, ark_mem->ycur); + retval = N_VLinearCombination(5, cvals, Xvecs, ark_mem->ycur); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -775,8 +780,8 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* apply user-supplied stage postprocessing function (if supplied) */ if (ark_mem->PostProcessStage != NULL && j < step_mem->req_stages) { - retval = ark_mem->PostProcessStage(ark_mem->tcur + ark_mem->h * thj, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -788,13 +793,12 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Shift the data for the next stage */ if (j < step_mem->req_stages) { - /* To avoid two data copies we swap ARKODE's tempv1 and tempv2 pointers*/ + /* Swap tempv1 and tempv2 pointers to handle two-previous-stage logic */ N_Vector temp = ark_mem->tempv1; ark_mem->tempv1 = ark_mem->tempv2; ark_mem->tempv2 = temp; - N_VScale(ONE, ark_mem->ycur, ark_mem->tempv2); - + /* Update coefficients to handle the two-previous stage logic */ thjm2 = thjm1; thjm1 = thj; bjm2 = bjm1; @@ -812,33 +816,36 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogExtraDebugVec(ARK_LOGGER, "updated solution", ark_mem->ycur, "ycur(:) ="); SUNLogInfo(ARK_LOGGER, "begin-compute-embedding", ""); - /* Compute yerr (if step adaptivity enabled) */ - if (!ark_mem->fixedstep) + /* final stage processing */ + ark_mem->tcur = ark_mem->tn + ark_mem->h; + + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessRHS != NULL) { - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h, ark_mem->ycur, - ark_mem->user_data); - if (retval != 0) - { - SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; - } + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; } + } - retval = step_mem->fe(ark_mem->tcur + ark_mem->h, ark_mem->ycur, - ark_mem->tempv2, ark_mem->user_data); - step_mem->nfe++; + retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv3, + ark_mem->user_data); + step_mem->nfe++; - SUNLogExtraDebugVec(ARK_LOGGER, "solution RHS", ark_mem->tempv2, "F_n(:) ="); - SUNLogInfoIf(retval != 0, ARK_LOGGER, "end-compute-embedding", - "status = failed rhs eval, retval = %i", retval); + SUNLogExtraDebugVec(ARK_LOGGER, "solution RHS", ark_mem->tempv3, "F_n(:) ="); + SUNLogInfoIf(retval != 0, ARK_LOGGER, "end-compute-embedding", + "status = failed rhs eval, retval = %i", retval); - if (retval < 0) { return ARK_RHSFUNC_FAIL; } - if (retval > 0) { return RHSFUNC_RECVR; } + if (retval < 0) { return ARK_RHSFUNC_FAIL; } + if (retval > 0) { return RHSFUNC_RECVR; } + /* Compute yerr (if step adaptivity enabled) */ + if (!ark_mem->fixedstep) + { /* Estimate the local error and compute its weighted RMS norm */ cvals[0] = p8; Xvecs[0] = ark_mem->yn; @@ -847,7 +854,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) cvals[2] = p4 * ark_mem->h; Xvecs[2] = ark_mem->fn; cvals[3] = p4 * ark_mem->h; - Xvecs[3] = ark_mem->tempv2; + Xvecs[3] = ark_mem->tempv3; retval = N_VLinearCombination(4, cvals, Xvecs, ark_mem->tempv1); if (retval != 0) @@ -859,34 +866,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) *dsmPtr = N_VWrmsNorm(ark_mem->tempv1, ark_mem->ewt); lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr); } - else - { - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) - { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h, ark_mem->ycur, - ark_mem->user_data); - if (retval != 0) - { - SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; - } - } - - retval = step_mem->fe(ark_mem->tcur + ark_mem->h, ark_mem->ycur, - ark_mem->tempv2, ark_mem->user_data); - step_mem->nfe++; - - SUNLogExtraDebugVec(ARK_LOGGER, "solution RHS", ark_mem->tempv2, "F_n(:) ="); - SUNLogInfoIf(retval != 0, ARK_LOGGER, "end-compute-embedding", - "status = failed rhs eval, retval = %i", retval); - - if (retval < 0) { return ARK_RHSFUNC_FAIL; } - if (retval > 0) { return RHSFUNC_RECVR; } - - lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr); - } + else { lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr); } SUNLogInfo(ARK_LOGGER, "end-compute-embedding", "status = success"); @@ -903,6 +883,10 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) weighted local error if an embedding is present; otherwise it should be 0. + The variables (ark_mem->tcur, ark_mem->ycur) should + contain the current time and solution at each stage of within + the time step. + The input/output variable nflagPtr is generally used in ARKODE to gauge the convergence of any algebraic solvers. However, since the STS step routines do not involve an algebraic solve, this variable @@ -938,6 +922,10 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) sunrealtype* cvals = step_mem->cvals; N_Vector* Xvecs = step_mem->Xvecs; + /* Initialize the current solution */ + ark_mem->tcur = ark_mem->tn; + N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + /* Compute dominant eigenvalue and update stats */ if (step_mem->dom_eig_update) { @@ -994,14 +982,14 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) "stage = %i, tcur = " SUN_FORMAT_G, 0, ark_mem->tcur); SUNLogExtraDebugVec(ARK_LOGGER, "stage", ark_mem->yn, "z_0(:) ="); - /* Compute RHS function, if necessary. */ + /* Compute RHS function for the start of the step, if necessary. */ if ((!ark_mem->fn_is_current && ark_mem->initsetup) || (step_mem->step_nst != ark_mem->nst)) { /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -1010,7 +998,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) return ARK_POSTPROCESS_STAGE_FAIL; } } - retval = step_mem->fe(ark_mem->tn, ark_mem->yn, ark_mem->fn, + retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->fn, ark_mem->user_data); step_mem->nfe++; if (retval != ARK_SUCCESS) @@ -1029,27 +1017,25 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Track the number of successful steps to determine if the previous step failed. */ step_mem->step_nst = ark_mem->nst + 1; - w1 = FOUR / ((step_mem->req_stages + TWO) * (step_mem->req_stages - ONE)); - + /* Initialize constants */ + w1 = FOUR / ((step_mem->req_stages + TWO) * (step_mem->req_stages - ONE)); bjm2 = ONE / THREE; bjm1 = bjm2; - - /* Evaluate the first stage */ - N_VScale(ONE, ark_mem->yn, ark_mem->tempv1); - mus = w1 * bjm1; cjm1 = mus; - SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, - 1, ark_mem->tn + ark_mem->h * mus); - - N_VLinearSum(ONE, ark_mem->yn, ark_mem->h * mus, ark_mem->fn, ark_mem->tempv2); + /* Evaluate the first stage and initialize embedding */ + ark_mem->tcur = ark_mem->tn + ark_mem->h * mus; + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "stage = %i, tcur = " SUN_FORMAT_G, 1, ark_mem->tcur); + N_VLinearSum(ONE, ark_mem->yn, ark_mem->h * mus, ark_mem->fn, ark_mem->ycur); + N_VScale(ONE, ark_mem->yn, ark_mem->tempv1); /* apply user-supplied stage postprocessing function (if supplied) */ if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->PostProcessStage(ark_mem->tn + ark_mem->h * mus, - ark_mem->tempv2, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1061,19 +1047,14 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Evaluate stages j = 2,...,step_mem->req_stages */ for (int j = 2; j <= step_mem->req_stages; j++) { - temj = (j + TWO) * (j - ONE); - bj = temj / (TWO * j * (j + ONE)); - ajm1 = ONE - bjm1; - mu = (TWO * j - ONE) / j * (bj / bjm1); - nu = -(j - ONE) / j * (bj / bjm2); - mus = w1 * mu; - cj = temj * w1 / FOUR; + /* Evaluate RHS and store in tempv3 */ + ark_mem->tcur = ark_mem->tn + ark_mem->h * cjm1; /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h * cjm1, - ark_mem->tempv2, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1083,11 +1064,11 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } /* Use the ycur array for temporary storage here */ - retval = step_mem->fe(ark_mem->tcur + ark_mem->h * cjm1, ark_mem->tempv2, - ark_mem->ycur, ark_mem->user_data); + retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv3, + ark_mem->user_data); step_mem->nfe++; - SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->ycur, + SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->tempv3, "F_%i(:) =", j - 1); SUNLogInfoIf(retval != 0, ARK_LOGGER, "end-stages-list", "status = failed rhs eval, retval = %i", retval); @@ -1096,12 +1077,23 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (retval > 0) { return RHSFUNC_RECVR; } SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "stage = %i, tcur = " SUN_FORMAT_G, j, - ark_mem->tn + ark_mem->h * cj); + /* Copy previous stage solution into tempv2 */ + N_VScale(ONE, ark_mem->ycur, ark_mem->tempv2); + + /* Compute new stage value and store in ycur */ + temj = (j + TWO) * (j - ONE); + bj = temj / (TWO * j * (j + ONE)); + ajm1 = ONE - bjm1; + mu = (TWO * j - ONE) / j * (bj / bjm1); + nu = -(j - ONE) / j * (bj / bjm2); + mus = w1 * mu; + cj = temj * w1 / FOUR; + ark_mem->tcur = ark_mem->tn + ark_mem->h * cj; + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "stage = %i, tcur = " SUN_FORMAT_G, j, ark_mem->tcur); cvals[0] = mus * ark_mem->h; - Xvecs[0] = ark_mem->ycur; + Xvecs[0] = ark_mem->tempv3; cvals[1] = nu; Xvecs[1] = ark_mem->tempv1; cvals[2] = ONE - mu - nu; @@ -1110,8 +1102,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) Xvecs[3] = ark_mem->tempv2; cvals[4] = -mus * ajm1 * ark_mem->h; Xvecs[4] = ark_mem->fn; - - retval = N_VLinearCombination(5, cvals, Xvecs, ark_mem->ycur); + retval = N_VLinearCombination(5, cvals, Xvecs, ark_mem->ycur); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1122,8 +1113,8 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* apply user-supplied stage postprocessing function (if supplied) */ if (ark_mem->PostProcessStage != NULL && j < step_mem->req_stages) { - retval = ark_mem->PostProcessStage(ark_mem->tcur + ark_mem->h * cj, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1140,8 +1131,6 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) ark_mem->tempv1 = ark_mem->tempv2; ark_mem->tempv2 = temp; - N_VScale(ONE, ark_mem->ycur, ark_mem->tempv2); - cjm1 = cj; bjm2 = bjm1; bjm1 = bj; @@ -1151,11 +1140,13 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); SUNLogExtraDebugVec(ARK_LOGGER, "updated solution", ark_mem->ycur, "ycur(:) ="); SUNLogInfo(ARK_LOGGER, "begin-compute-embedding", ""); + /* final stage processing */ + ark_mem->tcur = ark_mem->tn + ark_mem->h; /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h, ark_mem->ycur, + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -1164,12 +1155,11 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) return ARK_POSTPROCESS_STAGE_FAIL; } } - - retval = step_mem->fe(ark_mem->tcur + ark_mem->h, ark_mem->ycur, - ark_mem->tempv2, ark_mem->user_data); + retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv3, + ark_mem->user_data); step_mem->nfe++; - SUNLogExtraDebugVec(ARK_LOGGER, "solution RHS", ark_mem->tempv2, "F_n(:) ="); + SUNLogExtraDebugVec(ARK_LOGGER, "solution RHS", ark_mem->tempv3, "F_n(:) ="); SUNLogInfoIf(retval != 0, ARK_LOGGER, "end-compute-embedding", "status = failed rhs eval, retval = %i", retval); @@ -1187,7 +1177,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) cvals[2] = p4 * ark_mem->h; Xvecs[2] = ark_mem->fn; cvals[3] = p4 * ark_mem->h; - Xvecs[3] = ark_mem->tempv2; + Xvecs[3] = ark_mem->tempv3; retval = N_VLinearCombination(4, cvals, Xvecs, ark_mem->tempv1); if (retval != 0) @@ -1216,6 +1206,10 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) weighted local error if an embedding is present; otherwise it should be 0. + The variables (ark_mem->tcur, ark_mem->ycur) should + contain the current time and solution at each stage of within + the time step. + The input/output variable nflagPtr is used to gauge convergence of any algebraic solvers within the step. As this routine involves no algebraic solve, it is set to 0 (success). @@ -1243,37 +1237,46 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr sunrealtype* cvals = step_mem->cvals; N_Vector* Xvecs = step_mem->Xvecs; - sunrealtype rs = (sunrealtype)step_mem->req_stages; - sunrealtype sm1inv = ONE / (rs - ONE); + /* Initialize the current solution */ + ark_mem->tcur = ark_mem->tn; + N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + + /* Initialize method coefficients */ + const sunrealtype rs = (sunrealtype)step_mem->req_stages; + const sunrealtype sm1inv = ONE / (rs - ONE); + const sunrealtype hsm1inv = ark_mem->h * sm1inv; + const sunrealtype rsinv = ONE / rs; + const sunrealtype hrsinv = ark_mem->h * rsinv; sunrealtype bt1, bt2, bt3; /* Embedding coefficients differ when req_stages == 2 */ if (step_mem->req_stages == 2) { - bt1 = SUN_RCONST( - 0.694021459207626); // due to https://doi.org/10.1016/j.cam.2022.114325 pg 5 + // from https://doi.org/10.1016/j.cam.2022.114325 pg 5 + bt1 = ark_mem->h * SUN_RCONST(0.694021459207626); bt2 = ZERO; - bt3 = ONE - bt1; + bt3 = ark_mem->h * (ONE - SUN_RCONST(0.694021459207626)); } else { - bt1 = (rs + ONE) / (rs * rs); - bt2 = ONE / rs; - bt3 = (rs - ONE) / (rs * rs); + bt1 = ark_mem->h * (rs + ONE) / (rs * rs); + bt2 = hrsinv; + bt3 = ark_mem->h * (rs - ONE) / (rs * rs); } - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "stage = %i, tcur = " SUN_FORMAT_G, 0, ark_mem->tcur); + +/* Begin first stage */ + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "stage = %i, tcur = " SUN_FORMAT_G, 0, ark_mem->tcur); SUNLogExtraDebugVec(ARK_LOGGER, "stage", ark_mem->yn, "z_0(:) ="); /* The method is not FSAL. Therefore, fn ​is computed at the beginning - of the step unless a renewed step or ARKODE updated fn. */ + of the step unless the previous step failed or ARKODE updated fn. */ if (!ark_mem->fn_is_current) { /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -1283,12 +1286,11 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - retval = step_mem->fe(ark_mem->tn, ark_mem->yn, ark_mem->fn, + retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->fn, ark_mem->user_data); step_mem->nfe++; if (retval != ARK_SUCCESS) { - SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->fn, "F_0(:) ="); SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed rhs eval, retval = %i", retval); return (ARK_RHSFUNC_FAIL); @@ -1298,21 +1300,22 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->fn, "F_0(:) ="); SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, - 1, ark_mem->tn + ark_mem->h * sm1inv); - N_VLinearSum(ONE, ark_mem->yn, sm1inv * ark_mem->h, ark_mem->fn, ark_mem->ycur); + /* Begin the second stage, and accumulate embedding into tempv1 */ + ark_mem->tcur = ark_mem->tn + hsm1inv; + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "stage = %i, tcur = " SUN_FORMAT_G, 1, ark_mem->tcur); + N_VLinearSum(ONE, ark_mem->yn, hsm1inv, ark_mem->fn, ark_mem->ycur); if (!ark_mem->fixedstep) { - N_VLinearSum(ONE, ark_mem->yn, bt1 * ark_mem->h, ark_mem->fn, - ark_mem->tempv1); + N_VLinearSum(ONE, ark_mem->yn, bt1, ark_mem->fn, ark_mem->tempv1); } /* apply user-supplied stage postprocessing function (if supplied) */ if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->PostProcessStage(ark_mem->tn + sm1inv * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1324,12 +1327,14 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Evaluate stages j = 2,...,step_mem->req_stages - 1 */ for (int j = 2; j < step_mem->req_stages; j++) { + /* Complete previous stage by evaluating RHS and storing it in tempv2 */ + ark_mem->tcur = ark_mem->tn + (j - 1) * hsm1inv; + /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ((sunrealtype)j - ONE) * - sm1inv * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1338,9 +1343,8 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - retval = - step_mem->fe(ark_mem->tcur + ((sunrealtype)j - ONE) * sm1inv * ark_mem->h, - ark_mem->ycur, ark_mem->tempv2, ark_mem->user_data); + retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv2, + ark_mem->user_data); step_mem->nfe++; SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->tempv2, @@ -1352,23 +1356,22 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (retval > 0) { return RHSFUNC_RECVR; } SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "stage = %i, tcur = " SUN_FORMAT_G, j, - ark_mem->tn + ark_mem->h * j * sm1inv); - N_VLinearSum(ONE, ark_mem->ycur, sm1inv * ark_mem->h, ark_mem->tempv2, - ark_mem->ycur); + /* Begin the j-th stage by updating the state and embedding */ + ark_mem->tcur = ark_mem->tn + j * hsm1inv; + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "stage = %i, tcur = " SUN_FORMAT_G, j, ark_mem->tcur); + N_VLinearSum(ONE, ark_mem->ycur, hsm1inv, ark_mem->tempv2, ark_mem->ycur); if (!ark_mem->fixedstep) { - N_VLinearSum(ONE, ark_mem->tempv1, bt2 * ark_mem->h, ark_mem->tempv2, - ark_mem->tempv1); + N_VLinearSum(ONE, ark_mem->tempv1, bt2, ark_mem->tempv2, ark_mem->tempv1); } /* apply user-supplied stage postprocessing function (if supplied) */ if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->PostProcessStage(ark_mem->tcur + j * sm1inv * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1378,11 +1381,11 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - /* Evaluate the last stage for j = step_mem->req_stages */ - + /* Complete the next-to-last stage by evaluating the RHS and storing it in tempv2 */ + ark_mem->tcur = ark_mem->tn + ark_mem->h; if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h, ark_mem->ycur, + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -1391,8 +1394,8 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr return ARK_POSTPROCESS_STAGE_FAIL; } } - retval = step_mem->fe(ark_mem->tcur + ark_mem->h, ark_mem->ycur, - ark_mem->tempv2, ark_mem->user_data); + retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv2, + ark_mem->user_data); step_mem->nfe++; SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->tempv2, @@ -1404,17 +1407,17 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (retval > 0) { return RHSFUNC_RECVR; } SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, - step_mem->req_stages, ark_mem->tn + ark_mem->h); + /* Compute the step solution */ + SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, + step_mem->req_stages, ark_mem->tcur); cvals[0] = ONE / (sm1inv * rs); Xvecs[0] = ark_mem->ycur; - cvals[1] = ONE / rs; + cvals[1] = rsinv; Xvecs[1] = ark_mem->yn; - cvals[2] = ark_mem->h / rs; + cvals[2] = hrsinv; Xvecs[2] = ark_mem->tempv2; - - retval = N_VLinearCombination(3, cvals, Xvecs, ark_mem->ycur); + retval = N_VLinearCombination(3, cvals, Xvecs, ark_mem->ycur); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1428,11 +1431,9 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Compute yerr (if step adaptivity enabled) */ if (!ark_mem->fixedstep) { - N_VLinearSum(ONE, ark_mem->tempv1, bt3 * ark_mem->h, ark_mem->tempv2, - ark_mem->tempv1); + N_VLinearSum(ONE, ark_mem->tempv1, bt3, ark_mem->tempv2, ark_mem->tempv1); SUNLogExtraDebugVec(ARK_LOGGER, "embedded solution", ark_mem->tempv1, "y_embedded(:) ="); - N_VLinearSum(ONE, ark_mem->ycur, -ONE, ark_mem->tempv1, ark_mem->tempv1); *dsmPtr = N_VWrmsNorm(ark_mem->tempv1, ark_mem->ewt); } @@ -1454,6 +1455,10 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr weighted local error if an embedding is present; otherwise it should be 0. + The variables (ark_mem->tcur, ark_mem->ycur) should + contain the current time and solution at each stage of within + the time step. + The input/output variable nflagPtr is used to gauge convergence of any algebraic solvers within the step. As this routine involves no algebraic solve, it is set to 0 (success). @@ -1481,11 +1486,19 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr sunrealtype* cvals = step_mem->cvals; N_Vector* Xvecs = step_mem->Xvecs; - sunrealtype rs = (sunrealtype)step_mem->req_stages; - sunrealtype rn = SUNRsqrt(rs); - sunrealtype rat = ONE / (rs - rn); - int in = (int)SUNRround(rn); + /* Initialize the current solution */ + ark_mem->tcur = ark_mem->tn; + N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + + /* Initialize method coefficients */ + const sunrealtype rs = (sunrealtype)step_mem->req_stages; + const sunrealtype rn = SUNRsqrt(rs); + const sunrealtype hrat = ark_mem->h / (rs - rn); + const sunrealtype rsinv = ONE / rs; + const sunrealtype hrsinv = ark_mem->h * rsinv; + const int in = (int)SUNRround(rn); + /* Begin the first stage */ SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 0, ark_mem->tcur); SUNLogExtraDebugVec(ARK_LOGGER, "stage", ark_mem->yn, "z_0(:) ="); @@ -1497,7 +1510,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -1507,7 +1520,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - retval = step_mem->fe(ark_mem->tn, ark_mem->yn, ark_mem->fn, + retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->fn, ark_mem->user_data); step_mem->nfe++; if (retval != ARK_SUCCESS) @@ -1522,20 +1535,22 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->fn, "F_0(:) ="); SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, - 1, ark_mem->tn + rat * ark_mem->h); - N_VLinearSum(ONE, ark_mem->yn, ark_mem->h * rat, ark_mem->fn, ark_mem->ycur); + /* Begin the second stage, and accumulate embedding into tempv1 */ + ark_mem->tcur = ark_mem->tn + hrat; + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "stage = %i, tcur = " SUN_FORMAT_G, 1, ark_mem->tcur); + N_VLinearSum(ONE, ark_mem->yn, hrat, ark_mem->fn, ark_mem->ycur); if (!ark_mem->fixedstep) { - N_VLinearSum(ONE, ark_mem->yn, ark_mem->h / rs, ark_mem->fn, ark_mem->tempv1); + N_VLinearSum(ONE, ark_mem->yn, hrsinv, ark_mem->fn, ark_mem->tempv1); } /* apply user-supplied stage postprocessing function (if supplied) */ if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->PostProcessStage(ark_mem->tn + ark_mem->h * rat, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1544,15 +1559,17 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - /* Evaluate stages j = 2,...,step_mem->req_stages */ + /* Evaluate first stage group */ for (int j = 2; j <= ((in - 1) * (in - 2) / 2); j++) { + /* Complete previous stage by evaluating RHS and storing it in tempv3 */ + ark_mem->tcur = ark_mem->tn + ((sunrealtype)j - ONE) * hrat; + /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ((sunrealtype)j - ONE) * - rat * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1561,9 +1578,8 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - retval = - step_mem->fe(ark_mem->tcur + ((sunrealtype)j - ONE) * rat * ark_mem->h, - ark_mem->ycur, ark_mem->tempv3, ark_mem->user_data); + retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv3, + ark_mem->user_data); step_mem->nfe++; SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->tempv3, @@ -1575,23 +1591,23 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (retval > 0) { return RHSFUNC_RECVR; } SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "stage = %i, tcur = " SUN_FORMAT_G, j, - ark_mem->tn + j * rat * ark_mem->h); - N_VLinearSum(ONE, ark_mem->ycur, ark_mem->h * rat, ark_mem->tempv3, - ark_mem->ycur); + /* Begin the j-th stage by updating the state and embedding */ + ark_mem->tcur = ark_mem->tn + j * hrat; + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "stage = %i, tcur = " SUN_FORMAT_G, j, ark_mem->tcur); + N_VLinearSum(ONE, ark_mem->ycur, hrat, ark_mem->tempv3, ark_mem->ycur); if (!ark_mem->fixedstep) { - N_VLinearSum(ONE, ark_mem->tempv1, ark_mem->h / rs, ark_mem->tempv3, + N_VLinearSum(ONE, ark_mem->tempv1, hrsinv, ark_mem->tempv3, ark_mem->tempv1); } /* apply user-supplied stage postprocessing function (if supplied) */ if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->PostProcessStage(ark_mem->tcur + j * rat * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1601,16 +1617,20 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } + /* Copy ycur into tempv2 before looping over second stage group */ N_VScale(ONE, ark_mem->ycur, ark_mem->tempv2); + /* Evaluate second stage group */ for (int j = ((in - 1) * (in - 2) / 2 + 1); j <= (in * (in + 1) / 2 - 1); j++) { + /* Complete previous stage by evaluating RHS and storing it in tempv3 */ + ark_mem->tcur = ark_mem->tn + (j - 1) * hrat; + /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ((sunrealtype)j - ONE) * - rat * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1619,9 +1639,8 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - retval = - step_mem->fe(ark_mem->tcur + ((sunrealtype)j - ONE) * rat * ark_mem->h, - ark_mem->ycur, ark_mem->tempv3, ark_mem->user_data); + retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv3, + ark_mem->user_data); step_mem->nfe++; SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->tempv3, @@ -1633,23 +1652,23 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (retval > 0) { return RHSFUNC_RECVR; } SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "stage = %i, tcur = " SUN_FORMAT_G, j, - ark_mem->tn + j * rat * ark_mem->h); - N_VLinearSum(ONE, ark_mem->ycur, ark_mem->h * rat, ark_mem->tempv3, - ark_mem->ycur); + /* Begin the j-th stage by updating the state and embedding */ + ark_mem->tcur = ark_mem->tn + j * hrat; + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "stage = %i, tcur = " SUN_FORMAT_G, j, ark_mem->tcur); + N_VLinearSum(ONE, ark_mem->ycur, hrat, ark_mem->tempv3, if (!ark_mem->fixedstep) { - N_VLinearSum(ONE, ark_mem->tempv1, ark_mem->h / rs, ark_mem->tempv3, + N_VLinearSum(ONE, ark_mem->tempv1, hrsinv, ark_mem->tempv3, ark_mem->tempv1); } /* apply user-supplied stage postprocessing function (if supplied) */ if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->PostProcessStage(ark_mem->tcur + j * rat * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1659,13 +1678,14 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } + /* Complete the last stage from the second stage group */ + ark_mem->tcur = ark_mem->tn + hrat * (rn * (rn + ONE) / TWO - ONE); + /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = - ark_mem->PreProcessRHS(ark_mem->tcur + - rat * (rn * (rn + ONE) / TWO - ONE) * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1674,9 +1694,8 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - retval = step_mem->fe(ark_mem->tcur + - rat * (rn * (rn + ONE) / TWO - ONE) * ark_mem->h, - ark_mem->ycur, ark_mem->tempv3, ark_mem->user_data); + retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv3, + ark_mem->user_data); step_mem->nfe++; SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->tempv3, @@ -1688,38 +1707,34 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (retval > 0) { return RHSFUNC_RECVR; } SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "stage = %i, tcur = " SUN_FORMAT_G, (in * (in + 1) / 2), - ark_mem->tn + (in * (in - 1) / 2) * rat * ark_mem->h); + /* Begin the next stage before final stage group */ + ark_mem->tcur = ark_mem->tn + (in * (in - 1) / 2) * hrat; + SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, + (in * (in + 1) / 2), ark_mem->tcur); cvals[0] = (rn - ONE) / (TWO * rn - ONE); Xvecs[0] = ark_mem->ycur; cvals[1] = rn / (TWO * rn - ONE); Xvecs[1] = ark_mem->tempv2; - cvals[2] = (rn - ONE) * rat * ark_mem->h / (TWO * rn - ONE); + cvals[2] = (rn - ONE) * hrat / (TWO * rn - ONE); Xvecs[2] = ark_mem->tempv3; - - retval = N_VLinearCombination(3, cvals, Xvecs, ark_mem->ycur); + retval = N_VLinearCombination(3, cvals, Xvecs, ark_mem->ycur); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed vector op, retval = %i", retval); return ARK_VECTOROP_ERR; } - if (!ark_mem->fixedstep) { - N_VLinearSum(ONE, ark_mem->tempv1, ark_mem->h / rs, ark_mem->tempv3, - ark_mem->tempv1); + N_VLinearSum(ONE, ark_mem->tempv1, hrsinv, ark_mem->tempv3, ark_mem->tempv1); } /* apply user-supplied stage postprocessing function (if supplied) */ if (ark_mem->PostProcessStage != NULL) { - retval = - ark_mem->PostProcessStage(ark_mem->tcur + - rat * (rn * (rn - ONE) / TWO) * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1728,14 +1743,17 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } + /* Evaluate final stage group */ for (int j = (in * (in + 1) / 2 + 1); j <= step_mem->req_stages; j++) { + /* Complete the previous stage */ + ark_mem->tcur = ark_mem->tn + (j - 1) * hrat; + /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ((sunrealtype)j - rn - ONE) * - rat * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1744,9 +1762,8 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - retval = step_mem->fe(ark_mem->tcur + - ((sunrealtype)j - rn - ONE) * rat * ark_mem->h, - ark_mem->ycur, ark_mem->tempv3, ark_mem->user_data); + retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv3, + ark_mem->user_data); step_mem->nfe++; SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->tempv3, @@ -1758,24 +1775,23 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (retval > 0) { return RHSFUNC_RECVR; } SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "stage = %i, tcur = " SUN_FORMAT_G, j, - ark_mem->tn + ((sunrealtype)j - rn) * rat * ark_mem->h); - N_VLinearSum(ONE, ark_mem->ycur, ark_mem->h * rat, ark_mem->tempv3, - ark_mem->ycur); + /* Begin the j-th stage by updating the state and embedding */ + ark_mem->tcur = ark_mem->tn + (j - in) * hrat; + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "stage = %i, tcur = " SUN_FORMAT_G, j, ark_mem->tcur); + N_VLinearSum(ONE, ark_mem->ycur, hrat, ark_mem->tempv3, ark_mem->ycur); if (!ark_mem->fixedstep) { - N_VLinearSum(ONE, ark_mem->tempv1, ark_mem->h / rs, ark_mem->tempv3, + N_VLinearSum(ONE, ark_mem->tempv1, hrsinv, ark_mem->tempv3, ark_mem->tempv1); } /* apply user-supplied stage postprocessing function (if supplied) */ if (ark_mem->PostProcessStage != NULL && j < step_mem->req_stages) { - retval = ark_mem->PostProcessStage(ark_mem->tcur + ((sunrealtype)j - rn) * - rat * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1787,9 +1803,9 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); SUNLogExtraDebugVec(ARK_LOGGER, "updated solution", ark_mem->ycur, "ycur(:) ="); - SUNLogInfo(ARK_LOGGER, "begin-compute-embedding", ""); /* Compute yerr (if step adaptivity enabled) */ + SUNLogInfo(ARK_LOGGER, "begin-compute-embedding", ""); if (!ark_mem->fixedstep) { SUNLogExtraDebugVec(ARK_LOGGER, "embedded solution", ark_mem->tempv1, @@ -1797,7 +1813,6 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr N_VLinearSum(ONE, ark_mem->ycur, -ONE, ark_mem->tempv1, ark_mem->tempv1); *dsmPtr = N_VWrmsNorm(ark_mem->tempv1, ark_mem->ewt); } - SUNLogInfo(ARK_LOGGER, "end-compute-embedding", "status = success"); return ARK_SUCCESS; @@ -1817,6 +1832,10 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr weighted local error if an embedding is present; otherwise it should be 0. + The variables (ark_mem->tcur, ark_mem->ycur) should + contain the current time and solution at each stage of within + the time step. + The input/output variable nflagPtr is used to gauge convergence of any algebraic solvers within the step. As this routine involves no algebraic solve, it is set to 0 (success). @@ -1844,9 +1863,17 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr sunrealtype* cvals = step_mem->cvals; N_Vector* Xvecs = step_mem->Xvecs; - sunrealtype rs = SUN_RCONST(4.0); - sunrealtype p5 = SUN_RCONST(0.5); + /* Initialize the current solution */ + ark_mem->tcur = ark_mem->tn; + N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + + /* Initialize method coefficients */ + const sunrealtype rs = SUN_RCONST(4.0); + const sunrealtype hp5 = ark_mem->h * SUN_RCONST(0.5); + const sunrealtype rsinv = ONE / rs; + const sunrealtype hrsinv = ark_mem->h * rsinv; + /* Begin the first stage */ SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 0, ark_mem->tcur); SUNLogExtraDebugVec(ARK_LOGGER, "stage", ark_mem->yn, "z_0(:) ="); @@ -1858,7 +1885,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -1868,10 +1895,9 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - retval = step_mem->fe(ark_mem->tn, ark_mem->yn, ark_mem->fn, + retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->fn, ark_mem->user_data); step_mem->nfe++; - ark_mem->fn_is_current = SUNTRUE; if (retval != ARK_SUCCESS) { SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->fn, "F_0(:) ="); @@ -1879,24 +1905,27 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr "status = failed rhs eval, retval = %i", retval); return (ARK_RHSFUNC_FAIL); } + ark_mem->fn_is_current = SUNTRUE; } SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->fn, "F_0(:) ="); SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, - 1, ark_mem->tn + p5 * ark_mem->h); - N_VLinearSum(ONE, ark_mem->yn, ark_mem->h * p5, ark_mem->fn, ark_mem->ycur); + /* Perform the second stage, and accumulate embedding into tempv1 */ + ark_mem->tcur = ark_mem->tn + hp5; + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "stage = %i, tcur = " SUN_FORMAT_G, 1, ark_mem->tcur); + N_VLinearSum(ONE, ark_mem->yn, hp5, ark_mem->fn, ark_mem->ycur); if (!ark_mem->fixedstep) { - N_VLinearSum(ONE, ark_mem->yn, ark_mem->h / rs, ark_mem->fn, ark_mem->tempv1); + N_VLinearSum(ONE, ark_mem->yn, hrsinv, ark_mem->fn, ark_mem->tempv1); } /* apply user-supplied stage postprocessing function (if supplied) */ if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->PostProcessStage(ark_mem->tn + ark_mem->h * p5, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1908,8 +1937,8 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h * p5, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1918,8 +1947,9 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - retval = step_mem->fe(ark_mem->tcur + ark_mem->h * p5, ark_mem->ycur, - ark_mem->tempv3, ark_mem->user_data); + /* Evaluate stage RHS */ + retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv3, + ark_mem->user_data); step_mem->nfe++; SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->tempv3, "F_1(:) ="); @@ -1930,22 +1960,22 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (retval > 0) { return RHSFUNC_RECVR; } SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "stage = %i, tcur = " SUN_FORMAT_G, 2, ark_mem->tn + ark_mem->h); - N_VLinearSum(ONE, ark_mem->ycur, ark_mem->h * p5, ark_mem->tempv3, - ark_mem->ycur); + /* Perform the third stage */ + ark_mem->tcur = ark_mem->tn + ark_mem->h; + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "stage = %i, tcur = " SUN_FORMAT_G, 2, ark_mem->tcur); + N_VLinearSum(ONE, ark_mem->ycur, hp5, ark_mem->tempv3, ark_mem->ycur); if (!ark_mem->fixedstep) { - N_VLinearSum(ONE, ark_mem->tempv1, ark_mem->h / rs, ark_mem->tempv3, - ark_mem->tempv1); + N_VLinearSum(ONE, ark_mem->tempv1, hrsinv, ark_mem->tempv3, ark_mem->tempv1); } /* apply user-supplied stage postprocessing function (if supplied) */ if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->PostProcessStage(ark_mem->tcur + ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1954,10 +1984,12 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } + /* Evaluate stage RHS */ + /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h, ark_mem->ycur, + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -1967,8 +1999,8 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - retval = step_mem->fe(ark_mem->tcur + ark_mem->h, ark_mem->ycur, - ark_mem->tempv3, ark_mem->user_data); + retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv3, + ark_mem->user_data); step_mem->nfe++; SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->tempv3, "F_2(:) ="); @@ -1979,35 +2011,34 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (retval > 0) { return RHSFUNC_RECVR; } SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, - 3, ark_mem->tn + p5 * ark_mem->h); + /* Perform the fourth stage */ + ark_mem->tcur = ark_mem->tn + hp5; + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "stage = %i, tcur = " SUN_FORMAT_G, 3, ark_mem->tcur); cvals[0] = ONE / THREE; Xvecs[0] = ark_mem->ycur; cvals[1] = TWO / THREE; Xvecs[1] = ark_mem->yn; cvals[2] = ONE / SIX * ark_mem->h; Xvecs[2] = ark_mem->tempv3; - - retval = N_VLinearCombination(3, cvals, Xvecs, ark_mem->ycur); + retval = N_VLinearCombination(3, cvals, Xvecs, ark_mem->ycur); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed vector op, retval = %i", retval); return ARK_VECTOROP_ERR; } - if (!ark_mem->fixedstep) { - N_VLinearSum(ONE, ark_mem->tempv1, ark_mem->h / rs, ark_mem->tempv3, - ark_mem->tempv1); + N_VLinearSum(ONE, ark_mem->tempv1, hrsinv, ark_mem->tempv3, ark_mem->tempv1); } /* apply user-supplied stage postprocessing function (if supplied) */ if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->PostProcessStage(ark_mem->tcur + ark_mem->h * p5, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -2016,11 +2047,13 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + +/* Evaluate stage RHS */ + + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h * p5, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -2029,8 +2062,8 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - retval = step_mem->fe(ark_mem->tcur + ark_mem->h * p5, ark_mem->ycur, - ark_mem->tempv3, ark_mem->user_data); + retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv3, + ark_mem->user_data); step_mem->nfe++; SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->tempv3, "F_3(:) ="); @@ -2041,11 +2074,12 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (retval > 0) { return RHSFUNC_RECVR; } SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, - step_mem->req_stages, ark_mem->tn + ark_mem->h); - N_VLinearSum(ONE, ark_mem->ycur, ark_mem->h * p5, ark_mem->tempv3, - ark_mem->ycur); + /* Compute the time step solution and embedding */ + ark_mem->tcur = ark_mem->tn + ark_mem->h; + SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, + step_mem->req_stages, ark_mem->tcur); + N_VLinearSum(ONE, ark_mem->ycur, hp5, ark_mem->tempv3, ark_mem->ycur); SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); SUNLogExtraDebugVec(ARK_LOGGER, "updated solution", ark_mem->ycur, "ycur(:) ="); @@ -2053,8 +2087,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Compute yerr (if step adaptivity enabled) */ if (!ark_mem->fixedstep) { - N_VLinearSum(ONE, ark_mem->tempv1, ark_mem->h / rs, ark_mem->tempv3, - ark_mem->tempv1); + N_VLinearSum(ONE, ark_mem->tempv1, hrsinv, ark_mem->tempv3, ark_mem->tempv1); SUNLogExtraDebugVec(ARK_LOGGER, "embedded solution", ark_mem->tempv1, "y_embedded(:) ="); @@ -2075,6 +2108,10 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr weighted local error if an embedding is present; otherwise it should be 0. + The variables (ark_mem->tcur, ark_mem->ycur) should + contain the current time and solution at each stage of within + the time step. + The input/output variable nflagPtr is used to gauge convergence of any algebraic solvers within the step. As this routine involves no algebraic solve, it is set to 0 (success). @@ -2095,8 +2132,6 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt *nflagPtr = ARK_SUCCESS; *dsmPtr = ZERO; - const sunrealtype onesixth = ONE / SIX, onefifth = ONE / FIVE; - /* access ARKodeLSRKStepMem structure */ retval = lsrkStep_AccessStepMem(ark_mem, __func__, &step_mem); if (retval != ARK_SUCCESS) { return retval; } @@ -2104,6 +2139,18 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt sunrealtype* cvals = step_mem->cvals; N_Vector* Xvecs = step_mem->Xvecs; + /* Initialize the current solution */ + ark_mem->tcur = ark_mem->tn; + N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + + /* Initialize method coefficients */ + const sunrealtype hsixth = ark_mem->h / SIX; + const sunrealtype hfifth = ark_mem->h / FIVE; + + /* Copy yn into tempv2 for use in later stages */ + N_VScale(ONE, ark_mem->yn, ark_mem->tempv2); + + /* Begin the first stage */ SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 0, ark_mem->tcur); SUNLogExtraDebugVec(ARK_LOGGER, "stage", ark_mem->yn, "z_0(:) ="); @@ -2115,7 +2162,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -2125,7 +2172,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } } - retval = step_mem->fe(ark_mem->tn, ark_mem->yn, ark_mem->fn, + retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->fn, ark_mem->user_data); step_mem->nfe++; if (retval != ARK_SUCCESS) @@ -2140,24 +2187,22 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->fn, "F_0(:) ="); SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, - 1, ark_mem->tn + onesixth * ark_mem->h); - N_VScale(ONE, ark_mem->yn, ark_mem->tempv2); - - N_VLinearSum(ONE, ark_mem->yn, onesixth * ark_mem->h, ark_mem->fn, - ark_mem->ycur); + /* Begin the second stage, and accumulate embedding into tempv1 */ + ark_mem->tcur = ark_mem->tn + hsixth; + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "stage = %i, tcur = " SUN_FORMAT_G, 1, ark_mem->tn + hsixth); + N_VLinearSum(ONE, ark_mem->yn, hsixth, ark_mem->fn, ark_mem->ycur); if (!ark_mem->fixedstep) { - N_VLinearSum(ONE, ark_mem->yn, onefifth * ark_mem->h, ark_mem->fn, - ark_mem->tempv1); + N_VLinearSum(ONE, ark_mem->yn, hfifth, ark_mem->fn, ark_mem->tempv1); } /* apply user-supplied stage postprocessing function (if supplied) */ if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->PostProcessStage(ark_mem->tn + onesixth * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -2166,15 +2211,17 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } } - /* Evaluate stages j = 2,...,step_mem->req_stages */ + /* Evaluate stages j = 2,...,4 */ for (int j = 2; j <= 5; j++) { + /* Complete previous stage by evaluating RHS and storing in tempv3 */ + ark_mem->tcur = ark_mem->tn + (j - 1) * hsixth; + /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ((sunrealtype)j - ONE) * - onesixth * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -2183,9 +2230,8 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } } - retval = step_mem->fe(ark_mem->tcur + - ((sunrealtype)j - ONE) * onesixth * ark_mem->h, - ark_mem->ycur, ark_mem->tempv3, ark_mem->user_data); + retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv3, + ark_mem->user_data); step_mem->nfe++; SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->tempv3, @@ -2197,12 +2243,12 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt if (retval > 0) { return RHSFUNC_RECVR; } SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "stage = %i, tcur = " SUN_FORMAT_G, j, - ark_mem->tn + j * onesixth * ark_mem->h); - N_VLinearSum(ONE, ark_mem->ycur, onesixth * ark_mem->h, ark_mem->tempv3, - ark_mem->ycur); + /* Begin the j-th stage by updating the state and embedding */ + ark_mem->tcur = ark_mem->tn + j * hsixth; + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "stage = %i, tcur = " SUN_FORMAT_G, j, ark_mem->tcur); + N_VLinearSum(ONE, ark_mem->ycur, hsixth, ark_mem->tempv3, ark_mem->ycur); if (j == 4 && !ark_mem->fixedstep) { N_VLinearSum(ONE, ark_mem->tempv1, SUN_RCONST(0.3) * ark_mem->h, @@ -2227,9 +2273,11 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt a RHS function evaluation */ SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, - 6, ark_mem->tn + TWO * onesixth * ark_mem->h); + /* Begin the sixth stage */ + ark_mem->tcur = ark_mem->tn + TWO * hsixth; + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "stage = %i, tcur = " SUN_FORMAT_G, 6, ark_mem->tcur); N_VLinearSum(SUN_RCONST(1.0) / SUN_RCONST(25.0), ark_mem->tempv2, SUN_RCONST(9.0) / SUN_RCONST(25.0), ark_mem->ycur, ark_mem->tempv2); @@ -2239,8 +2287,8 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* apply user-supplied stage postprocessing function (if supplied) */ if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->PostProcessStage(ark_mem->tcur + TWO * onesixth * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -2249,14 +2297,17 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } } + /* Evaluate stages j = 6,...,9 */ for (int j = 6; j <= 9; j++) { + /* Complete previous stage by evaluating RHS and storing in tempv3 */ + ark_mem->tcur = ark_mem->tn + (j - 4) * hsixth; + /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ((sunrealtype)j - FOUR) * - onesixth * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -2265,9 +2316,8 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } } - retval = step_mem->fe(ark_mem->tcur + - ((sunrealtype)j - FOUR) * onesixth * ark_mem->h, - ark_mem->ycur, ark_mem->tempv3, ark_mem->user_data); + retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv3, + ark_mem->user_data); step_mem->nfe++; SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->tempv3, "F_%i(:) =", j); @@ -2278,16 +2328,16 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt if (retval > 0) { return RHSFUNC_RECVR; } SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "stage = %i, tcur = " SUN_FORMAT_G, j + 1, - ark_mem->tn + (j - 3) * onesixth * ark_mem->h); - N_VLinearSum(ONE, ark_mem->ycur, onesixth * ark_mem->h, ark_mem->tempv3, - ark_mem->ycur); + /* Begin the j-th stage by updating the state and embedding */ + ark_mem->tcur = ark_mem->tn + (j - 3) * hsixth; + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "stage = %i, tcur = " SUN_FORMAT_G, j + 1, ark_mem->tcur); + N_VLinearSum(ONE, ark_mem->ycur, hsixth, ark_mem->tempv3, ark_mem->ycur); if (j == 7 && !ark_mem->fixedstep) { - N_VLinearSum(ONE, ark_mem->tempv1, onefifth * ark_mem->h, ark_mem->tempv3, + N_VLinearSum(ONE, ark_mem->tempv1, hfifth, ark_mem->tempv3, ark_mem->tempv1); } if (j == 9 && !ark_mem->fixedstep) @@ -2299,9 +2349,8 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* apply user-supplied stage postprocessing function (if supplied) */ if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->PostProcessStage(ark_mem->tcur + ((sunrealtype)j - THREE) * - onesixth * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -2311,10 +2360,13 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } } + /* Complete the 9th stage by evaluating RHS and storing in tempv3 */ + ark_mem->tcur = ark_mem->tn + ark_mem->h; + /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h, ark_mem->ycur, + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -2324,8 +2376,8 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } } - retval = step_mem->fe(ark_mem->tcur + ark_mem->h, ark_mem->ycur, - ark_mem->tempv3, ark_mem->user_data); + retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv3, + ark_mem->user_data); step_mem->nfe++; SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->tempv3, "F_10(:) =", 9); @@ -2335,14 +2387,14 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt if (retval < 0) { return ARK_RHSFUNC_FAIL; } if (retval > 0) { return RHSFUNC_RECVR; } + /* Compute the final time step solution */ cvals[0] = SUN_RCONST(0.6); Xvecs[0] = ark_mem->ycur; cvals[1] = ONE; Xvecs[1] = ark_mem->tempv2; cvals[2] = SUN_RCONST(0.1) * ark_mem->h; Xvecs[2] = ark_mem->tempv3; - - retval = N_VLinearCombination(3, cvals, Xvecs, ark_mem->ycur); + retval = N_VLinearCombination(3, cvals, Xvecs, ark_mem->ycur); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -2582,7 +2634,7 @@ void lsrkStep_DomEigUpdateLogic(ARKodeMem ark_mem, ARKodeLSRKStepMem step_mem, { if (dsm <= ONE) { - N_VScale(ONE, ark_mem->tempv2, ark_mem->fn); + N_VScale(ONE, ark_mem->tempv3, ark_mem->fn); ark_mem->fn_is_current = SUNTRUE; step_mem->dom_eig_is_current = (step_mem->const_Jac == SUNTRUE); From df0086659b29e61f2b3ae49eaea3460dc4f3ada7 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 15 Jan 2026 23:32:08 -0500 Subject: [PATCH 018/298] Fixed merge issues --- src/arkode/arkode_lsrkstep.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index fc5145d40a..c54e916f52 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -1264,9 +1264,9 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr bt3 = ark_mem->h * (rs - ONE) / (rs * rs); } - +/* Begin first stage */ - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "stage = %i, tcur = " SUN_FORMAT_G, 0, ark_mem->tcur); + /* Begin first stage */ + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "stage = %i, tcur = " SUN_FORMAT_G, 0, ark_mem->tcur); SUNLogExtraDebugVec(ARK_LOGGER, "stage", ark_mem->yn, "z_0(:) ="); /* The method is not FSAL. Therefore, fn ​is computed at the beginning @@ -1657,7 +1657,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr ark_mem->tcur = ark_mem->tn + j * hrat; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, j, ark_mem->tcur); - N_VLinearSum(ONE, ark_mem->ycur, hrat, ark_mem->tempv3, + N_VLinearSum(ONE, ark_mem->ycur, hrat, ark_mem->tempv3, ark_mem->ycur); if (!ark_mem->fixedstep) { N_VLinearSum(ONE, ark_mem->tempv1, hrsinv, ark_mem->tempv3, @@ -2047,10 +2047,10 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - +/* Evaluate stage RHS */ + /* Evaluate stage RHS */ - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); @@ -2258,8 +2258,8 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* apply user-supplied stage postprocessing function (if supplied) */ if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->PostProcessStage(ark_mem->tn + j * onesixth * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", From ebc3fa34e27d73f29365b7c691ba9a8f6ba7e21d Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 16 Jan 2026 08:58:43 -0500 Subject: [PATCH 019/298] Fixed additional merge issues --- src/arkode/arkode_lsrkstep.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index c54e916f52..feb7fed353 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -651,7 +651,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } /* call fe */ - retval = step_mem->fe(ark_mem->tn, ark_mem->yn, ark_mem->fn, + retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->fn, ark_mem->user_data); step_mem->nfe++; if (retval != ARK_SUCCESS) @@ -714,6 +714,9 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Evaluate stages j = 2,...,step_mem->req_stages */ for (int j = 2; j <= step_mem->req_stages; j++) { + /* Evaluate RHS and store in tempv3 */ + ark_mem->tcur = ark_mem->tn + ark_mem->h * thjm1; + /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { @@ -727,10 +730,8 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } } - /* Evaluate RHS and store in tempv3 */ - ark_mem->tcur = ark_mem->tn + ark_mem->h * thjm1; - retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv3, - ark_mem->user_data); + retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv3, + ark_mem->user_data); step_mem->nfe++; SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->ycur, @@ -1139,8 +1140,9 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); SUNLogExtraDebugVec(ARK_LOGGER, "updated solution", ark_mem->ycur, "ycur(:) ="); - SUNLogInfo(ARK_LOGGER, "begin-compute-embedding", ""); + /* final stage processing */ + SUNLogInfo(ARK_LOGGER, "begin-compute-embedding", ""); ark_mem->tcur = ark_mem->tn + ark_mem->h; /* apply user-supplied stage preprocessing function (if supplied) */ @@ -1178,7 +1180,6 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) Xvecs[2] = ark_mem->fn; cvals[3] = p4 * ark_mem->h; Xvecs[3] = ark_mem->tempv3; - retval = N_VLinearCombination(4, cvals, Xvecs, ark_mem->tempv1); if (retval != 0) { @@ -1563,7 +1564,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr for (int j = 2; j <= ((in - 1) * (in - 2) / 2); j++) { /* Complete previous stage by evaluating RHS and storing it in tempv3 */ - ark_mem->tcur = ark_mem->tn + ((sunrealtype)j - ONE) * hrat; + ark_mem->tcur = ark_mem->tn + (j - 1) * hrat; /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) @@ -1747,7 +1748,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr for (int j = (in * (in + 1) / 2 + 1); j <= step_mem->req_stages; j++) { /* Complete the previous stage */ - ark_mem->tcur = ark_mem->tn + (j - 1) * hrat; + ark_mem->tcur = ark_mem->tn + (j - in - 1) * hrat; /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) From 92f2d94b1c2a5a1c79f45c834dc1b518f66421cd Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 16 Jan 2026 08:59:06 -0500 Subject: [PATCH 020/298] Ran formatter --- src/arkode/arkode_lsrkstep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index feb7fed353..133c832d10 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -1180,7 +1180,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) Xvecs[2] = ark_mem->fn; cvals[3] = p4 * ark_mem->h; Xvecs[3] = ark_mem->tempv3; - retval = N_VLinearCombination(4, cvals, Xvecs, ark_mem->tempv1); + retval = N_VLinearCombination(4, cvals, Xvecs, ark_mem->tempv1); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-compute-embedding", From 97315ca1664d4d3081a16438ec098562126197b9 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 16 Jan 2026 09:11:09 -0500 Subject: [PATCH 021/298] Updated ARKStep, ERKStep, and MRIStep so that they only call RHS functions on the user-provided yout (== ycur) vector, when possible --- src/arkode/arkode.c | 3 +- src/arkode/arkode_arkstep.c | 7 +++-- src/arkode/arkode_erkstep.c | 5 ++-- src/arkode/arkode_mristep.c | 58 +++++++++++++++++++++---------------- 4 files changed, 43 insertions(+), 30 deletions(-) diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 8706c95ed0..776133eced 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -2529,7 +2529,8 @@ int arkHin(ARKodeMem ark_mem, sunrealtype tout) mass matrix solve when computing the full RHS. Before calling arkHin, h is set to |tout - tcur| or 1 and so we do not need to guard against h == 0 here before calling the full RHS. */ - retval = ark_mem->step_fullrhs(ark_mem, ark_mem->tn, ark_mem->yn, + N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + retval = ark_mem->step_fullrhs(ark_mem, ark_mem->tn, ark_mem->ycur, ark_mem->fn, ARK_FULLRHS_START); if (retval) { return ARK_RHSFUNC_FAIL; } ark_mem->fn_is_current = SUNTRUE; diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index e7e1438a1f..5c0587a6d0 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1710,6 +1710,9 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) *nflagPtr = ARK_SUCCESS; } + /* initialize the current solution */ + N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + /* call nonlinear solver setup if it exists */ if (step_mem->NLS) { @@ -1845,7 +1848,7 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) of the just completed step (tn, yn) and potentially reuse the evaluation (FSAL method) or save the value for later use. */ mode = (ark_mem->initsetup) ? ARK_FULLRHS_START : ARK_FULLRHS_END; - retval = ark_mem->step_fullrhs(ark_mem, ark_mem->tn, ark_mem->yn, + retval = ark_mem->step_fullrhs(ark_mem, ark_mem->tn, ark_mem->ycur, ark_mem->fn, mode); if (retval) { @@ -1873,7 +1876,7 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) ark_mem->user_data); if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } } - retval = step_mem->fi(ark_mem->tn, ark_mem->yn, step_mem->Fi[0], + retval = step_mem->fi(ark_mem->tn, ark_mem->ycur, step_mem->Fi[0], ark_mem->user_data); step_mem->nfi++; diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index 452f32c3db..4709fa6dcc 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -778,7 +778,7 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogExtraDebugVec(ARK_LOGGER, "stage", ark_mem->yn, "z_0(:) ="); /* Call the full RHS if needed. If this is the first step then we may need to - evaluate or copy the RHS values from an earlier evaluation (e.g., to + evaluate or copy the RHS values from an earlier evaluation (e.g., to compute h0). For subsequent steps treat this RHS evaluation as an evaluation at the end of the just completed step to potentially reuse (FSAL methods) RHS evaluations from the end of the last step. */ @@ -786,7 +786,8 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (!(ark_mem->fn_is_current)) { mode = (ark_mem->initsetup) ? ARK_FULLRHS_START : ARK_FULLRHS_END; - retval = ark_mem->step_fullrhs(ark_mem, ark_mem->tn, ark_mem->yn, + N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + retval = ark_mem->step_fullrhs(ark_mem, ark_mem->tn, ark_mem->ycur, ark_mem->fn, mode); if (retval) { diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 9057ce4c55..19fdcc7af9 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1320,8 +1320,12 @@ int mriStep_Init(ARKodeMem ark_mem, sunrealtype tout, int init_type) } if (ark_mem->hin == ZERO) { + /* initialize (tcur,ycur) to (t0,y0) */ + ark_mem->tcur = ark_mem->tn; + N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + /* tempv1 = fslow(t0, y0) */ - if (mriStep_SlowRHS(ark_mem, ark_mem->tcur, ark_mem->yn, ark_mem->tempv1, + if (mriStep_SlowRHS(ark_mem, ark_mem->tcur, ark_mem->ycur, ark_mem->tempv1, ARK_FULLRHS_START) != ARK_SUCCESS) { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, __FILE__, @@ -1791,7 +1795,6 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt ARKodeMRIStepMem step_mem; /* outer stepper memory */ int is; /* current stage index */ int retval; /* reusable return flag */ - N_Vector tmp; /* N_Vector pointer */ SUNAdaptController_Type adapt_type; /* timestep adaptivity type */ sunrealtype t0, tf; /* start/end of each stage */ sunbooleantype calc_fslow; @@ -1813,6 +1816,9 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt do_embedding = !ark_mem->fixedstep || (ark_mem->AccumErrorType != ARK_ACCUMERROR_NONE); + /* initialize the current solution */ + N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + /* if MRI adaptivity is enabled: reset fast accumulated error, and send appropriate control parameter to the fast integrator */ adapt_type = SUNAdaptController_GetType(ark_mem->hadapt_mem->hcontroller); @@ -1843,7 +1849,7 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt if (!ark_mem->fixedstep) { retval = mriStepInnerStepper_Reset(step_mem->stepper, ark_mem->tn, - ark_mem->yn); + ark_mem->ycur); if (retval != ARK_SUCCESS) { arkProcessError(ark_mem, ARK_INNERSTEP_FAIL, __LINE__, __func__, __FILE__, @@ -1878,7 +1884,7 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt nested_mri = step_mem->expforcing || step_mem->impforcing; if (ark_mem->fn == NULL || nested_mri) { - retval = mriStep_UpdateF0(ark_mem, step_mem, ark_mem->tn, ark_mem->yn, + retval = mriStep_UpdateF0(ark_mem, step_mem, ark_mem->tn, ark_mem->ycur, ARK_FULLRHS_START); if (retval) { @@ -1901,7 +1907,7 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } else if (ark_mem->fn != NULL && !ark_mem->fn_is_current) { - retval = mriStep_FullRHS(ark_mem, ark_mem->tn, ark_mem->yn, ark_mem->fn, + retval = mriStep_FullRHS(ark_mem, ark_mem->tn, ark_mem->ycur, ark_mem->fn, ARK_FULLRHS_START); if (retval) { @@ -2113,15 +2119,9 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt { is = step_mem->stages; - /* Temporarily swap ark_mem->ycur and ark_mem->tempv4 pointers, copying - data so that both hold the current ark_mem->ycur value. This ensures - that during this embedding "stage": - - ark_mem->ycur will be the correct initial condition for the final stage. - - ark_mem->tempv4 will hold the embedded solution vector. */ + /* Copy ark_mem->ycur into ark_mem->tempv4, since it serves as the initial condition + for both this embedding stage, and the subsequent final stage. */ N_VScale(ONE, ark_mem->ycur, ark_mem->tempv4); - tmp = ark_mem->ycur; - ark_mem->ycur = ark_mem->tempv4; - ark_mem->tempv4 = tmp; /* Reset ark_mem->tcur as the time value corresponding with the end of the step */ /* Set relevant stage times (including desired stage time for implicit solves) */ @@ -2175,10 +2175,11 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt SUNLogExtraDebugVec(ARK_LOGGER, "embedded solution", ark_mem->ycur, "y_embedded(:) ="); - /* Swap back ark_mem->ycur with ark_mem->tempv4, and reset the inner integrator */ - tmp = ark_mem->ycur; - ark_mem->ycur = ark_mem->tempv4; - ark_mem->tempv4 = tmp; + /* Copy embedding solution into ark_mem->tempv1 for later error estimation, + reset ark_mem->ycur to ark_mem->tempv4 in preparation for the final stage, + and reset the inner integrator */ + N_VScale(ONE, ark_mem->ycur, ark_mem->tempv1); + N_VScale(ONE, ark_mem->tempv4, ark_mem->ycur); retval = mriStepInnerStepper_Reset(step_mem->stepper, t0, ark_mem->ycur); if (retval != ARK_SUCCESS) { @@ -2280,10 +2281,11 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } /* Compute temporal error estimate via difference between step - solution and embedding, store in ark_mem->tempv1, and take norm. */ + solution and embedding (embedding is already stored in ark_mem->tempv1 + so we need only subtract off ark_mem->ycur) and take norm. */ if (do_embedding) { - N_VLinearSum(ONE, ark_mem->tempv4, -ONE, ark_mem->ycur, ark_mem->tempv1); + N_VLinearSum(ONE, ark_mem->tempv1, -ONE, ark_mem->ycur, ark_mem->tempv1); *dsmPtr = N_VWrmsNorm(ark_mem->tempv1, ark_mem->ewt); } @@ -2363,6 +2365,9 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) ytilde = ark_mem->tempv4; ytemp = ark_mem->tempv2; + /* initialize the current solution */ + N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + /* if MRI adaptivity is enabled: reset fast accumulated error, and send appropriate control parameter to the fast integrator */ adapt_type = SUNAdaptController_GetType(ark_mem->hadapt_mem->hcontroller); @@ -2393,7 +2398,7 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (!ark_mem->fixedstep) { retval = mriStepInnerStepper_Reset(step_mem->stepper, ark_mem->tn, - ark_mem->yn); + ark_mem->ycur); if (retval != ARK_SUCCESS) { arkProcessError(ark_mem, ARK_INNERSTEP_FAIL, __LINE__, __func__, __FILE__, @@ -2416,7 +2421,7 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) nested_mri = step_mem->expforcing || step_mem->impforcing; if (ark_mem->fn == NULL || nested_mri) { - retval = mriStep_UpdateF0(ark_mem, step_mem, ark_mem->tn, ark_mem->yn, + retval = mriStep_UpdateF0(ark_mem, step_mem, ark_mem->tn, ark_mem->ycur, ARK_FULLRHS_START); if (retval) { @@ -2439,7 +2444,7 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } if (ark_mem->fn != NULL && !ark_mem->fn_is_current) { - retval = mriStep_FullRHS(ark_mem, ark_mem->tn, ark_mem->yn, ark_mem->fn, + retval = mriStep_FullRHS(ark_mem, ark_mem->tn, ark_mem->ycur, ark_mem->fn, ARK_FULLRHS_START); if (retval) { @@ -2842,6 +2847,9 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* initial time for step */ t0 = ark_mem->tn; + /* initialize the current solution */ + N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + /* if MRI adaptivity is enabled: reset fast accumulated error, and send appropriate control parameter to the fast integrator */ adapt_type = SUNAdaptController_GetType(ark_mem->hadapt_mem->hcontroller); @@ -2871,7 +2879,7 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* for adaptive computations, reset the inner integrator to the beginning of this step */ if (!ark_mem->fixedstep) { - retval = mriStepInnerStepper_Reset(step_mem->stepper, t0, ark_mem->yn); + retval = mriStepInnerStepper_Reset(step_mem->stepper, t0, ark_mem->ycur); if (retval != ARK_SUCCESS) { arkProcessError(ark_mem, ARK_INNERSTEP_FAIL, __LINE__, __func__, __FILE__, @@ -2893,7 +2901,7 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) nested_mri = step_mem->expforcing || step_mem->impforcing; if (ark_mem->fn == NULL || nested_mri) { - retval = mriStep_UpdateF0(ark_mem, step_mem, ark_mem->tn, ark_mem->yn, + retval = mriStep_UpdateF0(ark_mem, step_mem, ark_mem->tn, ark_mem->ycur, ARK_FULLRHS_START); if (retval) { @@ -2904,7 +2912,7 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } else if (ark_mem->fn != NULL && !ark_mem->fn_is_current) { - retval = mriStep_FullRHS(ark_mem, ark_mem->tn, ark_mem->yn, ark_mem->fn, + retval = mriStep_FullRHS(ark_mem, ark_mem->tn, ark_mem->ycur, ark_mem->fn, ARK_FULLRHS_START); if (retval) { From 199c239c7e837a06f77616e774da40a9087ab9aa Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 16 Jan 2026 09:11:24 -0500 Subject: [PATCH 022/298] Ran formatter --- src/arkode/arkode_erkstep.c | 2 +- src/arkode/arkode_mristep.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index 4709fa6dcc..2aef6d96df 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -785,7 +785,7 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (!(ark_mem->fn_is_current)) { - mode = (ark_mem->initsetup) ? ARK_FULLRHS_START : ARK_FULLRHS_END; + mode = (ark_mem->initsetup) ? ARK_FULLRHS_START : ARK_FULLRHS_END; N_VScale(ONE, ark_mem->yn, ark_mem->ycur); retval = ark_mem->step_fullrhs(ark_mem, ark_mem->tn, ark_mem->ycur, ark_mem->fn, mode); diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 19fdcc7af9..2f48ffc13f 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1325,8 +1325,8 @@ int mriStep_Init(ARKodeMem ark_mem, sunrealtype tout, int init_type) N_VScale(ONE, ark_mem->yn, ark_mem->ycur); /* tempv1 = fslow(t0, y0) */ - if (mriStep_SlowRHS(ark_mem, ark_mem->tcur, ark_mem->ycur, ark_mem->tempv1, - ARK_FULLRHS_START) != ARK_SUCCESS) + if (mriStep_SlowRHS(ark_mem, ark_mem->tcur, ark_mem->ycur, + ark_mem->tempv1, ARK_FULLRHS_START) != ARK_SUCCESS) { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, __FILE__, "error calling slow RHS function(s)"); From eb5b2871f3de5a406127f634706ffcb8b9b8e885 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 16 Jan 2026 09:38:53 -0500 Subject: [PATCH 023/298] Updated logging level 4 output files --- .../logging/test_logging_arkode_lsrkstep_lvl4_2.out | 2 +- .../logging/test_logging_arkode_lsrkstep_lvl4_3.out | 10 +++++----- .../logging/test_logging_arkode_lsrkstep_lvl4_5.out | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_2.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_2.out index 80740d54b9..ca4bd6e6d6 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_2.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_2.out @@ -77,7 +77,7 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 8, tcur = 1.14611070421007e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 9, tcur = 1.28174438476562e-06 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 9, tcur = 1.28174438476563e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 10, tcur = 1.28174438476563e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_3.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_3.out index 99ff95da38..c4c77f2721 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_3.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_3.out @@ -53,10 +53,10 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-compute-embedding] status = success -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.0011976776899388 +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = inf [DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 1.220703125e-06 [DEBUG][rank 0][arkAdapt][new-step-eta] eta = 20 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 1.32348889930549e-13 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 6.104125976562500e-08 6.104125976562493e-08 0.000000000000000e+00 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 3, tn = 6.1041259765625e-08, h = 1.220703125e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 0, tcur = 6.1041259765625e-08 @@ -81,11 +81,11 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-compute-embedding] status = success -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.00221586141183015 +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.00222529072291584 [DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 2.44140625e-05 [DEBUG][rank 0][arkAdapt][new-step-eta] eta = 20 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 1.67186954059802e-10 - 1.281744384765625e-06 1.281744384764923e-06 0.000000000000000e+00 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 1.65070663502083e-10 + 1.281744384765625e-06 1.281744384764923e-06 2.117582368135751e-22 --------------------------------------------------------------------- Current time = 1.28174438476563e-06 Steps = 3 diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_5.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_5.out index f805bf014a..2e34e62157 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_5.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_5.out @@ -25,10 +25,10 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 10, tcur = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = inf +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 1.14486680447989e-07 [DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 6.103515625e-08 [DEBUG][rank 0][arkAdapt][new-step-eta] eta = 10000 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 8.07793566946316e-18 6.103515625000001e-12 6.103515625000001e-12 8.077935669463161e-28 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 6.103515625e-12, h = 6.103515625e-08 [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 0, tcur = 6.103515625e-12 @@ -81,11 +81,11 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 10, tcur = 1.28174438476563e-06 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.000715650921738838 +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.000676820854209895 [DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 2.44140625e-05 [DEBUG][rank 0][arkAdapt][new-step-eta] eta = 20 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 8.46516223087607e-12 - 1.281744384765625e-06 1.281744384764922e-06 6.352747104407253e-22 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 1.05814527885951e-11 + 1.281744384765625e-06 1.281744384764922e-06 8.470329472543003e-22 --------------------------------------------------------------------- Current time = 1.28174438476563e-06 Steps = 3 From b473bd2b0155bba0f59f61fa7e63e097a0b67c01 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 16 Jan 2026 09:39:45 -0500 Subject: [PATCH 024/298] Updated logging level 5 output files --- .../logging/test_logging_arkode_lsrkstep_lvl5_0.out | 6 +++--- .../logging/test_logging_arkode_lsrkstep_lvl5_2.out | 2 +- .../logging/test_logging_arkode_lsrkstep_lvl5_3.out | 12 ++++++------ .../logging/test_logging_arkode_lsrkstep_lvl5_5.out | 10 +++++----- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_0.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_0.out index 370b0f1f8e..0a04d8d1e0 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_0.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_0.out @@ -12,7 +12,7 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepRKC][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepRKC][begin-stages-list] stage = 1, tcur = 1.46936487268518e-12 [DEBUG][rank 0][lsrkStep_TakeStepRKC][stage RHS] F_1(:) = - 1.000000000000000e+00 + 1.469364872685183e-12 [INFO][rank 0][lsrkStep_TakeStepRKC][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepRKC][begin-stages-list] stage = 2, tcur = 6.10351562499999e-12 [INFO][rank 0][lsrkStep_TakeStepRKC][end-stages-list] status = success @@ -37,7 +37,7 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepRKC][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepRKC][begin-stages-list] stage = 1, tcur = 1.46997522424768e-08 [DEBUG][rank 0][lsrkStep_TakeStepRKC][stage RHS] F_1(:) = - 9.999999999999998e-01 + 1.469975224247683e-08 [INFO][rank 0][lsrkStep_TakeStepRKC][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepRKC][begin-stages-list] stage = 2, tcur = 6.10412597656249e-08 [INFO][rank 0][lsrkStep_TakeStepRKC][end-stages-list] status = success @@ -62,7 +62,7 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepRKC][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepRKC][begin-stages-list] stage = 1, tcur = 3.54914234302662e-07 [DEBUG][rank 0][lsrkStep_TakeStepRKC][stage RHS] F_1(:) = - 9.999999999998741e-01 + 3.549142343026603e-07 [INFO][rank 0][lsrkStep_TakeStepRKC][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepRKC][begin-stages-list] stage = 2, tcur = 1.28174438476562e-06 [INFO][rank 0][lsrkStep_TakeStepRKC][end-stages-list] status = success diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_2.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_2.out index 53a03e273f..2b7f79daf1 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_2.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_2.out @@ -149,7 +149,7 @@ Start LSRKStep Logging test [DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_8(:) = 9.999999999986863e-01 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 9, tcur = 1.28174438476562e-06 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 9, tcur = 1.28174438476563e-06 [DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_9(:) = 9.999999999983570e-01 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_3.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_3.out index 9ea9460217..3b709c4c43 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_3.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_3.out @@ -99,12 +99,12 @@ Start LSRKStep Logging test 6.104125976562493e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][embedded solution] y_embedded(:) = - 6.104125976562494e-08 + 6.104125976562493e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-compute-embedding] status = success -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.0011976776899388 +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = inf [DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 1.220703125e-06 [DEBUG][rank 0][arkAdapt][new-step-eta] eta = 20 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 1.32348889930549e-13 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 6.104125976562500e-08 6.104125976562493e-08 0.000000000000000e+00 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 3, tn = 6.1041259765625e-08, h = 1.220703125e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 0, tcur = 6.1041259765625e-08 @@ -153,11 +153,11 @@ Start LSRKStep Logging test [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][embedded solution] y_embedded(:) = 1.281744384764940e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-compute-embedding] status = success -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.00221586141183015 +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.00222529072291584 [DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 2.44140625e-05 [DEBUG][rank 0][arkAdapt][new-step-eta] eta = 20 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 1.67186954059802e-10 - 1.281744384765625e-06 1.281744384764923e-06 0.000000000000000e+00 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 1.65070663502083e-10 + 1.281744384765625e-06 1.281744384764923e-06 2.117582368135751e-22 --------------------------------------------------------------------- Current time = 1.28174438476563e-06 Steps = 3 diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_5.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_5.out index 52f33231a7..b3b8e0ea52 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_5.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_5.out @@ -51,10 +51,10 @@ Start LSRKStep Logging test 6.103515625000001e-12 [DEBUG][rank 0][lsrkStep_TakeStepSSP104][embedded solution] y_embedded(:) = 6.103515625000001e-12 -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = inf +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 1.14486680447989e-07 [DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 6.103515625e-08 [DEBUG][rank 0][arkAdapt][new-step-eta] eta = 10000 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 8.07793566946316e-18 6.103515625000001e-12 6.103515625000001e-12 8.077935669463161e-28 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 6.103515625e-12, h = 6.103515625e-08 [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 0, tcur = 6.103515625e-12 @@ -159,11 +159,11 @@ Start LSRKStep Logging test 1.281744384764922e-06 [DEBUG][rank 0][lsrkStep_TakeStepSSP104][embedded solution] y_embedded(:) = 1.281744384764923e-06 -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.000715650921738838 +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.000676820854209895 [DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 2.44140625e-05 [DEBUG][rank 0][arkAdapt][new-step-eta] eta = 20 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 8.46516223087607e-12 - 1.281744384765625e-06 1.281744384764922e-06 6.352747104407253e-22 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 1.05814527885951e-11 + 1.281744384765625e-06 1.281744384764922e-06 8.470329472543003e-22 --------------------------------------------------------------------- Current time = 1.28174438476563e-06 Steps = 3 From 0667085383fe35fc5c92d63221d90d6e374e4d35 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 16 Jan 2026 10:23:05 -0500 Subject: [PATCH 025/298] Minor cleanup --- src/arkode/arkode_lsrkstep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 133c832d10..eeccfaa646 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -2192,7 +2192,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* Begin the second stage, and accumulate embedding into tempv1 */ ark_mem->tcur = ark_mem->tn + hsixth; SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "stage = %i, tcur = " SUN_FORMAT_G, 1, ark_mem->tn + hsixth); + "stage = %i, tcur = " SUN_FORMAT_G, 1, ark_mem->tcur); N_VLinearSum(ONE, ark_mem->yn, hsixth, ark_mem->fn, ark_mem->ycur); if (!ark_mem->fixedstep) { From c713eca52c580904f4ce81fe8f9407a350f9dd9e Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 16 Jan 2026 10:25:06 -0500 Subject: [PATCH 026/298] Updated answers submodule commit --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index 0a7667a0ad..f524826578 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 0a7667a0adc0f502015dc42f936002ac501782f4 +Subproject commit f524826578c12d5a8a350be4d2d98d47e319798a From 0d5c597043da69210a36052093f00db1d24c25e9 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 16 Jan 2026 11:00:41 -0500 Subject: [PATCH 027/298] Added optional routine to request that ARKODE preallocate internal stage-related data prior to calling ARKodeEvolve --- CHANGELOG.md | 5 + .../guide/source/Usage/User_callable.rst | 34 ++++ doc/shared/RecentChanges.rst | 5 + include/arkode/arkode.h | 1 + src/arkode/arkode.c | 23 ++- src/arkode/arkode_arkstep.c | 67 +++---- src/arkode/arkode_arkstep_impl.h | 3 + src/arkode/arkode_erkstep.c | 9 +- src/arkode/arkode_forcingstep.c | 4 +- src/arkode/arkode_impl.h | 42 +++- src/arkode/arkode_io.c | 51 +++++ src/arkode/arkode_mristep.c | 146 ++++++++------ src/arkode/arkode_mristep_impl.h | 3 + src/arkode/arkode_sprkstep.c | 7 +- src/arkode/fmod_int32/farkode_mod.c | 12 ++ src/arkode/fmod_int32/farkode_mod.f90 | 22 +++ src/arkode/fmod_int64/farkode_mod.c | 12 ++ src/arkode/fmod_int64/farkode_mod.f90 | 22 +++ .../arkode/CXX_serial/CMakeLists.txt | 10 +- .../CXX_serial/ark_test_prealloc_arkstep.cpp | 150 ++++++++++++++ .../CXX_serial/ark_test_prealloc_erkstep.cpp | 135 +++++++++++++ .../ark_test_prealloc_forcingstep.cpp | 170 ++++++++++++++++ .../CXX_serial/ark_test_prealloc_lsrkstep.cpp | 144 ++++++++++++++ .../CXX_serial/ark_test_prealloc_mristep.cpp | 185 ++++++++++++++++++ .../ark_test_prealloc_splittingstep.cpp | 170 ++++++++++++++++ .../CXX_serial/ark_test_prealloc_sprkstep.cpp | 124 ++++++++++++ 26 files changed, 1434 insertions(+), 122 deletions(-) create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_prealloc_arkstep.cpp create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_prealloc_erkstep.cpp create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_prealloc_forcingstep.cpp create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep.cpp create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_prealloc_mristep.cpp create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_prealloc_splittingstep.cpp create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_prealloc_sprkstep.cpp diff --git a/CHANGELOG.md b/CHANGELOG.md index 03cd6f947a..1143e1ff1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,11 @@ and IDAS, respectively. Removed extraneous copy of output vector when using ARKODE in ONE_STEP mode. +Added the function `ARKodeAllocateInternalData` to ARKODE to enable stage-related +data allocation before the first call to `ARKodeEvolve` (but after all other +optional input routines have been called), to support users who measure memory +usage before beginning a simulation. + ### Bug Fixes On the initial time step with a user-supplied initial step size, ARKODE and diff --git a/doc/arkode/guide/source/Usage/User_callable.rst b/doc/arkode/guide/source/Usage/User_callable.rst index fe99fd99c1..ee77cabff6 100644 --- a/doc/arkode/guide/source/Usage/User_callable.rst +++ b/doc/arkode/guide/source/Usage/User_callable.rst @@ -5069,6 +5069,40 @@ Output all ARKODE solver parameters :c:func:`ARKodeWriteParameters` .. versionadded:: 6.1.0 +.. _ARKODE.Usage.Preallocation: + +ARKODE data preallocation function +---------------------------------- + +Since the multi-stage structure of most ARKODE methods results in data +requirements that depend on the number of stages, ARKODE generally defers +allocation of stage-related internal data until the first call to +:c:func:`ARKodeEvolve`. However, in some cases the user may wish to +preallocate this data earlier, for example to measure the memory footprint +before beginning a calculation, or to check for allocation errors at an +earlier time. To request that that ARKODE preallocate all stage-related +internal data before the first call to :c:func:`ARKodeEvolve`, the user +may call the function :c:func:`ARKodeAllocateInternalData`. + + +.. c:function:: int ARKodeAllocateInternalData(void* arkode_mem) + + Optionally allocates stage-related internal data for the current ARKODE time-stepper module. + + :param arkode_mem: pointer to the ARKODE memory block. + + :retval ARK_SUCCESS: the function exited successfully. + :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. + :retval ARK_MEM_FAIL: a memory allocation failed. + + .. warning:: + + This must be called **after** all other optional input routines have been called, + and **before** the first call to :c:func:`ARKodeEvolve`. This routine should + be called at most once per ARKODE memory block. + + .. versionadded:: x.y.z + .. _ARKODE.Usage.Reset: diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index 89ff185822..f4bf91c737 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -10,6 +10,11 @@ and IDAS, respectively. Removed extraneous copy of output vector when using ARKODE in ONE_STEP mode. +Added the function :c:func:`ARKodeAllocateInternalData` to ARKODE to enable stage-related +data allocation before the first call to :c:func:`ARKodeEvolve` (but after all other +optional input routines have been called), to support users who measure memory +usage before beginning a simulation. + **Bug Fixes** On the initial time step with a user-supplied initial step size, ARKODE and diff --git a/include/arkode/arkode.h b/include/arkode/arkode.h index 5ee781b7f8..1bfa9b4dae 100644 --- a/include/arkode/arkode.h +++ b/include/arkode/arkode.h @@ -286,6 +286,7 @@ SUNDIALS_EXPORT int ARKodeSetPreprocessRHSFn(void* arkode_mem, ARKPostProcessFn ProcessRHS); SUNDIALS_EXPORT int ARKodeSetPostprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStage); +SUNDIALS_EXPORT int ARKodeAllocateInternalData(void* arkode_mem); /* Optional input functions (implicit solver) */ SUNDIALS_EXPORT int ARKodeSetNonlinearSolver(void* arkode_mem, diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 776133eced..5fab50cb67 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -1727,12 +1727,23 @@ int arkRwtSet(N_Vector y, N_Vector weight, void* data) arkInit allocates and initializes memory for a problem. All inputs are checked for errors. If any error occurs during - initialization, an error flag is returned. Otherwise, it returns - ARK_SUCCESS. This routine should be called by an ARKODE - timestepper module (not by the user). This routine must be - called prior to calling ARKodeEvolve to evolve the problem. The - initialization type indicates if the values of internal counters - should be reinitialized (FIRST_INIT) or retained (RESET_INIT). + initialization, an error flag is returned. Otherwise, it + returns ARK_SUCCESS. + + This routine should only be called by + (a) ARKodeReset (with the input init_type == RESET_INIT), + (b) an ARKODE timestepper module creation routine (with + init_type == FIRST_INIT), or + (c) an ARKODE timestepper module re-initialization routine + (with init_type == FIRST_INIT). + This should never by the user. + + The initialization type indicates if the values of internal + counters should be reinitialized (FIRST_INIT) or retained + (RESET_INIT). + + This routine must be called prior to calling ARKodeEvolve + to evolve the problem. ---------------------------------------------------------------*/ int arkInit(ARKodeMem ark_mem, sunrealtype t0, N_Vector y0, int init_type) { diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index 5c0587a6d0..e4e7dc8855 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -184,6 +184,9 @@ void* ARKStepCreate(ARKRhsFn fe, ARKRhsFn fi, sunrealtype t0, N_Vector y0, return (NULL); } + /* Initialize preallocated flag */ + step_mem->preallocated = SUNFALSE; + /* Copy the input parameters into ARKODE state */ step_mem->fe = fe; step_mem->fi = fi; @@ -920,6 +923,17 @@ int arkStep_GetGammas(ARKodeMem ark_mem, sunrealtype* gamma, sunrealtype* gamrat For all initialization types, this routine sets the relevant TakeStep routine based on the current problem configuration. + With initialization type RESET_INIT, this routine does nothing. + + For other initialization types, this routine: + - sets the relevant TakeStep routine based on the current + problem configuration + - checks for consistency between the system and mass matrix + linear solvers (if applicable) + - initializes and sets up the system and mass matrix linear + solvers (if applicable) + - initializes and sets up the nonlinear solver (if applicable) + With initialization type FIRST_INIT this routine: - sets/checks the ARK Butcher tables to be used - allocates any memory that depends on the number of ARK stages, @@ -932,17 +946,6 @@ int arkStep_GetGammas(ARKodeMem ark_mem, sunrealtype* gamma, sunrealtype* gamrat - allocates the interpolation data structure (if needed based on ARKStep solver options) - updates the call_fullrhs flag if necessary - - With initialization type FIRST_INIT or RESIZE_INIT, this routine: - - sets the relevant TakeStep routine based on the current - problem configuration - - checks for consistency between the system and mass matrix - linear solvers (if applicable) - - initializes and sets up the system and mass matrix linear - solvers (if applicable) - - initializes and sets up the nonlinear solver (if applicable) - - With initialization type RESET_INIT, this routine does nothing. ---------------------------------------------------------------*/ int arkStep_Init(ARKodeMem ark_mem, SUNDIALS_MAYBE_UNUSED sunrealtype tout, int init_type) @@ -959,7 +962,7 @@ int arkStep_Init(ARKodeMem ark_mem, SUNDIALS_MAYBE_UNUSED sunrealtype tout, if (init_type == RESET_INIT) { return (ARK_SUCCESS); } /* initializations/checks for (re-)initialization call */ - if (init_type == FIRST_INIT) + if (init_type == ALLOC_INIT || init_type == FIRST_INIT) { /* enforce use of arkEwtSmallReal if using a fixed step size for an explicit method, an internal error weight function, not @@ -1044,16 +1047,13 @@ int arkStep_Init(ARKodeMem ark_mem, SUNDIALS_MAYBE_UNUSED sunrealtype tout, { if (step_mem->Fe == NULL) { - step_mem->Fe = (N_Vector*)calloc(step_mem->stages, sizeof(N_Vector)); - } - for (j = 0; j < step_mem->stages; j++) - { - if (!arkAllocVec(ark_mem, ark_mem->ewt, &(step_mem->Fe[j]))) + if (!arkAllocVecArray(step_mem->stages, ark_mem->ewt, + &(step_mem->Fe), ark_mem->lrw1, &(ark_mem->lrw), + ark_mem->liw1, &(ark_mem->liw))) { return (ARK_MEM_FAIL); } } - ark_mem->liw += step_mem->stages; /* pointers */ } /* Allocate Fi[0] ... Fi[stages-1] if needed */ @@ -1061,16 +1061,13 @@ int arkStep_Init(ARKodeMem ark_mem, SUNDIALS_MAYBE_UNUSED sunrealtype tout, { if (step_mem->Fi == NULL) { - step_mem->Fi = (N_Vector*)calloc(step_mem->stages, sizeof(N_Vector)); - } - for (j = 0; j < step_mem->stages; j++) - { - if (!arkAllocVec(ark_mem, ark_mem->ewt, &(step_mem->Fi[j]))) + if (!arkAllocVecArray(step_mem->stages, ark_mem->ewt, + &(step_mem->Fi), ark_mem->lrw1, &(ark_mem->lrw), + ark_mem->liw1, &(ark_mem->liw))) { return (ARK_MEM_FAIL); } } - ark_mem->liw += step_mem->stages; /* pointers */ } /* Allocate stage storage for relaxation with implicit/IMEX methods or if a @@ -1080,16 +1077,13 @@ int arkStep_Init(ARKodeMem ark_mem, SUNDIALS_MAYBE_UNUSED sunrealtype tout, { if (step_mem->z == NULL) { - step_mem->z = (N_Vector*)calloc(step_mem->stages, sizeof(N_Vector)); - } - for (j = 0; j < step_mem->stages; j++) - { - if (!arkAllocVec(ark_mem, ark_mem->ewt, &(step_mem->z[j]))) + if (!arkAllocVecArray(step_mem->stages, ark_mem->ewt, + &(step_mem->z), ark_mem->lrw1, &(ark_mem->lrw), + ark_mem->liw1, &(ark_mem->liw))) { return (ARK_MEM_FAIL); } } - ark_mem->liw += step_mem->stages; /* pointers */ } /* Allocate reusable arrays for fused vector operations */ @@ -1169,7 +1163,7 @@ int arkStep_Init(ARKodeMem ark_mem, SUNDIALS_MAYBE_UNUSED sunrealtype tout, } /* Perform mass matrix solver initialization and setup (if applicable) */ - if (step_mem->mass_type != MASS_IDENTITY) + if (step_mem->mass_type != MASS_IDENTITY && !step_mem->preallocated) { /* Call minit (if it exists) */ if (step_mem->minit != NULL) @@ -1198,7 +1192,7 @@ int arkStep_Init(ARKodeMem ark_mem, SUNDIALS_MAYBE_UNUSED sunrealtype tout, } /* Call linit (if it exists) */ - if (step_mem->linit) + if (step_mem->linit && !step_mem->preallocated) { retval = step_mem->linit(ark_mem); if (retval != 0) @@ -1210,7 +1204,7 @@ int arkStep_Init(ARKodeMem ark_mem, SUNDIALS_MAYBE_UNUSED sunrealtype tout, } /* Initialize the nonlinear solver object (if it exists) */ - if (step_mem->NLS) + if (step_mem->NLS && !step_mem->preallocated) { retval = arkStep_NlsInit(ark_mem); if (retval != ARK_SUCCESS) @@ -1224,6 +1218,13 @@ int arkStep_Init(ARKodeMem ark_mem, SUNDIALS_MAYBE_UNUSED sunrealtype tout, /* Signal to shared arkode module that full RHS evaluations are required */ ark_mem->call_fullrhs = SUNTRUE; + /* if init_type == ALLOC_INIT then store preallocated flag */ + if (init_type == ALLOC_INIT) { step_mem->preallocated = SUNTRUE; } + + /* if init_type == FIRST_INIT then reset preallocated flag (in case + of an eventual resize or reinit) */ + if (init_type == FIRST_INIT) { step_mem->preallocated = SUNFALSE; } + return (ARK_SUCCESS); } diff --git a/src/arkode/arkode_arkstep_impl.h b/src/arkode/arkode_arkstep_impl.h index c0ac1c15b3..48a7aa39c2 100644 --- a/src/arkode/arkode_arkstep_impl.h +++ b/src/arkode/arkode_arkstep_impl.h @@ -79,6 +79,9 @@ typedef struct ARKodeARKStepMemRec sunbooleantype implicit; /* SUNTRUE if fi is enabled */ sunbooleantype deduce_rhs; /* SUNTRUE if fi is deduced after a nonlinear solve */ + sunbooleantype preallocated; /* SUNTRUE if data has been + preallocated in a call to + arkStep_Init with ALLOC_INIT */ /* Adjoint problem specification */ SUNAdjRhsFn adj_fe; diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index 2aef6d96df..4ef1ef5ce7 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -465,16 +465,13 @@ int erkStep_Init(ARKodeMem ark_mem, SUNDIALS_MAYBE_UNUSED sunrealtype tout, /* Allocate F[0] ... F[stages-1] if needed */ if (step_mem->F == NULL) { - step_mem->F = (N_Vector*)calloc(step_mem->stages, sizeof(N_Vector)); - } - for (j = 0; j < step_mem->stages; j++) - { - if (!arkAllocVec(ark_mem, ark_mem->ewt, &(step_mem->F[j]))) + if (!arkAllocVecArray(step_mem->stages, ark_mem->ewt, + &(step_mem->F), ark_mem->lrw1, &(ark_mem->lrw), + ark_mem->liw1, &(ark_mem->liw))) { return (ARK_MEM_FAIL); } } - ark_mem->liw += step_mem->stages; /* pointers */ /* Allocate reusable arrays for fused vector interface */ step_mem->nfusedopvecs = 2 * step_mem->stages + 2 + step_mem->nforcing; diff --git a/src/arkode/arkode_forcingstep.c b/src/arkode/arkode_forcingstep.c index 79ade2be18..102be646b0 100644 --- a/src/arkode/arkode_forcingstep.c +++ b/src/arkode/arkode_forcingstep.c @@ -90,8 +90,8 @@ static int forcingStep_Init(ARKodeMem ark_mem, return ARK_ILL_INPUT; } - /* immediately return if resize or reset */ - if (init_type == RESIZE_INIT || init_type == RESET_INIT) + /* immediately return if not called in FIRST_INIT mode */ + if (init_type != FIRST_INIT) { return ARK_SUCCESS; } diff --git a/src/arkode/arkode_impl.h b/src/arkode/arkode_impl.h index 5a46791ac1..f7c2dd4a5f 100644 --- a/src/arkode/arkode_impl.h +++ b/src/arkode/arkode_impl.h @@ -99,9 +99,10 @@ extern "C" { /*--------------------------------------------------------------- Initialization types ---------------------------------------------------------------*/ -#define FIRST_INIT 0 /* first step (re-)initialization */ -#define RESET_INIT 1 /* reset initialization */ -#define RESIZE_INIT 2 /* resize initialization */ +#define FIRST_INIT 0 /* first step (re-)initialization */ +#define RESET_INIT 1 /* reset initialization */ +#define RESIZE_INIT 2 /* resize initialization */ +#define ALLOC_INIT 3 /* allocate data (before FIRST_INIT) */ /*--------------------------------------------------------------- Control constants for lower-level time-stepping functions @@ -720,7 +721,7 @@ int arkGetLastKFlag(void* arkode_mem, int* last_kflag); #define MSG_ARK_NO_MEM "arkode_mem = NULL illegal." #define MSG_ARK_ARKMEM_FAIL "Allocation of arkode_mem failed." #define MSG_ARK_MEM_FAIL "A memory request failed." -#define MSG_ARK_NO_MALLOC "Attempt to call before ARKodeInit." +#define MSG_ARK_NO_MALLOC "Attempt to call before ARKODE initialized." #define MSG_ARK_BAD_HMIN_HMAX "Inconsistent step size limits: hmin > hmax." #define MSG_ARK_BAD_RELTOL "reltol < 0 illegal." #define MSG_ARK_BAD_ABSTOL "abstol has negative component(s) (illegal)." @@ -1015,12 +1016,26 @@ int arkGetLastKFlag(void* arkode_mem, int* last_kflag); ARKTimestepInitFn This routine is called just prior to performing internal time - steps (after all user "set" routines have been called) from - within arkInitialSetup. It should complete initializations for - a specific ARKODE time stepping module, such as verifying - compatibility of user-specified linear and nonlinear solver - objects. The input init_type flag indicates if the call is - for (re-)initializing, resizing, or resetting the problem. + steps (after all user "set" routines have been called), either + from within arkInitialSetup or ARKodeAllocateInternalData. + It should perform initializations for a specific ARKODE time + stepping module, such as verifying compatibility of user- + specified linear and nonlinear solver objects. + + The input init_type flag indicates the type of call: + * FIRST_INIT -- called during arkInitialSetup for the first + time step of a simulation. + * RESIZE_INIT -- called during ARKodeResize to resize + internal stepper data structures after a change in problem size. + * RESET_INIT -- called during ARKodeReset to reset the current + (t,y) state in the stepper. + * ALLOC_INIT -- called during the optional routine + ARKodeAllocateInternalData to allocate and initialize + internal stepper data structures. Note that the routine + will be called again with FIRST_INIT. Thus a time-stepper + can either ignore this flag (and just return), or if it + performs allocations here then it should not re-allocate + the same data when called with FIRST_INIT. This routine should return 0 if it has successfully initialized the ARKODE time stepper module and a negative value otherwise. @@ -1242,6 +1257,13 @@ int arkGetLastKFlag(void* arkode_mem, int* last_kflag); requested method order parameter that was passed to ARKodeSetOrder. + --------------------------------------------------------------- + + ARKTimestepSetOptions + + This optional routine allows the stepper to accept any user- + requested method options that were passed to ARKodeSetOptions. + =============================================================== Internal Interface to Time Steppers -- Temporal Adaptivity diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index 2e08cd5434..a504f2b1e8 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -2242,6 +2242,13 @@ int ARKodeResetAccumulatedError(void* arkode_mem) return (ARK_SUCCESS); } +/*--------------------------------------------------------------- + ARKodeSetAdjointCheckpointScheme: + ARKodeSetAdjointCheckpointIndex: + + Specifies the checkpointing scheme and index to be used for adjoint + sensitivity analysis. + ---------------------------------------------------------------*/ int ARKodeSetAdjointCheckpointScheme(void* arkode_mem, SUNAdjointCheckpointScheme checkpoint_scheme) @@ -2283,6 +2290,12 @@ int ARKodeSetAdjointCheckpointIndex(void* arkode_mem, suncountertype step_index) return (ARK_SUCCESS); } +/*--------------------------------------------------------------- + ARKodeSetUseCompensatedSums: + + Specifies that ARKode should use compensated summation to reduce + the effects of floating-point roundoff. + ---------------------------------------------------------------*/ int ARKodeSetUseCompensatedSums(void* arkode_mem, sunbooleantype onoff) { ARKodeMem ark_mem; @@ -2305,6 +2318,44 @@ int ARKodeSetUseCompensatedSums(void* arkode_mem, sunbooleantype onoff) return (ARK_SUCCESS); } +/*--------------------------------------------------------------- + ARKodeAllocateInternalData: + + Allocates internal data structures for an ARKODE stepper module + before the first call to ARKodeEvolve. + + **THIS MUST BE CALLED AFTER ALL "SET" ROUTINES.** + ---------------------------------------------------------------*/ +int ARKodeAllocateInternalData(void* arkode_mem) +{ + ARKodeMem ark_mem; + int retval; + if (arkode_mem == NULL) + { + arkProcessError(NULL, ARK_MEM_NULL, __LINE__, __func__, __FILE__, + MSG_ARK_NO_MEM); + return (ARK_MEM_NULL); + } + ark_mem = (ARKodeMem)arkode_mem; + + /* Call step_init routine with "ALLOC_INIT" flag, requesting + that the time stepper module allocate any remaining internal + data */ + if (ark_mem->step_init == NULL) + { + arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, __FILE__, + "Time stepper module is missing"); + return (ARK_ILL_INPUT); + } + retval = ark_mem->step_init(ark_mem, ZERO, ALLOC_INIT); + if (retval != ARK_SUCCESS) + { + arkProcessError(ark_mem, retval, __LINE__, __func__, __FILE__, + "Error in initialization of time stepper module"); + } + return (retval); +} + /*=============================================================== ARKODE optional output utility functions ===============================================================*/ diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 2f48ffc13f..5a7b03f26b 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -915,7 +915,18 @@ int mriStep_GetGammas(ARKodeMem ark_mem, sunrealtype* gamma, sunrealtype* gamrat steps (after all user "set" routines have been called) from within arkInitialSetup. - With initialization types FIRST_INIT this routine: + With initialization type RESET_INIT, this routine does nothing. + + For other initialization types, this routine: + - initializes and sets up the linear and nonlinear solvers + (if applicable) + - initializes and sets up the nonlinear solver (if applicable) + - performs timestep adaptivity checks and initial setup, + including setting the initial time step size if needed + + With initialization type FIRST_INIT this routine additionally: + - sets the relevant TakeStep routine based on the current + problem configuration - sets/checks the coefficient tables to be used - allocates any internal memory that depends on the MRI method structure or solver options @@ -937,7 +948,8 @@ int mriStep_Init(ARKodeMem ark_mem, sunrealtype tout, int init_type) if (init_type == RESET_INIT) { return (ARK_SUCCESS); } /* initializations/checks for (re-)initialization call */ - if (init_type == FIRST_INIT) + if (init_type == ALLOC_INIT || + (init_type == FIRST_INIT && !step_mem->preallocated)) { /* enforce use of arkEwtSmallReal if using a fixed step size for an explicit method, an internal error weight function, and not performing @@ -1260,7 +1272,7 @@ int mriStep_Init(ARKodeMem ark_mem, sunrealtype tout, int init_type) } /* Call linit (if it exists) */ - if (step_mem->linit) + if (step_mem->linit && !step_mem->preallocated) { retval = step_mem->linit(ark_mem); if (retval != 0) @@ -1272,7 +1284,7 @@ int mriStep_Init(ARKodeMem ark_mem, sunrealtype tout, int init_type) } /* Initialize the nonlinear solver object (if it exists) */ - if (step_mem->NLS) + if (step_mem->NLS && !step_mem->preallocated) { retval = mriStep_NlsInit(ark_mem); if (retval != ARK_SUCCESS) @@ -1283,80 +1295,90 @@ int mriStep_Init(ARKodeMem ark_mem, sunrealtype tout, int init_type) } } - /*** Perform timestep adaptivity checks and initial setup ***/ - - /* get timestep adaptivity type */ - adapt_type = SUNAdaptController_GetType(ark_mem->hadapt_mem->hcontroller); - - if (ark_mem->fixedstep) - { - /* Fixed step sizes: user must supply the initial step size */ - if (ark_mem->hin == ZERO) - { - arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, - __FILE__, "Timestep adaptivity disabled, but missing user-defined fixed stepsize"); - return (ARK_ILL_INPUT); - } - } - else + /*** Perform timestep adaptivity checks and initial setup (skip on ALLOC_INIT) ***/ + if (init_type != ALLOC_INIT) { - /* ensure that a compatible adaptivity controller is provided */ - if ((adapt_type != SUN_ADAPTCONTROLLER_MRI_H_TOL) && - (adapt_type != SUN_ADAPTCONTROLLER_H)) - { - arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, __FILE__, - "SUNAdaptController type is unsupported by MRIStep"); - return (ARK_ILL_INPUT); - } - /* Controller provides adaptivity (at least at the slow time scale): - - verify that the MRI method includes an embedding, and - - estimate initial slow step size (store in ark_mem->hin) */ - if (step_mem->MRIC->p <= 0) + /* get timestep adaptivity type */ + adapt_type = SUNAdaptController_GetType(ark_mem->hadapt_mem->hcontroller); + + if (ark_mem->fixedstep) { - arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, - __FILE__, "Timestep adaptivity enabled, but non-embedded MRI table specified"); - return (ARK_ILL_INPUT); + /* Fixed step sizes: user must supply the initial step size */ + if (ark_mem->hin == ZERO) + { + arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, + __FILE__, "Timestep adaptivity disabled, but missing user-defined fixed stepsize"); + return (ARK_ILL_INPUT); + } } - if (ark_mem->hin == ZERO) + else { - /* initialize (tcur,ycur) to (t0,y0) */ - ark_mem->tcur = ark_mem->tn; - N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + /* ensure that a compatible adaptivity controller is provided */ + if ((adapt_type != SUN_ADAPTCONTROLLER_MRI_H_TOL) && + (adapt_type != SUN_ADAPTCONTROLLER_H)) + { + arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, __FILE__, + "SUNAdaptController type is unsupported by MRIStep"); + return (ARK_ILL_INPUT); + } - /* tempv1 = fslow(t0, y0) */ - if (mriStep_SlowRHS(ark_mem, ark_mem->tcur, ark_mem->ycur, - ark_mem->tempv1, ARK_FULLRHS_START) != ARK_SUCCESS) + /* Controller provides adaptivity (at least at the slow time scale): + - verify that the MRI method includes an embedding, and + - estimate initial slow step size (store in ark_mem->hin) */ + if (step_mem->MRIC->p <= 0) { - arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, __FILE__, - "error calling slow RHS function(s)"); - return (ARK_RHSFUNC_FAIL); + arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, + __FILE__, "Timestep adaptivity enabled, but non-embedded MRI table specified"); + return (ARK_ILL_INPUT); } - retval = mriStep_Hin(ark_mem, ark_mem->tcur, tout, ark_mem->tempv1, - &(ark_mem->hin)); - if (retval != ARK_SUCCESS) + if (ark_mem->hin == ZERO) { - retval = arkHandleFailure(ark_mem, retval); - return (retval); + /* initialize (tcur,ycur) to (t0,y0) */ + ark_mem->tcur = ark_mem->tn; + N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + + /* tempv1 = fslow(t0, y0) */ + if (mriStep_SlowRHS(ark_mem, ark_mem->tcur, ark_mem->ycur, + ark_mem->tempv1, ARK_FULLRHS_START) != ARK_SUCCESS) + { + arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, __FILE__, + "error calling slow RHS function(s)"); + return (ARK_RHSFUNC_FAIL); + } + retval = mriStep_Hin(ark_mem, ark_mem->tcur, tout, ark_mem->tempv1, + &(ark_mem->hin)); + if (retval != ARK_SUCCESS) + { + retval = arkHandleFailure(ark_mem, retval); + return (retval); + } } } - } - /* Perform additional setup for (H,tol) controller */ - if (adapt_type == SUN_ADAPTCONTROLLER_MRI_H_TOL) - { - /* Verify that adaptivity type is supported by inner stepper */ - if (!mriStepInnerStepper_SupportsRTolAdaptivity(step_mem->stepper)) + /* Perform additional setup for (H,tol) controller */ + if (adapt_type == SUN_ADAPTCONTROLLER_MRI_H_TOL) { - arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, - __FILE__, "MRI H-TOL SUNAdaptController provided, but unsupported by inner stepper"); - return (ARK_ILL_INPUT); - } + /* Verify that adaptivity type is supported by inner stepper */ + if (!mriStepInnerStepper_SupportsRTolAdaptivity(step_mem->stepper)) + { + arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, + __FILE__, "MRI H-TOL SUNAdaptController provided, but unsupported by inner stepper"); + return (ARK_ILL_INPUT); + } - /* initialize fast stepper to use the same relative tolerance as MRIStep */ - step_mem->inner_rtol_factor = ONE; + /* initialize fast stepper to use the same relative tolerance as MRIStep */ + step_mem->inner_rtol_factor = ONE; + } } + /* if init_type == ALLOC_INIT then store preallocated flag */ + if (init_type == ALLOC_INIT) { step_mem->preallocated = SUNTRUE; } + + /* if init_type == FIRST_INIT then reset preallocated flag (in case + of an eventual resize or reinit) */ + if (init_type == FIRST_INIT) { step_mem->preallocated = SUNFALSE; } + return (ARK_SUCCESS); } diff --git a/src/arkode/arkode_mristep_impl.h b/src/arkode/arkode_mristep_impl.h index ead502cbb3..482fe51c18 100644 --- a/src/arkode/arkode_mristep_impl.h +++ b/src/arkode/arkode_mristep_impl.h @@ -75,6 +75,9 @@ typedef struct ARKodeMRIStepMemRec sunbooleantype implicit_rhs; /* SUNTRUE if fsi is provided */ sunbooleantype deduce_rhs; /* SUNTRUE if fi is deduced after a nonlinear solve */ + sunbooleantype preallocated; /* SUNTRUE if data has been + preallocated in a call to + mriStep_Init with ALLOC_INIT */ /* Outer RK method storage and parameters */ N_Vector* Fse; /* explicit RHS at each stage */ diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index a2ae4d57fc..cb4ab1fd2b 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -374,8 +374,8 @@ int sprkStep_Init(ARKodeMem ark_mem, SUNDIALS_MAYBE_UNUSED sunrealtype tout, /* immediately return if reset */ if (init_type == RESET_INIT) { return (ARK_SUCCESS); } - /* initializations/checks for (re-)initialization call */ - if (init_type == FIRST_INIT) + /* initializations/checks for (re-)initialization or allocation */ + if (init_type == FIRST_INIT || init_type == ALLOC_INIT) { if (!step_mem->method) { @@ -414,6 +414,9 @@ int sprkStep_Init(ARKodeMem ark_mem, SUNDIALS_MAYBE_UNUSED sunrealtype tout, break; } } + + /* Immediately return if called for allocation */ + if (init_type == ALLOC_INIT) { return (ARK_SUCCESS); } } /* Override the interpolant degree (if needed), used in arkInitialSetup */ diff --git a/src/arkode/fmod_int32/farkode_mod.c b/src/arkode/fmod_int32/farkode_mod.c index 8b1823a253..62a30445d8 100644 --- a/src/arkode/fmod_int32/farkode_mod.c +++ b/src/arkode/fmod_int32/farkode_mod.c @@ -720,6 +720,18 @@ SWIGEXPORT int _wrap_FARKodeSetPostprocessStageFn(void *farg1, ARKPostProcessFn } +SWIGEXPORT int _wrap_FARKodeAllocateInternalData(void *farg1) { + int fresult ; + void *arg1 = (void *) 0 ; + int result; + + arg1 = (void *)(farg1); + result = (int)ARKodeAllocateInternalData(arg1); + fresult = (int)(result); + return fresult; +} + + SWIGEXPORT int _wrap_FARKodeSetNonlinearSolver(void *farg1, SUNNonlinearSolver farg2) { int fresult ; void *arg1 = (void *) 0 ; diff --git a/src/arkode/fmod_int32/farkode_mod.f90 b/src/arkode/fmod_int32/farkode_mod.f90 index 2e26e4f62e..77ef9123e0 100644 --- a/src/arkode/fmod_int32/farkode_mod.f90 +++ b/src/arkode/fmod_int32/farkode_mod.f90 @@ -150,6 +150,7 @@ module farkode_mod public :: FARKodeSetPostprocessStepFailFn public :: FARKodeSetPreprocessRHSFn public :: FARKodeSetPostprocessStageFn + public :: FARKodeAllocateInternalData public :: FARKodeSetNonlinearSolver public :: FARKodeSetLinear public :: FARKodeSetNonlinear @@ -753,6 +754,14 @@ function swigc_FARKodeSetPostprocessStageFn(farg1, farg2) & integer(C_INT) :: fresult end function +function swigc_FARKodeAllocateInternalData(farg1) & +bind(C, name="_wrap_FARKodeAllocateInternalData") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +integer(C_INT) :: fresult +end function + function swigc_FARKodeSetNonlinearSolver(farg1, farg2) & bind(C, name="_wrap_FARKodeSetNonlinearSolver") & result(fresult) @@ -3006,6 +3015,19 @@ function FARKodeSetPostprocessStageFn(arkode_mem, processstage) & swig_result = fresult end function +function FARKodeAllocateInternalData(arkode_mem) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +integer(C_INT) :: fresult +type(C_PTR) :: farg1 + +farg1 = arkode_mem +fresult = swigc_FARKodeAllocateInternalData(farg1) +swig_result = fresult +end function + function FARKodeSetNonlinearSolver(arkode_mem, nls) & result(swig_result) use, intrinsic :: ISO_C_BINDING diff --git a/src/arkode/fmod_int64/farkode_mod.c b/src/arkode/fmod_int64/farkode_mod.c index 29add22fe2..33370377a7 100644 --- a/src/arkode/fmod_int64/farkode_mod.c +++ b/src/arkode/fmod_int64/farkode_mod.c @@ -720,6 +720,18 @@ SWIGEXPORT int _wrap_FARKodeSetPostprocessStageFn(void *farg1, ARKPostProcessFn } +SWIGEXPORT int _wrap_FARKodeAllocateInternalData(void *farg1) { + int fresult ; + void *arg1 = (void *) 0 ; + int result; + + arg1 = (void *)(farg1); + result = (int)ARKodeAllocateInternalData(arg1); + fresult = (int)(result); + return fresult; +} + + SWIGEXPORT int _wrap_FARKodeSetNonlinearSolver(void *farg1, SUNNonlinearSolver farg2) { int fresult ; void *arg1 = (void *) 0 ; diff --git a/src/arkode/fmod_int64/farkode_mod.f90 b/src/arkode/fmod_int64/farkode_mod.f90 index 291ca02c8a..cdc14241a6 100644 --- a/src/arkode/fmod_int64/farkode_mod.f90 +++ b/src/arkode/fmod_int64/farkode_mod.f90 @@ -150,6 +150,7 @@ module farkode_mod public :: FARKodeSetPostprocessStepFailFn public :: FARKodeSetPreprocessRHSFn public :: FARKodeSetPostprocessStageFn + public :: FARKodeAllocateInternalData public :: FARKodeSetNonlinearSolver public :: FARKodeSetLinear public :: FARKodeSetNonlinear @@ -753,6 +754,14 @@ function swigc_FARKodeSetPostprocessStageFn(farg1, farg2) & integer(C_INT) :: fresult end function +function swigc_FARKodeAllocateInternalData(farg1) & +bind(C, name="_wrap_FARKodeAllocateInternalData") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +integer(C_INT) :: fresult +end function + function swigc_FARKodeSetNonlinearSolver(farg1, farg2) & bind(C, name="_wrap_FARKodeSetNonlinearSolver") & result(fresult) @@ -3006,6 +3015,19 @@ function FARKodeSetPostprocessStageFn(arkode_mem, processstage) & swig_result = fresult end function +function FARKodeAllocateInternalData(arkode_mem) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +integer(C_INT) :: fresult +type(C_PTR) :: farg1 + +farg1 = arkode_mem +fresult = swigc_FARKodeAllocateInternalData(farg1) +swig_result = fresult +end function + function FARKodeSetNonlinearSolver(arkode_mem, nls) & result(swig_result) use, intrinsic :: ISO_C_BINDING diff --git a/test/unit_tests/arkode/CXX_serial/CMakeLists.txt b/test/unit_tests/arkode/CXX_serial/CMakeLists.txt index 46331024ca..f07725855d 100644 --- a/test/unit_tests/arkode/CXX_serial/CMakeLists.txt +++ b/test/unit_tests/arkode/CXX_serial/CMakeLists.txt @@ -69,7 +69,14 @@ set(unit_tests "ark_test_adjoint_ark.cpp\;--check-freq 5\;" "ark_test_adjoint_ark.cpp\;--check-freq 1 --dont-keep\;" "ark_test_adjoint_ark.cpp\;--check-freq 2 --dont-keep\;" - "ark_test_adjoint_ark.cpp\;--check-freq 5 --dont-keep\;") + "ark_test_adjoint_ark.cpp\;--check-freq 5 --dont-keep\;" + "ark_test_prealloc_arkstep.cpp\;1\;" + "ark_test_prealloc_erkstep.cpp\;1\;" + "ark_test_prealloc_forcingstep.cpp\;1\;" + "ark_test_prealloc_lsrkstep.cpp\;1\;" + "ark_test_prealloc_mristep.cpp\;1\;" + "ark_test_prealloc_splittingstep.cpp\;1\;" + "ark_test_prealloc_sprkstep.cpp\;1\;") # Add the build and install targets for each test foreach(test_tuple ${unit_tests}) @@ -110,6 +117,7 @@ foreach(test_tuple ${unit_tests}) sundials_nvecmanyvector_obj sundials_sunlinsolband_obj sundials_sunlinsoldense_obj + sundials_sunlinsolspgmr_obj sundials_sunnonlinsolnewton_obj sundials_sunnonlinsolfixedpoint_obj sundials_sunadaptcontrollerimexgus_obj diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_arkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_arkstep.cpp new file mode 100644 index 0000000000..959800eb71 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_arkstep.cpp @@ -0,0 +1,150 @@ +/* ----------------------------------------------------------------------------- + * Programmer(s): Daniel R. Reynolds @ UMBC + * based on test_logging_arkode_arkstep.cpp by David J. Gardner @ LLNL + * ----------------------------------------------------------------------------- + * SUNDIALS Copyright Start + * Copyright (c) 2025, Lawrence Livermore National Security, + * University of Maryland Baltimore County, and the SUNDIALS contributors. + * Copyright (c) 2013-2025, Lawrence Livermore National Security + * and Southern Methodist University. + * Copyright (c) 2002-2013, Lawrence Livermore National Security. + * All rights reserved. + * + * See the top-level LICENSE and NOTICE files for details. + * + * SPDX-License-Identifier: BSD-3-Clause + * SUNDIALS Copyright End + * ----------------------------------------------------------------------------- + * Test data preallocation in ARKStep + * ---------------------------------------------------------------------------*/ + +#include +#include +#include +#include +#include + +// Include desired integrators, vectors, linear solvers, and nonlinear solvers +#include "arkode/arkode_arkstep.h" +#include "nvector/nvector_serial.h" +#include "sundials/sundials_context.hpp" +#include "sundials/sundials_iterative.h" +#include "sundials/sundials_nonlinearsolver.h" +#include "sunlinsol/sunlinsol_spgmr.h" + +#include "problems/kpr.hpp" +#include "utilities/check_return.hpp" + +using namespace std; +using namespace problems::kpr; + +int main(int argc, char* argv[]) +{ + cout << "Start ARKStep preallocation test" << endl; + + // SUNDIALS context object for this simulation + sundials::Context sunctx; + + // Preallocate data + bool preallocate_data = false; + if (argc > 1) { preallocate_data = stoi(argv[1]); } + + // Create initial condition + N_Vector y = N_VNew_Serial(2, sunctx); + if (check_ptr(y, "N_VNew_Serial")) { return 1; } + + sunrealtype utrue, vtrue; + int flag = true_sol(zero, &utrue, &vtrue); + if (check_flag(flag, "true_sol")) { return 1; } + + sunrealtype* ydata = N_VGetArrayPointer(y); + ydata[0] = utrue; + ydata[1] = vtrue; + + // Create ARKStep memory structure + void* arkode_mem = nullptr; + cout << "Using DIRK method" << endl; + arkode_mem = ARKStepCreate(nullptr, ode_rhs, zero, y, sunctx); + if (check_ptr(arkode_mem, "ARKStepCreate")) { return 1; } + + flag = ARKodeSetUserData(arkode_mem, &problem_data); + if (check_flag(flag, "ARKodeSetUserData")) { return 1; } + + // Relative and absolute tolerances + const sunrealtype rtol = SUN_RCONST(1.0e-6); + const sunrealtype atol = SUN_RCONST(1.0e-10); + flag = ARKodeSStolerances(arkode_mem, rtol, atol); + if (check_flag(flag, "ARKodeSStolerances")) { return 1; } + + // Implicit algebraic solvers + SUNMatrix A = nullptr; + SUNLinearSolver LS = nullptr; + cout << "Using Newton nonlinear solver" << endl; + cout << "Using GMRES iterative linear solver" << endl; + LS = SUNLinSol_SPGMR(y, SUN_PREC_NONE, 0, sunctx); + if (check_ptr(LS, "SUNLinSol_SPGMR")) { return 1; } + flag = ARKodeSetLinearSolver(arkode_mem, LS, A); + if (check_flag(flag, "ARKodeSetLinearSolver")) { return 1; } + + // Data preallocation + if (preallocate_data) + { + flag = ARKodeAllocateInternalData(arkode_mem); + if (check_flag(flag, "ARKodeAllocateInternalData")) { return 1; } + } + + // Initial time and fist output time + const sunrealtype dtout = one; // output interval + const int nout = 3; // number of outputs + sunrealtype tret = zero; + sunrealtype tout = tret + dtout; + + // Output initial contion + cout << scientific; + cout << setprecision(numeric_limits::digits10); + cout << " t "; + cout << " u "; + cout << " v "; + cout << " u err "; + cout << " v err " << endl; + for (int i = 0; i < 9; i++) { cout << "--------------"; } + cout << endl; + + cout << setw(22) << tret << setw(25) << ydata[0] << setw(25) << ydata[1] + << setw(25) << abs(ydata[0] - utrue) << setw(25) << abs(ydata[1] - vtrue) + << endl; + + // Advance in time + for (int i = 0; i < nout; i++) + { + flag = ARKodeEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); + if (check_flag(flag, "ARKode")) { return 1; } + + flag = true_sol(tret, &utrue, &vtrue); + if (check_flag(flag, "true_sol")) { return 1; } + + cout << setw(22) << tret << setw(25) << ydata[0] << setw(25) << ydata[1] + << setw(25) << abs(ydata[0] - utrue) << setw(25) + << abs(ydata[1] - vtrue) << endl; + + // update output time + tout += dtout; + } + for (int i = 0; i < 9; i++) { cout << "--------------"; } + cout << endl; + + // Print some final statistics + flag = ARKodePrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); + if (check_flag(flag, "ARKodePrintAllStats")) { return 1; } + + // Clean up and return with successful completion + N_VDestroy(y); + SUNLinSolFree(LS); + ARKodeFree(&arkode_mem); + + cout << "End ARKStep preallocation test" << endl; + + return 0; +} + +/*---- end of file ----*/ diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_erkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_erkstep.cpp new file mode 100644 index 0000000000..ffa2cd6187 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_erkstep.cpp @@ -0,0 +1,135 @@ +/* ----------------------------------------------------------------------------- + * Programmer(s): Daniel R. Reynolds @ UMBC + * based on test_logging_arkode_erkstep.cpp by David J. Gardner @ LLNL + * ----------------------------------------------------------------------------- + * SUNDIALS Copyright Start + * Copyright (c) 2025, Lawrence Livermore National Security, + * University of Maryland Baltimore County, and the SUNDIALS contributors. + * Copyright (c) 2013-2025, Lawrence Livermore National Security + * and Southern Methodist University. + * Copyright (c) 2002-2013, Lawrence Livermore National Security. + * All rights reserved. + * + * See the top-level LICENSE and NOTICE files for details. + * + * SPDX-License-Identifier: BSD-3-Clause + * SUNDIALS Copyright End + * ----------------------------------------------------------------------------- + * Test data preallocation in ERKStep + * ---------------------------------------------------------------------------*/ + +#include +#include +#include +#include +#include + +// Include desired integrators, vectors, linear solvers, and nonlinear solvers +#include "arkode/arkode_erkstep.h" +#include "nvector/nvector_serial.h" +#include "sundials/sundials_context.hpp" + +#include "problems/kpr.hpp" +#include "utilities/check_return.hpp" + +using namespace std; +using namespace problems::kpr; + +int main(int argc, char* argv[]) +{ + cout << "Start ERKStep preallocation test" << endl; + + // SUNDIALS context object for this simulation + sundials::Context sunctx; + + // Preallocate data + bool preallocate_data = false; + if (argc > 1) { preallocate_data = stoi(argv[1]); } + + // Create initial condition + N_Vector y = N_VNew_Serial(2, sunctx); + if (check_ptr(y, "N_VNew_Serial")) { return 1; } + + sunrealtype utrue, vtrue; + int flag = true_sol(zero, &utrue, &vtrue); + if (check_flag(flag, "true_sol")) { return 1; } + + sunrealtype* ydata = N_VGetArrayPointer(y); + ydata[0] = utrue; + ydata[1] = vtrue; + + // Create ERKStep memory structure + void* arkode_mem = ERKStepCreate(ode_rhs, zero, y, sunctx); + if (check_ptr(arkode_mem, "ERKStepCreate")) { return 1; } + + flag = ARKodeSetUserData(arkode_mem, &problem_data); + if (check_flag(flag, "ARKodeSetUserData")) { return 1; } + + // Relative and absolute tolerances + const sunrealtype rtol = SUN_RCONST(1.0e-6); + const sunrealtype atol = SUN_RCONST(1.0e-10); + + flag = ARKodeSStolerances(arkode_mem, rtol, atol); + if (check_flag(flag, "ARKodeSStolerances")) { return 1; } + + // Data preallocation + if (preallocate_data) + { + flag = ARKodeAllocateInternalData(arkode_mem); + if (check_flag(flag, "ARKodeAllocateInternalData")) { return 1; } + } + + // Initial time and fist output time + const sunrealtype dtout = one; // output interval + const int nout = 3; // number of outputs + sunrealtype tret = zero; + sunrealtype tout = tret + dtout; + + // Output initial contion + cout << scientific; + cout << setprecision(numeric_limits::digits10); + cout << " t "; + cout << " u "; + cout << " v "; + cout << " u err "; + cout << " v err " << endl; + for (int i = 0; i < 9; i++) { cout << "--------------"; } + cout << endl; + + cout << setw(22) << tret << setw(25) << ydata[0] << setw(25) << ydata[1] + << setw(25) << abs(ydata[0] - utrue) << setw(25) << abs(ydata[1] - vtrue) + << endl; + + // Advance in time + for (int i = 0; i < nout; i++) + { + flag = ARKodeEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); + if (check_flag(flag, "ARKodeEvolve")) { return 1; } + + flag = true_sol(tret, &utrue, &vtrue); + if (check_flag(flag, "true_sol")) { return 1; } + + cout << setw(22) << tret << setw(25) << ydata[0] << setw(25) << ydata[1] + << setw(25) << abs(ydata[0] - utrue) << setw(25) + << abs(ydata[1] - vtrue) << endl; + + // update output time + tout += dtout; + } + for (int i = 0; i < 9; i++) { cout << "--------------"; } + cout << endl; + + // Print some final statistics + flag = ARKodePrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); + if (check_flag(flag, "ARKodePrintAllStats")) { return 1; } + + // Clean up and return with successful completion + N_VDestroy(y); + ARKodeFree(&arkode_mem); + + cout << "End ERKStep preallocation test" << endl; + + return 0; +} + +/*---- end of file ----*/ diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_forcingstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_forcingstep.cpp new file mode 100644 index 0000000000..1c0bfd8cc9 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_forcingstep.cpp @@ -0,0 +1,170 @@ +/* ----------------------------------------------------------------------------- + * Programmer(s): Daniel R. Reynolds @ UMBC + * based on test_logging_arkode_forcingstep.cpp by David J. Gardner @ LLNL + * ----------------------------------------------------------------------------- + * SUNDIALS Copyright Start + * Copyright (c) 2025, Lawrence Livermore National Security, + * University of Maryland Baltimore County, and the SUNDIALS contributors. + * Copyright (c) 2013-2025, Lawrence Livermore National Security + * and Southern Methodist University. + * Copyright (c) 2002-2013, Lawrence Livermore National Security. + * All rights reserved. + * + * See the top-level LICENSE and NOTICE files for details. + * + * SPDX-License-Identifier: BSD-3-Clause + * SUNDIALS Copyright End + * ----------------------------------------------------------------------------- + * Test data preallocation in ForcingStep + * ---------------------------------------------------------------------------*/ + +#include +#include +#include +#include +#include + +// Include desired integrators and vectors +#include "arkode/arkode_erkstep.h" +#include "arkode/arkode_forcingstep.h" +#include "nvector/nvector_serial.h" +#include "sundials/sundials_context.hpp" + +#include "problems/estep.hpp" +#include "utilities/check_return.hpp" + +using namespace std; +using namespace problems::estep; + +int main(int argc, char* argv[]) +{ + cout << "Start ForcingStep preallocation test" << endl; + + // SUNDIALS context object for this simulation + sundials::Context sunctx; + + // Preallocate data + bool preallocate_data = false; + if (argc > 1) { preallocate_data = stoi(argv[1]); } + + // Step sizes: overall, partition 1, partition 2 + sunrealtype dt = SUN_RCONST(0.001); + sunrealtype dt_1 = dt / 2; + sunrealtype dt_2 = dt / 4; + + // Create initial condition + N_Vector y = N_VNew_Serial(1, sunctx); + if (check_ptr(y, "N_VNew_Serial")) { return 1; } + + int flag = initial_condition(y); + if (check_flag(flag, "initial_condition")) { return 1; } + + // Create partition 1 integrator + void* stepper_1 = ERKStepCreate(ode_rhs_1, zero, y, sunctx); + if (check_ptr(stepper_1, "ERKStepCreate")) { return 1; } + + flag = ARKodeSetUserData(stepper_1, &problem_data); + if (check_flag(flag, "ARKodeSetUserData")) { return 1; } + + flag = ARKodeSetFixedStep(stepper_1, dt_1); + if (check_flag(flag, "ARKodeSetFixedStep")) { return 1; } + + // Create partition 1 integrator + void* stepper_2 = ERKStepCreate(ode_rhs_2, zero, y, sunctx); + if (check_ptr(stepper_2, "ERKStepCreate")) { return 1; } + + flag = ARKodeSetFixedStep(stepper_2, dt_2); + if (check_flag(flag, "ARKodeSetFixedStep")) { return 1; } + + // Create the overall integrator + SUNStepper steppers[2]; + + flag = ARKodeCreateSUNStepper(stepper_1, &steppers[0]); + if (check_flag(flag, "ARKodeSetFixedStep")) { return 1; } + + flag = ARKodeCreateSUNStepper(stepper_2, &steppers[1]); + if (check_flag(flag, "ARKodeSetFixedStep")) { return 1; } + + void* arkode_mem = ForcingStepCreate(steppers[0], steppers[1], zero, y, sunctx); + if (check_ptr(arkode_mem, "ForcingStepCreate")) { return 1; } + + flag = ARKodeSetFixedStep(arkode_mem, dt); + if (check_flag(flag, "ARKodeSetFixedStep")) { return 1; } + + // True solution vector + N_Vector yt = N_VClone(y); + + flag = true_solution(zero, problem_data, yt); + if (check_flag(flag, "true_solution")) { return 1; } + + // Data preallocation (all steppers) + if (preallocate_data) + { + flag = ARKodeAllocateInternalData(stepper_1); + if (check_flag(flag, "ARKodeAllocateInternalData")) { return 1; } + flag = ARKodeAllocateInternalData(stepper_2); + if (check_flag(flag, "ARKodeAllocateInternalData")) { return 1; } + flag = ARKodeAllocateInternalData(arkode_mem); + if (check_flag(flag, "ARKodeAllocateInternalData")) { return 1; } + } + + // Initial time and fist output time + const sunrealtype dtout = one; // output interval + const int nout = 3; // number of outputs + sunrealtype tret = zero; + sunrealtype tout = tret + dtout; + + const int width = numeric_limits::digits10 + 8; + + // Output initial contion + cout << scientific; + cout << setprecision(numeric_limits::digits10); + cout << setw(width) << " t"; + cout << setw(width) << " y"; + cout << setw(width) << " y err" << endl; + for (int i = 0; i < 3 * width; i++) { cout << "-"; } + cout << endl; + + sunrealtype* y_data = N_VGetArrayPointer(y); + sunrealtype* yt_data = N_VGetArrayPointer(yt); + + cout << setw(width) << tret << setw(width) << y_data[0] << setw(width) + << abs(y_data[0] - yt_data[0]) << endl; + + // Advance in time + for (int i = 0; i < nout; i++) + { + flag = ARKodeEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); + if (check_flag(flag, "ARKodeEvolve")) { return 1; } + + flag = true_solution(tret, problem_data, yt); + if (check_flag(flag, "true_solution")) { return 1; } + + cout << setw(width) << tret << setw(width) << y_data[0] << setw(width) + << abs(y_data[0] - yt_data[0]) << endl; + + // update output time + tout += dtout; + } + for (int i = 0; i < 3 * width; i++) { cout << "-"; } + cout << endl; + + // Print some final statistics + flag = ARKodePrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); + if (check_flag(flag, "ARKodePrintAllStats")) { return 1; } + + // Clean up and return with successful completion + N_VDestroy(y); + N_VDestroy(yt); + ARKodeFree(&arkode_mem); + ARKodeFree(&stepper_1); + ARKodeFree(&stepper_2); + SUNStepper_Destroy(&steppers[0]); + SUNStepper_Destroy(&steppers[1]); + + cout << "End ForcingStep preallocation test" << endl; + + return 0; +} + +/*---- end of file ----*/ diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep.cpp new file mode 100644 index 0000000000..7eaa24b4f2 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep.cpp @@ -0,0 +1,144 @@ +/* ----------------------------------------------------------------------------- + * Programmer(s): Daniel R. Reynolds @ UMBC + * based on test_logging_arkode_lsrkstep.cpp by David J. Gardner @ LLNL + * ----------------------------------------------------------------------------- + * SUNDIALS Copyright Start + * Copyright (c) 2025, Lawrence Livermore National Security, + * University of Maryland Baltimore County, and the SUNDIALS contributors. + * Copyright (c) 2013-2025, Lawrence Livermore National Security + * and Southern Methodist University. + * Copyright (c) 2002-2013, Lawrence Livermore National Security. + * All rights reserved. + * + * See the top-level LICENSE and NOTICE files for details. + * + * SPDX-License-Identifier: BSD-3-Clause + * SUNDIALS Copyright End + * ----------------------------------------------------------------------------- + * Test data preallocation in LSRKStep + * ---------------------------------------------------------------------------*/ + +#include +#include +#include +#include +#include + +// Include desired integrators, vectors, linear solvers, and nonlinear solvers +#include "arkode/arkode_lsrkstep.h" +#include "nvector/nvector_serial.h" + +#include "problems/prv.hpp" +#include "sundials/sundials_nvector.h" +#include "utilities/check_return.hpp" + +using namespace std; +using namespace problems::prv; + +int main(int argc, char* argv[]) +{ + cout << "Start LSRKStep preallocation test" << endl; + + // SUNDIALS context object for this simulation + sundials::Context sunctx; + + // Preallocate data + bool preallocate_data = false; + if (argc > 1) { preallocate_data = stoi(argv[1]); } + + // Ensure logging output goes to stdout + SUNLogger logger; + int flag = SUNContext_GetLogger(sunctx, &logger); + if (check_flag(flag, "SUNContext_GetLogger")) { return 1; } + + SUNLogger_SetErrorFilename(logger, "stdout"); + SUNLogger_SetWarningFilename(logger, "stdout"); + SUNLogger_SetInfoFilename(logger, "stdout"); + SUNLogger_SetDebugFilename(logger, "stdout"); + + // Create initial condition + N_Vector y = N_VNew_Serial(1, sunctx); + if (check_ptr(y, "N_VNew_Serial")) { return 1; } + N_VConst(true_solution(zero), y); + + // Create LSRKStep memory structure + void* arkode_mem = nullptr; + arkode_mem = LSRKStepCreateSTS(ode_rhs, zero, y, sunctx); + if (check_ptr(arkode_mem, "LSRKStepCreate")) { return 1; } + + // Select method + flag = LSRKStepSetSTSMethodByName(arkode_mem, "ARKODE_LSRK_RKC_2"); + if (check_flag(flag, "LSRKStepSetSTSMethodByName")) { return 1; } + + flag = ARKodeSetUserData(arkode_mem, &problem_data); + if (check_flag(flag, "ARKodeSetUserData")) { return 1; } + + // Relative and absolute tolerances + const sunrealtype rtol = SUN_RCONST(1.0e-6); + const sunrealtype atol = SUN_RCONST(1.0e-10); + + flag = ARKodeSStolerances(arkode_mem, rtol, atol); + if (check_flag(flag, "ARKodeSStolerances")) { return 1; } + + // Specify dominant eigenvalue function + flag = LSRKStepSetDomEigFn(arkode_mem, ode_dom_eig); + if (check_flag(flag, "LSRKStepSetDomEigFn")) { return 1; } + + // Data preallocation + if (preallocate_data) + { + flag = ARKodeAllocateInternalData(arkode_mem); + if (check_flag(flag, "ARKodeAllocateInternalData")) { return 1; } + } + + // Initial time and fist output time + const sunrealtype dtout = one; // output interval + const int nout = 3; // number of outputs + sunrealtype tret = zero; + sunrealtype tout = tret + dtout; + + const int width = numeric_limits::digits10 + 8; + + // Output initial contion + cout << scientific; + cout << setprecision(numeric_limits::digits10); + cout << setw(width) << " t"; + cout << setw(width) << " y"; + cout << setw(width) << " y err" << endl; + for (int i = 0; i < 3 * width; i++) { cout << "-"; } + cout << endl; + + sunrealtype* y_data = N_VGetArrayPointer(y); + + cout << setw(width) << tret << setw(width) << y_data[0] << setw(width) + << abs(y_data[0] - true_solution(tret)) << endl; + + // Advance in time + for (int i = 0; i < nout; i++) + { + flag = ARKodeEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); + if (check_flag(flag, "ARKodeEvolve")) { return 1; } + + cout << setw(width) << tret << setw(width) << y_data[0] << setw(width) + << abs(y_data[0] - true_solution(tret)) << endl; + + // update output time + tout += dtout; + } + for (int i = 0; i < 3 * width; i++) { cout << "-"; } + cout << endl; + + // Print some final statistics + flag = ARKodePrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); + if (check_flag(flag, "ARKodePrintAllStats")) { return 1; } + + // Clean up and return with successful completion + N_VDestroy(y); + ARKodeFree(&arkode_mem); + + cout << "End LSRKStep preallocation test" << endl; + + return 0; +} + +/*---- end of file ----*/ diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_mristep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_mristep.cpp new file mode 100644 index 0000000000..e770d7767b --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_mristep.cpp @@ -0,0 +1,185 @@ +/* ----------------------------------------------------------------------------- + * Programmer(s): Daniel R. Reynolds @ UMBC + * based on test_logging_arkode_mristep.cpp by David J. Gardner @ LLNL + * ----------------------------------------------------------------------------- + * SUNDIALS Copyright Start + * Copyright (c) 2025, Lawrence Livermore National Security, + * University of Maryland Baltimore County, and the SUNDIALS contributors. + * Copyright (c) 2013-2025, Lawrence Livermore National Security + * and Southern Methodist University. + * Copyright (c) 2002-2013, Lawrence Livermore National Security. + * All rights reserved. + * + * See the top-level LICENSE and NOTICE files for details. + * + * SPDX-License-Identifier: BSD-3-Clause + * SUNDIALS Copyright End + * ----------------------------------------------------------------------------- + * Test data preallocation in MRIStep + * ---------------------------------------------------------------------------*/ + +#include +#include +#include +#include +#include + +// Include desired integrators, vectors, linear solvers, and nonlinear solvers +#include "arkode/arkode.h" +#include "arkode/arkode_arkstep.h" +#include "arkode/arkode_mristep.h" +#include "nvector/nvector_serial.h" +#include "sundials/sundials_context.hpp" +#include "sundials/sundials_iterative.h" +#include "sundials/sundials_matrix.h" +#include "sundials/sundials_nonlinearsolver.h" +#include "sunlinsol/sunlinsol_dense.h" +#include "sunmatrix/sunmatrix_dense.h" + +#include "problems/kpr.hpp" +#include "utilities/check_return.hpp" + +using namespace std; +using namespace problems::kpr; + +int main(int argc, char* argv[]) +{ + cout << "Start MRIStep preallocation test" << endl; + + // SUNDIALS context object for this simulation + sundials::Context sunctx; + + // Preallocate data + bool preallocate_data = false; + if (argc > 1) { preallocate_data = stoi(argv[1]); } + + // Create initial condition + N_Vector y = N_VNew_Serial(2, sunctx); + if (check_ptr(y, "N_VNew_Serial")) { return 1; } + + sunrealtype utrue, vtrue; + int flag = true_sol(zero, &utrue, &vtrue); + if (check_flag(flag, "true_sol")) { return 1; } + + sunrealtype* ydata = N_VGetArrayPointer(y); + ydata[0] = utrue; + ydata[1] = vtrue; + + // Create fast stepper + void* inner_arkode_mem = ARKStepCreate(ode_rhs_ff, nullptr, zero, y, sunctx); + if (check_ptr(inner_arkode_mem, "ARKStepCreate")) { return 1; } + + flag = ARKodeSetUserData(inner_arkode_mem, &problem_data); + if (check_flag(flag, "ARKodeSetUserData")) { return 1; } + + // Relative and absolute tolerances + const sunrealtype inner_rtol = SUN_RCONST(1.0e-6); + const sunrealtype inner_atol = SUN_RCONST(1.0e-10); + flag = ARKodeSStolerances(inner_arkode_mem, inner_rtol, inner_atol); + if (check_flag(flag, "ARKodeSStolerances")) { return 1; } + + MRIStepInnerStepper stepper = nullptr; + flag = ARKStepCreateMRIStepInnerStepper(inner_arkode_mem, &stepper); + if (check_flag(flag, "ARKStepCreateMRIStepInnerStepper")) { return 1; } + + // Create MRIStep memory structure + void* arkode_mem = nullptr; + cout << "Using Im-MRI-GARK method" << endl; + arkode_mem = MRIStepCreate(nullptr, ode_rhs_s, zero, y, stepper, sunctx); + if (check_ptr(arkode_mem, "MRIStepCreate")) { return 1; } + flag = ARKodeSetUserData(arkode_mem, &problem_data); + if (check_flag(flag, "ARKodeSetUserData")) { return 1; } + + // Relative and absolute tolerances + const sunrealtype rtol = SUN_RCONST(1.0e-6); + const sunrealtype atol = SUN_RCONST(1.0e-10); + flag = ARKodeSStolerances(arkode_mem, rtol, atol); + if (check_flag(flag, "ARKodeSStolerances")) { return 1; } + + // Implicit algebraic solvers + cout << "Using Newton nonlinear solver" << endl; + cout << "Using dense direct linear solver" << endl; + SUNMatrix A = nullptr; + SUNLinearSolver LS = nullptr; + SUNNonlinearSolver NLS = nullptr; + A = SUNDenseMatrix(2, 2, sunctx); + if (check_ptr(A, "SUNDenseMatrix")) { return 1; } + LS = SUNLinSol_Dense(y, A, sunctx); + if (check_ptr(LS, "SUNLinSol_Dense")) { return 1; } + flag = ARKodeSetLinearSolver(arkode_mem, LS, A); + if (check_flag(flag, "ARKodeSetLinearSolver")) { return 1; } + flag = ARKodeSetJacFn(arkode_mem, ode_rhs_jac); + if (check_flag(flag, "ARKodeSetJacFn")) { return 1; } + + // Data preallocation (all steppers) + if (preallocate_data) + { + flag = ARKodeAllocateInternalData(inner_arkode_mem); + if (check_flag(flag, "ARKodeAllocateInternalData")) { return 1; } + flag = ARKodeAllocateInternalData(arkode_mem); + if (check_flag(flag, "ARKodeAllocateInternalData")) { return 1; } + } + + // Initial time and fist output time + const sunrealtype dtout = one; // output interval + const int nout = 3; // number of outputs + sunrealtype tret = zero; + sunrealtype tout = tret + dtout; + + // Output initial contion + cout << scientific; + cout << setprecision(numeric_limits::digits10); + cout << " t "; + cout << " u "; + cout << " v "; + cout << " u err "; + cout << " v err " << endl; + for (int i = 0; i < 9; i++) { cout << "--------------"; } + cout << endl; + + cout << setw(22) << tret << setw(25) << ydata[0] << setw(25) << ydata[1] + << setw(25) << abs(ydata[0] - utrue) << setw(25) << abs(ydata[1] - vtrue) + << endl; + + // Advance in time + for (int i = 0; i < nout; i++) + { + flag = ARKodeEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); + if (check_flag(flag, "ARKode")) { return 1; } + + flag = true_sol(tret, &utrue, &vtrue); + if (check_flag(flag, "true_sol")) { return 1; } + + cout << setw(22) << tret << setw(25) << ydata[0] << setw(25) << ydata[1] + << setw(25) << abs(ydata[0] - utrue) << setw(25) + << abs(ydata[1] - vtrue) << endl; + + // update output time + tout += dtout; + } + for (int i = 0; i < 9; i++) { cout << "--------------"; } + cout << endl; + + // Print some final statistics + cout << endl << "Outer integrator statistics:" << endl; + flag = ARKodePrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); + if (check_flag(flag, "ARKodePrintAllStats")) { return 1; } + cout << endl << "Inner integrator statistics:" << endl; + flag = ARKodePrintAllStats(inner_arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); + if (check_flag(flag, "ARKodePrintAllStats")) { return 1; } + + // Clean up and return with successful completion + N_VDestroy(y); + SUNMatDestroy(A); + SUNLinSolFree(LS); + SUNNonlinSolFree(NLS); + MRIStepInnerStepper_Free(&stepper); + ARKodeFree(&inner_arkode_mem); + ARKodeFree(&arkode_mem); + + cout << "End MRIStep preallocation test" << endl; + + return 0; +} + +/*---- end of file ----*/ diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_splittingstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_splittingstep.cpp new file mode 100644 index 0000000000..0223505b43 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_splittingstep.cpp @@ -0,0 +1,170 @@ +/* ----------------------------------------------------------------------------- + * Programmer(s): Daniel R. Reynolds @ UMBC + * based on test_logging_arkode_splittingstep.cpp by David J. Gardner @ LLNL + * ----------------------------------------------------------------------------- + * SUNDIALS Copyright Start + * Copyright (c) 2025, Lawrence Livermore National Security, + * University of Maryland Baltimore County, and the SUNDIALS contributors. + * Copyright (c) 2013-2025, Lawrence Livermore National Security + * and Southern Methodist University. + * Copyright (c) 2002-2013, Lawrence Livermore National Security. + * All rights reserved. + * + * See the top-level LICENSE and NOTICE files for details. + * + * SPDX-License-Identifier: BSD-3-Clause + * SUNDIALS Copyright End + * ----------------------------------------------------------------------------- + * Test data preallocation in SplittingStep + * ---------------------------------------------------------------------------*/ + +#include +#include +#include +#include +#include + +// Include desired integrators and vectors +#include "arkode/arkode_erkstep.h" +#include "arkode/arkode_splittingstep.h" +#include "nvector/nvector_serial.h" +#include "sundials/sundials_context.hpp" + +#include "problems/estep.hpp" +#include "utilities/check_return.hpp" + +using namespace std; +using namespace problems::estep; + +int main(int argc, char* argv[]) +{ + cout << "Start SplittingStep preallocation test" << endl; + + // SUNDIALS context object for this simulation + sundials::Context sunctx; + + // Preallocate data + bool preallocate_data = false; + if (argc > 1) { preallocate_data = stoi(argv[1]); } + + // Step sizes: overall, partition 1, partition 2 + sunrealtype dt = SUN_RCONST(0.001); + sunrealtype dt_1 = dt / 2; + sunrealtype dt_2 = dt / 4; + + // Create initial condition + N_Vector y = N_VNew_Serial(1, sunctx); + if (check_ptr(y, "N_VNew_Serial")) { return 1; } + + int flag = initial_condition(y); + if (check_flag(flag, "initial_condition")) { return 1; } + + // Create partition 1 integrator + void* stepper_1 = ERKStepCreate(ode_rhs_1, zero, y, sunctx); + if (check_ptr(stepper_1, "ERKStepCreate")) { return 1; } + + flag = ARKodeSetUserData(stepper_1, &problem_data); + if (check_flag(flag, "ARKodeSetUserData")) { return 1; } + + flag = ARKodeSetFixedStep(stepper_1, dt_1); + if (check_flag(flag, "ARKodeSetFixedStep")) { return 1; } + + // Create partition 1 integrator + void* stepper_2 = ERKStepCreate(ode_rhs_2, zero, y, sunctx); + if (check_ptr(stepper_2, "ERKStepCreate")) { return 1; } + + flag = ARKodeSetFixedStep(stepper_2, dt_2); + if (check_flag(flag, "ARKodeSetFixedStep")) { return 1; } + + // Create the overall integrator + SUNStepper steppers[2]; + + flag = ARKodeCreateSUNStepper(stepper_1, &steppers[0]); + if (check_flag(flag, "ARKodeSetFixedStep")) { return 1; } + + flag = ARKodeCreateSUNStepper(stepper_2, &steppers[1]); + if (check_flag(flag, "ARKodeSetFixedStep")) { return 1; } + + void* arkode_mem = SplittingStepCreate(steppers, 2, zero, y, sunctx); + if (check_ptr(arkode_mem, "SplittingStepCreate")) { return 1; } + + flag = ARKodeSetFixedStep(arkode_mem, dt); + if (check_flag(flag, "ARKodeSetFixedStep")) { return 1; } + + // True solution vector + N_Vector yt = N_VClone(y); + + flag = true_solution(zero, problem_data, yt); + if (check_flag(flag, "true_solution")) { return 1; } + + // Data preallocation (all steppers) + if (preallocate_data) + { + flag = ARKodeAllocateInternalData(stepper_1); + if (check_flag(flag, "ARKodeAllocateInternalData")) { return 1; } + flag = ARKodeAllocateInternalData(stepper_2); + if (check_flag(flag, "ARKodeAllocateInternalData")) { return 1; } + flag = ARKodeAllocateInternalData(arkode_mem); + if (check_flag(flag, "ARKodeAllocateInternalData")) { return 1; } + } + + // Initial time and fist output time + const sunrealtype dtout = one; // output interval + const int nout = 3; // number of outputs + sunrealtype tret = zero; + sunrealtype tout = tret + dtout; + + const int width = numeric_limits::digits10 + 8; + + // Output initial contion + cout << scientific; + cout << setprecision(numeric_limits::digits10); + cout << setw(width) << " t"; + cout << setw(width) << " y"; + cout << setw(width) << " y err" << endl; + for (int i = 0; i < 3 * width; i++) { cout << "-"; } + cout << endl; + + sunrealtype* y_data = N_VGetArrayPointer(y); + sunrealtype* yt_data = N_VGetArrayPointer(yt); + + cout << setw(width) << tret << setw(width) << y_data[0] << setw(width) + << abs(y_data[0] - yt_data[0]) << endl; + + // Advance in time + for (int i = 0; i < nout; i++) + { + flag = ARKodeEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); + if (check_flag(flag, "ARKodeEvolve")) { return 1; } + + flag = true_solution(tret, problem_data, yt); + if (check_flag(flag, "true_solution")) { return 1; } + + cout << setw(width) << tret << setw(width) << y_data[0] << setw(width) + << abs(y_data[0] - yt_data[0]) << endl; + + // update output time + tout += dtout; + } + for (int i = 0; i < 3 * width; i++) { cout << "-"; } + cout << endl; + + // Print some final statistics + flag = ARKodePrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); + if (check_flag(flag, "ARKodePrintAllStats")) { return 1; } + + // Clean up and return with successful completion + N_VDestroy(y); + N_VDestroy(yt); + ARKodeFree(&arkode_mem); + ARKodeFree(&stepper_1); + ARKodeFree(&stepper_2); + SUNStepper_Destroy(&steppers[0]); + SUNStepper_Destroy(&steppers[1]); + + cout << "End SplittingStep preallocation test" << endl; + + return 0; +} + +/*---- end of file ----*/ diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_sprkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_sprkstep.cpp new file mode 100644 index 0000000000..9037fb9776 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_sprkstep.cpp @@ -0,0 +1,124 @@ +/* ----------------------------------------------------------------------------- + * Programmer(s): Daniel R. Reynolds @ UMBC + * based on test_logging_arkode_sprkstep.cpp by David J. Gardner @ LLNL +* ----------------------------------------------------------------------------- + * SUNDIALS Copyright Start + * Copyright (c) 2025, Lawrence Livermore National Security, + * University of Maryland Baltimore County, and the SUNDIALS contributors. + * Copyright (c) 2013-2025, Lawrence Livermore National Security + * and Southern Methodist University. + * Copyright (c) 2002-2013, Lawrence Livermore National Security. + * All rights reserved. + * + * See the top-level LICENSE and NOTICE files for details. + * + * SPDX-License-Identifier: BSD-3-Clause + * SUNDIALS Copyright End + * ----------------------------------------------------------------------------- + * Test data preallocation in SPRKStep + * ---------------------------------------------------------------------------*/ + +#include +#include +#include +#include +#include + +// Include desired integrators, vectors, linear solvers, and nonlinear solvers +#include "arkode/arkode_sprkstep.h" +#include "nvector/nvector_serial.h" +#include "sundials/sundials_context.hpp" + +#include "problems/kepler.hpp" +#include "utilities/check_return.hpp" + +using namespace std; +using namespace problems::kepler; + +int main(int argc, char* argv[]) +{ + cout << "Start SPRKStep preallocation test" << endl; + + // SUNDIALS context object for this simulation + sundials::Context sunctx; + + // Preallocate data + bool preallocate_data = false; + if (argc > 1) { preallocate_data = stoi(argv[1]); } + + // Create initial condition + N_Vector y = N_VNew_Serial(4, sunctx); + if (check_ptr(y, "N_VNew_Serial")) { return 1; } + + int flag = initial_condition(y, eccentricity); + if (check_flag(flag, "initial_condition")) { return 1; } + + // Create SPRKStep memory structure + void* arkode_mem = SPRKStepCreate(ode_rhs_force, ode_rhs_velocity, zero, y, + sunctx); + if (check_ptr(arkode_mem, "SPKStepCreate")) { return 1; } + + // Step size + const sunrealtype dt = SUN_RCONST(0.001); + flag = ARKodeSetFixedStep(arkode_mem, dt); + if (check_flag(flag, "ARKodeSetFixedStep")) { return 1; } + + // Data preallocation + if (preallocate_data) + { + flag = ARKodeAllocateInternalData(arkode_mem); + if (check_flag(flag, "ARKodeAllocateInternalData")) { return 1; } + } + + // Initial time and fist output time + const sunrealtype dtout = dt; // output interval + const int nout = 3; // number of outputs + sunrealtype tret = zero; + sunrealtype tout = tret + dtout; + + // Output initial contion + sunrealtype* ydata = N_VGetArrayPointer(y); + if (check_ptr(y, "N_VGetArrayPointer")) { return 1; } + + cout << scientific; + cout << setprecision(numeric_limits::digits10); + cout << " t "; + cout << " q1 "; + cout << " q2 "; + cout << " q3 "; + cout << " q4 " << endl; + for (int i = 0; i < 9; i++) { cout << "--------------"; } + cout << endl; + + cout << setw(22) << tret << setw(25) << ydata[0] << setw(25) << ydata[1] + << setw(25) << ydata[2] << setw(25) << ydata[3] << endl; + + // Advance in time + for (int i = 0; i < nout; i++) + { + flag = ARKodeEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); + if (check_flag(flag, "ARKodeEvolve")) { return 1; } + + cout << setw(22) << tret << setw(25) << ydata[0] << setw(25) << ydata[1] + << setw(25) << ydata[2] << setw(25) << ydata[3] << endl; + + // update output time + tout += dtout; + } + for (int i = 0; i < 9; i++) { cout << "--------------"; } + cout << endl; + + // Print some final statistics + flag = ARKodePrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); + if (check_flag(flag, "ARKodePrintAllStats")) { return 1; } + + // Clean up and return with successful completion + N_VDestroy(y); + ARKodeFree(&arkode_mem); + + cout << "End SPRKStep preallocation test" << endl; + + return 0; +} + +/*---- end of file ----*/ From 86efcdba7710195e2e4dd1a4c16cd16b82611a17 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 16 Jan 2026 12:41:14 -0500 Subject: [PATCH 028/298] Minor updates --- src/arkode/arkode_lsrkstep.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index eeccfaa646..7e6e357d05 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -734,7 +734,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) ark_mem->user_data); step_mem->nfe++; - SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->ycur, + SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->tempv3, "F_%i(:) =", j - 1); SUNLogInfoIf(retval != 0, ARK_LOGGER, "end-stages-list", "status = failed rhs eval, retval = %i", retval); @@ -2778,8 +2778,8 @@ int lsrkStep_DQJtimes(void* arkode_mem, N_Vector v, N_Vector Jv) &step_mem); if (retval != ARK_SUCCESS) { return retval; } - sunrealtype t = ark_mem->tn; - N_Vector y = ark_mem->yn; + sunrealtype t = ark_mem->tcur; + N_Vector y = ark_mem->ycur; N_Vector work = ark_mem->tempv3; /* Compute RHS function, if necessary. */ @@ -2789,13 +2789,11 @@ int lsrkStep_DQJtimes(void* arkode_mem, N_Vector v, N_Vector Jv) /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, - ark_mem->user_data); + retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); if (retval != 0) { return ARK_POSTPROCESS_STAGE_FAIL; } } - retval = step_mem->fe(ark_mem->tn, ark_mem->yn, ark_mem->fn, - ark_mem->user_data); + retval = step_mem->fe(t, y, ark_mem->fn, ark_mem->user_data); step_mem->nfeDQ++; if (retval != ARK_SUCCESS) { From feb4ec3852ef6dfa420bbd0d26c7a4b4a26ee533 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 16 Jan 2026 13:16:57 -0500 Subject: [PATCH 029/298] Apply suggestions from code review Co-authored-by: Steven Roberts --- CHANGELOG.md | 2 +- doc/shared/RecentChanges.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03cd6f947a..73b875f8b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ The functions `CVodeGetUserDataB` and `IDAGetUserDataB` were added to CVODES and IDAS, respectively. -Removed extraneous copy of output vector when using ARKODE in ONE_STEP mode. +Removed extraneous copy of output vector when using ARKODE in `ARK_ONE_STEP` mode. ### Bug Fixes diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index 89ff185822..a8c1894d89 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -8,7 +8,7 @@ The functions ``CVodeGetUserDataB`` and ``IDAGetUserDataB`` were added to CVODES and IDAS, respectively. -Removed extraneous copy of output vector when using ARKODE in ONE_STEP mode. +Removed extraneous copy of output vector when using ARKODE in ``ARK_ONE_STEP`` mode. **Bug Fixes** From 58326242a6cdfb8346fc10ff2f437d96278947df Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 16 Jan 2026 13:40:23 -0500 Subject: [PATCH 030/298] Merged upstream changes, and revised the CHANGELOG.md and RecentChanges.rst files --- CHANGELOG.md | 22 ++++++++++------------ doc/shared/RecentChanges.rst | 23 +++++++++++------------ 2 files changed, 21 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28950fa239..9064f5545d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,20 +10,18 @@ The functions `CVodeGetUserDataB` and `IDAGetUserDataB` were added to CVODES and IDAS, respectively. Multiple minor updates were made to the ARKODE package. We removed an extraneous -copy of the output vector when using ARKODE in `ARK_ONE_STEP` mode. We -standardized calls to the user-supplied right-hand-side functions so that these -are provided the user-supplied solution vector passed to `ARKodeEvolve` whenever -possible -- the notable exceptions are the Hermite temporal interpolation module, -the provided preconditioners ARKBANDPRE and ARKBBDPRE, banded or dense linear -solvers with automatically-approximated Jacobian matrices, iterative linear solvers -with automatically-approximated Jacobian-times-vector product, temporal root-finding, -discrete adjoint modules in ARKStep or ERKStep, the SPRKStep stepper, and LSRKStep's -use of the automated dominant eigenvalue estimation module. - -Added the function `ARKodeAllocateInternalData` to ARKODE to enable stage-related +copy of the output vector when using ARKODE in `ARK_ONE_STEP` mode. We added the +function `ARKodeAllocateInternalData` to ARKODE to enable stage-related data allocation before the first call to `ARKodeEvolve` (but after all other optional input routines have been called), to support users who measure memory -usage before beginning a simulation. +usage before beginning a simulation. Finally, we standardized calls to the user-supplied +right-hand-side functions so that these are provided the user-supplied solution vector +passed to `ARKodeEvolve` whenever possible -- the notable exceptions are the +Hermite temporal interpolation module, the provided preconditioners ARKBANDPRE and +ARKBBDPRE, banded or dense linear solvers with automatically-approximated Jacobian +matrices, iterative linear solvers with automatically-approximated Jacobian-times-vector +product, temporal root-finding, discrete adjoint modules in ARKStep or ERKStep, the +SPRKStep stepper, and LSRKStep's use of the automated dominant eigenvalue estimation module. ### Bug Fixes diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index ebc4750355..5d084070bb 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -9,20 +9,19 @@ The functions ``CVodeGetUserDataB`` and ``IDAGetUserDataB`` were added to CVODES and IDAS, respectively. Multiple minor updates were made to the ARKODE package. We removed an extraneous -copy of the output vector when using ARKODE in ``ARK_ONE_STEP`` mode. We -standardized calls to the user-supplied right-hand-side functions so that these -are provided the user-supplied solution vector passed to :c:func:`ARKodeEvolve` whenever -possible -- the notable exceptions are the Hermite temporal interpolation module, -the provided preconditioners ARKBANDPRE and ARKBBDPRE, banded or dense linear -solvers with automatically-approximated Jacobian matrices, iterative linear solvers -with automatically-approximated Jacobian-times-vector product, temporal root-finding, -discrete adjoint modules in ARKStep or ERKStep, the SPRKStep stepper, and LSRKStep's -use of the automated dominant eigenvalue estimation module. - -Added the function :c:func:`ARKodeAllocateInternalData` to ARKODE to enable stage-related +copy of the output vector when using ARKODE in ``ARK_ONE_STEP`` mode. We added the +function :c:func:`ARKodeAllocateInternalData` to ARKODE to enable stage-related data allocation before the first call to :c:func:`ARKodeEvolve` (but after all other optional input routines have been called), to support users who measure memory -usage before beginning a simulation. +usage before beginning a simulation. Finally, we standardized calls to the user-supplied +right-hand-side functions so that these are provided the user-supplied solution vector +passed to :c:func:`ARKodeEvolve` whenever possible -- the notable exceptions are the +Hermite temporal interpolation module, the provided preconditioners ARKBANDPRE and +ARKBBDPRE, banded or dense linear solvers with automatically-approximated Jacobian +matrices, iterative linear solvers with automatically-approximated Jacobian-times-vector +product, temporal root-finding, discrete adjoint modules in ARKStep or ERKStep, the +SPRKStep stepper, and LSRKStep's use of the automated dominant eigenvalue estimation module. + **Bug Fixes** From f4ca753f16d2385cee6a92a84a79fbac52021ad1 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 16 Jan 2026 16:35:02 -0500 Subject: [PATCH 031/298] Added ARKODE user-callable routine to retrieve the current stage index and the total number of method stages --- CHANGELOG.md | 4 ++ .../guide/source/Usage/User_callable.rst | 16 +++++ doc/shared/RecentChanges.rst | 4 ++ include/arkode/arkode.h | 1 + src/arkode/arkode.c | 1 + src/arkode/arkode_arkstep.c | 5 +- src/arkode/arkode_arkstep_impl.h | 1 + src/arkode/arkode_arkstep_io.c | 20 ++++++ src/arkode/arkode_erkstep.c | 11 ++- src/arkode/arkode_erkstep_impl.h | 2 + src/arkode/arkode_erkstep_io.c | 20 ++++++ src/arkode/arkode_impl.h | 3 + src/arkode/arkode_io.c | 32 +++++++++ src/arkode/arkode_lsrkstep.c | 71 +++++++++++++++---- src/arkode/arkode_lsrkstep_impl.h | 4 +- src/arkode/arkode_lsrkstep_io.c | 20 ++++++ src/arkode/arkode_mristep.c | 21 +++++- src/arkode/arkode_mristep_impl.h | 1 + src/arkode/arkode_mristep_io.c | 20 ++++++ src/arkode/arkode_splittingstep.c | 29 ++++++++ src/arkode/arkode_splittingstep_impl.h | 1 + src/arkode/arkode_sprkstep.c | 1 + src/arkode/arkode_sprkstep_impl.h | 1 + src/arkode/arkode_sprkstep_io.c | 29 ++++++++ 24 files changed, 300 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9064f5545d..3472604a22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and IDAS, respectively. Multiple minor updates were made to the ARKODE package. We removed an extraneous copy of the output vector when using ARKODE in `ARK_ONE_STEP` mode. We added the +function `ARKodeGetStageIndex` that returns the index of the stage currently +being processed, and the total number of stages in the method, for users who must +compute auxiliary quantities in their IVP right-hand side functions during some +stages and not others (e.g., in all but the first or last stage). We added the function `ARKodeAllocateInternalData` to ARKODE to enable stage-related data allocation before the first call to `ARKodeEvolve` (but after all other optional input routines have been called), to support users who measure memory diff --git a/doc/arkode/guide/source/Usage/User_callable.rst b/doc/arkode/guide/source/Usage/User_callable.rst index ee77cabff6..39d3f7d05d 100644 --- a/doc/arkode/guide/source/Usage/User_callable.rst +++ b/doc/arkode/guide/source/Usage/User_callable.rst @@ -3641,6 +3641,7 @@ Estimated local truncation error vector :c:func:`ARKodeGetEstLoca Number of constraint test failures :c:func:`ARKodeGetNumConstrFails` Retrieve a pointer for user data :c:func:`ARKodeGetUserData` Retrieve the accumulated temporal error estimate :c:func:`ARKodeGetAccumulatedError` +Current stage index, and total number of stages :c:func:`ARKodeGetStageIndex` ===================================================== ============================================ @@ -4117,6 +4118,21 @@ Retrieve the accumulated temporal error estimate :c:func:`ARKodeGetAccumul .. versionadded:: 6.2.0 +.. c:function:: int ARKodeGetStageIndex(void* arkode_mem, int* stage, int *max_stages) + + Returns the index of the current stage (0-based) and the total number of + stages in the method. + + :param arkode_mem: pointer to the ARKODE memory block. + :param stage: pointer to storage for the current stage index. + :param max_stages: pointer to storage for the number of stages in the method. + + :retval ARK_SUCCESS: the function exited successfully. + :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. + + .. versionadded:: x.y.z + + diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index 5d084070bb..2ffc91dc5c 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -10,6 +10,10 @@ and IDAS, respectively. Multiple minor updates were made to the ARKODE package. We removed an extraneous copy of the output vector when using ARKODE in ``ARK_ONE_STEP`` mode. We added the +function :c:func:`ARKodeGetStageIndex` that returns the index of the stage currently +being processed, and the total number of stages in the method, for users who must +compute auxiliary quantities in their IVP right-hand side functions during some +stages and not others (e.g., in all but the first or last stage). We added the function :c:func:`ARKodeAllocateInternalData` to ARKODE to enable stage-related data allocation before the first call to :c:func:`ARKodeEvolve` (but after all other optional input routines have been called), to support users who measure memory diff --git a/include/arkode/arkode.h b/include/arkode/arkode.h index 1bfa9b4dae..5ab9debf29 100644 --- a/include/arkode/arkode.h +++ b/include/arkode/arkode.h @@ -381,6 +381,7 @@ SUNDIALS_EXPORT int ARKodePrintAllStats(void* arkode_mem, FILE* outfile, SUNOutputFormat fmt); SUNDIALS_EXPORT char* ARKodeGetReturnFlagName(long int flag); SUNDIALS_EXPORT int ARKodeWriteParameters(void* arkode_mem, FILE* fp); +SUNDIALS_EXPORT int ARKodeGetStageIndex(void* arkode_mem, int* stage, int *max_stages); /* Optional output functions (temporal adaptivity) */ SUNDIALS_EXPORT int ARKodeGetNumExpSteps(void* arkode_mem, long int* expsteps); diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 5fab50cb67..cba49ca359 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -1574,6 +1574,7 @@ ARKodeMem arkCreate(SUNContext sunctx) ark_mem->step_getnumnonlinsolviters = NULL; ark_mem->step_getnumnonlinsolvconvfails = NULL; ark_mem->step_getnonlinsolvstats = NULL; + ark_mem->step_getstageindex = NULL; ark_mem->step_setforcing = NULL; ark_mem->step_mem = NULL; ark_mem->step_supports_adaptive = SUNFALSE; diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index e4e7dc8855..8305cdfc44 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -143,6 +143,7 @@ void* ARKStepCreate(ARKRhsFn fe, ARKRhsFn fi, sunrealtype t0, N_Vector y0, ark_mem->step_getnumnonlinsolvconvfails = arkStep_GetNumNonlinSolvConvFails; ark_mem->step_getnonlinsolvstats = arkStep_GetNonlinSolvStats; ark_mem->step_setforcing = arkStep_SetInnerForcing; + ark_mem->step_getstageindex = arkStep_GetStageIndex; ark_mem->step_supports_adaptive = SUNTRUE; ark_mem->step_supports_implicit = SUNTRUE; ark_mem->step_supports_massmatrix = SUNTRUE; @@ -1711,8 +1712,10 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) *nflagPtr = ARK_SUCCESS; } - /* initialize the current solution */ + /* initialize the current solution and stage index */ + ark_mem->tcur = ark_mem->tn; N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + step_mem->istage = 0; /* call nonlinear solver setup if it exists */ if (step_mem->NLS) diff --git a/src/arkode/arkode_arkstep_impl.h b/src/arkode/arkode_arkstep_impl.h index 48a7aa39c2..3399bb9bb7 100644 --- a/src/arkode/arkode_arkstep_impl.h +++ b/src/arkode/arkode_arkstep_impl.h @@ -243,6 +243,7 @@ void arkStep_Free(ARKodeMem ark_mem); void arkStep_PrintMem(ARKodeMem ark_mem, FILE* outfile); int arkStep_SetInnerForcing(ARKodeMem ark_mem, sunrealtype tshift, sunrealtype tscale, N_Vector* f, int nvecs); +int arkStep_GetStageIndex(ARKodeMem ark_mem, int* stage, int* max_stages); /* Internal utility routines */ int arkStep_AccessARKODEStepMem(void* arkode_mem, const char* fname, diff --git a/src/arkode/arkode_arkstep_io.c b/src/arkode/arkode_arkstep_io.c index 59e41a00d6..8df2359edd 100644 --- a/src/arkode/arkode_arkstep_io.c +++ b/src/arkode/arkode_arkstep_io.c @@ -1298,6 +1298,26 @@ int arkStep_GetNonlinSolvStats(ARKodeMem ark_mem, long int* nniters, return (ARK_SUCCESS); } +/*--------------------------------------------------------------- + arkStep_GetStageIndex: + + Returns the current stage index and number of stages + ---------------------------------------------------------------*/ +int arkStep_GetStageIndex(ARKodeMem ark_mem, int* stage, int* max_stages) +{ + ARKodeARKStepMem step_mem; + int retval; + + /* access ARKodeARKStepMem structure */ + retval = arkStep_AccessStepMem(ark_mem, __func__, &step_mem); + if (retval != ARK_SUCCESS) { return (retval); } + + *stage = step_mem->istage; + *max_stages = step_mem->stages; + + return (ARK_SUCCESS); +} + /*--------------------------------------------------------------- arkStep_PrintAllStats: diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index 4ef1ef5ce7..521f8b597a 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -109,6 +109,7 @@ void* ERKStepCreate(ARKRhsFn f, sunrealtype t0, N_Vector y0, SUNContext sunctx) ark_mem->step_getnumrhsevals = erkStep_GetNumRhsEvals; ark_mem->step_getestlocalerrors = erkStep_GetEstLocalErrors; ark_mem->step_setforcing = erkStep_SetInnerForcing; + ark_mem->step_getstageindex = erkStep_GetStageIndex; ark_mem->step_supports_adaptive = SUNTRUE; ark_mem->step_supports_relaxation = SUNTRUE; ark_mem->step_mem = (void*)step_mem; @@ -364,6 +365,7 @@ void erkStep_PrintMem(ARKodeMem ark_mem, FILE* outfile) /* output integer quantities */ fprintf(outfile, "ERKStep: q = %i\n", step_mem->q); fprintf(outfile, "ERKStep: p = %i\n", step_mem->p); + fprintf(outfile, "ERKStep: istage = %i\n", step_mem->istage); fprintf(outfile, "ERKStep: stages = %i\n", step_mem->stages); /* output long integer quantities */ @@ -770,6 +772,11 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) cvals = step_mem->cvals; Xvecs = step_mem->Xvecs; + /* initialize the current solution and stage index */ + ark_mem->tcur = ark_mem->tn; + N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + step_mem->istage = 0; + SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = 0, tcur = " SUN_FORMAT_G, ark_mem->tcur); SUNLogExtraDebugVec(ARK_LOGGER, "stage", ark_mem->yn, "z_0(:) ="); @@ -783,7 +790,6 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (!(ark_mem->fn_is_current)) { mode = (ark_mem->initsetup) ? ARK_FULLRHS_START : ARK_FULLRHS_END; - N_VScale(ONE, ark_mem->yn, ark_mem->ycur); retval = ark_mem->step_fullrhs(ark_mem, ark_mem->tn, ark_mem->ycur, ark_mem->fn, mode); if (retval) @@ -837,6 +843,9 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) the first stage RHS is just the full RHS from the start of the step */ for (is = 1; is < step_mem->stages; is++) { + /* store current stage index */ + step_mem->istage = is; + /* Set current stage time(s) */ ark_mem->tcur = ark_mem->tn + step_mem->B->c[is] * ark_mem->h; diff --git a/src/arkode/arkode_erkstep_impl.h b/src/arkode/arkode_erkstep_impl.h index b1eb08b4d9..3fe0e5e16c 100644 --- a/src/arkode/arkode_erkstep_impl.h +++ b/src/arkode/arkode_erkstep_impl.h @@ -58,6 +58,7 @@ typedef struct ARKodeERKStepMemRec N_Vector* F; /* explicit RHS at each stage */ int q; /* method order */ int p; /* embedding order */ + int istage; /* current stage */ int stages; /* number of stages */ ARKodeButcherTable B; /* ERK Butcher table */ @@ -106,6 +107,7 @@ int erkStep_GetNumRhsEvals(ARKodeMem ark_mem, int partition_index, int erkStep_GetEstLocalErrors(ARKodeMem ark_mem, N_Vector ele); int erkStep_SetInnerForcing(ARKodeMem ark_mem, sunrealtype tshift, sunrealtype tscale, N_Vector* f, int nvecs); +int erkStep_GetStageIndex(ARKodeMem ark_mem, int* stage, int* max_stages); /* Internal utility routines */ int erkStep_AccessARKODEStepMem(void* arkode_mem, const char* fname, diff --git a/src/arkode/arkode_erkstep_io.c b/src/arkode/arkode_erkstep_io.c index 87905d6570..9c765e388f 100644 --- a/src/arkode/arkode_erkstep_io.c +++ b/src/arkode/arkode_erkstep_io.c @@ -398,6 +398,26 @@ int erkStep_GetEstLocalErrors(ARKodeMem ark_mem, N_Vector ele) return (ARK_SUCCESS); } +/*--------------------------------------------------------------- + erkStep_GetStageIndex: + + Returns the current stage index and number of stages + ---------------------------------------------------------------*/ +int erkStep_GetStageIndex(ARKodeMem ark_mem, int* stage, int* max_stages) +{ + ARKodeERKStepMem step_mem; + int retval; + + /* access ARKodeARKStepMem structure */ + retval = erkStep_AccessStepMem(ark_mem, __func__, &step_mem); + if (retval != ARK_SUCCESS) { return (retval); } + + *stage = step_mem->istage; + *max_stages = step_mem->stages; + + return (ARK_SUCCESS); +} + /*--------------------------------------------------------------- erkStep_PrintAllStats: diff --git a/src/arkode/arkode_impl.h b/src/arkode/arkode_impl.h index f7c2dd4a5f..932f581599 100644 --- a/src/arkode/arkode_impl.h +++ b/src/arkode/arkode_impl.h @@ -230,6 +230,8 @@ typedef int (*ARKTimestepSetUseCompensatedSums)(ARKodeMem ark_mem, sunbooleantype onoff); typedef int (*ARKTimestepSetOptions)(ARKodeMem ark_mem, int* argidx, char* argv[], size_t offset, sunbooleantype* arg_used); +typedef int (*ARKTimestepGetStageIndex)(ARKodeMem ark_mem, int* stage, + int *max_stages); /* time stepper interface functions -- temporal adaptivity */ typedef int (*ARKTimestepGetEstLocalErrors)(ARKodeMem ark_mem, N_Vector ele); @@ -424,6 +426,7 @@ struct ARKodeMemRec ARKTimestepSetStepDirection step_setstepdirection; ARKTimestepSetUseCompensatedSums step_setusecompensatedsums; ARKTimestepSetOptions step_setoptions; + ARKTimestepGetStageIndex step_getstageindex; /* Time stepper module -- temporal adaptivity */ sunbooleantype step_supports_adaptive; diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index a504f2b1e8..0f329288c5 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -3186,6 +3186,38 @@ int ARKodeGetUserData(void* arkode_mem, void** user_data) return (ARK_SUCCESS); } +/*--------------------------------------------------------------- + ARKodeGetStageIndex: + + Returns the index of the current stage and the total number of + stages. If this is not supplied by the time-stepping module + then it returns (0,1), indicating that it is currently in the + first of only a single stage. + ---------------------------------------------------------------*/ +int ARKodeGetStageIndex(void* arkode_mem, int* stage, int *max_stages) +{ + ARKodeMem ark_mem; + if (arkode_mem == NULL) + { + arkProcessError(NULL, ARK_MEM_NULL, __LINE__, __func__, __FILE__, + MSG_ARK_NO_MEM); + return (ARK_MEM_NULL); + } + ark_mem = (ARKodeMem)arkode_mem; + + /* Call stepper routine to compute the state (if provided) */ + if (ark_mem->step_getstageindex) + { + return (ark_mem->step_getstageindex(ark_mem, stage, max_stages)); + } + else + { + *stage = 0; + *max_stages = 1; + return (ARK_SUCCESS); + } +} + /*----------------------------------------------------------------- ARKodePrintAllStats diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 7e6e357d05..c196595907 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -180,6 +180,7 @@ void* lsrkStep_Create_Commons(ARKRhsFn rhs, sunrealtype t0, N_Vector y0, ark_mem->step_setdefaults = lsrkStep_SetDefaults; ark_mem->step_getnumrhsevals = lsrkStep_GetNumRhsEvals; ark_mem->step_getestlocalerrors = lsrkStep_GetEstLocalErrors; + ark_mem->step_getstageindex = lsrkStep_GetStageIndex; ark_mem->step_mem = (void*)step_mem; ark_mem->step_supports_adaptive = SUNTRUE; @@ -579,9 +580,11 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) sunrealtype* cvals = step_mem->cvals; N_Vector* Xvecs = step_mem->Xvecs; - /* initialize the current solution */ + /* Initialize the current solution and stage index */ ark_mem->tcur = ark_mem->tn; N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + step_mem->istage = 0; + step_mem->req_stages = step_mem->stage_max_limit; /* Compute dominant eigenvalue and update stats */ if (step_mem->dom_eig_update) @@ -714,6 +717,9 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Evaluate stages j = 2,...,step_mem->req_stages */ for (int j = 2; j <= step_mem->req_stages; j++) { + /* set stage index (0-based) */ + step_mem->istage = j-1; + /* Evaluate RHS and store in tempv3 */ ark_mem->tcur = ark_mem->tn + ark_mem->h * thjm1; @@ -818,6 +824,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "begin-compute-embedding", ""); /* final stage processing */ + step_mem->istage = step_mem->req_stages; ark_mem->tcur = ark_mem->tn + ark_mem->h; /* apply user-supplied stage preprocessing function (if supplied) */ @@ -923,9 +930,11 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) sunrealtype* cvals = step_mem->cvals; N_Vector* Xvecs = step_mem->Xvecs; - /* Initialize the current solution */ + /* Initialize the current solution and stage index */ ark_mem->tcur = ark_mem->tn; N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + step_mem->istage = 0; + step_mem->req_stages = step_mem->stage_max_limit; /* Compute dominant eigenvalue and update stats */ if (step_mem->dom_eig_update) @@ -1048,6 +1057,9 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Evaluate stages j = 2,...,step_mem->req_stages */ for (int j = 2; j <= step_mem->req_stages; j++) { + /* set stage index (0-based) */ + step_mem->istage = j-1; + /* Evaluate RHS and store in tempv3 */ ark_mem->tcur = ark_mem->tn + ark_mem->h * cjm1; @@ -1140,9 +1152,10 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); SUNLogExtraDebugVec(ARK_LOGGER, "updated solution", ark_mem->ycur, "ycur(:) ="); + SUNLogInfo(ARK_LOGGER, "begin-compute-embedding", ""); /* final stage processing */ - SUNLogInfo(ARK_LOGGER, "begin-compute-embedding", ""); + step_mem->istage = step_mem->req_stages; ark_mem->tcur = ark_mem->tn + ark_mem->h; /* apply user-supplied stage preprocessing function (if supplied) */ @@ -1238,9 +1251,10 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr sunrealtype* cvals = step_mem->cvals; N_Vector* Xvecs = step_mem->Xvecs; - /* Initialize the current solution */ + /* Initialize the current solution and stage index */ ark_mem->tcur = ark_mem->tn; N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + step_mem->istage = 0; /* Initialize method coefficients */ const sunrealtype rs = (sunrealtype)step_mem->req_stages; @@ -1328,6 +1342,9 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Evaluate stages j = 2,...,step_mem->req_stages - 1 */ for (int j = 2; j < step_mem->req_stages; j++) { + /* set stage index (0-based) */ + step_mem->istage = j-1; + /* Complete previous stage by evaluating RHS and storing it in tempv2 */ ark_mem->tcur = ark_mem->tn + (j - 1) * hsm1inv; @@ -1383,6 +1400,7 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* Complete the next-to-last stage by evaluating the RHS and storing it in tempv2 */ + step_mem->istage = step_mem->req_stages-1; ark_mem->tcur = ark_mem->tn + ark_mem->h; if (ark_mem->PreProcessRHS != NULL) { @@ -1487,9 +1505,10 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr sunrealtype* cvals = step_mem->cvals; N_Vector* Xvecs = step_mem->Xvecs; - /* Initialize the current solution */ + /* Initialize the current solution and stage index */ ark_mem->tcur = ark_mem->tn; N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + step_mem->istage = 0; /* Initialize method coefficients */ const sunrealtype rs = (sunrealtype)step_mem->req_stages; @@ -1563,6 +1582,9 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Evaluate first stage group */ for (int j = 2; j <= ((in - 1) * (in - 2) / 2); j++) { + /* set stage index (0-based) */ + step_mem->istage = j-1; + /* Complete previous stage by evaluating RHS and storing it in tempv3 */ ark_mem->tcur = ark_mem->tn + (j - 1) * hrat; @@ -1624,6 +1646,9 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Evaluate second stage group */ for (int j = ((in - 1) * (in - 2) / 2 + 1); j <= (in * (in + 1) / 2 - 1); j++) { + /* set stage index (0-based) */ + step_mem->istage = j-1; + /* Complete previous stage by evaluating RHS and storing it in tempv3 */ ark_mem->tcur = ark_mem->tn + (j - 1) * hrat; @@ -1680,6 +1705,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* Complete the last stage from the second stage group */ + step_mem->istage = (in * (in + 1) / 2 - 1); ark_mem->tcur = ark_mem->tn + hrat * (rn * (rn + ONE) / TWO - ONE); /* apply user-supplied stage preprocessing function (if supplied) */ @@ -1747,6 +1773,9 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Evaluate final stage group */ for (int j = (in * (in + 1) / 2 + 1); j <= step_mem->req_stages; j++) { + /* set stage index (0-based) */ + step_mem->istage = j-1; + /* Complete the previous stage */ ark_mem->tcur = ark_mem->tn + (j - in - 1) * hrat; @@ -1864,9 +1893,10 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr sunrealtype* cvals = step_mem->cvals; N_Vector* Xvecs = step_mem->Xvecs; - /* Initialize the current solution */ + /* Initialize the current solution and stage index */ ark_mem->tcur = ark_mem->tn; N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + step_mem->istage = 0; /* Initialize method coefficients */ const sunrealtype rs = SUN_RCONST(4.0); @@ -1935,6 +1965,9 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } + /* update stage index */ + step_mem->istage = 1; + /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { @@ -1985,6 +2018,9 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } + /* update stage index */ + step_mem->istage = 2; + /* Evaluate stage RHS */ /* apply user-supplied stage preprocessing function (if supplied) */ @@ -2048,6 +2084,9 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } + /* update stage index */ + step_mem->istage = 3; + /* Evaluate stage RHS */ /* apply user-supplied stage preprocessing function (if supplied) */ @@ -2140,9 +2179,10 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt sunrealtype* cvals = step_mem->cvals; N_Vector* Xvecs = step_mem->Xvecs; - /* Initialize the current solution */ + /* Initialize the current solution and stage index */ ark_mem->tcur = ark_mem->tn; N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + step_mem->istage = 0; /* Initialize method coefficients */ const sunrealtype hsixth = ark_mem->h / SIX; @@ -2215,6 +2255,9 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* Evaluate stages j = 2,...,4 */ for (int j = 2; j <= 5; j++) { + /* set stage index (0-based) */ + step_mem->istage = j-1; + /* Complete previous stage by evaluating RHS and storing in tempv3 */ ark_mem->tcur = ark_mem->tn + (j - 1) * hsixth; @@ -2301,6 +2344,9 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* Evaluate stages j = 6,...,9 */ for (int j = 6; j <= 9; j++) { + /* set stage index (0-based) */ + step_mem->istage = j-1; + /* Complete previous stage by evaluating RHS and storing in tempv3 */ ark_mem->tcur = ark_mem->tn + (j - 4) * hsixth; @@ -2361,7 +2407,10 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } } - /* Complete the 9th stage by evaluating RHS and storing in tempv3 */ + /* set stage index (0-based) */ + step_mem->istage = 9; + + /* Complete the last stage by evaluating RHS and storing in tempv3 */ ark_mem->tcur = ark_mem->tn + ark_mem->h; /* apply user-supplied stage preprocessing function (if supplied) */ @@ -2494,18 +2543,16 @@ void lsrkStep_PrintMem(ARKodeMem ark_mem, FILE* outfile) fprintf(outfile, "LSRKStep: q = %i\n", step_mem->q); fprintf(outfile, "LSRKStep: p = %i\n", step_mem->p); + fprintf(outfile, "LSRKStep: istage = %i\n", step_mem->istage); + fprintf(outfile, "LSRKStep: req_stages = %i\n", step_mem->req_stages); if (step_mem->is_SSP) { - fprintf(outfile, "LSRKStep: req_stages = %i\n", - step_mem->req_stages); fprintf(outfile, "LSRKStep: nfe = %li\n", step_mem->nfe); } else if (!step_mem->is_SSP) { /* output integer quantities */ - fprintf(outfile, "LSRKStep: req_stages = %i\n", - step_mem->req_stages); fprintf(outfile, "LSRKStep: dom_eig_nst = %li\n", step_mem->dom_eig_nst); fprintf(outfile, "LSRKStep: stage_max = %i\n", diff --git a/src/arkode/arkode_lsrkstep_impl.h b/src/arkode/arkode_lsrkstep_impl.h index 97675f600f..605eb8e152 100644 --- a/src/arkode/arkode_lsrkstep_impl.h +++ b/src/arkode/arkode_lsrkstep_impl.h @@ -139,7 +139,8 @@ typedef struct ARKodeLSRKStepMemRec int q; /* method order */ int p; /* embedding order */ - int req_stages; /* number of requested stages */ + int istage; /* current stage */ + int req_stages; /* number of stages in step */ ARKODE_LSRKMethodType LSRKmethod; @@ -209,6 +210,7 @@ void lsrkStep_PrintMem(ARKodeMem ark_mem, FILE* outfile); int lsrkStep_GetNumRhsEvals(ARKodeMem ark_mem, int partition_index, long int* rhs_evals); int lsrkStep_GetEstLocalErrors(ARKodeMem ark_mem, N_Vector ele); +int lsrkStep_GetStageIndex(ARKodeMem ark_mem, int* stage, int* max_stages); /* Internal utility routines */ int lsrkStep_AccessARKODEStepMem(void* arkode_mem, const char* fname, diff --git a/src/arkode/arkode_lsrkstep_io.c b/src/arkode/arkode_lsrkstep_io.c index d5bd5fb3ce..aed94f1a6e 100644 --- a/src/arkode/arkode_lsrkstep_io.c +++ b/src/arkode/arkode_lsrkstep_io.c @@ -771,6 +771,26 @@ int lsrkStep_SetDefaults(ARKodeMem ark_mem) return ARK_SUCCESS; } +/*--------------------------------------------------------------- + lsrkStep_GetStageIndex: + + Returns the current stage index and number of stages + ---------------------------------------------------------------*/ +int lsrkStep_GetStageIndex(ARKodeMem ark_mem, int* stage, int* max_stages) +{ + ARKodeLSRKStepMem step_mem; + int retval; + + /* access ARKodeLSRKStepMem structure */ + retval = lsrkStep_AccessStepMem(ark_mem, __func__, &step_mem); + if (retval != ARK_SUCCESS) { return (retval); } + + *stage = step_mem->istage; + *max_stages = step_mem->req_stages; + + return (ARK_SUCCESS); +} + /*--------------------------------------------------------------- lsrkStep_PrintAllStats: diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 5a7b03f26b..3dd5404e61 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -140,6 +140,7 @@ void* MRIStepCreate(ARKRhsFn fse, ARKRhsFn fsi, sunrealtype t0, N_Vector y0, ark_mem->step_getnumnonlinsolvconvfails = mriStep_GetNumNonlinSolvConvFails; ark_mem->step_getnonlinsolvstats = mriStep_GetNonlinSolvStats; ark_mem->step_setforcing = mriStep_SetInnerForcing; + ark_mem->step_getstageindex = mriStep_GetStageIndex; ark_mem->step_supports_adaptive = SUNTRUE; ark_mem->step_supports_implicit = SUNTRUE; ark_mem->step_mem = (void*)step_mem; @@ -1839,7 +1840,9 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt (ark_mem->AccumErrorType != ARK_ACCUMERROR_NONE); /* initialize the current solution */ + ark_mem->tcur = ark_mem->tn; N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + step_mem->istage = 0; /* if MRI adaptivity is enabled: reset fast accumulated error, and send appropriate control parameter to the fast integrator */ @@ -1952,6 +1955,9 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* Loop over remaining internal stages */ for (is = 1; is < step_mem->stages - 1; is++) { + /* Set current stage index (0-based) */ + step_mem->istage = is; + /* Set relevant stage times (including desired stage time for implicit solves) */ t0 = ark_mem->tn + step_mem->MRIC->c[is - 1] * ark_mem->h; tf = ark_mem->tcur = ark_mem->tn + step_mem->MRIC->c[is] * ark_mem->h; @@ -2139,7 +2145,8 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* perform embedded stage (if needed) */ if (do_embedding) { - is = step_mem->stages; + /* Set current stage index */ + step_mem->istage = is = step_mem->stages; /* Copy ark_mem->ycur into ark_mem->tempv4, since it serves as the initial condition for both this embedding stage, and the subsequent final stage. */ @@ -2217,7 +2224,8 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* Compute final stage (for evolved solution), along with error estimate */ { - is = step_mem->stages - 1; + /* Set current stage index */ + step_mem->istage = is = step_mem->stages - 1; /* Set relevant stage times (including desired stage time for implicit solves) */ t0 = ark_mem->tn + step_mem->MRIC->c[is - 1] * ark_mem->h; @@ -2388,7 +2396,9 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) ytemp = ark_mem->tempv2; /* initialize the current solution */ + ark_mem->tcur = ark_mem->tn; N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + step_mem->istage = 0; /* if MRI adaptivity is enabled: reset fast accumulated error, and send appropriate control parameter to the fast integrator */ @@ -2502,6 +2512,9 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Loop over stages */ for (stage = 1; stage < max_stages; stage++) { + /* Set current stage index */ + step_mem->istage = stage; + /* Determine if this is an "embedding" or "solution" stage */ solution = (stage == step_mem->stages - 1); embedding = (stage == step_mem->stages); @@ -2870,7 +2883,9 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) t0 = ark_mem->tn; /* initialize the current solution */ + ark_mem->tcur = ark_mem->tn; N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + step_mem->istage = 0; /* if MRI adaptivity is enabled: reset fast accumulated error, and send appropriate control parameter to the fast integrator */ @@ -2990,7 +3005,7 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) { /* Get stage index from group; skip to the next group if we've reached the end of this one */ - stage = step_mem->MRIC->group[ig][is]; + step_mem->istage = stage = step_mem->MRIC->group[ig][is]; if (stage < 0) { break; } nextstage = -1; if (stage < step_mem->stages) diff --git a/src/arkode/arkode_mristep_impl.h b/src/arkode/arkode_mristep_impl.h index 482fe51c18..db8a80b3ca 100644 --- a/src/arkode/arkode_mristep_impl.h +++ b/src/arkode/arkode_mristep_impl.h @@ -269,6 +269,7 @@ int mriStep_GetNumNonlinSolvIters(ARKodeMem ark_mem, long int* nniters); int mriStep_GetNumNonlinSolvConvFails(ARKodeMem ark_mem, long int* nnfails); int mriStep_GetNonlinSolvStats(ARKodeMem ark_mem, long int* nniters, long int* nnfails); +int mriStep_GetStageIndex(ARKodeMem ark_mem, int* stage, int* max_stages); int mriStep_PrintAllStats(ARKodeMem ark_mem, FILE* outfile, SUNOutputFormat fmt); int mriStep_WriteParameters(ARKodeMem ark_mem, FILE* fp); int mriStep_Reset(ARKodeMem ark_mem, sunrealtype tR, N_Vector yR); diff --git a/src/arkode/arkode_mristep_io.c b/src/arkode/arkode_mristep_io.c index b1cc54a624..acb3f72822 100644 --- a/src/arkode/arkode_mristep_io.c +++ b/src/arkode/arkode_mristep_io.c @@ -828,6 +828,26 @@ int mriStep_GetNonlinSolvStats(ARKodeMem ark_mem, long int* nniters, return (ARK_SUCCESS); } +/*--------------------------------------------------------------- + mriStep_GetStageIndex: + + Returns the current stage index and number of stages + ---------------------------------------------------------------*/ +int mriStep_GetStageIndex(ARKodeMem ark_mem, int* stage, int* max_stages) +{ + ARKodeMRIStepMem step_mem; + int retval; + + /* access ARKodeMRIStepMem structure */ + retval = mriStep_AccessStepMem(ark_mem, __func__, &step_mem); + if (retval != ARK_SUCCESS) { return (retval); } + + *stage = step_mem->istage; + *max_stages = step_mem->stages; + + return (ARK_SUCCESS); +} + /*--------------------------------------------------------------- mriStep_PrintAllStats: diff --git a/src/arkode/arkode_splittingstep.c b/src/arkode/arkode_splittingstep.c index 11936b4826..e5c146b29e 100644 --- a/src/arkode/arkode_splittingstep.c +++ b/src/arkode/arkode_splittingstep.c @@ -312,7 +312,9 @@ static int splittingStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, SUNLogInfo(ARK_LOGGER, "begin-sequential-methods-list", "sequential method = 0"); + ark_mem->tcur = ark_mem->tn; N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + step_mem->istage = 0; retval = splittingStep_SequentialMethod(ark_mem, step_mem, 0, ark_mem->ycur); SUNLogExtraDebugVec(ARK_LOGGER, "sequential state", ark_mem->ycur, "y_seq(:) ="); @@ -332,6 +334,7 @@ static int splittingStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, for (int i = 1; i < coefficients->sequential_methods; i++) { + step_mem->istage = i; SUNLogInfo(ARK_LOGGER, "begin-sequential-methods-list", "sequential method = %i", i); @@ -424,6 +427,7 @@ static void splittingStep_PrintMem(ARKodeMem ark_mem, FILE* outfile) if (retval != ARK_SUCCESS) { return; } /* output integer quantities */ + fprintf(outfile, "SplittingStep: istage = %i\n", step_mem->istage); fprintf(outfile, "SplittingStep: partitions = %i\n", step_mem->partitions); fprintf(outfile, "SplittingStep: order = %i\n", step_mem->order); @@ -456,6 +460,30 @@ static int splittingStep_SetOrder(ARKodeMem ark_mem, int order) return ARK_SUCCESS; } +/*--------------------------------------------------------------- + Returns the current stage index and number of stages + ---------------------------------------------------------------*/ +int splittingStep_GetStageIndex(ARKodeMem ark_mem, int* istage, int* num_stages) +{ + ARKodeSplittingStepMem step_mem; + int retval = splittingStep_AccessStepMem(ark_mem, __func__, &step_mem); + if (retval != ARK_SUCCESS) { return (retval); } + + /* if coefficients structure is not yet available, return defaults */ + if (step_mem->coefficients == NULL) + { + *istage = 0; + *num_stages = 1; + } + else + { + *istage = step_mem->istage; + *num_stages = step_mem->coefficients->sequential_methods; + } + + return (ARK_SUCCESS); +} + /*------------------------------------------------------------------------------ Routine to set SplittingStep options ----------------------------------------------------------------------------*/ @@ -662,6 +690,7 @@ void* SplittingStepCreate(SUNStepper* steppers, int partitions, sunrealtype t0, ark_mem->step_setoptions = splittingStep_SetOptions; ark_mem->step_setdefaults = splittingStep_SetDefaults; ark_mem->step_setorder = splittingStep_SetOrder; + ark_mem->step_getstageindex = splittingStep_GetStageIndex; ark_mem->step_mem = (void*)step_mem; /* Set default values for ARKStep optional inputs */ diff --git a/src/arkode/arkode_splittingstep_impl.h b/src/arkode/arkode_splittingstep_impl.h index fe50b79d9e..55cd1eea8a 100644 --- a/src/arkode/arkode_splittingstep_impl.h +++ b/src/arkode/arkode_splittingstep_impl.h @@ -28,6 +28,7 @@ typedef struct ARKodeSplittingStepMemRec SplittingStepCoefficients coefficients; long int* n_stepper_evolves; + int istage; int partitions; int order; }* ARKodeSplittingStepMem; diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index cb4ab1fd2b..a36514deb6 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -123,6 +123,7 @@ void* SPRKStepCreate(ARKRhsFn f1, ARKRhsFn f2, sunrealtype t0, N_Vector y0, ark_mem->step_setdefaults = sprkStep_SetDefaults; ark_mem->step_setorder = sprkStep_SetOrder; ark_mem->step_getnumrhsevals = sprkStep_GetNumRhsEvals; + ark_mem->step_getstageindex = sprkStep_GetStageIndex; ark_mem->step_mem = (void*)step_mem; /* Set default values for optional inputs */ diff --git a/src/arkode/arkode_sprkstep_impl.h b/src/arkode/arkode_sprkstep_impl.h index 5a0c8b2ea9..d5ff69312b 100644 --- a/src/arkode/arkode_sprkstep_impl.h +++ b/src/arkode/arkode_sprkstep_impl.h @@ -91,6 +91,7 @@ void sprkStep_Free(ARKodeMem ark_mem); void sprkStep_PrintMem(ARKodeMem ark_mem, FILE* outfile); int sprkStep_GetNumRhsEvals(ARKodeMem ark_mem, int partition_index, long int* rhs_evals); +int sprkStep_GetStageIndex(ARKodeMem ark_mem, int* stage, int* max_stages); /* Internal utility routines */ int sprkStep_AccessARKODEStepMem(void* arkode_mem, const char* fname, diff --git a/src/arkode/arkode_sprkstep_io.c b/src/arkode/arkode_sprkstep_io.c index 8d1fd840a3..3f5a919106 100644 --- a/src/arkode/arkode_sprkstep_io.c +++ b/src/arkode/arkode_sprkstep_io.c @@ -275,6 +275,35 @@ int sprkStep_SetOrder(ARKodeMem ark_mem, int ord) return (ARK_SUCCESS); } +/*--------------------------------------------------------------- + sprkStep_GetStageIndex: + + Returns the current stage index and number of stages + ---------------------------------------------------------------*/ +int sprkStep_GetStageIndex(ARKodeMem ark_mem, int* stage, int* max_stages) +{ + ARKodeSPRKStepMem step_mem; + int retval; + + /* access ARKodeSPRKStepMem structure */ + retval = sprkStep_AccessStepMem(ark_mem, __func__, &step_mem); + if (retval != ARK_SUCCESS) { return (retval); } + + /* if table is not yet set, return defaults */ + if (step_mem->method == NULL) + { + *stage = 0; + *max_stages = 1; + } + else + { + *stage = step_mem->istage; + *max_stages = step_mem->method->stages; + } + + return (ARK_SUCCESS); +} + /*--------------------------------------------------------------- sprkStep_PrintAllStats: From 5c298287bf31f8b119211634d369b1a07c623c32 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 16 Jan 2026 16:40:23 -0500 Subject: [PATCH 032/298] Updated logging output file --- .../logging/test_logging_arkode_lsrkstep_lvl5_0.out | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_0.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_0.out index 0a04d8d1e0..370b0f1f8e 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_0.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_0.out @@ -12,7 +12,7 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepRKC][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepRKC][begin-stages-list] stage = 1, tcur = 1.46936487268518e-12 [DEBUG][rank 0][lsrkStep_TakeStepRKC][stage RHS] F_1(:) = - 1.469364872685183e-12 + 1.000000000000000e+00 [INFO][rank 0][lsrkStep_TakeStepRKC][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepRKC][begin-stages-list] stage = 2, tcur = 6.10351562499999e-12 [INFO][rank 0][lsrkStep_TakeStepRKC][end-stages-list] status = success @@ -37,7 +37,7 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepRKC][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepRKC][begin-stages-list] stage = 1, tcur = 1.46997522424768e-08 [DEBUG][rank 0][lsrkStep_TakeStepRKC][stage RHS] F_1(:) = - 1.469975224247683e-08 + 9.999999999999998e-01 [INFO][rank 0][lsrkStep_TakeStepRKC][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepRKC][begin-stages-list] stage = 2, tcur = 6.10412597656249e-08 [INFO][rank 0][lsrkStep_TakeStepRKC][end-stages-list] status = success @@ -62,7 +62,7 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepRKC][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepRKC][begin-stages-list] stage = 1, tcur = 3.54914234302662e-07 [DEBUG][rank 0][lsrkStep_TakeStepRKC][stage RHS] F_1(:) = - 3.549142343026603e-07 + 9.999999999998741e-01 [INFO][rank 0][lsrkStep_TakeStepRKC][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepRKC][begin-stages-list] stage = 2, tcur = 1.28174438476562e-06 [INFO][rank 0][lsrkStep_TakeStepRKC][end-stages-list] status = success From 5178c9ad78015da6cd0d80cac119de01e45460e8 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 16 Jan 2026 17:48:46 -0500 Subject: [PATCH 033/298] Updated answers submodule commit --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index f524826578..b99da44261 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit f524826578c12d5a8a350be4d2d98d47e319798a +Subproject commit b99da44261bbc32536f0cb394a5daaef759bb0e1 From 8b437acc36467258afbea99b375c48c09b09d750 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Sat, 17 Jan 2026 18:52:03 -0500 Subject: [PATCH 034/298] Fixed unused variable warning/error --- src/arkode/arkode_arkstep.c | 2 +- src/arkode/arkode_erkstep.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index e4e7dc8855..74ea464b7a 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -951,7 +951,7 @@ int arkStep_Init(ARKodeMem ark_mem, SUNDIALS_MAYBE_UNUSED sunrealtype tout, int init_type) { ARKodeARKStepMem step_mem; - int j, retval; + int retval; sunbooleantype reset_efun; /* access ARKodeARKStepMem structure */ diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index 4ef1ef5ce7..93b6f1cbbd 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -403,7 +403,7 @@ int erkStep_Init(ARKodeMem ark_mem, SUNDIALS_MAYBE_UNUSED sunrealtype tout, { ARKodeERKStepMem step_mem; sunbooleantype reset_efun; - int retval, j; + int retval; /* access ARKodeERKStepMem structure */ retval = erkStep_AccessStepMem(ark_mem, __func__, &step_mem); From 538b68b1b536e71fba5e3d7ebc81418683317a32 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Sat, 17 Jan 2026 18:52:57 -0500 Subject: [PATCH 035/298] Formatting --- src/arkode/arkode_arkstep.c | 18 +++++++++--------- src/arkode/arkode_erkstep.c | 6 +++--- src/arkode/arkode_forcingstep.c | 5 +---- src/arkode/arkode_mristep.c | 5 ++--- 4 files changed, 15 insertions(+), 19 deletions(-) diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index 74ea464b7a..1e123bab15 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1047,9 +1047,9 @@ int arkStep_Init(ARKodeMem ark_mem, SUNDIALS_MAYBE_UNUSED sunrealtype tout, { if (step_mem->Fe == NULL) { - if (!arkAllocVecArray(step_mem->stages, ark_mem->ewt, - &(step_mem->Fe), ark_mem->lrw1, &(ark_mem->lrw), - ark_mem->liw1, &(ark_mem->liw))) + if (!arkAllocVecArray(step_mem->stages, ark_mem->ewt, &(step_mem->Fe), + ark_mem->lrw1, &(ark_mem->lrw), ark_mem->liw1, + &(ark_mem->liw))) { return (ARK_MEM_FAIL); } @@ -1061,9 +1061,9 @@ int arkStep_Init(ARKodeMem ark_mem, SUNDIALS_MAYBE_UNUSED sunrealtype tout, { if (step_mem->Fi == NULL) { - if (!arkAllocVecArray(step_mem->stages, ark_mem->ewt, - &(step_mem->Fi), ark_mem->lrw1, &(ark_mem->lrw), - ark_mem->liw1, &(ark_mem->liw))) + if (!arkAllocVecArray(step_mem->stages, ark_mem->ewt, &(step_mem->Fi), + ark_mem->lrw1, &(ark_mem->lrw), ark_mem->liw1, + &(ark_mem->liw))) { return (ARK_MEM_FAIL); } @@ -1077,9 +1077,9 @@ int arkStep_Init(ARKodeMem ark_mem, SUNDIALS_MAYBE_UNUSED sunrealtype tout, { if (step_mem->z == NULL) { - if (!arkAllocVecArray(step_mem->stages, ark_mem->ewt, - &(step_mem->z), ark_mem->lrw1, &(ark_mem->lrw), - ark_mem->liw1, &(ark_mem->liw))) + if (!arkAllocVecArray(step_mem->stages, ark_mem->ewt, &(step_mem->z), + ark_mem->lrw1, &(ark_mem->lrw), ark_mem->liw1, + &(ark_mem->liw))) { return (ARK_MEM_FAIL); } diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index 93b6f1cbbd..4dcb2e4129 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -465,9 +465,9 @@ int erkStep_Init(ARKodeMem ark_mem, SUNDIALS_MAYBE_UNUSED sunrealtype tout, /* Allocate F[0] ... F[stages-1] if needed */ if (step_mem->F == NULL) { - if (!arkAllocVecArray(step_mem->stages, ark_mem->ewt, - &(step_mem->F), ark_mem->lrw1, &(ark_mem->lrw), - ark_mem->liw1, &(ark_mem->liw))) + if (!arkAllocVecArray(step_mem->stages, ark_mem->ewt, &(step_mem->F), + ark_mem->lrw1, &(ark_mem->lrw), ark_mem->liw1, + &(ark_mem->liw))) { return (ARK_MEM_FAIL); } diff --git a/src/arkode/arkode_forcingstep.c b/src/arkode/arkode_forcingstep.c index 102be646b0..bdbf236ebf 100644 --- a/src/arkode/arkode_forcingstep.c +++ b/src/arkode/arkode_forcingstep.c @@ -91,10 +91,7 @@ static int forcingStep_Init(ARKodeMem ark_mem, } /* immediately return if not called in FIRST_INIT mode */ - if (init_type != FIRST_INIT) - { - return ARK_SUCCESS; - } + if (init_type != FIRST_INIT) { return ARK_SUCCESS; } /* On first initialization, make the SUNStepper consistent with the current * state in case a user provided a different initial condition for the diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 5a7b03f26b..0811f6f231 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1298,7 +1298,6 @@ int mriStep_Init(ARKodeMem ark_mem, sunrealtype tout, int init_type) /*** Perform timestep adaptivity checks and initial setup (skip on ALLOC_INIT) ***/ if (init_type != ALLOC_INIT) { - /* get timestep adaptivity type */ adapt_type = SUNAdaptController_GetType(ark_mem->hadapt_mem->hcontroller); @@ -1342,8 +1341,8 @@ int mriStep_Init(ARKodeMem ark_mem, sunrealtype tout, int init_type) if (mriStep_SlowRHS(ark_mem, ark_mem->tcur, ark_mem->ycur, ark_mem->tempv1, ARK_FULLRHS_START) != ARK_SUCCESS) { - arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, __FILE__, - "error calling slow RHS function(s)"); + arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, + __FILE__, "error calling slow RHS function(s)"); return (ARK_RHSFUNC_FAIL); } retval = mriStep_Hin(ark_mem, ark_mem->tcur, tout, ark_mem->tempv1, From cfd35c79a798c245462c2486ecd5003cfcdd4d86 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Sat, 17 Jan 2026 18:53:25 -0500 Subject: [PATCH 036/298] Formatting --- include/arkode/arkode.h | 3 ++- src/arkode/arkode_arkstep_io.c | 2 +- src/arkode/arkode_erkstep.c | 2 +- src/arkode/arkode_erkstep_io.c | 2 +- src/arkode/arkode_impl.h | 2 +- src/arkode/arkode_io.c | 4 ++-- src/arkode/arkode_lsrkstep.c | 30 +++++++++++++++--------------- src/arkode/arkode_lsrkstep_io.c | 2 +- src/arkode/arkode_mristep_io.c | 2 +- src/arkode/arkode_splittingstep.c | 4 ++-- src/arkode/arkode_sprkstep_io.c | 4 ++-- 11 files changed, 29 insertions(+), 28 deletions(-) diff --git a/include/arkode/arkode.h b/include/arkode/arkode.h index 5ab9debf29..03310147ec 100644 --- a/include/arkode/arkode.h +++ b/include/arkode/arkode.h @@ -381,7 +381,8 @@ SUNDIALS_EXPORT int ARKodePrintAllStats(void* arkode_mem, FILE* outfile, SUNOutputFormat fmt); SUNDIALS_EXPORT char* ARKodeGetReturnFlagName(long int flag); SUNDIALS_EXPORT int ARKodeWriteParameters(void* arkode_mem, FILE* fp); -SUNDIALS_EXPORT int ARKodeGetStageIndex(void* arkode_mem, int* stage, int *max_stages); +SUNDIALS_EXPORT int ARKodeGetStageIndex(void* arkode_mem, int* stage, + int* max_stages); /* Optional output functions (temporal adaptivity) */ SUNDIALS_EXPORT int ARKodeGetNumExpSteps(void* arkode_mem, long int* expsteps); diff --git a/src/arkode/arkode_arkstep_io.c b/src/arkode/arkode_arkstep_io.c index 8df2359edd..f4f88657b7 100644 --- a/src/arkode/arkode_arkstep_io.c +++ b/src/arkode/arkode_arkstep_io.c @@ -1312,7 +1312,7 @@ int arkStep_GetStageIndex(ARKodeMem ark_mem, int* stage, int* max_stages) retval = arkStep_AccessStepMem(ark_mem, __func__, &step_mem); if (retval != ARK_SUCCESS) { return (retval); } - *stage = step_mem->istage; + *stage = step_mem->istage; *max_stages = step_mem->stages; return (ARK_SUCCESS); diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index 4649969e0c..ad0a55ae4c 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -789,7 +789,7 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (!(ark_mem->fn_is_current)) { - mode = (ark_mem->initsetup) ? ARK_FULLRHS_START : ARK_FULLRHS_END; + mode = (ark_mem->initsetup) ? ARK_FULLRHS_START : ARK_FULLRHS_END; retval = ark_mem->step_fullrhs(ark_mem, ark_mem->tn, ark_mem->ycur, ark_mem->fn, mode); if (retval) diff --git a/src/arkode/arkode_erkstep_io.c b/src/arkode/arkode_erkstep_io.c index 9c765e388f..e2be81ecb3 100644 --- a/src/arkode/arkode_erkstep_io.c +++ b/src/arkode/arkode_erkstep_io.c @@ -412,7 +412,7 @@ int erkStep_GetStageIndex(ARKodeMem ark_mem, int* stage, int* max_stages) retval = erkStep_AccessStepMem(ark_mem, __func__, &step_mem); if (retval != ARK_SUCCESS) { return (retval); } - *stage = step_mem->istage; + *stage = step_mem->istage; *max_stages = step_mem->stages; return (ARK_SUCCESS); diff --git a/src/arkode/arkode_impl.h b/src/arkode/arkode_impl.h index 932f581599..0df57d92c2 100644 --- a/src/arkode/arkode_impl.h +++ b/src/arkode/arkode_impl.h @@ -231,7 +231,7 @@ typedef int (*ARKTimestepSetUseCompensatedSums)(ARKodeMem ark_mem, typedef int (*ARKTimestepSetOptions)(ARKodeMem ark_mem, int* argidx, char* argv[], size_t offset, sunbooleantype* arg_used); typedef int (*ARKTimestepGetStageIndex)(ARKodeMem ark_mem, int* stage, - int *max_stages); + int* max_stages); /* time stepper interface functions -- temporal adaptivity */ typedef int (*ARKTimestepGetEstLocalErrors)(ARKodeMem ark_mem, N_Vector ele); diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index 0f329288c5..551cad0ab4 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -3194,7 +3194,7 @@ int ARKodeGetUserData(void* arkode_mem, void** user_data) then it returns (0,1), indicating that it is currently in the first of only a single stage. ---------------------------------------------------------------*/ -int ARKodeGetStageIndex(void* arkode_mem, int* stage, int *max_stages) +int ARKodeGetStageIndex(void* arkode_mem, int* stage, int* max_stages) { ARKodeMem ark_mem; if (arkode_mem == NULL) @@ -3212,7 +3212,7 @@ int ARKodeGetStageIndex(void* arkode_mem, int* stage, int *max_stages) } else { - *stage = 0; + *stage = 0; *max_stages = 1; return (ARK_SUCCESS); } diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index c196595907..6e0837aaf4 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -583,7 +583,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Initialize the current solution and stage index */ ark_mem->tcur = ark_mem->tn; N_VScale(ONE, ark_mem->yn, ark_mem->ycur); - step_mem->istage = 0; + step_mem->istage = 0; step_mem->req_stages = step_mem->stage_max_limit; /* Compute dominant eigenvalue and update stats */ @@ -718,7 +718,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) for (int j = 2; j <= step_mem->req_stages; j++) { /* set stage index (0-based) */ - step_mem->istage = j-1; + step_mem->istage = j - 1; /* Evaluate RHS and store in tempv3 */ ark_mem->tcur = ark_mem->tn + ark_mem->h * thjm1; @@ -825,7 +825,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* final stage processing */ step_mem->istage = step_mem->req_stages; - ark_mem->tcur = ark_mem->tn + ark_mem->h; + ark_mem->tcur = ark_mem->tn + ark_mem->h; /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) @@ -933,7 +933,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Initialize the current solution and stage index */ ark_mem->tcur = ark_mem->tn; N_VScale(ONE, ark_mem->yn, ark_mem->ycur); - step_mem->istage = 0; + step_mem->istage = 0; step_mem->req_stages = step_mem->stage_max_limit; /* Compute dominant eigenvalue and update stats */ @@ -1058,7 +1058,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) for (int j = 2; j <= step_mem->req_stages; j++) { /* set stage index (0-based) */ - step_mem->istage = j-1; + step_mem->istage = j - 1; /* Evaluate RHS and store in tempv3 */ ark_mem->tcur = ark_mem->tn + ark_mem->h * cjm1; @@ -1156,7 +1156,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* final stage processing */ step_mem->istage = step_mem->req_stages; - ark_mem->tcur = ark_mem->tn + ark_mem->h; + ark_mem->tcur = ark_mem->tn + ark_mem->h; /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) @@ -1343,7 +1343,7 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr for (int j = 2; j < step_mem->req_stages; j++) { /* set stage index (0-based) */ - step_mem->istage = j-1; + step_mem->istage = j - 1; /* Complete previous stage by evaluating RHS and storing it in tempv2 */ ark_mem->tcur = ark_mem->tn + (j - 1) * hsm1inv; @@ -1400,8 +1400,8 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* Complete the next-to-last stage by evaluating the RHS and storing it in tempv2 */ - step_mem->istage = step_mem->req_stages-1; - ark_mem->tcur = ark_mem->tn + ark_mem->h; + step_mem->istage = step_mem->req_stages - 1; + ark_mem->tcur = ark_mem->tn + ark_mem->h; if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, @@ -1583,7 +1583,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr for (int j = 2; j <= ((in - 1) * (in - 2) / 2); j++) { /* set stage index (0-based) */ - step_mem->istage = j-1; + step_mem->istage = j - 1; /* Complete previous stage by evaluating RHS and storing it in tempv3 */ ark_mem->tcur = ark_mem->tn + (j - 1) * hrat; @@ -1647,7 +1647,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr for (int j = ((in - 1) * (in - 2) / 2 + 1); j <= (in * (in + 1) / 2 - 1); j++) { /* set stage index (0-based) */ - step_mem->istage = j-1; + step_mem->istage = j - 1; /* Complete previous stage by evaluating RHS and storing it in tempv3 */ ark_mem->tcur = ark_mem->tn + (j - 1) * hrat; @@ -1706,7 +1706,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Complete the last stage from the second stage group */ step_mem->istage = (in * (in + 1) / 2 - 1); - ark_mem->tcur = ark_mem->tn + hrat * (rn * (rn + ONE) / TWO - ONE); + ark_mem->tcur = ark_mem->tn + hrat * (rn * (rn + ONE) / TWO - ONE); /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) @@ -1774,7 +1774,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr for (int j = (in * (in + 1) / 2 + 1); j <= step_mem->req_stages; j++) { /* set stage index (0-based) */ - step_mem->istage = j-1; + step_mem->istage = j - 1; /* Complete the previous stage */ ark_mem->tcur = ark_mem->tn + (j - in - 1) * hrat; @@ -2256,7 +2256,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt for (int j = 2; j <= 5; j++) { /* set stage index (0-based) */ - step_mem->istage = j-1; + step_mem->istage = j - 1; /* Complete previous stage by evaluating RHS and storing in tempv3 */ ark_mem->tcur = ark_mem->tn + (j - 1) * hsixth; @@ -2345,7 +2345,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt for (int j = 6; j <= 9; j++) { /* set stage index (0-based) */ - step_mem->istage = j-1; + step_mem->istage = j - 1; /* Complete previous stage by evaluating RHS and storing in tempv3 */ ark_mem->tcur = ark_mem->tn + (j - 4) * hsixth; diff --git a/src/arkode/arkode_lsrkstep_io.c b/src/arkode/arkode_lsrkstep_io.c index aed94f1a6e..4c9f31f958 100644 --- a/src/arkode/arkode_lsrkstep_io.c +++ b/src/arkode/arkode_lsrkstep_io.c @@ -785,7 +785,7 @@ int lsrkStep_GetStageIndex(ARKodeMem ark_mem, int* stage, int* max_stages) retval = lsrkStep_AccessStepMem(ark_mem, __func__, &step_mem); if (retval != ARK_SUCCESS) { return (retval); } - *stage = step_mem->istage; + *stage = step_mem->istage; *max_stages = step_mem->req_stages; return (ARK_SUCCESS); diff --git a/src/arkode/arkode_mristep_io.c b/src/arkode/arkode_mristep_io.c index acb3f72822..34f9b6f905 100644 --- a/src/arkode/arkode_mristep_io.c +++ b/src/arkode/arkode_mristep_io.c @@ -842,7 +842,7 @@ int mriStep_GetStageIndex(ARKodeMem ark_mem, int* stage, int* max_stages) retval = mriStep_AccessStepMem(ark_mem, __func__, &step_mem); if (retval != ARK_SUCCESS) { return (retval); } - *stage = step_mem->istage; + *stage = step_mem->istage; *max_stages = step_mem->stages; return (ARK_SUCCESS); diff --git a/src/arkode/arkode_splittingstep.c b/src/arkode/arkode_splittingstep.c index e5c146b29e..02b7cc722a 100644 --- a/src/arkode/arkode_splittingstep.c +++ b/src/arkode/arkode_splittingstep.c @@ -472,12 +472,12 @@ int splittingStep_GetStageIndex(ARKodeMem ark_mem, int* istage, int* num_stages) /* if coefficients structure is not yet available, return defaults */ if (step_mem->coefficients == NULL) { - *istage = 0; + *istage = 0; *num_stages = 1; } else { - *istage = step_mem->istage; + *istage = step_mem->istage; *num_stages = step_mem->coefficients->sequential_methods; } diff --git a/src/arkode/arkode_sprkstep_io.c b/src/arkode/arkode_sprkstep_io.c index 3f5a919106..8f9106a8ad 100644 --- a/src/arkode/arkode_sprkstep_io.c +++ b/src/arkode/arkode_sprkstep_io.c @@ -292,12 +292,12 @@ int sprkStep_GetStageIndex(ARKodeMem ark_mem, int* stage, int* max_stages) /* if table is not yet set, return defaults */ if (step_mem->method == NULL) { - *stage = 0; + *stage = 0; *max_stages = 1; } else { - *stage = step_mem->istage; + *stage = step_mem->istage; *max_stages = step_mem->method->stages; } From 965fac42da0c2f76122a9819f463bf39cdcb9e04 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Sat, 17 Jan 2026 20:44:27 -0500 Subject: [PATCH 037/298] Formatting --- .../arkode/CXX_serial/ark_test_prealloc_arkstep.cpp | 2 +- .../arkode/CXX_serial/ark_test_prealloc_lsrkstep.cpp | 2 +- .../arkode/CXX_serial/ark_test_prealloc_mristep.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_arkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_arkstep.cpp index 959800eb71..02c7641e97 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_arkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_arkstep.cpp @@ -73,7 +73,7 @@ int main(int argc, char* argv[]) // Relative and absolute tolerances const sunrealtype rtol = SUN_RCONST(1.0e-6); const sunrealtype atol = SUN_RCONST(1.0e-10); - flag = ARKodeSStolerances(arkode_mem, rtol, atol); + flag = ARKodeSStolerances(arkode_mem, rtol, atol); if (check_flag(flag, "ARKodeSStolerances")) { return 1; } // Implicit algebraic solvers diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep.cpp index 7eaa24b4f2..47221a81b5 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep.cpp @@ -63,7 +63,7 @@ int main(int argc, char* argv[]) // Create LSRKStep memory structure void* arkode_mem = nullptr; - arkode_mem = LSRKStepCreateSTS(ode_rhs, zero, y, sunctx); + arkode_mem = LSRKStepCreateSTS(ode_rhs, zero, y, sunctx); if (check_ptr(arkode_mem, "LSRKStepCreate")) { return 1; } // Select method diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_mristep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_mristep.cpp index e770d7767b..5403c0706b 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_mristep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_mristep.cpp @@ -93,7 +93,7 @@ int main(int argc, char* argv[]) // Relative and absolute tolerances const sunrealtype rtol = SUN_RCONST(1.0e-6); const sunrealtype atol = SUN_RCONST(1.0e-10); - flag = ARKodeSStolerances(arkode_mem, rtol, atol); + flag = ARKodeSStolerances(arkode_mem, rtol, atol); if (check_flag(flag, "ARKodeSStolerances")) { return 1; } // Implicit algebraic solvers @@ -102,7 +102,7 @@ int main(int argc, char* argv[]) SUNMatrix A = nullptr; SUNLinearSolver LS = nullptr; SUNNonlinearSolver NLS = nullptr; - A = SUNDenseMatrix(2, 2, sunctx); + A = SUNDenseMatrix(2, 2, sunctx); if (check_ptr(A, "SUNDenseMatrix")) { return 1; } LS = SUNLinSol_Dense(y, A, sunctx); if (check_ptr(LS, "SUNLinSol_Dense")) { return 1; } From 8e0d64138364420acf1b1dbb13b3fb5315fbd3bc Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Sat, 17 Jan 2026 20:54:54 -0500 Subject: [PATCH 038/298] Added missing .out files for new unit tests --- .../ark_test_prealloc_arkstep_1.out | 40 ++++++++++++ .../ark_test_prealloc_erkstep_1.out | 21 +++++++ .../ark_test_prealloc_forcingstep_1.out | 22 +++++++ .../ark_test_prealloc_lsrkstep_1.out | 26 ++++++++ .../ark_test_prealloc_mristep_1.out | 62 +++++++++++++++++++ .../ark_test_prealloc_splittingstep_1.out | 22 +++++++ .../ark_test_prealloc_sprkstep_1.out | 22 +++++++ 7 files changed, 215 insertions(+) create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_prealloc_arkstep_1.out create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_prealloc_erkstep_1.out create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_prealloc_forcingstep_1.out create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep_1.out create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_prealloc_mristep_1.out create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_prealloc_splittingstep_1.out create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_prealloc_sprkstep_1.out diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_arkstep_1.out b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_arkstep_1.out new file mode 100644 index 0000000000..79e9246274 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_arkstep_1.out @@ -0,0 +1,40 @@ +Start ARKStep preallocation test +Using DIRK method +Using Newton nonlinear solver +Using GMRES iterative linear solver + t u v u err v err +------------------------------------------------------------------------------------------------------------------------------ + 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 + 1.029860256095084e-04 1.224744870316961e+00 1.732050195224250e+00 7.854161765408207e-12 2.731148640577885e-14 + 1.634509895443788e-02 1.224717600094773e+00 1.716694985522809e+00 4.466385261636674e-09 6.044738709576336e-09 + 3.254871529235759e-02 1.224636741653238e+00 1.671973015366888e+00 8.026050712928168e-09 5.988021634095730e-09 +------------------------------------------------------------------------------------------------------------------------------ +Current time = 0.0325487152923576 +Steps = 3 +Step attempts = 3 +Stability limited steps = 0 +Accuracy limited steps = 3 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.000102986025609508 +Last step size = 0.0162036163379197 +Current step size = 0.0160003634180696 +Explicit RHS fn evals = 0 +Implicit RHS fn evals = 49 +NLS iters = 31 +NLS fails = 0 +NLS iters per step = 10.3333333333333 +LS setups = 0 +Jac fn evals = 0 +LS RHS fn evals = 34 +Prec setup evals = 0 +Prec solves = 0 +LS iters = 34 +LS fails = 0 +Jac-times setups = 0 +Jac-times evals = 34 +LS iters per NLS iter = 1.09677419354839 +Jac evals per NLS iter = 0 +Prec evals per NLS iter = 0 +End ARKStep preallocation test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_erkstep_1.out b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_erkstep_1.out new file mode 100644 index 0000000000..11002e04ca --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_erkstep_1.out @@ -0,0 +1,21 @@ +Start ERKStep preallocation test + t u v u err v err +------------------------------------------------------------------------------------------------------------------------------ + 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 + 1.029860256095084e-04 1.224744870309106e+00 1.732050195224277e+00 2.220446049250313e-16 0.000000000000000e+00 + 1.606364534231249e-02 1.224718491293716e+00 1.717217032062862e+00 4.421219967909451e-08 2.910637308950470e-08 + 3.202338818315199e-02 1.224640124009817e+00 1.673862546151861e+00 8.746489865707474e-08 1.494766854737151e-07 +------------------------------------------------------------------------------------------------------------------------------ +Current time = 0.032023388183152 +Steps = 3 +Step attempts = 4 +Stability limited steps = 0 +Accuracy limited steps = 4 +Error test fails = 1 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.000102986025609508 +Last step size = 0.0159597428408395 +Current step size = 0.0166588795525631 +RHS fn evals = 19 +End ERKStep preallocation test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_forcingstep_1.out b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_forcingstep_1.out new file mode 100644 index 0000000000..3be800b104 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_forcingstep_1.out @@ -0,0 +1,22 @@ +Start ForcingStep preallocation test + t y y err +--------------------------------------------------------------------- + 0.000000000000000e+00 1.000000000000000e+00 0.000000000000000e+00 + 1.000000000000000e-03 9.990010003330001e-01 9.999996670728706e-07 + 2.000000000000000e-03 9.980020006646669e-01 1.997998004599211e-06 + 3.000000000000000e-03 9.970030029929939e-01 2.993993026279007e-06 +--------------------------------------------------------------------- +Current time = 0.003 +Steps = 3 +Step attempts = 3 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.001 +Last step size = 0.001 +Current step size = 0.001 +Partition 1 evolves = 3 +Partition 2 evolves = 3 +End ForcingStep preallocation test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep_1.out b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep_1.out new file mode 100644 index 0000000000..441d468b29 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep_1.out @@ -0,0 +1,26 @@ +Start LSRKStep preallocation test + t y y err +--------------------------------------------------------------------- + 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 + 6.103515625000001e-12 6.103515624999975e-12 2.504160057533580e-26 + 6.104125976562500e-08 6.104125976562474e-08 1.852884572118782e-22 + 1.281744384765625e-06 1.281744384765305e-06 3.822236174485030e-19 +--------------------------------------------------------------------- +Current time = 1.28174438476563e-06 +Steps = 3 +Step attempts = 3 +Stability limited steps = 0 +Accuracy limited steps = 3 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 6.103515625e-12 +Last step size = 1.220703125e-06 +Current step size = 2.44140625e-05 +RHS fn evals = 9 +Number of dom_eig updates = 1 +Max. num. of stages used = 2 +Max. num. of stages allowed = 200 +Max. spectral radius = 999.9 +Min. spectral radius = 999.9 +End LSRKStep preallocation test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_mristep_1.out b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_mristep_1.out new file mode 100644 index 0000000000..f200279336 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_mristep_1.out @@ -0,0 +1,62 @@ +Start MRIStep preallocation test +Using Im-MRI-GARK method +Using Newton nonlinear solver +Using dense direct linear solver + t u v u err v err +------------------------------------------------------------------------------------------------------------------------------ + 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 + 2.216762984896080e-02 1.224694723648756e+00 1.703912733300302e+00 4.921912433175635e-09 7.285889447317118e-09 + 4.430630505163263e-02 1.224544544576523e+00 1.622472682735258e+00 9.612434626049549e-09 3.868790621197604e-09 + 6.647784899368810e-02 1.224293925250561e+00 1.496297529163339e+00 1.416605432957851e-08 9.184720983768102e-09 +------------------------------------------------------------------------------------------------------------------------------ + +Outer integrator statistics: +Current time = 0.0664778489936881 +Steps = 3 +Step attempts = 5 +Stability limited steps = 0 +Accuracy limited steps = 4 +Error test fails = 1 +NLS step fails = 1 +Inequality constraint fails = 0 +Initial step size = 0.1 +Last step size = 0.0221715439420555 +Current step size = 0.022206678920593 +Explicit slow RHS fn evals = 0 +Implicit slow RHS fn evals = 58 +Inner stepper failures = 0 +NLS iters = 42 +NLS fails = 2 +NLS iters per step = 14 +LS setups = 3 +Jac fn evals = 3 +LS RHS fn evals = 0 +Prec setup evals = 0 +Prec solves = 0 +LS iters = 0 +LS fails = 0 +Jac-times setups = 0 +Jac-times evals = 0 +LS iters per NLS iter = 0 +Jac evals per NLS iter = 0.0714285714285714 +Prec evals per NLS iter = 0 + +Inner integrator statistics: +Current time = 0.0664778489936881 +Steps = 16 +Step attempts = 16 +Stability limited steps = 0 +Accuracy limited steps = 16 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.000102986177305221 +Last step size = 0.00739051464735181 +Current step size = 0.00739051464735181 +Explicit RHS fn evals = 82 +Implicit RHS fn evals = 0 +NLS iters = 0 +NLS fails = 0 +NLS iters per step = 0 +LS setups = 0 +End MRIStep preallocation test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_splittingstep_1.out b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_splittingstep_1.out new file mode 100644 index 0000000000..04eef70c30 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_splittingstep_1.out @@ -0,0 +1,22 @@ +Start SplittingStep preallocation test + t y y err +--------------------------------------------------------------------- + 0.000000000000000e+00 1.000000000000000e+00 0.000000000000000e+00 + 1.000000000000000e-03 9.989990016676641e-01 9.986656689386919e-07 + 2.000000000000000e-03 9.979980073386400e-01 1.995328022363907e-06 + 3.000000000000000e-03 9.969970190148773e-01 2.989985090406932e-06 +--------------------------------------------------------------------- +Current time = 0.003 +Steps = 3 +Step attempts = 3 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.001 +Last step size = 0.001 +Current step size = 0.001 +Partition 1 evolves = 3 +Partition 2 evolves = 3 +End SplittingStep preallocation test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_sprkstep_1.out b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_sprkstep_1.out new file mode 100644 index 0000000000..329037de9d --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_sprkstep_1.out @@ -0,0 +1,22 @@ +Start SPRKStep preallocation test + t q1 q2 q3 q4 +------------------------------------------------------------------------------------------------------------------------------ + 0.000000000000000e+00 4.000000000000000e-01 0.000000000000000e+00 0.000000000000000e+00 2.000000000000000e+00 + 1.000000000000000e-03 3.999968750113932e-01 1.999994791691249e-03 -6.249954427477657e-03 1.999984375130207e+00 + 2.000000000000000e-03 3.999875001822874e-01 3.999958334163726e-03 -1.249963542950927e-02 1.999937502083256e+00 + 3.000000000000000e-03 3.999718759228028e-01 5.999859381323369e-03 -1.874876962886015e-02 1.999859385545991e+00 +------------------------------------------------------------------------------------------------------------------------------ +Current time = 0.003 +Steps = 3 +Step attempts = 3 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.001 +Last step size = 0.001 +Current step size = 0.001 +f1 RHS fn evals = 12 +f2 RHS fn evals = 12 +End SPRKStep preallocation test From 6588500cc61cc3934d9d80511c7a64abe6f4c3ae Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Sat, 17 Jan 2026 21:13:46 -0500 Subject: [PATCH 039/298] Updated answers submodule commit --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index b99da44261..7114ab4918 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit b99da44261bbc32536f0cb394a5daaef759bb0e1 +Subproject commit 7114ab49185d9b2a6a0877addab62461c195eca3 From 88b09d91bf939446e3201748176e0dc44d2493ad Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Sat, 17 Jan 2026 21:54:01 -0500 Subject: [PATCH 040/298] Updated answers submodule commit --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index 7114ab4918..f83495b4b6 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 7114ab49185d9b2a6a0877addab62461c195eca3 +Subproject commit f83495b4b689a39cc625d1bf115b115e6a53fe67 From fb2a3be91bf4daa259541d97e9b37b90755d22d3 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Sat, 17 Jan 2026 22:06:21 -0500 Subject: [PATCH 041/298] Updated answers submodule commit --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index f83495b4b6..45cdd5f7cc 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit f83495b4b689a39cc625d1bf115b115e6a53fe67 +Subproject commit 45cdd5f7ccf13d6c6d081c60d3b3b122fb710e5b From a6f612270f0691bd03b66fcdb95e5d0553a0af39 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Sun, 18 Jan 2026 11:01:40 -0500 Subject: [PATCH 042/298] Removed logging commands (leftover from the test problem file it was copied from) --- .../arkode/CXX_serial/ark_test_prealloc_lsrkstep.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep.cpp index 47221a81b5..c6a347d302 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep.cpp @@ -46,16 +46,6 @@ int main(int argc, char* argv[]) bool preallocate_data = false; if (argc > 1) { preallocate_data = stoi(argv[1]); } - // Ensure logging output goes to stdout - SUNLogger logger; - int flag = SUNContext_GetLogger(sunctx, &logger); - if (check_flag(flag, "SUNContext_GetLogger")) { return 1; } - - SUNLogger_SetErrorFilename(logger, "stdout"); - SUNLogger_SetWarningFilename(logger, "stdout"); - SUNLogger_SetInfoFilename(logger, "stdout"); - SUNLogger_SetDebugFilename(logger, "stdout"); - // Create initial condition N_Vector y = N_VNew_Serial(1, sunctx); if (check_ptr(y, "N_VNew_Serial")) { return 1; } @@ -67,7 +57,7 @@ int main(int argc, char* argv[]) if (check_ptr(arkode_mem, "LSRKStepCreate")) { return 1; } // Select method - flag = LSRKStepSetSTSMethodByName(arkode_mem, "ARKODE_LSRK_RKC_2"); + int flag = LSRKStepSetSTSMethodByName(arkode_mem, "ARKODE_LSRK_RKC_2"); if (check_flag(flag, "LSRKStepSetSTSMethodByName")) { return 1; } flag = ARKodeSetUserData(arkode_mem, &problem_data); From 24590821c3b353a8429946558b6e05fb690f360c Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Sun, 18 Jan 2026 13:01:48 -0500 Subject: [PATCH 043/298] Applied formatting patch from CI --- doc/superbuild/source/conf.py | 4 +--- test/config_cmake.py | 6 ++---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/doc/superbuild/source/conf.py b/doc/superbuild/source/conf.py index 70971fc743..5276512b76 100644 --- a/doc/superbuild/source/conf.py +++ b/doc/superbuild/source/conf.py @@ -93,9 +93,7 @@ copyright = """\ 2025-{year}, Lawrence Livermore National Security, University of Maryland Baltimore County, and the SUNDIALS contributors. Copyright (c) 2013-2025, Lawrence Livermore National Security and Southern Methodist University. - Copyright (c) 2002-2013, Lawrence Livermore National Security""".format( - year=year -) + Copyright (c) 2002-2013, Lawrence Livermore National Security""".format(year=year) # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the diff --git a/test/config_cmake.py b/test/config_cmake.py index 45705e9c7a..842cd8a725 100644 --- a/test/config_cmake.py +++ b/test/config_cmake.py @@ -24,10 +24,8 @@ def main(): import argparse - parser = argparse.ArgumentParser( - description="""Create a SUNDIALS CMake - cache file""" - ) + parser = argparse.ArgumentParser(description="""Create a SUNDIALS CMake + cache file""") parser.add_argument( "--filetype", From 7d8cc833060e912d7efce240ab93a6ad16b6bb08 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 19 Jan 2026 08:52:11 -0500 Subject: [PATCH 044/298] Updated answers submodule commit --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index 45cdd5f7cc..5ab7c953ad 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 45cdd5f7ccf13d6c6d081c60d3b3b122fb710e5b +Subproject commit 5ab7c953ad8c7831ea85e5711519baf79e94c9be From f11fc2d031bfb1fc12bb027a861d0c7af65ff2c8 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 19 Jan 2026 23:29:31 -0500 Subject: [PATCH 045/298] Swig --- src/arkode/fmod_int32/farkode_mod.c | 16 ++++++++++++++ src/arkode/fmod_int32/farkode_mod.f90 | 30 +++++++++++++++++++++++++++ src/arkode/fmod_int64/farkode_mod.c | 16 ++++++++++++++ src/arkode/fmod_int64/farkode_mod.f90 | 30 +++++++++++++++++++++++++++ 4 files changed, 92 insertions(+) diff --git a/src/arkode/fmod_int32/farkode_mod.c b/src/arkode/fmod_int32/farkode_mod.c index 62a30445d8..0eaa9703d6 100644 --- a/src/arkode/fmod_int32/farkode_mod.c +++ b/src/arkode/fmod_int32/farkode_mod.c @@ -1561,6 +1561,22 @@ SWIGEXPORT int _wrap_FARKodeWriteParameters(void *farg1, void *farg2) { } +SWIGEXPORT int _wrap_FARKodeGetStageIndex(void *farg1, int *farg2, int *farg3) { + int fresult ; + void *arg1 = (void *) 0 ; + int *arg2 = (int *) 0 ; + int *arg3 = (int *) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (int *)(farg2); + arg3 = (int *)(farg3); + result = (int)ARKodeGetStageIndex(arg1,arg2,arg3); + fresult = (int)(result); + return fresult; +} + + SWIGEXPORT int _wrap_FARKodeGetNumExpSteps(void *farg1, long *farg2) { int fresult ; void *arg1 = (void *) 0 ; diff --git a/src/arkode/fmod_int32/farkode_mod.f90 b/src/arkode/fmod_int32/farkode_mod.f90 index 77ef9123e0..51985e481b 100644 --- a/src/arkode/fmod_int32/farkode_mod.f90 +++ b/src/arkode/fmod_int32/farkode_mod.f90 @@ -213,6 +213,7 @@ module farkode_mod public :: FARKodePrintAllStats public :: FARKodeGetReturnFlagName public :: FARKodeWriteParameters + public :: FARKodeGetStageIndex public :: FARKodeGetNumExpSteps public :: FARKodeGetNumAccSteps public :: FARKodeGetNumErrTestFails @@ -1299,6 +1300,16 @@ function swigc_FARKodeWriteParameters(farg1, farg2) & integer(C_INT) :: fresult end function +function swigc_FARKodeGetStageIndex(farg1, farg2, farg3) & +bind(C, name="_wrap_FARKodeGetStageIndex") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_PTR), value :: farg2 +type(C_PTR), value :: farg3 +integer(C_INT) :: fresult +end function + function swigc_FARKodeGetNumExpSteps(farg1, farg2) & bind(C, name="_wrap_FARKodeGetNumExpSteps") & result(fresult) @@ -4014,6 +4025,25 @@ function FARKodeWriteParameters(arkode_mem, fp) & swig_result = fresult end function +function FARKodeGetStageIndex(arkode_mem, stage, max_stages) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +integer(C_INT), dimension(*), target, intent(inout) :: stage +integer(C_INT), dimension(*), target, intent(inout) :: max_stages +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_PTR) :: farg2 +type(C_PTR) :: farg3 + +farg1 = arkode_mem +farg2 = c_loc(stage(1)) +farg3 = c_loc(max_stages(1)) +fresult = swigc_FARKodeGetStageIndex(farg1, farg2, farg3) +swig_result = fresult +end function + function FARKodeGetNumExpSteps(arkode_mem, expsteps) & result(swig_result) use, intrinsic :: ISO_C_BINDING diff --git a/src/arkode/fmod_int64/farkode_mod.c b/src/arkode/fmod_int64/farkode_mod.c index 33370377a7..b59a4cdf35 100644 --- a/src/arkode/fmod_int64/farkode_mod.c +++ b/src/arkode/fmod_int64/farkode_mod.c @@ -1561,6 +1561,22 @@ SWIGEXPORT int _wrap_FARKodeWriteParameters(void *farg1, void *farg2) { } +SWIGEXPORT int _wrap_FARKodeGetStageIndex(void *farg1, int *farg2, int *farg3) { + int fresult ; + void *arg1 = (void *) 0 ; + int *arg2 = (int *) 0 ; + int *arg3 = (int *) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (int *)(farg2); + arg3 = (int *)(farg3); + result = (int)ARKodeGetStageIndex(arg1,arg2,arg3); + fresult = (int)(result); + return fresult; +} + + SWIGEXPORT int _wrap_FARKodeGetNumExpSteps(void *farg1, long *farg2) { int fresult ; void *arg1 = (void *) 0 ; diff --git a/src/arkode/fmod_int64/farkode_mod.f90 b/src/arkode/fmod_int64/farkode_mod.f90 index cdc14241a6..622e4970ee 100644 --- a/src/arkode/fmod_int64/farkode_mod.f90 +++ b/src/arkode/fmod_int64/farkode_mod.f90 @@ -213,6 +213,7 @@ module farkode_mod public :: FARKodePrintAllStats public :: FARKodeGetReturnFlagName public :: FARKodeWriteParameters + public :: FARKodeGetStageIndex public :: FARKodeGetNumExpSteps public :: FARKodeGetNumAccSteps public :: FARKodeGetNumErrTestFails @@ -1299,6 +1300,16 @@ function swigc_FARKodeWriteParameters(farg1, farg2) & integer(C_INT) :: fresult end function +function swigc_FARKodeGetStageIndex(farg1, farg2, farg3) & +bind(C, name="_wrap_FARKodeGetStageIndex") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_PTR), value :: farg2 +type(C_PTR), value :: farg3 +integer(C_INT) :: fresult +end function + function swigc_FARKodeGetNumExpSteps(farg1, farg2) & bind(C, name="_wrap_FARKodeGetNumExpSteps") & result(fresult) @@ -4014,6 +4025,25 @@ function FARKodeWriteParameters(arkode_mem, fp) & swig_result = fresult end function +function FARKodeGetStageIndex(arkode_mem, stage, max_stages) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +integer(C_INT), dimension(*), target, intent(inout) :: stage +integer(C_INT), dimension(*), target, intent(inout) :: max_stages +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_PTR) :: farg2 +type(C_PTR) :: farg3 + +farg1 = arkode_mem +farg2 = c_loc(stage(1)) +farg3 = c_loc(max_stages(1)) +fresult = swigc_FARKodeGetStageIndex(farg1, farg2, farg3) +swig_result = fresult +end function + function FARKodeGetNumExpSteps(arkode_mem, expsteps) & result(swig_result) use, intrinsic :: ISO_C_BINDING From 8932ad20e1002fd92cb72e596e32c3c4e594ba0a Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 20 Jan 2026 08:13:58 -0500 Subject: [PATCH 046/298] Updated logging output files to account for fixes from PR --- .../test_logging_arkode_arkstep_lvl3_2_0.out | 2 +- .../test_logging_arkode_arkstep_lvl4_2_0.out | 110 +++++++++--------- .../test_logging_arkode_arkstep_lvl5_2_0.out | 110 +++++++++--------- .../test_logging_arkode_erkstep_lvl3.out | 2 +- .../test_logging_arkode_erkstep_lvl4.out | 2 +- .../test_logging_arkode_erkstep_lvl5.out | 2 +- 6 files changed, 114 insertions(+), 114 deletions(-) diff --git a/test/unit_tests/logging/test_logging_arkode_arkstep_lvl3_2_0.out b/test/unit_tests/logging/test_logging_arkode_arkstep_lvl3_2_0.out index 8fce8828db..297b941643 100644 --- a/test/unit_tests/logging/test_logging_arkode_arkstep_lvl3_2_0.out +++ b/test/unit_tests/logging/test_logging_arkode_arkstep_lvl3_2_0.out @@ -151,7 +151,7 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = failed solve, nflag = 4 [INFO][rank 0][ARKodeEvolve][end-step-attempt] status = failed step, kflag = 3 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 0.000102986025609508, h = 0.00872354880550418 -[INFO][rank 0][arkStep_TakeStep_Z][begin-stages-list] stage = 0, implicit = 0, tcur = 0.0349971812476262 +[INFO][rank 0][arkStep_TakeStep_Z][begin-stages-list] stage = 0, implicit = 0, tcur = 0.000102986025609508 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success [INFO][rank 0][arkStep_TakeStep_Z][begin-stages-list] stage = 1, implicit = 1, tcur = 0.00225770258056904 [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 diff --git a/test/unit_tests/logging/test_logging_arkode_arkstep_lvl4_2_0.out b/test/unit_tests/logging/test_logging_arkode_arkstep_lvl4_2_0.out index 6a03795e08..c10d4470d8 100644 --- a/test/unit_tests/logging/test_logging_arkode_arkstep_lvl4_2_0.out +++ b/test/unit_tests/logging/test_logging_arkode_arkstep_lvl4_2_0.out @@ -11,7 +11,7 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 2.368628977311079e-07 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 2.36862897731108e-07 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 1 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -19,7 +19,7 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.04444466957300736 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.0444446695730074 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 1 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -27,7 +27,7 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.02805399819163158 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.0280539981916316 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 1 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -35,7 +35,7 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.001406013957715032 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.00140601395771503 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 1 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -43,10 +43,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.1224890674762599 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.12248906747626 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.902425639273363e-06 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.90242563927336e-06 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 2 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -54,10 +54,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.2499781580918246 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.249978158091825 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 3.882514578718288e-06 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 3.88251457871829e-06 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 2 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -75,10 +75,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 49.82271729976932 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 49.8227172997693 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.2956232485070396 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.29562324850704 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 2 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -86,13 +86,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 5179.025878904596 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 5179.0258789046 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 27.29066232027397 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 27.290662320274 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.2366478153542284 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.236647815354228 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 3 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -100,13 +100,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 3287.043206145228 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 3287.04320614523 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 17.35218233001884 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 17.3521823300188 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.1504990065556158 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.150499006555616 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 3 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -114,13 +114,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 183.4805349869565 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 183.480534986956 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.949510444094288 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.008151952120696986 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.00815195212069699 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 3 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -128,13 +128,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 14082.12983346261 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 14082.1298334626 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 73.58832716354519 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 73.5883271635452 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.6375336463716402 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.63753364637164 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 3 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -142,28 +142,28 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 28418.29689990445 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 28418.2968999044 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 147.0786804551797 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 147.07868045518 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 1.274537671846175 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 1.27453767184617 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = failed max iterations [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = failed, retval = 902, iters = 3 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = failed solve, nflag = 4 [INFO][rank 0][ARKodeEvolve][end-step-attempt] status = failed step, kflag = 3 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 0.000102986025609508, h = 0.00872354880550418 -[INFO][rank 0][arkStep_TakeStep_Z][begin-stages-list] stage = 0, implicit = 0, tcur = 0.0349971812476262 +[INFO][rank 0][arkStep_TakeStep_Z][begin-stages-list] stage = 0, implicit = 0, tcur = 0.000102986025609508 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success [INFO][rank 0][arkStep_TakeStep_Z][begin-stages-list] stage = 1, implicit = 1, tcur = 0.00225770258056904 [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 10.58935120480511 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 10.5893512048051 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.01407057164511679 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.0140705716451168 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 2 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -171,10 +171,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 337.1424764168714 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 337.142476416871 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.4439882604012199 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.44398826040122 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.000960893019833006 @@ -185,7 +185,7 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 215.7735373359566 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 215.773537335957 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.28421082324341 @@ -196,10 +196,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 13.26229169917964 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 13.2622916991796 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.01738724621164174 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.0173872462116417 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 2 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -207,13 +207,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 908.7281152253486 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 908.728115225349 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.195654290450199 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.1956542904502 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.002587105575138711 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.00258710557513871 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 3 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -221,13 +221,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 1835.650895677526 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 1835.65089567753 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 2.413982829863592 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 2.41398282986359 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.005223580298499187 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.00522358029849919 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 3 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -245,13 +245,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 897.5749133370384 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 897.574913337038 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.180074794486456 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.18007479448646 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.002550777110156022 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.00255077711015602 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 3 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -262,10 +262,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 1848.85296187574 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 2.429372959128611 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 2.42937295912861 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.005251431903621707 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.00525143190362171 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 3 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -273,13 +273,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 1417.296763477091 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 1417.29676347709 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.862895008578912 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.86289500857891 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.004026924078246891 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.00402692407824689 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 3 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -287,13 +287,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 282.7028212917262 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 282.702821291726 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.3717837407954644 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.371783740795464 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.0008035691046095763 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.000803569104609576 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 3 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -301,13 +301,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 3414.225866099896 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 3414.2258660999 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 4.480817707236493 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 4.48081770723649 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.009685454223700348 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.00968545422370035 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 3 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -315,13 +315,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 5409.236485116237 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 5409.23648511624 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 7.089262220679211 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 7.08926222067921 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.01532391809845227 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.0153239180984523 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 3 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success diff --git a/test/unit_tests/logging/test_logging_arkode_arkstep_lvl5_2_0.out b/test/unit_tests/logging/test_logging_arkode_arkstep_lvl5_2_0.out index 0b56cd2a4f..9c5f86ccdc 100644 --- a/test/unit_tests/logging/test_logging_arkode_arkstep_lvl5_2_0.out +++ b/test/unit_tests/logging/test_logging_arkode_arkstep_lvl5_2_0.out @@ -26,7 +26,7 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 2.368628977311079e-07 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 2.36862897731108e-07 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = 2.358974779413975e-13 @@ -52,7 +52,7 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.04444466957300736 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.0444446695730074 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -1.914859318478439e-10 @@ -78,7 +78,7 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.02805399819163158 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.0280539981916316 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -1.208092473957022e-10 @@ -104,7 +104,7 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.001406013957715032 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.00140601395771503 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -6.206706558584390e-12 @@ -130,10 +130,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.1224890674762599 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.12248906747626 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.902425639273363e-06 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.90242563927336e-06 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -5.307088621598873e-10 @@ -159,10 +159,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.2499781580918246 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.249978158091825 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 3.882514578718288e-06 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 3.88251457871829e-06 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -1.082482978900431e-09 @@ -210,10 +210,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 49.82271729976932 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 49.8227172997693 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.2956232485070396 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.29562324850704 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = 8.849978747663506e-06 @@ -239,13 +239,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 5179.025878904596 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 5179.0258789046 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 27.29066232027397 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 27.290662320274 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.2366478153542284 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.236647815354228 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -1.159790807607275e-05 @@ -271,13 +271,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 3287.043206145228 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 3287.04320614523 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 17.35218233001884 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 17.3521823300188 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.1504990065556158 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.150499006555616 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -5.119582425676298e-06 @@ -303,13 +303,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 183.4805349869565 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 183.480534986956 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.949510444094288 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.008151952120696986 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.00815195212069699 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -6.152611898849060e-06 @@ -335,13 +335,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 14082.12983346261 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 14082.1298334626 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 73.58832716354519 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 73.5883271635452 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.6375336463716402 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.63753364637164 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -7.277552643022212e-05 @@ -367,13 +367,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 28418.29689990445 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 28418.2968999044 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 147.0786804551797 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 147.07868045518 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 1.274537671846175 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 1.27453767184617 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = failed max iterations [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -1.250496878192964e-04 @@ -382,7 +382,7 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = failed solve, nflag = 4 [INFO][rank 0][ARKodeEvolve][end-step-attempt] status = failed step, kflag = 3 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 0.000102986025609508, h = 0.00872354880550418 -[INFO][rank 0][arkStep_TakeStep_Z][begin-stages-list] stage = 0, implicit = 0, tcur = 0.0349971812476262 +[INFO][rank 0][arkStep_TakeStep_Z][begin-stages-list] stage = 0, implicit = 0, tcur = 0.000102986025609508 [DEBUG][rank 0][arkStep_TakeStep_Z][explicit stage] z_0(:) = 1.224744870309106e+00 1.732050195224277e+00 @@ -403,10 +403,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 10.58935120480511 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 10.5893512048051 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.01407057164511679 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.0140705716451168 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = 9.754363006809573e-08 @@ -432,10 +432,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 337.1424764168714 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 337.142476416871 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.4439882604012199 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.44398826040122 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.000960893019833006 @@ -464,7 +464,7 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 215.7735373359566 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 215.773537335957 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.28421082324341 @@ -493,10 +493,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 13.26229169917964 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 13.2622916991796 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.01738724621164174 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.0173872462116417 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -1.419827347970335e-07 @@ -522,13 +522,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 908.7281152253486 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 908.728115225349 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.195654290450199 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.1956542904502 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.002587105575138711 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.00258710557513871 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -4.111601314188560e-06 @@ -554,13 +554,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 1835.650895677526 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 1835.65089567753 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 2.413982829863592 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 2.41398282986359 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.005223580298499187 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.00522358029849919 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -7.950371969264979e-06 @@ -608,13 +608,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 897.5749133370384 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 897.574913337038 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.180074794486456 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.18007479448646 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.002550777110156022 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.00255077711015602 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -3.740554085189258e-06 @@ -643,10 +643,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 1848.85296187574 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 2.429372959128611 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 2.42937295912861 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.005251431903621707 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.00525143190362171 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -7.837552977595153e-06 @@ -672,13 +672,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 1417.296763477091 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 1417.29676347709 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.862895008578912 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.86289500857891 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.004026924078246891 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.00402692407824689 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -5.993980462758778e-06 @@ -704,13 +704,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 282.7028212917262 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 282.702821291726 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.3717837407954644 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.371783740795464 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.0008035691046095763 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.000803569104609576 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -1.306434064417920e-06 @@ -736,13 +736,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 3414.225866099896 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 3414.2258660999 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 4.480817707236493 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 4.48081770723649 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.009685454223700348 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.00968545422370035 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -1.498318595181932e-05 @@ -768,13 +768,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 5409.236485116237 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 5409.23648511624 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 7.089262220679211 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 7.08926222067921 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.01532391809845227 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.0153239180984523 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -2.348389429454253e-05 diff --git a/test/unit_tests/logging/test_logging_arkode_erkstep_lvl3.out b/test/unit_tests/logging/test_logging_arkode_erkstep_lvl3.out index e9b7f61632..60dc9b1b5e 100644 --- a/test/unit_tests/logging/test_logging_arkode_erkstep_lvl3.out +++ b/test/unit_tests/logging/test_logging_arkode_erkstep_lvl3.out @@ -32,7 +32,7 @@ Start ERKStep Logging test [INFO][rank 0][erkStep_TakeStep][end-compute-solution] status = success [INFO][rank 0][ARKodeEvolve][end-step-attempt] status = failed error test, dsm = 1.00314609906058, kflag = 5 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 0.000102986025609508, h = 0.015960659313935 -[INFO][rank 0][erkStep_TakeStep][begin-stages-list] stage = 0, tcur = 0.0162375294442678 +[INFO][rank 0][erkStep_TakeStep][begin-stages-list] stage = 0, tcur = 0.000102986025609508 [INFO][rank 0][erkStep_TakeStep][end-stages-list] status = success [INFO][rank 0][erkStep_TakeStep][begin-stages-list] stage = 1, tcur = 0.0064872497511835 [INFO][rank 0][erkStep_TakeStep][end-stages-list] status = success diff --git a/test/unit_tests/logging/test_logging_arkode_erkstep_lvl4.out b/test/unit_tests/logging/test_logging_arkode_erkstep_lvl4.out index e091e74b77..a21a5aebaa 100644 --- a/test/unit_tests/logging/test_logging_arkode_erkstep_lvl4.out +++ b/test/unit_tests/logging/test_logging_arkode_erkstep_lvl4.out @@ -38,7 +38,7 @@ Start ERKStep Logging test [DEBUG][rank 0][arkAdapt][new-step-eta] eta = 0.989222867966487 [INFO][rank 0][ARKodeEvolve][end-step-attempt] status = failed error test, dsm = 1.00314609906058, kflag = 5 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 0.000102986025609508, h = 0.015960659313935 -[INFO][rank 0][erkStep_TakeStep][begin-stages-list] stage = 0, tcur = 0.0162375294442678 +[INFO][rank 0][erkStep_TakeStep][begin-stages-list] stage = 0, tcur = 0.000102986025609508 [INFO][rank 0][erkStep_TakeStep][end-stages-list] status = success [INFO][rank 0][erkStep_TakeStep][begin-stages-list] stage = 1, tcur = 0.0064872497511835 [INFO][rank 0][erkStep_TakeStep][end-stages-list] status = success diff --git a/test/unit_tests/logging/test_logging_arkode_erkstep_lvl5.out b/test/unit_tests/logging/test_logging_arkode_erkstep_lvl5.out index 280041af97..7af00ffdd5 100644 --- a/test/unit_tests/logging/test_logging_arkode_erkstep_lvl5.out +++ b/test/unit_tests/logging/test_logging_arkode_erkstep_lvl5.out @@ -80,7 +80,7 @@ Start ERKStep Logging test [DEBUG][rank 0][arkAdapt][new-step-eta] eta = 0.989222867966487 [INFO][rank 0][ARKodeEvolve][end-step-attempt] status = failed error test, dsm = 1.00314609906058, kflag = 5 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 0.000102986025609508, h = 0.015960659313935 -[INFO][rank 0][erkStep_TakeStep][begin-stages-list] stage = 0, tcur = 0.0162375294442678 +[INFO][rank 0][erkStep_TakeStep][begin-stages-list] stage = 0, tcur = 0.000102986025609508 [DEBUG][rank 0][erkStep_TakeStep][stage] z_0(:) = 1.224744870309106e+00 1.732050195224277e+00 From 5894f8c2595e791149a80edcc21188bd5bca814c Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 20 Jan 2026 08:18:38 -0500 Subject: [PATCH 047/298] Updated answers submodule commit --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index 5ab7c953ad..4c270c9a6f 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 5ab7c953ad8c7831ea85e5711519baf79e94c9be +Subproject commit 4c270c9a6fd01894e5b7629dc6d6ccd82cf71513 From b1be627cd50d2b74d84c1b9080bb1b0b0a467fe0 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 20 Jan 2026 08:21:32 -0500 Subject: [PATCH 048/298] Added missing 'static' --- src/arkode/arkode_splittingstep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arkode/arkode_splittingstep.c b/src/arkode/arkode_splittingstep.c index 02b7cc722a..155b6f954d 100644 --- a/src/arkode/arkode_splittingstep.c +++ b/src/arkode/arkode_splittingstep.c @@ -463,7 +463,7 @@ static int splittingStep_SetOrder(ARKodeMem ark_mem, int order) /*--------------------------------------------------------------- Returns the current stage index and number of stages ---------------------------------------------------------------*/ -int splittingStep_GetStageIndex(ARKodeMem ark_mem, int* istage, int* num_stages) +static int splittingStep_GetStageIndex(ARKodeMem ark_mem, int* istage, int* num_stages) { ARKodeSplittingStepMem step_mem; int retval = splittingStep_AccessStepMem(ark_mem, __func__, &step_mem); From 1fe5e364000718ff1ef2b15d889811639d2956c3 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 20 Jan 2026 08:29:26 -0500 Subject: [PATCH 049/298] Formatting --- src/arkode/arkode_splittingstep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/arkode/arkode_splittingstep.c b/src/arkode/arkode_splittingstep.c index 155b6f954d..28dea7b132 100644 --- a/src/arkode/arkode_splittingstep.c +++ b/src/arkode/arkode_splittingstep.c @@ -463,7 +463,8 @@ static int splittingStep_SetOrder(ARKodeMem ark_mem, int order) /*--------------------------------------------------------------- Returns the current stage index and number of stages ---------------------------------------------------------------*/ -static int splittingStep_GetStageIndex(ARKodeMem ark_mem, int* istage, int* num_stages) +static int splittingStep_GetStageIndex(ARKodeMem ark_mem, int* istage, + int* num_stages) { ARKodeSplittingStepMem step_mem; int retval = splittingStep_AccessStepMem(ark_mem, __func__, &step_mem); From a8554e4841092c7aa8a33a234633f3fde261d618 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 20 Jan 2026 08:43:02 -0500 Subject: [PATCH 050/298] Fixed answer files branch (the one I created did not include changes from the last upstream PR) --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index 4c270c9a6f..fe51f357f9 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 4c270c9a6fd01894e5b7629dc6d6ccd82cf71513 +Subproject commit fe51f357f9e862635369baaa0f9c9a7ad4138f4e From 443474736a5eb43c1e2a551941a85e9eae482f99 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 20 Jan 2026 09:14:37 -0500 Subject: [PATCH 051/298] Updated answers submodule commit --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index fe51f357f9..4e43dcb45e 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit fe51f357f9e862635369baaa0f9c9a7ad4138f4e +Subproject commit 4e43dcb45e7d51e3224bfea93106c766bcc6d82c From 187c03e44de6ca9ee4631ebe13d5b43f7e11558d Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 20 Jan 2026 11:24:47 -0500 Subject: [PATCH 052/298] Updated answers submodule commit --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index 4e43dcb45e..f5814f2adc 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 4e43dcb45e7d51e3224bfea93106c766bcc6d82c +Subproject commit f5814f2adcd0af4b4437d5f23b0ec49a73c24246 From 2f6a2516a78f5c402b8f2d62410330d2e94d03bc Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 27 Jan 2026 08:54:20 -0500 Subject: [PATCH 053/298] Updated ARKODE time stepping attempt loop to initialize (tcur,ycur) with the last-accepted-step before starting the step attempt --- src/arkode/arkode.c | 4 ++++ src/arkode/arkode_splittingstep.c | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index b5df622436..9e67e39f4d 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -904,6 +904,10 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, "step = %li, tn = " SUN_FORMAT_G ", h = " SUN_FORMAT_G, ark_mem->nst + 1, ark_mem->tn, ark_mem->h); + /* fill (tcur,ycur) with the last accepted step solution */ + ark_mem->tcur = ark_mem->tn; + N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + /* call the user-supplied step preprocessing function (if it exists) */ if (ark_mem->PreProcessStep != NULL) { diff --git a/src/arkode/arkode_splittingstep.c b/src/arkode/arkode_splittingstep.c index 11936b4826..ba7fa58b28 100644 --- a/src/arkode/arkode_splittingstep.c +++ b/src/arkode/arkode_splittingstep.c @@ -312,7 +312,6 @@ static int splittingStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, SUNLogInfo(ARK_LOGGER, "begin-sequential-methods-list", "sequential method = 0"); - N_VScale(ONE, ark_mem->yn, ark_mem->ycur); retval = splittingStep_SequentialMethod(ark_mem, step_mem, 0, ark_mem->ycur); SUNLogExtraDebugVec(ARK_LOGGER, "sequential state", ark_mem->ycur, "y_seq(:) ="); From bb04638166051b9a68046be2499bf89f7b93f24b Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 27 Jan 2026 09:05:11 -0500 Subject: [PATCH 054/298] Removed takestep-specific (tcur,ycur) initialization since it's now in arkode.c --- src/arkode/arkode_lsrkstep.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 7e6e357d05..086af3f439 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -579,10 +579,6 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) sunrealtype* cvals = step_mem->cvals; N_Vector* Xvecs = step_mem->Xvecs; - /* initialize the current solution */ - ark_mem->tcur = ark_mem->tn; - N_VScale(ONE, ark_mem->yn, ark_mem->ycur); - /* Compute dominant eigenvalue and update stats */ if (step_mem->dom_eig_update) { @@ -923,10 +919,6 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) sunrealtype* cvals = step_mem->cvals; N_Vector* Xvecs = step_mem->Xvecs; - /* Initialize the current solution */ - ark_mem->tcur = ark_mem->tn; - N_VScale(ONE, ark_mem->yn, ark_mem->ycur); - /* Compute dominant eigenvalue and update stats */ if (step_mem->dom_eig_update) { @@ -1238,10 +1230,6 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr sunrealtype* cvals = step_mem->cvals; N_Vector* Xvecs = step_mem->Xvecs; - /* Initialize the current solution */ - ark_mem->tcur = ark_mem->tn; - N_VScale(ONE, ark_mem->yn, ark_mem->ycur); - /* Initialize method coefficients */ const sunrealtype rs = (sunrealtype)step_mem->req_stages; const sunrealtype sm1inv = ONE / (rs - ONE); @@ -1487,10 +1475,6 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr sunrealtype* cvals = step_mem->cvals; N_Vector* Xvecs = step_mem->Xvecs; - /* Initialize the current solution */ - ark_mem->tcur = ark_mem->tn; - N_VScale(ONE, ark_mem->yn, ark_mem->ycur); - /* Initialize method coefficients */ const sunrealtype rs = (sunrealtype)step_mem->req_stages; const sunrealtype rn = SUNRsqrt(rs); @@ -1864,10 +1848,6 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr sunrealtype* cvals = step_mem->cvals; N_Vector* Xvecs = step_mem->Xvecs; - /* Initialize the current solution */ - ark_mem->tcur = ark_mem->tn; - N_VScale(ONE, ark_mem->yn, ark_mem->ycur); - /* Initialize method coefficients */ const sunrealtype rs = SUN_RCONST(4.0); const sunrealtype hp5 = ark_mem->h * SUN_RCONST(0.5); @@ -2140,10 +2120,6 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt sunrealtype* cvals = step_mem->cvals; N_Vector* Xvecs = step_mem->Xvecs; - /* Initialize the current solution */ - ark_mem->tcur = ark_mem->tn; - N_VScale(ONE, ark_mem->yn, ark_mem->ycur); - /* Initialize method coefficients */ const sunrealtype hsixth = ark_mem->h / SIX; const sunrealtype hfifth = ark_mem->h / FIVE; From ec3ccab8fbd184ad693e4b41da91a38e62485d67 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 27 Jan 2026 09:10:23 -0500 Subject: [PATCH 055/298] Removed takestep-specific (tcur,ycur) initialization since it's now in arkode.c --- src/arkode/arkode_arkstep.c | 3 --- src/arkode/arkode_erkstep.c | 1 - src/arkode/arkode_mristep.c | 9 --------- 3 files changed, 13 deletions(-) diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index 7139d534cb..2e0922750f 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1710,9 +1710,6 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) *nflagPtr = ARK_SUCCESS; } - /* initialize the current solution */ - N_VScale(ONE, ark_mem->yn, ark_mem->ycur); - /* call nonlinear solver setup if it exists */ if (step_mem->NLS) { diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index d35d222bbe..fa1cf6721e 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -786,7 +786,6 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (!(ark_mem->fn_is_current)) { mode = (ark_mem->initsetup) ? ARK_FULLRHS_START : ARK_FULLRHS_END; - N_VScale(ONE, ark_mem->yn, ark_mem->ycur); retval = ark_mem->step_fullrhs(ark_mem, ark_mem->tn, ark_mem->ycur, ark_mem->fn, mode); if (retval) diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index e7f692269e..f264643ff3 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1816,9 +1816,6 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt do_embedding = !ark_mem->fixedstep || (ark_mem->AccumErrorType != ARK_ACCUMERROR_NONE); - /* initialize the current solution */ - N_VScale(ONE, ark_mem->yn, ark_mem->ycur); - /* if MRI adaptivity is enabled: reset fast accumulated error, and send appropriate control parameter to the fast integrator */ adapt_type = SUNAdaptController_GetType(ark_mem->hadapt_mem->hcontroller); @@ -2365,9 +2362,6 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) ytilde = ark_mem->tempv4; ytemp = ark_mem->tempv2; - /* initialize the current solution */ - N_VScale(ONE, ark_mem->yn, ark_mem->ycur); - /* if MRI adaptivity is enabled: reset fast accumulated error, and send appropriate control parameter to the fast integrator */ adapt_type = SUNAdaptController_GetType(ark_mem->hadapt_mem->hcontroller); @@ -2847,9 +2841,6 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* initial time for step */ t0 = ark_mem->tn; - /* initialize the current solution */ - N_VScale(ONE, ark_mem->yn, ark_mem->ycur); - /* if MRI adaptivity is enabled: reset fast accumulated error, and send appropriate control parameter to the fast integrator */ adapt_type = SUNAdaptController_GetType(ark_mem->hadapt_mem->hcontroller); From 2eff56a379416eace5582b9793e79419c946413a Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 27 Jan 2026 09:26:30 -0500 Subject: [PATCH 056/298] Added Get routines to return the last saved time and state, (tn,yn), reached by ARKODE, as these may differ from (tcur,ycur) that are available using ARKodeGetCurrentX --- .../guide/source/Usage/User_callable.rst | 34 ++++++++++++ include/arkode/arkode.h | 3 ++ src/arkode/arkode_io.c | 40 ++++++++++++++ src/arkode/fmod_int32/farkode_mod.c | 28 ++++++++++ src/arkode/fmod_int32/farkode_mod.f90 | 52 +++++++++++++++++++ src/arkode/fmod_int64/farkode_mod.c | 28 ++++++++++ src/arkode/fmod_int64/farkode_mod.f90 | 52 +++++++++++++++++++ 7 files changed, 237 insertions(+) diff --git a/doc/arkode/guide/source/Usage/User_callable.rst b/doc/arkode/guide/source/Usage/User_callable.rst index 39d3f7d05d..4679e75af4 100644 --- a/doc/arkode/guide/source/Usage/User_callable.rst +++ b/doc/arkode/guide/source/Usage/User_callable.rst @@ -3622,6 +3622,8 @@ Actual initial time step size used :c:func:`ARKodeGetActualI Step size used for the last successful step :c:func:`ARKodeGetLastStep` Step size to be attempted on the next step :c:func:`ARKodeGetCurrentStep` Integration direction, e.g., forward or backward :c:func:`ARKodeGetStepDirection` +Last saved time reached by the solver :c:func:`ARKodeGetLastTime` +Last saved solution reached by the solver :c:func:`ARKodeGetLastState` Current internal time reached by the solver :c:func:`ARKodeGetCurrentTime` Current internal solution reached by the solver :c:func:`ARKodeGetCurrentState` Current :math:`\gamma` value used by the solver :c:func:`ARKodeGetCurrentGamma` @@ -3745,6 +3747,38 @@ Current stage index, and total number of stages :c:func:`ARKodeGetStageIn .. versionadded:: 6.2.0 +.. c:function:: int ARKodeGetLastTime(void* arkode_mem, sunrealtype* tn) + + Returns the last saved time reached by the solver. + + :param arkode_mem: pointer to the ARKODE memory block. + :param tn: last saved time reached. + + :retval ARK_SUCCESS: the function exited successfully. + :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. + + .. versionadded:: x.y.z + + +.. c:function:: int ARKodeGetLastState(void *arkode_mem, N_Vector *yn) + + Returns the last saved solution reached by the solver. + + :param arkode_mem: pointer to the ARKODE memory block. + :param yn: last saved solution. + + :retval ARK_SUCCESS: the function exited successfully. + :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. + + .. note:: + + Users should exercise extreme caution when using this function, + as altering values of *yn* may lead to undesirable behavior, depending + on the particular use case and on when this routine is called. + + .. versionadded:: x.y.z + + .. c:function:: int ARKodeGetCurrentTime(void* arkode_mem, sunrealtype* tcur) Returns the current internal time reached by the solver. diff --git a/include/arkode/arkode.h b/include/arkode/arkode.h index bf3bfcda13..2de917a47a 100644 --- a/include/arkode/arkode.h +++ b/include/arkode/arkode.h @@ -406,6 +406,9 @@ SUNDIALS_EXPORT int ARKodeGetAccumulatedError(void* arkode_mem, /* Optional output functions (implicit solver) */ SUNDIALS_EXPORT int ARKodeGetNumLinSolvSetups(void* arkode_mem, long int* nlinsetups); +SUNDIALS_EXPORT int ARKodeGetLastTime(void* arkode_mem, sunrealtype* tn); +SUNDIALS_EXPORT int ARKodeGetLastState(void* arkode_mem, + N_Vector* state); // nb::rv_policy::reference SUNDIALS_EXPORT int ARKodeGetCurrentTime(void* arkode_mem, sunrealtype* tcur); SUNDIALS_EXPORT int ARKodeGetCurrentState(void* arkode_mem, N_Vector* state); // nb::rv_policy::reference diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index 4e7c859692..8e5d203531 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -2569,6 +2569,46 @@ int ARKodeGetEstLocalErrors(void* arkode_mem, N_Vector ele) } } +/*--------------------------------------------------------------- + ARKodeGetLastTime: + + Returns the last saved value of the independent variable + ---------------------------------------------------------------*/ +int ARKodeGetLastTime(void* arkode_mem, sunrealtype* tn) +{ + ARKodeMem ark_mem; + if (arkode_mem == NULL) + { + arkProcessError(NULL, ARK_MEM_NULL, __LINE__, __func__, __FILE__, + MSG_ARK_NO_MEM); + return (ARK_MEM_NULL); + } + ark_mem = (ARKodeMem)arkode_mem; + + *tcur = ark_mem->tn; + return (ARK_SUCCESS); +} + +/*--------------------------------------------------------------- + ARKodeGetLastState: + + Returns the last saved time step solution. + ---------------------------------------------------------------*/ +int ARKodeGetLasState(void* arkode_mem, N_Vector* state) +{ + ARKodeMem ark_mem; + if (arkode_mem == NULL) + { + arkProcessError(NULL, ARK_MEM_NULL, __LINE__, __func__, __FILE__, + MSG_ARK_NO_MEM); + return (ARK_MEM_NULL); + } + ark_mem = (ARKodeMem)arkode_mem; + + *state = ark_mem->yn; + return (ARK_SUCCESS); +} + /*--------------------------------------------------------------- ARKodeGetCurrentTime: diff --git a/src/arkode/fmod_int32/farkode_mod.c b/src/arkode/fmod_int32/farkode_mod.c index 0eaa9703d6..034215a894 100644 --- a/src/arkode/fmod_int32/farkode_mod.c +++ b/src/arkode/fmod_int32/farkode_mod.c @@ -1725,6 +1725,34 @@ SWIGEXPORT int _wrap_FARKodeGetNumLinSolvSetups(void *farg1, long *farg2) { } +SWIGEXPORT int _wrap_FARKodeGetLastTime(void *farg1, double *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + sunrealtype *arg2 = (sunrealtype *) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (sunrealtype *)(farg2); + result = (int)ARKodeGetLastTime(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FARKodeGetLastState(void *farg1, void *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + N_Vector *arg2 = (N_Vector *) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (N_Vector *)(farg2); + result = (int)ARKodeGetLastState(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + SWIGEXPORT int _wrap_FARKodeGetCurrentTime(void *farg1, double *farg2) { int fresult ; void *arg1 = (void *) 0 ; diff --git a/src/arkode/fmod_int32/farkode_mod.f90 b/src/arkode/fmod_int32/farkode_mod.f90 index 3f6a1b744c..75d7d7dfbb 100644 --- a/src/arkode/fmod_int32/farkode_mod.f90 +++ b/src/arkode/fmod_int32/farkode_mod.f90 @@ -224,6 +224,8 @@ module farkode_mod public :: FARKodeGetStepStats public :: FARKodeGetAccumulatedError public :: FARKodeGetNumLinSolvSetups + public :: FARKodeGetLastTime + public :: FARKodeGetLastState public :: FARKodeGetCurrentTime public :: FARKodeGetCurrentState public :: FARKodeGetCurrentGamma @@ -1404,6 +1406,24 @@ function swigc_FARKodeGetNumLinSolvSetups(farg1, farg2) & integer(C_INT) :: fresult end function +function swigc_FARKodeGetLastTime(farg1, farg2) & +bind(C, name="_wrap_FARKodeGetLastTime") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_PTR), value :: farg2 +integer(C_INT) :: fresult +end function + +function swigc_FARKodeGetLastState(farg1, farg2) & +bind(C, name="_wrap_FARKodeGetLastState") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_PTR), value :: farg2 +integer(C_INT) :: fresult +end function + function swigc_FARKodeGetCurrentTime(farg1, farg2) & bind(C, name="_wrap_FARKodeGetCurrentTime") & result(fresult) @@ -4216,6 +4236,38 @@ function FARKodeGetNumLinSolvSetups(arkode_mem, nlinsetups) & swig_result = fresult end function +function FARKodeGetLastTime(arkode_mem, tn) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +real(C_DOUBLE), dimension(*), target, intent(inout) :: tn +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_PTR) :: farg2 + +farg1 = arkode_mem +farg2 = c_loc(tn(1)) +fresult = swigc_FARKodeGetLastTime(farg1, farg2) +swig_result = fresult +end function + +function FARKodeGetLastState(arkode_mem, state) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +type(C_PTR) :: state +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_PTR) :: farg2 + +farg1 = arkode_mem +farg2 = state +fresult = swigc_FARKodeGetLastState(farg1, farg2) +swig_result = fresult +end function + function FARKodeGetCurrentTime(arkode_mem, tcur) & result(swig_result) use, intrinsic :: ISO_C_BINDING diff --git a/src/arkode/fmod_int64/farkode_mod.c b/src/arkode/fmod_int64/farkode_mod.c index b59a4cdf35..8d7d28e238 100644 --- a/src/arkode/fmod_int64/farkode_mod.c +++ b/src/arkode/fmod_int64/farkode_mod.c @@ -1725,6 +1725,34 @@ SWIGEXPORT int _wrap_FARKodeGetNumLinSolvSetups(void *farg1, long *farg2) { } +SWIGEXPORT int _wrap_FARKodeGetLastTime(void *farg1, double *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + sunrealtype *arg2 = (sunrealtype *) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (sunrealtype *)(farg2); + result = (int)ARKodeGetLastTime(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + +SWIGEXPORT int _wrap_FARKodeGetLastState(void *farg1, void *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + N_Vector *arg2 = (N_Vector *) 0 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (N_Vector *)(farg2); + result = (int)ARKodeGetLastState(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + SWIGEXPORT int _wrap_FARKodeGetCurrentTime(void *farg1, double *farg2) { int fresult ; void *arg1 = (void *) 0 ; diff --git a/src/arkode/fmod_int64/farkode_mod.f90 b/src/arkode/fmod_int64/farkode_mod.f90 index 34674d979c..6900824bb5 100644 --- a/src/arkode/fmod_int64/farkode_mod.f90 +++ b/src/arkode/fmod_int64/farkode_mod.f90 @@ -224,6 +224,8 @@ module farkode_mod public :: FARKodeGetStepStats public :: FARKodeGetAccumulatedError public :: FARKodeGetNumLinSolvSetups + public :: FARKodeGetLastTime + public :: FARKodeGetLastState public :: FARKodeGetCurrentTime public :: FARKodeGetCurrentState public :: FARKodeGetCurrentGamma @@ -1404,6 +1406,24 @@ function swigc_FARKodeGetNumLinSolvSetups(farg1, farg2) & integer(C_INT) :: fresult end function +function swigc_FARKodeGetLastTime(farg1, farg2) & +bind(C, name="_wrap_FARKodeGetLastTime") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_PTR), value :: farg2 +integer(C_INT) :: fresult +end function + +function swigc_FARKodeGetLastState(farg1, farg2) & +bind(C, name="_wrap_FARKodeGetLastState") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +type(C_PTR), value :: farg2 +integer(C_INT) :: fresult +end function + function swigc_FARKodeGetCurrentTime(farg1, farg2) & bind(C, name="_wrap_FARKodeGetCurrentTime") & result(fresult) @@ -4216,6 +4236,38 @@ function FARKodeGetNumLinSolvSetups(arkode_mem, nlinsetups) & swig_result = fresult end function +function FARKodeGetLastTime(arkode_mem, tn) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +real(C_DOUBLE), dimension(*), target, intent(inout) :: tn +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_PTR) :: farg2 + +farg1 = arkode_mem +farg2 = c_loc(tn(1)) +fresult = swigc_FARKodeGetLastTime(farg1, farg2) +swig_result = fresult +end function + +function FARKodeGetLastState(arkode_mem, state) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +type(C_PTR) :: state +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +type(C_PTR) :: farg2 + +farg1 = arkode_mem +farg2 = state +fresult = swigc_FARKodeGetLastState(farg1, farg2) +swig_result = fresult +end function + function FARKodeGetCurrentTime(arkode_mem, tcur) & result(swig_result) use, intrinsic :: ISO_C_BINDING From 872b50ab48c6a7ad94a05e054bd18786c6130a11 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 27 Jan 2026 09:27:14 -0500 Subject: [PATCH 057/298] Formatting --- src/arkode/arkode_erkstep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index f1239e728b..f3e8d39f65 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -787,7 +787,7 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (!(ark_mem->fn_is_current)) { - mode = (ark_mem->initsetup) ? ARK_FULLRHS_START : ARK_FULLRHS_END; + mode = (ark_mem->initsetup) ? ARK_FULLRHS_START : ARK_FULLRHS_END; retval = ark_mem->step_fullrhs(ark_mem, ark_mem->tn, ark_mem->ycur, ark_mem->fn, mode); if (retval) From 019702b85e11c5d0b2ad1eb02531e02065b47329 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 27 Jan 2026 23:39:39 -0500 Subject: [PATCH 058/298] Updated logging output files since tcur was previously inaccurate in some logging --- .../test_logging_arkode_arkstep_lvl3_2_0.out | 2 +- .../test_logging_arkode_arkstep_lvl4_2_0.out | 110 +++++++++--------- .../test_logging_arkode_arkstep_lvl5_2_0.out | 110 +++++++++--------- .../test_logging_arkode_erkstep_lvl3.out | 2 +- .../test_logging_arkode_erkstep_lvl4.out | 2 +- .../test_logging_arkode_erkstep_lvl5.out | 2 +- 6 files changed, 114 insertions(+), 114 deletions(-) diff --git a/test/unit_tests/logging/test_logging_arkode_arkstep_lvl3_2_0.out b/test/unit_tests/logging/test_logging_arkode_arkstep_lvl3_2_0.out index 8fce8828db..297b941643 100644 --- a/test/unit_tests/logging/test_logging_arkode_arkstep_lvl3_2_0.out +++ b/test/unit_tests/logging/test_logging_arkode_arkstep_lvl3_2_0.out @@ -151,7 +151,7 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = failed solve, nflag = 4 [INFO][rank 0][ARKodeEvolve][end-step-attempt] status = failed step, kflag = 3 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 0.000102986025609508, h = 0.00872354880550418 -[INFO][rank 0][arkStep_TakeStep_Z][begin-stages-list] stage = 0, implicit = 0, tcur = 0.0349971812476262 +[INFO][rank 0][arkStep_TakeStep_Z][begin-stages-list] stage = 0, implicit = 0, tcur = 0.000102986025609508 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success [INFO][rank 0][arkStep_TakeStep_Z][begin-stages-list] stage = 1, implicit = 1, tcur = 0.00225770258056904 [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 diff --git a/test/unit_tests/logging/test_logging_arkode_arkstep_lvl4_2_0.out b/test/unit_tests/logging/test_logging_arkode_arkstep_lvl4_2_0.out index 6a03795e08..c10d4470d8 100644 --- a/test/unit_tests/logging/test_logging_arkode_arkstep_lvl4_2_0.out +++ b/test/unit_tests/logging/test_logging_arkode_arkstep_lvl4_2_0.out @@ -11,7 +11,7 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 2.368628977311079e-07 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 2.36862897731108e-07 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 1 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -19,7 +19,7 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.04444466957300736 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.0444446695730074 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 1 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -27,7 +27,7 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.02805399819163158 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.0280539981916316 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 1 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -35,7 +35,7 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.001406013957715032 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.00140601395771503 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 1 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -43,10 +43,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.1224890674762599 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.12248906747626 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.902425639273363e-06 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.90242563927336e-06 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 2 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -54,10 +54,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.2499781580918246 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.249978158091825 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 3.882514578718288e-06 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 3.88251457871829e-06 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 2 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -75,10 +75,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 49.82271729976932 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 49.8227172997693 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.2956232485070396 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.29562324850704 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 2 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -86,13 +86,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 5179.025878904596 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 5179.0258789046 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 27.29066232027397 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 27.290662320274 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.2366478153542284 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.236647815354228 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 3 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -100,13 +100,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 3287.043206145228 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 3287.04320614523 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 17.35218233001884 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 17.3521823300188 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.1504990065556158 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.150499006555616 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 3 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -114,13 +114,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 183.4805349869565 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 183.480534986956 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.949510444094288 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.008151952120696986 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.00815195212069699 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 3 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -128,13 +128,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 14082.12983346261 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 14082.1298334626 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 73.58832716354519 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 73.5883271635452 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.6375336463716402 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.63753364637164 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 3 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -142,28 +142,28 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 28418.29689990445 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 28418.2968999044 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 147.0786804551797 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 147.07868045518 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 1.274537671846175 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 1.27453767184617 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = failed max iterations [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = failed, retval = 902, iters = 3 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = failed solve, nflag = 4 [INFO][rank 0][ARKodeEvolve][end-step-attempt] status = failed step, kflag = 3 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 0.000102986025609508, h = 0.00872354880550418 -[INFO][rank 0][arkStep_TakeStep_Z][begin-stages-list] stage = 0, implicit = 0, tcur = 0.0349971812476262 +[INFO][rank 0][arkStep_TakeStep_Z][begin-stages-list] stage = 0, implicit = 0, tcur = 0.000102986025609508 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success [INFO][rank 0][arkStep_TakeStep_Z][begin-stages-list] stage = 1, implicit = 1, tcur = 0.00225770258056904 [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 10.58935120480511 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 10.5893512048051 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.01407057164511679 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.0140705716451168 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 2 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -171,10 +171,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 337.1424764168714 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 337.142476416871 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.4439882604012199 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.44398826040122 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.000960893019833006 @@ -185,7 +185,7 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 215.7735373359566 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 215.773537335957 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.28421082324341 @@ -196,10 +196,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 13.26229169917964 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 13.2622916991796 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.01738724621164174 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.0173872462116417 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 2 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -207,13 +207,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 908.7281152253486 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 908.728115225349 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.195654290450199 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.1956542904502 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.002587105575138711 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.00258710557513871 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 3 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -221,13 +221,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 1835.650895677526 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 1835.65089567753 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 2.413982829863592 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 2.41398282986359 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.005223580298499187 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.00522358029849919 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 3 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -245,13 +245,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 897.5749133370384 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 897.574913337038 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.180074794486456 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.18007479448646 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.002550777110156022 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.00255077711015602 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 3 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -262,10 +262,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 1848.85296187574 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 2.429372959128611 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 2.42937295912861 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.005251431903621707 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.00525143190362171 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 3 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -273,13 +273,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 1417.296763477091 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 1417.29676347709 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.862895008578912 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.86289500857891 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.004026924078246891 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.00402692407824689 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 3 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -287,13 +287,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 282.7028212917262 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 282.702821291726 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.3717837407954644 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.371783740795464 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.0008035691046095763 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.000803569104609576 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 3 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -301,13 +301,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 3414.225866099896 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 3414.2258660999 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 4.480817707236493 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 4.48081770723649 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.009685454223700348 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.00968545422370035 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 3 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success @@ -315,13 +315,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 5409.236485116237 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 5409.23648511624 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 7.089262220679211 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 7.08926222067921 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.01532391809845227 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.0153239180984523 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [INFO][rank 0][arkStep_Nls][end-nonlinear-solve] status = success, iters = 3 [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = success diff --git a/test/unit_tests/logging/test_logging_arkode_arkstep_lvl5_2_0.out b/test/unit_tests/logging/test_logging_arkode_arkstep_lvl5_2_0.out index 0b56cd2a4f..9c5f86ccdc 100644 --- a/test/unit_tests/logging/test_logging_arkode_arkstep_lvl5_2_0.out +++ b/test/unit_tests/logging/test_logging_arkode_arkstep_lvl5_2_0.out @@ -26,7 +26,7 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 2.368628977311079e-07 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 2.36862897731108e-07 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = 2.358974779413975e-13 @@ -52,7 +52,7 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.04444466957300736 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.0444446695730074 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -1.914859318478439e-10 @@ -78,7 +78,7 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.02805399819163158 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.0280539981916316 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -1.208092473957022e-10 @@ -104,7 +104,7 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.001406013957715032 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.00140601395771503 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -6.206706558584390e-12 @@ -130,10 +130,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.1224890674762599 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.12248906747626 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.902425639273363e-06 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.90242563927336e-06 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -5.307088621598873e-10 @@ -159,10 +159,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.2499781580918246 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 0.249978158091825 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 3.882514578718288e-06 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 3.88251457871829e-06 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -1.082482978900431e-09 @@ -210,10 +210,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 49.82271729976932 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 49.8227172997693 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.2956232485070396 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.29562324850704 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = 8.849978747663506e-06 @@ -239,13 +239,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 5179.025878904596 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 5179.0258789046 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 27.29066232027397 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 27.290662320274 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.2366478153542284 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.236647815354228 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -1.159790807607275e-05 @@ -271,13 +271,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 3287.043206145228 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 3287.04320614523 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 17.35218233001884 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 17.3521823300188 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.1504990065556158 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.150499006555616 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -5.119582425676298e-06 @@ -303,13 +303,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 183.4805349869565 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 183.480534986956 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.949510444094288 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.008151952120696986 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.00815195212069699 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -6.152611898849060e-06 @@ -335,13 +335,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 14082.12983346261 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 14082.1298334626 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 73.58832716354519 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 73.5883271635452 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.6375336463716402 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.63753364637164 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -7.277552643022212e-05 @@ -367,13 +367,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 28418.29689990445 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 28418.2968999044 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 147.0786804551797 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 147.07868045518 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 1.274537671846175 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 1.27453767184617 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = failed max iterations [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -1.250496878192964e-04 @@ -382,7 +382,7 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_TakeStep_Z][end-stages-list] status = failed solve, nflag = 4 [INFO][rank 0][ARKodeEvolve][end-step-attempt] status = failed step, kflag = 3 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 0.000102986025609508, h = 0.00872354880550418 -[INFO][rank 0][arkStep_TakeStep_Z][begin-stages-list] stage = 0, implicit = 0, tcur = 0.0349971812476262 +[INFO][rank 0][arkStep_TakeStep_Z][begin-stages-list] stage = 0, implicit = 0, tcur = 0.000102986025609508 [DEBUG][rank 0][arkStep_TakeStep_Z][explicit stage] z_0(:) = 1.224744870309106e+00 1.732050195224277e+00 @@ -403,10 +403,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 10.58935120480511 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 10.5893512048051 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.01407057164511679 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.0140705716451168 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = 9.754363006809573e-08 @@ -432,10 +432,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 337.1424764168714 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 337.142476416871 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.4439882604012199 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.44398826040122 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.000960893019833006 @@ -464,7 +464,7 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 215.7735373359566 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 215.773537335957 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.28421082324341 @@ -493,10 +493,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 13.26229169917964 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 13.2622916991796 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.01738724621164174 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.0173872462116417 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -1.419827347970335e-07 @@ -522,13 +522,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 908.7281152253486 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 908.728115225349 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.195654290450199 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.1956542904502 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.002587105575138711 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.00258710557513871 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -4.111601314188560e-06 @@ -554,13 +554,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 1835.650895677526 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 1835.65089567753 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 2.413982829863592 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 2.41398282986359 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.005223580298499187 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.00522358029849919 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -7.950371969264979e-06 @@ -608,13 +608,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 897.5749133370384 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 897.574913337038 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.180074794486456 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.18007479448646 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.002550777110156022 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.00255077711015602 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -3.740554085189258e-06 @@ -643,10 +643,10 @@ Using fixed-point nonlinear solver [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 1848.85296187574 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 2.429372959128611 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 2.42937295912861 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.005251431903621707 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.00525143190362171 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -7.837552977595153e-06 @@ -672,13 +672,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 1417.296763477091 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 1417.29676347709 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.862895008578912 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 1.86289500857891 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.004026924078246891 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.00402692407824689 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -5.993980462758778e-06 @@ -704,13 +704,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 282.7028212917262 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 282.702821291726 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.3717837407954644 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 0.371783740795464 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.0008035691046095763 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.000803569104609576 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -1.306434064417920e-06 @@ -736,13 +736,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 3414.225866099896 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 3414.2258660999 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 4.480817707236493 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 4.48081770723649 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.009685454223700348 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.00968545422370035 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -1.498318595181932e-05 @@ -768,13 +768,13 @@ Using fixed-point nonlinear solver [INFO][rank 0][arkStep_Nls][begin-nonlinear-solve] tol = 0.1 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-solver] solver = Fixed-Point [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 5409.236485116237 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 1, update-norm = 5409.23648511624 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 7.089262220679211 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 2, update-norm = 7.08926222067921 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = continue [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][begin-iterations-list] -[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.01532391809845227 +[INFO][rank 0][SUNNonlinSolSolve_FixedPoint][nonlinear-iterate] cur-iter = 3, update-norm = 0.0153239180984523 [INFO][rank 0][SUNNonlinSolSolve_FixedPoint][end-iterations-list] status = success [DEBUG][rank 0][arkStep_Nls][correction] zcor(:) = -2.348389429454253e-05 diff --git a/test/unit_tests/logging/test_logging_arkode_erkstep_lvl3.out b/test/unit_tests/logging/test_logging_arkode_erkstep_lvl3.out index e9b7f61632..60dc9b1b5e 100644 --- a/test/unit_tests/logging/test_logging_arkode_erkstep_lvl3.out +++ b/test/unit_tests/logging/test_logging_arkode_erkstep_lvl3.out @@ -32,7 +32,7 @@ Start ERKStep Logging test [INFO][rank 0][erkStep_TakeStep][end-compute-solution] status = success [INFO][rank 0][ARKodeEvolve][end-step-attempt] status = failed error test, dsm = 1.00314609906058, kflag = 5 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 0.000102986025609508, h = 0.015960659313935 -[INFO][rank 0][erkStep_TakeStep][begin-stages-list] stage = 0, tcur = 0.0162375294442678 +[INFO][rank 0][erkStep_TakeStep][begin-stages-list] stage = 0, tcur = 0.000102986025609508 [INFO][rank 0][erkStep_TakeStep][end-stages-list] status = success [INFO][rank 0][erkStep_TakeStep][begin-stages-list] stage = 1, tcur = 0.0064872497511835 [INFO][rank 0][erkStep_TakeStep][end-stages-list] status = success diff --git a/test/unit_tests/logging/test_logging_arkode_erkstep_lvl4.out b/test/unit_tests/logging/test_logging_arkode_erkstep_lvl4.out index e091e74b77..a21a5aebaa 100644 --- a/test/unit_tests/logging/test_logging_arkode_erkstep_lvl4.out +++ b/test/unit_tests/logging/test_logging_arkode_erkstep_lvl4.out @@ -38,7 +38,7 @@ Start ERKStep Logging test [DEBUG][rank 0][arkAdapt][new-step-eta] eta = 0.989222867966487 [INFO][rank 0][ARKodeEvolve][end-step-attempt] status = failed error test, dsm = 1.00314609906058, kflag = 5 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 0.000102986025609508, h = 0.015960659313935 -[INFO][rank 0][erkStep_TakeStep][begin-stages-list] stage = 0, tcur = 0.0162375294442678 +[INFO][rank 0][erkStep_TakeStep][begin-stages-list] stage = 0, tcur = 0.000102986025609508 [INFO][rank 0][erkStep_TakeStep][end-stages-list] status = success [INFO][rank 0][erkStep_TakeStep][begin-stages-list] stage = 1, tcur = 0.0064872497511835 [INFO][rank 0][erkStep_TakeStep][end-stages-list] status = success diff --git a/test/unit_tests/logging/test_logging_arkode_erkstep_lvl5.out b/test/unit_tests/logging/test_logging_arkode_erkstep_lvl5.out index 280041af97..7af00ffdd5 100644 --- a/test/unit_tests/logging/test_logging_arkode_erkstep_lvl5.out +++ b/test/unit_tests/logging/test_logging_arkode_erkstep_lvl5.out @@ -80,7 +80,7 @@ Start ERKStep Logging test [DEBUG][rank 0][arkAdapt][new-step-eta] eta = 0.989222867966487 [INFO][rank 0][ARKodeEvolve][end-step-attempt] status = failed error test, dsm = 1.00314609906058, kflag = 5 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 0.000102986025609508, h = 0.015960659313935 -[INFO][rank 0][erkStep_TakeStep][begin-stages-list] stage = 0, tcur = 0.0162375294442678 +[INFO][rank 0][erkStep_TakeStep][begin-stages-list] stage = 0, tcur = 0.000102986025609508 [DEBUG][rank 0][erkStep_TakeStep][stage] z_0(:) = 1.224744870309106e+00 1.732050195224277e+00 From ed6d1f4e74315d24d7fdcc2650feea6e870b8fad Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 27 Jan 2026 23:45:03 -0500 Subject: [PATCH 059/298] Updated answers submodule commit --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index 124abc1828..c03db04235 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 124abc18285097fc64f0709c1f0a083f6d015ab7 +Subproject commit c03db042354d87f66c1bd760ce94d7646e00a1f7 From 66697d66804852bae85ac7780093b0b281db05c3 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 27 Jan 2026 23:56:45 -0500 Subject: [PATCH 060/298] Formatting --- src/arkode/arkode_erkstep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index fa1cf6721e..e953f7a620 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -785,7 +785,7 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (!(ark_mem->fn_is_current)) { - mode = (ark_mem->initsetup) ? ARK_FULLRHS_START : ARK_FULLRHS_END; + mode = (ark_mem->initsetup) ? ARK_FULLRHS_START : ARK_FULLRHS_END; retval = ark_mem->step_fullrhs(ark_mem, ark_mem->tn, ark_mem->ycur, ark_mem->fn, mode); if (retval) From 050272fda2f8ef4ae12750bd7818618550fea190 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Wed, 28 Jan 2026 16:01:45 -0500 Subject: [PATCH 061/298] Added unit tests for ARKodeGetLastTime, ARKodeGetCurrentTime, ARKodeGetStageIndex, ARKodeSetPreprocessStepFn, ARKodeSetPostprocessStepFn, ARKodeSetProcessStepFailFn, ARKodeSetPreprocessRHSFn, and ARKodeSetPostprocessStageFn --- src/arkode/arkode_io.c | 6 +- .../arkode/CXX_serial/CMakeLists.txt | 22 +- .../CXX_serial/ark_test_stageinfo_arkstep.cpp | 184 ++++++++++++ .../CXX_serial/ark_test_stageinfo_erkstep.cpp | 145 ++++++++++ .../ark_test_stageinfo_forcingstep.cpp | 176 ++++++++++++ .../ark_test_stageinfo_lsrkstep.cpp | 178 ++++++++++++ .../CXX_serial/ark_test_stageinfo_mristep.cpp | 263 ++++++++++++++++++ .../ark_test_stageinfo_splittingstep.cpp | 176 ++++++++++++ .../ark_test_stageinfo_sprkstep.cpp | 134 +++++++++ .../arkode/CXX_serial/stageinfo.hpp | 142 ++++++++++ 10 files changed, 1422 insertions(+), 4 deletions(-) create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp create mode 100644 test/unit_tests/arkode/CXX_serial/stageinfo.hpp diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index 16756879f3..c7c6808895 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -2585,7 +2585,7 @@ int ARKodeGetLastTime(void* arkode_mem, sunrealtype* tn) } ark_mem = (ARKodeMem)arkode_mem; - *tcur = ark_mem->tn; + *tn = ark_mem->tn; return (ARK_SUCCESS); } @@ -2594,7 +2594,7 @@ int ARKodeGetLastTime(void* arkode_mem, sunrealtype* tn) Returns the last saved time step solution. ---------------------------------------------------------------*/ -int ARKodeGetLasState(void* arkode_mem, N_Vector* state) +int ARKodeGetLastState(void* arkode_mem, N_Vector* yn) { ARKodeMem ark_mem; if (arkode_mem == NULL) @@ -2605,7 +2605,7 @@ int ARKodeGetLasState(void* arkode_mem, N_Vector* state) } ark_mem = (ARKodeMem)arkode_mem; - *state = ark_mem->yn; + *yn = ark_mem->yn; return (ARK_SUCCESS); } diff --git a/test/unit_tests/arkode/CXX_serial/CMakeLists.txt b/test/unit_tests/arkode/CXX_serial/CMakeLists.txt index 0d8484b569..121d6b5148 100644 --- a/test/unit_tests/arkode/CXX_serial/CMakeLists.txt +++ b/test/unit_tests/arkode/CXX_serial/CMakeLists.txt @@ -76,7 +76,27 @@ set(unit_tests "ark_test_prealloc_lsrkstep.cpp\;1\;" "ark_test_prealloc_mristep.cpp\;1\;" "ark_test_prealloc_splittingstep.cpp\;1\;" - "ark_test_prealloc_sprkstep.cpp\;1\;") + "ark_test_prealloc_sprkstep.cpp\;1\;" + "ark_test_stageinfo_arkstep.cpp\;0\;" # ERK + "ark_test_stageinfo_arkstep.cpp\;1\;" # DIRK + "ark_test_stageinfo_arkstep.cpp\;2\;" # ImEx + "ark_test_stageinfo_erkstep.cpp\;\;" + "ark_test_stageinfo_forcingstep.cpp\;\;" + "ark_test_stageinfo_lsrkstep.cpp\;0\;" # RKC + "ark_test_stageinfo_lsrkstep.cpp\;1\;" # RKL + "ark_test_stageinfo_lsrkstep.cpp\;2\;" # SSPs2 + "ark_test_stageinfo_lsrkstep.cpp\;3\;" # SSPs3 + "ark_test_stageinfo_lsrkstep.cpp\;4\;" # SSP43 + "ark_test_stageinfo_lsrkstep.cpp\;5\;" # SSP104 + "ark_test_stageinfo_mristep.cpp\;0\;" # MRIGARK Explicit + "ark_test_stageinfo_mristep.cpp\;1\;" # MRIGARK Implicit + "ark_test_stageinfo_mristep.cpp\;2\;" # MRIGARK ImEx + "ark_test_stageinfo_mristep.cpp\;3\;" # MRISR Explicit + "ark_test_stageinfo_mristep.cpp\;4\;" # MRISR Implicit + "ark_test_stageinfo_mristep.cpp\;5\;" # MRISR ImEx + "ark_test_stageinfo_mristep.cpp\;6\;" # MERK + "ark_test_stageinfo_splittingstep.cpp\;\;" + "ark_test_stageinfo_sprkstep.cpp\;\;") # Add the build and install targets for each test foreach(test_tuple ${unit_tests}) diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp new file mode 100644 index 0000000000..1fc2e9e691 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp @@ -0,0 +1,184 @@ +/* ----------------------------------------------------------------------------- + * Programmer(s): Daniel R. Reynolds @ UMBC + * ----------------------------------------------------------------------------- + * SUNDIALS Copyright Start + * Copyright (c) 2025-2026, Lawrence Livermore National Security, + * University of Maryland Baltimore County, and the SUNDIALS contributors. + * Copyright (c) 2013-2025, Lawrence Livermore National Security + * and Southern Methodist University. + * Copyright (c) 2002-2013, Lawrence Livermore National Security. + * All rights reserved. + * + * See the top-level LICENSE and NOTICE files for details. + * + * SPDX-License-Identifier: BSD-3-Clause + * SUNDIALS Copyright End + * ----------------------------------------------------------------------------- + * Test stage information and pre/postprocessing routines in ARKStep + * ---------------------------------------------------------------------------*/ + +#include +#include +#include +#include +#include + +// Include desired integrators, vectors, linear solvers, and nonlinear solvers +#include "arkode/arkode_arkstep.h" +#include "nvector/nvector_serial.h" +#include "sundials/sundials_context.hpp" +#include "sundials/sundials_matrix.h" +#include "sunlinsol/sunlinsol_spgmr.h" + +#include "problems/kpr.hpp" +#include "utilities/check_return.hpp" + +using namespace std; +using namespace problems::kpr; + +// store the main integrator global memory for these tests only, so that we +// can call ARKodeGetLastTime etc in the callback functions from stageinfo.hpp. +// This would normally be stored in user_data, but here we reuse problem +// defintions from other tests. +void* arkode_mem = nullptr; + +// Include the pre/post step and stage processing routines now that arkode_mem is defined +#include "stageinfo.hpp" + + +int main(int argc, char* argv[]) +{ + cout << "Start ARKStep StageInfo test" << endl; + + // SUNDIALS context object for this simulation + sundials::Context sunctx; + + // Use ERK (0) or DIRK (1) otherwise use ImEx + int method_type = 0; + if (argc > 1) { method_type = stoi(argv[1]); } + + // Create initial condition + N_Vector y = N_VNew_Serial(2, sunctx); + if (check_ptr(y, "N_VNew_Serial")) { return 1; } + + sunrealtype utrue, vtrue; + int flag = true_sol(zero, &utrue, &vtrue); + if (check_flag(flag, "true_sol")) { return 1; } + + sunrealtype* ydata = N_VGetArrayPointer(y); + ydata[0] = utrue; + ydata[1] = vtrue; + + // Create ARKStep memory structure + if (method_type == 0) + { + cout << "Using ERK method" << endl; + arkode_mem = ARKStepCreate(ode_rhs, nullptr, zero, y, sunctx); + if (check_ptr(arkode_mem, "ARKStepCreate")) { return 1; } + } + else if (method_type == 1) + { + cout << "Using DIRK method" << endl; + arkode_mem = ARKStepCreate(nullptr, ode_rhs, zero, y, sunctx); + if (check_ptr(arkode_mem, "ARKStepCreate")) { return 1; } + } + else + { + cout << "Using ImEx method" << endl; + arkode_mem = ARKStepCreate(ode_rhs_ex, ode_rhs_im, zero, y, sunctx); + if (check_ptr(arkode_mem, "ARKStepCreate")) { return 1; } + } + + flag = ARKodeSetUserData(arkode_mem, &problem_data); + if (check_flag(flag, "ARKodeSetUserData")) { return 1; } + + // Relative and absolute tolerances + const sunrealtype rtol = SUN_RCONST(1.0e-6); + const sunrealtype atol = SUN_RCONST(1.0e-10); + + flag = ARKodeSStolerances(arkode_mem, rtol, atol); + if (check_flag(flag, "ARKodeSStolerances")) { return 1; } + + SUNMatrix A = nullptr; + SUNLinearSolver LS = nullptr; + + if (method_type > 0) + { + cout << "Using Newton nonlinear solver" << endl; + cout << "Using GMRES iterative linear solver" << endl; + + LS = SUNLinSol_SPGMR(y, SUN_PREC_NONE, 0, sunctx); + if (check_ptr(LS, "SUNLinSol_SPGMR")) { return 1; } + + flag = ARKodeSetLinearSolver(arkode_mem, LS, A); + if (check_flag(flag, "ARKodeSetLinearSolver")) { return 1; } + } + + // Set pre/post step and stage routines + flag = ARKodeSetPreprocessStepFn(arkode_mem, preprocess_step); + if (check_flag(flag, "ARKodeSetPreprocessStepFn")) { return 1; } + flag = ARKodeSetPostprocessStepFn(arkode_mem, postprocess_step); + if (check_flag(flag, "ARKodeSetPostprocessStepFn")) { return 1; } + flag = ARKodeSetPostprocessStepFailFn(arkode_mem, postprocess_step_fail); + if (check_flag(flag, "ARKodeSetPostprocessStepFailFn")) { return 1; } + flag = ARKodeSetPreprocessRHSFn(arkode_mem, preprocess_stage); + if (check_flag(flag, "ARKodeSetPreprocessRHSFn")) { return 1; } + flag = ARKodeSetPostprocessStageFn(arkode_mem, postprocess_stage); + if (check_flag(flag, "ARKodeSetPostprocessStageFn")) { return 1; } + + // Initial time and fist output time + const sunrealtype dtout = one; // output interval + const int nout = 3; // number of outputs + sunrealtype tret = zero; + sunrealtype tout = tret + dtout; + + // Output initial contion + cout << scientific; + cout << setprecision(numeric_limits::digits10); + cout << " t "; + cout << " u "; + cout << " v "; + cout << " u err "; + cout << " v err " << endl; + for (int i = 0; i < 9; i++) { cout << "--------------"; } + cout << endl; + + cout << setw(22) << tret << setw(25) << ydata[0] << setw(25) << ydata[1] + << setw(25) << abs(ydata[0] - utrue) << setw(25) << abs(ydata[1] - vtrue) + << endl; + + // Advance in time + for (int i = 0; i < nout; i++) + { + flag = ARKodeEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); + if (check_flag(flag, "ARKode")) { return 1; } + + flag = true_sol(tret, &utrue, &vtrue); + if (check_flag(flag, "true_sol")) { return 1; } + + cout << setw(22) << tret << setw(25) << ydata[0] << setw(25) << ydata[1] + << setw(25) << abs(ydata[0] - utrue) << setw(25) + << abs(ydata[1] - vtrue) << endl; + + // update output time + tout += dtout; + } + for (int i = 0; i < 9; i++) { cout << "--------------"; } + cout << endl; + + // Print some final statistics + flag = ARKodePrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); + if (check_flag(flag, "ARKodePrintAllStats")) { return 1; } + + // Clean up and return with successful completion + N_VDestroy(y); + SUNMatDestroy(A); + SUNLinSolFree(LS); + ARKodeFree(&arkode_mem); + + cout << "End ARKStep StageInfo test" << endl; + + return 0; +} + +/*---- end of file ----*/ diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp new file mode 100644 index 0000000000..db0d5f4b11 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp @@ -0,0 +1,145 @@ +/* ----------------------------------------------------------------------------- + * Programmer(s): Daniel R. Reynolds @ UMBC + * ----------------------------------------------------------------------------- + * SUNDIALS Copyright Start + * Copyright (c) 2025-2026, Lawrence Livermore National Security, + * University of Maryland Baltimore County, and the SUNDIALS contributors. + * Copyright (c) 2013-2025, Lawrence Livermore National Security + * and Southern Methodist University. + * Copyright (c) 2002-2013, Lawrence Livermore National Security. + * All rights reserved. + * + * See the top-level LICENSE and NOTICE files for details. + * + * SPDX-License-Identifier: BSD-3-Clause + * SUNDIALS Copyright End + * ----------------------------------------------------------------------------- + * Test stage information and pre/postprocessing routines in ERKStep + * ---------------------------------------------------------------------------*/ + +#include +#include +#include +#include +#include + +// Include desired integrators, vectors, linear solvers, and nonlinear solvers +#include "arkode/arkode_erkstep.h" +#include "nvector/nvector_serial.h" +#include "sundials/sundials_context.hpp" + +#include "problems/kpr.hpp" +#include "utilities/check_return.hpp" + +using namespace std; +using namespace problems::kpr; + +// store the main integrator global memory for these tests only, so that we +// can call ARKodeGetLastTime etc in the callback functions from stageinfo.hpp. +// This would normally be stored in user_data, but here we reuse problem +// defintions from other tests. +void* arkode_mem = nullptr; + +// Include the pre/post step and stage processing routines now that arkode_mem is defined +#include "stageinfo.hpp" + + +int main(int argc, char* argv[]) +{ + cout << "Start ERKStep StageInfo test" << endl; + + // SUNDIALS context object for this simulation + sundials::Context sunctx; + + // Create initial condition + N_Vector y = N_VNew_Serial(2, sunctx); + if (check_ptr(y, "N_VNew_Serial")) { return 1; } + + sunrealtype utrue, vtrue; + int flag = true_sol(zero, &utrue, &vtrue); + if (check_flag(flag, "true_sol")) { return 1; } + + sunrealtype* ydata = N_VGetArrayPointer(y); + ydata[0] = utrue; + ydata[1] = vtrue; + + // Create ERKStep memory structure + arkode_mem = ERKStepCreate(ode_rhs, zero, y, sunctx); + if (check_ptr(arkode_mem, "ERKStepCreate")) { return 1; } + + flag = ARKodeSetUserData(arkode_mem, &problem_data); + if (check_flag(flag, "ARKodeSetUserData")) { return 1; } + + // Relative and absolute tolerances + const sunrealtype rtol = SUN_RCONST(1.0e-6); + const sunrealtype atol = SUN_RCONST(1.0e-10); + + flag = ARKodeSStolerances(arkode_mem, rtol, atol); + if (check_flag(flag, "ARKodeSStolerances")) { return 1; } + + // Set pre/post step and stage routines + flag = ARKodeSetPreprocessStepFn(arkode_mem, preprocess_step); + if (check_flag(flag, "ARKodeSetPreprocessStepFn")) { return 1; } + flag = ARKodeSetPostprocessStepFn(arkode_mem, postprocess_step); + if (check_flag(flag, "ARKodeSetPostprocessStepFn")) { return 1; } + flag = ARKodeSetPostprocessStepFailFn(arkode_mem, postprocess_step_fail); + if (check_flag(flag, "ARKodeSetPostprocessStepFailFn")) { return 1; } + flag = ARKodeSetPreprocessRHSFn(arkode_mem, preprocess_stage); + if (check_flag(flag, "ARKodeSetPreprocessRHSFn")) { return 1; } + flag = ARKodeSetPostprocessStageFn(arkode_mem, postprocess_stage); + if (check_flag(flag, "ARKodeSetPostprocessStageFn")) { return 1; } + + // Initial time and fist output time + const sunrealtype dtout = one; // output interval + const int nout = 3; // number of outputs + sunrealtype tret = zero; + sunrealtype tout = tret + dtout; + + // Output initial contion + cout << scientific; + cout << setprecision(numeric_limits::digits10); + cout << " t "; + cout << " u "; + cout << " v "; + cout << " u err "; + cout << " v err " << endl; + for (int i = 0; i < 9; i++) { cout << "--------------"; } + cout << endl; + + cout << setw(22) << tret << setw(25) << ydata[0] << setw(25) << ydata[1] + << setw(25) << abs(ydata[0] - utrue) << setw(25) << abs(ydata[1] - vtrue) + << endl; + + // Advance in time + for (int i = 0; i < nout; i++) + { + flag = ARKodeEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); + if (check_flag(flag, "ARKodeEvolve")) { return 1; } + + flag = true_sol(tret, &utrue, &vtrue); + if (check_flag(flag, "true_sol")) { return 1; } + + cout << setw(22) << tret << setw(25) << ydata[0] << setw(25) << ydata[1] + << setw(25) << abs(ydata[0] - utrue) << setw(25) + << abs(ydata[1] - vtrue) << endl; + + // update output time + tout += dtout; + } + for (int i = 0; i < 9; i++) { cout << "--------------"; } + cout << endl; + + // Print some final statistics + flag = ARKodePrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); + if (check_flag(flag, "ARKodePrintAllStats")) { return 1; } + + // Clean up and return with successful completion + N_VDestroy(y); + ARKodeFree(&arkode_mem); + + cout << "End ERKStep StageInfo test" << endl; + + return 0; +} + +/*---- end of file ----*/ diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp new file mode 100644 index 0000000000..1358759130 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp @@ -0,0 +1,176 @@ +/* ----------------------------------------------------------------------------- + * Programmer(s): Daniel R. Reynolds @ UMBC + * ----------------------------------------------------------------------------- + * SUNDIALS Copyright Start + * Copyright (c) 2025-2026, Lawrence Livermore National Security, + * University of Maryland Baltimore County, and the SUNDIALS contributors. + * Copyright (c) 2013-2025, Lawrence Livermore National Security + * and Southern Methodist University. + * Copyright (c) 2002-2013, Lawrence Livermore National Security. + * All rights reserved. + * + * See the top-level LICENSE and NOTICE files for details. + * + * SPDX-License-Identifier: BSD-3-Clause + * SUNDIALS Copyright End + * ----------------------------------------------------------------------------- + * Test stage information and pre/postprocessing routines in ForcingStep + * ---------------------------------------------------------------------------*/ + +#include +#include +#include +#include +#include + +// Include desired integrators and vectors +#include "arkode/arkode_erkstep.h" +#include "arkode/arkode_forcingstep.h" +#include "nvector/nvector_serial.h" +#include "sundials/sundials_context.hpp" + +#include "problems/estep.hpp" +#include "utilities/check_return.hpp" + +using namespace std; +using namespace problems::estep; + +// store the main integrator global memory for these tests only, so that we +// can call ARKodeGetLastTime etc in the callback functions from stageinfo.hpp. +// This would normally be stored in user_data, but here we reuse problem +// defintions from other tests. +void* arkode_mem = nullptr; + +// Include the pre/post step and stage processing routines now that arkode_mem is defined +#include "stageinfo.hpp" + + +int main(int argc, char* argv[]) +{ + cout << "Start ForcingStep StageInfo test" << endl; + + // SUNDIALS context object for this simulation + sundials::Context sunctx; + + // Step sizes: overall, partition 1, partition 2 + sunrealtype dt = SUN_RCONST(0.001); + sunrealtype dt_1 = dt / 2; + sunrealtype dt_2 = dt / 4; + + // Create initial condition + N_Vector y = N_VNew_Serial(1, sunctx); + if (check_ptr(y, "N_VNew_Serial")) { return 1; } + + int flag = initial_condition(y); + if (check_flag(flag, "initial_condition")) { return 1; } + + // Create partition 1 integrator + void* stepper_1 = ERKStepCreate(ode_rhs_1, zero, y, sunctx); + if (check_ptr(stepper_1, "ERKStepCreate")) { return 1; } + + flag = ARKodeSetUserData(stepper_1, &problem_data); + if (check_flag(flag, "ARKodeSetUserData")) { return 1; } + + flag = ARKodeSetFixedStep(stepper_1, dt_1); + if (check_flag(flag, "ARKodeSetFixedStep")) { return 1; } + + // Create partition 1 integrator + void* stepper_2 = ERKStepCreate(ode_rhs_2, zero, y, sunctx); + if (check_ptr(stepper_2, "ERKStepCreate")) { return 1; } + + flag = ARKodeSetFixedStep(stepper_2, dt_2); + if (check_flag(flag, "ARKodeSetFixedStep")) { return 1; } + + // Create the overall integrator + SUNStepper steppers[2]; + + flag = ARKodeCreateSUNStepper(stepper_1, &steppers[0]); + if (check_flag(flag, "ARKodeSetFixedStep")) { return 1; } + + flag = ARKodeCreateSUNStepper(stepper_2, &steppers[1]); + if (check_flag(flag, "ARKodeSetFixedStep")) { return 1; } + + arkode_mem = ForcingStepCreate(steppers[0], steppers[1], zero, y, sunctx); + if (check_ptr(arkode_mem, "ForcingStepCreate")) { return 1; } + + flag = ARKodeSetFixedStep(arkode_mem, dt); + if (check_flag(flag, "ARKodeSetFixedStep")) { return 1; } + + // Set pre/post step and stage routines + flag = ARKodeSetPreprocessStepFn(arkode_mem, preprocess_step); + if (check_flag(flag, "ARKodeSetPreprocessStepFn")) { return 1; } + flag = ARKodeSetPostprocessStepFn(arkode_mem, postprocess_step); + if (check_flag(flag, "ARKodeSetPostprocessStepFn")) { return 1; } + flag = ARKodeSetPostprocessStepFailFn(arkode_mem, postprocess_step_fail); + if (check_flag(flag, "ARKodeSetPostprocessStepFailFn")) { return 1; } + flag = ARKodeSetPreprocessRHSFn(arkode_mem, preprocess_stage); + if (check_flag(flag, "ARKodeSetPreprocessRHSFn")) { return 1; } + flag = ARKodeSetPostprocessStageFn(arkode_mem, postprocess_stage); + if (check_flag(flag, "ARKodeSetPostprocessStageFn")) { return 1; } + + // True solution vector + N_Vector yt = N_VClone(y); + + flag = true_solution(zero, problem_data, yt); + if (check_flag(flag, "true_solution")) { return 1; } + + // Initial time and fist output time + const sunrealtype dtout = one; // output interval + const int nout = 3; // number of outputs + sunrealtype tret = zero; + sunrealtype tout = tret + dtout; + + const int width = numeric_limits::digits10 + 8; + + // Output initial contion + cout << scientific; + cout << setprecision(numeric_limits::digits10); + cout << setw(width) << " t"; + cout << setw(width) << " y"; + cout << setw(width) << " y err" << endl; + for (int i = 0; i < 3 * width; i++) { cout << "-"; } + cout << endl; + + sunrealtype* y_data = N_VGetArrayPointer(y); + sunrealtype* yt_data = N_VGetArrayPointer(yt); + + cout << setw(width) << tret << setw(width) << y_data[0] << setw(width) + << abs(y_data[0] - yt_data[0]) << endl; + + // Advance in time + for (int i = 0; i < nout; i++) + { + flag = ARKodeEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); + if (check_flag(flag, "ARKodeEvolve")) { return 1; } + + flag = true_solution(tret, problem_data, yt); + if (check_flag(flag, "true_solution")) { return 1; } + + cout << setw(width) << tret << setw(width) << y_data[0] << setw(width) + << abs(y_data[0] - yt_data[0]) << endl; + + // update output time + tout += dtout; + } + for (int i = 0; i < 3 * width; i++) { cout << "-"; } + cout << endl; + + // Print some final statistics + flag = ARKodePrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); + if (check_flag(flag, "ARKodePrintAllStats")) { return 1; } + + // Clean up and return with successful completion + N_VDestroy(y); + N_VDestroy(yt); + ARKodeFree(&arkode_mem); + ARKodeFree(&stepper_1); + ARKodeFree(&stepper_2); + SUNStepper_Destroy(&steppers[0]); + SUNStepper_Destroy(&steppers[1]); + + cout << "End ForcingStep StageInfo test" << endl; + + return 0; +} + +/*---- end of file ----*/ diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp new file mode 100644 index 0000000000..d9147986de --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp @@ -0,0 +1,178 @@ +/* ----------------------------------------------------------------------------- + * Programmer(s): Daniel R. Reynolds @ UMBC + * ----------------------------------------------------------------------------- + * SUNDIALS Copyright Start + * Copyright (c) 2025-2026, Lawrence Livermore National Security, + * University of Maryland Baltimore County, and the SUNDIALS contributors. + * Copyright (c) 2013-2025, Lawrence Livermore National Security + * and Southern Methodist University. + * Copyright (c) 2002-2013, Lawrence Livermore National Security. + * All rights reserved. + * + * See the top-level LICENSE and NOTICE files for details. + * + * SPDX-License-Identifier: BSD-3-Clause + * SUNDIALS Copyright End + * ----------------------------------------------------------------------------- + * Test stage information and pre/postprocessing routines in LSRKStep + * ---------------------------------------------------------------------------*/ + +#include +#include +#include +#include +#include + +// Include desired integrators, vectors, linear solvers, and nonlinear solvers +#include "arkode/arkode_lsrkstep.h" +#include "nvector/nvector_serial.h" + +#include "problems/prv.hpp" +#include "sundials/sundials_nvector.h" +#include "utilities/check_return.hpp" + +using namespace std; +using namespace problems::prv; + +// store the main integrator global memory for these tests only, so that we +// can call ARKodeGetLastTime etc in the callback functions from stageinfo.hpp. +// This would normally be stored in user_data, but here we reuse problem +// defintions from other tests. +void* arkode_mem = nullptr; + +// Include the pre/post step and stage processing routines now that arkode_mem is defined +#include "stageinfo.hpp" + + +int main(int argc, char* argv[]) +{ + cout << "Start LSRKStep StageInfo test" << endl; + + // SUNDIALS context object for this simulation + sundials::Context sunctx; + + // Use RKC (0), RKL (1), SSPs2 (2), SSPs3 (3), SSP43 (4), SSP104 (5) + int method = 0; + if (argc > 1) { method = stoi(argv[1]); } + + // Create initial condition + N_Vector y = N_VNew_Serial(1, sunctx); + if (check_ptr(y, "N_VNew_Serial")) { return 1; } + N_VConst(true_solution(zero), y); + + // Create LSRKStep memory structure + if (method < 2) { arkode_mem = LSRKStepCreateSTS(ode_rhs, zero, y, sunctx); } + else { arkode_mem = LSRKStepCreateSSP(ode_rhs, zero, y, sunctx); } + if (check_ptr(arkode_mem, "LSRKStepCreate")) { return 1; } + + // Select method + int flag; + if (method == 0) + { + flag = LSRKStepSetSTSMethodByName(arkode_mem, "ARKODE_LSRK_RKC_2"); + } + else if (method == 1) + { + flag = LSRKStepSetSTSMethodByName(arkode_mem, "ARKODE_LSRK_RKL_2"); + } + else if (method == 2) + { + flag = LSRKStepSetSSPMethodByName(arkode_mem, "ARKODE_LSRK_SSP_S_2"); + } + else if (method == 3) + { + flag = LSRKStepSetSSPMethodByName(arkode_mem, "ARKODE_LSRK_SSP_S_3"); + } + else if (method == 4) + { + flag = LSRKStepSetSSPMethodByName(arkode_mem, "ARKODE_LSRK_SSP_S_3"); + if (flag == 0) { flag = LSRKStepSetNumSSPStages(arkode_mem, 4); } + } + else if (method == 5) + { + flag = LSRKStepSetSSPMethodByName(arkode_mem, "ARKODE_LSRK_SSP_10_4"); + } + else + { + cerr << "Invalid method option\n"; + return 1; + } + if (check_flag(flag, "LSRKStepSetMethodByName")) { return 1; } + + flag = ARKodeSetUserData(arkode_mem, &problem_data); + if (check_flag(flag, "ARKodeSetUserData")) { return 1; } + + // Relative and absolute tolerances + const sunrealtype rtol = SUN_RCONST(1.0e-6); + const sunrealtype atol = SUN_RCONST(1.0e-10); + + flag = ARKodeSStolerances(arkode_mem, rtol, atol); + if (check_flag(flag, "ARKodeSStolerances")) { return 1; } + + // Specify dominant eigenvalue function + flag = LSRKStepSetDomEigFn(arkode_mem, ode_dom_eig); + if (check_flag(flag, "LSRKStepSetDomEigFn")) { return 1; } + + // Set pre/post step and stage routines + flag = ARKodeSetPreprocessStepFn(arkode_mem, preprocess_step); + if (check_flag(flag, "ARKodeSetPreprocessStepFn")) { return 1; } + flag = ARKodeSetPostprocessStepFn(arkode_mem, postprocess_step); + if (check_flag(flag, "ARKodeSetPostprocessStepFn")) { return 1; } + flag = ARKodeSetPostprocessStepFailFn(arkode_mem, postprocess_step_fail); + if (check_flag(flag, "ARKodeSetPostprocessStepFailFn")) { return 1; } + flag = ARKodeSetPreprocessRHSFn(arkode_mem, preprocess_stage); + if (check_flag(flag, "ARKodeSetPreprocessRHSFn")) { return 1; } + flag = ARKodeSetPostprocessStageFn(arkode_mem, postprocess_stage); + if (check_flag(flag, "ARKodeSetPostprocessStageFn")) { return 1; } + + // Initial time and fist output time + const sunrealtype dtout = one; // output interval + const int nout = 3; // number of outputs + sunrealtype tret = zero; + sunrealtype tout = tret + dtout; + + const int width = numeric_limits::digits10 + 8; + + // Output initial contion + cout << scientific; + cout << setprecision(numeric_limits::digits10); + cout << setw(width) << " t"; + cout << setw(width) << " y"; + cout << setw(width) << " y err" << endl; + for (int i = 0; i < 3 * width; i++) { cout << "-"; } + cout << endl; + + sunrealtype* y_data = N_VGetArrayPointer(y); + + cout << setw(width) << tret << setw(width) << y_data[0] << setw(width) + << abs(y_data[0] - true_solution(tret)) << endl; + + // Advance in time + for (int i = 0; i < nout; i++) + { + flag = ARKodeEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); + if (check_flag(flag, "ARKodeEvolve")) { return 1; } + + cout << setw(width) << tret << setw(width) << y_data[0] << setw(width) + << abs(y_data[0] - true_solution(tret)) << endl; + + // update output time + tout += dtout; + } + for (int i = 0; i < 3 * width; i++) { cout << "-"; } + cout << endl; + + // Print some final statistics + flag = ARKodePrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); + if (check_flag(flag, "ARKodePrintAllStats")) { return 1; } + + // Clean up and return with successful completion + N_VDestroy(y); + ARKodeFree(&arkode_mem); + + cout << "End LSRKStep StageInfo test" << endl; + + return 0; +} + +/*---- end of file ----*/ diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp new file mode 100644 index 0000000000..b2753ce5ad --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp @@ -0,0 +1,263 @@ +/* ----------------------------------------------------------------------------- + * Programmer(s): Daniel R. Reynolds @ UMBC + * ----------------------------------------------------------------------------- + * SUNDIALS Copyright Start + * Copyright (c) 2025-2026, Lawrence Livermore National Security, + * University of Maryland Baltimore County, and the SUNDIALS contributors. + * Copyright (c) 2013-2025, Lawrence Livermore National Security + * and Southern Methodist University. + * Copyright (c) 2002-2013, Lawrence Livermore National Security. + * All rights reserved. + * + * See the top-level LICENSE and NOTICE files for details. + * + * SPDX-License-Identifier: BSD-3-Clause + * SUNDIALS Copyright End + * ----------------------------------------------------------------------------- + * Test stage information and pre/postprocessing routines in MRIStep + * ---------------------------------------------------------------------------*/ + +#include +#include +#include +#include +#include + +// Include desired integrators, vectors, linear solvers, and nonlinear solvers +#include "arkode/arkode.h" +#include "arkode/arkode_arkstep.h" +#include "arkode/arkode_mristep.h" +#include "nvector/nvector_serial.h" +#include "sundials/sundials_context.hpp" +#include "sundials/sundials_iterative.h" +#include "sundials/sundials_matrix.h" +#include "sunlinsol/sunlinsol_spgmr.h" + +#include "problems/kpr.hpp" +#include "utilities/check_return.hpp" + +using namespace std; +using namespace problems::kpr; + +// store the main integrator global memory for these tests only, so that we +// can call ARKodeGetLastTime etc in the callback functions from stageinfo.hpp. +// This would normally be stored in user_data, but here we reuse problem +// defintions from other tests. +void* arkode_mem = nullptr; + +// Include the pre/post step and stage processing routines now that arkode_mem is defined +#include "stageinfo.hpp" + + +int main(int argc, char* argv[]) +{ + cout << "Start MRIStep StageInfo test" << endl; + + // SUNDIALS context object for this simulation + sundials::Context sunctx; + + // Method to use: + // 0 = Ex-MRI-GARK + // 1 = Im-MRI-GARK + // 2 = ImEx-MRI-GARK + // 3 = Ex-MRI-SR + // 4 = Im-MRI-SR + // 5 = ImEx-MRI-SR + // 6 = MERK + int method_type = 0; + if (argc > 1) { method_type = stoi(argv[1]); } + + // Create initial condition + N_Vector y = N_VNew_Serial(2, sunctx); + if (check_ptr(y, "N_VNew_Serial")) { return 1; } + + sunrealtype utrue, vtrue; + int flag = true_sol(zero, &utrue, &vtrue); + if (check_flag(flag, "true_sol")) { return 1; } + + sunrealtype* ydata = N_VGetArrayPointer(y); + ydata[0] = utrue; + ydata[1] = vtrue; + + // Create fast stepper + void* inner_arkode_mem = ARKStepCreate(ode_rhs_ff, nullptr, zero, y, sunctx); + if (check_ptr(inner_arkode_mem, "ARKStepCreate")) { return 1; } + + flag = ARKodeSetUserData(inner_arkode_mem, &problem_data); + if (check_flag(flag, "ARKodeSetUserData")) { return 1; } + + // Relative and absolute tolerances + const sunrealtype inner_rtol = SUN_RCONST(1.0e-6); + const sunrealtype inner_atol = SUN_RCONST(1.0e-10); + + flag = ARKodeSStolerances(inner_arkode_mem, inner_rtol, inner_atol); + if (check_flag(flag, "ARKodeSStolerances")) { return 1; } + + MRIStepInnerStepper stepper = nullptr; + flag = ARKStepCreateMRIStepInnerStepper(inner_arkode_mem, &stepper); + if (check_flag(flag, "ARKStepCreateMRIStepInnerStepper")) { return 1; } + + // Create MRIStep memory structure + if (method_type == 0) + { + cout << "Using Ex-MRI-GARK method" << endl; + arkode_mem = MRIStepCreate(ode_rhs_s, nullptr, zero, y, stepper, sunctx); + if (check_ptr(arkode_mem, "MRIStepCreate")) { return 1; } + } + else if (method_type == 1) + { + cout << "Using Im-MRI-GARK method" << endl; + arkode_mem = MRIStepCreate(nullptr, ode_rhs_s, zero, y, stepper, sunctx); + if (check_ptr(arkode_mem, "MRIStepCreate")) { return 1; } + } + else if (method_type == 2) + { + cout << "Using ImEx-MRI-GARK method" << endl; + arkode_mem = MRIStepCreate(ode_rhs_se, ode_rhs_si, zero, y, stepper, sunctx); + if (check_ptr(arkode_mem, "MRIStepCreate")) { return 1; } + } + else if (method_type == 3) + { + cout << "Using Ex-MRI-SR method" << endl; + arkode_mem = MRIStepCreate(ode_rhs_s, nullptr, zero, y, stepper, sunctx); + if (check_ptr(arkode_mem, "MRIStepCreate")) { return 1; } + } + else if (method_type == 4) + { + cout << "Using Im-MRI-SR method" << endl; + arkode_mem = MRIStepCreate(nullptr, ode_rhs_s, zero, y, stepper, sunctx); + if (check_ptr(arkode_mem, "MRIStepCreate")) { return 1; } + } + else if (method_type == 5) + { + cout << "Using ImEx-MRI-SR method" << endl; + arkode_mem = MRIStepCreate(ode_rhs_se, ode_rhs_si, zero, y, stepper, sunctx); + if (check_ptr(arkode_mem, "MRIStepCreate")) { return 1; } + } + else if (method_type == 6) + { + cout << "Using MERK method" << endl; + arkode_mem = MRIStepCreate(ode_rhs_s, nullptr, zero, y, stepper, sunctx); + if (check_ptr(arkode_mem, "MRIStepCreate")) { return 1; } + } + else + { + cerr << "ERROR: Invalid method type option " << method_type; + return 1; + } + + // Set MRI-SR or MERK method + MRIStepCoupling C = nullptr; + if (method_type == 3 || method_type == 4 || method_type == 5) + { + C = MRIStepCoupling_LoadTable(ARKODE_IMEX_MRI_SR32); + if (check_ptr(C, "MRIStepCoupling_LoadTable")) { return 1; } + } + else if (method_type == 6) + { + C = MRIStepCoupling_LoadTable(ARKODE_MERK32); + if (check_ptr(C, "MRIStepCoupling_LoadTable")) { return 1; } + } + + if (C) + { + flag = MRIStepSetCoupling(arkode_mem, C); + if (check_flag(flag, "MRIStepSetCoupling")) { return 1; } + MRIStepCoupling_Free(C); + } + + flag = ARKodeSetUserData(arkode_mem, &problem_data); + if (check_flag(flag, "ARKodeSetUserData")) { return 1; } + + // Relative and absolute tolerances + const sunrealtype rtol = SUN_RCONST(1.0e-6); + const sunrealtype atol = SUN_RCONST(1.0e-10); + + flag = ARKodeSStolerances(arkode_mem, rtol, atol); + if (check_flag(flag, "ARKodeSStolerances")) { return 1; } + + SUNMatrix A = nullptr; + SUNLinearSolver LS = nullptr; + + if (method_type == 1 || method_type == 2 || method_type == 4 || method_type == 5) + { + cout << "Using Newton nonlinear solver" << endl; + cout << "Using GMRES iterative linear solver" << endl; + + LS = SUNLinSol_SPGMR(y, SUN_PREC_NONE, 0, sunctx); + if (check_ptr(LS, "SUNLinSol_SPGMR")) { return 1; } + + flag = ARKodeSetLinearSolver(arkode_mem, LS, A); + if (check_flag(flag, "ARKodeSetLinearSolver")) { return 1; } + } + + // Set pre/post step and stage routines + flag = ARKodeSetPreprocessStepFn(arkode_mem, preprocess_step); + if (check_flag(flag, "ARKodeSetPreprocessStepFn")) { return 1; } + flag = ARKodeSetPostprocessStepFn(arkode_mem, postprocess_step); + if (check_flag(flag, "ARKodeSetPostprocessStepFn")) { return 1; } + flag = ARKodeSetPostprocessStepFailFn(arkode_mem, postprocess_step_fail); + if (check_flag(flag, "ARKodeSetPostprocessStepFailFn")) { return 1; } + flag = ARKodeSetPreprocessRHSFn(arkode_mem, preprocess_stage); + if (check_flag(flag, "ARKodeSetPreprocessRHSFn")) { return 1; } + flag = ARKodeSetPostprocessStageFn(arkode_mem, postprocess_stage); + if (check_flag(flag, "ARKodeSetPostprocessStageFn")) { return 1; } + + // Initial time and fist output time + const sunrealtype dtout = one; // output interval + const int nout = 3; // number of outputs + sunrealtype tret = zero; + sunrealtype tout = tret + dtout; + + // Output initial contion + cout << scientific; + cout << setprecision(numeric_limits::digits10); + cout << " t "; + cout << " u "; + cout << " v "; + cout << " u err "; + cout << " v err " << endl; + for (int i = 0; i < 9; i++) { cout << "--------------"; } + cout << endl; + + cout << setw(22) << tret << setw(25) << ydata[0] << setw(25) << ydata[1] + << setw(25) << abs(ydata[0] - utrue) << setw(25) << abs(ydata[1] - vtrue) + << endl; + + // Advance in time + for (int i = 0; i < nout; i++) + { + flag = ARKodeEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); + if (check_flag(flag, "ARKode")) { return 1; } + + flag = true_sol(tret, &utrue, &vtrue); + if (check_flag(flag, "true_sol")) { return 1; } + + cout << setw(22) << tret << setw(25) << ydata[0] << setw(25) << ydata[1] + << setw(25) << abs(ydata[0] - utrue) << setw(25) + << abs(ydata[1] - vtrue) << endl; + + // update output time + tout += dtout; + } + for (int i = 0; i < 9; i++) { cout << "--------------"; } + cout << endl; + + // Print some final statistics + flag = ARKodePrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); + if (check_flag(flag, "ARKodePrintAllStats")) { return 1; } + + // Clean up and return with successful completion + N_VDestroy(y); + SUNMatDestroy(A); + SUNLinSolFree(LS); + MRIStepInnerStepper_Free(&stepper); + ARKodeFree(&inner_arkode_mem); + ARKodeFree(&arkode_mem); + + cout << "End MRIStep StageInfo test" << endl; + + return 0; +} + +/*---- end of file ----*/ diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp new file mode 100644 index 0000000000..731e1883be --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp @@ -0,0 +1,176 @@ +/* ----------------------------------------------------------------------------- + * Programmer(s): Daniel R. Reynolds @ UMBC + * ----------------------------------------------------------------------------- + * SUNDIALS Copyright Start + * Copyright (c) 2025-2026, Lawrence Livermore National Security, + * University of Maryland Baltimore County, and the SUNDIALS contributors. + * Copyright (c) 2013-2025, Lawrence Livermore National Security + * and Southern Methodist University. + * Copyright (c) 2002-2013, Lawrence Livermore National Security. + * All rights reserved. + * + * See the top-level LICENSE and NOTICE files for details. + * + * SPDX-License-Identifier: BSD-3-Clause + * SUNDIALS Copyright End + * ----------------------------------------------------------------------------- + * Test stage information and pre/postprocessing routines in SplittingStep + * ---------------------------------------------------------------------------*/ + +#include +#include +#include +#include +#include + +// Include desired integrators and vectors +#include "arkode/arkode_erkstep.h" +#include "arkode/arkode_splittingstep.h" +#include "nvector/nvector_serial.h" +#include "sundials/sundials_context.hpp" + +#include "problems/estep.hpp" +#include "utilities/check_return.hpp" + +using namespace std; +using namespace problems::estep; + +// store the main integrator global memory for these tests only, so that we +// can call ARKodeGetLastTime etc in the callback functions from stageinfo.hpp. +// This would normally be stored in user_data, but here we reuse problem +// defintions from other tests. +void* arkode_mem = nullptr; + +// Include the pre/post step and stage processing routines now that arkode_mem is defined +#include "stageinfo.hpp" + + +int main(int argc, char* argv[]) +{ + cout << "Start SplittingStep StageInfo test" << endl; + + // SUNDIALS context object for this simulation + sundials::Context sunctx; + + // Step sizes: overall, partition 1, partition 2 + sunrealtype dt = SUN_RCONST(0.001); + sunrealtype dt_1 = dt / 2; + sunrealtype dt_2 = dt / 4; + + // Create initial condition + N_Vector y = N_VNew_Serial(1, sunctx); + if (check_ptr(y, "N_VNew_Serial")) { return 1; } + + int flag = initial_condition(y); + if (check_flag(flag, "initial_condition")) { return 1; } + + // Create partition 1 integrator + void* stepper_1 = ERKStepCreate(ode_rhs_1, zero, y, sunctx); + if (check_ptr(stepper_1, "ERKStepCreate")) { return 1; } + + flag = ARKodeSetUserData(stepper_1, &problem_data); + if (check_flag(flag, "ARKodeSetUserData")) { return 1; } + + flag = ARKodeSetFixedStep(stepper_1, dt_1); + if (check_flag(flag, "ARKodeSetFixedStep")) { return 1; } + + // Create partition 1 integrator + void* stepper_2 = ERKStepCreate(ode_rhs_2, zero, y, sunctx); + if (check_ptr(stepper_2, "ERKStepCreate")) { return 1; } + + flag = ARKodeSetFixedStep(stepper_2, dt_2); + if (check_flag(flag, "ARKodeSetFixedStep")) { return 1; } + + // Create the overall integrator + SUNStepper steppers[2]; + + flag = ARKodeCreateSUNStepper(stepper_1, &steppers[0]); + if (check_flag(flag, "ARKodeSetFixedStep")) { return 1; } + + flag = ARKodeCreateSUNStepper(stepper_2, &steppers[1]); + if (check_flag(flag, "ARKodeSetFixedStep")) { return 1; } + + arkode_mem = SplittingStepCreate(steppers, 2, zero, y, sunctx); + if (check_ptr(arkode_mem, "SplittingStepCreate")) { return 1; } + + flag = ARKodeSetFixedStep(arkode_mem, dt); + if (check_flag(flag, "ARKodeSetFixedStep")) { return 1; } + + // Set pre/post step and stage routines + flag = ARKodeSetPreprocessStepFn(arkode_mem, preprocess_step); + if (check_flag(flag, "ARKodeSetPreprocessStepFn")) { return 1; } + flag = ARKodeSetPostprocessStepFn(arkode_mem, postprocess_step); + if (check_flag(flag, "ARKodeSetPostprocessStepFn")) { return 1; } + flag = ARKodeSetPostprocessStepFailFn(arkode_mem, postprocess_step_fail); + if (check_flag(flag, "ARKodeSetPostprocessStepFailFn")) { return 1; } + flag = ARKodeSetPreprocessRHSFn(arkode_mem, preprocess_stage); + if (check_flag(flag, "ARKodeSetPreprocessRHSFn")) { return 1; } + flag = ARKodeSetPostprocessStageFn(arkode_mem, postprocess_stage); + if (check_flag(flag, "ARKodeSetPostprocessStageFn")) { return 1; } + + // True solution vector + N_Vector yt = N_VClone(y); + + flag = true_solution(zero, problem_data, yt); + if (check_flag(flag, "true_solution")) { return 1; } + + // Initial time and fist output time + const sunrealtype dtout = one; // output interval + const int nout = 3; // number of outputs + sunrealtype tret = zero; + sunrealtype tout = tret + dtout; + + const int width = numeric_limits::digits10 + 8; + + // Output initial contion + cout << scientific; + cout << setprecision(numeric_limits::digits10); + cout << setw(width) << " t"; + cout << setw(width) << " y"; + cout << setw(width) << " y err" << endl; + for (int i = 0; i < 3 * width; i++) { cout << "-"; } + cout << endl; + + sunrealtype* y_data = N_VGetArrayPointer(y); + sunrealtype* yt_data = N_VGetArrayPointer(yt); + + cout << setw(width) << tret << setw(width) << y_data[0] << setw(width) + << abs(y_data[0] - yt_data[0]) << endl; + + // Advance in time + for (int i = 0; i < nout; i++) + { + flag = ARKodeEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); + if (check_flag(flag, "ARKodeEvolve")) { return 1; } + + flag = true_solution(tret, problem_data, yt); + if (check_flag(flag, "true_solution")) { return 1; } + + cout << setw(width) << tret << setw(width) << y_data[0] << setw(width) + << abs(y_data[0] - yt_data[0]) << endl; + + // update output time + tout += dtout; + } + for (int i = 0; i < 3 * width; i++) { cout << "-"; } + cout << endl; + + // Print some final statistics + flag = ARKodePrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); + if (check_flag(flag, "ARKodePrintAllStats")) { return 1; } + + // Clean up and return with successful completion + N_VDestroy(y); + N_VDestroy(yt); + ARKodeFree(&arkode_mem); + ARKodeFree(&stepper_1); + ARKodeFree(&stepper_2); + SUNStepper_Destroy(&steppers[0]); + SUNStepper_Destroy(&steppers[1]); + + cout << "End SplittingStep StageInfo test" << endl; + + return 0; +} + +/*---- end of file ----*/ diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp new file mode 100644 index 0000000000..edc9b75bc0 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp @@ -0,0 +1,134 @@ +/* ----------------------------------------------------------------------------- + * Programmer(s): Daniel R. Reynolds @ UMBC + * ----------------------------------------------------------------------------- + * SUNDIALS Copyright Start + * Copyright (c) 2025-2026, Lawrence Livermore National Security, + * University of Maryland Baltimore County, and the SUNDIALS contributors. + * Copyright (c) 2013-2025, Lawrence Livermore National Security + * and Southern Methodist University. + * Copyright (c) 2002-2013, Lawrence Livermore National Security. + * All rights reserved. + * + * See the top-level LICENSE and NOTICE files for details. + * + * SPDX-License-Identifier: BSD-3-Clause + * SUNDIALS Copyright End + * ----------------------------------------------------------------------------- + * Test stage information and pre/postprocessing routines in SPRKStep + * ---------------------------------------------------------------------------*/ + +#include +#include +#include +#include +#include + +// Include desired integrators, vectors, linear solvers, and nonlinear solvers +#include "arkode/arkode_sprkstep.h" +#include "nvector/nvector_serial.h" +#include "sundials/sundials_context.hpp" + +#include "problems/kepler.hpp" +#include "utilities/check_return.hpp" + +using namespace std; +using namespace problems::kepler; + +// store the main integrator global memory for these tests only, so that we +// can call ARKodeGetLastTime etc in the callback functions from stageinfo.hpp. +// This would normally be stored in user_data, but here we reuse problem +// defintions from other tests. +void* arkode_mem = nullptr; + +// Include the pre/post step and stage processing routines now that arkode_mem is defined +#include "stageinfo.hpp" + + +int main(int argc, char* argv[]) +{ + cout << "Start SPRKStep StageInfo test" << endl; + + // SUNDIALS context object for this simulation + sundials::Context sunctx; + + // Create initial condition + N_Vector y = N_VNew_Serial(4, sunctx); + if (check_ptr(y, "N_VNew_Serial")) { return 1; } + + int flag = initial_condition(y, eccentricity); + if (check_flag(flag, "initial_condition")) { return 1; } + + // Create SPRKStep memory structure + arkode_mem = SPRKStepCreate(ode_rhs_force, ode_rhs_velocity, zero, y, + sunctx); + if (check_ptr(arkode_mem, "SPKStepCreate")) { return 1; } + + // Step size + const sunrealtype dt = SUN_RCONST(0.001); + flag = ARKodeSetFixedStep(arkode_mem, dt); + if (check_flag(flag, "ARKodeSetFixedStep")) { return 1; } + + // Set pre/post step and stage routines + flag = ARKodeSetPreprocessStepFn(arkode_mem, preprocess_step); + if (check_flag(flag, "ARKodeSetPreprocessStepFn")) { return 1; } + flag = ARKodeSetPostprocessStepFn(arkode_mem, postprocess_step); + if (check_flag(flag, "ARKodeSetPostprocessStepFn")) { return 1; } + flag = ARKodeSetPostprocessStepFailFn(arkode_mem, postprocess_step_fail); + if (check_flag(flag, "ARKodeSetPostprocessStepFailFn")) { return 1; } + flag = ARKodeSetPreprocessRHSFn(arkode_mem, preprocess_stage); + if (check_flag(flag, "ARKodeSetPreprocessRHSFn")) { return 1; } + flag = ARKodeSetPostprocessStageFn(arkode_mem, postprocess_stage); + if (check_flag(flag, "ARKodeSetPostprocessStageFn")) { return 1; } + + // Initial time and fist output time + const sunrealtype dtout = dt; // output interval + const int nout = 3; // number of outputs + sunrealtype tret = zero; + sunrealtype tout = tret + dtout; + + // Output initial contion + sunrealtype* ydata = N_VGetArrayPointer(y); + if (check_ptr(y, "N_VGetArrayPointer")) { return 1; } + + cout << scientific; + cout << setprecision(numeric_limits::digits10); + cout << " t "; + cout << " q1 "; + cout << " q2 "; + cout << " q3 "; + cout << " q4 " << endl; + for (int i = 0; i < 9; i++) { cout << "--------------"; } + cout << endl; + + cout << setw(22) << tret << setw(25) << ydata[0] << setw(25) << ydata[1] + << setw(25) << ydata[2] << setw(25) << ydata[3] << endl; + + // Advance in time + for (int i = 0; i < nout; i++) + { + flag = ARKodeEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); + if (check_flag(flag, "ARKodeEvolve")) { return 1; } + + cout << setw(22) << tret << setw(25) << ydata[0] << setw(25) << ydata[1] + << setw(25) << ydata[2] << setw(25) << ydata[3] << endl; + + // update output time + tout += dtout; + } + for (int i = 0; i < 9; i++) { cout << "--------------"; } + cout << endl; + + // Print some final statistics + flag = ARKodePrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); + if (check_flag(flag, "ARKodePrintAllStats")) { return 1; } + + // Clean up and return with successful completion + N_VDestroy(y); + ARKodeFree(&arkode_mem); + + cout << "End SPRKStep StageInfo test" << endl; + + return 0; +} + +/*---- end of file ----*/ diff --git a/test/unit_tests/arkode/CXX_serial/stageinfo.hpp b/test/unit_tests/arkode/CXX_serial/stageinfo.hpp new file mode 100644 index 0000000000..96014da32c --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/stageinfo.hpp @@ -0,0 +1,142 @@ +/* ----------------------------------------------------------------------------- + * Programmer(s): Daniel R. Reynolds @ UMBC + * ----------------------------------------------------------------------------- + * SUNDIALS Copyright Start + * Copyright (c) 2025-2026, Lawrence Livermore National Security, + * University of Maryland Baltimore County, and the SUNDIALS contributors. + * Copyright (c) 2013-2025, Lawrence Livermore National Security + * and Southern Methodist University. + * Copyright (c) 2002-2013, Lawrence Livermore National Security. + * All rights reserved. + * + * See the top-level LICENSE and NOTICE files for details. + * + * SPDX-License-Identifier: BSD-3-Clause + * SUNDIALS Copyright End + * ----------------------------------------------------------------------------- + * Utility routines for various "ark_test_stageinfo" unit tests. + * ---------------------------------------------------------------------------*/ + +#ifndef STAGEINFO_HPP_ +#define STAGEINFO_HPP_ + +#include "arkode/arkode.h" +#include "sundials/sundials_math.h" + +int preprocess_step(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Pre-step processing at t = " << std::setprecision(2) + << t << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) << "||y||_2 = " + << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; + return 0; +} + + +int postprocess_step(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Post-step processing at t = " << std::setprecision(2) + << t << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) << "||y||_2 = " + << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; + return 0; +} + + +int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Post-step failure processing at t = " << std::setprecision(2) + << t << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) << "||y||_2 = " + << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; + return 0; +} + + +int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) +{ + int stage, max_stages; + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetStageIndex" << std::endl; + return -1; + } + std::cout << " [Pre-RHS processing (stage " << stage << " of " << max_stages + << ") at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " + << tcur << "), " << std::setprecision(10) << "||y||_2 = " + << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; + return 0; +} + + +int postprocess_stage(sunrealtype t, N_Vector y, void* user_data) +{ + int stage, max_stages; + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetStageIndex" << std::endl; + return -1; + } + std::cout << " [Post-stage processing (stage " << stage << " of " << max_stages + << ") at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " + << tcur << "), " << std::setprecision(10) << "||y||_2 = " + << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; + return 0; +} + +#endif // STAGEINFO_HPP_ From 9221ee5761cfcdee6b85d2eea51ac0608829b9f0 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 29 Jan 2026 12:19:25 -0500 Subject: [PATCH 062/298] Applied litgen patch for Python bindings --- bindings/sundials4py/arkode/arkode_generated.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bindings/sundials4py/arkode/arkode_generated.hpp b/bindings/sundials4py/arkode/arkode_generated.hpp index e5e6bba6c3..a494d031d4 100644 --- a/bindings/sundials4py/arkode/arkode_generated.hpp +++ b/bindings/sundials4py/arkode/arkode_generated.hpp @@ -202,6 +202,9 @@ m.def("ARKodeSetFixedStep", ARKodeSetFixedStep, nb::arg("arkode_mem"), m.def("ARKodeSetStepDirection", ARKodeSetStepDirection, nb::arg("arkode_mem"), nb::arg("stepdir")); +m.def("ARKodeAllocateInternalData", ARKodeAllocateInternalData, + nb::arg("arkode_mem")); + m.def("ARKodeSetNonlinearSolver", ARKodeSetNonlinearSolver, nb::arg("arkode_mem"), nb::arg("NLS")); From f43fffc7a23fa3e3bc42f382443ae920238df127 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 29 Jan 2026 12:20:52 -0500 Subject: [PATCH 063/298] Formatting --- .../CXX_serial/ark_test_stageinfo_arkstep.cpp | 1 - .../CXX_serial/ark_test_stageinfo_erkstep.cpp | 1 - .../ark_test_stageinfo_forcingstep.cpp | 1 - .../ark_test_stageinfo_lsrkstep.cpp | 1 - .../CXX_serial/ark_test_stageinfo_mristep.cpp | 1 - .../ark_test_stageinfo_splittingstep.cpp | 1 - .../ark_test_stageinfo_sprkstep.cpp | 4 +- .../arkode/CXX_serial/stageinfo.hpp | 48 ++++++++++--------- 8 files changed, 26 insertions(+), 32 deletions(-) diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp index 1fc2e9e691..098097859c 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp @@ -45,7 +45,6 @@ void* arkode_mem = nullptr; // Include the pre/post step and stage processing routines now that arkode_mem is defined #include "stageinfo.hpp" - int main(int argc, char* argv[]) { cout << "Start ARKStep StageInfo test" << endl; diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp index db0d5f4b11..ee00bded48 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp @@ -43,7 +43,6 @@ void* arkode_mem = nullptr; // Include the pre/post step and stage processing routines now that arkode_mem is defined #include "stageinfo.hpp" - int main(int argc, char* argv[]) { cout << "Start ERKStep StageInfo test" << endl; diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp index 1358759130..9300613873 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp @@ -44,7 +44,6 @@ void* arkode_mem = nullptr; // Include the pre/post step and stage processing routines now that arkode_mem is defined #include "stageinfo.hpp" - int main(int argc, char* argv[]) { cout << "Start ForcingStep StageInfo test" << endl; diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp index d9147986de..438f80fa12 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp @@ -43,7 +43,6 @@ void* arkode_mem = nullptr; // Include the pre/post step and stage processing routines now that arkode_mem is defined #include "stageinfo.hpp" - int main(int argc, char* argv[]) { cout << "Start LSRKStep StageInfo test" << endl; diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp index b2753ce5ad..2c51d1876b 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp @@ -48,7 +48,6 @@ void* arkode_mem = nullptr; // Include the pre/post step and stage processing routines now that arkode_mem is defined #include "stageinfo.hpp" - int main(int argc, char* argv[]) { cout << "Start MRIStep StageInfo test" << endl; diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp index 731e1883be..2a29241a78 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp @@ -44,7 +44,6 @@ void* arkode_mem = nullptr; // Include the pre/post step and stage processing routines now that arkode_mem is defined #include "stageinfo.hpp" - int main(int argc, char* argv[]) { cout << "Start SplittingStep StageInfo test" << endl; diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp index edc9b75bc0..569a464c1e 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp @@ -43,7 +43,6 @@ void* arkode_mem = nullptr; // Include the pre/post step and stage processing routines now that arkode_mem is defined #include "stageinfo.hpp" - int main(int argc, char* argv[]) { cout << "Start SPRKStep StageInfo test" << endl; @@ -59,8 +58,7 @@ int main(int argc, char* argv[]) if (check_flag(flag, "initial_condition")) { return 1; } // Create SPRKStep memory structure - arkode_mem = SPRKStepCreate(ode_rhs_force, ode_rhs_velocity, zero, y, - sunctx); + arkode_mem = SPRKStepCreate(ode_rhs_force, ode_rhs_velocity, zero, y, sunctx); if (check_ptr(arkode_mem, "SPKStepCreate")) { return 1; } // Step size diff --git a/test/unit_tests/arkode/CXX_serial/stageinfo.hpp b/test/unit_tests/arkode/CXX_serial/stageinfo.hpp index 96014da32c..8898ad8a71 100644 --- a/test/unit_tests/arkode/CXX_serial/stageinfo.hpp +++ b/test/unit_tests/arkode/CXX_serial/stageinfo.hpp @@ -36,14 +36,14 @@ int preprocess_step(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; return -1; } - std::cout << " [Pre-step processing at t = " << std::setprecision(2) - << t << " (tn = " << tn << " , tcur = " << tcur << ")," - << std::setprecision(10) << "||y||_2 = " - << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; + std::cout << " [Pre-step processing at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; return 0; } - int postprocess_step(sunrealtype t, N_Vector y, void* user_data) { sunrealtype tn, tcur; @@ -57,14 +57,14 @@ int postprocess_step(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; return -1; } - std::cout << " [Post-step processing at t = " << std::setprecision(2) - << t << " (tn = " << tn << " , tcur = " << tcur << ")," - << std::setprecision(10) << "||y||_2 = " - << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; + std::cout << " [Post-step processing at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; return 0; } - int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) { sunrealtype tn, tcur; @@ -78,14 +78,14 @@ int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; return -1; } - std::cout << " [Post-step failure processing at t = " << std::setprecision(2) - << t << " (tn = " << tn << " , tcur = " << tcur << ")," - << std::setprecision(10) << "||y||_2 = " - << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; + std::cout << " [Post-step failure processing at t = " + << std::setprecision(2) << t << " (tn = " << tn + << " , tcur = " << tcur << ")," << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; return 0; } - int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) { int stage, max_stages; @@ -106,13 +106,13 @@ int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) return -1; } std::cout << " [Pre-RHS processing (stage " << stage << " of " << max_stages - << ") at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " - << tcur << "), " << std::setprecision(10) << "||y||_2 = " - << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; + << ") at t = " << std::setprecision(2) << t << " (tn = " << tn + << " , tcur = " << tcur << "), " << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; return 0; } - int postprocess_stage(sunrealtype t, N_Vector y, void* user_data) { int stage, max_stages; @@ -132,10 +132,12 @@ int postprocess_stage(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetStageIndex" << std::endl; return -1; } - std::cout << " [Post-stage processing (stage " << stage << " of " << max_stages - << ") at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " - << tcur << "), " << std::setprecision(10) << "||y||_2 = " - << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; + std::cout << " [Post-stage processing (stage " << stage << " of " + << max_stages << ") at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << "), " + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; return 0; } From 45ef4ee3132b2687987e63abb3852b52581bb7a7 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 29 Jan 2026 12:33:06 -0500 Subject: [PATCH 064/298] Fixed minor differences in .out files for Jenkins --- examples/arkode/CXX_manyvector/ark_sod_lsrk.out | 14 +++++++------- examples/arkode/C_serial/ark_analytic_ssprk.out | 6 +++--- .../test_logging_arkode_lsrkstep_lvl3_2.out | 2 +- .../test_logging_arkode_lsrkstep_lvl3_3.out | 10 +++++----- .../test_logging_arkode_lsrkstep_lvl3_5.out | 6 +++--- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/examples/arkode/CXX_manyvector/ark_sod_lsrk.out b/examples/arkode/CXX_manyvector/ark_sod_lsrk.out index b5eb79a673..54b639599a 100644 --- a/examples/arkode/CXX_manyvector/ark_sod_lsrk.out +++ b/examples/arkode/CXX_manyvector/ark_sod_lsrk.out @@ -1,21 +1,21 @@ Problem parameters and options: - --------------------------------- + --------------------------------- gamma = 1.4 - --------------------------------- + --------------------------------- tf = 0.1 xl = 0 xr = 1 nx = 512 dx = 0.00195312 - --------------------------------- + --------------------------------- integrator = ARKODE_LSRK_SSP_10_4 rtol = 0.0001 atol = 1e-11 fixed h = 0 - --------------------------------- + --------------------------------- output = 1 - --------------------------------- + --------------------------------- t ||rho|| ||mx|| ||my|| ||mz|| ||et|| -------------------------------------------------------------------------- @@ -42,7 +42,7 @@ Error test fails = 96 NLS step fails = 0 Inequality constraint fails = 0 Initial step size = 1.12228425974954e-14 -Last step size = 0.000245077722421064 -Current step size = 0.000245077722421064 +Last step size = 0.000245077738498855 +Current step size = 0.000245077738498855 RHS fn evals = 3886 Number of stages used = 10 diff --git a/examples/arkode/C_serial/ark_analytic_ssprk.out b/examples/arkode/C_serial/ark_analytic_ssprk.out index 859c294453..b5cac32ac5 100644 --- a/examples/arkode/C_serial/ark_analytic_ssprk.out +++ b/examples/arkode/C_serial/ark_analytic_ssprk.out @@ -19,7 +19,7 @@ Analytical ODE test problem: --------------------- Final Statistics: -Current time = 10.0099819208271 +Current time = 10.0099819131755 Steps = 719 Step attempts = 721 Stability limited steps = 0 @@ -28,8 +28,8 @@ Error test fails = 2 NLS step fails = 0 Inequality constraint fails = 0 Initial step size = 1.93010111094261e-10 -Last step size = 0.040487363965298 -Current step size = 0.04065435916964 +Last step size = 0.0404873638517102 +Current step size = 0.0406543588860424 RHS fn evals = 6489 Number of stages used = 9 diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_2.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_2.out index 57fb9d2e51..33eaafbdf7 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_2.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_2.out @@ -71,7 +71,7 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 8, tcur = 1.14611070421007e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 9, tcur = 1.28174438476562e-06 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 9, tcur = 1.28174438476563e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 10, tcur = 1.28174438476563e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_3.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_3.out index 72083f2b79..d1281b14da 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_3.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_3.out @@ -23,7 +23,7 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 9, tcur = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-compute-embedding] status = success [INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 6.103515625000001e-12 6.103515625000001e-12 0.000000000000000e+00 @@ -48,7 +48,7 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 9, tcur = 6.1041259765625e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-compute-embedding] status = success [INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 1.32348889930549e-13 6.104125976562500e-08 6.104125976562493e-08 0.000000000000000e+00 @@ -73,10 +73,10 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 9, tcur = 1.28174438476563e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-compute-embedding] status = success -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 1.67186954059802e-10 - 1.281744384765625e-06 1.281744384764923e-06 0.000000000000000e+00 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 1.65070663502083e-10 + 1.281744384765625e-06 1.281744384764923e-06 2.117582368135751e-22 --------------------------------------------------------------------- Current time = 1.28174438476563e-06 Steps = 3 diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_5.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_5.out index e75470b141..e5b1511541 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_5.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_5.out @@ -25,7 +25,7 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 10, tcur = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 8.07793566946316e-18 6.103515625000001e-12 6.103515625000001e-12 8.077935669463161e-28 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 6.103515625e-12, h = 6.103515625e-08 [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 0, tcur = 6.103515625e-12 @@ -75,8 +75,8 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 10, tcur = 1.28174438476563e-06 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 8.46516223087607e-12 - 1.281744384765625e-06 1.281744384764922e-06 6.352747104407253e-22 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 1.05814527885951e-11 + 1.281744384765625e-06 1.281744384764922e-06 8.470329472543003e-22 --------------------------------------------------------------------- Current time = 1.28174438476563e-06 Steps = 3 From 86d5eaf143acea55a99c50e49d39306e21d6a9db Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 29 Jan 2026 15:12:52 -0500 Subject: [PATCH 065/298] Fixed floating-point differences in .out files for Jenkins; added missing .out files for 'stageinfo' unit tests --- .../C_parallel/ark_diurnal_kry_bbd_p.out | 104 +-- .../arkode/C_parallel/ark_diurnal_kry_p.out | 53 +- .../arkode/C_parhyp/ark_diurnal_kry_ph.out | 53 +- .../arkode/C_serial/ark_KrylovDemo_prec.out | 652 +++++++++--------- .../arkode/C_serial/ark_KrylovDemo_prec_1.out | 652 +++++++++--------- .../arkode/C_serial/ark_KrylovDemo_prec_2.out | 652 +++++++++--------- .../ark_test_prealloc_arkstep_1.out | 12 +- .../ark_test_prealloc_erkstep_1.out | 12 +- .../ark_test_prealloc_lsrkstep_1.out | 6 +- .../ark_test_prealloc_sprkstep_1.out | 6 +- .../ark_test_stageinfo_arkstep_0.out | 60 ++ .../ark_test_stageinfo_arkstep_1.out | 79 +++ .../ark_test_stageinfo_arkstep_2.out | 87 +++ .../CXX_serial/ark_test_stageinfo_erkstep.out | 64 ++ .../ark_test_stageinfo_forcingstep.out | 28 + .../ark_test_stageinfo_lsrkstep_0.out | 44 ++ .../ark_test_stageinfo_lsrkstep_1.out | 44 ++ .../ark_test_stageinfo_lsrkstep_2.out | 87 +++ .../ark_test_stageinfo_lsrkstep_3.out | 81 +++ .../ark_test_stageinfo_lsrkstep_4.out | 51 ++ .../ark_test_stageinfo_lsrkstep_5.out | 90 +++ .../ark_test_stageinfo_mristep_0.out | 60 ++ .../ark_test_stageinfo_mristep_1.out | 89 +++ .../ark_test_stageinfo_mristep_2.out | 85 +++ .../ark_test_stageinfo_mristep_3.out | 72 ++ .../ark_test_stageinfo_mristep_4.out | 85 +++ .../ark_test_stageinfo_mristep_5.out | 85 +++ .../ark_test_stageinfo_mristep_6.out | 64 ++ .../ark_test_stageinfo_splittingstep.out | 28 + .../ark_test_stageinfo_sprkstep.out | 64 ++ 30 files changed, 2447 insertions(+), 1102 deletions(-) create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_0.out create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_1.out create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_2.out create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.out create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.out create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_0.out create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_1.out create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_2.out create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_3.out create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_4.out create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_5.out create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_0.out create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_1.out create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_2.out create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_3.out create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_4.out create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_5.out create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_6.out create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.out create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.out diff --git a/examples/arkode/C_parallel/ark_diurnal_kry_bbd_p.out b/examples/arkode/C_parallel/ark_diurnal_kry_bbd_p.out index a30074040d..a73795f274 100644 --- a/examples/arkode/C_parallel/ark_diurnal_kry_bbd_p.out +++ b/examples/arkode/C_parallel/ark_diurnal_kry_bbd_p.out @@ -8,57 +8,57 @@ Preconditioner type is: jpre = SUN_PREC_LEFT t = 7.20e+03 no. steps = 70 stepsize = 1.17e+02 -At bottom left: c1, c2 = 1.047e+04 2.527e+11 -At top right: c1, c2 = 1.118e+04 2.700e+11 +At bottom left: c1, c2 = 1.047e+04 2.527e+11 +At top right: c1, c2 = 1.118e+04 2.700e+11 t = 1.44e+04 no. steps = 97 stepsize = 5.42e+02 -At bottom left: c1, c2 = 6.659e+06 2.582e+11 -At top right: c1, c2 = 7.301e+06 2.833e+11 +At bottom left: c1, c2 = 6.659e+06 2.582e+11 +At top right: c1, c2 = 7.301e+06 2.833e+11 t = 2.16e+04 no. steps = 115 stepsize = 6.88e+02 -At bottom left: c1, c2 = 2.665e+07 2.993e+11 -At top right: c1, c2 = 2.931e+07 3.313e+11 +At bottom left: c1, c2 = 2.665e+07 2.993e+11 +At top right: c1, c2 = 2.931e+07 3.313e+11 t = 2.88e+04 no. steps = 133 stepsize = 2.55e+02 -At bottom left: c1, c2 = 8.702e+06 3.380e+11 -At top right: c1, c2 = 9.650e+06 3.751e+11 +At bottom left: c1, c2 = 8.702e+06 3.380e+11 +At top right: c1, c2 = 9.650e+06 3.751e+11 t = 3.60e+04 no. steps = 161 stepsize = 7.55e+01 -At bottom left: c1, c2 = 1.404e+04 3.387e+11 -At top right: c1, c2 = 1.561e+04 3.765e+11 +At bottom left: c1, c2 = 1.404e+04 3.387e+11 +At top right: c1, c2 = 1.561e+04 3.765e+11 t = 4.32e+04 no. steps = 201 stepsize = 1.77e+03 -At bottom left: c1, c2 = -1.994e-07 3.382e+11 -At top right: c1, c2 = 4.533e-06 3.804e+11 +At bottom left: c1, c2 = -1.994e-07 3.382e+11 +At top right: c1, c2 = 4.533e-06 3.804e+11 t = 5.04e+04 no. steps = 206 stepsize = 7.73e+02 -At bottom left: c1, c2 = -2.848e-08 3.358e+11 -At top right: c1, c2 = -1.542e-07 3.864e+11 +At bottom left: c1, c2 = -2.848e-08 3.358e+11 +At top right: c1, c2 = -1.542e-07 3.864e+11 t = 5.76e+04 no. steps = 210 stepsize = 1.55e+03 -At bottom left: c1, c2 = -8.395e-07 3.320e+11 -At top right: c1, c2 = -4.284e-07 3.909e+11 +At bottom left: c1, c2 = -8.395e-07 3.320e+11 +At top right: c1, c2 = -4.284e-07 3.909e+11 t = 6.48e+04 no. steps = 215 stepsize = 1.89e+03 -At bottom left: c1, c2 = 1.234e-08 3.313e+11 -At top right: c1, c2 = 9.230e-08 3.963e+11 +At bottom left: c1, c2 = 1.234e-08 3.313e+11 +At top right: c1, c2 = 9.230e-08 3.963e+11 t = 7.20e+04 no. steps = 218 stepsize = 2.21e+03 -At bottom left: c1, c2 = -4.001e-08 3.330e+11 -At top right: c1, c2 = -7.099e-06 4.039e+11 +At bottom left: c1, c2 = -4.001e-08 3.330e+11 +At top right: c1, c2 = -7.099e-06 4.039e+11 t = 7.92e+04 no. steps = 221 stepsize = 2.32e+03 -At bottom left: c1, c2 = 3.713e-08 3.334e+11 -At top right: c1, c2 = -3.992e-07 4.120e+11 +At bottom left: c1, c2 = 3.713e-08 3.334e+11 +At top right: c1, c2 = -3.992e-07 4.120e+11 t = 8.64e+04 no. steps = 224 stepsize = 2.47e+03 -At bottom left: c1, c2 = 3.734e-07 3.352e+11 -At top right: c1, c2 = 3.748e-07 4.163e+11 +At bottom left: c1, c2 = 3.734e-07 3.352e+11 +At top right: c1, c2 = 3.748e-07 4.163e+11 -Final Statistics: +Final Statistics: -lenrw = 4118 leniw = 291 +lenrw = 4118 leniw = 285 lenrwls = 2455 leniwls = 126 nst = 224 nfe = 0 nfe = 3315 nfels = 6886 @@ -77,57 +77,57 @@ In ARKBBDPRE: real/integer local work space sizes = 1300, 192 Preconditioner type is: jpre = SUN_PREC_RIGHT t = 7.20e+03 no. steps = 69 stepsize = 1.17e+02 -At bottom left: c1, c2 = 1.047e+04 2.527e+11 -At top right: c1, c2 = 1.118e+04 2.700e+11 +At bottom left: c1, c2 = 1.047e+04 2.527e+11 +At top right: c1, c2 = 1.118e+04 2.700e+11 t = 1.44e+04 no. steps = 96 stepsize = 5.40e+02 -At bottom left: c1, c2 = 6.659e+06 2.582e+11 -At top right: c1, c2 = 7.301e+06 2.833e+11 +At bottom left: c1, c2 = 6.659e+06 2.582e+11 +At top right: c1, c2 = 7.301e+06 2.833e+11 t = 2.16e+04 no. steps = 114 stepsize = 6.89e+02 -At bottom left: c1, c2 = 2.665e+07 2.993e+11 -At top right: c1, c2 = 2.931e+07 3.313e+11 +At bottom left: c1, c2 = 2.665e+07 2.993e+11 +At top right: c1, c2 = 2.931e+07 3.313e+11 t = 2.88e+04 no. steps = 131 stepsize = 1.93e+02 -At bottom left: c1, c2 = 8.702e+06 3.380e+11 -At top right: c1, c2 = 9.650e+06 3.751e+11 +At bottom left: c1, c2 = 8.702e+06 3.380e+11 +At top right: c1, c2 = 9.650e+06 3.751e+11 t = 3.60e+04 no. steps = 159 stepsize = 7.48e+01 -At bottom left: c1, c2 = 1.404e+04 3.387e+11 -At top right: c1, c2 = 1.561e+04 3.765e+11 +At bottom left: c1, c2 = 1.404e+04 3.387e+11 +At top right: c1, c2 = 1.561e+04 3.765e+11 t = 4.32e+04 no. steps = 199 stepsize = 1.75e+03 -At bottom left: c1, c2 = -1.508e-07 3.382e+11 -At top right: c1, c2 = -1.680e-07 3.804e+11 +At bottom left: c1, c2 = -1.508e-07 3.382e+11 +At top right: c1, c2 = -1.680e-07 3.804e+11 t = 5.04e+04 no. steps = 203 stepsize = 1.28e+03 -At bottom left: c1, c2 = 8.151e-09 3.358e+11 -At top right: c1, c2 = -1.358e-08 3.864e+11 +At bottom left: c1, c2 = 8.151e-09 3.358e+11 +At top right: c1, c2 = -1.358e-08 3.864e+11 t = 5.76e+04 no. steps = 208 stepsize = 9.65e+02 -At bottom left: c1, c2 = 5.968e-08 3.320e+11 -At top right: c1, c2 = 1.041e-08 3.909e+11 +At bottom left: c1, c2 = 5.968e-08 3.320e+11 +At top right: c1, c2 = 1.041e-08 3.909e+11 t = 6.48e+04 no. steps = 213 stepsize = 1.90e+03 -At bottom left: c1, c2 = -4.322e-09 3.313e+11 -At top right: c1, c2 = 4.258e-10 3.963e+11 +At bottom left: c1, c2 = -4.322e-09 3.313e+11 +At top right: c1, c2 = 4.258e-10 3.963e+11 t = 7.20e+04 no. steps = 216 stepsize = 2.21e+03 -At bottom left: c1, c2 = 1.431e-07 3.330e+11 -At top right: c1, c2 = 1.210e-06 4.039e+11 +At bottom left: c1, c2 = 1.431e-07 3.330e+11 +At top right: c1, c2 = 1.210e-06 4.039e+11 t = 7.92e+04 no. steps = 219 stepsize = 2.32e+03 -At bottom left: c1, c2 = 2.679e-08 3.334e+11 -At top right: c1, c2 = 1.594e-07 4.120e+11 +At bottom left: c1, c2 = 2.679e-08 3.334e+11 +At top right: c1, c2 = 1.594e-07 4.120e+11 t = 8.64e+04 no. steps = 222 stepsize = 2.47e+03 -At bottom left: c1, c2 = 6.003e-08 3.352e+11 -At top right: c1, c2 = -1.811e-07 4.163e+11 +At bottom left: c1, c2 = 6.003e-08 3.352e+11 +At top right: c1, c2 = -1.811e-07 4.163e+11 -Final Statistics: +Final Statistics: -lenrw = 4118 leniw = 297 +lenrw = 4118 leniw = 285 lenrwls = 2455 leniwls = 126 nst = 222 nfe = 0 nfe = 3244 nfels = 7604 diff --git a/examples/arkode/C_parallel/ark_diurnal_kry_p.out b/examples/arkode/C_parallel/ark_diurnal_kry_p.out index 62b62514e4..f1b4e6e840 100644 --- a/examples/arkode/C_parallel/ark_diurnal_kry_p.out +++ b/examples/arkode/C_parallel/ark_diurnal_kry_p.out @@ -2,57 +2,57 @@ 2-species diurnal advection-diffusion problem t = 7.20e+03 no. steps = 69 stepsize = 1.17e+02 -At bottom left: c1, c2 = 1.047e+04 2.527e+11 -At top right: c1, c2 = 1.118e+04 2.700e+11 +At bottom left: c1, c2 = 1.047e+04 2.527e+11 +At top right: c1, c2 = 1.118e+04 2.700e+11 t = 1.44e+04 no. steps = 96 stepsize = 5.41e+02 -At bottom left: c1, c2 = 6.659e+06 2.582e+11 -At top right: c1, c2 = 7.301e+06 2.833e+11 +At bottom left: c1, c2 = 6.659e+06 2.582e+11 +At top right: c1, c2 = 7.301e+06 2.833e+11 t = 2.16e+04 no. steps = 114 stepsize = 6.85e+02 -At bottom left: c1, c2 = 2.665e+07 2.993e+11 -At top right: c1, c2 = 2.931e+07 3.313e+11 +At bottom left: c1, c2 = 2.665e+07 2.993e+11 +At top right: c1, c2 = 2.931e+07 3.313e+11 t = 2.88e+04 no. steps = 128 stepsize = 2.01e+02 -At bottom left: c1, c2 = 8.702e+06 3.380e+11 -At top right: c1, c2 = 9.650e+06 3.751e+11 +At bottom left: c1, c2 = 8.702e+06 3.380e+11 +At top right: c1, c2 = 9.650e+06 3.751e+11 t = 3.60e+04 no. steps = 156 stepsize = 7.45e+01 -At bottom left: c1, c2 = 1.404e+04 3.387e+11 -At top right: c1, c2 = 1.561e+04 3.765e+11 +At bottom left: c1, c2 = 1.404e+04 3.387e+11 +At top right: c1, c2 = 1.561e+04 3.765e+11 t = 4.32e+04 no. steps = 196 stepsize = 1.75e+03 -At bottom left: c1, c2 = -4.884e-08 3.382e+11 -At top right: c1, c2 = -8.694e-07 3.804e+11 +At bottom left: c1, c2 = -4.884e-08 3.382e+11 +At top right: c1, c2 = -8.694e-07 3.804e+11 t = 5.04e+04 no. steps = 200 stepsize = 1.26e+03 -At bottom left: c1, c2 = -7.230e-09 3.358e+11 -At top right: c1, c2 = 3.094e-08 3.864e+11 +At bottom left: c1, c2 = -7.230e-09 3.358e+11 +At top right: c1, c2 = 3.094e-08 3.864e+11 t = 5.76e+04 no. steps = 205 stepsize = 1.08e+03 -At bottom left: c1, c2 = 4.422e-06 3.320e+11 -At top right: c1, c2 = -2.623e-05 3.909e+11 +At bottom left: c1, c2 = 4.422e-06 3.320e+11 +At top right: c1, c2 = -2.623e-05 3.909e+11 t = 6.48e+04 no. steps = 209 stepsize = 2.05e+03 -At bottom left: c1, c2 = 1.105e-08 3.313e+11 -At top right: c1, c2 = 7.165e-08 3.963e+11 +At bottom left: c1, c2 = 1.105e-08 3.313e+11 +At top right: c1, c2 = 7.165e-08 3.963e+11 t = 7.20e+04 no. steps = 213 stepsize = 2.13e+03 -At bottom left: c1, c2 = -4.810e-06 3.330e+11 -At top right: c1, c2 = -1.198e-04 4.039e+11 +At bottom left: c1, c2 = -4.810e-06 3.330e+11 +At top right: c1, c2 = -1.198e-04 4.039e+11 t = 7.92e+04 no. steps = 216 stepsize = 2.32e+03 -At bottom left: c1, c2 = 7.856e-08 3.334e+11 -At top right: c1, c2 = 6.407e-07 4.120e+11 +At bottom left: c1, c2 = 7.856e-08 3.334e+11 +At top right: c1, c2 = 6.407e-07 4.120e+11 t = 8.64e+04 no. steps = 219 stepsize = 2.47e+03 -At bottom left: c1, c2 = 1.878e-08 3.352e+11 -At top right: c1, c2 = 2.566e-08 4.163e+11 +At bottom left: c1, c2 = 1.878e-08 3.352e+11 +At top right: c1, c2 = 2.566e-08 4.163e+11 -Final Statistics: +Final Statistics: -lenrw = 3518 leniw = 267 +lenrw = 3518 leniw = 261 lenrwls = 2455 leniwls = 126 nst = 219 nfe = 0 nfi = 3215 nfels = 6952 @@ -60,4 +60,3 @@ nni = 2012 nli = 6952 nsetups = 72 netf = 21 npe = 6 nps = 8886 ncfn = 2 ncfl = 621 - diff --git a/examples/arkode/C_parhyp/ark_diurnal_kry_ph.out b/examples/arkode/C_parhyp/ark_diurnal_kry_ph.out index 0d5014c1e5..ac94a6d1cf 100644 --- a/examples/arkode/C_parhyp/ark_diurnal_kry_ph.out +++ b/examples/arkode/C_parhyp/ark_diurnal_kry_ph.out @@ -2,57 +2,57 @@ 2-species diurnal advection-diffusion problem t = 7.20e+03 no. steps = 69 stepsize = 1.17e+02 -At bottom left: c1, c2 = 1.047e+04 2.527e+11 -At top right: c1, c2 = 1.118e+04 2.700e+11 +At bottom left: c1, c2 = 1.047e+04 2.527e+11 +At top right: c1, c2 = 1.118e+04 2.700e+11 t = 1.44e+04 no. steps = 96 stepsize = 6.06e+02 -At bottom left: c1, c2 = 6.659e+06 2.582e+11 -At top right: c1, c2 = 7.301e+06 2.833e+11 +At bottom left: c1, c2 = 6.659e+06 2.582e+11 +At top right: c1, c2 = 7.301e+06 2.833e+11 t = 2.16e+04 no. steps = 115 stepsize = 7.13e+02 -At bottom left: c1, c2 = 2.665e+07 2.993e+11 -At top right: c1, c2 = 2.931e+07 3.313e+11 +At bottom left: c1, c2 = 2.665e+07 2.993e+11 +At top right: c1, c2 = 2.931e+07 3.313e+11 t = 2.88e+04 no. steps = 128 stepsize = 2.39e+02 -At bottom left: c1, c2 = 8.702e+06 3.380e+11 -At top right: c1, c2 = 9.650e+06 3.751e+11 +At bottom left: c1, c2 = 8.702e+06 3.380e+11 +At top right: c1, c2 = 9.650e+06 3.751e+11 t = 3.60e+04 no. steps = 157 stepsize = 7.95e+01 -At bottom left: c1, c2 = 1.404e+04 3.387e+11 -At top right: c1, c2 = 1.561e+04 3.765e+11 +At bottom left: c1, c2 = 1.404e+04 3.387e+11 +At top right: c1, c2 = 1.561e+04 3.765e+11 t = 4.32e+04 no. steps = 197 stepsize = 1.77e+03 -At bottom left: c1, c2 = -7.216e-06 3.382e+11 -At top right: c1, c2 = 4.224e-05 3.804e+11 +At bottom left: c1, c2 = -7.216e-06 3.382e+11 +At top right: c1, c2 = 4.224e-05 3.804e+11 t = 5.04e+04 no. steps = 202 stepsize = 8.73e+02 -At bottom left: c1, c2 = 4.566e-07 3.358e+11 -At top right: c1, c2 = 2.513e-07 3.864e+11 +At bottom left: c1, c2 = 4.566e-07 3.358e+11 +At top right: c1, c2 = 2.513e-07 3.864e+11 t = 5.76e+04 no. steps = 206 stepsize = 1.72e+03 -At bottom left: c1, c2 = 4.610e-07 3.320e+11 -At top right: c1, c2 = 3.216e-05 3.909e+11 +At bottom left: c1, c2 = 4.610e-07 3.320e+11 +At top right: c1, c2 = 3.216e-05 3.909e+11 t = 6.48e+04 no. steps = 212 stepsize = 1.90e+03 -At bottom left: c1, c2 = 2.291e-06 3.313e+11 -At top right: c1, c2 = -9.987e-06 3.963e+11 +At bottom left: c1, c2 = 2.291e-06 3.313e+11 +At top right: c1, c2 = -9.987e-06 3.963e+11 t = 7.20e+04 no. steps = 215 stepsize = 2.20e+03 -At bottom left: c1, c2 = 2.352e-06 3.330e+11 -At top right: c1, c2 = 4.867e-05 4.039e+11 +At bottom left: c1, c2 = 2.352e-06 3.330e+11 +At top right: c1, c2 = 4.867e-05 4.039e+11 t = 7.92e+04 no. steps = 218 stepsize = 2.31e+03 -At bottom left: c1, c2 = 9.645e-07 3.334e+11 -At top right: c1, c2 = 1.907e-05 4.120e+11 +At bottom left: c1, c2 = 9.645e-07 3.334e+11 +At top right: c1, c2 = 1.907e-05 4.120e+11 t = 8.64e+04 no. steps = 221 stepsize = 2.44e+03 -At bottom left: c1, c2 = 3.465e-06 3.352e+11 -At top right: c1, c2 = 6.627e-06 4.163e+11 +At bottom left: c1, c2 = 3.465e-06 3.352e+11 +At top right: c1, c2 = 6.627e-06 4.163e+11 -Final Statistics: +Final Statistics: -lenrw = 3518 leniw = 267 +lenrw = 3518 leniw = 261 lenrwls = 2455 leniwls = 126 nst = 221 nfe = 0 nfi = 3097 nfels = 6228 @@ -60,4 +60,3 @@ nni = 1889 nli = 6228 nsetups = 69 netf = 20 npe = 4 nps = 8046 ncfn = 0 ncfl = 452 - diff --git a/examples/arkode/C_serial/ark_KrylovDemo_prec.out b/examples/arkode/C_serial/ark_KrylovDemo_prec.out index 8a09c9a96d..1c5be0014a 100644 --- a/examples/arkode/C_serial/ark_KrylovDemo_prec.out +++ b/examples/arkode/C_serial/ark_KrylovDemo_prec.out @@ -10,9 +10,9 @@ b parameter = 1 Diffusion coefficients: Dprey = 1 Dpred = 0.5 Rate parameter alpha = 1 -Mesh dimensions (mx,my) are 6, 6. Total system size is neq = 216 +Mesh dimensions (mx,my) are 6, 6. Total system size is neq = 216 -Tolerances: reltol = 1e-05, abstol = 1e-05 +Tolerances: reltol = 1e-05, abstol = 1e-05 Preconditioning uses a product of: (1) Gauss-Seidel iterations with itmax = 5 iterations, and @@ -31,52 +31,52 @@ Gram-Schmidt method type is gstype = SUN_MODIFIED_GS c values at t = 0: Species 1 -10 10 10 10 10 10 -10 10.1678 10.3775 10.3775 10.1678 10 -10 10.3775 10.8493 10.8493 10.3775 10 -10 10.3775 10.8493 10.8493 10.3775 10 -10 10.1678 10.3775 10.3775 10.1678 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.1678 10.3775 10.3775 10.1678 10 +10 10.3775 10.8493 10.8493 10.3775 10 +10 10.3775 10.8493 10.8493 10.3775 10 +10 10.1678 10.3775 10.3775 10.1678 10 +10 10 10 10 10 10 Species 2 -10 10 10 10 10 10 -10 10.3355 10.755 10.755 10.3355 10 -10 10.755 11.6987 11.6987 10.755 10 -10 10.755 11.6987 11.6987 10.755 10 -10 10.3355 10.755 10.755 10.3355 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.3355 10.755 10.755 10.3355 10 +10 10.755 11.6987 11.6987 10.755 10 +10 10.755 11.6987 11.6987 10.755 10 +10 10.3355 10.755 10.755 10.3355 10 +10 10 10 10 10 10 Species 3 -10 10 10 10 10 10 -10 10.5033 11.1325 11.1325 10.5033 10 -10 11.1325 12.548 12.548 11.1325 10 -10 11.1325 12.548 12.548 11.1325 10 -10 10.5033 11.1325 11.1325 10.5033 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.5033 11.1325 11.1325 10.5033 10 +10 11.1325 12.548 12.548 11.1325 10 +10 11.1325 12.548 12.548 11.1325 10 +10 10.5033 11.1325 11.1325 10.5033 10 +10 10 10 10 10 10 Species 4 -10 10 10 10 10 10 -10 10.6711 11.5099 11.5099 10.6711 10 -10 11.5099 13.3974 13.3974 11.5099 10 -10 11.5099 13.3974 13.3974 11.5099 10 -10 10.6711 11.5099 11.5099 10.6711 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.6711 11.5099 11.5099 10.6711 10 +10 11.5099 13.3974 13.3974 11.5099 10 +10 11.5099 13.3974 13.3974 11.5099 10 +10 10.6711 11.5099 11.5099 10.6711 10 +10 10 10 10 10 10 Species 5 -10 10 10 10 10 10 -10 10.8389 11.8874 11.8874 10.8389 10 -10 11.8874 14.2467 14.2467 11.8874 10 -10 11.8874 14.2467 14.2467 11.8874 10 -10 10.8389 11.8874 11.8874 10.8389 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.8389 11.8874 11.8874 10.8389 10 +10 11.8874 14.2467 14.2467 11.8874 10 +10 11.8874 14.2467 14.2467 11.8874 10 +10 10.8389 11.8874 11.8874 10.8389 10 +10 10 10 10 10 10 Species 6 -10 10 10 10 10 10 -10 11.0066 12.2649 12.2649 11.0066 10 -10 12.2649 15.0961 15.0961 12.2649 10 -10 12.2649 15.0961 15.0961 12.2649 10 -10 11.0066 12.2649 12.2649 11.0066 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 11.0066 12.2649 12.2649 11.0066 10 +10 12.2649 15.0961 15.0961 12.2649 10 +10 12.2649 15.0961 15.0961 12.2649 10 +10 11.0066 12.2649 12.2649 11.0066 10 +10 10 10 10 10 10 t = 1.00e-08 nst = 3 nfe = 0 nfi = 45 nni = 27 hu = 6.86e-08 @@ -87,52 +87,52 @@ t = 1.00e-06 nst = 4 nfe = 0 nfi = 77 nni = 49 hu = 1.20e-06 c values at t = 1e-06: Species 1 -9.99991 9.99992 9.99993 9.99993 9.99993 9.99992 -9.99992 10.1677 10.3774 10.3774 10.1677 9.99993 -9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 -9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 -9.99992 10.1677 10.3774 10.3774 10.1677 9.99992 -9.99991 9.99992 9.99993 9.99993 9.99992 9.99991 +9.99991 9.99992 9.99993 9.99993 9.99993 9.99992 +9.99992 10.1677 10.3774 10.3774 10.1677 9.99993 +9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 +9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 +9.99992 10.1677 10.3774 10.3774 10.1677 9.99992 +9.99991 9.99992 9.99993 9.99993 9.99992 9.99991 Species 2 -9.99991 9.99993 9.99995 9.99995 9.99993 9.99992 -9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 -9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 -9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 -9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 -9.99991 9.99993 9.99995 9.99995 9.99993 9.99991 +9.99991 9.99993 9.99995 9.99995 9.99993 9.99992 +9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 +9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 +9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 +9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 +9.99991 9.99993 9.99995 9.99995 9.99993 9.99991 Species 3 -9.99991 9.99994 9.99997 9.99997 9.99994 9.99992 -9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 -9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 -9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 -9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 -9.99991 9.99994 9.99997 9.99997 9.99994 9.99991 +9.99991 9.99994 9.99997 9.99997 9.99994 9.99992 +9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 +9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 +9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 +9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 +9.99991 9.99994 9.99997 9.99997 9.99994 9.99991 Species 4 -13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 -13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 -13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 -13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 -13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 -13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 +13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 +13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 +13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 +13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 +13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 +13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 Species 5 -13.4981 13.4981 13.4982 13.4981 13.4981 13.4981 -13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 -13.4982 16.4131 20.2351 20.2351 16.4131 13.4981 -13.4982 16.4131 20.2351 20.2351 16.4131 13.4982 -13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 -13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 +13.4981 13.4981 13.4982 13.4981 13.4981 13.4981 +13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 +13.4982 16.4131 20.2351 20.2351 16.4131 13.4981 +13.4982 16.4131 20.2351 20.2351 16.4131 13.4982 +13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 +13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 Species 6 -13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 -13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 -13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 -13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 -13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 -13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 +13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 +13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 +13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 +13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 +13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 +13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 t = 1.00e-05 nst = 12 nfe = 0 nfi = 197 nni = 129 hu = 1.19e-06 @@ -143,52 +143,52 @@ t = 1.00e-03 nst = 46 nfe = 0 nfi = 820 nni = 582 hu = 8.40e-03 c values at t = 0.001: Species 1 -9.90702 9.91664 9.92836 9.93033 9.92253 9.91674 -9.91472 10.0747 10.2769 10.2785 10.0795 9.92253 -9.92446 10.2748 10.7181 10.7194 10.2785 9.93033 -9.92445 10.2744 10.7173 10.7181 10.2769 9.92836 -9.91469 10.0734 10.2744 10.2748 10.0747 9.91664 -9.90697 9.91469 9.92445 9.92446 9.91472 9.90702 +9.90702 9.91664 9.92836 9.93033 9.92253 9.91674 +9.91472 10.0747 10.2769 10.2785 10.0795 9.92253 +9.92446 10.2748 10.7181 10.7194 10.2785 9.93033 +9.92445 10.2744 10.7173 10.7181 10.2769 9.92836 +9.91469 10.0734 10.2744 10.2748 10.0747 9.91664 +9.90697 9.91469 9.92445 9.92446 9.91472 9.90702 Species 2 -9.90742 9.92474 9.94622 9.94819 9.93064 9.91713 -9.92282 10.2412 10.644 10.6457 10.2461 9.93064 -9.94232 10.6419 11.5267 11.5281 10.6457 9.94819 -9.94231 10.6415 11.5258 11.5267 10.644 9.94622 -9.92279 10.24 10.6415 10.6419 10.2412 9.92474 -9.90737 9.92279 9.94231 9.94232 9.92282 9.90742 +9.90742 9.92474 9.94622 9.94819 9.93064 9.91713 +9.92282 10.2412 10.644 10.6457 10.2461 9.93064 +9.94232 10.6419 11.5267 11.5281 10.6457 9.94819 +9.94231 10.6415 11.5258 11.5267 10.644 9.94622 +9.92279 10.24 10.6415 10.6419 10.2412 9.92474 +9.90737 9.92279 9.94231 9.94232 9.92282 9.90742 Species 3 -9.90781 9.93284 9.96408 9.96605 9.93874 9.91752 -9.93092 10.4078 11.0109 11.0127 10.4127 9.93874 -9.96017 11.0088 12.3339 12.3354 11.0127 9.96605 -9.96016 11.0083 12.333 12.3339 11.0109 9.96408 -9.93089 10.4065 11.0083 11.0088 10.4078 9.93284 -9.90776 9.93089 9.96016 9.96017 9.93092 9.90781 +9.90781 9.93284 9.96408 9.96605 9.93874 9.91752 +9.93092 10.4078 11.0109 11.0127 10.4127 9.93874 +9.96017 11.0088 12.3339 12.3354 11.0127 9.96605 +9.96016 11.0083 12.333 12.3339 11.0109 9.96408 +9.93089 10.4065 11.0083 11.0088 10.4078 9.93284 +9.90776 9.93089 9.96016 9.96017 9.93092 9.90781 Species 4 -297231 297750 298393 298451 297925 297520 -297692 307245 319327 319378 307390 297925 -298276 319264 345799 345840 319378 298451 -298276 319252 345772 345799 319327 298393 -297691 307208 319252 319264 307245 297750 -297229 297691 298276 298276 297692 297231 +297231 297750 298393 298451 297925 297520 +297692 307245 319327 319378 307390 297925 +298276 319264 345799 345840 319378 298451 +298276 319252 345772 345799 319327 298393 +297691 307208 319252 319264 307245 297750 +297229 297691 298276 298276 297692 297231 Species 5 -297231 297750 298393 298451 297925 297520 -297692 307245 319327 319378 307390 297925 -298276 319264 345799 345840 319378 298451 -298276 319252 345772 345799 319327 298393 -297691 307208 319252 319264 307245 297750 -297229 297691 298276 298276 297692 297231 +297231 297750 298393 298451 297925 297520 +297692 307245 319327 319378 307390 297925 +298276 319264 345799 345840 319378 298451 +298276 319252 345772 345799 319327 298393 +297691 307208 319252 319264 307245 297750 +297229 297691 298276 298276 297692 297231 Species 6 -297231 297750 298393 298451 297925 297520 -297692 307245 319327 319378 307390 297925 -298276 319264 345799 345840 319378 298451 -298276 319252 345772 345799 319327 298393 -297691 307208 319252 319264 307245 297750 -297229 297691 298276 298276 297692 297231 +297231 297750 298393 298451 297925 297520 +297692 307245 319327 319378 307390 297925 +298276 319264 345799 345840 319378 298451 +298276 319252 345772 345799 319327 298393 +297691 307208 319252 319264 307245 297750 +297229 297691 298276 298276 297692 297231 t = 1.00e-02 nst = 47 nfe = 0 nfi = 840 nni = 597 hu = 1.32e-02 @@ -199,52 +199,52 @@ t = 1.00e+00 nst = 69 nfe = 0 nfi = 1259 nni = 904 hu = 5.51e-02 c values at t = 1: Species 1 -1.58852 1.59924 1.62152 1.64765 1.67037 1.68149 -1.58533 1.59504 1.61548 1.63952 1.66033 1.67037 -1.57757 1.58548 1.6024 1.62235 1.63952 1.64765 -1.56821 1.57412 1.58706 1.6024 1.61548 1.62152 -1.56049 1.56463 1.57412 1.58548 1.59504 1.59924 -1.55733 1.56049 1.56821 1.57757 1.58533 1.58852 +1.58852 1.59924 1.62152 1.64765 1.67037 1.68149 +1.58533 1.59504 1.61548 1.63952 1.66033 1.67037 +1.57757 1.58548 1.6024 1.62235 1.63952 1.64765 +1.56821 1.57412 1.58706 1.6024 1.61548 1.62152 +1.56049 1.56463 1.57412 1.58548 1.59504 1.59924 +1.55733 1.56049 1.56821 1.57757 1.58533 1.58852 Species 2 -1.59067 1.60141 1.62371 1.64987 1.67262 1.68376 -1.58749 1.5972 1.61767 1.64174 1.66257 1.67262 -1.57972 1.58763 1.60457 1.62455 1.64174 1.64987 -1.57034 1.57627 1.58922 1.60457 1.61767 1.62371 -1.56261 1.56677 1.57627 1.58763 1.5972 1.60141 -1.55945 1.56261 1.57034 1.57972 1.58749 1.59067 +1.59067 1.60141 1.62371 1.64987 1.67262 1.68376 +1.58749 1.5972 1.61767 1.64174 1.66257 1.67262 +1.57972 1.58763 1.60457 1.62455 1.64174 1.64987 +1.57034 1.57627 1.58922 1.60457 1.61767 1.62371 +1.56261 1.56677 1.57627 1.58763 1.5972 1.60141 +1.55945 1.56261 1.57034 1.57972 1.58749 1.59067 Species 3 -1.59271 1.60346 1.62579 1.65198 1.67474 1.6859 -1.58952 1.59925 1.61974 1.64383 1.66469 1.67474 -1.58174 1.58967 1.60662 1.62662 1.64383 1.65198 -1.57236 1.57829 1.59126 1.60662 1.61974 1.62579 -1.56462 1.56878 1.57829 1.58967 1.59925 1.60346 -1.56146 1.56462 1.57236 1.58174 1.58952 1.59271 +1.59271 1.60346 1.62579 1.65198 1.67474 1.6859 +1.58952 1.59925 1.61974 1.64383 1.66469 1.67474 +1.58174 1.58967 1.60662 1.62662 1.64383 1.65198 +1.57236 1.57829 1.59126 1.60662 1.61974 1.62579 +1.56462 1.56878 1.57829 1.58967 1.59925 1.60346 +1.56146 1.56462 1.57236 1.58174 1.58952 1.59271 Species 4 -47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 -47622.9 47914.2 48528 49249.8 49874.6 50175.6 -47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 -47108.7 47286.2 47674.7 48135.1 48528 48709.2 -46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 -46782 46876.8 47108.7 47389.8 47622.9 47718.5 +47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 +47622.9 47914.2 48528 49249.8 49874.6 50175.6 +47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 +47108.7 47286.2 47674.7 48135.1 48528 48709.2 +46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 +46782 46876.8 47108.7 47389.8 47622.9 47718.5 Species 5 -47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 -47622.9 47914.2 48528 49249.8 49874.6 50175.6 -47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 -47108.7 47286.2 47674.7 48135.1 48528 48709.2 -46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 -46782 46876.8 47108.7 47389.8 47622.9 47718.5 +47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 +47622.9 47914.2 48528 49249.8 49874.6 50175.6 +47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 +47108.7 47286.2 47674.7 48135.1 48528 48709.2 +46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 +46782 46876.8 47108.7 47389.8 47622.9 47718.5 Species 6 -47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 -47622.9 47914.2 48528 49249.8 49874.6 50175.6 -47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 -47108.7 47286.2 47674.7 48135.1 48528 48709.2 -46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 -46782 46876.8 47108.7 47389.8 47622.9 47718.5 +47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 +47622.9 47914.2 48528 49249.8 49874.6 50175.6 +47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 +47108.7 47286.2 47674.7 48135.1 48528 48709.2 +46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 +46782 46876.8 47108.7 47389.8 47622.9 47718.5 t = 2.00e+00 nst = 81 nfe = 0 nfi = 1463 nni = 1048 hu = 1.54e-01 @@ -255,52 +255,52 @@ t = 4.00e+00 nst = 95 nfe = 0 nfi = 1708 nni = 1221 hu = 2.69e-01 c values at t = 4: Species 1 -1.19535 1.20368 1.2211 1.24157 1.25935 1.268 -1.1928 1.20035 1.21636 1.23523 1.25154 1.25935 -1.18657 1.19274 1.20602 1.22173 1.23523 1.24157 -1.17904 1.18368 1.19389 1.20602 1.21636 1.2211 -1.17284 1.17613 1.18368 1.19274 1.20035 1.20368 -1.17032 1.17284 1.17904 1.18657 1.1928 1.19535 +1.19535 1.20368 1.2211 1.24157 1.25935 1.268 +1.1928 1.20035 1.21636 1.23523 1.25154 1.25935 +1.18657 1.19274 1.20602 1.22173 1.23523 1.24157 +1.17904 1.18368 1.19389 1.20602 1.21636 1.2211 +1.17284 1.17613 1.18368 1.19274 1.20035 1.20368 +1.17032 1.17284 1.17904 1.18657 1.1928 1.19535 Species 2 -1.19538 1.20371 1.22113 1.24161 1.25938 1.26804 -1.19284 1.20038 1.21639 1.23526 1.25157 1.25938 -1.1866 1.19277 1.20606 1.22177 1.23526 1.24161 -1.17908 1.18371 1.19393 1.20606 1.21639 1.22113 -1.17288 1.17616 1.18371 1.19277 1.20038 1.20371 -1.17035 1.17288 1.17908 1.1866 1.19284 1.19538 +1.19538 1.20371 1.22113 1.24161 1.25938 1.26804 +1.19284 1.20038 1.21639 1.23526 1.25157 1.25938 +1.1866 1.19277 1.20606 1.22177 1.23526 1.24161 +1.17908 1.18371 1.19393 1.20606 1.21639 1.22113 +1.17288 1.17616 1.18371 1.19277 1.20038 1.20371 +1.17035 1.17288 1.17908 1.1866 1.19284 1.19538 Species 3 -1.19542 1.20374 1.22116 1.24164 1.25942 1.26807 -1.19287 1.20042 1.21643 1.2353 1.25161 1.25942 -1.18663 1.1928 1.20609 1.2218 1.2353 1.24164 -1.17911 1.18374 1.19396 1.20609 1.21643 1.22116 -1.17291 1.17619 1.18374 1.1928 1.20042 1.20374 -1.17039 1.17291 1.17911 1.18663 1.19287 1.19542 +1.19542 1.20374 1.22116 1.24164 1.25942 1.26807 +1.19287 1.20042 1.21643 1.2353 1.25161 1.25942 +1.18663 1.1928 1.20609 1.2218 1.2353 1.24164 +1.17911 1.18374 1.19396 1.20609 1.21643 1.22116 +1.17291 1.17619 1.18374 1.1928 1.20042 1.20374 +1.17039 1.17291 1.17911 1.18663 1.19287 1.19542 Species 4 -35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 -35597.2 35782 36180.5 36651.6 37056.3 37246.5 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 +35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35597.2 35782 36180.5 36651.6 37056.3 37246.5 +35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.4 35782 36010.4 36110.2 +35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 Species 5 -35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 -35597.2 35782 36180.5 36651.6 37056.3 37246.5 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 +35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35597.2 35782 36180.5 36651.6 37056.3 37246.5 +35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.4 35782 36010.4 36110.2 +35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 Species 6 -35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 -35597.2 35782 36180.5 36651.6 37056.3 37246.5 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 +35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35597.2 35782 36180.5 36651.6 37056.3 37246.5 +35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.4 35782 36010.4 36110.2 +35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 t = 5.00e+00 nst = 98 nfe = 0 nfi = 1767 nni = 1262 hu = 3.36e-01 @@ -311,52 +311,52 @@ t = 7.00e+00 nst = 100 nfe = 0 nfi = 1798 nni = 1283 hu = 2.99e+00 c values at t = 7: Species 1 -1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 -1.18601 1.19352 1.20945 1.22822 1.24445 1.25222 -1.17981 1.18594 1.19917 1.2148 1.22822 1.23454 -1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 -1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 -1.16363 1.16615 1.17232 1.17981 1.18601 1.18855 +1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 +1.18601 1.19352 1.20945 1.22822 1.24445 1.25222 +1.17981 1.18594 1.19917 1.2148 1.22822 1.23454 +1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 +1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 +1.16363 1.16615 1.17232 1.17981 1.18601 1.18855 Species 2 -1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 -1.18601 1.19352 1.20945 1.22823 1.24445 1.25222 -1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 -1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 -1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 -1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 +1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 +1.18601 1.19352 1.20945 1.22823 1.24445 1.25222 +1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 +1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 +1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 +1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 Species 3 -1.18855 1.19684 1.21416 1.23454 1.25223 1.26083 -1.18601 1.19352 1.20945 1.22823 1.24445 1.25223 -1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 -1.17232 1.17693 1.1871 1.19917 1.20945 1.21416 -1.16615 1.16941 1.17693 1.18594 1.19352 1.19684 -1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 +1.18855 1.19684 1.21416 1.23454 1.25223 1.26083 +1.18601 1.19352 1.20945 1.22823 1.24445 1.25223 +1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 +1.17232 1.17693 1.1871 1.19917 1.20945 1.21416 +1.16615 1.16941 1.17693 1.18594 1.19352 1.19684 +1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 Species 4 -35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 -35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 -35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 -35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 -34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 -34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 +35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 +35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 +35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 +35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 +34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 +34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 Species 5 -35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 -35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 -35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 -35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 -34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 -34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 +35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 +35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 +35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 +35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 +34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 +34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 Species 6 -35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 -35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 -35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 -35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 -34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 -34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 +35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 +35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 +35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 +35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 +34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 +34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 t = 8.00e+00 nst = 100 nfe = 0 nfi = 1798 nni = 1283 hu = 2.99e+00 @@ -367,75 +367,75 @@ t = 1.00e+01 nst = 101 nfe = 0 nfi = 1813 nni = 1293 hu = 6.31e+00 c values at t = 10: Species 1 -1.18839 1.19667 1.214 1.23437 1.25206 1.26066 -1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 -1.17965 1.18578 1.199 1.21463 1.22806 1.23437 -1.17216 1.17677 1.18693 1.199 1.20929 1.214 -1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 -1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 +1.18839 1.19667 1.214 1.23437 1.25206 1.26066 +1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 +1.17965 1.18578 1.199 1.21463 1.22806 1.23437 +1.17216 1.17677 1.18693 1.199 1.20929 1.214 +1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 +1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 Species 2 -1.18839 1.19667 1.214 1.23437 1.25206 1.26066 -1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 -1.17965 1.18578 1.199 1.21463 1.22806 1.23437 -1.17216 1.17677 1.18693 1.199 1.20929 1.214 -1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 -1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 +1.18839 1.19667 1.214 1.23437 1.25206 1.26066 +1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 +1.17965 1.18578 1.199 1.21463 1.22806 1.23437 +1.17216 1.17677 1.18693 1.199 1.20929 1.214 +1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 +1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 Species 3 -1.18839 1.19667 1.214 1.23437 1.25206 1.26066 -1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 -1.17965 1.18578 1.199 1.21463 1.22806 1.23437 -1.17216 1.17677 1.18693 1.199 1.20929 1.214 -1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 -1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 +1.18839 1.19667 1.214 1.23437 1.25206 1.26066 +1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 +1.17965 1.18578 1.199 1.21463 1.22806 1.23437 +1.17216 1.17677 1.18693 1.199 1.20929 1.214 +1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 +1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 Species 4 -35650.8 35899 36418.5 37029.4 37559.6 37817.5 -35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 -35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 -35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 -34978.7 35076.6 35302.1 35572.4 35799.7 35899 -34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 +35650.8 35899 36418.5 37029.4 37559.6 37817.5 +35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 +35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 +35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 +34978.7 35076.6 35302.1 35572.4 35799.7 35899 +34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 Species 5 -35650.8 35899 36418.5 37029.4 37559.6 37817.5 -35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 -35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 -35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 -34978.7 35076.6 35302.1 35572.4 35799.7 35899 -34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 +35650.8 35899 36418.5 37029.4 37559.6 37817.5 +35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 +35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 +35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 +34978.7 35076.6 35302.1 35572.4 35799.7 35899 +34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 Species 6 -35650.8 35899 36418.5 37029.4 37559.6 37817.5 -35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 -35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 -35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 -34978.7 35076.6 35302.1 35572.4 35799.7 35899 -34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 +35650.8 35899 36418.5 37029.4 37559.6 37817.5 +35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 +35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 +35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 +34978.7 35076.6 35302.1 35572.4 35799.7 35899 +34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 148 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 101 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 1813 - Number of f-s (SPGMR) = 4359 - Number of f-s (TOTAL) = 4359 - Number of setups = 72 - Number of nonlinear iterations = 1293 - Number of linear iterations = 4359 - Number of preconditioner evaluations = 72 - Number of preconditioner solves = 5618 - Number of error test failures = 1 - Number of nonlinear conv. failures = 25 - Number of linear convergence failures = 238 - Average Krylov subspace dimension = 3.371 + ARKStep real workspace length = 3790 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 101 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 1813 + Number of f-s (SPGMR) = 4359 + Number of f-s (TOTAL) = 4359 + Number of setups = 72 + Number of nonlinear iterations = 1293 + Number of linear iterations = 4359 + Number of preconditioner evaluations = 72 + Number of preconditioner solves = 5618 + Number of error test failures = 1 + Number of nonlinear conv. failures = 25 + Number of linear convergence failures = 238 + Average Krylov subspace dimension = 3.371 ---------------------------------------------------------------------------- @@ -487,24 +487,24 @@ t = 1.00e+01 nst = 101 nfe = 0 nfi = 1813 nni = 1293 hu = 6.31e+00 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 154 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 101 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 1813 - Number of f-s (SPGMR) = 4359 - Number of f-s (TOTAL) = 4359 - Number of setups = 72 - Number of nonlinear iterations = 1293 - Number of linear iterations = 4359 - Number of preconditioner evaluations = 72 - Number of preconditioner solves = 5618 - Number of error test failures = 1 - Number of nonlinear conv. failures = 25 - Number of linear convergence failures = 238 - Average Krylov subspace dimension = 3.371 + ARKStep real workspace length = 3790 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 101 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 1813 + Number of f-s (SPGMR) = 4359 + Number of f-s (TOTAL) = 4359 + Number of setups = 72 + Number of nonlinear iterations = 1293 + Number of linear iterations = 4359 + Number of preconditioner evaluations = 72 + Number of preconditioner solves = 5618 + Number of error test failures = 1 + Number of nonlinear conv. failures = 25 + Number of linear convergence failures = 238 + Average Krylov subspace dimension = 3.371 ---------------------------------------------------------------------------- @@ -556,24 +556,24 @@ t = 1.00e+01 nst = 234 nfe = 0 nfi = 4045 nni = 2856 hu = 3.93e-01 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 160 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 234 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 4045 - Number of f-s (SPGMR) = 10634 - Number of f-s (TOTAL) = 10634 - Number of setups = 277 - Number of nonlinear iterations = 2856 - Number of linear iterations = 10634 - Number of preconditioner evaluations = 277 - Number of preconditioner solves = 13350 - Number of error test failures = 1 - Number of nonlinear conv. failures = 166 - Number of linear convergence failures = 1036 - Average Krylov subspace dimension = 3.723 + ARKStep real workspace length = 3790 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 234 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 4045 + Number of f-s (SPGMR) = 10634 + Number of f-s (TOTAL) = 10634 + Number of setups = 277 + Number of nonlinear iterations = 2856 + Number of linear iterations = 10634 + Number of preconditioner evaluations = 277 + Number of preconditioner solves = 13350 + Number of error test failures = 1 + Number of nonlinear conv. failures = 166 + Number of linear convergence failures = 1036 + Average Krylov subspace dimension = 3.723 ---------------------------------------------------------------------------- @@ -625,24 +625,24 @@ t = 1.00e+01 nst = 234 nfe = 0 nfi = 4045 nni = 2856 hu = 3.93e-01 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 166 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 234 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 4045 - Number of f-s (SPGMR) = 10633 - Number of f-s (TOTAL) = 10633 - Number of setups = 277 - Number of nonlinear iterations = 2856 - Number of linear iterations = 10633 - Number of preconditioner evaluations = 277 - Number of preconditioner solves = 13349 - Number of error test failures = 1 - Number of nonlinear conv. failures = 166 - Number of linear convergence failures = 1036 - Average Krylov subspace dimension = 3.723 + ARKStep real workspace length = 3790 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 234 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 4045 + Number of f-s (SPGMR) = 10633 + Number of f-s (TOTAL) = 10633 + Number of setups = 277 + Number of nonlinear iterations = 2856 + Number of linear iterations = 10633 + Number of preconditioner evaluations = 277 + Number of preconditioner solves = 13349 + Number of error test failures = 1 + Number of nonlinear conv. failures = 166 + Number of linear convergence failures = 1036 + Average Krylov subspace dimension = 3.723 ---------------------------------------------------------------------------- diff --git a/examples/arkode/C_serial/ark_KrylovDemo_prec_1.out b/examples/arkode/C_serial/ark_KrylovDemo_prec_1.out index 8a09c9a96d..1c5be0014a 100644 --- a/examples/arkode/C_serial/ark_KrylovDemo_prec_1.out +++ b/examples/arkode/C_serial/ark_KrylovDemo_prec_1.out @@ -10,9 +10,9 @@ b parameter = 1 Diffusion coefficients: Dprey = 1 Dpred = 0.5 Rate parameter alpha = 1 -Mesh dimensions (mx,my) are 6, 6. Total system size is neq = 216 +Mesh dimensions (mx,my) are 6, 6. Total system size is neq = 216 -Tolerances: reltol = 1e-05, abstol = 1e-05 +Tolerances: reltol = 1e-05, abstol = 1e-05 Preconditioning uses a product of: (1) Gauss-Seidel iterations with itmax = 5 iterations, and @@ -31,52 +31,52 @@ Gram-Schmidt method type is gstype = SUN_MODIFIED_GS c values at t = 0: Species 1 -10 10 10 10 10 10 -10 10.1678 10.3775 10.3775 10.1678 10 -10 10.3775 10.8493 10.8493 10.3775 10 -10 10.3775 10.8493 10.8493 10.3775 10 -10 10.1678 10.3775 10.3775 10.1678 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.1678 10.3775 10.3775 10.1678 10 +10 10.3775 10.8493 10.8493 10.3775 10 +10 10.3775 10.8493 10.8493 10.3775 10 +10 10.1678 10.3775 10.3775 10.1678 10 +10 10 10 10 10 10 Species 2 -10 10 10 10 10 10 -10 10.3355 10.755 10.755 10.3355 10 -10 10.755 11.6987 11.6987 10.755 10 -10 10.755 11.6987 11.6987 10.755 10 -10 10.3355 10.755 10.755 10.3355 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.3355 10.755 10.755 10.3355 10 +10 10.755 11.6987 11.6987 10.755 10 +10 10.755 11.6987 11.6987 10.755 10 +10 10.3355 10.755 10.755 10.3355 10 +10 10 10 10 10 10 Species 3 -10 10 10 10 10 10 -10 10.5033 11.1325 11.1325 10.5033 10 -10 11.1325 12.548 12.548 11.1325 10 -10 11.1325 12.548 12.548 11.1325 10 -10 10.5033 11.1325 11.1325 10.5033 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.5033 11.1325 11.1325 10.5033 10 +10 11.1325 12.548 12.548 11.1325 10 +10 11.1325 12.548 12.548 11.1325 10 +10 10.5033 11.1325 11.1325 10.5033 10 +10 10 10 10 10 10 Species 4 -10 10 10 10 10 10 -10 10.6711 11.5099 11.5099 10.6711 10 -10 11.5099 13.3974 13.3974 11.5099 10 -10 11.5099 13.3974 13.3974 11.5099 10 -10 10.6711 11.5099 11.5099 10.6711 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.6711 11.5099 11.5099 10.6711 10 +10 11.5099 13.3974 13.3974 11.5099 10 +10 11.5099 13.3974 13.3974 11.5099 10 +10 10.6711 11.5099 11.5099 10.6711 10 +10 10 10 10 10 10 Species 5 -10 10 10 10 10 10 -10 10.8389 11.8874 11.8874 10.8389 10 -10 11.8874 14.2467 14.2467 11.8874 10 -10 11.8874 14.2467 14.2467 11.8874 10 -10 10.8389 11.8874 11.8874 10.8389 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.8389 11.8874 11.8874 10.8389 10 +10 11.8874 14.2467 14.2467 11.8874 10 +10 11.8874 14.2467 14.2467 11.8874 10 +10 10.8389 11.8874 11.8874 10.8389 10 +10 10 10 10 10 10 Species 6 -10 10 10 10 10 10 -10 11.0066 12.2649 12.2649 11.0066 10 -10 12.2649 15.0961 15.0961 12.2649 10 -10 12.2649 15.0961 15.0961 12.2649 10 -10 11.0066 12.2649 12.2649 11.0066 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 11.0066 12.2649 12.2649 11.0066 10 +10 12.2649 15.0961 15.0961 12.2649 10 +10 12.2649 15.0961 15.0961 12.2649 10 +10 11.0066 12.2649 12.2649 11.0066 10 +10 10 10 10 10 10 t = 1.00e-08 nst = 3 nfe = 0 nfi = 45 nni = 27 hu = 6.86e-08 @@ -87,52 +87,52 @@ t = 1.00e-06 nst = 4 nfe = 0 nfi = 77 nni = 49 hu = 1.20e-06 c values at t = 1e-06: Species 1 -9.99991 9.99992 9.99993 9.99993 9.99993 9.99992 -9.99992 10.1677 10.3774 10.3774 10.1677 9.99993 -9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 -9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 -9.99992 10.1677 10.3774 10.3774 10.1677 9.99992 -9.99991 9.99992 9.99993 9.99993 9.99992 9.99991 +9.99991 9.99992 9.99993 9.99993 9.99993 9.99992 +9.99992 10.1677 10.3774 10.3774 10.1677 9.99993 +9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 +9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 +9.99992 10.1677 10.3774 10.3774 10.1677 9.99992 +9.99991 9.99992 9.99993 9.99993 9.99992 9.99991 Species 2 -9.99991 9.99993 9.99995 9.99995 9.99993 9.99992 -9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 -9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 -9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 -9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 -9.99991 9.99993 9.99995 9.99995 9.99993 9.99991 +9.99991 9.99993 9.99995 9.99995 9.99993 9.99992 +9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 +9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 +9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 +9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 +9.99991 9.99993 9.99995 9.99995 9.99993 9.99991 Species 3 -9.99991 9.99994 9.99997 9.99997 9.99994 9.99992 -9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 -9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 -9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 -9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 -9.99991 9.99994 9.99997 9.99997 9.99994 9.99991 +9.99991 9.99994 9.99997 9.99997 9.99994 9.99992 +9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 +9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 +9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 +9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 +9.99991 9.99994 9.99997 9.99997 9.99994 9.99991 Species 4 -13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 -13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 -13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 -13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 -13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 -13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 +13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 +13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 +13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 +13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 +13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 +13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 Species 5 -13.4981 13.4981 13.4982 13.4981 13.4981 13.4981 -13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 -13.4982 16.4131 20.2351 20.2351 16.4131 13.4981 -13.4982 16.4131 20.2351 20.2351 16.4131 13.4982 -13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 -13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 +13.4981 13.4981 13.4982 13.4981 13.4981 13.4981 +13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 +13.4982 16.4131 20.2351 20.2351 16.4131 13.4981 +13.4982 16.4131 20.2351 20.2351 16.4131 13.4982 +13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 +13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 Species 6 -13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 -13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 -13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 -13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 -13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 -13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 +13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 +13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 +13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 +13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 +13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 +13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 t = 1.00e-05 nst = 12 nfe = 0 nfi = 197 nni = 129 hu = 1.19e-06 @@ -143,52 +143,52 @@ t = 1.00e-03 nst = 46 nfe = 0 nfi = 820 nni = 582 hu = 8.40e-03 c values at t = 0.001: Species 1 -9.90702 9.91664 9.92836 9.93033 9.92253 9.91674 -9.91472 10.0747 10.2769 10.2785 10.0795 9.92253 -9.92446 10.2748 10.7181 10.7194 10.2785 9.93033 -9.92445 10.2744 10.7173 10.7181 10.2769 9.92836 -9.91469 10.0734 10.2744 10.2748 10.0747 9.91664 -9.90697 9.91469 9.92445 9.92446 9.91472 9.90702 +9.90702 9.91664 9.92836 9.93033 9.92253 9.91674 +9.91472 10.0747 10.2769 10.2785 10.0795 9.92253 +9.92446 10.2748 10.7181 10.7194 10.2785 9.93033 +9.92445 10.2744 10.7173 10.7181 10.2769 9.92836 +9.91469 10.0734 10.2744 10.2748 10.0747 9.91664 +9.90697 9.91469 9.92445 9.92446 9.91472 9.90702 Species 2 -9.90742 9.92474 9.94622 9.94819 9.93064 9.91713 -9.92282 10.2412 10.644 10.6457 10.2461 9.93064 -9.94232 10.6419 11.5267 11.5281 10.6457 9.94819 -9.94231 10.6415 11.5258 11.5267 10.644 9.94622 -9.92279 10.24 10.6415 10.6419 10.2412 9.92474 -9.90737 9.92279 9.94231 9.94232 9.92282 9.90742 +9.90742 9.92474 9.94622 9.94819 9.93064 9.91713 +9.92282 10.2412 10.644 10.6457 10.2461 9.93064 +9.94232 10.6419 11.5267 11.5281 10.6457 9.94819 +9.94231 10.6415 11.5258 11.5267 10.644 9.94622 +9.92279 10.24 10.6415 10.6419 10.2412 9.92474 +9.90737 9.92279 9.94231 9.94232 9.92282 9.90742 Species 3 -9.90781 9.93284 9.96408 9.96605 9.93874 9.91752 -9.93092 10.4078 11.0109 11.0127 10.4127 9.93874 -9.96017 11.0088 12.3339 12.3354 11.0127 9.96605 -9.96016 11.0083 12.333 12.3339 11.0109 9.96408 -9.93089 10.4065 11.0083 11.0088 10.4078 9.93284 -9.90776 9.93089 9.96016 9.96017 9.93092 9.90781 +9.90781 9.93284 9.96408 9.96605 9.93874 9.91752 +9.93092 10.4078 11.0109 11.0127 10.4127 9.93874 +9.96017 11.0088 12.3339 12.3354 11.0127 9.96605 +9.96016 11.0083 12.333 12.3339 11.0109 9.96408 +9.93089 10.4065 11.0083 11.0088 10.4078 9.93284 +9.90776 9.93089 9.96016 9.96017 9.93092 9.90781 Species 4 -297231 297750 298393 298451 297925 297520 -297692 307245 319327 319378 307390 297925 -298276 319264 345799 345840 319378 298451 -298276 319252 345772 345799 319327 298393 -297691 307208 319252 319264 307245 297750 -297229 297691 298276 298276 297692 297231 +297231 297750 298393 298451 297925 297520 +297692 307245 319327 319378 307390 297925 +298276 319264 345799 345840 319378 298451 +298276 319252 345772 345799 319327 298393 +297691 307208 319252 319264 307245 297750 +297229 297691 298276 298276 297692 297231 Species 5 -297231 297750 298393 298451 297925 297520 -297692 307245 319327 319378 307390 297925 -298276 319264 345799 345840 319378 298451 -298276 319252 345772 345799 319327 298393 -297691 307208 319252 319264 307245 297750 -297229 297691 298276 298276 297692 297231 +297231 297750 298393 298451 297925 297520 +297692 307245 319327 319378 307390 297925 +298276 319264 345799 345840 319378 298451 +298276 319252 345772 345799 319327 298393 +297691 307208 319252 319264 307245 297750 +297229 297691 298276 298276 297692 297231 Species 6 -297231 297750 298393 298451 297925 297520 -297692 307245 319327 319378 307390 297925 -298276 319264 345799 345840 319378 298451 -298276 319252 345772 345799 319327 298393 -297691 307208 319252 319264 307245 297750 -297229 297691 298276 298276 297692 297231 +297231 297750 298393 298451 297925 297520 +297692 307245 319327 319378 307390 297925 +298276 319264 345799 345840 319378 298451 +298276 319252 345772 345799 319327 298393 +297691 307208 319252 319264 307245 297750 +297229 297691 298276 298276 297692 297231 t = 1.00e-02 nst = 47 nfe = 0 nfi = 840 nni = 597 hu = 1.32e-02 @@ -199,52 +199,52 @@ t = 1.00e+00 nst = 69 nfe = 0 nfi = 1259 nni = 904 hu = 5.51e-02 c values at t = 1: Species 1 -1.58852 1.59924 1.62152 1.64765 1.67037 1.68149 -1.58533 1.59504 1.61548 1.63952 1.66033 1.67037 -1.57757 1.58548 1.6024 1.62235 1.63952 1.64765 -1.56821 1.57412 1.58706 1.6024 1.61548 1.62152 -1.56049 1.56463 1.57412 1.58548 1.59504 1.59924 -1.55733 1.56049 1.56821 1.57757 1.58533 1.58852 +1.58852 1.59924 1.62152 1.64765 1.67037 1.68149 +1.58533 1.59504 1.61548 1.63952 1.66033 1.67037 +1.57757 1.58548 1.6024 1.62235 1.63952 1.64765 +1.56821 1.57412 1.58706 1.6024 1.61548 1.62152 +1.56049 1.56463 1.57412 1.58548 1.59504 1.59924 +1.55733 1.56049 1.56821 1.57757 1.58533 1.58852 Species 2 -1.59067 1.60141 1.62371 1.64987 1.67262 1.68376 -1.58749 1.5972 1.61767 1.64174 1.66257 1.67262 -1.57972 1.58763 1.60457 1.62455 1.64174 1.64987 -1.57034 1.57627 1.58922 1.60457 1.61767 1.62371 -1.56261 1.56677 1.57627 1.58763 1.5972 1.60141 -1.55945 1.56261 1.57034 1.57972 1.58749 1.59067 +1.59067 1.60141 1.62371 1.64987 1.67262 1.68376 +1.58749 1.5972 1.61767 1.64174 1.66257 1.67262 +1.57972 1.58763 1.60457 1.62455 1.64174 1.64987 +1.57034 1.57627 1.58922 1.60457 1.61767 1.62371 +1.56261 1.56677 1.57627 1.58763 1.5972 1.60141 +1.55945 1.56261 1.57034 1.57972 1.58749 1.59067 Species 3 -1.59271 1.60346 1.62579 1.65198 1.67474 1.6859 -1.58952 1.59925 1.61974 1.64383 1.66469 1.67474 -1.58174 1.58967 1.60662 1.62662 1.64383 1.65198 -1.57236 1.57829 1.59126 1.60662 1.61974 1.62579 -1.56462 1.56878 1.57829 1.58967 1.59925 1.60346 -1.56146 1.56462 1.57236 1.58174 1.58952 1.59271 +1.59271 1.60346 1.62579 1.65198 1.67474 1.6859 +1.58952 1.59925 1.61974 1.64383 1.66469 1.67474 +1.58174 1.58967 1.60662 1.62662 1.64383 1.65198 +1.57236 1.57829 1.59126 1.60662 1.61974 1.62579 +1.56462 1.56878 1.57829 1.58967 1.59925 1.60346 +1.56146 1.56462 1.57236 1.58174 1.58952 1.59271 Species 4 -47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 -47622.9 47914.2 48528 49249.8 49874.6 50175.6 -47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 -47108.7 47286.2 47674.7 48135.1 48528 48709.2 -46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 -46782 46876.8 47108.7 47389.8 47622.9 47718.5 +47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 +47622.9 47914.2 48528 49249.8 49874.6 50175.6 +47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 +47108.7 47286.2 47674.7 48135.1 48528 48709.2 +46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 +46782 46876.8 47108.7 47389.8 47622.9 47718.5 Species 5 -47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 -47622.9 47914.2 48528 49249.8 49874.6 50175.6 -47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 -47108.7 47286.2 47674.7 48135.1 48528 48709.2 -46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 -46782 46876.8 47108.7 47389.8 47622.9 47718.5 +47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 +47622.9 47914.2 48528 49249.8 49874.6 50175.6 +47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 +47108.7 47286.2 47674.7 48135.1 48528 48709.2 +46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 +46782 46876.8 47108.7 47389.8 47622.9 47718.5 Species 6 -47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 -47622.9 47914.2 48528 49249.8 49874.6 50175.6 -47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 -47108.7 47286.2 47674.7 48135.1 48528 48709.2 -46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 -46782 46876.8 47108.7 47389.8 47622.9 47718.5 +47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 +47622.9 47914.2 48528 49249.8 49874.6 50175.6 +47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 +47108.7 47286.2 47674.7 48135.1 48528 48709.2 +46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 +46782 46876.8 47108.7 47389.8 47622.9 47718.5 t = 2.00e+00 nst = 81 nfe = 0 nfi = 1463 nni = 1048 hu = 1.54e-01 @@ -255,52 +255,52 @@ t = 4.00e+00 nst = 95 nfe = 0 nfi = 1708 nni = 1221 hu = 2.69e-01 c values at t = 4: Species 1 -1.19535 1.20368 1.2211 1.24157 1.25935 1.268 -1.1928 1.20035 1.21636 1.23523 1.25154 1.25935 -1.18657 1.19274 1.20602 1.22173 1.23523 1.24157 -1.17904 1.18368 1.19389 1.20602 1.21636 1.2211 -1.17284 1.17613 1.18368 1.19274 1.20035 1.20368 -1.17032 1.17284 1.17904 1.18657 1.1928 1.19535 +1.19535 1.20368 1.2211 1.24157 1.25935 1.268 +1.1928 1.20035 1.21636 1.23523 1.25154 1.25935 +1.18657 1.19274 1.20602 1.22173 1.23523 1.24157 +1.17904 1.18368 1.19389 1.20602 1.21636 1.2211 +1.17284 1.17613 1.18368 1.19274 1.20035 1.20368 +1.17032 1.17284 1.17904 1.18657 1.1928 1.19535 Species 2 -1.19538 1.20371 1.22113 1.24161 1.25938 1.26804 -1.19284 1.20038 1.21639 1.23526 1.25157 1.25938 -1.1866 1.19277 1.20606 1.22177 1.23526 1.24161 -1.17908 1.18371 1.19393 1.20606 1.21639 1.22113 -1.17288 1.17616 1.18371 1.19277 1.20038 1.20371 -1.17035 1.17288 1.17908 1.1866 1.19284 1.19538 +1.19538 1.20371 1.22113 1.24161 1.25938 1.26804 +1.19284 1.20038 1.21639 1.23526 1.25157 1.25938 +1.1866 1.19277 1.20606 1.22177 1.23526 1.24161 +1.17908 1.18371 1.19393 1.20606 1.21639 1.22113 +1.17288 1.17616 1.18371 1.19277 1.20038 1.20371 +1.17035 1.17288 1.17908 1.1866 1.19284 1.19538 Species 3 -1.19542 1.20374 1.22116 1.24164 1.25942 1.26807 -1.19287 1.20042 1.21643 1.2353 1.25161 1.25942 -1.18663 1.1928 1.20609 1.2218 1.2353 1.24164 -1.17911 1.18374 1.19396 1.20609 1.21643 1.22116 -1.17291 1.17619 1.18374 1.1928 1.20042 1.20374 -1.17039 1.17291 1.17911 1.18663 1.19287 1.19542 +1.19542 1.20374 1.22116 1.24164 1.25942 1.26807 +1.19287 1.20042 1.21643 1.2353 1.25161 1.25942 +1.18663 1.1928 1.20609 1.2218 1.2353 1.24164 +1.17911 1.18374 1.19396 1.20609 1.21643 1.22116 +1.17291 1.17619 1.18374 1.1928 1.20042 1.20374 +1.17039 1.17291 1.17911 1.18663 1.19287 1.19542 Species 4 -35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 -35597.2 35782 36180.5 36651.6 37056.3 37246.5 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 +35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35597.2 35782 36180.5 36651.6 37056.3 37246.5 +35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.4 35782 36010.4 36110.2 +35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 Species 5 -35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 -35597.2 35782 36180.5 36651.6 37056.3 37246.5 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 +35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35597.2 35782 36180.5 36651.6 37056.3 37246.5 +35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.4 35782 36010.4 36110.2 +35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 Species 6 -35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 -35597.2 35782 36180.5 36651.6 37056.3 37246.5 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 +35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35597.2 35782 36180.5 36651.6 37056.3 37246.5 +35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.4 35782 36010.4 36110.2 +35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 t = 5.00e+00 nst = 98 nfe = 0 nfi = 1767 nni = 1262 hu = 3.36e-01 @@ -311,52 +311,52 @@ t = 7.00e+00 nst = 100 nfe = 0 nfi = 1798 nni = 1283 hu = 2.99e+00 c values at t = 7: Species 1 -1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 -1.18601 1.19352 1.20945 1.22822 1.24445 1.25222 -1.17981 1.18594 1.19917 1.2148 1.22822 1.23454 -1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 -1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 -1.16363 1.16615 1.17232 1.17981 1.18601 1.18855 +1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 +1.18601 1.19352 1.20945 1.22822 1.24445 1.25222 +1.17981 1.18594 1.19917 1.2148 1.22822 1.23454 +1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 +1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 +1.16363 1.16615 1.17232 1.17981 1.18601 1.18855 Species 2 -1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 -1.18601 1.19352 1.20945 1.22823 1.24445 1.25222 -1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 -1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 -1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 -1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 +1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 +1.18601 1.19352 1.20945 1.22823 1.24445 1.25222 +1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 +1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 +1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 +1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 Species 3 -1.18855 1.19684 1.21416 1.23454 1.25223 1.26083 -1.18601 1.19352 1.20945 1.22823 1.24445 1.25223 -1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 -1.17232 1.17693 1.1871 1.19917 1.20945 1.21416 -1.16615 1.16941 1.17693 1.18594 1.19352 1.19684 -1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 +1.18855 1.19684 1.21416 1.23454 1.25223 1.26083 +1.18601 1.19352 1.20945 1.22823 1.24445 1.25223 +1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 +1.17232 1.17693 1.1871 1.19917 1.20945 1.21416 +1.16615 1.16941 1.17693 1.18594 1.19352 1.19684 +1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 Species 4 -35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 -35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 -35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 -35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 -34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 -34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 +35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 +35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 +35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 +35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 +34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 +34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 Species 5 -35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 -35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 -35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 -35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 -34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 -34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 +35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 +35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 +35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 +35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 +34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 +34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 Species 6 -35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 -35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 -35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 -35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 -34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 -34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 +35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 +35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 +35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 +35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 +34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 +34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 t = 8.00e+00 nst = 100 nfe = 0 nfi = 1798 nni = 1283 hu = 2.99e+00 @@ -367,75 +367,75 @@ t = 1.00e+01 nst = 101 nfe = 0 nfi = 1813 nni = 1293 hu = 6.31e+00 c values at t = 10: Species 1 -1.18839 1.19667 1.214 1.23437 1.25206 1.26066 -1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 -1.17965 1.18578 1.199 1.21463 1.22806 1.23437 -1.17216 1.17677 1.18693 1.199 1.20929 1.214 -1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 -1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 +1.18839 1.19667 1.214 1.23437 1.25206 1.26066 +1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 +1.17965 1.18578 1.199 1.21463 1.22806 1.23437 +1.17216 1.17677 1.18693 1.199 1.20929 1.214 +1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 +1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 Species 2 -1.18839 1.19667 1.214 1.23437 1.25206 1.26066 -1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 -1.17965 1.18578 1.199 1.21463 1.22806 1.23437 -1.17216 1.17677 1.18693 1.199 1.20929 1.214 -1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 -1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 +1.18839 1.19667 1.214 1.23437 1.25206 1.26066 +1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 +1.17965 1.18578 1.199 1.21463 1.22806 1.23437 +1.17216 1.17677 1.18693 1.199 1.20929 1.214 +1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 +1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 Species 3 -1.18839 1.19667 1.214 1.23437 1.25206 1.26066 -1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 -1.17965 1.18578 1.199 1.21463 1.22806 1.23437 -1.17216 1.17677 1.18693 1.199 1.20929 1.214 -1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 -1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 +1.18839 1.19667 1.214 1.23437 1.25206 1.26066 +1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 +1.17965 1.18578 1.199 1.21463 1.22806 1.23437 +1.17216 1.17677 1.18693 1.199 1.20929 1.214 +1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 +1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 Species 4 -35650.8 35899 36418.5 37029.4 37559.6 37817.5 -35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 -35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 -35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 -34978.7 35076.6 35302.1 35572.4 35799.7 35899 -34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 +35650.8 35899 36418.5 37029.4 37559.6 37817.5 +35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 +35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 +35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 +34978.7 35076.6 35302.1 35572.4 35799.7 35899 +34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 Species 5 -35650.8 35899 36418.5 37029.4 37559.6 37817.5 -35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 -35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 -35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 -34978.7 35076.6 35302.1 35572.4 35799.7 35899 -34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 +35650.8 35899 36418.5 37029.4 37559.6 37817.5 +35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 +35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 +35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 +34978.7 35076.6 35302.1 35572.4 35799.7 35899 +34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 Species 6 -35650.8 35899 36418.5 37029.4 37559.6 37817.5 -35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 -35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 -35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 -34978.7 35076.6 35302.1 35572.4 35799.7 35899 -34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 +35650.8 35899 36418.5 37029.4 37559.6 37817.5 +35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 +35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 +35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 +34978.7 35076.6 35302.1 35572.4 35799.7 35899 +34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 148 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 101 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 1813 - Number of f-s (SPGMR) = 4359 - Number of f-s (TOTAL) = 4359 - Number of setups = 72 - Number of nonlinear iterations = 1293 - Number of linear iterations = 4359 - Number of preconditioner evaluations = 72 - Number of preconditioner solves = 5618 - Number of error test failures = 1 - Number of nonlinear conv. failures = 25 - Number of linear convergence failures = 238 - Average Krylov subspace dimension = 3.371 + ARKStep real workspace length = 3790 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 101 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 1813 + Number of f-s (SPGMR) = 4359 + Number of f-s (TOTAL) = 4359 + Number of setups = 72 + Number of nonlinear iterations = 1293 + Number of linear iterations = 4359 + Number of preconditioner evaluations = 72 + Number of preconditioner solves = 5618 + Number of error test failures = 1 + Number of nonlinear conv. failures = 25 + Number of linear convergence failures = 238 + Average Krylov subspace dimension = 3.371 ---------------------------------------------------------------------------- @@ -487,24 +487,24 @@ t = 1.00e+01 nst = 101 nfe = 0 nfi = 1813 nni = 1293 hu = 6.31e+00 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 154 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 101 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 1813 - Number of f-s (SPGMR) = 4359 - Number of f-s (TOTAL) = 4359 - Number of setups = 72 - Number of nonlinear iterations = 1293 - Number of linear iterations = 4359 - Number of preconditioner evaluations = 72 - Number of preconditioner solves = 5618 - Number of error test failures = 1 - Number of nonlinear conv. failures = 25 - Number of linear convergence failures = 238 - Average Krylov subspace dimension = 3.371 + ARKStep real workspace length = 3790 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 101 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 1813 + Number of f-s (SPGMR) = 4359 + Number of f-s (TOTAL) = 4359 + Number of setups = 72 + Number of nonlinear iterations = 1293 + Number of linear iterations = 4359 + Number of preconditioner evaluations = 72 + Number of preconditioner solves = 5618 + Number of error test failures = 1 + Number of nonlinear conv. failures = 25 + Number of linear convergence failures = 238 + Average Krylov subspace dimension = 3.371 ---------------------------------------------------------------------------- @@ -556,24 +556,24 @@ t = 1.00e+01 nst = 234 nfe = 0 nfi = 4045 nni = 2856 hu = 3.93e-01 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 160 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 234 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 4045 - Number of f-s (SPGMR) = 10634 - Number of f-s (TOTAL) = 10634 - Number of setups = 277 - Number of nonlinear iterations = 2856 - Number of linear iterations = 10634 - Number of preconditioner evaluations = 277 - Number of preconditioner solves = 13350 - Number of error test failures = 1 - Number of nonlinear conv. failures = 166 - Number of linear convergence failures = 1036 - Average Krylov subspace dimension = 3.723 + ARKStep real workspace length = 3790 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 234 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 4045 + Number of f-s (SPGMR) = 10634 + Number of f-s (TOTAL) = 10634 + Number of setups = 277 + Number of nonlinear iterations = 2856 + Number of linear iterations = 10634 + Number of preconditioner evaluations = 277 + Number of preconditioner solves = 13350 + Number of error test failures = 1 + Number of nonlinear conv. failures = 166 + Number of linear convergence failures = 1036 + Average Krylov subspace dimension = 3.723 ---------------------------------------------------------------------------- @@ -625,24 +625,24 @@ t = 1.00e+01 nst = 234 nfe = 0 nfi = 4045 nni = 2856 hu = 3.93e-01 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 166 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 234 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 4045 - Number of f-s (SPGMR) = 10633 - Number of f-s (TOTAL) = 10633 - Number of setups = 277 - Number of nonlinear iterations = 2856 - Number of linear iterations = 10633 - Number of preconditioner evaluations = 277 - Number of preconditioner solves = 13349 - Number of error test failures = 1 - Number of nonlinear conv. failures = 166 - Number of linear convergence failures = 1036 - Average Krylov subspace dimension = 3.723 + ARKStep real workspace length = 3790 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 234 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 4045 + Number of f-s (SPGMR) = 10633 + Number of f-s (TOTAL) = 10633 + Number of setups = 277 + Number of nonlinear iterations = 2856 + Number of linear iterations = 10633 + Number of preconditioner evaluations = 277 + Number of preconditioner solves = 13349 + Number of error test failures = 1 + Number of nonlinear conv. failures = 166 + Number of linear convergence failures = 1036 + Average Krylov subspace dimension = 3.723 ---------------------------------------------------------------------------- diff --git a/examples/arkode/C_serial/ark_KrylovDemo_prec_2.out b/examples/arkode/C_serial/ark_KrylovDemo_prec_2.out index 8a09c9a96d..1c5be0014a 100644 --- a/examples/arkode/C_serial/ark_KrylovDemo_prec_2.out +++ b/examples/arkode/C_serial/ark_KrylovDemo_prec_2.out @@ -10,9 +10,9 @@ b parameter = 1 Diffusion coefficients: Dprey = 1 Dpred = 0.5 Rate parameter alpha = 1 -Mesh dimensions (mx,my) are 6, 6. Total system size is neq = 216 +Mesh dimensions (mx,my) are 6, 6. Total system size is neq = 216 -Tolerances: reltol = 1e-05, abstol = 1e-05 +Tolerances: reltol = 1e-05, abstol = 1e-05 Preconditioning uses a product of: (1) Gauss-Seidel iterations with itmax = 5 iterations, and @@ -31,52 +31,52 @@ Gram-Schmidt method type is gstype = SUN_MODIFIED_GS c values at t = 0: Species 1 -10 10 10 10 10 10 -10 10.1678 10.3775 10.3775 10.1678 10 -10 10.3775 10.8493 10.8493 10.3775 10 -10 10.3775 10.8493 10.8493 10.3775 10 -10 10.1678 10.3775 10.3775 10.1678 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.1678 10.3775 10.3775 10.1678 10 +10 10.3775 10.8493 10.8493 10.3775 10 +10 10.3775 10.8493 10.8493 10.3775 10 +10 10.1678 10.3775 10.3775 10.1678 10 +10 10 10 10 10 10 Species 2 -10 10 10 10 10 10 -10 10.3355 10.755 10.755 10.3355 10 -10 10.755 11.6987 11.6987 10.755 10 -10 10.755 11.6987 11.6987 10.755 10 -10 10.3355 10.755 10.755 10.3355 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.3355 10.755 10.755 10.3355 10 +10 10.755 11.6987 11.6987 10.755 10 +10 10.755 11.6987 11.6987 10.755 10 +10 10.3355 10.755 10.755 10.3355 10 +10 10 10 10 10 10 Species 3 -10 10 10 10 10 10 -10 10.5033 11.1325 11.1325 10.5033 10 -10 11.1325 12.548 12.548 11.1325 10 -10 11.1325 12.548 12.548 11.1325 10 -10 10.5033 11.1325 11.1325 10.5033 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.5033 11.1325 11.1325 10.5033 10 +10 11.1325 12.548 12.548 11.1325 10 +10 11.1325 12.548 12.548 11.1325 10 +10 10.5033 11.1325 11.1325 10.5033 10 +10 10 10 10 10 10 Species 4 -10 10 10 10 10 10 -10 10.6711 11.5099 11.5099 10.6711 10 -10 11.5099 13.3974 13.3974 11.5099 10 -10 11.5099 13.3974 13.3974 11.5099 10 -10 10.6711 11.5099 11.5099 10.6711 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.6711 11.5099 11.5099 10.6711 10 +10 11.5099 13.3974 13.3974 11.5099 10 +10 11.5099 13.3974 13.3974 11.5099 10 +10 10.6711 11.5099 11.5099 10.6711 10 +10 10 10 10 10 10 Species 5 -10 10 10 10 10 10 -10 10.8389 11.8874 11.8874 10.8389 10 -10 11.8874 14.2467 14.2467 11.8874 10 -10 11.8874 14.2467 14.2467 11.8874 10 -10 10.8389 11.8874 11.8874 10.8389 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.8389 11.8874 11.8874 10.8389 10 +10 11.8874 14.2467 14.2467 11.8874 10 +10 11.8874 14.2467 14.2467 11.8874 10 +10 10.8389 11.8874 11.8874 10.8389 10 +10 10 10 10 10 10 Species 6 -10 10 10 10 10 10 -10 11.0066 12.2649 12.2649 11.0066 10 -10 12.2649 15.0961 15.0961 12.2649 10 -10 12.2649 15.0961 15.0961 12.2649 10 -10 11.0066 12.2649 12.2649 11.0066 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 11.0066 12.2649 12.2649 11.0066 10 +10 12.2649 15.0961 15.0961 12.2649 10 +10 12.2649 15.0961 15.0961 12.2649 10 +10 11.0066 12.2649 12.2649 11.0066 10 +10 10 10 10 10 10 t = 1.00e-08 nst = 3 nfe = 0 nfi = 45 nni = 27 hu = 6.86e-08 @@ -87,52 +87,52 @@ t = 1.00e-06 nst = 4 nfe = 0 nfi = 77 nni = 49 hu = 1.20e-06 c values at t = 1e-06: Species 1 -9.99991 9.99992 9.99993 9.99993 9.99993 9.99992 -9.99992 10.1677 10.3774 10.3774 10.1677 9.99993 -9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 -9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 -9.99992 10.1677 10.3774 10.3774 10.1677 9.99992 -9.99991 9.99992 9.99993 9.99993 9.99992 9.99991 +9.99991 9.99992 9.99993 9.99993 9.99993 9.99992 +9.99992 10.1677 10.3774 10.3774 10.1677 9.99993 +9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 +9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 +9.99992 10.1677 10.3774 10.3774 10.1677 9.99992 +9.99991 9.99992 9.99993 9.99993 9.99992 9.99991 Species 2 -9.99991 9.99993 9.99995 9.99995 9.99993 9.99992 -9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 -9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 -9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 -9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 -9.99991 9.99993 9.99995 9.99995 9.99993 9.99991 +9.99991 9.99993 9.99995 9.99995 9.99993 9.99992 +9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 +9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 +9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 +9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 +9.99991 9.99993 9.99995 9.99995 9.99993 9.99991 Species 3 -9.99991 9.99994 9.99997 9.99997 9.99994 9.99992 -9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 -9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 -9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 -9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 -9.99991 9.99994 9.99997 9.99997 9.99994 9.99991 +9.99991 9.99994 9.99997 9.99997 9.99994 9.99992 +9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 +9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 +9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 +9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 +9.99991 9.99994 9.99997 9.99997 9.99994 9.99991 Species 4 -13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 -13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 -13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 -13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 -13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 -13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 +13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 +13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 +13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 +13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 +13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 +13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 Species 5 -13.4981 13.4981 13.4982 13.4981 13.4981 13.4981 -13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 -13.4982 16.4131 20.2351 20.2351 16.4131 13.4981 -13.4982 16.4131 20.2351 20.2351 16.4131 13.4982 -13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 -13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 +13.4981 13.4981 13.4982 13.4981 13.4981 13.4981 +13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 +13.4982 16.4131 20.2351 20.2351 16.4131 13.4981 +13.4982 16.4131 20.2351 20.2351 16.4131 13.4982 +13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 +13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 Species 6 -13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 -13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 -13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 -13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 -13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 -13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 +13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 +13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 +13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 +13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 +13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 +13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 t = 1.00e-05 nst = 12 nfe = 0 nfi = 197 nni = 129 hu = 1.19e-06 @@ -143,52 +143,52 @@ t = 1.00e-03 nst = 46 nfe = 0 nfi = 820 nni = 582 hu = 8.40e-03 c values at t = 0.001: Species 1 -9.90702 9.91664 9.92836 9.93033 9.92253 9.91674 -9.91472 10.0747 10.2769 10.2785 10.0795 9.92253 -9.92446 10.2748 10.7181 10.7194 10.2785 9.93033 -9.92445 10.2744 10.7173 10.7181 10.2769 9.92836 -9.91469 10.0734 10.2744 10.2748 10.0747 9.91664 -9.90697 9.91469 9.92445 9.92446 9.91472 9.90702 +9.90702 9.91664 9.92836 9.93033 9.92253 9.91674 +9.91472 10.0747 10.2769 10.2785 10.0795 9.92253 +9.92446 10.2748 10.7181 10.7194 10.2785 9.93033 +9.92445 10.2744 10.7173 10.7181 10.2769 9.92836 +9.91469 10.0734 10.2744 10.2748 10.0747 9.91664 +9.90697 9.91469 9.92445 9.92446 9.91472 9.90702 Species 2 -9.90742 9.92474 9.94622 9.94819 9.93064 9.91713 -9.92282 10.2412 10.644 10.6457 10.2461 9.93064 -9.94232 10.6419 11.5267 11.5281 10.6457 9.94819 -9.94231 10.6415 11.5258 11.5267 10.644 9.94622 -9.92279 10.24 10.6415 10.6419 10.2412 9.92474 -9.90737 9.92279 9.94231 9.94232 9.92282 9.90742 +9.90742 9.92474 9.94622 9.94819 9.93064 9.91713 +9.92282 10.2412 10.644 10.6457 10.2461 9.93064 +9.94232 10.6419 11.5267 11.5281 10.6457 9.94819 +9.94231 10.6415 11.5258 11.5267 10.644 9.94622 +9.92279 10.24 10.6415 10.6419 10.2412 9.92474 +9.90737 9.92279 9.94231 9.94232 9.92282 9.90742 Species 3 -9.90781 9.93284 9.96408 9.96605 9.93874 9.91752 -9.93092 10.4078 11.0109 11.0127 10.4127 9.93874 -9.96017 11.0088 12.3339 12.3354 11.0127 9.96605 -9.96016 11.0083 12.333 12.3339 11.0109 9.96408 -9.93089 10.4065 11.0083 11.0088 10.4078 9.93284 -9.90776 9.93089 9.96016 9.96017 9.93092 9.90781 +9.90781 9.93284 9.96408 9.96605 9.93874 9.91752 +9.93092 10.4078 11.0109 11.0127 10.4127 9.93874 +9.96017 11.0088 12.3339 12.3354 11.0127 9.96605 +9.96016 11.0083 12.333 12.3339 11.0109 9.96408 +9.93089 10.4065 11.0083 11.0088 10.4078 9.93284 +9.90776 9.93089 9.96016 9.96017 9.93092 9.90781 Species 4 -297231 297750 298393 298451 297925 297520 -297692 307245 319327 319378 307390 297925 -298276 319264 345799 345840 319378 298451 -298276 319252 345772 345799 319327 298393 -297691 307208 319252 319264 307245 297750 -297229 297691 298276 298276 297692 297231 +297231 297750 298393 298451 297925 297520 +297692 307245 319327 319378 307390 297925 +298276 319264 345799 345840 319378 298451 +298276 319252 345772 345799 319327 298393 +297691 307208 319252 319264 307245 297750 +297229 297691 298276 298276 297692 297231 Species 5 -297231 297750 298393 298451 297925 297520 -297692 307245 319327 319378 307390 297925 -298276 319264 345799 345840 319378 298451 -298276 319252 345772 345799 319327 298393 -297691 307208 319252 319264 307245 297750 -297229 297691 298276 298276 297692 297231 +297231 297750 298393 298451 297925 297520 +297692 307245 319327 319378 307390 297925 +298276 319264 345799 345840 319378 298451 +298276 319252 345772 345799 319327 298393 +297691 307208 319252 319264 307245 297750 +297229 297691 298276 298276 297692 297231 Species 6 -297231 297750 298393 298451 297925 297520 -297692 307245 319327 319378 307390 297925 -298276 319264 345799 345840 319378 298451 -298276 319252 345772 345799 319327 298393 -297691 307208 319252 319264 307245 297750 -297229 297691 298276 298276 297692 297231 +297231 297750 298393 298451 297925 297520 +297692 307245 319327 319378 307390 297925 +298276 319264 345799 345840 319378 298451 +298276 319252 345772 345799 319327 298393 +297691 307208 319252 319264 307245 297750 +297229 297691 298276 298276 297692 297231 t = 1.00e-02 nst = 47 nfe = 0 nfi = 840 nni = 597 hu = 1.32e-02 @@ -199,52 +199,52 @@ t = 1.00e+00 nst = 69 nfe = 0 nfi = 1259 nni = 904 hu = 5.51e-02 c values at t = 1: Species 1 -1.58852 1.59924 1.62152 1.64765 1.67037 1.68149 -1.58533 1.59504 1.61548 1.63952 1.66033 1.67037 -1.57757 1.58548 1.6024 1.62235 1.63952 1.64765 -1.56821 1.57412 1.58706 1.6024 1.61548 1.62152 -1.56049 1.56463 1.57412 1.58548 1.59504 1.59924 -1.55733 1.56049 1.56821 1.57757 1.58533 1.58852 +1.58852 1.59924 1.62152 1.64765 1.67037 1.68149 +1.58533 1.59504 1.61548 1.63952 1.66033 1.67037 +1.57757 1.58548 1.6024 1.62235 1.63952 1.64765 +1.56821 1.57412 1.58706 1.6024 1.61548 1.62152 +1.56049 1.56463 1.57412 1.58548 1.59504 1.59924 +1.55733 1.56049 1.56821 1.57757 1.58533 1.58852 Species 2 -1.59067 1.60141 1.62371 1.64987 1.67262 1.68376 -1.58749 1.5972 1.61767 1.64174 1.66257 1.67262 -1.57972 1.58763 1.60457 1.62455 1.64174 1.64987 -1.57034 1.57627 1.58922 1.60457 1.61767 1.62371 -1.56261 1.56677 1.57627 1.58763 1.5972 1.60141 -1.55945 1.56261 1.57034 1.57972 1.58749 1.59067 +1.59067 1.60141 1.62371 1.64987 1.67262 1.68376 +1.58749 1.5972 1.61767 1.64174 1.66257 1.67262 +1.57972 1.58763 1.60457 1.62455 1.64174 1.64987 +1.57034 1.57627 1.58922 1.60457 1.61767 1.62371 +1.56261 1.56677 1.57627 1.58763 1.5972 1.60141 +1.55945 1.56261 1.57034 1.57972 1.58749 1.59067 Species 3 -1.59271 1.60346 1.62579 1.65198 1.67474 1.6859 -1.58952 1.59925 1.61974 1.64383 1.66469 1.67474 -1.58174 1.58967 1.60662 1.62662 1.64383 1.65198 -1.57236 1.57829 1.59126 1.60662 1.61974 1.62579 -1.56462 1.56878 1.57829 1.58967 1.59925 1.60346 -1.56146 1.56462 1.57236 1.58174 1.58952 1.59271 +1.59271 1.60346 1.62579 1.65198 1.67474 1.6859 +1.58952 1.59925 1.61974 1.64383 1.66469 1.67474 +1.58174 1.58967 1.60662 1.62662 1.64383 1.65198 +1.57236 1.57829 1.59126 1.60662 1.61974 1.62579 +1.56462 1.56878 1.57829 1.58967 1.59925 1.60346 +1.56146 1.56462 1.57236 1.58174 1.58952 1.59271 Species 4 -47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 -47622.9 47914.2 48528 49249.8 49874.6 50175.6 -47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 -47108.7 47286.2 47674.7 48135.1 48528 48709.2 -46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 -46782 46876.8 47108.7 47389.8 47622.9 47718.5 +47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 +47622.9 47914.2 48528 49249.8 49874.6 50175.6 +47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 +47108.7 47286.2 47674.7 48135.1 48528 48709.2 +46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 +46782 46876.8 47108.7 47389.8 47622.9 47718.5 Species 5 -47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 -47622.9 47914.2 48528 49249.8 49874.6 50175.6 -47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 -47108.7 47286.2 47674.7 48135.1 48528 48709.2 -46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 -46782 46876.8 47108.7 47389.8 47622.9 47718.5 +47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 +47622.9 47914.2 48528 49249.8 49874.6 50175.6 +47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 +47108.7 47286.2 47674.7 48135.1 48528 48709.2 +46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 +46782 46876.8 47108.7 47389.8 47622.9 47718.5 Species 6 -47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 -47622.9 47914.2 48528 49249.8 49874.6 50175.6 -47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 -47108.7 47286.2 47674.7 48135.1 48528 48709.2 -46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 -46782 46876.8 47108.7 47389.8 47622.9 47718.5 +47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 +47622.9 47914.2 48528 49249.8 49874.6 50175.6 +47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 +47108.7 47286.2 47674.7 48135.1 48528 48709.2 +46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 +46782 46876.8 47108.7 47389.8 47622.9 47718.5 t = 2.00e+00 nst = 81 nfe = 0 nfi = 1463 nni = 1048 hu = 1.54e-01 @@ -255,52 +255,52 @@ t = 4.00e+00 nst = 95 nfe = 0 nfi = 1708 nni = 1221 hu = 2.69e-01 c values at t = 4: Species 1 -1.19535 1.20368 1.2211 1.24157 1.25935 1.268 -1.1928 1.20035 1.21636 1.23523 1.25154 1.25935 -1.18657 1.19274 1.20602 1.22173 1.23523 1.24157 -1.17904 1.18368 1.19389 1.20602 1.21636 1.2211 -1.17284 1.17613 1.18368 1.19274 1.20035 1.20368 -1.17032 1.17284 1.17904 1.18657 1.1928 1.19535 +1.19535 1.20368 1.2211 1.24157 1.25935 1.268 +1.1928 1.20035 1.21636 1.23523 1.25154 1.25935 +1.18657 1.19274 1.20602 1.22173 1.23523 1.24157 +1.17904 1.18368 1.19389 1.20602 1.21636 1.2211 +1.17284 1.17613 1.18368 1.19274 1.20035 1.20368 +1.17032 1.17284 1.17904 1.18657 1.1928 1.19535 Species 2 -1.19538 1.20371 1.22113 1.24161 1.25938 1.26804 -1.19284 1.20038 1.21639 1.23526 1.25157 1.25938 -1.1866 1.19277 1.20606 1.22177 1.23526 1.24161 -1.17908 1.18371 1.19393 1.20606 1.21639 1.22113 -1.17288 1.17616 1.18371 1.19277 1.20038 1.20371 -1.17035 1.17288 1.17908 1.1866 1.19284 1.19538 +1.19538 1.20371 1.22113 1.24161 1.25938 1.26804 +1.19284 1.20038 1.21639 1.23526 1.25157 1.25938 +1.1866 1.19277 1.20606 1.22177 1.23526 1.24161 +1.17908 1.18371 1.19393 1.20606 1.21639 1.22113 +1.17288 1.17616 1.18371 1.19277 1.20038 1.20371 +1.17035 1.17288 1.17908 1.1866 1.19284 1.19538 Species 3 -1.19542 1.20374 1.22116 1.24164 1.25942 1.26807 -1.19287 1.20042 1.21643 1.2353 1.25161 1.25942 -1.18663 1.1928 1.20609 1.2218 1.2353 1.24164 -1.17911 1.18374 1.19396 1.20609 1.21643 1.22116 -1.17291 1.17619 1.18374 1.1928 1.20042 1.20374 -1.17039 1.17291 1.17911 1.18663 1.19287 1.19542 +1.19542 1.20374 1.22116 1.24164 1.25942 1.26807 +1.19287 1.20042 1.21643 1.2353 1.25161 1.25942 +1.18663 1.1928 1.20609 1.2218 1.2353 1.24164 +1.17911 1.18374 1.19396 1.20609 1.21643 1.22116 +1.17291 1.17619 1.18374 1.1928 1.20042 1.20374 +1.17039 1.17291 1.17911 1.18663 1.19287 1.19542 Species 4 -35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 -35597.2 35782 36180.5 36651.6 37056.3 37246.5 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 +35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35597.2 35782 36180.5 36651.6 37056.3 37246.5 +35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.4 35782 36010.4 36110.2 +35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 Species 5 -35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 -35597.2 35782 36180.5 36651.6 37056.3 37246.5 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 +35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35597.2 35782 36180.5 36651.6 37056.3 37246.5 +35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.4 35782 36010.4 36110.2 +35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 Species 6 -35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 -35597.2 35782 36180.5 36651.6 37056.3 37246.5 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 +35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35597.2 35782 36180.5 36651.6 37056.3 37246.5 +35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.4 35782 36010.4 36110.2 +35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 t = 5.00e+00 nst = 98 nfe = 0 nfi = 1767 nni = 1262 hu = 3.36e-01 @@ -311,52 +311,52 @@ t = 7.00e+00 nst = 100 nfe = 0 nfi = 1798 nni = 1283 hu = 2.99e+00 c values at t = 7: Species 1 -1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 -1.18601 1.19352 1.20945 1.22822 1.24445 1.25222 -1.17981 1.18594 1.19917 1.2148 1.22822 1.23454 -1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 -1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 -1.16363 1.16615 1.17232 1.17981 1.18601 1.18855 +1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 +1.18601 1.19352 1.20945 1.22822 1.24445 1.25222 +1.17981 1.18594 1.19917 1.2148 1.22822 1.23454 +1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 +1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 +1.16363 1.16615 1.17232 1.17981 1.18601 1.18855 Species 2 -1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 -1.18601 1.19352 1.20945 1.22823 1.24445 1.25222 -1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 -1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 -1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 -1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 +1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 +1.18601 1.19352 1.20945 1.22823 1.24445 1.25222 +1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 +1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 +1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 +1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 Species 3 -1.18855 1.19684 1.21416 1.23454 1.25223 1.26083 -1.18601 1.19352 1.20945 1.22823 1.24445 1.25223 -1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 -1.17232 1.17693 1.1871 1.19917 1.20945 1.21416 -1.16615 1.16941 1.17693 1.18594 1.19352 1.19684 -1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 +1.18855 1.19684 1.21416 1.23454 1.25223 1.26083 +1.18601 1.19352 1.20945 1.22823 1.24445 1.25223 +1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 +1.17232 1.17693 1.1871 1.19917 1.20945 1.21416 +1.16615 1.16941 1.17693 1.18594 1.19352 1.19684 +1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 Species 4 -35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 -35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 -35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 -35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 -34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 -34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 +35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 +35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 +35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 +35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 +34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 +34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 Species 5 -35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 -35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 -35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 -35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 -34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 -34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 +35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 +35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 +35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 +35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 +34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 +34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 Species 6 -35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 -35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 -35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 -35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 -34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 -34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 +35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 +35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 +35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 +35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 +34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 +34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 t = 8.00e+00 nst = 100 nfe = 0 nfi = 1798 nni = 1283 hu = 2.99e+00 @@ -367,75 +367,75 @@ t = 1.00e+01 nst = 101 nfe = 0 nfi = 1813 nni = 1293 hu = 6.31e+00 c values at t = 10: Species 1 -1.18839 1.19667 1.214 1.23437 1.25206 1.26066 -1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 -1.17965 1.18578 1.199 1.21463 1.22806 1.23437 -1.17216 1.17677 1.18693 1.199 1.20929 1.214 -1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 -1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 +1.18839 1.19667 1.214 1.23437 1.25206 1.26066 +1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 +1.17965 1.18578 1.199 1.21463 1.22806 1.23437 +1.17216 1.17677 1.18693 1.199 1.20929 1.214 +1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 +1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 Species 2 -1.18839 1.19667 1.214 1.23437 1.25206 1.26066 -1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 -1.17965 1.18578 1.199 1.21463 1.22806 1.23437 -1.17216 1.17677 1.18693 1.199 1.20929 1.214 -1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 -1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 +1.18839 1.19667 1.214 1.23437 1.25206 1.26066 +1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 +1.17965 1.18578 1.199 1.21463 1.22806 1.23437 +1.17216 1.17677 1.18693 1.199 1.20929 1.214 +1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 +1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 Species 3 -1.18839 1.19667 1.214 1.23437 1.25206 1.26066 -1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 -1.17965 1.18578 1.199 1.21463 1.22806 1.23437 -1.17216 1.17677 1.18693 1.199 1.20929 1.214 -1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 -1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 +1.18839 1.19667 1.214 1.23437 1.25206 1.26066 +1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 +1.17965 1.18578 1.199 1.21463 1.22806 1.23437 +1.17216 1.17677 1.18693 1.199 1.20929 1.214 +1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 +1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 Species 4 -35650.8 35899 36418.5 37029.4 37559.6 37817.5 -35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 -35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 -35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 -34978.7 35076.6 35302.1 35572.4 35799.7 35899 -34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 +35650.8 35899 36418.5 37029.4 37559.6 37817.5 +35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 +35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 +35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 +34978.7 35076.6 35302.1 35572.4 35799.7 35899 +34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 Species 5 -35650.8 35899 36418.5 37029.4 37559.6 37817.5 -35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 -35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 -35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 -34978.7 35076.6 35302.1 35572.4 35799.7 35899 -34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 +35650.8 35899 36418.5 37029.4 37559.6 37817.5 +35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 +35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 +35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 +34978.7 35076.6 35302.1 35572.4 35799.7 35899 +34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 Species 6 -35650.8 35899 36418.5 37029.4 37559.6 37817.5 -35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 -35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 -35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 -34978.7 35076.6 35302.1 35572.4 35799.7 35899 -34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 +35650.8 35899 36418.5 37029.4 37559.6 37817.5 +35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 +35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 +35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 +34978.7 35076.6 35302.1 35572.4 35799.7 35899 +34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 148 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 101 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 1813 - Number of f-s (SPGMR) = 4359 - Number of f-s (TOTAL) = 4359 - Number of setups = 72 - Number of nonlinear iterations = 1293 - Number of linear iterations = 4359 - Number of preconditioner evaluations = 72 - Number of preconditioner solves = 5618 - Number of error test failures = 1 - Number of nonlinear conv. failures = 25 - Number of linear convergence failures = 238 - Average Krylov subspace dimension = 3.371 + ARKStep real workspace length = 3790 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 101 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 1813 + Number of f-s (SPGMR) = 4359 + Number of f-s (TOTAL) = 4359 + Number of setups = 72 + Number of nonlinear iterations = 1293 + Number of linear iterations = 4359 + Number of preconditioner evaluations = 72 + Number of preconditioner solves = 5618 + Number of error test failures = 1 + Number of nonlinear conv. failures = 25 + Number of linear convergence failures = 238 + Average Krylov subspace dimension = 3.371 ---------------------------------------------------------------------------- @@ -487,24 +487,24 @@ t = 1.00e+01 nst = 101 nfe = 0 nfi = 1813 nni = 1293 hu = 6.31e+00 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 154 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 101 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 1813 - Number of f-s (SPGMR) = 4359 - Number of f-s (TOTAL) = 4359 - Number of setups = 72 - Number of nonlinear iterations = 1293 - Number of linear iterations = 4359 - Number of preconditioner evaluations = 72 - Number of preconditioner solves = 5618 - Number of error test failures = 1 - Number of nonlinear conv. failures = 25 - Number of linear convergence failures = 238 - Average Krylov subspace dimension = 3.371 + ARKStep real workspace length = 3790 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 101 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 1813 + Number of f-s (SPGMR) = 4359 + Number of f-s (TOTAL) = 4359 + Number of setups = 72 + Number of nonlinear iterations = 1293 + Number of linear iterations = 4359 + Number of preconditioner evaluations = 72 + Number of preconditioner solves = 5618 + Number of error test failures = 1 + Number of nonlinear conv. failures = 25 + Number of linear convergence failures = 238 + Average Krylov subspace dimension = 3.371 ---------------------------------------------------------------------------- @@ -556,24 +556,24 @@ t = 1.00e+01 nst = 234 nfe = 0 nfi = 4045 nni = 2856 hu = 3.93e-01 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 160 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 234 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 4045 - Number of f-s (SPGMR) = 10634 - Number of f-s (TOTAL) = 10634 - Number of setups = 277 - Number of nonlinear iterations = 2856 - Number of linear iterations = 10634 - Number of preconditioner evaluations = 277 - Number of preconditioner solves = 13350 - Number of error test failures = 1 - Number of nonlinear conv. failures = 166 - Number of linear convergence failures = 1036 - Average Krylov subspace dimension = 3.723 + ARKStep real workspace length = 3790 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 234 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 4045 + Number of f-s (SPGMR) = 10634 + Number of f-s (TOTAL) = 10634 + Number of setups = 277 + Number of nonlinear iterations = 2856 + Number of linear iterations = 10634 + Number of preconditioner evaluations = 277 + Number of preconditioner solves = 13350 + Number of error test failures = 1 + Number of nonlinear conv. failures = 166 + Number of linear convergence failures = 1036 + Average Krylov subspace dimension = 3.723 ---------------------------------------------------------------------------- @@ -625,24 +625,24 @@ t = 1.00e+01 nst = 234 nfe = 0 nfi = 4045 nni = 2856 hu = 3.93e-01 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 166 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 234 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 4045 - Number of f-s (SPGMR) = 10633 - Number of f-s (TOTAL) = 10633 - Number of setups = 277 - Number of nonlinear iterations = 2856 - Number of linear iterations = 10633 - Number of preconditioner evaluations = 277 - Number of preconditioner solves = 13349 - Number of error test failures = 1 - Number of nonlinear conv. failures = 166 - Number of linear convergence failures = 1036 - Average Krylov subspace dimension = 3.723 + ARKStep real workspace length = 3790 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 234 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 4045 + Number of f-s (SPGMR) = 10633 + Number of f-s (TOTAL) = 10633 + Number of setups = 277 + Number of nonlinear iterations = 2856 + Number of linear iterations = 10633 + Number of preconditioner evaluations = 277 + Number of preconditioner solves = 13349 + Number of error test failures = 1 + Number of nonlinear conv. failures = 166 + Number of linear convergence failures = 1036 + Average Krylov subspace dimension = 3.723 ---------------------------------------------------------------------------- diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_arkstep_1.out b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_arkstep_1.out index 79e9246274..ade4792ef4 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_arkstep_1.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_arkstep_1.out @@ -2,14 +2,14 @@ Start ARKStep preallocation test Using DIRK method Using Newton nonlinear solver Using GMRES iterative linear solver - t u v u err v err + t u v u err v err ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 1.029860256095084e-04 1.224744870316961e+00 1.732050195224250e+00 7.854161765408207e-12 2.731148640577885e-14 - 1.634509895443788e-02 1.224717600094773e+00 1.716694985522809e+00 4.466385261636674e-09 6.044738709576336e-09 - 3.254871529235759e-02 1.224636741653238e+00 1.671973015366888e+00 8.026050712928168e-09 5.988021634095730e-09 + 1.634509831323043e-02 1.224717600096914e+00 1.716694986722200e+00 4.466384151413649e-09 6.044736933219497e-09 + 3.254871465408885e-02 1.224636741657479e+00 1.671973017680123e+00 8.026050268838958e-09 5.988020079783496e-09 ------------------------------------------------------------------------------------------------------------------------------ -Current time = 0.0325487152923576 +Current time = 0.0325487146540888 Steps = 3 Step attempts = 3 Stability limited steps = 0 @@ -18,8 +18,8 @@ Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 Initial step size = 0.000102986025609508 -Last step size = 0.0162036163379197 -Current step size = 0.0160003634180696 +Last step size = 0.0162036163408584 +Current step size = 0.0160003634285686 Explicit RHS fn evals = 0 Implicit RHS fn evals = 49 NLS iters = 31 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_erkstep_1.out b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_erkstep_1.out index 11002e04ca..07ee2d38c7 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_erkstep_1.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_erkstep_1.out @@ -1,12 +1,12 @@ Start ERKStep preallocation test - t u v u err v err + t u v u err v err ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 1.029860256095084e-04 1.224744870309106e+00 1.732050195224277e+00 2.220446049250313e-16 0.000000000000000e+00 - 1.606364534231249e-02 1.224718491293716e+00 1.717217032062862e+00 4.421219967909451e-08 2.910637308950470e-08 - 3.202338818315199e-02 1.224640124009817e+00 1.673862546151861e+00 8.746489865707474e-08 1.494766854737151e-07 + 1.606364533954449e-02 1.224718491293725e+00 1.717217032067952e+00 4.421219967909451e-08 2.910637331154931e-08 + 3.202338818037329e-02 1.224640124009836e+00 1.673862546161781e+00 8.746489865707474e-08 1.494766852516705e-07 ------------------------------------------------------------------------------------------------------------------------------ -Current time = 0.032023388183152 +Current time = 0.0320233881803733 Steps = 3 Step attempts = 4 Stability limited steps = 0 @@ -15,7 +15,7 @@ Error test fails = 1 NLS step fails = 0 Inequality constraint fails = 0 Initial step size = 0.000102986025609508 -Last step size = 0.0159597428408395 -Current step size = 0.0166588795525631 +Last step size = 0.0159597428408288 +Current step size = 0.0166588795523219 RHS fn evals = 19 End ERKStep preallocation test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep_1.out b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep_1.out index 441d468b29..091f1f64ad 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep_1.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep_1.out @@ -2,9 +2,9 @@ Start LSRKStep preallocation test t y y err --------------------------------------------------------------------- 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 - 6.103515625000001e-12 6.103515624999975e-12 2.504160057533580e-26 - 6.104125976562500e-08 6.104125976562474e-08 1.852884572118782e-22 - 1.281744384765625e-06 1.281744384765305e-06 3.822236174485030e-19 + 6.103515625000001e-12 6.103515624999988e-12 1.211690350419474e-26 + 6.104125976562500e-08 6.104125976562487e-08 5.293955920339377e-23 + 1.281744384765625e-06 1.281744384765308e-06 3.851882327638931e-19 --------------------------------------------------------------------- Current time = 1.28174438476563e-06 Steps = 3 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_sprkstep_1.out b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_sprkstep_1.out index 329037de9d..7985369f2f 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_sprkstep_1.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_sprkstep_1.out @@ -1,9 +1,9 @@ Start SPRKStep preallocation test - t q1 q2 q3 q4 + t q1 q2 q3 q4 ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 4.000000000000000e-01 0.000000000000000e+00 0.000000000000000e+00 2.000000000000000e+00 - 1.000000000000000e-03 3.999968750113932e-01 1.999994791691249e-03 -6.249954427477657e-03 1.999984375130207e+00 - 2.000000000000000e-03 3.999875001822874e-01 3.999958334163726e-03 -1.249963542950927e-02 1.999937502083256e+00 + 1.000000000000000e-03 3.999968750113932e-01 1.999994791691249e-03 -6.249954427477658e-03 1.999984375130207e+00 + 2.000000000000000e-03 3.999875001822874e-01 3.999958334163726e-03 -1.249963542950928e-02 1.999937502083256e+00 3.000000000000000e-03 3.999718759228028e-01 5.999859381323369e-03 -1.874876962886015e-02 1.999859385545991e+00 ------------------------------------------------------------------------------------------------------------------------------ Current time = 0.003 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_0.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_0.out new file mode 100644 index 0000000000..9acf3930f3 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_0.out @@ -0,0 +1,60 @@ +Start ARKStep StageInfo test +Using ERK method + t u v u err v err +------------------------------------------------------------------------------------------------------------------------------ + 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 + [Pre-RHS processing (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 0 of 5) at t = 4.71e-08 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 0 of 5) at t = 2.06e-04 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] + [Post-stage processing (stage 1 of 5) at t = 4.12e-05 (tn = 0.00e+00 , tcur = 4.12e-05), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 1 of 5) at t = 4.12e-05 (tn = 0.00e+00 , tcur = 4.12e-05), ||y||_2 = 2.1213203436e+00] + [Post-stage processing (stage 2 of 5) at t = 6.18e-05 (tn = 0.00e+00 , tcur = 6.18e-05), ||y||_2 = 2.1213200432e+00] + [Pre-RHS processing (stage 2 of 5) at t = 6.18e-05 (tn = 0.00e+00 , tcur = 6.18e-05), ||y||_2 = 2.1213200432e+00] + [Post-stage processing (stage 3 of 5) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213199340e+00] + [Pre-RHS processing (stage 3 of 5) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213199340e+00] + [Post-stage processing (stage 4 of 5) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] + [Pre-RHS processing (stage 4 of 5) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] + [Post-step processing at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] + 1.0298602561e-04 1.2247448703e+00 1.7320501952e+00 2.2204460493e-16 0.0000000000e+00 + [Pre-step processing at t = 1.03e-04 (tn = 1.03e-04 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] + [Post-stage processing (stage 1 of 5) at t = 5.97e-03 (tn = 1.03e-04 , tcur = 5.97e-03), ||y||_2 = 2.1212628048e+00] + [Pre-RHS processing (stage 1 of 5) at t = 5.97e-03 (tn = 1.03e-04 , tcur = 5.97e-03), ||y||_2 = 2.1212628048e+00] + [Post-stage processing (stage 2 of 5) at t = 8.90e-03 (tn = 1.03e-04 , tcur = 8.90e-03), ||y||_2 = 2.1151489029e+00] + [Pre-RHS processing (stage 2 of 5) at t = 8.90e-03 (tn = 1.03e-04 , tcur = 8.90e-03), ||y||_2 = 2.1151489029e+00] + [Post-stage processing (stage 3 of 5) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1129070889e+00] + [Pre-RHS processing (stage 3 of 5) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1129070889e+00] + [Post-stage processing (stage 4 of 5) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1110724430e+00] + [Pre-RHS processing (stage 4 of 5) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1110724430e+00] + [Post-step processing at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02),||y||_2 = 2.1110724430e+00] + 1.4770753232e-02 1.2247225752e+00 1.7195003557e+00 2.8937936936e-08 2.5927171299e-08 + [Pre-step processing at t = 1.48e-02 (tn = 1.48e-02 , tcur = 1.48e-02),||y||_2 = 2.1110724430e+00] + [Post-stage processing (stage 1 of 5) at t = 2.06e-02 (tn = 1.48e-02 , tcur = 2.06e-02), ||y||_2 = 2.1030688067e+00] + [Pre-RHS processing (stage 1 of 5) at t = 2.06e-02 (tn = 1.48e-02 , tcur = 2.06e-02), ||y||_2 = 2.1030688067e+00] + [Post-stage processing (stage 2 of 5) at t = 2.35e-02 (tn = 1.48e-02 , tcur = 2.35e-02), ||y||_2 = 2.0933502617e+00] + [Pre-RHS processing (stage 2 of 5) at t = 2.35e-02 (tn = 1.48e-02 , tcur = 2.35e-02), ||y||_2 = 2.0933502617e+00] + [Post-stage processing (stage 3 of 5) at t = 2.93e-02 (tn = 1.48e-02 , tcur = 2.93e-02), ||y||_2 = 2.0833181423e+00] + [Pre-RHS processing (stage 3 of 5) at t = 2.93e-02 (tn = 1.48e-02 , tcur = 2.93e-02), ||y||_2 = 2.0833181423e+00] + [Post-stage processing (stage 4 of 5) at t = 2.93e-02 (tn = 1.48e-02 , tcur = 2.93e-02), ||y||_2 = 2.0816387128e+00] + [Pre-RHS processing (stage 4 of 5) at t = 2.93e-02 (tn = 1.48e-02 , tcur = 2.93e-02), ||y||_2 = 2.0816387128e+00] + [Post-step processing at t = 2.93e-02 (tn = 1.48e-02 , tcur = 2.93e-02),||y||_2 = 2.0816387128e+00] + 2.9275139624e-02 1.2246573481e+00 1.6832807581e+00 5.5763322404e-08 6.7822652161e-08 +------------------------------------------------------------------------------------------------------------------------------ +Current time = 0.0292751396243773 +Steps = 3 +Step attempts = 3 +Stability limited steps = 0 +Accuracy limited steps = 3 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.000102986025609508 +Last step size = 0.0145043863921471 +Current step size = 0.0149829090932849 +Explicit RHS fn evals = 15 +Implicit RHS fn evals = 0 +NLS iters = 0 +NLS fails = 0 +NLS iters per step = 0 +LS setups = 0 +End ARKStep StageInfo test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_1.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_1.out new file mode 100644 index 0000000000..e71dadd09c --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_1.out @@ -0,0 +1,79 @@ +Start ARKStep StageInfo test +Using DIRK method +Using Newton nonlinear solver +Using GMRES iterative linear solver + t u v u err v err +------------------------------------------------------------------------------------------------------------------------------ + 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 + [Pre-RHS processing (stage 0 of 6) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 0 of 6) at t = 4.71e-08 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 0 of 6) at t = 2.06e-04 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] + [Post-stage processing (stage 1 of 6) at t = 5.15e-05 (tn = 0.00e+00 , tcur = 5.15e-05), ||y||_2 = 2.1213202184e+00] + [Pre-RHS processing (stage 1 of 6) at t = 5.15e-05 (tn = 0.00e+00 , tcur = 5.15e-05), ||y||_2 = 2.1213202184e+00] + [Post-stage processing (stage 2 of 6) at t = 1.51e-05 (tn = 0.00e+00 , tcur = 1.51e-05), ||y||_2 = 2.1213203328e+00] + [Pre-RHS processing (stage 2 of 6) at t = 1.51e-05 (tn = 0.00e+00 , tcur = 1.51e-05), ||y||_2 = 2.1213203328e+00] + [Post-stage processing (stage 3 of 6) at t = 6.44e-05 (tn = 0.00e+00 , tcur = 6.44e-05), ||y||_2 = 2.1213201480e+00] + [Pre-RHS processing (stage 3 of 6) at t = 6.44e-05 (tn = 0.00e+00 , tcur = 6.44e-05), ||y||_2 = 2.1213201480e+00] + [Post-stage processing (stage 4 of 6) at t = 1.07e-04 (tn = 0.00e+00 , tcur = 1.07e-04), ||y||_2 = 2.1213198021e+00] + [Pre-RHS processing (stage 4 of 6) at t = 1.07e-04 (tn = 0.00e+00 , tcur = 1.07e-04), ||y||_2 = 2.1213198021e+00] + [Post-stage processing (stage 5 of 6) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] + [Pre-RHS processing (stage 5 of 6) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] + [Post-step processing at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] + 1.0298602561e-04 1.2247448703e+00 1.7320501952e+00 7.8541617654e-12 2.7311486406e-14 + [Pre-step processing at t = 1.03e-04 (tn = 1.03e-04 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] + [Post-stage processing (stage 1 of 6) at t = 8.22e-03 (tn = 1.03e-04 , tcur = 8.22e-03), ||y||_2 = 2.1181363096e+00] + [Pre-RHS processing (stage 1 of 6) at t = 8.22e-03 (tn = 1.03e-04 , tcur = 8.22e-03), ||y||_2 = 2.1181363096e+00] + [Post-stage processing (stage 2 of 6) at t = 2.48e-03 (tn = 1.03e-04 , tcur = 2.48e-03), ||y||_2 = 2.1210284133e+00] + [Pre-RHS processing (stage 2 of 6) at t = 2.48e-03 (tn = 1.03e-04 , tcur = 2.48e-03), ||y||_2 = 2.1210284133e+00] + [Post-stage processing (stage 3 of 6) at t = 1.03e-02 (tn = 1.03e-04 , tcur = 1.03e-02), ||y||_2 = 2.1163721824e+00] + [Pre-RHS processing (stage 3 of 6) at t = 1.03e-02 (tn = 1.03e-04 , tcur = 1.03e-02), ||y||_2 = 2.1163721824e+00] + [Post-stage processing (stage 4 of 6) at t = 1.70e-02 (tn = 1.03e-04 , tcur = 1.70e-02), ||y||_2 = 2.1077895068e+00] + [Pre-RHS processing (stage 4 of 6) at t = 1.70e-02 (tn = 1.03e-04 , tcur = 1.70e-02), ||y||_2 = 2.1077895068e+00] + [Post-stage processing (stage 5 of 6) at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02), ||y||_2 = 2.1087851653e+00] + [Pre-RHS processing (stage 5 of 6) at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02), ||y||_2 = 2.1087851653e+00] + [Post-step processing at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02),||y||_2 = 2.1087851653e+00] + 1.6345098954e-02 1.2247176001e+00 1.7166949855e+00 4.4663852616e-09 6.0447387096e-09 + [Pre-step processing at t = 1.63e-02 (tn = 1.63e-02 , tcur = 1.63e-02),||y||_2 = 2.1087851653e+00] + [Post-stage processing (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.0935030131e+00] + [Pre-RHS processing (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.0935030131e+00] + [Post-stage processing (stage 2 of 6) at t = 1.87e-02 (tn = 1.63e-02 , tcur = 1.87e-02), ||y||_2 = 2.1049048030e+00] + [Pre-RHS processing (stage 2 of 6) at t = 1.87e-02 (tn = 1.63e-02 , tcur = 1.87e-02), ||y||_2 = 2.1049048030e+00] + [Post-stage processing (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.0887671857e+00] + [Pre-RHS processing (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.0887671857e+00] + [Post-stage processing (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.0705966594e+00] + [Pre-RHS processing (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.0705966594e+00] + [Post-stage processing (stage 5 of 6) at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), ||y||_2 = 2.0724934048e+00] + [Pre-RHS processing (stage 5 of 6) at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), ||y||_2 = 2.0724934048e+00] + [Post-step processing at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02),||y||_2 = 2.0724934048e+00] + 3.2548715292e-02 1.2246367417e+00 1.6719730154e+00 8.0260507129e-09 5.9880216341e-09 +------------------------------------------------------------------------------------------------------------------------------ +Current time = 0.0325487152923576 +Steps = 3 +Step attempts = 3 +Stability limited steps = 0 +Accuracy limited steps = 3 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.000102986025609508 +Last step size = 0.0162036163379197 +Current step size = 0.0160003634180696 +Explicit RHS fn evals = 0 +Implicit RHS fn evals = 49 +NLS iters = 31 +NLS fails = 0 +NLS iters per step = 10.3333333333333 +LS setups = 0 +Jac fn evals = 0 +LS RHS fn evals = 34 +Prec setup evals = 0 +Prec solves = 0 +LS iters = 34 +LS fails = 0 +Jac-times setups = 0 +Jac-times evals = 34 +LS iters per NLS iter = 1.09677419354839 +Jac evals per NLS iter = 0 +Prec evals per NLS iter = 0 +End ARKStep StageInfo test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_2.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_2.out new file mode 100644 index 0000000000..c7df90650a --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_2.out @@ -0,0 +1,87 @@ +Start ARKStep StageInfo test +Using ImEx method +Using Newton nonlinear solver +Using GMRES iterative linear solver + t u v u err v err +------------------------------------------------------------------------------------------------------------------------------ + 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 + [Pre-RHS processing (stage 0 of 7) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 0 of 7) at t = 4.71e-08 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 0 of 7) at t = 2.06e-04 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] + [Post-stage processing (stage 1 of 7) at t = 2.54e-05 (tn = 0.00e+00 , tcur = 2.54e-05), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 1 of 7) at t = 2.54e-05 (tn = 0.00e+00 , tcur = 2.54e-05), ||y||_2 = 2.1213203436e+00] + [Post-stage processing (stage 2 of 7) at t = 4.34e-05 (tn = 0.00e+00 , tcur = 4.34e-05), ||y||_2 = 2.1213202546e+00] + [Pre-RHS processing (stage 2 of 7) at t = 4.34e-05 (tn = 0.00e+00 , tcur = 4.34e-05), ||y||_2 = 2.1213202546e+00] + [Post-stage processing (stage 3 of 7) at t = 3.45e-05 (tn = 0.00e+00 , tcur = 3.45e-05), ||y||_2 = 2.1213202874e+00] + [Pre-RHS processing (stage 3 of 7) at t = 3.45e-05 (tn = 0.00e+00 , tcur = 3.45e-05), ||y||_2 = 2.1213202874e+00] + [Post-stage processing (stage 4 of 7) at t = 7.72e-06 (tn = 0.00e+00 , tcur = 7.72e-06), ||y||_2 = 2.1213203407e+00] + [Pre-RHS processing (stage 4 of 7) at t = 7.72e-06 (tn = 0.00e+00 , tcur = 7.72e-06), ||y||_2 = 2.1213203407e+00] + [Post-stage processing (stage 5 of 7) at t = 7.21e-05 (tn = 0.00e+00 , tcur = 7.21e-05), ||y||_2 = 2.1213200983e+00] + [Pre-RHS processing (stage 5 of 7) at t = 7.21e-05 (tn = 0.00e+00 , tcur = 7.21e-05), ||y||_2 = 2.1213200983e+00] + [Post-stage processing (stage 6 of 7) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] + [Pre-RHS processing (stage 6 of 7) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] + [Post-step processing at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] + 1.0298602561e-04 1.2247448703e+00 1.7320501952e+00 2.2204460493e-16 0.0000000000e+00 + [Pre-step processing at t = 1.03e-04 (tn = 1.03e-04 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] + [Pre-RHS processing (stage 0 of 7) at t = 1.03e-04 (tn = 1.03e-04 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] + [Post-stage processing (stage 1 of 7) at t = 8.73e-03 (tn = 1.03e-04 , tcur = 8.73e-03), ||y||_2 = 2.1212262228e+00] + [Pre-RHS processing (stage 1 of 7) at t = 8.73e-03 (tn = 1.03e-04 , tcur = 8.73e-03), ||y||_2 = 2.1212262228e+00] + [Post-stage processing (stage 2 of 7) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1109953892e+00] + [Pre-RHS processing (stage 2 of 7) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1109953892e+00] + [Post-stage processing (stage 3 of 7) at t = 1.18e-02 (tn = 1.03e-04 , tcur = 1.18e-02), ||y||_2 = 2.1147654976e+00] + [Pre-RHS processing (stage 3 of 7) at t = 1.18e-02 (tn = 1.03e-04 , tcur = 1.18e-02), ||y||_2 = 2.1147654976e+00] + [Post-stage processing (stage 4 of 7) at t = 2.72e-03 (tn = 1.03e-04 , tcur = 2.72e-03), ||y||_2 = 2.1209503426e+00] + [Pre-RHS processing (stage 4 of 7) at t = 2.72e-03 (tn = 1.03e-04 , tcur = 2.72e-03), ||y||_2 = 2.1209503426e+00] + [Post-stage processing (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.0932817810e+00] + [Pre-RHS processing (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.0932817810e+00] + [Post-stage processing (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.0649469358e+00] + [Pre-RHS processing (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.0649469358e+00] + [Post-step processing at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02),||y||_2 = 2.0649991558e+00] + 3.5024521932e-02 1.2246196097e+00 1.6626870797e+00 6.6819398681e-08 6.5525542281e-07 + [Pre-step processing at t = 3.50e-02 (tn = 3.50e-02 , tcur = 3.50e-02),||y||_2 = 2.0649991558e+00] + [Pre-RHS processing (stage 0 of 7) at t = 3.50e-02 (tn = 3.50e-02 , tcur = 3.50e-02), ||y||_2 = 2.0649991558e+00] + [Post-stage processing (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0383161449e+00] + [Pre-RHS processing (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0383161449e+00] + [Post-stage processing (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0114194404e+00] + [Pre-RHS processing (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0114194404e+00] + [Post-stage processing (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0236366549e+00] + [Pre-RHS processing (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0236366549e+00] + [Post-stage processing (stage 4 of 7) at t = 3.76e-02 (tn = 3.50e-02 , tcur = 3.76e-02), ||y||_2 = 2.0565070541e+00] + [Pre-RHS processing (stage 4 of 7) at t = 3.76e-02 (tn = 3.50e-02 , tcur = 3.76e-02), ||y||_2 = 2.0565070541e+00] + [Post-stage processing (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 1.9686914710e+00] + [Pre-RHS processing (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 1.9686914710e+00] + [Post-stage processing (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 1.9163758117e+00] + [Pre-RHS processing (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 1.9163758117e+00] + [Post-step processing at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02),||y||_2 = 1.9169542285e+00] + 6.9697813939e-02 1.2242491983e+00 1.4751025098e+00 2.2221884333e-08 2.5857302401e-06 +------------------------------------------------------------------------------------------------------------------------------ +Current time = 0.0696978139393375 +Steps = 3 +Step attempts = 3 +Stability limited steps = 0 +Accuracy limited steps = 3 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.000102986025609508 +Last step size = 0.0346732920075373 +Current step size = 0.0331306528243113 +Explicit RHS fn evals = 23 +Implicit RHS fn evals = 62 +NLS iters = 39 +NLS fails = 0 +NLS iters per step = 13 +LS setups = 0 +Jac fn evals = 0 +LS RHS fn evals = 46 +Prec setup evals = 0 +Prec solves = 0 +LS iters = 46 +LS fails = 0 +Jac-times setups = 0 +Jac-times evals = 46 +LS iters per NLS iter = 1.17948717948718 +Jac evals per NLS iter = 0 +Prec evals per NLS iter = 0 +End ARKStep StageInfo test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.out new file mode 100644 index 0000000000..24eb193950 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.out @@ -0,0 +1,64 @@ +Start ERKStep StageInfo test + t u v u err v err +------------------------------------------------------------------------------------------------------------------------------ + 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 + [Pre-RHS processing (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 0 of 5) at t = 4.71e-08 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 0 of 5) at t = 2.06e-04 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] + [Post-stage processing (stage 1 of 5) at t = 4.12e-05 (tn = 0.00e+00 , tcur = 4.12e-05), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 1 of 5) at t = 4.12e-05 (tn = 0.00e+00 , tcur = 4.12e-05), ||y||_2 = 2.1213203436e+00] + [Post-stage processing (stage 2 of 5) at t = 6.18e-05 (tn = 0.00e+00 , tcur = 6.18e-05), ||y||_2 = 2.1213200432e+00] + [Pre-RHS processing (stage 2 of 5) at t = 6.18e-05 (tn = 0.00e+00 , tcur = 6.18e-05), ||y||_2 = 2.1213200432e+00] + [Post-stage processing (stage 3 of 5) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213199340e+00] + [Pre-RHS processing (stage 3 of 5) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213199340e+00] + [Post-stage processing (stage 4 of 5) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] + [Pre-RHS processing (stage 4 of 5) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] + [Post-step processing at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] + 1.0298602561e-04 1.2247448703e+00 1.7320501952e+00 2.2204460493e-16 0.0000000000e+00 + [Pre-step processing at t = 1.03e-04 (tn = 1.03e-04 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] + [Post-stage processing (stage 1 of 5) at t = 6.56e-03 (tn = 1.03e-04 , tcur = 6.56e-03), ||y||_2 = 2.1212571010e+00] + [Pre-RHS processing (stage 1 of 5) at t = 6.56e-03 (tn = 1.03e-04 , tcur = 6.56e-03), ||y||_2 = 2.1212571010e+00] + [Post-stage processing (stage 2 of 5) at t = 9.78e-03 (tn = 1.03e-04 , tcur = 9.78e-03), ||y||_2 = 2.1138657560e+00] + [Pre-RHS processing (stage 2 of 5) at t = 9.78e-03 (tn = 1.03e-04 , tcur = 9.78e-03), ||y||_2 = 2.1138657560e+00] + [Post-stage processing (stage 3 of 5) at t = 1.62e-02 (tn = 1.03e-04 , tcur = 1.62e-02), ||y||_2 = 2.1111621624e+00] + [Pre-RHS processing (stage 3 of 5) at t = 1.62e-02 (tn = 1.03e-04 , tcur = 1.62e-02), ||y||_2 = 2.1111621624e+00] + [Post-stage processing (stage 4 of 5) at t = 1.62e-02 (tn = 1.03e-04 , tcur = 1.62e-02), ||y||_2 = 2.1089486495e+00] + [Pre-RHS processing (stage 4 of 5) at t = 1.62e-02 (tn = 1.03e-04 , tcur = 1.62e-02), ||y||_2 = 2.1089486495e+00] + [Post-step failure processing at t = 1.62e-02 (tn = 1.03e-04 , tcur = 1.62e-02),||y||_2 = 2.1089486495e+00] + [Pre-step processing at t = 1.03e-04 (tn = 1.03e-04 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] + [Post-stage processing (stage 1 of 5) at t = 6.49e-03 (tn = 1.03e-04 , tcur = 6.49e-03), ||y||_2 = 2.1212577772e+00] + [Pre-RHS processing (stage 1 of 5) at t = 6.49e-03 (tn = 1.03e-04 , tcur = 6.49e-03), ||y||_2 = 2.1212577772e+00] + [Post-stage processing (stage 2 of 5) at t = 9.68e-03 (tn = 1.03e-04 , tcur = 9.68e-03), ||y||_2 = 2.1140241446e+00] + [Pre-RHS processing (stage 2 of 5) at t = 9.68e-03 (tn = 1.03e-04 , tcur = 9.68e-03), ||y||_2 = 2.1140241446e+00] + [Post-stage processing (stage 3 of 5) at t = 1.61e-02 (tn = 1.03e-04 , tcur = 1.61e-02), ||y||_2 = 2.1113775352e+00] + [Pre-RHS processing (stage 3 of 5) at t = 1.61e-02 (tn = 1.03e-04 , tcur = 1.61e-02), ||y||_2 = 2.1113775352e+00] + [Post-stage processing (stage 4 of 5) at t = 1.61e-02 (tn = 1.03e-04 , tcur = 1.61e-02), ||y||_2 = 2.1092106860e+00] + [Pre-RHS processing (stage 4 of 5) at t = 1.61e-02 (tn = 1.03e-04 , tcur = 1.61e-02), ||y||_2 = 2.1092106860e+00] + [Post-step processing at t = 1.61e-02 (tn = 1.03e-04 , tcur = 1.61e-02),||y||_2 = 2.1092106860e+00] + 1.6063645342e-02 1.2247184913e+00 1.7172170321e+00 4.4212199679e-08 2.9106373090e-08 + [Pre-step processing at t = 1.61e-02 (tn = 1.61e-02 , tcur = 1.61e-02),||y||_2 = 2.1092106860e+00] + [Post-stage processing (stage 1 of 5) at t = 2.24e-02 (tn = 1.61e-02 , tcur = 2.24e-02), ||y||_2 = 2.0996520676e+00] + [Pre-RHS processing (stage 1 of 5) at t = 2.24e-02 (tn = 1.61e-02 , tcur = 2.24e-02), ||y||_2 = 2.0996520676e+00] + [Post-stage processing (stage 2 of 5) at t = 2.56e-02 (tn = 1.61e-02 , tcur = 2.56e-02), ||y||_2 = 2.0880076268e+00] + [Pre-RHS processing (stage 2 of 5) at t = 2.56e-02 (tn = 1.61e-02 , tcur = 2.56e-02), ||y||_2 = 2.0880076268e+00] + [Post-stage processing (stage 3 of 5) at t = 3.20e-02 (tn = 1.61e-02 , tcur = 3.20e-02), ||y||_2 = 2.0760211062e+00] + [Pre-RHS processing (stage 3 of 5) at t = 3.20e-02 (tn = 1.61e-02 , tcur = 3.20e-02), ||y||_2 = 2.0760211062e+00] + [Post-stage processing (stage 4 of 5) at t = 3.20e-02 (tn = 1.61e-02 , tcur = 3.20e-02), ||y||_2 = 2.0740200714e+00] + [Pre-RHS processing (stage 4 of 5) at t = 3.20e-02 (tn = 1.61e-02 , tcur = 3.20e-02), ||y||_2 = 2.0740200714e+00] + [Post-step processing at t = 3.20e-02 (tn = 1.61e-02 , tcur = 3.20e-02),||y||_2 = 2.0740200714e+00] + 3.2023388183e-02 1.2246401240e+00 1.6738625462e+00 8.7464898657e-08 1.4947668547e-07 +------------------------------------------------------------------------------------------------------------------------------ +Current time = 0.032023388183152 +Steps = 3 +Step attempts = 4 +Stability limited steps = 0 +Accuracy limited steps = 4 +Error test fails = 1 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.000102986025609508 +Last step size = 0.0159597428408395 +Current step size = 0.0166588795525631 +RHS fn evals = 19 +End ERKStep StageInfo test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.out new file mode 100644 index 0000000000..c27dcd9965 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.out @@ -0,0 +1,28 @@ +Start ForcingStep StageInfo test + t y y err +--------------------------------------------------------------------- + 0.000000000000000e+00 1.000000000000000e+00 0.000000000000000e+00 + [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 1.0000000000e+00] + [Post-step processing at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03),||y||_2 = 9.9900100033e-01] + 1.0000000000e-03 9.9900100033e-01 9.9999966707e-07 + [Pre-step processing at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03),||y||_2 = 9.9900100033e-01] + [Post-step processing at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03),||y||_2 = 9.9800200066e-01] + 2.0000000000e-03 9.9800200066e-01 1.9979980046e-06 + [Pre-step processing at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03),||y||_2 = 9.9800200066e-01] + [Post-step processing at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03),||y||_2 = 9.9700300299e-01] + 3.0000000000e-03 9.9700300299e-01 2.9939930263e-06 +--------------------------------------------------------------------- +Current time = 0.003 +Steps = 3 +Step attempts = 3 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.001 +Last step size = 0.001 +Current step size = 0.001 +Partition 1 evolves = 3 +Partition 2 evolves = 3 +End ForcingStep StageInfo test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_0.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_0.out new file mode 100644 index 0000000000..708dbf3084 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_0.out @@ -0,0 +1,44 @@ +Start LSRKStep StageInfo test + t y y err +--------------------------------------------------------------------- + 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 + [Pre-RHS processing (stage 0 of 0) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] + [Pre-RHS processing (stage 0 of 0) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] + [Pre-RHS processing (stage 0 of 0) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] + [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 0.0000000000e+00] + [Post-stage processing (stage 0 of 2) at t = 1.47e-12 (tn = 0.00e+00 , tcur = 1.47e-12), ||y||_2 = 1.4693648727e-12] + [Pre-RHS processing (stage 1 of 2) at t = 1.47e-12 (tn = 0.00e+00 , tcur = 1.47e-12), ||y||_2 = 1.4693648727e-12] + [Pre-RHS processing (stage 2 of 2) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Post-step processing at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] + 6.1035156250e-12 6.1035156250e-12 2.5041600575e-26 + [Pre-step processing at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] + [Post-stage processing (stage 0 of 2) at t = 1.47e-08 (tn = 6.10e-12 , tcur = 1.47e-08), ||y||_2 = 1.4699752242e-08] + [Pre-RHS processing (stage 1 of 2) at t = 1.47e-08 (tn = 6.10e-12 , tcur = 1.47e-08), ||y||_2 = 1.4699752242e-08] + [Pre-RHS processing (stage 2 of 2) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Post-step processing at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] + 6.1041259766e-08 6.1041259766e-08 1.8528845721e-22 + [Pre-step processing at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] + [Post-stage processing (stage 0 of 2) at t = 3.55e-07 (tn = 6.10e-08 , tcur = 3.55e-07), ||y||_2 = 3.5491423430e-07] + [Pre-RHS processing (stage 1 of 2) at t = 3.55e-07 (tn = 6.10e-08 , tcur = 3.55e-07), ||y||_2 = 3.5491423430e-07] + [Pre-RHS processing (stage 2 of 2) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Post-step processing at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06),||y||_2 = 1.2817443848e-06] + 1.2817443848e-06 1.2817443848e-06 3.8222361745e-19 +--------------------------------------------------------------------- +Current time = 1.28174438476563e-06 +Steps = 3 +Step attempts = 3 +Stability limited steps = 0 +Accuracy limited steps = 3 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 6.103515625e-12 +Last step size = 1.220703125e-06 +Current step size = 2.44140625e-05 +RHS fn evals = 9 +Number of dom_eig updates = 1 +Max. num. of stages used = 2 +Max. num. of stages allowed = 200 +Max. spectral radius = 999.9 +Min. spectral radius = 999.9 +End LSRKStep StageInfo test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_1.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_1.out new file mode 100644 index 0000000000..cf89be1e94 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_1.out @@ -0,0 +1,44 @@ +Start LSRKStep StageInfo test + t y y err +--------------------------------------------------------------------- + 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 + [Pre-RHS processing (stage 0 of 0) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] + [Pre-RHS processing (stage 0 of 0) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] + [Pre-RHS processing (stage 0 of 0) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] + [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 0.0000000000e+00] + [Post-stage processing (stage 0 of 2) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] + [Pre-RHS processing (stage 1 of 2) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] + [Pre-RHS processing (stage 2 of 2) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Post-step processing at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] + 6.1035156250e-12 6.1035156250e-12 0.0000000000e+00 + [Pre-step processing at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] + [Post-stage processing (stage 0 of 2) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] + [Pre-RHS processing (stage 1 of 2) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] + [Pre-RHS processing (stage 2 of 2) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Post-step processing at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] + 6.1041259766e-08 6.1041259766e-08 3.9704669403e-23 + [Pre-step processing at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] + [Post-stage processing (stage 0 of 2) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] + [Pre-RHS processing (stage 1 of 2) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] + [Pre-RHS processing (stage 2 of 2) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Post-step processing at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06),||y||_2 = 1.2817443848e-06] + 1.2817443848e-06 1.2817443848e-06 3.0323779512e-19 +--------------------------------------------------------------------- +Current time = 1.28174438476563e-06 +Steps = 3 +Step attempts = 3 +Stability limited steps = 0 +Accuracy limited steps = 3 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 6.103515625e-12 +Last step size = 1.220703125e-06 +Current step size = 2.44140625e-05 +RHS fn evals = 9 +Number of dom_eig updates = 1 +Max. num. of stages used = 2 +Max. num. of stages allowed = 200 +Max. spectral radius = 999.9 +Min. spectral radius = 999.9 +End LSRKStep StageInfo test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_2.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_2.out new file mode 100644 index 0000000000..519cca6ef7 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_2.out @@ -0,0 +1,87 @@ +Start LSRKStep StageInfo test + t y y err +--------------------------------------------------------------------- + 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 + [Pre-RHS processing (stage 0 of 10) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] + [Pre-RHS processing (stage 0 of 10) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] + [Pre-RHS processing (stage 0 of 10) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] + [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 0.0000000000e+00] + [Post-stage processing (stage 0 of 10) at t = 6.78e-13 (tn = 0.00e+00 , tcur = 6.78e-13), ||y||_2 = 6.7816840278e-13] + [Pre-RHS processing (stage 1 of 10) at t = 6.78e-13 (tn = 0.00e+00 , tcur = 6.78e-13), ||y||_2 = 6.7816840278e-13] + [Post-stage processing (stage 1 of 10) at t = 1.36e-12 (tn = 0.00e+00 , tcur = 1.36e-12), ||y||_2 = 1.3563368056e-12] + [Pre-RHS processing (stage 2 of 10) at t = 1.36e-12 (tn = 0.00e+00 , tcur = 1.36e-12), ||y||_2 = 1.3563368056e-12] + [Post-stage processing (stage 2 of 10) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] + [Pre-RHS processing (stage 3 of 10) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] + [Post-stage processing (stage 3 of 10) at t = 2.71e-12 (tn = 0.00e+00 , tcur = 2.71e-12), ||y||_2 = 2.7126736111e-12] + [Pre-RHS processing (stage 4 of 10) at t = 2.71e-12 (tn = 0.00e+00 , tcur = 2.71e-12), ||y||_2 = 2.7126736111e-12] + [Post-stage processing (stage 4 of 10) at t = 3.39e-12 (tn = 0.00e+00 , tcur = 3.39e-12), ||y||_2 = 3.3908420139e-12] + [Pre-RHS processing (stage 5 of 10) at t = 3.39e-12 (tn = 0.00e+00 , tcur = 3.39e-12), ||y||_2 = 3.3908420139e-12] + [Post-stage processing (stage 5 of 10) at t = 4.07e-12 (tn = 0.00e+00 , tcur = 4.07e-12), ||y||_2 = 4.0690104167e-12] + [Pre-RHS processing (stage 6 of 10) at t = 4.07e-12 (tn = 0.00e+00 , tcur = 4.07e-12), ||y||_2 = 4.0690104167e-12] + [Post-stage processing (stage 6 of 10) at t = 4.75e-12 (tn = 0.00e+00 , tcur = 4.75e-12), ||y||_2 = 4.7471788194e-12] + [Pre-RHS processing (stage 7 of 10) at t = 4.75e-12 (tn = 0.00e+00 , tcur = 4.75e-12), ||y||_2 = 4.7471788194e-12] + [Post-stage processing (stage 7 of 10) at t = 5.43e-12 (tn = 0.00e+00 , tcur = 5.43e-12), ||y||_2 = 5.4253472222e-12] + [Pre-RHS processing (stage 8 of 10) at t = 5.43e-12 (tn = 0.00e+00 , tcur = 5.43e-12), ||y||_2 = 5.4253472222e-12] + [Post-stage processing (stage 8 of 10) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Pre-RHS processing (stage 9 of 10) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Post-step processing at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] + 6.1035156250e-12 6.1035156250e-12 8.0779356695e-28 + [Pre-step processing at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] + [Pre-RHS processing (stage 0 of 10) at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Post-stage processing (stage 0 of 10) at t = 6.79e-09 (tn = 6.10e-12 , tcur = 6.79e-09), ||y||_2 = 6.7877875434e-09] + [Pre-RHS processing (stage 1 of 10) at t = 6.79e-09 (tn = 6.10e-12 , tcur = 6.79e-09), ||y||_2 = 6.7877875434e-09] + [Post-stage processing (stage 1 of 10) at t = 1.36e-08 (tn = 6.10e-12 , tcur = 1.36e-08), ||y||_2 = 1.3569471571e-08] + [Pre-RHS processing (stage 2 of 10) at t = 1.36e-08 (tn = 6.10e-12 , tcur = 1.36e-08), ||y||_2 = 1.3569471571e-08] + [Post-stage processing (stage 2 of 10) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] + [Pre-RHS processing (stage 3 of 10) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] + [Post-stage processing (stage 3 of 10) at t = 2.71e-08 (tn = 6.10e-12 , tcur = 2.71e-08), ||y||_2 = 2.7132839627e-08] + [Pre-RHS processing (stage 4 of 10) at t = 2.71e-08 (tn = 6.10e-12 , tcur = 2.71e-08), ||y||_2 = 2.7132839627e-08] + [Post-stage processing (stage 4 of 10) at t = 3.39e-08 (tn = 6.10e-12 , tcur = 3.39e-08), ||y||_2 = 3.3914523655e-08] + [Pre-RHS processing (stage 5 of 10) at t = 3.39e-08 (tn = 6.10e-12 , tcur = 3.39e-08), ||y||_2 = 3.3914523655e-08] + [Post-stage processing (stage 5 of 10) at t = 4.07e-08 (tn = 6.10e-12 , tcur = 4.07e-08), ||y||_2 = 4.0696207682e-08] + [Pre-RHS processing (stage 6 of 10) at t = 4.07e-08 (tn = 6.10e-12 , tcur = 4.07e-08), ||y||_2 = 4.0696207682e-08] + [Post-stage processing (stage 6 of 10) at t = 4.75e-08 (tn = 6.10e-12 , tcur = 4.75e-08), ||y||_2 = 4.7477891710e-08] + [Pre-RHS processing (stage 7 of 10) at t = 4.75e-08 (tn = 6.10e-12 , tcur = 4.75e-08), ||y||_2 = 4.7477891710e-08] + [Post-stage processing (stage 7 of 10) at t = 5.43e-08 (tn = 6.10e-12 , tcur = 5.43e-08), ||y||_2 = 5.4259575738e-08] + [Pre-RHS processing (stage 8 of 10) at t = 5.43e-08 (tn = 6.10e-12 , tcur = 5.43e-08), ||y||_2 = 5.4259575738e-08] + [Post-stage processing (stage 8 of 10) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Pre-RHS processing (stage 9 of 10) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Post-step processing at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] + 6.1041259766e-08 6.1041259766e-08 0.0000000000e+00 + [Pre-step processing at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] + [Pre-RHS processing (stage 0 of 10) at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Post-stage processing (stage 0 of 10) at t = 1.97e-07 (tn = 6.10e-08 , tcur = 1.97e-07), ||y||_2 = 1.9667494032e-07] + [Pre-RHS processing (stage 1 of 10) at t = 1.97e-07 (tn = 6.10e-08 , tcur = 1.97e-07), ||y||_2 = 1.9667494032e-07] + [Post-stage processing (stage 1 of 10) at t = 3.32e-07 (tn = 6.10e-08 , tcur = 3.32e-07), ||y||_2 = 3.3230862088e-07] + [Pre-RHS processing (stage 2 of 10) at t = 3.32e-07 (tn = 6.10e-08 , tcur = 3.32e-07), ||y||_2 = 3.3230862088e-07] + [Post-stage processing (stage 2 of 10) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] + [Pre-RHS processing (stage 3 of 10) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] + [Post-stage processing (stage 3 of 10) at t = 6.04e-07 (tn = 6.10e-08 , tcur = 6.04e-07), ||y||_2 = 6.0357598199e-07] + [Pre-RHS processing (stage 4 of 10) at t = 6.04e-07 (tn = 6.10e-08 , tcur = 6.04e-07), ||y||_2 = 6.0357598199e-07] + [Post-stage processing (stage 4 of 10) at t = 7.39e-07 (tn = 6.10e-08 , tcur = 7.39e-07), ||y||_2 = 7.3920966254e-07] + [Pre-RHS processing (stage 5 of 10) at t = 7.39e-07 (tn = 6.10e-08 , tcur = 7.39e-07), ||y||_2 = 7.3920966254e-07] + [Post-stage processing (stage 5 of 10) at t = 8.75e-07 (tn = 6.10e-08 , tcur = 8.75e-07), ||y||_2 = 8.7484334310e-07] + [Pre-RHS processing (stage 6 of 10) at t = 8.75e-07 (tn = 6.10e-08 , tcur = 8.75e-07), ||y||_2 = 8.7484334310e-07] + [Post-stage processing (stage 6 of 10) at t = 1.01e-06 (tn = 6.10e-08 , tcur = 1.01e-06), ||y||_2 = 1.0104770237e-06] + [Pre-RHS processing (stage 7 of 10) at t = 1.01e-06 (tn = 6.10e-08 , tcur = 1.01e-06), ||y||_2 = 1.0104770237e-06] + [Post-stage processing (stage 7 of 10) at t = 1.15e-06 (tn = 6.10e-08 , tcur = 1.15e-06), ||y||_2 = 1.1461107042e-06] + [Pre-RHS processing (stage 8 of 10) at t = 1.15e-06 (tn = 6.10e-08 , tcur = 1.15e-06), ||y||_2 = 1.1461107042e-06] + [Post-stage processing (stage 8 of 10) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Pre-RHS processing (stage 9 of 10) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Post-step processing at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06),||y||_2 = 1.2817443848e-06] + 1.2817443848e-06 1.2817443848e-06 3.3881317890e-20 +--------------------------------------------------------------------- +Current time = 1.28174438476563e-06 +Steps = 3 +Step attempts = 3 +Stability limited steps = 0 +Accuracy limited steps = 3 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 6.103515625e-12 +Last step size = 1.220703125e-06 +Current step size = 2.44140625e-05 +RHS fn evals = 32 +Number of stages used = 10 +End LSRKStep StageInfo test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_3.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_3.out new file mode 100644 index 0000000000..bb4088f1a8 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_3.out @@ -0,0 +1,81 @@ +Start LSRKStep StageInfo test + t y y err +--------------------------------------------------------------------- + 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 + [Pre-RHS processing (stage 0 of 9) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] + [Pre-RHS processing (stage 0 of 9) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] + [Pre-RHS processing (stage 0 of 9) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] + [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 0.0000000000e+00] + [Post-stage processing (stage 0 of 9) at t = 1.02e-12 (tn = 0.00e+00 , tcur = 1.02e-12), ||y||_2 = 1.0172526042e-12] + [Pre-RHS processing (stage 1 of 9) at t = 1.02e-12 (tn = 0.00e+00 , tcur = 1.02e-12), ||y||_2 = 1.0172526042e-12] + [Post-stage processing (stage 1 of 9) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] + [Pre-RHS processing (stage 2 of 9) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] + [Post-stage processing (stage 2 of 9) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Pre-RHS processing (stage 3 of 9) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Post-stage processing (stage 3 of 9) at t = 4.07e-12 (tn = 0.00e+00 , tcur = 4.07e-12), ||y||_2 = 4.0690104167e-12] + [Pre-RHS processing (stage 4 of 9) at t = 4.07e-12 (tn = 0.00e+00 , tcur = 4.07e-12), ||y||_2 = 4.0690104167e-12] + [Post-stage processing (stage 4 of 9) at t = 5.09e-12 (tn = 0.00e+00 , tcur = 5.09e-12), ||y||_2 = 5.0862630208e-12] + [Pre-RHS processing (stage 5 of 9) at t = 5.09e-12 (tn = 0.00e+00 , tcur = 5.09e-12), ||y||_2 = 5.0862630208e-12] + [Post-stage processing (stage 5 of 9) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Pre-RHS processing (stage 6 of 9) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Post-stage processing (stage 6 of 9) at t = 4.07e-12 (tn = 0.00e+00 , tcur = 4.07e-12), ||y||_2 = 4.0690104167e-12] + [Pre-RHS processing (stage 7 of 9) at t = 4.07e-12 (tn = 0.00e+00 , tcur = 4.07e-12), ||y||_2 = 4.0690104167e-12] + [Post-stage processing (stage 7 of 9) at t = 5.09e-12 (tn = 0.00e+00 , tcur = 5.09e-12), ||y||_2 = 5.0862630208e-12] + [Pre-RHS processing (stage 8 of 9) at t = 5.09e-12 (tn = 0.00e+00 , tcur = 5.09e-12), ||y||_2 = 5.0862630208e-12] + [Post-step processing at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] + 6.1035156250e-12 6.1035156250e-12 0.0000000000e+00 + [Pre-step processing at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] + [Pre-RHS processing (stage 0 of 9) at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Post-stage processing (stage 0 of 9) at t = 1.02e-08 (tn = 6.10e-12 , tcur = 1.02e-08), ||y||_2 = 1.0178629557e-08] + [Pre-RHS processing (stage 1 of 9) at t = 1.02e-08 (tn = 6.10e-12 , tcur = 1.02e-08), ||y||_2 = 1.0178629557e-08] + [Post-stage processing (stage 1 of 9) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] + [Pre-RHS processing (stage 2 of 9) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] + [Post-stage processing (stage 2 of 9) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Pre-RHS processing (stage 3 of 9) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Post-stage processing (stage 3 of 9) at t = 4.07e-08 (tn = 6.10e-12 , tcur = 4.07e-08), ||y||_2 = 4.0696207682e-08] + [Pre-RHS processing (stage 4 of 9) at t = 4.07e-08 (tn = 6.10e-12 , tcur = 4.07e-08), ||y||_2 = 4.0696207682e-08] + [Post-stage processing (stage 4 of 9) at t = 5.09e-08 (tn = 6.10e-12 , tcur = 5.09e-08), ||y||_2 = 5.0868733724e-08] + [Pre-RHS processing (stage 5 of 9) at t = 5.09e-08 (tn = 6.10e-12 , tcur = 5.09e-08), ||y||_2 = 5.0868733724e-08] + [Post-stage processing (stage 5 of 9) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Pre-RHS processing (stage 6 of 9) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Post-stage processing (stage 6 of 9) at t = 4.07e-08 (tn = 6.10e-12 , tcur = 4.07e-08), ||y||_2 = 4.0696207682e-08] + [Pre-RHS processing (stage 7 of 9) at t = 4.07e-08 (tn = 6.10e-12 , tcur = 4.07e-08), ||y||_2 = 4.0696207682e-08] + [Post-stage processing (stage 7 of 9) at t = 5.09e-08 (tn = 6.10e-12 , tcur = 5.09e-08), ||y||_2 = 5.0868733724e-08] + [Pre-RHS processing (stage 8 of 9) at t = 5.09e-08 (tn = 6.10e-12 , tcur = 5.09e-08), ||y||_2 = 5.0868733724e-08] + [Post-step processing at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] + 6.1041259766e-08 6.1041259766e-08 1.3234889801e-23 + [Pre-step processing at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] + [Pre-RHS processing (stage 0 of 9) at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Post-stage processing (stage 0 of 9) at t = 2.64e-07 (tn = 6.10e-08 , tcur = 2.64e-07), ||y||_2 = 2.6449178060e-07] + [Pre-RHS processing (stage 1 of 9) at t = 2.64e-07 (tn = 6.10e-08 , tcur = 2.64e-07), ||y||_2 = 2.6449178060e-07] + [Post-stage processing (stage 1 of 9) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] + [Pre-RHS processing (stage 2 of 9) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] + [Post-stage processing (stage 2 of 9) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Pre-RHS processing (stage 3 of 9) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Post-stage processing (stage 3 of 9) at t = 8.75e-07 (tn = 6.10e-08 , tcur = 8.75e-07), ||y||_2 = 8.7484334310e-07] + [Pre-RHS processing (stage 4 of 9) at t = 8.75e-07 (tn = 6.10e-08 , tcur = 8.75e-07), ||y||_2 = 8.7484334310e-07] + [Post-stage processing (stage 4 of 9) at t = 1.08e-06 (tn = 6.10e-08 , tcur = 1.08e-06), ||y||_2 = 1.0782938639e-06] + [Pre-RHS processing (stage 5 of 9) at t = 1.08e-06 (tn = 6.10e-08 , tcur = 1.08e-06), ||y||_2 = 1.0782938639e-06] + [Post-stage processing (stage 5 of 9) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Pre-RHS processing (stage 6 of 9) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Post-stage processing (stage 6 of 9) at t = 8.75e-07 (tn = 6.10e-08 , tcur = 8.75e-07), ||y||_2 = 8.7484334310e-07] + [Pre-RHS processing (stage 7 of 9) at t = 8.75e-07 (tn = 6.10e-08 , tcur = 8.75e-07), ||y||_2 = 8.7484334310e-07] + [Post-stage processing (stage 7 of 9) at t = 1.08e-06 (tn = 6.10e-08 , tcur = 1.08e-06), ||y||_2 = 1.0782938639e-06] + [Pre-RHS processing (stage 8 of 9) at t = 1.08e-06 (tn = 6.10e-08 , tcur = 1.08e-06), ||y||_2 = 1.0782938639e-06] + [Post-step processing at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06),||y||_2 = 1.2817443848e-06] + 1.2817443848e-06 1.2817443848e-06 2.1175823681e-22 +--------------------------------------------------------------------- +Current time = 1.28174438476563e-06 +Steps = 3 +Step attempts = 3 +Stability limited steps = 0 +Accuracy limited steps = 3 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 6.103515625e-12 +Last step size = 1.220703125e-06 +Current step size = 2.44140625e-05 +RHS fn evals = 29 +Number of stages used = 9 +End LSRKStep StageInfo test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_4.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_4.out new file mode 100644 index 0000000000..9e12c1f98c --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_4.out @@ -0,0 +1,51 @@ +Start LSRKStep StageInfo test + t y y err +--------------------------------------------------------------------- + 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 + [Pre-RHS processing (stage 0 of 4) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] + [Pre-RHS processing (stage 0 of 4) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] + [Pre-RHS processing (stage 0 of 4) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] + [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 0.0000000000e+00] + [Post-stage processing (stage 0 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Pre-RHS processing (stage 1 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Post-stage processing (stage 1 of 4) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Pre-RHS processing (stage 2 of 4) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Post-stage processing (stage 2 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Pre-RHS processing (stage 3 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Post-step processing at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] + 6.1035156250e-12 6.1035156250e-12 8.0779356695e-28 + [Pre-step processing at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] + [Pre-RHS processing (stage 0 of 4) at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Post-stage processing (stage 0 of 4) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Pre-RHS processing (stage 1 of 4) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Post-stage processing (stage 1 of 4) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Pre-RHS processing (stage 2 of 4) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Post-stage processing (stage 2 of 4) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Pre-RHS processing (stage 3 of 4) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Post-step processing at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] + 6.1041259766e-08 6.1041259766e-08 1.3234889801e-23 + [Pre-step processing at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] + [Pre-RHS processing (stage 0 of 4) at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Post-stage processing (stage 0 of 4) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Pre-RHS processing (stage 1 of 4) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Post-stage processing (stage 1 of 4) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Pre-RHS processing (stage 2 of 4) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Post-stage processing (stage 2 of 4) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Pre-RHS processing (stage 3 of 4) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Post-step processing at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06),||y||_2 = 1.2817443848e-06] + 1.2817443848e-06 1.2817443848e-06 0.0000000000e+00 +--------------------------------------------------------------------- +Current time = 1.28174438476563e-06 +Steps = 3 +Step attempts = 3 +Stability limited steps = 0 +Accuracy limited steps = 3 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 6.103515625e-12 +Last step size = 1.220703125e-06 +Current step size = 2.44140625e-05 +RHS fn evals = 14 +Number of stages used = 4 +End LSRKStep StageInfo test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_5.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_5.out new file mode 100644 index 0000000000..ef7c10d695 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_5.out @@ -0,0 +1,90 @@ +Start LSRKStep StageInfo test + t y y err +--------------------------------------------------------------------- + 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 + [Pre-RHS processing (stage 0 of 10) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] + [Pre-RHS processing (stage 0 of 10) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] + [Pre-RHS processing (stage 0 of 10) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] + [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 0.0000000000e+00] + [Post-stage processing (stage 0 of 10) at t = 1.02e-12 (tn = 0.00e+00 , tcur = 1.02e-12), ||y||_2 = 1.0172526042e-12] + [Pre-RHS processing (stage 1 of 10) at t = 1.02e-12 (tn = 0.00e+00 , tcur = 1.02e-12), ||y||_2 = 1.0172526042e-12] + [Post-stage processing (stage 1 of 10) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] + [Pre-RHS processing (stage 2 of 10) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] + [Post-stage processing (stage 2 of 10) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Pre-RHS processing (stage 3 of 10) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Post-stage processing (stage 3 of 10) at t = 4.07e-12 (tn = 0.00e+00 , tcur = 4.07e-12), ||y||_2 = 4.0690104167e-12] + [Pre-RHS processing (stage 4 of 10) at t = 4.07e-12 (tn = 0.00e+00 , tcur = 4.07e-12), ||y||_2 = 4.0690104167e-12] + [Post-stage processing (stage 4 of 10) at t = 5.09e-12 (tn = 0.00e+00 , tcur = 5.09e-12), ||y||_2 = 5.0862630208e-12] + [Post-stage processing (stage 4 of 10) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] + [Pre-RHS processing (stage 5 of 10) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] + [Post-stage processing (stage 5 of 10) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Pre-RHS processing (stage 6 of 10) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Post-stage processing (stage 6 of 10) at t = 4.07e-12 (tn = 0.00e+00 , tcur = 4.07e-12), ||y||_2 = 4.0690104167e-12] + [Pre-RHS processing (stage 7 of 10) at t = 4.07e-12 (tn = 0.00e+00 , tcur = 4.07e-12), ||y||_2 = 4.0690104167e-12] + [Post-stage processing (stage 7 of 10) at t = 5.09e-12 (tn = 0.00e+00 , tcur = 5.09e-12), ||y||_2 = 5.0862630208e-12] + [Pre-RHS processing (stage 8 of 10) at t = 5.09e-12 (tn = 0.00e+00 , tcur = 5.09e-12), ||y||_2 = 5.0862630208e-12] + [Post-stage processing (stage 8 of 10) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Pre-RHS processing (stage 9 of 10) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Post-step processing at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] + 6.1035156250e-12 6.1035156250e-12 2.4233807008e-27 + [Pre-step processing at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] + [Pre-RHS processing (stage 0 of 10) at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Post-stage processing (stage 0 of 10) at t = 1.02e-08 (tn = 6.10e-12 , tcur = 1.02e-08), ||y||_2 = 1.0178629557e-08] + [Pre-RHS processing (stage 1 of 10) at t = 1.02e-08 (tn = 6.10e-12 , tcur = 1.02e-08), ||y||_2 = 1.0178629557e-08] + [Post-stage processing (stage 1 of 10) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] + [Pre-RHS processing (stage 2 of 10) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] + [Post-stage processing (stage 2 of 10) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Pre-RHS processing (stage 3 of 10) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Post-stage processing (stage 3 of 10) at t = 4.07e-08 (tn = 6.10e-12 , tcur = 4.07e-08), ||y||_2 = 4.0696207682e-08] + [Pre-RHS processing (stage 4 of 10) at t = 4.07e-08 (tn = 6.10e-12 , tcur = 4.07e-08), ||y||_2 = 4.0696207682e-08] + [Post-stage processing (stage 4 of 10) at t = 5.09e-08 (tn = 6.10e-12 , tcur = 5.09e-08), ||y||_2 = 5.0868733724e-08] + [Post-stage processing (stage 4 of 10) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] + [Pre-RHS processing (stage 5 of 10) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] + [Post-stage processing (stage 5 of 10) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Pre-RHS processing (stage 6 of 10) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Post-stage processing (stage 6 of 10) at t = 4.07e-08 (tn = 6.10e-12 , tcur = 4.07e-08), ||y||_2 = 4.0696207682e-08] + [Pre-RHS processing (stage 7 of 10) at t = 4.07e-08 (tn = 6.10e-12 , tcur = 4.07e-08), ||y||_2 = 4.0696207682e-08] + [Post-stage processing (stage 7 of 10) at t = 5.09e-08 (tn = 6.10e-12 , tcur = 5.09e-08), ||y||_2 = 5.0868733724e-08] + [Pre-RHS processing (stage 8 of 10) at t = 5.09e-08 (tn = 6.10e-12 , tcur = 5.09e-08), ||y||_2 = 5.0868733724e-08] + [Post-stage processing (stage 8 of 10) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Pre-RHS processing (stage 9 of 10) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Post-step processing at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] + 6.1041259766e-08 6.1041259766e-08 0.0000000000e+00 + [Pre-step processing at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] + [Pre-RHS processing (stage 0 of 10) at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Post-stage processing (stage 0 of 10) at t = 2.64e-07 (tn = 6.10e-08 , tcur = 2.64e-07), ||y||_2 = 2.6449178060e-07] + [Pre-RHS processing (stage 1 of 10) at t = 2.64e-07 (tn = 6.10e-08 , tcur = 2.64e-07), ||y||_2 = 2.6449178060e-07] + [Post-stage processing (stage 1 of 10) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] + [Pre-RHS processing (stage 2 of 10) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] + [Post-stage processing (stage 2 of 10) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Pre-RHS processing (stage 3 of 10) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Post-stage processing (stage 3 of 10) at t = 8.75e-07 (tn = 6.10e-08 , tcur = 8.75e-07), ||y||_2 = 8.7484334310e-07] + [Pre-RHS processing (stage 4 of 10) at t = 8.75e-07 (tn = 6.10e-08 , tcur = 8.75e-07), ||y||_2 = 8.7484334310e-07] + [Post-stage processing (stage 4 of 10) at t = 1.08e-06 (tn = 6.10e-08 , tcur = 1.08e-06), ||y||_2 = 1.0782938639e-06] + [Post-stage processing (stage 4 of 10) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] + [Pre-RHS processing (stage 5 of 10) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] + [Post-stage processing (stage 5 of 10) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Pre-RHS processing (stage 6 of 10) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Post-stage processing (stage 6 of 10) at t = 8.75e-07 (tn = 6.10e-08 , tcur = 8.75e-07), ||y||_2 = 8.7484334310e-07] + [Pre-RHS processing (stage 7 of 10) at t = 8.75e-07 (tn = 6.10e-08 , tcur = 8.75e-07), ||y||_2 = 8.7484334310e-07] + [Post-stage processing (stage 7 of 10) at t = 1.08e-06 (tn = 6.10e-08 , tcur = 1.08e-06), ||y||_2 = 1.0782938639e-06] + [Pre-RHS processing (stage 8 of 10) at t = 1.08e-06 (tn = 6.10e-08 , tcur = 1.08e-06), ||y||_2 = 1.0782938639e-06] + [Post-stage processing (stage 8 of 10) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Pre-RHS processing (stage 9 of 10) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Post-step processing at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06),||y||_2 = 1.2817443848e-06] + 1.2817443848e-06 1.2817443848e-06 6.3527471044e-22 +--------------------------------------------------------------------- +Current time = 1.28174438476563e-06 +Steps = 3 +Step attempts = 3 +Stability limited steps = 0 +Accuracy limited steps = 3 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 6.103515625e-12 +Last step size = 1.220703125e-06 +Current step size = 2.44140625e-05 +RHS fn evals = 32 +Number of stages used = 10 +End LSRKStep StageInfo test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_0.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_0.out new file mode 100644 index 0000000000..f6b394a890 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_0.out @@ -0,0 +1,60 @@ +Start MRIStep StageInfo test +Using Ex-MRI-GARK method + t u v u err v err +------------------------------------------------------------------------------------------------------------------------------ + 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 + [Pre-RHS processing (stage 0 of 4) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 0 of 4) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Post-stage processing (stage 1 of 4) at t = 3.33e-02 (tn = 0.00e+00 , tcur = 3.33e-02), ||y||_2 = 2.0702389129e+00] + [Pre-RHS processing (stage 1 of 4) at t = 3.33e-02 (tn = 0.00e+00 , tcur = 3.33e-02), ||y||_2 = 2.0702389129e+00] + [Post-stage processing (stage 2 of 4) at t = 6.67e-02 (tn = 0.00e+00 , tcur = 6.67e-02), ||y||_2 = 1.9323793744e+00] + [Pre-RHS processing (stage 2 of 4) at t = 6.67e-02 (tn = 0.00e+00 , tcur = 6.67e-02), ||y||_2 = 1.9323793744e+00] + [Post-stage processing (stage 3 of 4) at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01), ||y||_2 = 1.7553792942e+00] + [Post-step failure processing at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01),||y||_2 = 1.7553792942e+00] + [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] + [Post-stage processing (stage 1 of 4) at t = 1.79e-02 (tn = 0.00e+00 , tcur = 1.79e-02), ||y||_2 = 2.1062747196e+00] + [Pre-RHS processing (stage 1 of 4) at t = 1.79e-02 (tn = 0.00e+00 , tcur = 1.79e-02), ||y||_2 = 2.1062747196e+00] + [Post-stage processing (stage 2 of 4) at t = 3.59e-02 (tn = 0.00e+00 , tcur = 3.59e-02), ||y||_2 = 2.0623617667e+00] + [Pre-RHS processing (stage 2 of 4) at t = 3.59e-02 (tn = 0.00e+00 , tcur = 3.59e-02), ||y||_2 = 2.0623617667e+00] + [Post-stage processing (stage 3 of 4) at t = 5.38e-02 (tn = 0.00e+00 , tcur = 5.38e-02), ||y||_2 = 1.9935724472e+00] + [Post-step processing at t = 5.38e-02 (tn = 0.00e+00 , tcur = 5.38e-02),||y||_2 = 1.9935724472e+00] + 5.3788411835e-02 1.2244498085e+00 1.5732303610e+00 1.8680695546e-07 8.2659525269e-07 + [Pre-step processing at t = 5.38e-02 (tn = 5.38e-02 , tcur = 5.38e-02),||y||_2 = 1.9935724472e+00] + [Pre-RHS processing (stage 0 of 4) at t = 5.38e-02 (tn = 5.38e-02 , tcur = 5.38e-02), ||y||_2 = 1.9935724472e+00] + [Post-stage processing (stage 1 of 4) at t = 7.17e-02 (tn = 5.38e-02 , tcur = 7.17e-02), ||y||_2 = 1.9065588348e+00] + [Pre-RHS processing (stage 1 of 4) at t = 7.17e-02 (tn = 5.38e-02 , tcur = 7.17e-02), ||y||_2 = 1.9065588348e+00] + [Post-stage processing (stage 2 of 4) at t = 8.96e-02 (tn = 5.38e-02 , tcur = 8.96e-02), ||y||_2 = 1.8105164121e+00] + [Pre-RHS processing (stage 2 of 4) at t = 8.96e-02 (tn = 5.38e-02 , tcur = 8.96e-02), ||y||_2 = 1.8105164121e+00] + [Post-stage processing (stage 3 of 4) at t = 1.08e-01 (tn = 5.38e-02 , tcur = 1.08e-01), ||y||_2 = 1.7172269130e+00] + [Post-step processing at t = 1.08e-01 (tn = 5.38e-02 , tcur = 1.08e-01),||y||_2 = 1.7172269130e+00] + 1.0755261194e-01 1.2235651438e+00 1.2048886296e+00 3.1283219726e-07 2.2452351258e-06 + [Pre-step processing at t = 1.08e-01 (tn = 1.08e-01 , tcur = 1.08e-01),||y||_2 = 1.7172269130e+00] + [Pre-RHS processing (stage 0 of 4) at t = 1.08e-01 (tn = 1.08e-01 , tcur = 1.08e-01), ||y||_2 = 1.7172269130e+00] + [Post-stage processing (stage 1 of 4) at t = 1.26e-01 (tn = 1.08e-01 , tcur = 1.26e-01), ||y||_2 = 1.6395059572e+00] + [Pre-RHS processing (stage 1 of 4) at t = 1.26e-01 (tn = 1.08e-01 , tcur = 1.26e-01), ||y||_2 = 1.6395059572e+00] + [Post-stage processing (stage 2 of 4) at t = 1.44e-01 (tn = 1.08e-01 , tcur = 1.44e-01), ||y||_2 = 1.5908512726e+00] + [Pre-RHS processing (stage 2 of 4) at t = 1.44e-01 (tn = 1.08e-01 , tcur = 1.44e-01), ||y||_2 = 1.5908512726e+00] + [Post-stage processing (stage 3 of 4) at t = 1.62e-01 (tn = 1.08e-01 , tcur = 1.62e-01), ||y||_2 = 1.5804053561e+00] + [Post-step processing at t = 1.62e-01 (tn = 1.08e-01 , tcur = 1.62e-01),||y||_2 = 1.5804053561e+00] + 1.6166698095e-01 1.2220806635e+00 1.0020977704e+00 4.0194574003e-07 2.9238596286e-06 +------------------------------------------------------------------------------------------------------------------------------ +Current time = 0.161666980946477 +Steps = 3 +Step attempts = 4 +Stability limited steps = 0 +Accuracy limited steps = 4 +Error test fails = 1 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.1 +Last step size = 0.0541143690074931 +Current step size = 0.0540029786725355 +Explicit slow RHS fn evals = 12 +Implicit slow RHS fn evals = 0 +Inner stepper failures = 0 +NLS iters = 0 +NLS fails = 0 +NLS iters per step = 0 +LS setups = 0 +End MRIStep StageInfo test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_1.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_1.out new file mode 100644 index 0000000000..f356c64451 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_1.out @@ -0,0 +1,89 @@ +Start MRIStep StageInfo test +Using Im-MRI-GARK method +Using Newton nonlinear solver +Using GMRES iterative linear solver + t u v u err v err +------------------------------------------------------------------------------------------------------------------------------ + 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 + [Pre-RHS processing (stage 0 of 8) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 0 of 8) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Post-stage processing (stage 1 of 8) at t = 3.33e-02 (tn = 0.00e+00 , tcur = 3.33e-02), ||y||_2 = 2.0702389129e+00] + [Post-stage processing (stage 2 of 8) at t = 3.33e-02 (tn = 0.00e+00 , tcur = 3.33e-02), ||y||_2 = 2.0700721651e+00] + [Pre-RHS processing (stage 2 of 8) at t = 3.33e-02 (tn = 0.00e+00 , tcur = 3.33e-02), ||y||_2 = 2.0700721651e+00] + [Post-stage processing (stage 3 of 8) at t = 6.67e-02 (tn = 0.00e+00 , tcur = 6.67e-02), ||y||_2 = 1.9322328933e+00] + [Post-stage processing (stage 4 of 8) at t = 6.67e-02 (tn = 0.00e+00 , tcur = 6.67e-02), ||y||_2 = 1.9321435064e+00] + [Pre-RHS processing (stage 4 of 8) at t = 6.67e-02 (tn = 0.00e+00 , tcur = 6.67e-02), ||y||_2 = 1.9321435064e+00] + [Post-stage processing (stage 5 of 8) at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01), ||y||_2 = 1.7559990525e+00] + [Post-stage processing (stage 6 of 8) at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01), ||y||_2 = 1.7553790892e+00] + [Pre-RHS processing (stage 6 of 8) at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01), ||y||_2 = 1.7553790892e+00] + [Post-step failure processing at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01),||y||_2 = 1.7553790892e+00] + [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] + [Post-stage processing (stage 1 of 8) at t = 7.64e-03 (tn = 0.00e+00 , tcur = 7.64e-03), ||y||_2 = 2.1185733610e+00] + [Post-stage processing (stage 2 of 8) at t = 7.64e-03 (tn = 0.00e+00 , tcur = 7.64e-03), ||y||_2 = 2.1185644667e+00] + [Pre-RHS processing (stage 2 of 8) at t = 7.64e-03 (tn = 0.00e+00 , tcur = 7.64e-03), ||y||_2 = 2.1185644667e+00] + [Post-stage processing (stage 3 of 8) at t = 1.53e-02 (tn = 0.00e+00 , tcur = 1.53e-02), ||y||_2 = 2.1103531773e+00] + [Post-stage processing (stage 4 of 8) at t = 1.53e-02 (tn = 0.00e+00 , tcur = 1.53e-02), ||y||_2 = 2.1103486206e+00] + [Pre-RHS processing (stage 4 of 8) at t = 1.53e-02 (tn = 0.00e+00 , tcur = 1.53e-02), ||y||_2 = 2.1103486206e+00] + [Post-stage processing (stage 5 of 8) at t = 2.29e-02 (tn = 0.00e+00 , tcur = 2.29e-02), ||y||_2 = 2.0968505281e+00] + [Post-stage processing (stage 6 of 8) at t = 2.29e-02 (tn = 0.00e+00 , tcur = 2.29e-02), ||y||_2 = 2.0968232402e+00] + [Pre-RHS processing (stage 6 of 8) at t = 2.29e-02 (tn = 0.00e+00 , tcur = 2.29e-02), ||y||_2 = 2.0968232402e+00] + [Post-step processing at t = 2.29e-02 (tn = 0.00e+00 , tcur = 2.29e-02),||y||_2 = 2.0968232402e+00] + 2.2915786214e-02 1.2246912820e+00 1.7019985207e+00 5.5793780707e-09 2.1530106586e-09 + [Pre-step processing at t = 2.29e-02 (tn = 2.29e-02 , tcur = 2.29e-02),||y||_2 = 2.0968232402e+00] + [Pre-RHS processing (stage 0 of 8) at t = 2.29e-02 (tn = 2.29e-02 , tcur = 2.29e-02), ||y||_2 = 2.0968232402e+00] + [Post-stage processing (stage 1 of 8) at t = 3.03e-02 (tn = 2.29e-02 , tcur = 3.03e-02), ||y||_2 = 2.0788798708e+00] + [Post-stage processing (stage 2 of 8) at t = 3.03e-02 (tn = 2.29e-02 , tcur = 3.03e-02), ||y||_2 = 2.0788714037e+00] + [Pre-RHS processing (stage 2 of 8) at t = 3.03e-02 (tn = 2.29e-02 , tcur = 3.03e-02), ||y||_2 = 2.0788714037e+00] + [Post-stage processing (stage 3 of 8) at t = 3.77e-02 (tn = 2.29e-02 , tcur = 3.77e-02), ||y||_2 = 2.0564153145e+00] + [Post-stage processing (stage 4 of 8) at t = 3.77e-02 (tn = 2.29e-02 , tcur = 3.77e-02), ||y||_2 = 2.0564109461e+00] + [Pre-RHS processing (stage 4 of 8) at t = 3.77e-02 (tn = 2.29e-02 , tcur = 3.77e-02), ||y||_2 = 2.0564109461e+00] + [Post-stage processing (stage 5 of 8) at t = 4.51e-02 (tn = 2.29e-02 , tcur = 4.51e-02), ||y||_2 = 2.0298368062e+00] + [Post-stage processing (stage 6 of 8) at t = 4.51e-02 (tn = 2.29e-02 , tcur = 4.51e-02), ||y||_2 = 2.0298104890e+00] + [Pre-RHS processing (stage 6 of 8) at t = 4.51e-02 (tn = 2.29e-02 , tcur = 4.51e-02), ||y||_2 = 2.0298104890e+00] + [Post-step processing at t = 4.51e-02 (tn = 2.29e-02 , tcur = 4.51e-02),||y||_2 = 2.0298104890e+00] + 4.5061997773e-02 1.2245376535e+00 1.6188385208e+00 1.0139641349e-08 1.3537759358e-08 + [Pre-step processing at t = 4.51e-02 (tn = 4.51e-02 , tcur = 4.51e-02),||y||_2 = 2.0298104890e+00] + [Pre-RHS processing (stage 0 of 8) at t = 4.51e-02 (tn = 4.51e-02 , tcur = 4.51e-02), ||y||_2 = 2.0298104890e+00] + [Post-stage processing (stage 1 of 8) at t = 5.25e-02 (tn = 4.51e-02 , tcur = 5.25e-02), ||y||_2 = 1.9994285829e+00] + [Post-stage processing (stage 2 of 8) at t = 5.25e-02 (tn = 4.51e-02 , tcur = 5.25e-02), ||y||_2 = 1.9994197633e+00] + [Pre-RHS processing (stage 2 of 8) at t = 5.25e-02 (tn = 4.51e-02 , tcur = 5.25e-02), ||y||_2 = 1.9994197633e+00] + [Post-stage processing (stage 3 of 8) at t = 5.98e-02 (tn = 4.51e-02 , tcur = 5.98e-02), ||y||_2 = 1.9657929007e+00] + [Post-stage processing (stage 4 of 8) at t = 5.98e-02 (tn = 4.51e-02 , tcur = 5.98e-02), ||y||_2 = 1.9657883234e+00] + [Pre-RHS processing (stage 4 of 8) at t = 5.98e-02 (tn = 4.51e-02 , tcur = 5.98e-02), ||y||_2 = 1.9657883234e+00] + [Post-stage processing (stage 5 of 8) at t = 6.72e-02 (tn = 4.51e-02 , tcur = 6.72e-02), ||y||_2 = 1.9295492984e+00] + [Post-stage processing (stage 6 of 8) at t = 6.72e-02 (tn = 4.51e-02 , tcur = 6.72e-02), ||y||_2 = 1.9295215670e+00] + [Pre-RHS processing (stage 6 of 8) at t = 6.72e-02 (tn = 4.51e-02 , tcur = 6.72e-02), ||y||_2 = 1.9295215670e+00] + [Post-step processing at t = 6.72e-02 (tn = 4.51e-02 , tcur = 6.72e-02),||y||_2 = 1.9295215670e+00] + 6.7234572226e-02 1.2242836022e+00 1.4913695514e+00 1.4287638628e-08 4.0154499503e-08 +------------------------------------------------------------------------------------------------------------------------------ +Current time = 0.0672345722257155 +Steps = 3 +Step attempts = 4 +Stability limited steps = 0 +Accuracy limited steps = 4 +Error test fails = 1 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.1 +Last step size = 0.022172574452528 +Current step size = 0.0222074352130945 +Explicit slow RHS fn evals = 0 +Implicit slow RHS fn evals = 50 +Inner stepper failures = 0 +NLS iters = 34 +NLS fails = 0 +NLS iters per step = 11.3333333333333 +LS setups = 0 +Jac fn evals = 0 +LS RHS fn evals = 38 +Prec setup evals = 0 +Prec solves = 0 +LS iters = 38 +LS fails = 0 +Jac-times setups = 0 +Jac-times evals = 38 +LS iters per NLS iter = 1.11764705882353 +Jac evals per NLS iter = 0 +Prec evals per NLS iter = 0 +End MRIStep StageInfo test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_2.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_2.out new file mode 100644 index 0000000000..a997566f4d --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_2.out @@ -0,0 +1,85 @@ +Start MRIStep StageInfo test +Using ImEx-MRI-GARK method +Using Newton nonlinear solver +Using GMRES iterative linear solver + t u v u err v err +------------------------------------------------------------------------------------------------------------------------------ + 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 + [Pre-RHS processing (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Post-stage processing (stage 1 of 5) at t = 6.76e-02 (tn = 0.00e+00 , tcur = 6.76e-02), ||y||_2 = 1.9277014052e+00] + [Pre-RHS processing (stage 1 of 5) at t = 6.76e-02 (tn = 0.00e+00 , tcur = 6.76e-02), ||y||_2 = 1.9277014052e+00] + [Post-stage processing (stage 2 of 5) at t = 8.00e-02 (tn = 0.00e+00 , tcur = 8.00e-02), ||y||_2 = 1.8630468331e+00] + [Pre-RHS processing (stage 2 of 5) at t = 8.00e-02 (tn = 0.00e+00 , tcur = 8.00e-02), ||y||_2 = 1.8630468331e+00] + [Post-stage processing (stage 3 of 5) at t = 1.13e-01 (tn = 0.00e+00 , tcur = 1.13e-01), ||y||_2 = 1.6895511338e+00] + [Pre-RHS processing (stage 3 of 5) at t = 1.13e-01 (tn = 0.00e+00 , tcur = 1.13e-01), ||y||_2 = 1.6895511338e+00] + [Post-stage processing (stage 4 of 5) at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01), ||y||_2 = 1.7553780461e+00] + [Post-stage processing (stage 5 of 5) at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01), ||y||_2 = 1.7553690226e+00] + [Post-step failure processing at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01),||y||_2 = 1.7553780461e+00] + [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] + [Post-stage processing (stage 1 of 5) at t = 3.18e-02 (tn = 0.00e+00 , tcur = 3.18e-02), ||y||_2 = 2.0746627548e+00] + [Pre-RHS processing (stage 1 of 5) at t = 3.18e-02 (tn = 0.00e+00 , tcur = 3.18e-02), ||y||_2 = 2.0746627548e+00] + [Post-stage processing (stage 2 of 5) at t = 3.76e-02 (tn = 0.00e+00 , tcur = 3.76e-02), ||y||_2 = 2.0566853389e+00] + [Pre-RHS processing (stage 2 of 5) at t = 3.76e-02 (tn = 0.00e+00 , tcur = 3.76e-02), ||y||_2 = 2.0566853389e+00] + [Post-stage processing (stage 3 of 5) at t = 5.33e-02 (tn = 0.00e+00 , tcur = 5.33e-02), ||y||_2 = 1.9956059674e+00] + [Pre-RHS processing (stage 3 of 5) at t = 5.33e-02 (tn = 0.00e+00 , tcur = 5.33e-02), ||y||_2 = 1.9956059674e+00] + [Post-stage processing (stage 4 of 5) at t = 4.70e-02 (tn = 0.00e+00 , tcur = 4.70e-02), ||y||_2 = 2.0220308045e+00] + [Post-stage processing (stage 5 of 5) at t = 4.70e-02 (tn = 0.00e+00 , tcur = 4.70e-02), ||y||_2 = 2.0220301555e+00] + [Post-step processing at t = 4.70e-02 (tn = 0.00e+00 , tcur = 4.70e-02),||y||_2 = 2.0220308045e+00] + 4.7038717251e-02 1.2245191379e+00 1.6090871497e+00 7.2407223550e-08 3.3077079586e-07 + [Pre-step processing at t = 4.70e-02 (tn = 4.70e-02 , tcur = 4.70e-02),||y||_2 = 2.0220308045e+00] + [Pre-RHS processing (stage 0 of 5) at t = 4.70e-02 (tn = 4.70e-02 , tcur = 4.70e-02), ||y||_2 = 2.0220308045e+00] + [Post-stage processing (stage 1 of 5) at t = 7.89e-02 (tn = 4.70e-02 , tcur = 7.89e-02), ||y||_2 = 1.8687693366e+00] + [Pre-RHS processing (stage 1 of 5) at t = 7.89e-02 (tn = 4.70e-02 , tcur = 7.89e-02), ||y||_2 = 1.8687693366e+00] + [Post-stage processing (stage 2 of 5) at t = 8.47e-02 (tn = 4.70e-02 , tcur = 8.47e-02), ||y||_2 = 1.8374772654e+00] + [Pre-RHS processing (stage 2 of 5) at t = 8.47e-02 (tn = 4.70e-02 , tcur = 8.47e-02), ||y||_2 = 1.8374772654e+00] + [Post-stage processing (stage 3 of 5) at t = 1.00e-01 (tn = 4.70e-02 , tcur = 1.00e-01), ||y||_2 = 1.7534837182e+00] + [Pre-RHS processing (stage 3 of 5) at t = 1.00e-01 (tn = 4.70e-02 , tcur = 1.00e-01), ||y||_2 = 1.7534837182e+00] + [Post-stage processing (stage 4 of 5) at t = 9.41e-02 (tn = 4.70e-02 , tcur = 9.41e-02), ||y||_2 = 1.7866195702e+00] + [Post-stage processing (stage 5 of 5) at t = 9.41e-02 (tn = 4.70e-02 , tcur = 9.41e-02), ||y||_2 = 1.7866191431e+00] + [Post-step processing at t = 9.41e-02 (tn = 4.70e-02 , tcur = 9.41e-02),||y||_2 = 1.7866195702e+00] + 9.4077434503e-02 1.2238419876e+00 1.3016221719e+00 8.9882908894e-08 1.7942663662e-06 + [Pre-step processing at t = 9.41e-02 (tn = 9.41e-02 , tcur = 9.41e-02),||y||_2 = 1.7866195702e+00] + [Pre-RHS processing (stage 0 of 5) at t = 9.41e-02 (tn = 9.41e-02 , tcur = 9.41e-02), ||y||_2 = 1.7866195702e+00] + [Post-stage processing (stage 1 of 5) at t = 1.28e-01 (tn = 9.41e-02 , tcur = 1.28e-01), ||y||_2 = 1.6322862176e+00] + [Pre-RHS processing (stage 1 of 5) at t = 1.28e-01 (tn = 9.41e-02 , tcur = 1.28e-01), ||y||_2 = 1.6322862176e+00] + [Post-stage processing (stage 2 of 5) at t = 1.34e-01 (tn = 9.41e-02 , tcur = 1.34e-01), ||y||_2 = 1.6132224524e+00] + [Pre-RHS processing (stage 2 of 5) at t = 1.34e-01 (tn = 9.41e-02 , tcur = 1.34e-01), ||y||_2 = 1.6132224524e+00] + [Post-stage processing (stage 3 of 5) at t = 1.50e-01 (tn = 9.41e-02 , tcur = 1.50e-01), ||y||_2 = 1.5821211389e+00] + [Pre-RHS processing (stage 3 of 5) at t = 1.50e-01 (tn = 9.41e-02 , tcur = 1.50e-01), ||y||_2 = 1.5821211389e+00] + [Post-stage processing (stage 4 of 5) at t = 1.44e-01 (tn = 9.41e-02 , tcur = 1.44e-01), ||y||_2 = 1.5906968039e+00] + [Post-stage processing (stage 5 of 5) at t = 1.44e-01 (tn = 9.41e-02 , tcur = 1.44e-01), ||y||_2 = 1.5906958150e+00] + [Post-step processing at t = 1.44e-01 (tn = 9.41e-02 , tcur = 1.44e-01),||y||_2 = 1.5906968039e+00] + 1.4372138650e-01 1.2226386256e+00 1.0175810107e+00 1.1664470589e-07 2.7813679992e-06 +------------------------------------------------------------------------------------------------------------------------------ +Current time = 0.143721386500587 +Steps = 3 +Step attempts = 4 +Stability limited steps = 0 +Accuracy limited steps = 4 +Error test fails = 1 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.1 +Last step size = 0.0496439519979517 +Current step size = 0.0499492708252477 +Explicit slow RHS fn evals = 16 +Implicit slow RHS fn evals = 64 +Inner stepper failures = 0 +NLS iters = 48 +NLS fails = 0 +NLS iters per step = 16 +LS setups = 0 +Jac fn evals = 0 +LS RHS fn evals = 58 +Prec setup evals = 0 +Prec solves = 0 +LS iters = 58 +LS fails = 0 +Jac-times setups = 0 +Jac-times evals = 58 +LS iters per NLS iter = 1.20833333333333 +Jac evals per NLS iter = 0 +Prec evals per NLS iter = 0 +End MRIStep StageInfo test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_3.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_3.out new file mode 100644 index 0000000000..f8cb9d6025 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_3.out @@ -0,0 +1,72 @@ +Start MRIStep StageInfo test +Using Ex-MRI-SR method + t u v u err v err +------------------------------------------------------------------------------------------------------------------------------ + 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 + [Pre-RHS processing (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Post-stage processing (stage 1 of 5) at t = 6.76e-02 (tn = 0.00e+00 , tcur = 6.76e-02), ||y||_2 = 1.9277317531e+00] + [Pre-RHS processing (stage 1 of 5) at t = 6.76e-02 (tn = 0.00e+00 , tcur = 6.76e-02), ||y||_2 = 1.9277317531e+00] + [Post-stage processing (stage 2 of 5) at t = 8.00e-02 (tn = 0.00e+00 , tcur = 8.00e-02), ||y||_2 = 1.8631157730e+00] + [Pre-RHS processing (stage 2 of 5) at t = 8.00e-02 (tn = 0.00e+00 , tcur = 8.00e-02), ||y||_2 = 1.8631157730e+00] + [Post-stage processing (stage 3 of 5) at t = 1.13e-01 (tn = 0.00e+00 , tcur = 1.13e-01), ||y||_2 = 1.6894354844e+00] + [Pre-RHS processing (stage 3 of 5) at t = 1.13e-01 (tn = 0.00e+00 , tcur = 1.13e-01), ||y||_2 = 1.6894354844e+00] + [Post-stage processing (stage 4 of 5) at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01), ||y||_2 = 1.7553776312e+00] + [Post-stage processing (stage 5 of 5) at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01), ||y||_2 = 1.7553905174e+00] + [Post-step failure processing at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01),||y||_2 = 1.7553776312e+00] + [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] + [Post-stage processing (stage 1 of 5) at t = 2.72e-02 (tn = 0.00e+00 , tcur = 2.72e-02), ||y||_2 = 2.0871216421e+00] + [Pre-RHS processing (stage 1 of 5) at t = 2.72e-02 (tn = 0.00e+00 , tcur = 2.72e-02), ||y||_2 = 2.0871216421e+00] + [Post-stage processing (stage 2 of 5) at t = 3.21e-02 (tn = 0.00e+00 , tcur = 3.21e-02), ||y||_2 = 2.0738241098e+00] + [Pre-RHS processing (stage 2 of 5) at t = 3.21e-02 (tn = 0.00e+00 , tcur = 3.21e-02), ||y||_2 = 2.0738241098e+00] + [Post-stage processing (stage 3 of 5) at t = 4.55e-02 (tn = 0.00e+00 , tcur = 4.55e-02), ||y||_2 = 2.0280485196e+00] + [Pre-RHS processing (stage 3 of 5) at t = 4.55e-02 (tn = 0.00e+00 , tcur = 4.55e-02), ||y||_2 = 2.0280485196e+00] + [Post-stage processing (stage 4 of 5) at t = 4.01e-02 (tn = 0.00e+00 , tcur = 4.01e-02), ||y||_2 = 2.0479718989e+00] + [Post-stage processing (stage 5 of 5) at t = 4.01e-02 (tn = 0.00e+00 , tcur = 4.01e-02), ||y||_2 = 2.0479726350e+00] + [Post-step processing at t = 4.01e-02 (tn = 0.00e+00 , tcur = 4.01e-02),||y||_2 = 2.0479718989e+00] + 4.0147173279e-02 1.2245803971e+00 1.6415211694e+00 1.7833581722e-08 1.3150238765e-07 + [Pre-step processing at t = 4.01e-02 (tn = 4.01e-02 , tcur = 4.01e-02),||y||_2 = 2.0479718989e+00] + [Pre-RHS processing (stage 0 of 5) at t = 4.01e-02 (tn = 4.01e-02 , tcur = 4.01e-02), ||y||_2 = 2.0479718989e+00] + [Post-stage processing (stage 1 of 5) at t = 6.73e-02 (tn = 4.01e-02 , tcur = 6.73e-02), ||y||_2 = 1.9292098715e+00] + [Pre-RHS processing (stage 1 of 5) at t = 6.73e-02 (tn = 4.01e-02 , tcur = 6.73e-02), ||y||_2 = 1.9292098715e+00] + [Post-stage processing (stage 2 of 5) at t = 7.23e-02 (tn = 4.01e-02 , tcur = 7.23e-02), ||y||_2 = 1.9037272078e+00] + [Pre-RHS processing (stage 2 of 5) at t = 7.23e-02 (tn = 4.01e-02 , tcur = 7.23e-02), ||y||_2 = 1.9037272078e+00] + [Post-stage processing (stage 3 of 5) at t = 8.56e-02 (tn = 4.01e-02 , tcur = 8.56e-02), ||y||_2 = 1.8320067913e+00] + [Pre-RHS processing (stage 3 of 5) at t = 8.56e-02 (tn = 4.01e-02 , tcur = 8.56e-02), ||y||_2 = 1.8320067913e+00] + [Post-stage processing (stage 4 of 5) at t = 8.03e-02 (tn = 4.01e-02 , tcur = 8.03e-02), ||y||_2 = 1.8609952333e+00] + [Post-stage processing (stage 5 of 5) at t = 8.03e-02 (tn = 4.01e-02 , tcur = 8.03e-02), ||y||_2 = 1.8609960500e+00] + [Post-step processing at t = 8.03e-02 (tn = 4.01e-02 , tcur = 8.03e-02),||y||_2 = 1.8609952333e+00] + 8.0294346558e-02 1.2240870650e+00 1.4017539426e+00 2.9546360247e-08 8.8498109596e-07 + [Pre-step processing at t = 8.03e-02 (tn = 8.03e-02 , tcur = 8.03e-02),||y||_2 = 1.8609952333e+00] + [Pre-RHS processing (stage 0 of 5) at t = 8.03e-02 (tn = 8.03e-02 , tcur = 8.03e-02), ||y||_2 = 1.8609952333e+00] + [Post-stage processing (stage 1 of 5) at t = 1.07e-01 (tn = 8.03e-02 , tcur = 1.07e-01), ||y||_2 = 1.7176026494e+00] + [Pre-RHS processing (stage 1 of 5) at t = 1.07e-01 (tn = 8.03e-02 , tcur = 1.07e-01), ||y||_2 = 1.7176026494e+00] + [Post-stage processing (stage 2 of 5) at t = 1.12e-01 (tn = 8.03e-02 , tcur = 1.12e-01), ||y||_2 = 1.6940253097e+00] + [Pre-RHS processing (stage 2 of 5) at t = 1.12e-01 (tn = 8.03e-02 , tcur = 1.12e-01), ||y||_2 = 1.6940253097e+00] + [Post-stage processing (stage 3 of 5) at t = 1.26e-01 (tn = 8.03e-02 , tcur = 1.26e-01), ||y||_2 = 1.6384682995e+00] + [Pre-RHS processing (stage 3 of 5) at t = 1.26e-01 (tn = 8.03e-02 , tcur = 1.26e-01), ||y||_2 = 1.6384682995e+00] + [Post-stage processing (stage 4 of 5) at t = 1.20e-01 (tn = 8.03e-02 , tcur = 1.20e-01), ||y||_2 = 1.6590260096e+00] + [Post-stage processing (stage 5 of 5) at t = 1.20e-01 (tn = 8.03e-02 , tcur = 1.20e-01), ||y||_2 = 1.6590269385e+00] + [Post-step processing at t = 1.20e-01 (tn = 8.03e-02 , tcur = 1.20e-01),||y||_2 = 1.6590260096e+00] + 1.2049198814e-01 1.2232640221e+00 1.1207106820e+00 2.3916633340e-08 1.4539153401e-06 +------------------------------------------------------------------------------------------------------------------------------ +Current time = 0.120491988140575 +Steps = 3 +Step attempts = 4 +Stability limited steps = 0 +Accuracy limited steps = 4 +Error test fails = 1 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.1 +Last step size = 0.0401976415827198 +Current step size = 0.0402774582255194 +Explicit slow RHS fn evals = 16 +Implicit slow RHS fn evals = 0 +Inner stepper failures = 0 +NLS iters = 0 +NLS fails = 0 +NLS iters per step = 0 +LS setups = 0 +End MRIStep StageInfo test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_4.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_4.out new file mode 100644 index 0000000000..f726d25a29 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_4.out @@ -0,0 +1,85 @@ +Start MRIStep StageInfo test +Using Im-MRI-SR method +Using Newton nonlinear solver +Using GMRES iterative linear solver + t u v u err v err +------------------------------------------------------------------------------------------------------------------------------ + 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 + [Pre-RHS processing (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Post-stage processing (stage 1 of 5) at t = 6.76e-02 (tn = 0.00e+00 , tcur = 6.76e-02), ||y||_2 = 1.9272516649e+00] + [Pre-RHS processing (stage 1 of 5) at t = 6.76e-02 (tn = 0.00e+00 , tcur = 6.76e-02), ||y||_2 = 1.9272516649e+00] + [Post-stage processing (stage 2 of 5) at t = 8.00e-02 (tn = 0.00e+00 , tcur = 8.00e-02), ||y||_2 = 1.8622728321e+00] + [Pre-RHS processing (stage 2 of 5) at t = 8.00e-02 (tn = 0.00e+00 , tcur = 8.00e-02), ||y||_2 = 1.8622728321e+00] + [Post-stage processing (stage 3 of 5) at t = 1.13e-01 (tn = 0.00e+00 , tcur = 1.13e-01), ||y||_2 = 1.6900892751e+00] + [Pre-RHS processing (stage 3 of 5) at t = 1.13e-01 (tn = 0.00e+00 , tcur = 1.13e-01), ||y||_2 = 1.6900892751e+00] + [Post-stage processing (stage 4 of 5) at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01), ||y||_2 = 1.7553777059e+00] + [Post-stage processing (stage 5 of 5) at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01), ||y||_2 = 1.7553835812e+00] + [Post-step failure processing at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01),||y||_2 = 1.7553777059e+00] + [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] + [Post-stage processing (stage 1 of 5) at t = 3.68e-02 (tn = 0.00e+00 , tcur = 3.68e-02), ||y||_2 = 2.0592361389e+00] + [Pre-RHS processing (stage 1 of 5) at t = 3.68e-02 (tn = 0.00e+00 , tcur = 3.68e-02), ||y||_2 = 2.0592361389e+00] + [Post-stage processing (stage 2 of 5) at t = 4.35e-02 (tn = 0.00e+00 , tcur = 4.35e-02), ||y||_2 = 2.0355544317e+00] + [Pre-RHS processing (stage 2 of 5) at t = 4.35e-02 (tn = 0.00e+00 , tcur = 4.35e-02), ||y||_2 = 2.0355544317e+00] + [Post-stage processing (stage 3 of 5) at t = 6.17e-02 (tn = 0.00e+00 , tcur = 6.17e-02), ||y||_2 = 1.9571096875e+00] + [Pre-RHS processing (stage 3 of 5) at t = 6.17e-02 (tn = 0.00e+00 , tcur = 6.17e-02), ||y||_2 = 1.9571096875e+00] + [Post-stage processing (stage 4 of 5) at t = 5.44e-02 (tn = 0.00e+00 , tcur = 5.44e-02), ||y||_2 = 1.9907845791e+00] + [Post-stage processing (stage 5 of 5) at t = 5.44e-02 (tn = 0.00e+00 , tcur = 5.44e-02), ||y||_2 = 1.9907852935e+00] + [Post-step processing at t = 5.44e-02 (tn = 0.00e+00 , tcur = 5.44e-02),||y||_2 = 1.9907845791e+00] + 5.4416549221e-02 1.2244425898e+00 1.5697017502e+00 9.6643187675e-08 2.9671727586e-07 + [Pre-step processing at t = 5.44e-02 (tn = 5.44e-02 , tcur = 5.44e-02),||y||_2 = 1.9907845791e+00] + [Pre-RHS processing (stage 0 of 5) at t = 5.44e-02 (tn = 5.44e-02 , tcur = 5.44e-02), ||y||_2 = 1.9907845791e+00] + [Post-stage processing (stage 1 of 5) at t = 9.12e-02 (tn = 5.44e-02 , tcur = 9.12e-02), ||y||_2 = 1.8018482507e+00] + [Pre-RHS processing (stage 1 of 5) at t = 9.12e-02 (tn = 5.44e-02 , tcur = 9.12e-02), ||y||_2 = 1.8018482507e+00] + [Post-stage processing (stage 2 of 5) at t = 9.79e-02 (tn = 5.44e-02 , tcur = 9.79e-02), ||y||_2 = 1.7659886342e+00] + [Pre-RHS processing (stage 2 of 5) at t = 9.79e-02 (tn = 5.44e-02 , tcur = 9.79e-02), ||y||_2 = 1.7659886342e+00] + [Post-stage processing (stage 3 of 5) at t = 1.16e-01 (tn = 5.44e-02 , tcur = 1.16e-01), ||y||_2 = 1.6776533917e+00] + [Pre-RHS processing (stage 3 of 5) at t = 1.16e-01 (tn = 5.44e-02 , tcur = 1.16e-01), ||y||_2 = 1.6776533917e+00] + [Post-stage processing (stage 4 of 5) at t = 1.09e-01 (tn = 5.44e-02 , tcur = 1.09e-01), ||y||_2 = 1.7110128262e+00] + [Post-stage processing (stage 5 of 5) at t = 1.09e-01 (tn = 5.44e-02 , tcur = 1.09e-01), ||y||_2 = 1.7110136723e+00] + [Post-step processing at t = 1.09e-01 (tn = 5.44e-02 , tcur = 1.09e-01),||y||_2 = 1.7110128262e+00] + 1.0883309844e-01 1.2235363746e+00 1.1960449956e+00 2.0469684348e-07 1.0505289330e-06 + [Pre-step processing at t = 1.09e-01 (tn = 1.09e-01 , tcur = 1.09e-01),||y||_2 = 1.7110128262e+00] + [Pre-RHS processing (stage 0 of 5) at t = 1.09e-01 (tn = 1.09e-01 , tcur = 1.09e-01), ||y||_2 = 1.7110128262e+00] + [Post-stage processing (stage 1 of 5) at t = 1.48e-01 (tn = 1.09e-01 , tcur = 1.48e-01), ||y||_2 = 1.5848610090e+00] + [Pre-RHS processing (stage 1 of 5) at t = 1.48e-01 (tn = 1.09e-01 , tcur = 1.48e-01), ||y||_2 = 1.5848610090e+00] + [Post-stage processing (stage 2 of 5) at t = 1.55e-01 (tn = 1.09e-01 , tcur = 1.55e-01), ||y||_2 = 1.5794413328e+00] + [Pre-RHS processing (stage 2 of 5) at t = 1.55e-01 (tn = 1.09e-01 , tcur = 1.55e-01), ||y||_2 = 1.5794413328e+00] + [Post-stage processing (stage 3 of 5) at t = 1.74e-01 (tn = 1.09e-01 , tcur = 1.74e-01), ||y||_2 = 1.5966533845e+00] + [Pre-RHS processing (stage 3 of 5) at t = 1.74e-01 (tn = 1.09e-01 , tcur = 1.74e-01), ||y||_2 = 1.5966533845e+00] + [Post-stage processing (stage 4 of 5) at t = 1.66e-01 (tn = 1.09e-01 , tcur = 1.66e-01), ||y||_2 = 1.5843328694e+00] + [Post-stage processing (stage 5 of 5) at t = 1.66e-01 (tn = 1.09e-01 , tcur = 1.66e-01), ||y||_2 = 1.5843338593e+00] + [Post-step processing at t = 1.66e-01 (tn = 1.09e-01 , tcur = 1.66e-01),||y||_2 = 1.5843328694e+00] + 1.6631602874e-01 1.2219246454e+00 1.0084695345e+00 3.4011255701e-07 1.4555240657e-06 +------------------------------------------------------------------------------------------------------------------------------ +Current time = 0.166316028736013 +Steps = 3 +Step attempts = 4 +Stability limited steps = 0 +Accuracy limited steps = 4 +Error test fails = 1 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.1 +Last step size = 0.0574829302949148 +Current step size = 0.0577668918865172 +Explicit slow RHS fn evals = 0 +Implicit slow RHS fn evals = 64 +Inner stepper failures = 0 +NLS iters = 48 +NLS fails = 0 +NLS iters per step = 16 +LS setups = 0 +Jac fn evals = 0 +LS RHS fn evals = 59 +Prec setup evals = 0 +Prec solves = 0 +LS iters = 59 +LS fails = 0 +Jac-times setups = 0 +Jac-times evals = 59 +LS iters per NLS iter = 1.22916666666667 +Jac evals per NLS iter = 0 +Prec evals per NLS iter = 0 +End MRIStep StageInfo test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_5.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_5.out new file mode 100644 index 0000000000..17f7ab21c4 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_5.out @@ -0,0 +1,85 @@ +Start MRIStep StageInfo test +Using ImEx-MRI-SR method +Using Newton nonlinear solver +Using GMRES iterative linear solver + t u v u err v err +------------------------------------------------------------------------------------------------------------------------------ + 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 + [Pre-RHS processing (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Post-stage processing (stage 1 of 5) at t = 6.76e-02 (tn = 0.00e+00 , tcur = 6.76e-02), ||y||_2 = 1.9277014052e+00] + [Pre-RHS processing (stage 1 of 5) at t = 6.76e-02 (tn = 0.00e+00 , tcur = 6.76e-02), ||y||_2 = 1.9277014052e+00] + [Post-stage processing (stage 2 of 5) at t = 8.00e-02 (tn = 0.00e+00 , tcur = 8.00e-02), ||y||_2 = 1.8630468331e+00] + [Pre-RHS processing (stage 2 of 5) at t = 8.00e-02 (tn = 0.00e+00 , tcur = 8.00e-02), ||y||_2 = 1.8630468331e+00] + [Post-stage processing (stage 3 of 5) at t = 1.13e-01 (tn = 0.00e+00 , tcur = 1.13e-01), ||y||_2 = 1.6895511338e+00] + [Pre-RHS processing (stage 3 of 5) at t = 1.13e-01 (tn = 0.00e+00 , tcur = 1.13e-01), ||y||_2 = 1.6895511338e+00] + [Post-stage processing (stage 4 of 5) at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01), ||y||_2 = 1.7553780461e+00] + [Post-stage processing (stage 5 of 5) at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01), ||y||_2 = 1.7553690226e+00] + [Post-step failure processing at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01),||y||_2 = 1.7553780461e+00] + [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] + [Post-stage processing (stage 1 of 5) at t = 3.18e-02 (tn = 0.00e+00 , tcur = 3.18e-02), ||y||_2 = 2.0746627548e+00] + [Pre-RHS processing (stage 1 of 5) at t = 3.18e-02 (tn = 0.00e+00 , tcur = 3.18e-02), ||y||_2 = 2.0746627548e+00] + [Post-stage processing (stage 2 of 5) at t = 3.76e-02 (tn = 0.00e+00 , tcur = 3.76e-02), ||y||_2 = 2.0566853389e+00] + [Pre-RHS processing (stage 2 of 5) at t = 3.76e-02 (tn = 0.00e+00 , tcur = 3.76e-02), ||y||_2 = 2.0566853389e+00] + [Post-stage processing (stage 3 of 5) at t = 5.33e-02 (tn = 0.00e+00 , tcur = 5.33e-02), ||y||_2 = 1.9956059674e+00] + [Pre-RHS processing (stage 3 of 5) at t = 5.33e-02 (tn = 0.00e+00 , tcur = 5.33e-02), ||y||_2 = 1.9956059674e+00] + [Post-stage processing (stage 4 of 5) at t = 4.70e-02 (tn = 0.00e+00 , tcur = 4.70e-02), ||y||_2 = 2.0220308045e+00] + [Post-stage processing (stage 5 of 5) at t = 4.70e-02 (tn = 0.00e+00 , tcur = 4.70e-02), ||y||_2 = 2.0220301555e+00] + [Post-step processing at t = 4.70e-02 (tn = 0.00e+00 , tcur = 4.70e-02),||y||_2 = 2.0220308045e+00] + 4.7038717251e-02 1.2245191379e+00 1.6090871497e+00 7.2407223550e-08 3.3077079586e-07 + [Pre-step processing at t = 4.70e-02 (tn = 4.70e-02 , tcur = 4.70e-02),||y||_2 = 2.0220308045e+00] + [Pre-RHS processing (stage 0 of 5) at t = 4.70e-02 (tn = 4.70e-02 , tcur = 4.70e-02), ||y||_2 = 2.0220308045e+00] + [Post-stage processing (stage 1 of 5) at t = 7.89e-02 (tn = 4.70e-02 , tcur = 7.89e-02), ||y||_2 = 1.8687693366e+00] + [Pre-RHS processing (stage 1 of 5) at t = 7.89e-02 (tn = 4.70e-02 , tcur = 7.89e-02), ||y||_2 = 1.8687693366e+00] + [Post-stage processing (stage 2 of 5) at t = 8.47e-02 (tn = 4.70e-02 , tcur = 8.47e-02), ||y||_2 = 1.8374772654e+00] + [Pre-RHS processing (stage 2 of 5) at t = 8.47e-02 (tn = 4.70e-02 , tcur = 8.47e-02), ||y||_2 = 1.8374772654e+00] + [Post-stage processing (stage 3 of 5) at t = 1.00e-01 (tn = 4.70e-02 , tcur = 1.00e-01), ||y||_2 = 1.7534837182e+00] + [Pre-RHS processing (stage 3 of 5) at t = 1.00e-01 (tn = 4.70e-02 , tcur = 1.00e-01), ||y||_2 = 1.7534837182e+00] + [Post-stage processing (stage 4 of 5) at t = 9.41e-02 (tn = 4.70e-02 , tcur = 9.41e-02), ||y||_2 = 1.7866195702e+00] + [Post-stage processing (stage 5 of 5) at t = 9.41e-02 (tn = 4.70e-02 , tcur = 9.41e-02), ||y||_2 = 1.7866191431e+00] + [Post-step processing at t = 9.41e-02 (tn = 4.70e-02 , tcur = 9.41e-02),||y||_2 = 1.7866195702e+00] + 9.4077434503e-02 1.2238419876e+00 1.3016221719e+00 8.9882908894e-08 1.7942663662e-06 + [Pre-step processing at t = 9.41e-02 (tn = 9.41e-02 , tcur = 9.41e-02),||y||_2 = 1.7866195702e+00] + [Pre-RHS processing (stage 0 of 5) at t = 9.41e-02 (tn = 9.41e-02 , tcur = 9.41e-02), ||y||_2 = 1.7866195702e+00] + [Post-stage processing (stage 1 of 5) at t = 1.28e-01 (tn = 9.41e-02 , tcur = 1.28e-01), ||y||_2 = 1.6322862176e+00] + [Pre-RHS processing (stage 1 of 5) at t = 1.28e-01 (tn = 9.41e-02 , tcur = 1.28e-01), ||y||_2 = 1.6322862176e+00] + [Post-stage processing (stage 2 of 5) at t = 1.34e-01 (tn = 9.41e-02 , tcur = 1.34e-01), ||y||_2 = 1.6132224524e+00] + [Pre-RHS processing (stage 2 of 5) at t = 1.34e-01 (tn = 9.41e-02 , tcur = 1.34e-01), ||y||_2 = 1.6132224524e+00] + [Post-stage processing (stage 3 of 5) at t = 1.50e-01 (tn = 9.41e-02 , tcur = 1.50e-01), ||y||_2 = 1.5821211389e+00] + [Pre-RHS processing (stage 3 of 5) at t = 1.50e-01 (tn = 9.41e-02 , tcur = 1.50e-01), ||y||_2 = 1.5821211389e+00] + [Post-stage processing (stage 4 of 5) at t = 1.44e-01 (tn = 9.41e-02 , tcur = 1.44e-01), ||y||_2 = 1.5906968039e+00] + [Post-stage processing (stage 5 of 5) at t = 1.44e-01 (tn = 9.41e-02 , tcur = 1.44e-01), ||y||_2 = 1.5906958150e+00] + [Post-step processing at t = 1.44e-01 (tn = 9.41e-02 , tcur = 1.44e-01),||y||_2 = 1.5906968039e+00] + 1.4372138650e-01 1.2226386256e+00 1.0175810107e+00 1.1664470589e-07 2.7813679992e-06 +------------------------------------------------------------------------------------------------------------------------------ +Current time = 0.143721386500587 +Steps = 3 +Step attempts = 4 +Stability limited steps = 0 +Accuracy limited steps = 4 +Error test fails = 1 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.1 +Last step size = 0.0496439519979517 +Current step size = 0.0499492708252477 +Explicit slow RHS fn evals = 16 +Implicit slow RHS fn evals = 64 +Inner stepper failures = 0 +NLS iters = 48 +NLS fails = 0 +NLS iters per step = 16 +LS setups = 0 +Jac fn evals = 0 +LS RHS fn evals = 58 +Prec setup evals = 0 +Prec solves = 0 +LS iters = 58 +LS fails = 0 +Jac-times setups = 0 +Jac-times evals = 58 +LS iters per NLS iter = 1.20833333333333 +Jac evals per NLS iter = 0 +Prec evals per NLS iter = 0 +End MRIStep StageInfo test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_6.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_6.out new file mode 100644 index 0000000000..651acf0af6 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_6.out @@ -0,0 +1,64 @@ +Start MRIStep StageInfo test +Using MERK method + t u v u err v err +------------------------------------------------------------------------------------------------------------------------------ + 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 + [Pre-RHS processing (stage 0 of 4) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 0 of 4) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Post-stage processing (stage 1 of 4) at t = 5.00e-02 (tn = 0.00e+00 , tcur = 5.00e-02), ||y||_2 = 2.0100518077e+00] + [Pre-RHS processing (stage 1 of 4) at t = 5.00e-02 (tn = 0.00e+00 , tcur = 5.00e-02), ||y||_2 = 2.0100518077e+00] + [Post-stage processing (stage 2 of 4) at t = 6.67e-02 (tn = 0.00e+00 , tcur = 6.67e-02), ||y||_2 = 1.9323737599e+00] + [Pre-RHS processing (stage 2 of 4) at t = 6.67e-02 (tn = 0.00e+00 , tcur = 6.67e-02), ||y||_2 = 1.9323737599e+00] + [Post-stage processing (stage 4 of 4) at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01), ||y||_2 = 1.7553417874e+00] + [Post-stage processing (stage 3 of 4) at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01), ||y||_2 = 1.7553802047e+00] + [Post-step failure processing at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01),||y||_2 = 1.7553802047e+00] + [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] + [Post-stage processing (stage 1 of 4) at t = 1.43e-02 (tn = 0.00e+00 , tcur = 1.43e-02), ||y||_2 = 2.1117506552e+00] + [Pre-RHS processing (stage 1 of 4) at t = 1.43e-02 (tn = 0.00e+00 , tcur = 1.43e-02), ||y||_2 = 2.1117506552e+00] + [Post-stage processing (stage 2 of 4) at t = 1.90e-02 (tn = 0.00e+00 , tcur = 1.90e-02), ||y||_2 = 2.1043459618e+00] + [Pre-RHS processing (stage 2 of 4) at t = 1.90e-02 (tn = 0.00e+00 , tcur = 1.90e-02), ||y||_2 = 2.1043459618e+00] + [Post-stage processing (stage 4 of 4) at t = 2.86e-02 (tn = 0.00e+00 , tcur = 2.86e-02), ||y||_2 = 2.0835156932e+00] + [Post-stage processing (stage 3 of 4) at t = 2.86e-02 (tn = 0.00e+00 , tcur = 2.86e-02), ||y||_2 = 2.0835163684e+00] + [Post-step processing at t = 2.86e-02 (tn = 0.00e+00 , tcur = 2.86e-02),||y||_2 = 2.0835163684e+00] + 2.8560774168e-02 1.2246616429e+00 1.6855990976e+00 2.2506326580e-08 3.6164009787e-08 + [Pre-step processing at t = 2.86e-02 (tn = 2.86e-02 , tcur = 2.86e-02),||y||_2 = 2.0835163684e+00] + [Pre-RHS processing (stage 0 of 4) at t = 2.86e-02 (tn = 2.86e-02 , tcur = 2.86e-02), ||y||_2 = 2.0835163684e+00] + [Post-stage processing (stage 1 of 4) at t = 4.28e-02 (tn = 2.86e-02 , tcur = 4.28e-02), ||y||_2 = 2.0382427189e+00] + [Pre-RHS processing (stage 1 of 4) at t = 4.28e-02 (tn = 2.86e-02 , tcur = 4.28e-02), ||y||_2 = 2.0382427189e+00] + [Post-stage processing (stage 2 of 4) at t = 4.76e-02 (tn = 2.86e-02 , tcur = 4.76e-02), ||y||_2 = 2.0197685795e+00] + [Pre-RHS processing (stage 2 of 4) at t = 4.76e-02 (tn = 2.86e-02 , tcur = 4.76e-02), ||y||_2 = 2.0197685795e+00] + [Post-stage processing (stage 4 of 4) at t = 5.71e-02 (tn = 2.86e-02 , tcur = 5.71e-02), ||y||_2 = 1.9785258650e+00] + [Post-stage processing (stage 3 of 4) at t = 5.71e-02 (tn = 2.86e-02 , tcur = 5.71e-02), ||y||_2 = 1.9785265655e+00] + [Post-step processing at t = 5.71e-02 (tn = 2.86e-02 , tcur = 5.71e-02),||y||_2 = 1.9785265655e+00] + 5.7121548336e-02 1.2244119400e+00 1.5541501767e+00 3.8773453559e-08 5.2852703813e-07 + [Pre-step processing at t = 5.71e-02 (tn = 5.71e-02 , tcur = 5.71e-02),||y||_2 = 1.9785265655e+00] + [Pre-RHS processing (stage 0 of 4) at t = 5.71e-02 (tn = 5.71e-02 , tcur = 5.71e-02), ||y||_2 = 1.9785265655e+00] + [Post-stage processing (stage 1 of 4) at t = 7.16e-02 (tn = 5.71e-02 , tcur = 7.16e-02), ||y||_2 = 1.9070735973e+00] + [Pre-RHS processing (stage 1 of 4) at t = 7.16e-02 (tn = 5.71e-02 , tcur = 7.16e-02), ||y||_2 = 1.9070735973e+00] + [Post-stage processing (stage 2 of 4) at t = 7.64e-02 (tn = 5.71e-02 , tcur = 7.64e-02), ||y||_2 = 1.8816324251e+00] + [Pre-RHS processing (stage 2 of 4) at t = 7.64e-02 (tn = 5.71e-02 , tcur = 7.64e-02), ||y||_2 = 1.8816324251e+00] + [Post-stage processing (stage 4 of 4) at t = 8.61e-02 (tn = 5.71e-02 , tcur = 8.61e-02), ||y||_2 = 1.8296338557e+00] + [Post-stage processing (stage 3 of 4) at t = 8.61e-02 (tn = 5.71e-02 , tcur = 8.61e-02), ||y||_2 = 1.8296348692e+00] + [Post-step processing at t = 8.61e-02 (tn = 5.71e-02 , tcur = 8.61e-02),||y||_2 = 1.8296348692e+00] + 8.6097654722e-02 1.2239885854e+00 1.3599322400e+00 4.6675652676e-08 9.1623140341e-07 +------------------------------------------------------------------------------------------------------------------------------ +Current time = 0.0860976547220178 +Steps = 3 +Step attempts = 4 +Stability limited steps = 0 +Accuracy limited steps = 4 +Error test fails = 1 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.1 +Last step size = 0.0289761063859351 +Current step size = 0.0288866044534405 +Explicit slow RHS fn evals = 12 +Implicit slow RHS fn evals = 0 +Inner stepper failures = 0 +NLS iters = 0 +NLS fails = 0 +NLS iters per step = 0 +LS setups = 0 +End MRIStep StageInfo test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.out new file mode 100644 index 0000000000..3e8770502d --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.out @@ -0,0 +1,28 @@ +Start SplittingStep StageInfo test + t y y err +--------------------------------------------------------------------- + 0.000000000000000e+00 1.000000000000000e+00 0.000000000000000e+00 + [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 1.0000000000e+00] + [Post-step processing at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03),||y||_2 = 9.9899900167e-01] + 1.0000000000e-03 9.9899900167e-01 9.9866566894e-07 + [Pre-step processing at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03),||y||_2 = 9.9899900167e-01] + [Post-step processing at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03),||y||_2 = 9.9799800734e-01] + 2.0000000000e-03 9.9799800734e-01 1.9953280224e-06 + [Pre-step processing at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03),||y||_2 = 9.9799800734e-01] + [Post-step processing at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03),||y||_2 = 9.9699701901e-01] + 3.0000000000e-03 9.9699701901e-01 2.9899850904e-06 +--------------------------------------------------------------------- +Current time = 0.003 +Steps = 3 +Step attempts = 3 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.001 +Last step size = 0.001 +Current step size = 0.001 +Partition 1 evolves = 3 +Partition 2 evolves = 3 +End SplittingStep StageInfo test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.out new file mode 100644 index 0000000000..1388944790 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.out @@ -0,0 +1,64 @@ +Start SPRKStep StageInfo test + t q1 q2 q3 q4 +------------------------------------------------------------------------------------------------------------------------------ + 0.000000000000000e+00 4.000000000000000e-01 0.000000000000000e+00 0.000000000000000e+00 2.000000000000000e+00 + [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.0396078054e+00] + [Pre-RHS processing (stage 0 of 4) at t = 1.34e-04 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.0396078054e+00] + [Pre-RHS processing (stage 0 of 4) at t = 5.15e-04 (tn = 0.00e+00 , tcur = 1.34e-04), ||y||_2 = 2.0396079787e+00] + [Post-stage processing (stage 0 of 4) at t = 1.34e-04 (tn = 0.00e+00 , tcur = 1.34e-04), ||y||_2 = 2.0396081541e+00] + [Pre-RHS processing (stage 1 of 4) at t = -9.03e-05 (tn = 0.00e+00 , tcur = 1.34e-04), ||y||_2 = 2.0396081541e+00] + [Pre-RHS processing (stage 1 of 4) at t = 4.30e-04 (tn = 0.00e+00 , tcur = -9.03e-05), ||y||_2 = 2.0396116094e+00] + [Post-stage processing (stage 1 of 4) at t = -9.03e-05 (tn = 0.00e+00 , tcur = -9.03e-05), ||y||_2 = 2.0396115204e+00] + [Pre-RHS processing (stage 2 of 4) at t = 6.66e-04 (tn = 0.00e+00 , tcur = -9.03e-05), ||y||_2 = 2.0396115204e+00] + [Pre-RHS processing (stage 2 of 4) at t = 8.71e-04 (tn = 0.00e+00 , tcur = 6.66e-04), ||y||_2 = 2.0396057340e+00] + [Post-stage processing (stage 2 of 4) at t = 6.66e-04 (tn = 0.00e+00 , tcur = 6.66e-04), ||y||_2 = 2.0396059367e+00] + [Pre-RHS processing (stage 3 of 4) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 6.66e-04), ||y||_2 = 2.0396059367e+00] + [Pre-RHS processing (stage 3 of 4) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.0396023491e+00] + [Post-stage processing (stage 3 of 4) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.0396024276e+00] + [Post-step processing at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03),||y||_2 = 2.0396024276e+00] + 1.0000000000e-03 3.9999687501e-01 1.9999947917e-03 -6.2499544275e-03 1.9999843751e+00 + [Pre-step processing at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03),||y||_2 = 2.0396024276e+00] + [Pre-RHS processing (stage 0 of 4) at t = 1.13e-03 (tn = 1.00e-03 , tcur = 1.00e-03), ||y||_2 = 2.0396024276e+00] + [Pre-RHS processing (stage 0 of 4) at t = 1.52e-03 (tn = 1.00e-03 , tcur = 1.13e-03), ||y||_2 = 2.0396010553e+00] + [Post-stage processing (stage 0 of 4) at t = 1.13e-03 (tn = 1.00e-03 , tcur = 1.13e-03), ||y||_2 = 2.0396016098e+00] + [Pre-RHS processing (stage 1 of 4) at t = 9.10e-04 (tn = 1.00e-03 , tcur = 1.13e-03), ||y||_2 = 2.0396016098e+00] + [Pre-RHS processing (stage 1 of 4) at t = 1.43e-03 (tn = 1.00e-03 , tcur = 9.10e-04), ||y||_2 = 2.0396076483e+00] + [Post-stage processing (stage 1 of 4) at t = 9.10e-04 (tn = 1.00e-03 , tcur = 9.10e-04), ||y||_2 = 2.0396074962e+00] + [Pre-RHS processing (stage 2 of 4) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 9.10e-04), ||y||_2 = 2.0396074962e+00] + [Pre-RHS processing (stage 2 of 4) at t = 1.87e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.0395930192e+00] + [Post-stage processing (stage 2 of 4) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.0395935467e+00] + [Pre-RHS processing (stage 3 of 4) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.0395935467e+00] + [Pre-RHS processing (stage 3 of 4) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.0395861214e+00] + [Post-stage processing (stage 3 of 4) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.0395862946e+00] + [Post-step processing at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03),||y||_2 = 2.0395862946e+00] + 2.0000000000e-03 3.9998750018e-01 3.9999583342e-03 -1.2499635430e-02 1.9999375021e+00 + [Pre-step processing at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03),||y||_2 = 2.0395862946e+00] + [Pre-RHS processing (stage 0 of 4) at t = 2.13e-03 (tn = 2.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.0395862946e+00] + [Pre-RHS processing (stage 0 of 4) at t = 2.52e-03 (tn = 2.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.0395833769e+00] + [Post-stage processing (stage 0 of 4) at t = 2.13e-03 (tn = 2.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.0395843104e+00] + [Pre-RHS processing (stage 1 of 4) at t = 1.91e-03 (tn = 2.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.0395843104e+00] + [Pre-RHS processing (stage 1 of 4) at t = 2.43e-03 (tn = 2.00e-03 , tcur = 1.91e-03), ||y||_2 = 2.0395929317e+00] + [Post-stage processing (stage 1 of 4) at t = 1.91e-03 (tn = 2.00e-03 , tcur = 1.91e-03), ||y||_2 = 2.0395927166e+00] + [Pre-RHS processing (stage 2 of 4) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 1.91e-03), ||y||_2 = 2.0395927166e+00] + [Pre-RHS processing (stage 2 of 4) at t = 2.87e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.0395695501e+00] + [Post-stage processing (stage 2 of 4) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.0395704024e+00] + [Pre-RHS processing (stage 3 of 4) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.0395704024e+00] + [Pre-RHS processing (stage 3 of 4) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.0395591399e+00] + [Post-stage processing (stage 3 of 4) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.0395594079e+00] + [Post-step processing at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03),||y||_2 = 2.0395594079e+00] + 3.0000000000e-03 3.9997187592e-01 5.9998593813e-03 -1.8748769629e-02 1.9998593855e+00 +------------------------------------------------------------------------------------------------------------------------------ +Current time = 0.003 +Steps = 3 +Step attempts = 3 +Stability limited steps = 0 +Accuracy limited steps = 0 +Error test fails = 0 +NLS step fails = 0 +Inequality constraint fails = 0 +Initial step size = 0.001 +Last step size = 0.001 +Current step size = 0.001 +f1 RHS fn evals = 12 +f2 RHS fn evals = 12 +End SPRKStep StageInfo test From 26c72412f360c56cf73d065574824b480d39c980 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 29 Jan 2026 15:22:25 -0500 Subject: [PATCH 066/298] Updated answers submodule commit --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index 991fae506f..91e3bfb56e 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 991fae506f8c0060812a7eb427e299777dbb1095 +Subproject commit 91e3bfb56ef4079d0dd1e05a0e04f12826538c54 From d755c1bd3078bc3dc70a14864353b52d970f4f2c Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 29 Jan 2026 15:24:53 -0500 Subject: [PATCH 067/298] Updated answers submodule commit --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index 3800f57eb6..137c2ea256 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 3800f57eb69c7ec314687b72b36357761f58e6cf +Subproject commit 137c2ea256beea87ffc21056dee7c9e47002c8b6 From e5fc63bd763ef4747b7e2409a49b1868f66cd0de Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 29 Jan 2026 15:25:58 -0500 Subject: [PATCH 068/298] Updated answers submodule commit --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index ef077d3b29..f41159e61e 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit ef077d3b297f2acf66923da2da59232f8f232d2b +Subproject commit f41159e61edde697658830431eabf5343768244e From f497cf7b7e3fb2a6e09e1433140942a8bf8bf882 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 29 Jan 2026 22:00:52 -0500 Subject: [PATCH 069/298] Updated answers submodule commit --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index 91e3bfb56e..9f6d4043e7 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 91e3bfb56ef4079d0dd1e05a0e04f12826538c54 +Subproject commit 9f6d4043e78dc44d2aed147c055e8e0f9745f739 From a4d6557ab47e294e466b667d58ad1c1a4e72bf49 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 29 Jan 2026 22:51:04 -0500 Subject: [PATCH 070/298] Formatting --- .../unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp | 2 +- .../unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp | 2 +- .../arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp | 2 +- .../arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp | 2 +- .../unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp | 2 +- .../arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp | 2 +- .../arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp index 098097859c..5b20eb68c5 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp @@ -39,7 +39,7 @@ using namespace problems::kpr; // store the main integrator global memory for these tests only, so that we // can call ARKodeGetLastTime etc in the callback functions from stageinfo.hpp. // This would normally be stored in user_data, but here we reuse problem -// defintions from other tests. +// definitions from other tests. void* arkode_mem = nullptr; // Include the pre/post step and stage processing routines now that arkode_mem is defined diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp index ee00bded48..bac2b9efa4 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp @@ -37,7 +37,7 @@ using namespace problems::kpr; // store the main integrator global memory for these tests only, so that we // can call ARKodeGetLastTime etc in the callback functions from stageinfo.hpp. // This would normally be stored in user_data, but here we reuse problem -// defintions from other tests. +// definitions from other tests. void* arkode_mem = nullptr; // Include the pre/post step and stage processing routines now that arkode_mem is defined diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp index 9300613873..ce84acfb8b 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp @@ -38,7 +38,7 @@ using namespace problems::estep; // store the main integrator global memory for these tests only, so that we // can call ARKodeGetLastTime etc in the callback functions from stageinfo.hpp. // This would normally be stored in user_data, but here we reuse problem -// defintions from other tests. +// definitions from other tests. void* arkode_mem = nullptr; // Include the pre/post step and stage processing routines now that arkode_mem is defined diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp index 438f80fa12..788c9e041f 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp @@ -37,7 +37,7 @@ using namespace problems::prv; // store the main integrator global memory for these tests only, so that we // can call ARKodeGetLastTime etc in the callback functions from stageinfo.hpp. // This would normally be stored in user_data, but here we reuse problem -// defintions from other tests. +// definitions from other tests. void* arkode_mem = nullptr; // Include the pre/post step and stage processing routines now that arkode_mem is defined diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp index 2c51d1876b..56acff94e5 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp @@ -42,7 +42,7 @@ using namespace problems::kpr; // store the main integrator global memory for these tests only, so that we // can call ARKodeGetLastTime etc in the callback functions from stageinfo.hpp. // This would normally be stored in user_data, but here we reuse problem -// defintions from other tests. +// definitions from other tests. void* arkode_mem = nullptr; // Include the pre/post step and stage processing routines now that arkode_mem is defined diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp index 2a29241a78..1d8936f4da 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp @@ -38,7 +38,7 @@ using namespace problems::estep; // store the main integrator global memory for these tests only, so that we // can call ARKodeGetLastTime etc in the callback functions from stageinfo.hpp. // This would normally be stored in user_data, but here we reuse problem -// defintions from other tests. +// definitions from other tests. void* arkode_mem = nullptr; // Include the pre/post step and stage processing routines now that arkode_mem is defined diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp index 569a464c1e..991029e0e3 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp @@ -37,7 +37,7 @@ using namespace problems::kepler; // store the main integrator global memory for these tests only, so that we // can call ARKodeGetLastTime etc in the callback functions from stageinfo.hpp. // This would normally be stored in user_data, but here we reuse problem -// defintions from other tests. +// definitions from other tests. void* arkode_mem = nullptr; // Include the pre/post step and stage processing routines now that arkode_mem is defined From 78bba689cf68c88e2ceb556bcf00dd6849ffaa21 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 29 Jan 2026 22:59:18 -0500 Subject: [PATCH 071/298] Added selected LSRK method to output --- .../arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp index 788c9e041f..3a19abdd59 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp @@ -68,27 +68,33 @@ int main(int argc, char* argv[]) int flag; if (method == 0) { + cout << "Using RKC method" << endl; flag = LSRKStepSetSTSMethodByName(arkode_mem, "ARKODE_LSRK_RKC_2"); } else if (method == 1) { + cout << "Using RKL method" << endl; flag = LSRKStepSetSTSMethodByName(arkode_mem, "ARKODE_LSRK_RKL_2"); } else if (method == 2) { + cout << "Using SSP(s,2) method" << endl; flag = LSRKStepSetSSPMethodByName(arkode_mem, "ARKODE_LSRK_SSP_S_2"); } else if (method == 3) { + cout << "Using SSP(s,3) method" << endl; flag = LSRKStepSetSSPMethodByName(arkode_mem, "ARKODE_LSRK_SSP_S_3"); } else if (method == 4) { + cout << "Using SSP(4,3) method" << endl; flag = LSRKStepSetSSPMethodByName(arkode_mem, "ARKODE_LSRK_SSP_S_3"); if (flag == 0) { flag = LSRKStepSetNumSSPStages(arkode_mem, 4); } } else if (method == 5) { + cout << "Using SSP(10,4) method" << endl; flag = LSRKStepSetSSPMethodByName(arkode_mem, "ARKODE_LSRK_SSP_10_4"); } else From a291b4d25a25ae8db24257ea373b862eae75b64f Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 29 Jan 2026 23:01:31 -0500 Subject: [PATCH 072/298] Added selected LSRK method to output --- .../arkode/CXX_serial/ark_test_stageinfo_lsrkstep_0.out | 1 + .../arkode/CXX_serial/ark_test_stageinfo_lsrkstep_1.out | 1 + .../arkode/CXX_serial/ark_test_stageinfo_lsrkstep_2.out | 1 + .../arkode/CXX_serial/ark_test_stageinfo_lsrkstep_3.out | 1 + .../arkode/CXX_serial/ark_test_stageinfo_lsrkstep_4.out | 1 + .../arkode/CXX_serial/ark_test_stageinfo_lsrkstep_5.out | 1 + 6 files changed, 6 insertions(+) diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_0.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_0.out index 708dbf3084..db25a45643 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_0.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_0.out @@ -1,4 +1,5 @@ Start LSRKStep StageInfo test +Using RKC method t y y err --------------------------------------------------------------------- 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_1.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_1.out index cf89be1e94..851b298a95 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_1.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_1.out @@ -1,4 +1,5 @@ Start LSRKStep StageInfo test +Using RKL method t y y err --------------------------------------------------------------------- 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_2.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_2.out index 519cca6ef7..eb32a475a9 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_2.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_2.out @@ -1,4 +1,5 @@ Start LSRKStep StageInfo test +Using SSP(s,2) method t y y err --------------------------------------------------------------------- 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_3.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_3.out index bb4088f1a8..9b8549e6b9 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_3.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_3.out @@ -1,4 +1,5 @@ Start LSRKStep StageInfo test +Using SSP(s,3) method t y y err --------------------------------------------------------------------- 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_4.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_4.out index 9e12c1f98c..711b393e9d 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_4.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_4.out @@ -1,4 +1,5 @@ Start LSRKStep StageInfo test +Using SSP(4,3) method t y y err --------------------------------------------------------------------- 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_5.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_5.out index ef7c10d695..f5f575c0a7 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_5.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_5.out @@ -1,4 +1,5 @@ Start LSRKStep StageInfo test +Using SSP(10,4) method t y y err --------------------------------------------------------------------- 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 From ac83d21017159270e55af71215750633536b076f Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 30 Jan 2026 09:29:05 -0500 Subject: [PATCH 073/298] Updated .out files to match floating-point roundoff on Jenkins box --- .../C_parallel/ark_diurnal_kry_bbd_p.out | 104 +-- .../arkode/C_parallel/ark_diurnal_kry_p.out | 53 +- .../arkode/C_parhyp/ark_diurnal_kry_ph.out | 53 +- .../arkode/C_serial/ark_KrylovDemo_prec.out | 652 +++++++++--------- .../arkode/C_serial/ark_KrylovDemo_prec_1.out | 652 +++++++++--------- .../arkode/C_serial/ark_KrylovDemo_prec_2.out | 652 +++++++++--------- .../ark_test_prealloc_arkstep_1.out | 12 +- .../ark_test_prealloc_erkstep_1.out | 12 +- .../ark_test_prealloc_lsrkstep_1.out | 6 +- .../ark_test_prealloc_sprkstep_1.out | 6 +- 10 files changed, 1100 insertions(+), 1102 deletions(-) diff --git a/examples/arkode/C_parallel/ark_diurnal_kry_bbd_p.out b/examples/arkode/C_parallel/ark_diurnal_kry_bbd_p.out index a30074040d..a73795f274 100644 --- a/examples/arkode/C_parallel/ark_diurnal_kry_bbd_p.out +++ b/examples/arkode/C_parallel/ark_diurnal_kry_bbd_p.out @@ -8,57 +8,57 @@ Preconditioner type is: jpre = SUN_PREC_LEFT t = 7.20e+03 no. steps = 70 stepsize = 1.17e+02 -At bottom left: c1, c2 = 1.047e+04 2.527e+11 -At top right: c1, c2 = 1.118e+04 2.700e+11 +At bottom left: c1, c2 = 1.047e+04 2.527e+11 +At top right: c1, c2 = 1.118e+04 2.700e+11 t = 1.44e+04 no. steps = 97 stepsize = 5.42e+02 -At bottom left: c1, c2 = 6.659e+06 2.582e+11 -At top right: c1, c2 = 7.301e+06 2.833e+11 +At bottom left: c1, c2 = 6.659e+06 2.582e+11 +At top right: c1, c2 = 7.301e+06 2.833e+11 t = 2.16e+04 no. steps = 115 stepsize = 6.88e+02 -At bottom left: c1, c2 = 2.665e+07 2.993e+11 -At top right: c1, c2 = 2.931e+07 3.313e+11 +At bottom left: c1, c2 = 2.665e+07 2.993e+11 +At top right: c1, c2 = 2.931e+07 3.313e+11 t = 2.88e+04 no. steps = 133 stepsize = 2.55e+02 -At bottom left: c1, c2 = 8.702e+06 3.380e+11 -At top right: c1, c2 = 9.650e+06 3.751e+11 +At bottom left: c1, c2 = 8.702e+06 3.380e+11 +At top right: c1, c2 = 9.650e+06 3.751e+11 t = 3.60e+04 no. steps = 161 stepsize = 7.55e+01 -At bottom left: c1, c2 = 1.404e+04 3.387e+11 -At top right: c1, c2 = 1.561e+04 3.765e+11 +At bottom left: c1, c2 = 1.404e+04 3.387e+11 +At top right: c1, c2 = 1.561e+04 3.765e+11 t = 4.32e+04 no. steps = 201 stepsize = 1.77e+03 -At bottom left: c1, c2 = -1.994e-07 3.382e+11 -At top right: c1, c2 = 4.533e-06 3.804e+11 +At bottom left: c1, c2 = -1.994e-07 3.382e+11 +At top right: c1, c2 = 4.533e-06 3.804e+11 t = 5.04e+04 no. steps = 206 stepsize = 7.73e+02 -At bottom left: c1, c2 = -2.848e-08 3.358e+11 -At top right: c1, c2 = -1.542e-07 3.864e+11 +At bottom left: c1, c2 = -2.848e-08 3.358e+11 +At top right: c1, c2 = -1.542e-07 3.864e+11 t = 5.76e+04 no. steps = 210 stepsize = 1.55e+03 -At bottom left: c1, c2 = -8.395e-07 3.320e+11 -At top right: c1, c2 = -4.284e-07 3.909e+11 +At bottom left: c1, c2 = -8.395e-07 3.320e+11 +At top right: c1, c2 = -4.284e-07 3.909e+11 t = 6.48e+04 no. steps = 215 stepsize = 1.89e+03 -At bottom left: c1, c2 = 1.234e-08 3.313e+11 -At top right: c1, c2 = 9.230e-08 3.963e+11 +At bottom left: c1, c2 = 1.234e-08 3.313e+11 +At top right: c1, c2 = 9.230e-08 3.963e+11 t = 7.20e+04 no. steps = 218 stepsize = 2.21e+03 -At bottom left: c1, c2 = -4.001e-08 3.330e+11 -At top right: c1, c2 = -7.099e-06 4.039e+11 +At bottom left: c1, c2 = -4.001e-08 3.330e+11 +At top right: c1, c2 = -7.099e-06 4.039e+11 t = 7.92e+04 no. steps = 221 stepsize = 2.32e+03 -At bottom left: c1, c2 = 3.713e-08 3.334e+11 -At top right: c1, c2 = -3.992e-07 4.120e+11 +At bottom left: c1, c2 = 3.713e-08 3.334e+11 +At top right: c1, c2 = -3.992e-07 4.120e+11 t = 8.64e+04 no. steps = 224 stepsize = 2.47e+03 -At bottom left: c1, c2 = 3.734e-07 3.352e+11 -At top right: c1, c2 = 3.748e-07 4.163e+11 +At bottom left: c1, c2 = 3.734e-07 3.352e+11 +At top right: c1, c2 = 3.748e-07 4.163e+11 -Final Statistics: +Final Statistics: -lenrw = 4118 leniw = 291 +lenrw = 4118 leniw = 285 lenrwls = 2455 leniwls = 126 nst = 224 nfe = 0 nfe = 3315 nfels = 6886 @@ -77,57 +77,57 @@ In ARKBBDPRE: real/integer local work space sizes = 1300, 192 Preconditioner type is: jpre = SUN_PREC_RIGHT t = 7.20e+03 no. steps = 69 stepsize = 1.17e+02 -At bottom left: c1, c2 = 1.047e+04 2.527e+11 -At top right: c1, c2 = 1.118e+04 2.700e+11 +At bottom left: c1, c2 = 1.047e+04 2.527e+11 +At top right: c1, c2 = 1.118e+04 2.700e+11 t = 1.44e+04 no. steps = 96 stepsize = 5.40e+02 -At bottom left: c1, c2 = 6.659e+06 2.582e+11 -At top right: c1, c2 = 7.301e+06 2.833e+11 +At bottom left: c1, c2 = 6.659e+06 2.582e+11 +At top right: c1, c2 = 7.301e+06 2.833e+11 t = 2.16e+04 no. steps = 114 stepsize = 6.89e+02 -At bottom left: c1, c2 = 2.665e+07 2.993e+11 -At top right: c1, c2 = 2.931e+07 3.313e+11 +At bottom left: c1, c2 = 2.665e+07 2.993e+11 +At top right: c1, c2 = 2.931e+07 3.313e+11 t = 2.88e+04 no. steps = 131 stepsize = 1.93e+02 -At bottom left: c1, c2 = 8.702e+06 3.380e+11 -At top right: c1, c2 = 9.650e+06 3.751e+11 +At bottom left: c1, c2 = 8.702e+06 3.380e+11 +At top right: c1, c2 = 9.650e+06 3.751e+11 t = 3.60e+04 no. steps = 159 stepsize = 7.48e+01 -At bottom left: c1, c2 = 1.404e+04 3.387e+11 -At top right: c1, c2 = 1.561e+04 3.765e+11 +At bottom left: c1, c2 = 1.404e+04 3.387e+11 +At top right: c1, c2 = 1.561e+04 3.765e+11 t = 4.32e+04 no. steps = 199 stepsize = 1.75e+03 -At bottom left: c1, c2 = -1.508e-07 3.382e+11 -At top right: c1, c2 = -1.680e-07 3.804e+11 +At bottom left: c1, c2 = -1.508e-07 3.382e+11 +At top right: c1, c2 = -1.680e-07 3.804e+11 t = 5.04e+04 no. steps = 203 stepsize = 1.28e+03 -At bottom left: c1, c2 = 8.151e-09 3.358e+11 -At top right: c1, c2 = -1.358e-08 3.864e+11 +At bottom left: c1, c2 = 8.151e-09 3.358e+11 +At top right: c1, c2 = -1.358e-08 3.864e+11 t = 5.76e+04 no. steps = 208 stepsize = 9.65e+02 -At bottom left: c1, c2 = 5.968e-08 3.320e+11 -At top right: c1, c2 = 1.041e-08 3.909e+11 +At bottom left: c1, c2 = 5.968e-08 3.320e+11 +At top right: c1, c2 = 1.041e-08 3.909e+11 t = 6.48e+04 no. steps = 213 stepsize = 1.90e+03 -At bottom left: c1, c2 = -4.322e-09 3.313e+11 -At top right: c1, c2 = 4.258e-10 3.963e+11 +At bottom left: c1, c2 = -4.322e-09 3.313e+11 +At top right: c1, c2 = 4.258e-10 3.963e+11 t = 7.20e+04 no. steps = 216 stepsize = 2.21e+03 -At bottom left: c1, c2 = 1.431e-07 3.330e+11 -At top right: c1, c2 = 1.210e-06 4.039e+11 +At bottom left: c1, c2 = 1.431e-07 3.330e+11 +At top right: c1, c2 = 1.210e-06 4.039e+11 t = 7.92e+04 no. steps = 219 stepsize = 2.32e+03 -At bottom left: c1, c2 = 2.679e-08 3.334e+11 -At top right: c1, c2 = 1.594e-07 4.120e+11 +At bottom left: c1, c2 = 2.679e-08 3.334e+11 +At top right: c1, c2 = 1.594e-07 4.120e+11 t = 8.64e+04 no. steps = 222 stepsize = 2.47e+03 -At bottom left: c1, c2 = 6.003e-08 3.352e+11 -At top right: c1, c2 = -1.811e-07 4.163e+11 +At bottom left: c1, c2 = 6.003e-08 3.352e+11 +At top right: c1, c2 = -1.811e-07 4.163e+11 -Final Statistics: +Final Statistics: -lenrw = 4118 leniw = 297 +lenrw = 4118 leniw = 285 lenrwls = 2455 leniwls = 126 nst = 222 nfe = 0 nfe = 3244 nfels = 7604 diff --git a/examples/arkode/C_parallel/ark_diurnal_kry_p.out b/examples/arkode/C_parallel/ark_diurnal_kry_p.out index 62b62514e4..f1b4e6e840 100644 --- a/examples/arkode/C_parallel/ark_diurnal_kry_p.out +++ b/examples/arkode/C_parallel/ark_diurnal_kry_p.out @@ -2,57 +2,57 @@ 2-species diurnal advection-diffusion problem t = 7.20e+03 no. steps = 69 stepsize = 1.17e+02 -At bottom left: c1, c2 = 1.047e+04 2.527e+11 -At top right: c1, c2 = 1.118e+04 2.700e+11 +At bottom left: c1, c2 = 1.047e+04 2.527e+11 +At top right: c1, c2 = 1.118e+04 2.700e+11 t = 1.44e+04 no. steps = 96 stepsize = 5.41e+02 -At bottom left: c1, c2 = 6.659e+06 2.582e+11 -At top right: c1, c2 = 7.301e+06 2.833e+11 +At bottom left: c1, c2 = 6.659e+06 2.582e+11 +At top right: c1, c2 = 7.301e+06 2.833e+11 t = 2.16e+04 no. steps = 114 stepsize = 6.85e+02 -At bottom left: c1, c2 = 2.665e+07 2.993e+11 -At top right: c1, c2 = 2.931e+07 3.313e+11 +At bottom left: c1, c2 = 2.665e+07 2.993e+11 +At top right: c1, c2 = 2.931e+07 3.313e+11 t = 2.88e+04 no. steps = 128 stepsize = 2.01e+02 -At bottom left: c1, c2 = 8.702e+06 3.380e+11 -At top right: c1, c2 = 9.650e+06 3.751e+11 +At bottom left: c1, c2 = 8.702e+06 3.380e+11 +At top right: c1, c2 = 9.650e+06 3.751e+11 t = 3.60e+04 no. steps = 156 stepsize = 7.45e+01 -At bottom left: c1, c2 = 1.404e+04 3.387e+11 -At top right: c1, c2 = 1.561e+04 3.765e+11 +At bottom left: c1, c2 = 1.404e+04 3.387e+11 +At top right: c1, c2 = 1.561e+04 3.765e+11 t = 4.32e+04 no. steps = 196 stepsize = 1.75e+03 -At bottom left: c1, c2 = -4.884e-08 3.382e+11 -At top right: c1, c2 = -8.694e-07 3.804e+11 +At bottom left: c1, c2 = -4.884e-08 3.382e+11 +At top right: c1, c2 = -8.694e-07 3.804e+11 t = 5.04e+04 no. steps = 200 stepsize = 1.26e+03 -At bottom left: c1, c2 = -7.230e-09 3.358e+11 -At top right: c1, c2 = 3.094e-08 3.864e+11 +At bottom left: c1, c2 = -7.230e-09 3.358e+11 +At top right: c1, c2 = 3.094e-08 3.864e+11 t = 5.76e+04 no. steps = 205 stepsize = 1.08e+03 -At bottom left: c1, c2 = 4.422e-06 3.320e+11 -At top right: c1, c2 = -2.623e-05 3.909e+11 +At bottom left: c1, c2 = 4.422e-06 3.320e+11 +At top right: c1, c2 = -2.623e-05 3.909e+11 t = 6.48e+04 no. steps = 209 stepsize = 2.05e+03 -At bottom left: c1, c2 = 1.105e-08 3.313e+11 -At top right: c1, c2 = 7.165e-08 3.963e+11 +At bottom left: c1, c2 = 1.105e-08 3.313e+11 +At top right: c1, c2 = 7.165e-08 3.963e+11 t = 7.20e+04 no. steps = 213 stepsize = 2.13e+03 -At bottom left: c1, c2 = -4.810e-06 3.330e+11 -At top right: c1, c2 = -1.198e-04 4.039e+11 +At bottom left: c1, c2 = -4.810e-06 3.330e+11 +At top right: c1, c2 = -1.198e-04 4.039e+11 t = 7.92e+04 no. steps = 216 stepsize = 2.32e+03 -At bottom left: c1, c2 = 7.856e-08 3.334e+11 -At top right: c1, c2 = 6.407e-07 4.120e+11 +At bottom left: c1, c2 = 7.856e-08 3.334e+11 +At top right: c1, c2 = 6.407e-07 4.120e+11 t = 8.64e+04 no. steps = 219 stepsize = 2.47e+03 -At bottom left: c1, c2 = 1.878e-08 3.352e+11 -At top right: c1, c2 = 2.566e-08 4.163e+11 +At bottom left: c1, c2 = 1.878e-08 3.352e+11 +At top right: c1, c2 = 2.566e-08 4.163e+11 -Final Statistics: +Final Statistics: -lenrw = 3518 leniw = 267 +lenrw = 3518 leniw = 261 lenrwls = 2455 leniwls = 126 nst = 219 nfe = 0 nfi = 3215 nfels = 6952 @@ -60,4 +60,3 @@ nni = 2012 nli = 6952 nsetups = 72 netf = 21 npe = 6 nps = 8886 ncfn = 2 ncfl = 621 - diff --git a/examples/arkode/C_parhyp/ark_diurnal_kry_ph.out b/examples/arkode/C_parhyp/ark_diurnal_kry_ph.out index 0d5014c1e5..ac94a6d1cf 100644 --- a/examples/arkode/C_parhyp/ark_diurnal_kry_ph.out +++ b/examples/arkode/C_parhyp/ark_diurnal_kry_ph.out @@ -2,57 +2,57 @@ 2-species diurnal advection-diffusion problem t = 7.20e+03 no. steps = 69 stepsize = 1.17e+02 -At bottom left: c1, c2 = 1.047e+04 2.527e+11 -At top right: c1, c2 = 1.118e+04 2.700e+11 +At bottom left: c1, c2 = 1.047e+04 2.527e+11 +At top right: c1, c2 = 1.118e+04 2.700e+11 t = 1.44e+04 no. steps = 96 stepsize = 6.06e+02 -At bottom left: c1, c2 = 6.659e+06 2.582e+11 -At top right: c1, c2 = 7.301e+06 2.833e+11 +At bottom left: c1, c2 = 6.659e+06 2.582e+11 +At top right: c1, c2 = 7.301e+06 2.833e+11 t = 2.16e+04 no. steps = 115 stepsize = 7.13e+02 -At bottom left: c1, c2 = 2.665e+07 2.993e+11 -At top right: c1, c2 = 2.931e+07 3.313e+11 +At bottom left: c1, c2 = 2.665e+07 2.993e+11 +At top right: c1, c2 = 2.931e+07 3.313e+11 t = 2.88e+04 no. steps = 128 stepsize = 2.39e+02 -At bottom left: c1, c2 = 8.702e+06 3.380e+11 -At top right: c1, c2 = 9.650e+06 3.751e+11 +At bottom left: c1, c2 = 8.702e+06 3.380e+11 +At top right: c1, c2 = 9.650e+06 3.751e+11 t = 3.60e+04 no. steps = 157 stepsize = 7.95e+01 -At bottom left: c1, c2 = 1.404e+04 3.387e+11 -At top right: c1, c2 = 1.561e+04 3.765e+11 +At bottom left: c1, c2 = 1.404e+04 3.387e+11 +At top right: c1, c2 = 1.561e+04 3.765e+11 t = 4.32e+04 no. steps = 197 stepsize = 1.77e+03 -At bottom left: c1, c2 = -7.216e-06 3.382e+11 -At top right: c1, c2 = 4.224e-05 3.804e+11 +At bottom left: c1, c2 = -7.216e-06 3.382e+11 +At top right: c1, c2 = 4.224e-05 3.804e+11 t = 5.04e+04 no. steps = 202 stepsize = 8.73e+02 -At bottom left: c1, c2 = 4.566e-07 3.358e+11 -At top right: c1, c2 = 2.513e-07 3.864e+11 +At bottom left: c1, c2 = 4.566e-07 3.358e+11 +At top right: c1, c2 = 2.513e-07 3.864e+11 t = 5.76e+04 no. steps = 206 stepsize = 1.72e+03 -At bottom left: c1, c2 = 4.610e-07 3.320e+11 -At top right: c1, c2 = 3.216e-05 3.909e+11 +At bottom left: c1, c2 = 4.610e-07 3.320e+11 +At top right: c1, c2 = 3.216e-05 3.909e+11 t = 6.48e+04 no. steps = 212 stepsize = 1.90e+03 -At bottom left: c1, c2 = 2.291e-06 3.313e+11 -At top right: c1, c2 = -9.987e-06 3.963e+11 +At bottom left: c1, c2 = 2.291e-06 3.313e+11 +At top right: c1, c2 = -9.987e-06 3.963e+11 t = 7.20e+04 no. steps = 215 stepsize = 2.20e+03 -At bottom left: c1, c2 = 2.352e-06 3.330e+11 -At top right: c1, c2 = 4.867e-05 4.039e+11 +At bottom left: c1, c2 = 2.352e-06 3.330e+11 +At top right: c1, c2 = 4.867e-05 4.039e+11 t = 7.92e+04 no. steps = 218 stepsize = 2.31e+03 -At bottom left: c1, c2 = 9.645e-07 3.334e+11 -At top right: c1, c2 = 1.907e-05 4.120e+11 +At bottom left: c1, c2 = 9.645e-07 3.334e+11 +At top right: c1, c2 = 1.907e-05 4.120e+11 t = 8.64e+04 no. steps = 221 stepsize = 2.44e+03 -At bottom left: c1, c2 = 3.465e-06 3.352e+11 -At top right: c1, c2 = 6.627e-06 4.163e+11 +At bottom left: c1, c2 = 3.465e-06 3.352e+11 +At top right: c1, c2 = 6.627e-06 4.163e+11 -Final Statistics: +Final Statistics: -lenrw = 3518 leniw = 267 +lenrw = 3518 leniw = 261 lenrwls = 2455 leniwls = 126 nst = 221 nfe = 0 nfi = 3097 nfels = 6228 @@ -60,4 +60,3 @@ nni = 1889 nli = 6228 nsetups = 69 netf = 20 npe = 4 nps = 8046 ncfn = 0 ncfl = 452 - diff --git a/examples/arkode/C_serial/ark_KrylovDemo_prec.out b/examples/arkode/C_serial/ark_KrylovDemo_prec.out index 8a09c9a96d..1c5be0014a 100644 --- a/examples/arkode/C_serial/ark_KrylovDemo_prec.out +++ b/examples/arkode/C_serial/ark_KrylovDemo_prec.out @@ -10,9 +10,9 @@ b parameter = 1 Diffusion coefficients: Dprey = 1 Dpred = 0.5 Rate parameter alpha = 1 -Mesh dimensions (mx,my) are 6, 6. Total system size is neq = 216 +Mesh dimensions (mx,my) are 6, 6. Total system size is neq = 216 -Tolerances: reltol = 1e-05, abstol = 1e-05 +Tolerances: reltol = 1e-05, abstol = 1e-05 Preconditioning uses a product of: (1) Gauss-Seidel iterations with itmax = 5 iterations, and @@ -31,52 +31,52 @@ Gram-Schmidt method type is gstype = SUN_MODIFIED_GS c values at t = 0: Species 1 -10 10 10 10 10 10 -10 10.1678 10.3775 10.3775 10.1678 10 -10 10.3775 10.8493 10.8493 10.3775 10 -10 10.3775 10.8493 10.8493 10.3775 10 -10 10.1678 10.3775 10.3775 10.1678 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.1678 10.3775 10.3775 10.1678 10 +10 10.3775 10.8493 10.8493 10.3775 10 +10 10.3775 10.8493 10.8493 10.3775 10 +10 10.1678 10.3775 10.3775 10.1678 10 +10 10 10 10 10 10 Species 2 -10 10 10 10 10 10 -10 10.3355 10.755 10.755 10.3355 10 -10 10.755 11.6987 11.6987 10.755 10 -10 10.755 11.6987 11.6987 10.755 10 -10 10.3355 10.755 10.755 10.3355 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.3355 10.755 10.755 10.3355 10 +10 10.755 11.6987 11.6987 10.755 10 +10 10.755 11.6987 11.6987 10.755 10 +10 10.3355 10.755 10.755 10.3355 10 +10 10 10 10 10 10 Species 3 -10 10 10 10 10 10 -10 10.5033 11.1325 11.1325 10.5033 10 -10 11.1325 12.548 12.548 11.1325 10 -10 11.1325 12.548 12.548 11.1325 10 -10 10.5033 11.1325 11.1325 10.5033 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.5033 11.1325 11.1325 10.5033 10 +10 11.1325 12.548 12.548 11.1325 10 +10 11.1325 12.548 12.548 11.1325 10 +10 10.5033 11.1325 11.1325 10.5033 10 +10 10 10 10 10 10 Species 4 -10 10 10 10 10 10 -10 10.6711 11.5099 11.5099 10.6711 10 -10 11.5099 13.3974 13.3974 11.5099 10 -10 11.5099 13.3974 13.3974 11.5099 10 -10 10.6711 11.5099 11.5099 10.6711 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.6711 11.5099 11.5099 10.6711 10 +10 11.5099 13.3974 13.3974 11.5099 10 +10 11.5099 13.3974 13.3974 11.5099 10 +10 10.6711 11.5099 11.5099 10.6711 10 +10 10 10 10 10 10 Species 5 -10 10 10 10 10 10 -10 10.8389 11.8874 11.8874 10.8389 10 -10 11.8874 14.2467 14.2467 11.8874 10 -10 11.8874 14.2467 14.2467 11.8874 10 -10 10.8389 11.8874 11.8874 10.8389 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.8389 11.8874 11.8874 10.8389 10 +10 11.8874 14.2467 14.2467 11.8874 10 +10 11.8874 14.2467 14.2467 11.8874 10 +10 10.8389 11.8874 11.8874 10.8389 10 +10 10 10 10 10 10 Species 6 -10 10 10 10 10 10 -10 11.0066 12.2649 12.2649 11.0066 10 -10 12.2649 15.0961 15.0961 12.2649 10 -10 12.2649 15.0961 15.0961 12.2649 10 -10 11.0066 12.2649 12.2649 11.0066 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 11.0066 12.2649 12.2649 11.0066 10 +10 12.2649 15.0961 15.0961 12.2649 10 +10 12.2649 15.0961 15.0961 12.2649 10 +10 11.0066 12.2649 12.2649 11.0066 10 +10 10 10 10 10 10 t = 1.00e-08 nst = 3 nfe = 0 nfi = 45 nni = 27 hu = 6.86e-08 @@ -87,52 +87,52 @@ t = 1.00e-06 nst = 4 nfe = 0 nfi = 77 nni = 49 hu = 1.20e-06 c values at t = 1e-06: Species 1 -9.99991 9.99992 9.99993 9.99993 9.99993 9.99992 -9.99992 10.1677 10.3774 10.3774 10.1677 9.99993 -9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 -9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 -9.99992 10.1677 10.3774 10.3774 10.1677 9.99992 -9.99991 9.99992 9.99993 9.99993 9.99992 9.99991 +9.99991 9.99992 9.99993 9.99993 9.99993 9.99992 +9.99992 10.1677 10.3774 10.3774 10.1677 9.99993 +9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 +9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 +9.99992 10.1677 10.3774 10.3774 10.1677 9.99992 +9.99991 9.99992 9.99993 9.99993 9.99992 9.99991 Species 2 -9.99991 9.99993 9.99995 9.99995 9.99993 9.99992 -9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 -9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 -9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 -9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 -9.99991 9.99993 9.99995 9.99995 9.99993 9.99991 +9.99991 9.99993 9.99995 9.99995 9.99993 9.99992 +9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 +9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 +9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 +9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 +9.99991 9.99993 9.99995 9.99995 9.99993 9.99991 Species 3 -9.99991 9.99994 9.99997 9.99997 9.99994 9.99992 -9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 -9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 -9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 -9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 -9.99991 9.99994 9.99997 9.99997 9.99994 9.99991 +9.99991 9.99994 9.99997 9.99997 9.99994 9.99992 +9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 +9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 +9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 +9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 +9.99991 9.99994 9.99997 9.99997 9.99994 9.99991 Species 4 -13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 -13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 -13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 -13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 -13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 -13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 +13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 +13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 +13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 +13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 +13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 +13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 Species 5 -13.4981 13.4981 13.4982 13.4981 13.4981 13.4981 -13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 -13.4982 16.4131 20.2351 20.2351 16.4131 13.4981 -13.4982 16.4131 20.2351 20.2351 16.4131 13.4982 -13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 -13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 +13.4981 13.4981 13.4982 13.4981 13.4981 13.4981 +13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 +13.4982 16.4131 20.2351 20.2351 16.4131 13.4981 +13.4982 16.4131 20.2351 20.2351 16.4131 13.4982 +13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 +13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 Species 6 -13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 -13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 -13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 -13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 -13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 -13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 +13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 +13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 +13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 +13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 +13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 +13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 t = 1.00e-05 nst = 12 nfe = 0 nfi = 197 nni = 129 hu = 1.19e-06 @@ -143,52 +143,52 @@ t = 1.00e-03 nst = 46 nfe = 0 nfi = 820 nni = 582 hu = 8.40e-03 c values at t = 0.001: Species 1 -9.90702 9.91664 9.92836 9.93033 9.92253 9.91674 -9.91472 10.0747 10.2769 10.2785 10.0795 9.92253 -9.92446 10.2748 10.7181 10.7194 10.2785 9.93033 -9.92445 10.2744 10.7173 10.7181 10.2769 9.92836 -9.91469 10.0734 10.2744 10.2748 10.0747 9.91664 -9.90697 9.91469 9.92445 9.92446 9.91472 9.90702 +9.90702 9.91664 9.92836 9.93033 9.92253 9.91674 +9.91472 10.0747 10.2769 10.2785 10.0795 9.92253 +9.92446 10.2748 10.7181 10.7194 10.2785 9.93033 +9.92445 10.2744 10.7173 10.7181 10.2769 9.92836 +9.91469 10.0734 10.2744 10.2748 10.0747 9.91664 +9.90697 9.91469 9.92445 9.92446 9.91472 9.90702 Species 2 -9.90742 9.92474 9.94622 9.94819 9.93064 9.91713 -9.92282 10.2412 10.644 10.6457 10.2461 9.93064 -9.94232 10.6419 11.5267 11.5281 10.6457 9.94819 -9.94231 10.6415 11.5258 11.5267 10.644 9.94622 -9.92279 10.24 10.6415 10.6419 10.2412 9.92474 -9.90737 9.92279 9.94231 9.94232 9.92282 9.90742 +9.90742 9.92474 9.94622 9.94819 9.93064 9.91713 +9.92282 10.2412 10.644 10.6457 10.2461 9.93064 +9.94232 10.6419 11.5267 11.5281 10.6457 9.94819 +9.94231 10.6415 11.5258 11.5267 10.644 9.94622 +9.92279 10.24 10.6415 10.6419 10.2412 9.92474 +9.90737 9.92279 9.94231 9.94232 9.92282 9.90742 Species 3 -9.90781 9.93284 9.96408 9.96605 9.93874 9.91752 -9.93092 10.4078 11.0109 11.0127 10.4127 9.93874 -9.96017 11.0088 12.3339 12.3354 11.0127 9.96605 -9.96016 11.0083 12.333 12.3339 11.0109 9.96408 -9.93089 10.4065 11.0083 11.0088 10.4078 9.93284 -9.90776 9.93089 9.96016 9.96017 9.93092 9.90781 +9.90781 9.93284 9.96408 9.96605 9.93874 9.91752 +9.93092 10.4078 11.0109 11.0127 10.4127 9.93874 +9.96017 11.0088 12.3339 12.3354 11.0127 9.96605 +9.96016 11.0083 12.333 12.3339 11.0109 9.96408 +9.93089 10.4065 11.0083 11.0088 10.4078 9.93284 +9.90776 9.93089 9.96016 9.96017 9.93092 9.90781 Species 4 -297231 297750 298393 298451 297925 297520 -297692 307245 319327 319378 307390 297925 -298276 319264 345799 345840 319378 298451 -298276 319252 345772 345799 319327 298393 -297691 307208 319252 319264 307245 297750 -297229 297691 298276 298276 297692 297231 +297231 297750 298393 298451 297925 297520 +297692 307245 319327 319378 307390 297925 +298276 319264 345799 345840 319378 298451 +298276 319252 345772 345799 319327 298393 +297691 307208 319252 319264 307245 297750 +297229 297691 298276 298276 297692 297231 Species 5 -297231 297750 298393 298451 297925 297520 -297692 307245 319327 319378 307390 297925 -298276 319264 345799 345840 319378 298451 -298276 319252 345772 345799 319327 298393 -297691 307208 319252 319264 307245 297750 -297229 297691 298276 298276 297692 297231 +297231 297750 298393 298451 297925 297520 +297692 307245 319327 319378 307390 297925 +298276 319264 345799 345840 319378 298451 +298276 319252 345772 345799 319327 298393 +297691 307208 319252 319264 307245 297750 +297229 297691 298276 298276 297692 297231 Species 6 -297231 297750 298393 298451 297925 297520 -297692 307245 319327 319378 307390 297925 -298276 319264 345799 345840 319378 298451 -298276 319252 345772 345799 319327 298393 -297691 307208 319252 319264 307245 297750 -297229 297691 298276 298276 297692 297231 +297231 297750 298393 298451 297925 297520 +297692 307245 319327 319378 307390 297925 +298276 319264 345799 345840 319378 298451 +298276 319252 345772 345799 319327 298393 +297691 307208 319252 319264 307245 297750 +297229 297691 298276 298276 297692 297231 t = 1.00e-02 nst = 47 nfe = 0 nfi = 840 nni = 597 hu = 1.32e-02 @@ -199,52 +199,52 @@ t = 1.00e+00 nst = 69 nfe = 0 nfi = 1259 nni = 904 hu = 5.51e-02 c values at t = 1: Species 1 -1.58852 1.59924 1.62152 1.64765 1.67037 1.68149 -1.58533 1.59504 1.61548 1.63952 1.66033 1.67037 -1.57757 1.58548 1.6024 1.62235 1.63952 1.64765 -1.56821 1.57412 1.58706 1.6024 1.61548 1.62152 -1.56049 1.56463 1.57412 1.58548 1.59504 1.59924 -1.55733 1.56049 1.56821 1.57757 1.58533 1.58852 +1.58852 1.59924 1.62152 1.64765 1.67037 1.68149 +1.58533 1.59504 1.61548 1.63952 1.66033 1.67037 +1.57757 1.58548 1.6024 1.62235 1.63952 1.64765 +1.56821 1.57412 1.58706 1.6024 1.61548 1.62152 +1.56049 1.56463 1.57412 1.58548 1.59504 1.59924 +1.55733 1.56049 1.56821 1.57757 1.58533 1.58852 Species 2 -1.59067 1.60141 1.62371 1.64987 1.67262 1.68376 -1.58749 1.5972 1.61767 1.64174 1.66257 1.67262 -1.57972 1.58763 1.60457 1.62455 1.64174 1.64987 -1.57034 1.57627 1.58922 1.60457 1.61767 1.62371 -1.56261 1.56677 1.57627 1.58763 1.5972 1.60141 -1.55945 1.56261 1.57034 1.57972 1.58749 1.59067 +1.59067 1.60141 1.62371 1.64987 1.67262 1.68376 +1.58749 1.5972 1.61767 1.64174 1.66257 1.67262 +1.57972 1.58763 1.60457 1.62455 1.64174 1.64987 +1.57034 1.57627 1.58922 1.60457 1.61767 1.62371 +1.56261 1.56677 1.57627 1.58763 1.5972 1.60141 +1.55945 1.56261 1.57034 1.57972 1.58749 1.59067 Species 3 -1.59271 1.60346 1.62579 1.65198 1.67474 1.6859 -1.58952 1.59925 1.61974 1.64383 1.66469 1.67474 -1.58174 1.58967 1.60662 1.62662 1.64383 1.65198 -1.57236 1.57829 1.59126 1.60662 1.61974 1.62579 -1.56462 1.56878 1.57829 1.58967 1.59925 1.60346 -1.56146 1.56462 1.57236 1.58174 1.58952 1.59271 +1.59271 1.60346 1.62579 1.65198 1.67474 1.6859 +1.58952 1.59925 1.61974 1.64383 1.66469 1.67474 +1.58174 1.58967 1.60662 1.62662 1.64383 1.65198 +1.57236 1.57829 1.59126 1.60662 1.61974 1.62579 +1.56462 1.56878 1.57829 1.58967 1.59925 1.60346 +1.56146 1.56462 1.57236 1.58174 1.58952 1.59271 Species 4 -47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 -47622.9 47914.2 48528 49249.8 49874.6 50175.6 -47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 -47108.7 47286.2 47674.7 48135.1 48528 48709.2 -46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 -46782 46876.8 47108.7 47389.8 47622.9 47718.5 +47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 +47622.9 47914.2 48528 49249.8 49874.6 50175.6 +47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 +47108.7 47286.2 47674.7 48135.1 48528 48709.2 +46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 +46782 46876.8 47108.7 47389.8 47622.9 47718.5 Species 5 -47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 -47622.9 47914.2 48528 49249.8 49874.6 50175.6 -47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 -47108.7 47286.2 47674.7 48135.1 48528 48709.2 -46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 -46782 46876.8 47108.7 47389.8 47622.9 47718.5 +47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 +47622.9 47914.2 48528 49249.8 49874.6 50175.6 +47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 +47108.7 47286.2 47674.7 48135.1 48528 48709.2 +46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 +46782 46876.8 47108.7 47389.8 47622.9 47718.5 Species 6 -47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 -47622.9 47914.2 48528 49249.8 49874.6 50175.6 -47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 -47108.7 47286.2 47674.7 48135.1 48528 48709.2 -46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 -46782 46876.8 47108.7 47389.8 47622.9 47718.5 +47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 +47622.9 47914.2 48528 49249.8 49874.6 50175.6 +47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 +47108.7 47286.2 47674.7 48135.1 48528 48709.2 +46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 +46782 46876.8 47108.7 47389.8 47622.9 47718.5 t = 2.00e+00 nst = 81 nfe = 0 nfi = 1463 nni = 1048 hu = 1.54e-01 @@ -255,52 +255,52 @@ t = 4.00e+00 nst = 95 nfe = 0 nfi = 1708 nni = 1221 hu = 2.69e-01 c values at t = 4: Species 1 -1.19535 1.20368 1.2211 1.24157 1.25935 1.268 -1.1928 1.20035 1.21636 1.23523 1.25154 1.25935 -1.18657 1.19274 1.20602 1.22173 1.23523 1.24157 -1.17904 1.18368 1.19389 1.20602 1.21636 1.2211 -1.17284 1.17613 1.18368 1.19274 1.20035 1.20368 -1.17032 1.17284 1.17904 1.18657 1.1928 1.19535 +1.19535 1.20368 1.2211 1.24157 1.25935 1.268 +1.1928 1.20035 1.21636 1.23523 1.25154 1.25935 +1.18657 1.19274 1.20602 1.22173 1.23523 1.24157 +1.17904 1.18368 1.19389 1.20602 1.21636 1.2211 +1.17284 1.17613 1.18368 1.19274 1.20035 1.20368 +1.17032 1.17284 1.17904 1.18657 1.1928 1.19535 Species 2 -1.19538 1.20371 1.22113 1.24161 1.25938 1.26804 -1.19284 1.20038 1.21639 1.23526 1.25157 1.25938 -1.1866 1.19277 1.20606 1.22177 1.23526 1.24161 -1.17908 1.18371 1.19393 1.20606 1.21639 1.22113 -1.17288 1.17616 1.18371 1.19277 1.20038 1.20371 -1.17035 1.17288 1.17908 1.1866 1.19284 1.19538 +1.19538 1.20371 1.22113 1.24161 1.25938 1.26804 +1.19284 1.20038 1.21639 1.23526 1.25157 1.25938 +1.1866 1.19277 1.20606 1.22177 1.23526 1.24161 +1.17908 1.18371 1.19393 1.20606 1.21639 1.22113 +1.17288 1.17616 1.18371 1.19277 1.20038 1.20371 +1.17035 1.17288 1.17908 1.1866 1.19284 1.19538 Species 3 -1.19542 1.20374 1.22116 1.24164 1.25942 1.26807 -1.19287 1.20042 1.21643 1.2353 1.25161 1.25942 -1.18663 1.1928 1.20609 1.2218 1.2353 1.24164 -1.17911 1.18374 1.19396 1.20609 1.21643 1.22116 -1.17291 1.17619 1.18374 1.1928 1.20042 1.20374 -1.17039 1.17291 1.17911 1.18663 1.19287 1.19542 +1.19542 1.20374 1.22116 1.24164 1.25942 1.26807 +1.19287 1.20042 1.21643 1.2353 1.25161 1.25942 +1.18663 1.1928 1.20609 1.2218 1.2353 1.24164 +1.17911 1.18374 1.19396 1.20609 1.21643 1.22116 +1.17291 1.17619 1.18374 1.1928 1.20042 1.20374 +1.17039 1.17291 1.17911 1.18663 1.19287 1.19542 Species 4 -35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 -35597.2 35782 36180.5 36651.6 37056.3 37246.5 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 +35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35597.2 35782 36180.5 36651.6 37056.3 37246.5 +35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.4 35782 36010.4 36110.2 +35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 Species 5 -35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 -35597.2 35782 36180.5 36651.6 37056.3 37246.5 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 +35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35597.2 35782 36180.5 36651.6 37056.3 37246.5 +35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.4 35782 36010.4 36110.2 +35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 Species 6 -35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 -35597.2 35782 36180.5 36651.6 37056.3 37246.5 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 +35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35597.2 35782 36180.5 36651.6 37056.3 37246.5 +35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.4 35782 36010.4 36110.2 +35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 t = 5.00e+00 nst = 98 nfe = 0 nfi = 1767 nni = 1262 hu = 3.36e-01 @@ -311,52 +311,52 @@ t = 7.00e+00 nst = 100 nfe = 0 nfi = 1798 nni = 1283 hu = 2.99e+00 c values at t = 7: Species 1 -1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 -1.18601 1.19352 1.20945 1.22822 1.24445 1.25222 -1.17981 1.18594 1.19917 1.2148 1.22822 1.23454 -1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 -1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 -1.16363 1.16615 1.17232 1.17981 1.18601 1.18855 +1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 +1.18601 1.19352 1.20945 1.22822 1.24445 1.25222 +1.17981 1.18594 1.19917 1.2148 1.22822 1.23454 +1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 +1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 +1.16363 1.16615 1.17232 1.17981 1.18601 1.18855 Species 2 -1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 -1.18601 1.19352 1.20945 1.22823 1.24445 1.25222 -1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 -1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 -1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 -1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 +1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 +1.18601 1.19352 1.20945 1.22823 1.24445 1.25222 +1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 +1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 +1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 +1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 Species 3 -1.18855 1.19684 1.21416 1.23454 1.25223 1.26083 -1.18601 1.19352 1.20945 1.22823 1.24445 1.25223 -1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 -1.17232 1.17693 1.1871 1.19917 1.20945 1.21416 -1.16615 1.16941 1.17693 1.18594 1.19352 1.19684 -1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 +1.18855 1.19684 1.21416 1.23454 1.25223 1.26083 +1.18601 1.19352 1.20945 1.22823 1.24445 1.25223 +1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 +1.17232 1.17693 1.1871 1.19917 1.20945 1.21416 +1.16615 1.16941 1.17693 1.18594 1.19352 1.19684 +1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 Species 4 -35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 -35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 -35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 -35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 -34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 -34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 +35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 +35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 +35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 +35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 +34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 +34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 Species 5 -35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 -35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 -35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 -35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 -34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 -34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 +35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 +35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 +35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 +35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 +34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 +34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 Species 6 -35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 -35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 -35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 -35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 -34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 -34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 +35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 +35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 +35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 +35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 +34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 +34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 t = 8.00e+00 nst = 100 nfe = 0 nfi = 1798 nni = 1283 hu = 2.99e+00 @@ -367,75 +367,75 @@ t = 1.00e+01 nst = 101 nfe = 0 nfi = 1813 nni = 1293 hu = 6.31e+00 c values at t = 10: Species 1 -1.18839 1.19667 1.214 1.23437 1.25206 1.26066 -1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 -1.17965 1.18578 1.199 1.21463 1.22806 1.23437 -1.17216 1.17677 1.18693 1.199 1.20929 1.214 -1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 -1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 +1.18839 1.19667 1.214 1.23437 1.25206 1.26066 +1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 +1.17965 1.18578 1.199 1.21463 1.22806 1.23437 +1.17216 1.17677 1.18693 1.199 1.20929 1.214 +1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 +1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 Species 2 -1.18839 1.19667 1.214 1.23437 1.25206 1.26066 -1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 -1.17965 1.18578 1.199 1.21463 1.22806 1.23437 -1.17216 1.17677 1.18693 1.199 1.20929 1.214 -1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 -1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 +1.18839 1.19667 1.214 1.23437 1.25206 1.26066 +1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 +1.17965 1.18578 1.199 1.21463 1.22806 1.23437 +1.17216 1.17677 1.18693 1.199 1.20929 1.214 +1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 +1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 Species 3 -1.18839 1.19667 1.214 1.23437 1.25206 1.26066 -1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 -1.17965 1.18578 1.199 1.21463 1.22806 1.23437 -1.17216 1.17677 1.18693 1.199 1.20929 1.214 -1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 -1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 +1.18839 1.19667 1.214 1.23437 1.25206 1.26066 +1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 +1.17965 1.18578 1.199 1.21463 1.22806 1.23437 +1.17216 1.17677 1.18693 1.199 1.20929 1.214 +1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 +1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 Species 4 -35650.8 35899 36418.5 37029.4 37559.6 37817.5 -35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 -35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 -35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 -34978.7 35076.6 35302.1 35572.4 35799.7 35899 -34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 +35650.8 35899 36418.5 37029.4 37559.6 37817.5 +35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 +35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 +35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 +34978.7 35076.6 35302.1 35572.4 35799.7 35899 +34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 Species 5 -35650.8 35899 36418.5 37029.4 37559.6 37817.5 -35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 -35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 -35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 -34978.7 35076.6 35302.1 35572.4 35799.7 35899 -34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 +35650.8 35899 36418.5 37029.4 37559.6 37817.5 +35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 +35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 +35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 +34978.7 35076.6 35302.1 35572.4 35799.7 35899 +34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 Species 6 -35650.8 35899 36418.5 37029.4 37559.6 37817.5 -35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 -35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 -35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 -34978.7 35076.6 35302.1 35572.4 35799.7 35899 -34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 +35650.8 35899 36418.5 37029.4 37559.6 37817.5 +35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 +35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 +35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 +34978.7 35076.6 35302.1 35572.4 35799.7 35899 +34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 148 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 101 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 1813 - Number of f-s (SPGMR) = 4359 - Number of f-s (TOTAL) = 4359 - Number of setups = 72 - Number of nonlinear iterations = 1293 - Number of linear iterations = 4359 - Number of preconditioner evaluations = 72 - Number of preconditioner solves = 5618 - Number of error test failures = 1 - Number of nonlinear conv. failures = 25 - Number of linear convergence failures = 238 - Average Krylov subspace dimension = 3.371 + ARKStep real workspace length = 3790 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 101 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 1813 + Number of f-s (SPGMR) = 4359 + Number of f-s (TOTAL) = 4359 + Number of setups = 72 + Number of nonlinear iterations = 1293 + Number of linear iterations = 4359 + Number of preconditioner evaluations = 72 + Number of preconditioner solves = 5618 + Number of error test failures = 1 + Number of nonlinear conv. failures = 25 + Number of linear convergence failures = 238 + Average Krylov subspace dimension = 3.371 ---------------------------------------------------------------------------- @@ -487,24 +487,24 @@ t = 1.00e+01 nst = 101 nfe = 0 nfi = 1813 nni = 1293 hu = 6.31e+00 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 154 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 101 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 1813 - Number of f-s (SPGMR) = 4359 - Number of f-s (TOTAL) = 4359 - Number of setups = 72 - Number of nonlinear iterations = 1293 - Number of linear iterations = 4359 - Number of preconditioner evaluations = 72 - Number of preconditioner solves = 5618 - Number of error test failures = 1 - Number of nonlinear conv. failures = 25 - Number of linear convergence failures = 238 - Average Krylov subspace dimension = 3.371 + ARKStep real workspace length = 3790 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 101 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 1813 + Number of f-s (SPGMR) = 4359 + Number of f-s (TOTAL) = 4359 + Number of setups = 72 + Number of nonlinear iterations = 1293 + Number of linear iterations = 4359 + Number of preconditioner evaluations = 72 + Number of preconditioner solves = 5618 + Number of error test failures = 1 + Number of nonlinear conv. failures = 25 + Number of linear convergence failures = 238 + Average Krylov subspace dimension = 3.371 ---------------------------------------------------------------------------- @@ -556,24 +556,24 @@ t = 1.00e+01 nst = 234 nfe = 0 nfi = 4045 nni = 2856 hu = 3.93e-01 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 160 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 234 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 4045 - Number of f-s (SPGMR) = 10634 - Number of f-s (TOTAL) = 10634 - Number of setups = 277 - Number of nonlinear iterations = 2856 - Number of linear iterations = 10634 - Number of preconditioner evaluations = 277 - Number of preconditioner solves = 13350 - Number of error test failures = 1 - Number of nonlinear conv. failures = 166 - Number of linear convergence failures = 1036 - Average Krylov subspace dimension = 3.723 + ARKStep real workspace length = 3790 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 234 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 4045 + Number of f-s (SPGMR) = 10634 + Number of f-s (TOTAL) = 10634 + Number of setups = 277 + Number of nonlinear iterations = 2856 + Number of linear iterations = 10634 + Number of preconditioner evaluations = 277 + Number of preconditioner solves = 13350 + Number of error test failures = 1 + Number of nonlinear conv. failures = 166 + Number of linear convergence failures = 1036 + Average Krylov subspace dimension = 3.723 ---------------------------------------------------------------------------- @@ -625,24 +625,24 @@ t = 1.00e+01 nst = 234 nfe = 0 nfi = 4045 nni = 2856 hu = 3.93e-01 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 166 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 234 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 4045 - Number of f-s (SPGMR) = 10633 - Number of f-s (TOTAL) = 10633 - Number of setups = 277 - Number of nonlinear iterations = 2856 - Number of linear iterations = 10633 - Number of preconditioner evaluations = 277 - Number of preconditioner solves = 13349 - Number of error test failures = 1 - Number of nonlinear conv. failures = 166 - Number of linear convergence failures = 1036 - Average Krylov subspace dimension = 3.723 + ARKStep real workspace length = 3790 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 234 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 4045 + Number of f-s (SPGMR) = 10633 + Number of f-s (TOTAL) = 10633 + Number of setups = 277 + Number of nonlinear iterations = 2856 + Number of linear iterations = 10633 + Number of preconditioner evaluations = 277 + Number of preconditioner solves = 13349 + Number of error test failures = 1 + Number of nonlinear conv. failures = 166 + Number of linear convergence failures = 1036 + Average Krylov subspace dimension = 3.723 ---------------------------------------------------------------------------- diff --git a/examples/arkode/C_serial/ark_KrylovDemo_prec_1.out b/examples/arkode/C_serial/ark_KrylovDemo_prec_1.out index 8a09c9a96d..1c5be0014a 100644 --- a/examples/arkode/C_serial/ark_KrylovDemo_prec_1.out +++ b/examples/arkode/C_serial/ark_KrylovDemo_prec_1.out @@ -10,9 +10,9 @@ b parameter = 1 Diffusion coefficients: Dprey = 1 Dpred = 0.5 Rate parameter alpha = 1 -Mesh dimensions (mx,my) are 6, 6. Total system size is neq = 216 +Mesh dimensions (mx,my) are 6, 6. Total system size is neq = 216 -Tolerances: reltol = 1e-05, abstol = 1e-05 +Tolerances: reltol = 1e-05, abstol = 1e-05 Preconditioning uses a product of: (1) Gauss-Seidel iterations with itmax = 5 iterations, and @@ -31,52 +31,52 @@ Gram-Schmidt method type is gstype = SUN_MODIFIED_GS c values at t = 0: Species 1 -10 10 10 10 10 10 -10 10.1678 10.3775 10.3775 10.1678 10 -10 10.3775 10.8493 10.8493 10.3775 10 -10 10.3775 10.8493 10.8493 10.3775 10 -10 10.1678 10.3775 10.3775 10.1678 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.1678 10.3775 10.3775 10.1678 10 +10 10.3775 10.8493 10.8493 10.3775 10 +10 10.3775 10.8493 10.8493 10.3775 10 +10 10.1678 10.3775 10.3775 10.1678 10 +10 10 10 10 10 10 Species 2 -10 10 10 10 10 10 -10 10.3355 10.755 10.755 10.3355 10 -10 10.755 11.6987 11.6987 10.755 10 -10 10.755 11.6987 11.6987 10.755 10 -10 10.3355 10.755 10.755 10.3355 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.3355 10.755 10.755 10.3355 10 +10 10.755 11.6987 11.6987 10.755 10 +10 10.755 11.6987 11.6987 10.755 10 +10 10.3355 10.755 10.755 10.3355 10 +10 10 10 10 10 10 Species 3 -10 10 10 10 10 10 -10 10.5033 11.1325 11.1325 10.5033 10 -10 11.1325 12.548 12.548 11.1325 10 -10 11.1325 12.548 12.548 11.1325 10 -10 10.5033 11.1325 11.1325 10.5033 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.5033 11.1325 11.1325 10.5033 10 +10 11.1325 12.548 12.548 11.1325 10 +10 11.1325 12.548 12.548 11.1325 10 +10 10.5033 11.1325 11.1325 10.5033 10 +10 10 10 10 10 10 Species 4 -10 10 10 10 10 10 -10 10.6711 11.5099 11.5099 10.6711 10 -10 11.5099 13.3974 13.3974 11.5099 10 -10 11.5099 13.3974 13.3974 11.5099 10 -10 10.6711 11.5099 11.5099 10.6711 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.6711 11.5099 11.5099 10.6711 10 +10 11.5099 13.3974 13.3974 11.5099 10 +10 11.5099 13.3974 13.3974 11.5099 10 +10 10.6711 11.5099 11.5099 10.6711 10 +10 10 10 10 10 10 Species 5 -10 10 10 10 10 10 -10 10.8389 11.8874 11.8874 10.8389 10 -10 11.8874 14.2467 14.2467 11.8874 10 -10 11.8874 14.2467 14.2467 11.8874 10 -10 10.8389 11.8874 11.8874 10.8389 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.8389 11.8874 11.8874 10.8389 10 +10 11.8874 14.2467 14.2467 11.8874 10 +10 11.8874 14.2467 14.2467 11.8874 10 +10 10.8389 11.8874 11.8874 10.8389 10 +10 10 10 10 10 10 Species 6 -10 10 10 10 10 10 -10 11.0066 12.2649 12.2649 11.0066 10 -10 12.2649 15.0961 15.0961 12.2649 10 -10 12.2649 15.0961 15.0961 12.2649 10 -10 11.0066 12.2649 12.2649 11.0066 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 11.0066 12.2649 12.2649 11.0066 10 +10 12.2649 15.0961 15.0961 12.2649 10 +10 12.2649 15.0961 15.0961 12.2649 10 +10 11.0066 12.2649 12.2649 11.0066 10 +10 10 10 10 10 10 t = 1.00e-08 nst = 3 nfe = 0 nfi = 45 nni = 27 hu = 6.86e-08 @@ -87,52 +87,52 @@ t = 1.00e-06 nst = 4 nfe = 0 nfi = 77 nni = 49 hu = 1.20e-06 c values at t = 1e-06: Species 1 -9.99991 9.99992 9.99993 9.99993 9.99993 9.99992 -9.99992 10.1677 10.3774 10.3774 10.1677 9.99993 -9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 -9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 -9.99992 10.1677 10.3774 10.3774 10.1677 9.99992 -9.99991 9.99992 9.99993 9.99993 9.99992 9.99991 +9.99991 9.99992 9.99993 9.99993 9.99993 9.99992 +9.99992 10.1677 10.3774 10.3774 10.1677 9.99993 +9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 +9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 +9.99992 10.1677 10.3774 10.3774 10.1677 9.99992 +9.99991 9.99992 9.99993 9.99993 9.99992 9.99991 Species 2 -9.99991 9.99993 9.99995 9.99995 9.99993 9.99992 -9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 -9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 -9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 -9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 -9.99991 9.99993 9.99995 9.99995 9.99993 9.99991 +9.99991 9.99993 9.99995 9.99995 9.99993 9.99992 +9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 +9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 +9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 +9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 +9.99991 9.99993 9.99995 9.99995 9.99993 9.99991 Species 3 -9.99991 9.99994 9.99997 9.99997 9.99994 9.99992 -9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 -9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 -9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 -9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 -9.99991 9.99994 9.99997 9.99997 9.99994 9.99991 +9.99991 9.99994 9.99997 9.99997 9.99994 9.99992 +9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 +9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 +9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 +9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 +9.99991 9.99994 9.99997 9.99997 9.99994 9.99991 Species 4 -13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 -13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 -13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 -13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 -13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 -13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 +13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 +13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 +13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 +13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 +13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 +13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 Species 5 -13.4981 13.4981 13.4982 13.4981 13.4981 13.4981 -13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 -13.4982 16.4131 20.2351 20.2351 16.4131 13.4981 -13.4982 16.4131 20.2351 20.2351 16.4131 13.4982 -13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 -13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 +13.4981 13.4981 13.4982 13.4981 13.4981 13.4981 +13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 +13.4982 16.4131 20.2351 20.2351 16.4131 13.4981 +13.4982 16.4131 20.2351 20.2351 16.4131 13.4982 +13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 +13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 Species 6 -13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 -13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 -13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 -13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 -13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 -13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 +13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 +13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 +13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 +13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 +13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 +13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 t = 1.00e-05 nst = 12 nfe = 0 nfi = 197 nni = 129 hu = 1.19e-06 @@ -143,52 +143,52 @@ t = 1.00e-03 nst = 46 nfe = 0 nfi = 820 nni = 582 hu = 8.40e-03 c values at t = 0.001: Species 1 -9.90702 9.91664 9.92836 9.93033 9.92253 9.91674 -9.91472 10.0747 10.2769 10.2785 10.0795 9.92253 -9.92446 10.2748 10.7181 10.7194 10.2785 9.93033 -9.92445 10.2744 10.7173 10.7181 10.2769 9.92836 -9.91469 10.0734 10.2744 10.2748 10.0747 9.91664 -9.90697 9.91469 9.92445 9.92446 9.91472 9.90702 +9.90702 9.91664 9.92836 9.93033 9.92253 9.91674 +9.91472 10.0747 10.2769 10.2785 10.0795 9.92253 +9.92446 10.2748 10.7181 10.7194 10.2785 9.93033 +9.92445 10.2744 10.7173 10.7181 10.2769 9.92836 +9.91469 10.0734 10.2744 10.2748 10.0747 9.91664 +9.90697 9.91469 9.92445 9.92446 9.91472 9.90702 Species 2 -9.90742 9.92474 9.94622 9.94819 9.93064 9.91713 -9.92282 10.2412 10.644 10.6457 10.2461 9.93064 -9.94232 10.6419 11.5267 11.5281 10.6457 9.94819 -9.94231 10.6415 11.5258 11.5267 10.644 9.94622 -9.92279 10.24 10.6415 10.6419 10.2412 9.92474 -9.90737 9.92279 9.94231 9.94232 9.92282 9.90742 +9.90742 9.92474 9.94622 9.94819 9.93064 9.91713 +9.92282 10.2412 10.644 10.6457 10.2461 9.93064 +9.94232 10.6419 11.5267 11.5281 10.6457 9.94819 +9.94231 10.6415 11.5258 11.5267 10.644 9.94622 +9.92279 10.24 10.6415 10.6419 10.2412 9.92474 +9.90737 9.92279 9.94231 9.94232 9.92282 9.90742 Species 3 -9.90781 9.93284 9.96408 9.96605 9.93874 9.91752 -9.93092 10.4078 11.0109 11.0127 10.4127 9.93874 -9.96017 11.0088 12.3339 12.3354 11.0127 9.96605 -9.96016 11.0083 12.333 12.3339 11.0109 9.96408 -9.93089 10.4065 11.0083 11.0088 10.4078 9.93284 -9.90776 9.93089 9.96016 9.96017 9.93092 9.90781 +9.90781 9.93284 9.96408 9.96605 9.93874 9.91752 +9.93092 10.4078 11.0109 11.0127 10.4127 9.93874 +9.96017 11.0088 12.3339 12.3354 11.0127 9.96605 +9.96016 11.0083 12.333 12.3339 11.0109 9.96408 +9.93089 10.4065 11.0083 11.0088 10.4078 9.93284 +9.90776 9.93089 9.96016 9.96017 9.93092 9.90781 Species 4 -297231 297750 298393 298451 297925 297520 -297692 307245 319327 319378 307390 297925 -298276 319264 345799 345840 319378 298451 -298276 319252 345772 345799 319327 298393 -297691 307208 319252 319264 307245 297750 -297229 297691 298276 298276 297692 297231 +297231 297750 298393 298451 297925 297520 +297692 307245 319327 319378 307390 297925 +298276 319264 345799 345840 319378 298451 +298276 319252 345772 345799 319327 298393 +297691 307208 319252 319264 307245 297750 +297229 297691 298276 298276 297692 297231 Species 5 -297231 297750 298393 298451 297925 297520 -297692 307245 319327 319378 307390 297925 -298276 319264 345799 345840 319378 298451 -298276 319252 345772 345799 319327 298393 -297691 307208 319252 319264 307245 297750 -297229 297691 298276 298276 297692 297231 +297231 297750 298393 298451 297925 297520 +297692 307245 319327 319378 307390 297925 +298276 319264 345799 345840 319378 298451 +298276 319252 345772 345799 319327 298393 +297691 307208 319252 319264 307245 297750 +297229 297691 298276 298276 297692 297231 Species 6 -297231 297750 298393 298451 297925 297520 -297692 307245 319327 319378 307390 297925 -298276 319264 345799 345840 319378 298451 -298276 319252 345772 345799 319327 298393 -297691 307208 319252 319264 307245 297750 -297229 297691 298276 298276 297692 297231 +297231 297750 298393 298451 297925 297520 +297692 307245 319327 319378 307390 297925 +298276 319264 345799 345840 319378 298451 +298276 319252 345772 345799 319327 298393 +297691 307208 319252 319264 307245 297750 +297229 297691 298276 298276 297692 297231 t = 1.00e-02 nst = 47 nfe = 0 nfi = 840 nni = 597 hu = 1.32e-02 @@ -199,52 +199,52 @@ t = 1.00e+00 nst = 69 nfe = 0 nfi = 1259 nni = 904 hu = 5.51e-02 c values at t = 1: Species 1 -1.58852 1.59924 1.62152 1.64765 1.67037 1.68149 -1.58533 1.59504 1.61548 1.63952 1.66033 1.67037 -1.57757 1.58548 1.6024 1.62235 1.63952 1.64765 -1.56821 1.57412 1.58706 1.6024 1.61548 1.62152 -1.56049 1.56463 1.57412 1.58548 1.59504 1.59924 -1.55733 1.56049 1.56821 1.57757 1.58533 1.58852 +1.58852 1.59924 1.62152 1.64765 1.67037 1.68149 +1.58533 1.59504 1.61548 1.63952 1.66033 1.67037 +1.57757 1.58548 1.6024 1.62235 1.63952 1.64765 +1.56821 1.57412 1.58706 1.6024 1.61548 1.62152 +1.56049 1.56463 1.57412 1.58548 1.59504 1.59924 +1.55733 1.56049 1.56821 1.57757 1.58533 1.58852 Species 2 -1.59067 1.60141 1.62371 1.64987 1.67262 1.68376 -1.58749 1.5972 1.61767 1.64174 1.66257 1.67262 -1.57972 1.58763 1.60457 1.62455 1.64174 1.64987 -1.57034 1.57627 1.58922 1.60457 1.61767 1.62371 -1.56261 1.56677 1.57627 1.58763 1.5972 1.60141 -1.55945 1.56261 1.57034 1.57972 1.58749 1.59067 +1.59067 1.60141 1.62371 1.64987 1.67262 1.68376 +1.58749 1.5972 1.61767 1.64174 1.66257 1.67262 +1.57972 1.58763 1.60457 1.62455 1.64174 1.64987 +1.57034 1.57627 1.58922 1.60457 1.61767 1.62371 +1.56261 1.56677 1.57627 1.58763 1.5972 1.60141 +1.55945 1.56261 1.57034 1.57972 1.58749 1.59067 Species 3 -1.59271 1.60346 1.62579 1.65198 1.67474 1.6859 -1.58952 1.59925 1.61974 1.64383 1.66469 1.67474 -1.58174 1.58967 1.60662 1.62662 1.64383 1.65198 -1.57236 1.57829 1.59126 1.60662 1.61974 1.62579 -1.56462 1.56878 1.57829 1.58967 1.59925 1.60346 -1.56146 1.56462 1.57236 1.58174 1.58952 1.59271 +1.59271 1.60346 1.62579 1.65198 1.67474 1.6859 +1.58952 1.59925 1.61974 1.64383 1.66469 1.67474 +1.58174 1.58967 1.60662 1.62662 1.64383 1.65198 +1.57236 1.57829 1.59126 1.60662 1.61974 1.62579 +1.56462 1.56878 1.57829 1.58967 1.59925 1.60346 +1.56146 1.56462 1.57236 1.58174 1.58952 1.59271 Species 4 -47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 -47622.9 47914.2 48528 49249.8 49874.6 50175.6 -47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 -47108.7 47286.2 47674.7 48135.1 48528 48709.2 -46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 -46782 46876.8 47108.7 47389.8 47622.9 47718.5 +47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 +47622.9 47914.2 48528 49249.8 49874.6 50175.6 +47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 +47108.7 47286.2 47674.7 48135.1 48528 48709.2 +46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 +46782 46876.8 47108.7 47389.8 47622.9 47718.5 Species 5 -47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 -47622.9 47914.2 48528 49249.8 49874.6 50175.6 -47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 -47108.7 47286.2 47674.7 48135.1 48528 48709.2 -46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 -46782 46876.8 47108.7 47389.8 47622.9 47718.5 +47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 +47622.9 47914.2 48528 49249.8 49874.6 50175.6 +47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 +47108.7 47286.2 47674.7 48135.1 48528 48709.2 +46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 +46782 46876.8 47108.7 47389.8 47622.9 47718.5 Species 6 -47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 -47622.9 47914.2 48528 49249.8 49874.6 50175.6 -47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 -47108.7 47286.2 47674.7 48135.1 48528 48709.2 -46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 -46782 46876.8 47108.7 47389.8 47622.9 47718.5 +47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 +47622.9 47914.2 48528 49249.8 49874.6 50175.6 +47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 +47108.7 47286.2 47674.7 48135.1 48528 48709.2 +46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 +46782 46876.8 47108.7 47389.8 47622.9 47718.5 t = 2.00e+00 nst = 81 nfe = 0 nfi = 1463 nni = 1048 hu = 1.54e-01 @@ -255,52 +255,52 @@ t = 4.00e+00 nst = 95 nfe = 0 nfi = 1708 nni = 1221 hu = 2.69e-01 c values at t = 4: Species 1 -1.19535 1.20368 1.2211 1.24157 1.25935 1.268 -1.1928 1.20035 1.21636 1.23523 1.25154 1.25935 -1.18657 1.19274 1.20602 1.22173 1.23523 1.24157 -1.17904 1.18368 1.19389 1.20602 1.21636 1.2211 -1.17284 1.17613 1.18368 1.19274 1.20035 1.20368 -1.17032 1.17284 1.17904 1.18657 1.1928 1.19535 +1.19535 1.20368 1.2211 1.24157 1.25935 1.268 +1.1928 1.20035 1.21636 1.23523 1.25154 1.25935 +1.18657 1.19274 1.20602 1.22173 1.23523 1.24157 +1.17904 1.18368 1.19389 1.20602 1.21636 1.2211 +1.17284 1.17613 1.18368 1.19274 1.20035 1.20368 +1.17032 1.17284 1.17904 1.18657 1.1928 1.19535 Species 2 -1.19538 1.20371 1.22113 1.24161 1.25938 1.26804 -1.19284 1.20038 1.21639 1.23526 1.25157 1.25938 -1.1866 1.19277 1.20606 1.22177 1.23526 1.24161 -1.17908 1.18371 1.19393 1.20606 1.21639 1.22113 -1.17288 1.17616 1.18371 1.19277 1.20038 1.20371 -1.17035 1.17288 1.17908 1.1866 1.19284 1.19538 +1.19538 1.20371 1.22113 1.24161 1.25938 1.26804 +1.19284 1.20038 1.21639 1.23526 1.25157 1.25938 +1.1866 1.19277 1.20606 1.22177 1.23526 1.24161 +1.17908 1.18371 1.19393 1.20606 1.21639 1.22113 +1.17288 1.17616 1.18371 1.19277 1.20038 1.20371 +1.17035 1.17288 1.17908 1.1866 1.19284 1.19538 Species 3 -1.19542 1.20374 1.22116 1.24164 1.25942 1.26807 -1.19287 1.20042 1.21643 1.2353 1.25161 1.25942 -1.18663 1.1928 1.20609 1.2218 1.2353 1.24164 -1.17911 1.18374 1.19396 1.20609 1.21643 1.22116 -1.17291 1.17619 1.18374 1.1928 1.20042 1.20374 -1.17039 1.17291 1.17911 1.18663 1.19287 1.19542 +1.19542 1.20374 1.22116 1.24164 1.25942 1.26807 +1.19287 1.20042 1.21643 1.2353 1.25161 1.25942 +1.18663 1.1928 1.20609 1.2218 1.2353 1.24164 +1.17911 1.18374 1.19396 1.20609 1.21643 1.22116 +1.17291 1.17619 1.18374 1.1928 1.20042 1.20374 +1.17039 1.17291 1.17911 1.18663 1.19287 1.19542 Species 4 -35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 -35597.2 35782 36180.5 36651.6 37056.3 37246.5 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 +35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35597.2 35782 36180.5 36651.6 37056.3 37246.5 +35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.4 35782 36010.4 36110.2 +35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 Species 5 -35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 -35597.2 35782 36180.5 36651.6 37056.3 37246.5 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 +35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35597.2 35782 36180.5 36651.6 37056.3 37246.5 +35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.4 35782 36010.4 36110.2 +35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 Species 6 -35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 -35597.2 35782 36180.5 36651.6 37056.3 37246.5 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 +35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35597.2 35782 36180.5 36651.6 37056.3 37246.5 +35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.4 35782 36010.4 36110.2 +35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 t = 5.00e+00 nst = 98 nfe = 0 nfi = 1767 nni = 1262 hu = 3.36e-01 @@ -311,52 +311,52 @@ t = 7.00e+00 nst = 100 nfe = 0 nfi = 1798 nni = 1283 hu = 2.99e+00 c values at t = 7: Species 1 -1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 -1.18601 1.19352 1.20945 1.22822 1.24445 1.25222 -1.17981 1.18594 1.19917 1.2148 1.22822 1.23454 -1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 -1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 -1.16363 1.16615 1.17232 1.17981 1.18601 1.18855 +1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 +1.18601 1.19352 1.20945 1.22822 1.24445 1.25222 +1.17981 1.18594 1.19917 1.2148 1.22822 1.23454 +1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 +1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 +1.16363 1.16615 1.17232 1.17981 1.18601 1.18855 Species 2 -1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 -1.18601 1.19352 1.20945 1.22823 1.24445 1.25222 -1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 -1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 -1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 -1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 +1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 +1.18601 1.19352 1.20945 1.22823 1.24445 1.25222 +1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 +1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 +1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 +1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 Species 3 -1.18855 1.19684 1.21416 1.23454 1.25223 1.26083 -1.18601 1.19352 1.20945 1.22823 1.24445 1.25223 -1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 -1.17232 1.17693 1.1871 1.19917 1.20945 1.21416 -1.16615 1.16941 1.17693 1.18594 1.19352 1.19684 -1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 +1.18855 1.19684 1.21416 1.23454 1.25223 1.26083 +1.18601 1.19352 1.20945 1.22823 1.24445 1.25223 +1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 +1.17232 1.17693 1.1871 1.19917 1.20945 1.21416 +1.16615 1.16941 1.17693 1.18594 1.19352 1.19684 +1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 Species 4 -35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 -35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 -35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 -35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 -34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 -34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 +35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 +35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 +35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 +35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 +34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 +34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 Species 5 -35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 -35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 -35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 -35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 -34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 -34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 +35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 +35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 +35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 +35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 +34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 +34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 Species 6 -35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 -35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 -35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 -35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 -34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 -34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 +35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 +35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 +35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 +35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 +34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 +34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 t = 8.00e+00 nst = 100 nfe = 0 nfi = 1798 nni = 1283 hu = 2.99e+00 @@ -367,75 +367,75 @@ t = 1.00e+01 nst = 101 nfe = 0 nfi = 1813 nni = 1293 hu = 6.31e+00 c values at t = 10: Species 1 -1.18839 1.19667 1.214 1.23437 1.25206 1.26066 -1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 -1.17965 1.18578 1.199 1.21463 1.22806 1.23437 -1.17216 1.17677 1.18693 1.199 1.20929 1.214 -1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 -1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 +1.18839 1.19667 1.214 1.23437 1.25206 1.26066 +1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 +1.17965 1.18578 1.199 1.21463 1.22806 1.23437 +1.17216 1.17677 1.18693 1.199 1.20929 1.214 +1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 +1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 Species 2 -1.18839 1.19667 1.214 1.23437 1.25206 1.26066 -1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 -1.17965 1.18578 1.199 1.21463 1.22806 1.23437 -1.17216 1.17677 1.18693 1.199 1.20929 1.214 -1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 -1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 +1.18839 1.19667 1.214 1.23437 1.25206 1.26066 +1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 +1.17965 1.18578 1.199 1.21463 1.22806 1.23437 +1.17216 1.17677 1.18693 1.199 1.20929 1.214 +1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 +1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 Species 3 -1.18839 1.19667 1.214 1.23437 1.25206 1.26066 -1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 -1.17965 1.18578 1.199 1.21463 1.22806 1.23437 -1.17216 1.17677 1.18693 1.199 1.20929 1.214 -1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 -1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 +1.18839 1.19667 1.214 1.23437 1.25206 1.26066 +1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 +1.17965 1.18578 1.199 1.21463 1.22806 1.23437 +1.17216 1.17677 1.18693 1.199 1.20929 1.214 +1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 +1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 Species 4 -35650.8 35899 36418.5 37029.4 37559.6 37817.5 -35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 -35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 -35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 -34978.7 35076.6 35302.1 35572.4 35799.7 35899 -34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 +35650.8 35899 36418.5 37029.4 37559.6 37817.5 +35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 +35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 +35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 +34978.7 35076.6 35302.1 35572.4 35799.7 35899 +34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 Species 5 -35650.8 35899 36418.5 37029.4 37559.6 37817.5 -35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 -35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 -35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 -34978.7 35076.6 35302.1 35572.4 35799.7 35899 -34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 +35650.8 35899 36418.5 37029.4 37559.6 37817.5 +35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 +35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 +35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 +34978.7 35076.6 35302.1 35572.4 35799.7 35899 +34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 Species 6 -35650.8 35899 36418.5 37029.4 37559.6 37817.5 -35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 -35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 -35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 -34978.7 35076.6 35302.1 35572.4 35799.7 35899 -34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 +35650.8 35899 36418.5 37029.4 37559.6 37817.5 +35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 +35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 +35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 +34978.7 35076.6 35302.1 35572.4 35799.7 35899 +34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 148 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 101 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 1813 - Number of f-s (SPGMR) = 4359 - Number of f-s (TOTAL) = 4359 - Number of setups = 72 - Number of nonlinear iterations = 1293 - Number of linear iterations = 4359 - Number of preconditioner evaluations = 72 - Number of preconditioner solves = 5618 - Number of error test failures = 1 - Number of nonlinear conv. failures = 25 - Number of linear convergence failures = 238 - Average Krylov subspace dimension = 3.371 + ARKStep real workspace length = 3790 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 101 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 1813 + Number of f-s (SPGMR) = 4359 + Number of f-s (TOTAL) = 4359 + Number of setups = 72 + Number of nonlinear iterations = 1293 + Number of linear iterations = 4359 + Number of preconditioner evaluations = 72 + Number of preconditioner solves = 5618 + Number of error test failures = 1 + Number of nonlinear conv. failures = 25 + Number of linear convergence failures = 238 + Average Krylov subspace dimension = 3.371 ---------------------------------------------------------------------------- @@ -487,24 +487,24 @@ t = 1.00e+01 nst = 101 nfe = 0 nfi = 1813 nni = 1293 hu = 6.31e+00 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 154 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 101 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 1813 - Number of f-s (SPGMR) = 4359 - Number of f-s (TOTAL) = 4359 - Number of setups = 72 - Number of nonlinear iterations = 1293 - Number of linear iterations = 4359 - Number of preconditioner evaluations = 72 - Number of preconditioner solves = 5618 - Number of error test failures = 1 - Number of nonlinear conv. failures = 25 - Number of linear convergence failures = 238 - Average Krylov subspace dimension = 3.371 + ARKStep real workspace length = 3790 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 101 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 1813 + Number of f-s (SPGMR) = 4359 + Number of f-s (TOTAL) = 4359 + Number of setups = 72 + Number of nonlinear iterations = 1293 + Number of linear iterations = 4359 + Number of preconditioner evaluations = 72 + Number of preconditioner solves = 5618 + Number of error test failures = 1 + Number of nonlinear conv. failures = 25 + Number of linear convergence failures = 238 + Average Krylov subspace dimension = 3.371 ---------------------------------------------------------------------------- @@ -556,24 +556,24 @@ t = 1.00e+01 nst = 234 nfe = 0 nfi = 4045 nni = 2856 hu = 3.93e-01 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 160 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 234 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 4045 - Number of f-s (SPGMR) = 10634 - Number of f-s (TOTAL) = 10634 - Number of setups = 277 - Number of nonlinear iterations = 2856 - Number of linear iterations = 10634 - Number of preconditioner evaluations = 277 - Number of preconditioner solves = 13350 - Number of error test failures = 1 - Number of nonlinear conv. failures = 166 - Number of linear convergence failures = 1036 - Average Krylov subspace dimension = 3.723 + ARKStep real workspace length = 3790 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 234 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 4045 + Number of f-s (SPGMR) = 10634 + Number of f-s (TOTAL) = 10634 + Number of setups = 277 + Number of nonlinear iterations = 2856 + Number of linear iterations = 10634 + Number of preconditioner evaluations = 277 + Number of preconditioner solves = 13350 + Number of error test failures = 1 + Number of nonlinear conv. failures = 166 + Number of linear convergence failures = 1036 + Average Krylov subspace dimension = 3.723 ---------------------------------------------------------------------------- @@ -625,24 +625,24 @@ t = 1.00e+01 nst = 234 nfe = 0 nfi = 4045 nni = 2856 hu = 3.93e-01 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 166 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 234 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 4045 - Number of f-s (SPGMR) = 10633 - Number of f-s (TOTAL) = 10633 - Number of setups = 277 - Number of nonlinear iterations = 2856 - Number of linear iterations = 10633 - Number of preconditioner evaluations = 277 - Number of preconditioner solves = 13349 - Number of error test failures = 1 - Number of nonlinear conv. failures = 166 - Number of linear convergence failures = 1036 - Average Krylov subspace dimension = 3.723 + ARKStep real workspace length = 3790 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 234 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 4045 + Number of f-s (SPGMR) = 10633 + Number of f-s (TOTAL) = 10633 + Number of setups = 277 + Number of nonlinear iterations = 2856 + Number of linear iterations = 10633 + Number of preconditioner evaluations = 277 + Number of preconditioner solves = 13349 + Number of error test failures = 1 + Number of nonlinear conv. failures = 166 + Number of linear convergence failures = 1036 + Average Krylov subspace dimension = 3.723 ---------------------------------------------------------------------------- diff --git a/examples/arkode/C_serial/ark_KrylovDemo_prec_2.out b/examples/arkode/C_serial/ark_KrylovDemo_prec_2.out index 8a09c9a96d..1c5be0014a 100644 --- a/examples/arkode/C_serial/ark_KrylovDemo_prec_2.out +++ b/examples/arkode/C_serial/ark_KrylovDemo_prec_2.out @@ -10,9 +10,9 @@ b parameter = 1 Diffusion coefficients: Dprey = 1 Dpred = 0.5 Rate parameter alpha = 1 -Mesh dimensions (mx,my) are 6, 6. Total system size is neq = 216 +Mesh dimensions (mx,my) are 6, 6. Total system size is neq = 216 -Tolerances: reltol = 1e-05, abstol = 1e-05 +Tolerances: reltol = 1e-05, abstol = 1e-05 Preconditioning uses a product of: (1) Gauss-Seidel iterations with itmax = 5 iterations, and @@ -31,52 +31,52 @@ Gram-Schmidt method type is gstype = SUN_MODIFIED_GS c values at t = 0: Species 1 -10 10 10 10 10 10 -10 10.1678 10.3775 10.3775 10.1678 10 -10 10.3775 10.8493 10.8493 10.3775 10 -10 10.3775 10.8493 10.8493 10.3775 10 -10 10.1678 10.3775 10.3775 10.1678 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.1678 10.3775 10.3775 10.1678 10 +10 10.3775 10.8493 10.8493 10.3775 10 +10 10.3775 10.8493 10.8493 10.3775 10 +10 10.1678 10.3775 10.3775 10.1678 10 +10 10 10 10 10 10 Species 2 -10 10 10 10 10 10 -10 10.3355 10.755 10.755 10.3355 10 -10 10.755 11.6987 11.6987 10.755 10 -10 10.755 11.6987 11.6987 10.755 10 -10 10.3355 10.755 10.755 10.3355 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.3355 10.755 10.755 10.3355 10 +10 10.755 11.6987 11.6987 10.755 10 +10 10.755 11.6987 11.6987 10.755 10 +10 10.3355 10.755 10.755 10.3355 10 +10 10 10 10 10 10 Species 3 -10 10 10 10 10 10 -10 10.5033 11.1325 11.1325 10.5033 10 -10 11.1325 12.548 12.548 11.1325 10 -10 11.1325 12.548 12.548 11.1325 10 -10 10.5033 11.1325 11.1325 10.5033 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.5033 11.1325 11.1325 10.5033 10 +10 11.1325 12.548 12.548 11.1325 10 +10 11.1325 12.548 12.548 11.1325 10 +10 10.5033 11.1325 11.1325 10.5033 10 +10 10 10 10 10 10 Species 4 -10 10 10 10 10 10 -10 10.6711 11.5099 11.5099 10.6711 10 -10 11.5099 13.3974 13.3974 11.5099 10 -10 11.5099 13.3974 13.3974 11.5099 10 -10 10.6711 11.5099 11.5099 10.6711 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.6711 11.5099 11.5099 10.6711 10 +10 11.5099 13.3974 13.3974 11.5099 10 +10 11.5099 13.3974 13.3974 11.5099 10 +10 10.6711 11.5099 11.5099 10.6711 10 +10 10 10 10 10 10 Species 5 -10 10 10 10 10 10 -10 10.8389 11.8874 11.8874 10.8389 10 -10 11.8874 14.2467 14.2467 11.8874 10 -10 11.8874 14.2467 14.2467 11.8874 10 -10 10.8389 11.8874 11.8874 10.8389 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.8389 11.8874 11.8874 10.8389 10 +10 11.8874 14.2467 14.2467 11.8874 10 +10 11.8874 14.2467 14.2467 11.8874 10 +10 10.8389 11.8874 11.8874 10.8389 10 +10 10 10 10 10 10 Species 6 -10 10 10 10 10 10 -10 11.0066 12.2649 12.2649 11.0066 10 -10 12.2649 15.0961 15.0961 12.2649 10 -10 12.2649 15.0961 15.0961 12.2649 10 -10 11.0066 12.2649 12.2649 11.0066 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 11.0066 12.2649 12.2649 11.0066 10 +10 12.2649 15.0961 15.0961 12.2649 10 +10 12.2649 15.0961 15.0961 12.2649 10 +10 11.0066 12.2649 12.2649 11.0066 10 +10 10 10 10 10 10 t = 1.00e-08 nst = 3 nfe = 0 nfi = 45 nni = 27 hu = 6.86e-08 @@ -87,52 +87,52 @@ t = 1.00e-06 nst = 4 nfe = 0 nfi = 77 nni = 49 hu = 1.20e-06 c values at t = 1e-06: Species 1 -9.99991 9.99992 9.99993 9.99993 9.99993 9.99992 -9.99992 10.1677 10.3774 10.3774 10.1677 9.99993 -9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 -9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 -9.99992 10.1677 10.3774 10.3774 10.1677 9.99992 -9.99991 9.99992 9.99993 9.99993 9.99992 9.99991 +9.99991 9.99992 9.99993 9.99993 9.99993 9.99992 +9.99992 10.1677 10.3774 10.3774 10.1677 9.99993 +9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 +9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 +9.99992 10.1677 10.3774 10.3774 10.1677 9.99992 +9.99991 9.99992 9.99993 9.99993 9.99992 9.99991 Species 2 -9.99991 9.99993 9.99995 9.99995 9.99993 9.99992 -9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 -9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 -9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 -9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 -9.99991 9.99993 9.99995 9.99995 9.99993 9.99991 +9.99991 9.99993 9.99995 9.99995 9.99993 9.99992 +9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 +9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 +9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 +9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 +9.99991 9.99993 9.99995 9.99995 9.99993 9.99991 Species 3 -9.99991 9.99994 9.99997 9.99997 9.99994 9.99992 -9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 -9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 -9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 -9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 -9.99991 9.99994 9.99997 9.99997 9.99994 9.99991 +9.99991 9.99994 9.99997 9.99997 9.99994 9.99992 +9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 +9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 +9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 +9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 +9.99991 9.99994 9.99997 9.99997 9.99994 9.99991 Species 4 -13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 -13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 -13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 -13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 -13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 -13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 +13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 +13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 +13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 +13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 +13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 +13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 Species 5 -13.4981 13.4981 13.4982 13.4981 13.4981 13.4981 -13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 -13.4982 16.4131 20.2351 20.2351 16.4131 13.4981 -13.4982 16.4131 20.2351 20.2351 16.4131 13.4982 -13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 -13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 +13.4981 13.4981 13.4982 13.4981 13.4981 13.4981 +13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 +13.4982 16.4131 20.2351 20.2351 16.4131 13.4981 +13.4982 16.4131 20.2351 20.2351 16.4131 13.4982 +13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 +13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 Species 6 -13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 -13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 -13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 -13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 -13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 -13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 +13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 +13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 +13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 +13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 +13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 +13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 t = 1.00e-05 nst = 12 nfe = 0 nfi = 197 nni = 129 hu = 1.19e-06 @@ -143,52 +143,52 @@ t = 1.00e-03 nst = 46 nfe = 0 nfi = 820 nni = 582 hu = 8.40e-03 c values at t = 0.001: Species 1 -9.90702 9.91664 9.92836 9.93033 9.92253 9.91674 -9.91472 10.0747 10.2769 10.2785 10.0795 9.92253 -9.92446 10.2748 10.7181 10.7194 10.2785 9.93033 -9.92445 10.2744 10.7173 10.7181 10.2769 9.92836 -9.91469 10.0734 10.2744 10.2748 10.0747 9.91664 -9.90697 9.91469 9.92445 9.92446 9.91472 9.90702 +9.90702 9.91664 9.92836 9.93033 9.92253 9.91674 +9.91472 10.0747 10.2769 10.2785 10.0795 9.92253 +9.92446 10.2748 10.7181 10.7194 10.2785 9.93033 +9.92445 10.2744 10.7173 10.7181 10.2769 9.92836 +9.91469 10.0734 10.2744 10.2748 10.0747 9.91664 +9.90697 9.91469 9.92445 9.92446 9.91472 9.90702 Species 2 -9.90742 9.92474 9.94622 9.94819 9.93064 9.91713 -9.92282 10.2412 10.644 10.6457 10.2461 9.93064 -9.94232 10.6419 11.5267 11.5281 10.6457 9.94819 -9.94231 10.6415 11.5258 11.5267 10.644 9.94622 -9.92279 10.24 10.6415 10.6419 10.2412 9.92474 -9.90737 9.92279 9.94231 9.94232 9.92282 9.90742 +9.90742 9.92474 9.94622 9.94819 9.93064 9.91713 +9.92282 10.2412 10.644 10.6457 10.2461 9.93064 +9.94232 10.6419 11.5267 11.5281 10.6457 9.94819 +9.94231 10.6415 11.5258 11.5267 10.644 9.94622 +9.92279 10.24 10.6415 10.6419 10.2412 9.92474 +9.90737 9.92279 9.94231 9.94232 9.92282 9.90742 Species 3 -9.90781 9.93284 9.96408 9.96605 9.93874 9.91752 -9.93092 10.4078 11.0109 11.0127 10.4127 9.93874 -9.96017 11.0088 12.3339 12.3354 11.0127 9.96605 -9.96016 11.0083 12.333 12.3339 11.0109 9.96408 -9.93089 10.4065 11.0083 11.0088 10.4078 9.93284 -9.90776 9.93089 9.96016 9.96017 9.93092 9.90781 +9.90781 9.93284 9.96408 9.96605 9.93874 9.91752 +9.93092 10.4078 11.0109 11.0127 10.4127 9.93874 +9.96017 11.0088 12.3339 12.3354 11.0127 9.96605 +9.96016 11.0083 12.333 12.3339 11.0109 9.96408 +9.93089 10.4065 11.0083 11.0088 10.4078 9.93284 +9.90776 9.93089 9.96016 9.96017 9.93092 9.90781 Species 4 -297231 297750 298393 298451 297925 297520 -297692 307245 319327 319378 307390 297925 -298276 319264 345799 345840 319378 298451 -298276 319252 345772 345799 319327 298393 -297691 307208 319252 319264 307245 297750 -297229 297691 298276 298276 297692 297231 +297231 297750 298393 298451 297925 297520 +297692 307245 319327 319378 307390 297925 +298276 319264 345799 345840 319378 298451 +298276 319252 345772 345799 319327 298393 +297691 307208 319252 319264 307245 297750 +297229 297691 298276 298276 297692 297231 Species 5 -297231 297750 298393 298451 297925 297520 -297692 307245 319327 319378 307390 297925 -298276 319264 345799 345840 319378 298451 -298276 319252 345772 345799 319327 298393 -297691 307208 319252 319264 307245 297750 -297229 297691 298276 298276 297692 297231 +297231 297750 298393 298451 297925 297520 +297692 307245 319327 319378 307390 297925 +298276 319264 345799 345840 319378 298451 +298276 319252 345772 345799 319327 298393 +297691 307208 319252 319264 307245 297750 +297229 297691 298276 298276 297692 297231 Species 6 -297231 297750 298393 298451 297925 297520 -297692 307245 319327 319378 307390 297925 -298276 319264 345799 345840 319378 298451 -298276 319252 345772 345799 319327 298393 -297691 307208 319252 319264 307245 297750 -297229 297691 298276 298276 297692 297231 +297231 297750 298393 298451 297925 297520 +297692 307245 319327 319378 307390 297925 +298276 319264 345799 345840 319378 298451 +298276 319252 345772 345799 319327 298393 +297691 307208 319252 319264 307245 297750 +297229 297691 298276 298276 297692 297231 t = 1.00e-02 nst = 47 nfe = 0 nfi = 840 nni = 597 hu = 1.32e-02 @@ -199,52 +199,52 @@ t = 1.00e+00 nst = 69 nfe = 0 nfi = 1259 nni = 904 hu = 5.51e-02 c values at t = 1: Species 1 -1.58852 1.59924 1.62152 1.64765 1.67037 1.68149 -1.58533 1.59504 1.61548 1.63952 1.66033 1.67037 -1.57757 1.58548 1.6024 1.62235 1.63952 1.64765 -1.56821 1.57412 1.58706 1.6024 1.61548 1.62152 -1.56049 1.56463 1.57412 1.58548 1.59504 1.59924 -1.55733 1.56049 1.56821 1.57757 1.58533 1.58852 +1.58852 1.59924 1.62152 1.64765 1.67037 1.68149 +1.58533 1.59504 1.61548 1.63952 1.66033 1.67037 +1.57757 1.58548 1.6024 1.62235 1.63952 1.64765 +1.56821 1.57412 1.58706 1.6024 1.61548 1.62152 +1.56049 1.56463 1.57412 1.58548 1.59504 1.59924 +1.55733 1.56049 1.56821 1.57757 1.58533 1.58852 Species 2 -1.59067 1.60141 1.62371 1.64987 1.67262 1.68376 -1.58749 1.5972 1.61767 1.64174 1.66257 1.67262 -1.57972 1.58763 1.60457 1.62455 1.64174 1.64987 -1.57034 1.57627 1.58922 1.60457 1.61767 1.62371 -1.56261 1.56677 1.57627 1.58763 1.5972 1.60141 -1.55945 1.56261 1.57034 1.57972 1.58749 1.59067 +1.59067 1.60141 1.62371 1.64987 1.67262 1.68376 +1.58749 1.5972 1.61767 1.64174 1.66257 1.67262 +1.57972 1.58763 1.60457 1.62455 1.64174 1.64987 +1.57034 1.57627 1.58922 1.60457 1.61767 1.62371 +1.56261 1.56677 1.57627 1.58763 1.5972 1.60141 +1.55945 1.56261 1.57034 1.57972 1.58749 1.59067 Species 3 -1.59271 1.60346 1.62579 1.65198 1.67474 1.6859 -1.58952 1.59925 1.61974 1.64383 1.66469 1.67474 -1.58174 1.58967 1.60662 1.62662 1.64383 1.65198 -1.57236 1.57829 1.59126 1.60662 1.61974 1.62579 -1.56462 1.56878 1.57829 1.58967 1.59925 1.60346 -1.56146 1.56462 1.57236 1.58174 1.58952 1.59271 +1.59271 1.60346 1.62579 1.65198 1.67474 1.6859 +1.58952 1.59925 1.61974 1.64383 1.66469 1.67474 +1.58174 1.58967 1.60662 1.62662 1.64383 1.65198 +1.57236 1.57829 1.59126 1.60662 1.61974 1.62579 +1.56462 1.56878 1.57829 1.58967 1.59925 1.60346 +1.56146 1.56462 1.57236 1.58174 1.58952 1.59271 Species 4 -47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 -47622.9 47914.2 48528 49249.8 49874.6 50175.6 -47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 -47108.7 47286.2 47674.7 48135.1 48528 48709.2 -46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 -46782 46876.8 47108.7 47389.8 47622.9 47718.5 +47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 +47622.9 47914.2 48528 49249.8 49874.6 50175.6 +47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 +47108.7 47286.2 47674.7 48135.1 48528 48709.2 +46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 +46782 46876.8 47108.7 47389.8 47622.9 47718.5 Species 5 -47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 -47622.9 47914.2 48528 49249.8 49874.6 50175.6 -47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 -47108.7 47286.2 47674.7 48135.1 48528 48709.2 -46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 -46782 46876.8 47108.7 47389.8 47622.9 47718.5 +47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 +47622.9 47914.2 48528 49249.8 49874.6 50175.6 +47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 +47108.7 47286.2 47674.7 48135.1 48528 48709.2 +46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 +46782 46876.8 47108.7 47389.8 47622.9 47718.5 Species 6 -47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 -47622.9 47914.2 48528 49249.8 49874.6 50175.6 -47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 -47108.7 47286.2 47674.7 48135.1 48528 48709.2 -46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 -46782 46876.8 47108.7 47389.8 47622.9 47718.5 +47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 +47622.9 47914.2 48528 49249.8 49874.6 50175.6 +47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 +47108.7 47286.2 47674.7 48135.1 48528 48709.2 +46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 +46782 46876.8 47108.7 47389.8 47622.9 47718.5 t = 2.00e+00 nst = 81 nfe = 0 nfi = 1463 nni = 1048 hu = 1.54e-01 @@ -255,52 +255,52 @@ t = 4.00e+00 nst = 95 nfe = 0 nfi = 1708 nni = 1221 hu = 2.69e-01 c values at t = 4: Species 1 -1.19535 1.20368 1.2211 1.24157 1.25935 1.268 -1.1928 1.20035 1.21636 1.23523 1.25154 1.25935 -1.18657 1.19274 1.20602 1.22173 1.23523 1.24157 -1.17904 1.18368 1.19389 1.20602 1.21636 1.2211 -1.17284 1.17613 1.18368 1.19274 1.20035 1.20368 -1.17032 1.17284 1.17904 1.18657 1.1928 1.19535 +1.19535 1.20368 1.2211 1.24157 1.25935 1.268 +1.1928 1.20035 1.21636 1.23523 1.25154 1.25935 +1.18657 1.19274 1.20602 1.22173 1.23523 1.24157 +1.17904 1.18368 1.19389 1.20602 1.21636 1.2211 +1.17284 1.17613 1.18368 1.19274 1.20035 1.20368 +1.17032 1.17284 1.17904 1.18657 1.1928 1.19535 Species 2 -1.19538 1.20371 1.22113 1.24161 1.25938 1.26804 -1.19284 1.20038 1.21639 1.23526 1.25157 1.25938 -1.1866 1.19277 1.20606 1.22177 1.23526 1.24161 -1.17908 1.18371 1.19393 1.20606 1.21639 1.22113 -1.17288 1.17616 1.18371 1.19277 1.20038 1.20371 -1.17035 1.17288 1.17908 1.1866 1.19284 1.19538 +1.19538 1.20371 1.22113 1.24161 1.25938 1.26804 +1.19284 1.20038 1.21639 1.23526 1.25157 1.25938 +1.1866 1.19277 1.20606 1.22177 1.23526 1.24161 +1.17908 1.18371 1.19393 1.20606 1.21639 1.22113 +1.17288 1.17616 1.18371 1.19277 1.20038 1.20371 +1.17035 1.17288 1.17908 1.1866 1.19284 1.19538 Species 3 -1.19542 1.20374 1.22116 1.24164 1.25942 1.26807 -1.19287 1.20042 1.21643 1.2353 1.25161 1.25942 -1.18663 1.1928 1.20609 1.2218 1.2353 1.24164 -1.17911 1.18374 1.19396 1.20609 1.21643 1.22116 -1.17291 1.17619 1.18374 1.1928 1.20042 1.20374 -1.17039 1.17291 1.17911 1.18663 1.19287 1.19542 +1.19542 1.20374 1.22116 1.24164 1.25942 1.26807 +1.19287 1.20042 1.21643 1.2353 1.25161 1.25942 +1.18663 1.1928 1.20609 1.2218 1.2353 1.24164 +1.17911 1.18374 1.19396 1.20609 1.21643 1.22116 +1.17291 1.17619 1.18374 1.1928 1.20042 1.20374 +1.17039 1.17291 1.17911 1.18663 1.19287 1.19542 Species 4 -35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 -35597.2 35782 36180.5 36651.6 37056.3 37246.5 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 +35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35597.2 35782 36180.5 36651.6 37056.3 37246.5 +35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.4 35782 36010.4 36110.2 +35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 Species 5 -35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 -35597.2 35782 36180.5 36651.6 37056.3 37246.5 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 +35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35597.2 35782 36180.5 36651.6 37056.3 37246.5 +35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.4 35782 36010.4 36110.2 +35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 Species 6 -35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 -35597.2 35782 36180.5 36651.6 37056.3 37246.5 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 +35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35597.2 35782 36180.5 36651.6 37056.3 37246.5 +35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.4 35782 36010.4 36110.2 +35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 t = 5.00e+00 nst = 98 nfe = 0 nfi = 1767 nni = 1262 hu = 3.36e-01 @@ -311,52 +311,52 @@ t = 7.00e+00 nst = 100 nfe = 0 nfi = 1798 nni = 1283 hu = 2.99e+00 c values at t = 7: Species 1 -1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 -1.18601 1.19352 1.20945 1.22822 1.24445 1.25222 -1.17981 1.18594 1.19917 1.2148 1.22822 1.23454 -1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 -1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 -1.16363 1.16615 1.17232 1.17981 1.18601 1.18855 +1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 +1.18601 1.19352 1.20945 1.22822 1.24445 1.25222 +1.17981 1.18594 1.19917 1.2148 1.22822 1.23454 +1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 +1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 +1.16363 1.16615 1.17232 1.17981 1.18601 1.18855 Species 2 -1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 -1.18601 1.19352 1.20945 1.22823 1.24445 1.25222 -1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 -1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 -1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 -1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 +1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 +1.18601 1.19352 1.20945 1.22823 1.24445 1.25222 +1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 +1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 +1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 +1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 Species 3 -1.18855 1.19684 1.21416 1.23454 1.25223 1.26083 -1.18601 1.19352 1.20945 1.22823 1.24445 1.25223 -1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 -1.17232 1.17693 1.1871 1.19917 1.20945 1.21416 -1.16615 1.16941 1.17693 1.18594 1.19352 1.19684 -1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 +1.18855 1.19684 1.21416 1.23454 1.25223 1.26083 +1.18601 1.19352 1.20945 1.22823 1.24445 1.25223 +1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 +1.17232 1.17693 1.1871 1.19917 1.20945 1.21416 +1.16615 1.16941 1.17693 1.18594 1.19352 1.19684 +1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 Species 4 -35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 -35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 -35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 -35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 -34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 -34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 +35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 +35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 +35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 +35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 +34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 +34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 Species 5 -35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 -35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 -35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 -35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 -34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 -34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 +35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 +35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 +35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 +35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 +34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 +34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 Species 6 -35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 -35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 -35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 -35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 -34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 -34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 +35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 +35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 +35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 +35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 +34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 +34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 t = 8.00e+00 nst = 100 nfe = 0 nfi = 1798 nni = 1283 hu = 2.99e+00 @@ -367,75 +367,75 @@ t = 1.00e+01 nst = 101 nfe = 0 nfi = 1813 nni = 1293 hu = 6.31e+00 c values at t = 10: Species 1 -1.18839 1.19667 1.214 1.23437 1.25206 1.26066 -1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 -1.17965 1.18578 1.199 1.21463 1.22806 1.23437 -1.17216 1.17677 1.18693 1.199 1.20929 1.214 -1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 -1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 +1.18839 1.19667 1.214 1.23437 1.25206 1.26066 +1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 +1.17965 1.18578 1.199 1.21463 1.22806 1.23437 +1.17216 1.17677 1.18693 1.199 1.20929 1.214 +1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 +1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 Species 2 -1.18839 1.19667 1.214 1.23437 1.25206 1.26066 -1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 -1.17965 1.18578 1.199 1.21463 1.22806 1.23437 -1.17216 1.17677 1.18693 1.199 1.20929 1.214 -1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 -1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 +1.18839 1.19667 1.214 1.23437 1.25206 1.26066 +1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 +1.17965 1.18578 1.199 1.21463 1.22806 1.23437 +1.17216 1.17677 1.18693 1.199 1.20929 1.214 +1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 +1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 Species 3 -1.18839 1.19667 1.214 1.23437 1.25206 1.26066 -1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 -1.17965 1.18578 1.199 1.21463 1.22806 1.23437 -1.17216 1.17677 1.18693 1.199 1.20929 1.214 -1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 -1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 +1.18839 1.19667 1.214 1.23437 1.25206 1.26066 +1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 +1.17965 1.18578 1.199 1.21463 1.22806 1.23437 +1.17216 1.17677 1.18693 1.199 1.20929 1.214 +1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 +1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 Species 4 -35650.8 35899 36418.5 37029.4 37559.6 37817.5 -35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 -35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 -35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 -34978.7 35076.6 35302.1 35572.4 35799.7 35899 -34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 +35650.8 35899 36418.5 37029.4 37559.6 37817.5 +35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 +35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 +35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 +34978.7 35076.6 35302.1 35572.4 35799.7 35899 +34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 Species 5 -35650.8 35899 36418.5 37029.4 37559.6 37817.5 -35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 -35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 -35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 -34978.7 35076.6 35302.1 35572.4 35799.7 35899 -34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 +35650.8 35899 36418.5 37029.4 37559.6 37817.5 +35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 +35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 +35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 +34978.7 35076.6 35302.1 35572.4 35799.7 35899 +34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 Species 6 -35650.8 35899 36418.5 37029.4 37559.6 37817.5 -35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 -35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 -35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 -34978.7 35076.6 35302.1 35572.4 35799.7 35899 -34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 +35650.8 35899 36418.5 37029.4 37559.6 37817.5 +35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 +35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 +35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 +34978.7 35076.6 35302.1 35572.4 35799.7 35899 +34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 148 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 101 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 1813 - Number of f-s (SPGMR) = 4359 - Number of f-s (TOTAL) = 4359 - Number of setups = 72 - Number of nonlinear iterations = 1293 - Number of linear iterations = 4359 - Number of preconditioner evaluations = 72 - Number of preconditioner solves = 5618 - Number of error test failures = 1 - Number of nonlinear conv. failures = 25 - Number of linear convergence failures = 238 - Average Krylov subspace dimension = 3.371 + ARKStep real workspace length = 3790 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 101 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 1813 + Number of f-s (SPGMR) = 4359 + Number of f-s (TOTAL) = 4359 + Number of setups = 72 + Number of nonlinear iterations = 1293 + Number of linear iterations = 4359 + Number of preconditioner evaluations = 72 + Number of preconditioner solves = 5618 + Number of error test failures = 1 + Number of nonlinear conv. failures = 25 + Number of linear convergence failures = 238 + Average Krylov subspace dimension = 3.371 ---------------------------------------------------------------------------- @@ -487,24 +487,24 @@ t = 1.00e+01 nst = 101 nfe = 0 nfi = 1813 nni = 1293 hu = 6.31e+00 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 154 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 101 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 1813 - Number of f-s (SPGMR) = 4359 - Number of f-s (TOTAL) = 4359 - Number of setups = 72 - Number of nonlinear iterations = 1293 - Number of linear iterations = 4359 - Number of preconditioner evaluations = 72 - Number of preconditioner solves = 5618 - Number of error test failures = 1 - Number of nonlinear conv. failures = 25 - Number of linear convergence failures = 238 - Average Krylov subspace dimension = 3.371 + ARKStep real workspace length = 3790 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 101 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 1813 + Number of f-s (SPGMR) = 4359 + Number of f-s (TOTAL) = 4359 + Number of setups = 72 + Number of nonlinear iterations = 1293 + Number of linear iterations = 4359 + Number of preconditioner evaluations = 72 + Number of preconditioner solves = 5618 + Number of error test failures = 1 + Number of nonlinear conv. failures = 25 + Number of linear convergence failures = 238 + Average Krylov subspace dimension = 3.371 ---------------------------------------------------------------------------- @@ -556,24 +556,24 @@ t = 1.00e+01 nst = 234 nfe = 0 nfi = 4045 nni = 2856 hu = 3.93e-01 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 160 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 234 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 4045 - Number of f-s (SPGMR) = 10634 - Number of f-s (TOTAL) = 10634 - Number of setups = 277 - Number of nonlinear iterations = 2856 - Number of linear iterations = 10634 - Number of preconditioner evaluations = 277 - Number of preconditioner solves = 13350 - Number of error test failures = 1 - Number of nonlinear conv. failures = 166 - Number of linear convergence failures = 1036 - Average Krylov subspace dimension = 3.723 + ARKStep real workspace length = 3790 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 234 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 4045 + Number of f-s (SPGMR) = 10634 + Number of f-s (TOTAL) = 10634 + Number of setups = 277 + Number of nonlinear iterations = 2856 + Number of linear iterations = 10634 + Number of preconditioner evaluations = 277 + Number of preconditioner solves = 13350 + Number of error test failures = 1 + Number of nonlinear conv. failures = 166 + Number of linear convergence failures = 1036 + Average Krylov subspace dimension = 3.723 ---------------------------------------------------------------------------- @@ -625,24 +625,24 @@ t = 1.00e+01 nst = 234 nfe = 0 nfi = 4045 nni = 2856 hu = 3.93e-01 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 166 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 234 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 4045 - Number of f-s (SPGMR) = 10633 - Number of f-s (TOTAL) = 10633 - Number of setups = 277 - Number of nonlinear iterations = 2856 - Number of linear iterations = 10633 - Number of preconditioner evaluations = 277 - Number of preconditioner solves = 13349 - Number of error test failures = 1 - Number of nonlinear conv. failures = 166 - Number of linear convergence failures = 1036 - Average Krylov subspace dimension = 3.723 + ARKStep real workspace length = 3790 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 234 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 4045 + Number of f-s (SPGMR) = 10633 + Number of f-s (TOTAL) = 10633 + Number of setups = 277 + Number of nonlinear iterations = 2856 + Number of linear iterations = 10633 + Number of preconditioner evaluations = 277 + Number of preconditioner solves = 13349 + Number of error test failures = 1 + Number of nonlinear conv. failures = 166 + Number of linear convergence failures = 1036 + Average Krylov subspace dimension = 3.723 ---------------------------------------------------------------------------- diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_arkstep_1.out b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_arkstep_1.out index 79e9246274..ade4792ef4 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_arkstep_1.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_arkstep_1.out @@ -2,14 +2,14 @@ Start ARKStep preallocation test Using DIRK method Using Newton nonlinear solver Using GMRES iterative linear solver - t u v u err v err + t u v u err v err ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 1.029860256095084e-04 1.224744870316961e+00 1.732050195224250e+00 7.854161765408207e-12 2.731148640577885e-14 - 1.634509895443788e-02 1.224717600094773e+00 1.716694985522809e+00 4.466385261636674e-09 6.044738709576336e-09 - 3.254871529235759e-02 1.224636741653238e+00 1.671973015366888e+00 8.026050712928168e-09 5.988021634095730e-09 + 1.634509831323043e-02 1.224717600096914e+00 1.716694986722200e+00 4.466384151413649e-09 6.044736933219497e-09 + 3.254871465408885e-02 1.224636741657479e+00 1.671973017680123e+00 8.026050268838958e-09 5.988020079783496e-09 ------------------------------------------------------------------------------------------------------------------------------ -Current time = 0.0325487152923576 +Current time = 0.0325487146540888 Steps = 3 Step attempts = 3 Stability limited steps = 0 @@ -18,8 +18,8 @@ Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 Initial step size = 0.000102986025609508 -Last step size = 0.0162036163379197 -Current step size = 0.0160003634180696 +Last step size = 0.0162036163408584 +Current step size = 0.0160003634285686 Explicit RHS fn evals = 0 Implicit RHS fn evals = 49 NLS iters = 31 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_erkstep_1.out b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_erkstep_1.out index 11002e04ca..07ee2d38c7 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_erkstep_1.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_erkstep_1.out @@ -1,12 +1,12 @@ Start ERKStep preallocation test - t u v u err v err + t u v u err v err ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 1.029860256095084e-04 1.224744870309106e+00 1.732050195224277e+00 2.220446049250313e-16 0.000000000000000e+00 - 1.606364534231249e-02 1.224718491293716e+00 1.717217032062862e+00 4.421219967909451e-08 2.910637308950470e-08 - 3.202338818315199e-02 1.224640124009817e+00 1.673862546151861e+00 8.746489865707474e-08 1.494766854737151e-07 + 1.606364533954449e-02 1.224718491293725e+00 1.717217032067952e+00 4.421219967909451e-08 2.910637331154931e-08 + 3.202338818037329e-02 1.224640124009836e+00 1.673862546161781e+00 8.746489865707474e-08 1.494766852516705e-07 ------------------------------------------------------------------------------------------------------------------------------ -Current time = 0.032023388183152 +Current time = 0.0320233881803733 Steps = 3 Step attempts = 4 Stability limited steps = 0 @@ -15,7 +15,7 @@ Error test fails = 1 NLS step fails = 0 Inequality constraint fails = 0 Initial step size = 0.000102986025609508 -Last step size = 0.0159597428408395 -Current step size = 0.0166588795525631 +Last step size = 0.0159597428408288 +Current step size = 0.0166588795523219 RHS fn evals = 19 End ERKStep preallocation test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep_1.out b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep_1.out index 441d468b29..091f1f64ad 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep_1.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep_1.out @@ -2,9 +2,9 @@ Start LSRKStep preallocation test t y y err --------------------------------------------------------------------- 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 - 6.103515625000001e-12 6.103515624999975e-12 2.504160057533580e-26 - 6.104125976562500e-08 6.104125976562474e-08 1.852884572118782e-22 - 1.281744384765625e-06 1.281744384765305e-06 3.822236174485030e-19 + 6.103515625000001e-12 6.103515624999988e-12 1.211690350419474e-26 + 6.104125976562500e-08 6.104125976562487e-08 5.293955920339377e-23 + 1.281744384765625e-06 1.281744384765308e-06 3.851882327638931e-19 --------------------------------------------------------------------- Current time = 1.28174438476563e-06 Steps = 3 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_sprkstep_1.out b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_sprkstep_1.out index 329037de9d..7985369f2f 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_sprkstep_1.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_sprkstep_1.out @@ -1,9 +1,9 @@ Start SPRKStep preallocation test - t q1 q2 q3 q4 + t q1 q2 q3 q4 ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 4.000000000000000e-01 0.000000000000000e+00 0.000000000000000e+00 2.000000000000000e+00 - 1.000000000000000e-03 3.999968750113932e-01 1.999994791691249e-03 -6.249954427477657e-03 1.999984375130207e+00 - 2.000000000000000e-03 3.999875001822874e-01 3.999958334163726e-03 -1.249963542950927e-02 1.999937502083256e+00 + 1.000000000000000e-03 3.999968750113932e-01 1.999994791691249e-03 -6.249954427477658e-03 1.999984375130207e+00 + 2.000000000000000e-03 3.999875001822874e-01 3.999958334163726e-03 -1.249963542950928e-02 1.999937502083256e+00 3.000000000000000e-03 3.999718759228028e-01 5.999859381323369e-03 -1.874876962886015e-02 1.999859385545991e+00 ------------------------------------------------------------------------------------------------------------------------------ Current time = 0.003 From 16fb3244efddc41fca3a7eb9db6fb273860fbb41 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 30 Jan 2026 10:13:19 -0500 Subject: [PATCH 074/298] Python bindings --- .../sundials4py/arkode/arkode_generated.hpp | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/bindings/sundials4py/arkode/arkode_generated.hpp b/bindings/sundials4py/arkode/arkode_generated.hpp index a494d031d4..ae68602b7e 100644 --- a/bindings/sundials4py/arkode/arkode_generated.hpp +++ b/bindings/sundials4py/arkode/arkode_generated.hpp @@ -500,6 +500,26 @@ m.def("ARKodeGetReturnFlagName", ARKodeGetReturnFlagName, nb::arg("flag")); m.def("ARKodeWriteParameters", ARKodeWriteParameters, nb::arg("arkode_mem"), nb::arg("fp")); +m.def( + "ARKodeGetStageIndex", + [](void* arkode_mem) -> std::tuple + { + auto ARKodeGetStageIndex_adapt_modifiable_immutable_to_return = + [](void* arkode_mem) -> std::tuple + { + int stage_adapt_modifiable; + int max_stages_adapt_modifiable; + + int r = ARKodeGetStageIndex(arkode_mem, &stage_adapt_modifiable, + &max_stages_adapt_modifiable); + return std::make_tuple(r, stage_adapt_modifiable, + max_stages_adapt_modifiable); + }; + + return ARKodeGetStageIndex_adapt_modifiable_immutable_to_return(arkode_mem); + }, + nb::arg("arkode_mem")); + m.def( "ARKodeGetNumExpSteps", [](void* arkode_mem) -> std::tuple @@ -674,6 +694,40 @@ m.def( }, nb::arg("arkode_mem")); +m.def( + "ARKodeGetLastTime", + [](void* arkode_mem) -> std::tuple + { + auto ARKodeGetLastTime_adapt_modifiable_immutable_to_return = + [](void* arkode_mem) -> std::tuple + { + sunrealtype tn_adapt_modifiable; + + int r = ARKodeGetLastTime(arkode_mem, &tn_adapt_modifiable); + return std::make_tuple(r, tn_adapt_modifiable); + }; + + return ARKodeGetLastTime_adapt_modifiable_immutable_to_return(arkode_mem); + }, + nb::arg("arkode_mem")); + +m.def( + "ARKodeGetLastState", + [](void* arkode_mem) -> std::tuple + { + auto ARKodeGetLastState_adapt_modifiable_immutable_to_return = + [](void* arkode_mem) -> std::tuple + { + N_Vector state_adapt_modifiable; + + int r = ARKodeGetLastState(arkode_mem, &state_adapt_modifiable); + return std::make_tuple(r, state_adapt_modifiable); + }; + + return ARKodeGetLastState_adapt_modifiable_immutable_to_return(arkode_mem); + }, + nb::arg("arkode_mem"), "nb::rv_policy::reference", nb::rv_policy::reference); + m.def( "ARKodeGetCurrentTime", [](void* arkode_mem) -> std::tuple From ee9170338f24dc8c6983af3be8aae85f795b544d Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 30 Jan 2026 11:01:28 -0500 Subject: [PATCH 075/298] Updated .out files for new integer workspace sizes --- .../F2003_parallel/ark_diag_kry_bbd_f2003.out | 21 ++++++++----------- .../F2003_serial/ark_diurnal_kry_bp_f2003.out | 9 ++++---- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/examples/arkode/F2003_parallel/ark_diag_kry_bbd_f2003.out b/examples/arkode/F2003_parallel/ark_diag_kry_bbd_f2003.out index 0e38735e74..e2a7727241 100644 --- a/examples/arkode/F2003_parallel/ark_diag_kry_bbd_f2003.out +++ b/examples/arkode/F2003_parallel/ark_diag_kry_bbd_f2003.out @@ -1,4 +1,4 @@ - + Diagonal test problem: neq = 40 nlocal = 10 @@ -9,7 +9,7 @@ ydot_i = -alpha*i * y_i (i = 1,...,neq) Method is DIRK/NEWTON/SPGMR Precond is band-block-diagonal, using ARKBBDPRE - + Preconditioning on left: t steps steps att. fe fi ------------------------------------------------- @@ -25,7 +25,7 @@ 1.000000 77 77 0 974 ------------------------------------------------- Max. absolute error is 4.66E-09 - + Final Solver Statistics: Internal solver steps = 77 (attempted = 77) Total explicit RHS evals = 0 @@ -38,13 +38,13 @@ Max. absolute error is 4.66E-09 Total Convergence Failures - Nonlinear = 0 - Linear = 0 Total number of error test failures = 0 - Main solver real/int workspace sizes = 918 291 + Main solver real/int workspace sizes = 918 285 Linear solver real/int workspace sizes = 535 126 BBD preconditioner real/int workspace sizes = 160 72 Total number of g evals = 4 - - - + + + Preconditioning on right: t steps steps att. fe fi ------------------------------------------------- @@ -60,7 +60,7 @@ Max. absolute error is 4.66E-09 1.000000 77 77 0 974 ------------------------------------------------- Max. absolute error is 4.66E-09 - + Final Solver Statistics: Internal solver steps = 77 (attempted = 77) Total explicit RHS evals = 0 @@ -73,10 +73,7 @@ Max. absolute error is 4.66E-09 Total Convergence Failures - Nonlinear = 0 - Linear = 0 Total number of error test failures = 0 - Main solver real/int workspace sizes = 918 297 + Main solver real/int workspace sizes = 918 285 Linear solver real/int workspace sizes = 535 126 BBD preconditioner real/int workspace sizes = 160 72 Total number of g evals = 4 - - - diff --git a/examples/arkode/F2003_serial/ark_diurnal_kry_bp_f2003.out b/examples/arkode/F2003_serial/ark_diurnal_kry_bp_f2003.out index e8d4b2eaf0..8d4289e8cd 100644 --- a/examples/arkode/F2003_serial/ark_diurnal_kry_bp_f2003.out +++ b/examples/arkode/F2003_serial/ark_diurnal_kry_bp_f2003.out @@ -1,6 +1,6 @@ - + Finished initialization, starting time steps - + t c1 (bottom left middle top right) | lnst lnst_att lh t c2 (bottom left middle top right) | lnst lnst_att lh ---------------------------------------------------------------------------------------- @@ -29,7 +29,7 @@ 8.640000E+04 9.130832E-03 -2.882353E-03 1.078363E-02 198 213 2.374350E+03 5.092611E+11 5.754304E+11 5.984451E+11 ---------------------------------------------------------------------------------------- - + General Solver Stats: Total internal steps taken = 198 Total internal steps attempts = 213 @@ -43,8 +43,7 @@ Avg Krylov subspace dim = 3.004963E+00 Num nonlinear solver fails = 0 Num linear solver fails = 333 - main solver real/int workspace sizes = 3918 150 + main solver real/int workspace sizes = 3918 144 linear solver real/int workspace sizes = 2455 42 ARKBandPre real/int workspace sizes = 2800 622 ARKBandPre number of f evaluations = 20 - From 29c3beaf5e0bf735c29bfaee1064d2e026d09040 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 30 Jan 2026 12:44:09 -0500 Subject: [PATCH 076/298] Fixed approach for various 'stageinfo' unit tests to share the stageinfo.hpp header --- .../arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp | 4 +--- .../arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp | 4 +--- .../arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp | 4 +--- .../arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp | 4 +--- .../arkode/CXX_serial/ark_test_stageinfo_mristep.cpp | 4 +--- .../arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp | 4 +--- .../arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp | 4 +--- test/unit_tests/arkode/CXX_serial/stageinfo.hpp | 2 ++ 8 files changed, 9 insertions(+), 21 deletions(-) diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp index 5b20eb68c5..d7f7bf483f 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp @@ -32,6 +32,7 @@ #include "problems/kpr.hpp" #include "utilities/check_return.hpp" +#include "stageinfo.hpp" using namespace std; using namespace problems::kpr; @@ -42,9 +43,6 @@ using namespace problems::kpr; // definitions from other tests. void* arkode_mem = nullptr; -// Include the pre/post step and stage processing routines now that arkode_mem is defined -#include "stageinfo.hpp" - int main(int argc, char* argv[]) { cout << "Start ARKStep StageInfo test" << endl; diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp index bac2b9efa4..4ef6f5dd6c 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp @@ -30,6 +30,7 @@ #include "problems/kpr.hpp" #include "utilities/check_return.hpp" +#include "stageinfo.hpp" using namespace std; using namespace problems::kpr; @@ -40,9 +41,6 @@ using namespace problems::kpr; // definitions from other tests. void* arkode_mem = nullptr; -// Include the pre/post step and stage processing routines now that arkode_mem is defined -#include "stageinfo.hpp" - int main(int argc, char* argv[]) { cout << "Start ERKStep StageInfo test" << endl; diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp index ce84acfb8b..6e2e2db754 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp @@ -31,6 +31,7 @@ #include "problems/estep.hpp" #include "utilities/check_return.hpp" +#include "stageinfo.hpp" using namespace std; using namespace problems::estep; @@ -41,9 +42,6 @@ using namespace problems::estep; // definitions from other tests. void* arkode_mem = nullptr; -// Include the pre/post step and stage processing routines now that arkode_mem is defined -#include "stageinfo.hpp" - int main(int argc, char* argv[]) { cout << "Start ForcingStep StageInfo test" << endl; diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp index 3a19abdd59..acc2fec6c7 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp @@ -30,6 +30,7 @@ #include "problems/prv.hpp" #include "sundials/sundials_nvector.h" #include "utilities/check_return.hpp" +#include "stageinfo.hpp" using namespace std; using namespace problems::prv; @@ -40,9 +41,6 @@ using namespace problems::prv; // definitions from other tests. void* arkode_mem = nullptr; -// Include the pre/post step and stage processing routines now that arkode_mem is defined -#include "stageinfo.hpp" - int main(int argc, char* argv[]) { cout << "Start LSRKStep StageInfo test" << endl; diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp index 56acff94e5..b429e06b0d 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp @@ -35,6 +35,7 @@ #include "problems/kpr.hpp" #include "utilities/check_return.hpp" +#include "stageinfo.hpp" using namespace std; using namespace problems::kpr; @@ -45,9 +46,6 @@ using namespace problems::kpr; // definitions from other tests. void* arkode_mem = nullptr; -// Include the pre/post step and stage processing routines now that arkode_mem is defined -#include "stageinfo.hpp" - int main(int argc, char* argv[]) { cout << "Start MRIStep StageInfo test" << endl; diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp index 1d8936f4da..2057a70839 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp @@ -31,6 +31,7 @@ #include "problems/estep.hpp" #include "utilities/check_return.hpp" +#include "stageinfo.hpp" using namespace std; using namespace problems::estep; @@ -41,9 +42,6 @@ using namespace problems::estep; // definitions from other tests. void* arkode_mem = nullptr; -// Include the pre/post step and stage processing routines now that arkode_mem is defined -#include "stageinfo.hpp" - int main(int argc, char* argv[]) { cout << "Start SplittingStep StageInfo test" << endl; diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp index 991029e0e3..22003b08f7 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp @@ -30,6 +30,7 @@ #include "problems/kepler.hpp" #include "utilities/check_return.hpp" +#include "stageinfo.hpp" using namespace std; using namespace problems::kepler; @@ -40,9 +41,6 @@ using namespace problems::kepler; // definitions from other tests. void* arkode_mem = nullptr; -// Include the pre/post step and stage processing routines now that arkode_mem is defined -#include "stageinfo.hpp" - int main(int argc, char* argv[]) { cout << "Start SPRKStep StageInfo test" << endl; diff --git a/test/unit_tests/arkode/CXX_serial/stageinfo.hpp b/test/unit_tests/arkode/CXX_serial/stageinfo.hpp index 8898ad8a71..15d8e4e113 100644 --- a/test/unit_tests/arkode/CXX_serial/stageinfo.hpp +++ b/test/unit_tests/arkode/CXX_serial/stageinfo.hpp @@ -23,6 +23,8 @@ #include "arkode/arkode.h" #include "sundials/sundials_math.h" +extern void* arkode_mem; + int preprocess_step(sunrealtype t, N_Vector y, void* user_data) { sunrealtype tn, tcur; From 81c3da967948cfab45452a7848020f3b05fa54e2 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 30 Jan 2026 12:44:31 -0500 Subject: [PATCH 077/298] Updated answers submodule commit --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index 71bf5cddce..5c2937c5e9 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 71bf5cddce4e356091db2c8c620ace9b9f7143ca +Subproject commit 5c2937c5e982cf9a699c57c3e80b77a9a3bb7ea7 From 7f752838e910dee44b2394aa6a1a9b20bc1e4672 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 30 Jan 2026 13:12:01 -0500 Subject: [PATCH 078/298] Formatting --- .../unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp | 2 +- .../unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp | 2 +- .../arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp | 2 +- .../arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp | 2 +- .../unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp | 2 +- .../arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp | 2 +- .../arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp index d7f7bf483f..6fe449caff 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp @@ -31,8 +31,8 @@ #include "sunlinsol/sunlinsol_spgmr.h" #include "problems/kpr.hpp" -#include "utilities/check_return.hpp" #include "stageinfo.hpp" +#include "utilities/check_return.hpp" using namespace std; using namespace problems::kpr; diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp index 4ef6f5dd6c..672fac6f3e 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp @@ -29,8 +29,8 @@ #include "sundials/sundials_context.hpp" #include "problems/kpr.hpp" -#include "utilities/check_return.hpp" #include "stageinfo.hpp" +#include "utilities/check_return.hpp" using namespace std; using namespace problems::kpr; diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp index 6e2e2db754..1a2a136ad4 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp @@ -30,8 +30,8 @@ #include "sundials/sundials_context.hpp" #include "problems/estep.hpp" -#include "utilities/check_return.hpp" #include "stageinfo.hpp" +#include "utilities/check_return.hpp" using namespace std; using namespace problems::estep; diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp index acc2fec6c7..1c97438605 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp @@ -28,9 +28,9 @@ #include "nvector/nvector_serial.h" #include "problems/prv.hpp" +#include "stageinfo.hpp" #include "sundials/sundials_nvector.h" #include "utilities/check_return.hpp" -#include "stageinfo.hpp" using namespace std; using namespace problems::prv; diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp index b429e06b0d..fc454b67e8 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp @@ -34,8 +34,8 @@ #include "sunlinsol/sunlinsol_spgmr.h" #include "problems/kpr.hpp" -#include "utilities/check_return.hpp" #include "stageinfo.hpp" +#include "utilities/check_return.hpp" using namespace std; using namespace problems::kpr; diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp index 2057a70839..c6c49f9fb2 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp @@ -30,8 +30,8 @@ #include "sundials/sundials_context.hpp" #include "problems/estep.hpp" -#include "utilities/check_return.hpp" #include "stageinfo.hpp" +#include "utilities/check_return.hpp" using namespace std; using namespace problems::estep; diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp index 22003b08f7..dddab7376d 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp @@ -29,8 +29,8 @@ #include "sundials/sundials_context.hpp" #include "problems/kepler.hpp" -#include "utilities/check_return.hpp" #include "stageinfo.hpp" +#include "utilities/check_return.hpp" using namespace std; using namespace problems::kepler; From 75df6a6aa1e2fdeb3b6dd8e994bb74b248750576 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 30 Jan 2026 14:34:06 -0500 Subject: [PATCH 079/298] Moved callback functions back into each 'stageinfo' test code file --- .../CXX_serial/ark_test_stageinfo_arkstep.cpp | 127 ++++++++++++++- .../CXX_serial/ark_test_stageinfo_erkstep.cpp | 127 ++++++++++++++- .../ark_test_stageinfo_forcingstep.cpp | 127 ++++++++++++++- .../ark_test_stageinfo_lsrkstep.cpp | 127 ++++++++++++++- .../CXX_serial/ark_test_stageinfo_mristep.cpp | 127 ++++++++++++++- .../ark_test_stageinfo_splittingstep.cpp | 127 ++++++++++++++- .../ark_test_stageinfo_sprkstep.cpp | 127 ++++++++++++++- .../arkode/CXX_serial/stageinfo.hpp | 146 ------------------ 8 files changed, 854 insertions(+), 181 deletions(-) delete mode 100644 test/unit_tests/arkode/CXX_serial/stageinfo.hpp diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp index 6fe449caff..4b5d954844 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp @@ -31,18 +31,135 @@ #include "sunlinsol/sunlinsol_spgmr.h" #include "problems/kpr.hpp" -#include "stageinfo.hpp" #include "utilities/check_return.hpp" using namespace std; using namespace problems::kpr; -// store the main integrator global memory for these tests only, so that we -// can call ARKodeGetLastTime etc in the callback functions from stageinfo.hpp. -// This would normally be stored in user_data, but here we reuse problem -// definitions from other tests. +// Store the main integrator global memory for these tests only, so that we +// can call ARKodeGetLastTime etc in the step and stage pre/postprocessing +// callback functions below. This would normally be stored in user_data, but +// here we reuse problem definitions from other tests. void* arkode_mem = nullptr; +int preprocess_step(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Pre-step processing at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +int postprocess_step(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Post-step processing at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Post-step failure processing at t = " + << std::setprecision(2) << t << " (tn = " << tn + << " , tcur = " << tcur << ")," << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) +{ + int stage, max_stages; + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetStageIndex" << std::endl; + return -1; + } + std::cout << " [Pre-RHS processing (stage " << stage << " of " << max_stages + << ") at t = " << std::setprecision(2) << t << " (tn = " << tn + << " , tcur = " << tcur << "), " << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +int postprocess_stage(sunrealtype t, N_Vector y, void* user_data) +{ + int stage, max_stages; + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetStageIndex" << std::endl; + return -1; + } + std::cout << " [Post-stage processing (stage " << stage << " of " + << max_stages << ") at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << "), " + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + int main(int argc, char* argv[]) { cout << "Start ARKStep StageInfo test" << endl; diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp index 672fac6f3e..ed608828ac 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp @@ -29,18 +29,135 @@ #include "sundials/sundials_context.hpp" #include "problems/kpr.hpp" -#include "stageinfo.hpp" #include "utilities/check_return.hpp" using namespace std; using namespace problems::kpr; -// store the main integrator global memory for these tests only, so that we -// can call ARKodeGetLastTime etc in the callback functions from stageinfo.hpp. -// This would normally be stored in user_data, but here we reuse problem -// definitions from other tests. +// Store the main integrator global memory for these tests only, so that we +// can call ARKodeGetLastTime etc in the step and stage pre/postprocessing +// callback functions below. This would normally be stored in user_data, but +// here we reuse problem definitions from other tests. void* arkode_mem = nullptr; +int preprocess_step(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Pre-step processing at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +int postprocess_step(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Post-step processing at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Post-step failure processing at t = " + << std::setprecision(2) << t << " (tn = " << tn + << " , tcur = " << tcur << ")," << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) +{ + int stage, max_stages; + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetStageIndex" << std::endl; + return -1; + } + std::cout << " [Pre-RHS processing (stage " << stage << " of " << max_stages + << ") at t = " << std::setprecision(2) << t << " (tn = " << tn + << " , tcur = " << tcur << "), " << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +int postprocess_stage(sunrealtype t, N_Vector y, void* user_data) +{ + int stage, max_stages; + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetStageIndex" << std::endl; + return -1; + } + std::cout << " [Post-stage processing (stage " << stage << " of " + << max_stages << ") at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << "), " + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + int main(int argc, char* argv[]) { cout << "Start ERKStep StageInfo test" << endl; diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp index 1a2a136ad4..99a1ef920d 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp @@ -30,18 +30,135 @@ #include "sundials/sundials_context.hpp" #include "problems/estep.hpp" -#include "stageinfo.hpp" #include "utilities/check_return.hpp" using namespace std; using namespace problems::estep; -// store the main integrator global memory for these tests only, so that we -// can call ARKodeGetLastTime etc in the callback functions from stageinfo.hpp. -// This would normally be stored in user_data, but here we reuse problem -// definitions from other tests. +// Store the main integrator global memory for these tests only, so that we +// can call ARKodeGetLastTime etc in the step and stage pre/postprocessing +// callback functions below. This would normally be stored in user_data, but +// here we reuse problem definitions from other tests. void* arkode_mem = nullptr; +int preprocess_step(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Pre-step processing at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +int postprocess_step(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Post-step processing at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Post-step failure processing at t = " + << std::setprecision(2) << t << " (tn = " << tn + << " , tcur = " << tcur << ")," << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) +{ + int stage, max_stages; + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetStageIndex" << std::endl; + return -1; + } + std::cout << " [Pre-RHS processing (stage " << stage << " of " << max_stages + << ") at t = " << std::setprecision(2) << t << " (tn = " << tn + << " , tcur = " << tcur << "), " << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +int postprocess_stage(sunrealtype t, N_Vector y, void* user_data) +{ + int stage, max_stages; + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetStageIndex" << std::endl; + return -1; + } + std::cout << " [Post-stage processing (stage " << stage << " of " + << max_stages << ") at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << "), " + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + int main(int argc, char* argv[]) { cout << "Start ForcingStep StageInfo test" << endl; diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp index 1c97438605..979e80749c 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp @@ -28,19 +28,136 @@ #include "nvector/nvector_serial.h" #include "problems/prv.hpp" -#include "stageinfo.hpp" #include "sundials/sundials_nvector.h" #include "utilities/check_return.hpp" using namespace std; using namespace problems::prv; -// store the main integrator global memory for these tests only, so that we -// can call ARKodeGetLastTime etc in the callback functions from stageinfo.hpp. -// This would normally be stored in user_data, but here we reuse problem -// definitions from other tests. +// Store the main integrator global memory for these tests only, so that we +// can call ARKodeGetLastTime etc in the step and stage pre/postprocessing +// callback functions below. This would normally be stored in user_data, but +// here we reuse problem definitions from other tests. void* arkode_mem = nullptr; +int preprocess_step(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Pre-step processing at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +int postprocess_step(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Post-step processing at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Post-step failure processing at t = " + << std::setprecision(2) << t << " (tn = " << tn + << " , tcur = " << tcur << ")," << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) +{ + int stage, max_stages; + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetStageIndex" << std::endl; + return -1; + } + std::cout << " [Pre-RHS processing (stage " << stage << " of " << max_stages + << ") at t = " << std::setprecision(2) << t << " (tn = " << tn + << " , tcur = " << tcur << "), " << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +int postprocess_stage(sunrealtype t, N_Vector y, void* user_data) +{ + int stage, max_stages; + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetStageIndex" << std::endl; + return -1; + } + std::cout << " [Post-stage processing (stage " << stage << " of " + << max_stages << ") at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << "), " + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + int main(int argc, char* argv[]) { cout << "Start LSRKStep StageInfo test" << endl; diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp index fc454b67e8..fedff905d4 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp @@ -34,18 +34,135 @@ #include "sunlinsol/sunlinsol_spgmr.h" #include "problems/kpr.hpp" -#include "stageinfo.hpp" #include "utilities/check_return.hpp" using namespace std; using namespace problems::kpr; -// store the main integrator global memory for these tests only, so that we -// can call ARKodeGetLastTime etc in the callback functions from stageinfo.hpp. -// This would normally be stored in user_data, but here we reuse problem -// definitions from other tests. +// Store the main integrator global memory for these tests only, so that we +// can call ARKodeGetLastTime etc in the step and stage pre/postprocessing +// callback functions below. This would normally be stored in user_data, but +// here we reuse problem definitions from other tests. void* arkode_mem = nullptr; +int preprocess_step(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Pre-step processing at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +int postprocess_step(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Post-step processing at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Post-step failure processing at t = " + << std::setprecision(2) << t << " (tn = " << tn + << " , tcur = " << tcur << ")," << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) +{ + int stage, max_stages; + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetStageIndex" << std::endl; + return -1; + } + std::cout << " [Pre-RHS processing (stage " << stage << " of " << max_stages + << ") at t = " << std::setprecision(2) << t << " (tn = " << tn + << " , tcur = " << tcur << "), " << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +int postprocess_stage(sunrealtype t, N_Vector y, void* user_data) +{ + int stage, max_stages; + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetStageIndex" << std::endl; + return -1; + } + std::cout << " [Post-stage processing (stage " << stage << " of " + << max_stages << ") at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << "), " + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + int main(int argc, char* argv[]) { cout << "Start MRIStep StageInfo test" << endl; diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp index c6c49f9fb2..c9f8b89a92 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp @@ -30,18 +30,135 @@ #include "sundials/sundials_context.hpp" #include "problems/estep.hpp" -#include "stageinfo.hpp" #include "utilities/check_return.hpp" using namespace std; using namespace problems::estep; -// store the main integrator global memory for these tests only, so that we -// can call ARKodeGetLastTime etc in the callback functions from stageinfo.hpp. -// This would normally be stored in user_data, but here we reuse problem -// definitions from other tests. +// Store the main integrator global memory for these tests only, so that we +// can call ARKodeGetLastTime etc in the step and stage pre/postprocessing +// callback functions below. This would normally be stored in user_data, but +// here we reuse problem definitions from other tests. void* arkode_mem = nullptr; +int preprocess_step(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Pre-step processing at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +int postprocess_step(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Post-step processing at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Post-step failure processing at t = " + << std::setprecision(2) << t << " (tn = " << tn + << " , tcur = " << tcur << ")," << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) +{ + int stage, max_stages; + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetStageIndex" << std::endl; + return -1; + } + std::cout << " [Pre-RHS processing (stage " << stage << " of " << max_stages + << ") at t = " << std::setprecision(2) << t << " (tn = " << tn + << " , tcur = " << tcur << "), " << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +int postprocess_stage(sunrealtype t, N_Vector y, void* user_data) +{ + int stage, max_stages; + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetStageIndex" << std::endl; + return -1; + } + std::cout << " [Post-stage processing (stage " << stage << " of " + << max_stages << ") at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << "), " + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + int main(int argc, char* argv[]) { cout << "Start SplittingStep StageInfo test" << endl; diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp index dddab7376d..876171bdd7 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp @@ -29,18 +29,135 @@ #include "sundials/sundials_context.hpp" #include "problems/kepler.hpp" -#include "stageinfo.hpp" #include "utilities/check_return.hpp" using namespace std; using namespace problems::kepler; -// store the main integrator global memory for these tests only, so that we -// can call ARKodeGetLastTime etc in the callback functions from stageinfo.hpp. -// This would normally be stored in user_data, but here we reuse problem -// definitions from other tests. +// Store the main integrator global memory for these tests only, so that we +// can call ARKodeGetLastTime etc in the step and stage pre/postprocessing +// callback functions below. This would normally be stored in user_data, but +// here we reuse problem definitions from other tests. void* arkode_mem = nullptr; +int preprocess_step(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Pre-step processing at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +int postprocess_step(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Post-step processing at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Post-step failure processing at t = " + << std::setprecision(2) << t << " (tn = " << tn + << " , tcur = " << tcur << ")," << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) +{ + int stage, max_stages; + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetStageIndex" << std::endl; + return -1; + } + std::cout << " [Pre-RHS processing (stage " << stage << " of " << max_stages + << ") at t = " << std::setprecision(2) << t << " (tn = " << tn + << " , tcur = " << tcur << "), " << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +int postprocess_stage(sunrealtype t, N_Vector y, void* user_data) +{ + int stage, max_stages; + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetStageIndex" << std::endl; + return -1; + } + std::cout << " [Post-stage processing (stage " << stage << " of " + << max_stages << ") at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << "), " + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + int main(int argc, char* argv[]) { cout << "Start SPRKStep StageInfo test" << endl; diff --git a/test/unit_tests/arkode/CXX_serial/stageinfo.hpp b/test/unit_tests/arkode/CXX_serial/stageinfo.hpp deleted file mode 100644 index 15d8e4e113..0000000000 --- a/test/unit_tests/arkode/CXX_serial/stageinfo.hpp +++ /dev/null @@ -1,146 +0,0 @@ -/* ----------------------------------------------------------------------------- - * Programmer(s): Daniel R. Reynolds @ UMBC - * ----------------------------------------------------------------------------- - * SUNDIALS Copyright Start - * Copyright (c) 2025-2026, Lawrence Livermore National Security, - * University of Maryland Baltimore County, and the SUNDIALS contributors. - * Copyright (c) 2013-2025, Lawrence Livermore National Security - * and Southern Methodist University. - * Copyright (c) 2002-2013, Lawrence Livermore National Security. - * All rights reserved. - * - * See the top-level LICENSE and NOTICE files for details. - * - * SPDX-License-Identifier: BSD-3-Clause - * SUNDIALS Copyright End - * ----------------------------------------------------------------------------- - * Utility routines for various "ark_test_stageinfo" unit tests. - * ---------------------------------------------------------------------------*/ - -#ifndef STAGEINFO_HPP_ -#define STAGEINFO_HPP_ - -#include "arkode/arkode.h" -#include "sundials/sundials_math.h" - -extern void* arkode_mem; - -int preprocess_step(sunrealtype t, N_Vector y, void* user_data) -{ - sunrealtype tn, tcur; - if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetLastTime" << std::endl; - return -1; - } - if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; - return -1; - } - std::cout << " [Pre-step processing at t = " << std::setprecision(2) << t - << " (tn = " << tn << " , tcur = " << tcur << ")," - << std::setprecision(10) - << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl - << std::flush; - return 0; -} - -int postprocess_step(sunrealtype t, N_Vector y, void* user_data) -{ - sunrealtype tn, tcur; - if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetLastTime" << std::endl; - return -1; - } - if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; - return -1; - } - std::cout << " [Post-step processing at t = " << std::setprecision(2) << t - << " (tn = " << tn << " , tcur = " << tcur << ")," - << std::setprecision(10) - << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl - << std::flush; - return 0; -} - -int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) -{ - sunrealtype tn, tcur; - if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetLastTime" << std::endl; - return -1; - } - if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; - return -1; - } - std::cout << " [Post-step failure processing at t = " - << std::setprecision(2) << t << " (tn = " << tn - << " , tcur = " << tcur << ")," << std::setprecision(10) - << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl - << std::flush; - return 0; -} - -int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) -{ - int stage, max_stages; - sunrealtype tn, tcur; - if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetLastTime" << std::endl; - return -1; - } - if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; - return -1; - } - if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetStageIndex" << std::endl; - return -1; - } - std::cout << " [Pre-RHS processing (stage " << stage << " of " << max_stages - << ") at t = " << std::setprecision(2) << t << " (tn = " << tn - << " , tcur = " << tcur << "), " << std::setprecision(10) - << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl - << std::flush; - return 0; -} - -int postprocess_stage(sunrealtype t, N_Vector y, void* user_data) -{ - int stage, max_stages; - sunrealtype tn, tcur; - if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetLastTime" << std::endl; - return -1; - } - if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; - return -1; - } - if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetStageIndex" << std::endl; - return -1; - } - std::cout << " [Post-stage processing (stage " << stage << " of " - << max_stages << ") at t = " << std::setprecision(2) << t - << " (tn = " << tn << " , tcur = " << tcur << "), " - << std::setprecision(10) - << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl - << std::flush; - return 0; -} - -#endif // STAGEINFO_HPP_ From 71b7a22561b28d789eb326d44fe951ed9fd82cdf Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 30 Jan 2026 14:54:23 -0500 Subject: [PATCH 080/298] Adjusted declaration of callback functions to [hopefully] fix single and extended precision CI builds --- .../CXX_serial/ark_test_stageinfo_arkstep.cpp | 243 +++++++++--------- .../CXX_serial/ark_test_stageinfo_erkstep.cpp | 213 +++++++-------- .../ark_test_stageinfo_forcingstep.cpp | 243 +++++++++--------- .../ark_test_stageinfo_lsrkstep.cpp | 243 +++++++++--------- .../CXX_serial/ark_test_stageinfo_mristep.cpp | 243 +++++++++--------- .../ark_test_stageinfo_splittingstep.cpp | 243 +++++++++--------- .../ark_test_stageinfo_sprkstep.cpp | 189 +++++++------- 7 files changed, 833 insertions(+), 784 deletions(-) diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp index 4b5d954844..72071487db 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp @@ -41,124 +41,11 @@ using namespace problems::kpr; // callback functions below. This would normally be stored in user_data, but // here we reuse problem definitions from other tests. void* arkode_mem = nullptr; - -int preprocess_step(sunrealtype t, N_Vector y, void* user_data) -{ - sunrealtype tn, tcur; - if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetLastTime" << std::endl; - return -1; - } - if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; - return -1; - } - std::cout << " [Pre-step processing at t = " << std::setprecision(2) << t - << " (tn = " << tn << " , tcur = " << tcur << ")," - << std::setprecision(10) - << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl - << std::flush; - return 0; -} - -int postprocess_step(sunrealtype t, N_Vector y, void* user_data) -{ - sunrealtype tn, tcur; - if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetLastTime" << std::endl; - return -1; - } - if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; - return -1; - } - std::cout << " [Post-step processing at t = " << std::setprecision(2) << t - << " (tn = " << tn << " , tcur = " << tcur << ")," - << std::setprecision(10) - << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl - << std::flush; - return 0; -} - -int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) -{ - sunrealtype tn, tcur; - if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetLastTime" << std::endl; - return -1; - } - if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; - return -1; - } - std::cout << " [Post-step failure processing at t = " - << std::setprecision(2) << t << " (tn = " << tn - << " , tcur = " << tcur << ")," << std::setprecision(10) - << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl - << std::flush; - return 0; -} - -int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) -{ - int stage, max_stages; - sunrealtype tn, tcur; - if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetLastTime" << std::endl; - return -1; - } - if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; - return -1; - } - if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetStageIndex" << std::endl; - return -1; - } - std::cout << " [Pre-RHS processing (stage " << stage << " of " << max_stages - << ") at t = " << std::setprecision(2) << t << " (tn = " << tn - << " , tcur = " << tcur << "), " << std::setprecision(10) - << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl - << std::flush; - return 0; -} - -int postprocess_stage(sunrealtype t, N_Vector y, void* user_data) -{ - int stage, max_stages; - sunrealtype tn, tcur; - if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetLastTime" << std::endl; - return -1; - } - if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; - return -1; - } - if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetStageIndex" << std::endl; - return -1; - } - std::cout << " [Post-stage processing (stage " << stage << " of " - << max_stages << ") at t = " << std::setprecision(2) << t - << " (tn = " << tn << " , tcur = " << tcur << "), " - << std::setprecision(10) - << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl - << std::flush; - return 0; -} +static int preprocess_step(sunrealtype t, N_Vector y, void* user_data); +static int postprocess_step(sunrealtype t, N_Vector y, void* user_data); +static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data); +static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data); +static int postprocess_stage(sunrealtype t, N_Vector y, void* user_data); int main(int argc, char* argv[]) { @@ -295,4 +182,124 @@ int main(int argc, char* argv[]) return 0; } + +// Callback functions +static int preprocess_step(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Pre-step processing at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Post-step processing at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Post-step failure processing at t = " + << std::setprecision(2) << t << " (tn = " << tn + << " , tcur = " << tcur << ")," << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) +{ + int stage, max_stages; + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetStageIndex" << std::endl; + return -1; + } + std::cout << " [Pre-RHS processing (stage " << stage << " of " << max_stages + << ") at t = " << std::setprecision(2) << t << " (tn = " << tn + << " , tcur = " << tcur << "), " << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +static int postprocess_stage(sunrealtype t, N_Vector y, void* user_data) +{ + int stage, max_stages; + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetStageIndex" << std::endl; + return -1; + } + std::cout << " [Post-stage processing (stage " << stage << " of " + << max_stages << ") at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << "), " + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + /*---- end of file ----*/ diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp index ed608828ac..ee62bae0cd 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp @@ -39,8 +39,113 @@ using namespace problems::kpr; // callback functions below. This would normally be stored in user_data, but // here we reuse problem definitions from other tests. void* arkode_mem = nullptr; +static int preprocess_step(sunrealtype t, N_Vector y, void* user_data); +static int postprocess_step(sunrealtype t, N_Vector y, void* user_data); +static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data); +static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data); +static int postprocess_stage(sunrealtype t, N_Vector y, void* user_data); -int preprocess_step(sunrealtype t, N_Vector y, void* user_data) +int main(int argc, char* argv[]) +{ + cout << "Start ERKStep StageInfo test" << endl; + + // SUNDIALS context object for this simulation + sundials::Context sunctx; + + // Create initial condition + N_Vector y = N_VNew_Serial(2, sunctx); + if (check_ptr(y, "N_VNew_Serial")) { return 1; } + + sunrealtype utrue, vtrue; + int flag = true_sol(zero, &utrue, &vtrue); + if (check_flag(flag, "true_sol")) { return 1; } + + sunrealtype* ydata = N_VGetArrayPointer(y); + ydata[0] = utrue; + ydata[1] = vtrue; + + // Create ERKStep memory structure + arkode_mem = ERKStepCreate(ode_rhs, zero, y, sunctx); + if (check_ptr(arkode_mem, "ERKStepCreate")) { return 1; } + + flag = ARKodeSetUserData(arkode_mem, &problem_data); + if (check_flag(flag, "ARKodeSetUserData")) { return 1; } + + // Relative and absolute tolerances + const sunrealtype rtol = SUN_RCONST(1.0e-6); + const sunrealtype atol = SUN_RCONST(1.0e-10); + + flag = ARKodeSStolerances(arkode_mem, rtol, atol); + if (check_flag(flag, "ARKodeSStolerances")) { return 1; } + + // Set pre/post step and stage routines + flag = ARKodeSetPreprocessStepFn(arkode_mem, preprocess_step); + if (check_flag(flag, "ARKodeSetPreprocessStepFn")) { return 1; } + flag = ARKodeSetPostprocessStepFn(arkode_mem, postprocess_step); + if (check_flag(flag, "ARKodeSetPostprocessStepFn")) { return 1; } + flag = ARKodeSetPostprocessStepFailFn(arkode_mem, postprocess_step_fail); + if (check_flag(flag, "ARKodeSetPostprocessStepFailFn")) { return 1; } + flag = ARKodeSetPreprocessRHSFn(arkode_mem, preprocess_stage); + if (check_flag(flag, "ARKodeSetPreprocessRHSFn")) { return 1; } + flag = ARKodeSetPostprocessStageFn(arkode_mem, postprocess_stage); + if (check_flag(flag, "ARKodeSetPostprocessStageFn")) { return 1; } + + // Initial time and fist output time + const sunrealtype dtout = one; // output interval + const int nout = 3; // number of outputs + sunrealtype tret = zero; + sunrealtype tout = tret + dtout; + + // Output initial contion + cout << scientific; + cout << setprecision(numeric_limits::digits10); + cout << " t "; + cout << " u "; + cout << " v "; + cout << " u err "; + cout << " v err " << endl; + for (int i = 0; i < 9; i++) { cout << "--------------"; } + cout << endl; + + cout << setw(22) << tret << setw(25) << ydata[0] << setw(25) << ydata[1] + << setw(25) << abs(ydata[0] - utrue) << setw(25) << abs(ydata[1] - vtrue) + << endl; + + // Advance in time + for (int i = 0; i < nout; i++) + { + flag = ARKodeEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); + if (check_flag(flag, "ARKodeEvolve")) { return 1; } + + flag = true_sol(tret, &utrue, &vtrue); + if (check_flag(flag, "true_sol")) { return 1; } + + cout << setw(22) << tret << setw(25) << ydata[0] << setw(25) << ydata[1] + << setw(25) << abs(ydata[0] - utrue) << setw(25) + << abs(ydata[1] - vtrue) << endl; + + // update output time + tout += dtout; + } + for (int i = 0; i < 9; i++) { cout << "--------------"; } + cout << endl; + + // Print some final statistics + flag = ARKodePrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); + if (check_flag(flag, "ARKodePrintAllStats")) { return 1; } + + // Clean up and return with successful completion + N_VDestroy(y); + ARKodeFree(&arkode_mem); + + cout << "End ERKStep StageInfo test" << endl; + + return 0; +} + + +// Callback functions +static int preprocess_step(sunrealtype t, N_Vector y, void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -61,7 +166,7 @@ int preprocess_step(sunrealtype t, N_Vector y, void* user_data) return 0; } -int postprocess_step(sunrealtype t, N_Vector y, void* user_data) +static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -82,7 +187,7 @@ int postprocess_step(sunrealtype t, N_Vector y, void* user_data) return 0; } -int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) +static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -103,7 +208,7 @@ int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) return 0; } -int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) +static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) { int stage, max_stages; sunrealtype tn, tcur; @@ -130,7 +235,7 @@ int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) return 0; } -int postprocess_stage(sunrealtype t, N_Vector y, void* user_data) +static int postprocess_stage(sunrealtype t, N_Vector y, void* user_data) { int stage, max_stages; sunrealtype tn, tcur; @@ -158,102 +263,4 @@ int postprocess_stage(sunrealtype t, N_Vector y, void* user_data) return 0; } -int main(int argc, char* argv[]) -{ - cout << "Start ERKStep StageInfo test" << endl; - - // SUNDIALS context object for this simulation - sundials::Context sunctx; - - // Create initial condition - N_Vector y = N_VNew_Serial(2, sunctx); - if (check_ptr(y, "N_VNew_Serial")) { return 1; } - - sunrealtype utrue, vtrue; - int flag = true_sol(zero, &utrue, &vtrue); - if (check_flag(flag, "true_sol")) { return 1; } - - sunrealtype* ydata = N_VGetArrayPointer(y); - ydata[0] = utrue; - ydata[1] = vtrue; - - // Create ERKStep memory structure - arkode_mem = ERKStepCreate(ode_rhs, zero, y, sunctx); - if (check_ptr(arkode_mem, "ERKStepCreate")) { return 1; } - - flag = ARKodeSetUserData(arkode_mem, &problem_data); - if (check_flag(flag, "ARKodeSetUserData")) { return 1; } - - // Relative and absolute tolerances - const sunrealtype rtol = SUN_RCONST(1.0e-6); - const sunrealtype atol = SUN_RCONST(1.0e-10); - - flag = ARKodeSStolerances(arkode_mem, rtol, atol); - if (check_flag(flag, "ARKodeSStolerances")) { return 1; } - - // Set pre/post step and stage routines - flag = ARKodeSetPreprocessStepFn(arkode_mem, preprocess_step); - if (check_flag(flag, "ARKodeSetPreprocessStepFn")) { return 1; } - flag = ARKodeSetPostprocessStepFn(arkode_mem, postprocess_step); - if (check_flag(flag, "ARKodeSetPostprocessStepFn")) { return 1; } - flag = ARKodeSetPostprocessStepFailFn(arkode_mem, postprocess_step_fail); - if (check_flag(flag, "ARKodeSetPostprocessStepFailFn")) { return 1; } - flag = ARKodeSetPreprocessRHSFn(arkode_mem, preprocess_stage); - if (check_flag(flag, "ARKodeSetPreprocessRHSFn")) { return 1; } - flag = ARKodeSetPostprocessStageFn(arkode_mem, postprocess_stage); - if (check_flag(flag, "ARKodeSetPostprocessStageFn")) { return 1; } - - // Initial time and fist output time - const sunrealtype dtout = one; // output interval - const int nout = 3; // number of outputs - sunrealtype tret = zero; - sunrealtype tout = tret + dtout; - - // Output initial contion - cout << scientific; - cout << setprecision(numeric_limits::digits10); - cout << " t "; - cout << " u "; - cout << " v "; - cout << " u err "; - cout << " v err " << endl; - for (int i = 0; i < 9; i++) { cout << "--------------"; } - cout << endl; - - cout << setw(22) << tret << setw(25) << ydata[0] << setw(25) << ydata[1] - << setw(25) << abs(ydata[0] - utrue) << setw(25) << abs(ydata[1] - vtrue) - << endl; - - // Advance in time - for (int i = 0; i < nout; i++) - { - flag = ARKodeEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); - if (check_flag(flag, "ARKodeEvolve")) { return 1; } - - flag = true_sol(tret, &utrue, &vtrue); - if (check_flag(flag, "true_sol")) { return 1; } - - cout << setw(22) << tret << setw(25) << ydata[0] << setw(25) << ydata[1] - << setw(25) << abs(ydata[0] - utrue) << setw(25) - << abs(ydata[1] - vtrue) << endl; - - // update output time - tout += dtout; - } - for (int i = 0; i < 9; i++) { cout << "--------------"; } - cout << endl; - - // Print some final statistics - flag = ARKodePrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); - if (check_flag(flag, "ARKodePrintAllStats")) { return 1; } - - // Clean up and return with successful completion - N_VDestroy(y); - ARKodeFree(&arkode_mem); - - cout << "End ERKStep StageInfo test" << endl; - - return 0; -} - /*---- end of file ----*/ diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp index 99a1ef920d..b3467ea454 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp @@ -40,124 +40,11 @@ using namespace problems::estep; // callback functions below. This would normally be stored in user_data, but // here we reuse problem definitions from other tests. void* arkode_mem = nullptr; - -int preprocess_step(sunrealtype t, N_Vector y, void* user_data) -{ - sunrealtype tn, tcur; - if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetLastTime" << std::endl; - return -1; - } - if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; - return -1; - } - std::cout << " [Pre-step processing at t = " << std::setprecision(2) << t - << " (tn = " << tn << " , tcur = " << tcur << ")," - << std::setprecision(10) - << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl - << std::flush; - return 0; -} - -int postprocess_step(sunrealtype t, N_Vector y, void* user_data) -{ - sunrealtype tn, tcur; - if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetLastTime" << std::endl; - return -1; - } - if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; - return -1; - } - std::cout << " [Post-step processing at t = " << std::setprecision(2) << t - << " (tn = " << tn << " , tcur = " << tcur << ")," - << std::setprecision(10) - << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl - << std::flush; - return 0; -} - -int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) -{ - sunrealtype tn, tcur; - if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetLastTime" << std::endl; - return -1; - } - if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; - return -1; - } - std::cout << " [Post-step failure processing at t = " - << std::setprecision(2) << t << " (tn = " << tn - << " , tcur = " << tcur << ")," << std::setprecision(10) - << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl - << std::flush; - return 0; -} - -int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) -{ - int stage, max_stages; - sunrealtype tn, tcur; - if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetLastTime" << std::endl; - return -1; - } - if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; - return -1; - } - if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetStageIndex" << std::endl; - return -1; - } - std::cout << " [Pre-RHS processing (stage " << stage << " of " << max_stages - << ") at t = " << std::setprecision(2) << t << " (tn = " << tn - << " , tcur = " << tcur << "), " << std::setprecision(10) - << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl - << std::flush; - return 0; -} - -int postprocess_stage(sunrealtype t, N_Vector y, void* user_data) -{ - int stage, max_stages; - sunrealtype tn, tcur; - if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetLastTime" << std::endl; - return -1; - } - if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; - return -1; - } - if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetStageIndex" << std::endl; - return -1; - } - std::cout << " [Post-stage processing (stage " << stage << " of " - << max_stages << ") at t = " << std::setprecision(2) << t - << " (tn = " << tn << " , tcur = " << tcur << "), " - << std::setprecision(10) - << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl - << std::flush; - return 0; -} +static int preprocess_step(sunrealtype t, N_Vector y, void* user_data); +static int postprocess_step(sunrealtype t, N_Vector y, void* user_data); +static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data); +static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data); +static int postprocess_stage(sunrealtype t, N_Vector y, void* user_data); int main(int argc, char* argv[]) { @@ -287,4 +174,124 @@ int main(int argc, char* argv[]) return 0; } + +// Callback functions +static int preprocess_step(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Pre-step processing at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Post-step processing at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Post-step failure processing at t = " + << std::setprecision(2) << t << " (tn = " << tn + << " , tcur = " << tcur << ")," << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) +{ + int stage, max_stages; + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetStageIndex" << std::endl; + return -1; + } + std::cout << " [Pre-RHS processing (stage " << stage << " of " << max_stages + << ") at t = " << std::setprecision(2) << t << " (tn = " << tn + << " , tcur = " << tcur << "), " << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +static int postprocess_stage(sunrealtype t, N_Vector y, void* user_data) +{ + int stage, max_stages; + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetStageIndex" << std::endl; + return -1; + } + std::cout << " [Post-stage processing (stage " << stage << " of " + << max_stages << ") at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << "), " + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + /*---- end of file ----*/ diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp index 979e80749c..03e0cff2cb 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp @@ -39,124 +39,11 @@ using namespace problems::prv; // callback functions below. This would normally be stored in user_data, but // here we reuse problem definitions from other tests. void* arkode_mem = nullptr; - -int preprocess_step(sunrealtype t, N_Vector y, void* user_data) -{ - sunrealtype tn, tcur; - if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetLastTime" << std::endl; - return -1; - } - if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; - return -1; - } - std::cout << " [Pre-step processing at t = " << std::setprecision(2) << t - << " (tn = " << tn << " , tcur = " << tcur << ")," - << std::setprecision(10) - << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl - << std::flush; - return 0; -} - -int postprocess_step(sunrealtype t, N_Vector y, void* user_data) -{ - sunrealtype tn, tcur; - if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetLastTime" << std::endl; - return -1; - } - if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; - return -1; - } - std::cout << " [Post-step processing at t = " << std::setprecision(2) << t - << " (tn = " << tn << " , tcur = " << tcur << ")," - << std::setprecision(10) - << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl - << std::flush; - return 0; -} - -int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) -{ - sunrealtype tn, tcur; - if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetLastTime" << std::endl; - return -1; - } - if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; - return -1; - } - std::cout << " [Post-step failure processing at t = " - << std::setprecision(2) << t << " (tn = " << tn - << " , tcur = " << tcur << ")," << std::setprecision(10) - << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl - << std::flush; - return 0; -} - -int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) -{ - int stage, max_stages; - sunrealtype tn, tcur; - if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetLastTime" << std::endl; - return -1; - } - if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; - return -1; - } - if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetStageIndex" << std::endl; - return -1; - } - std::cout << " [Pre-RHS processing (stage " << stage << " of " << max_stages - << ") at t = " << std::setprecision(2) << t << " (tn = " << tn - << " , tcur = " << tcur << "), " << std::setprecision(10) - << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl - << std::flush; - return 0; -} - -int postprocess_stage(sunrealtype t, N_Vector y, void* user_data) -{ - int stage, max_stages; - sunrealtype tn, tcur; - if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetLastTime" << std::endl; - return -1; - } - if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; - return -1; - } - if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetStageIndex" << std::endl; - return -1; - } - std::cout << " [Post-stage processing (stage " << stage << " of " - << max_stages << ") at t = " << std::setprecision(2) << t - << " (tn = " << tn << " , tcur = " << tcur << "), " - << std::setprecision(10) - << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl - << std::flush; - return 0; -} +static int preprocess_step(sunrealtype t, N_Vector y, void* user_data); +static int postprocess_step(sunrealtype t, N_Vector y, void* user_data); +static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data); +static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data); +static int postprocess_stage(sunrealtype t, N_Vector y, void* user_data); int main(int argc, char* argv[]) { @@ -295,4 +182,124 @@ int main(int argc, char* argv[]) return 0; } + +// Callback functions +static int preprocess_step(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Pre-step processing at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Post-step processing at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Post-step failure processing at t = " + << std::setprecision(2) << t << " (tn = " << tn + << " , tcur = " << tcur << ")," << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) +{ + int stage, max_stages; + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetStageIndex" << std::endl; + return -1; + } + std::cout << " [Pre-RHS processing (stage " << stage << " of " << max_stages + << ") at t = " << std::setprecision(2) << t << " (tn = " << tn + << " , tcur = " << tcur << "), " << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +static int postprocess_stage(sunrealtype t, N_Vector y, void* user_data) +{ + int stage, max_stages; + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetStageIndex" << std::endl; + return -1; + } + std::cout << " [Post-stage processing (stage " << stage << " of " + << max_stages << ") at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << "), " + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + /*---- end of file ----*/ diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp index fedff905d4..79bc2ee195 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp @@ -44,124 +44,11 @@ using namespace problems::kpr; // callback functions below. This would normally be stored in user_data, but // here we reuse problem definitions from other tests. void* arkode_mem = nullptr; - -int preprocess_step(sunrealtype t, N_Vector y, void* user_data) -{ - sunrealtype tn, tcur; - if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetLastTime" << std::endl; - return -1; - } - if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; - return -1; - } - std::cout << " [Pre-step processing at t = " << std::setprecision(2) << t - << " (tn = " << tn << " , tcur = " << tcur << ")," - << std::setprecision(10) - << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl - << std::flush; - return 0; -} - -int postprocess_step(sunrealtype t, N_Vector y, void* user_data) -{ - sunrealtype tn, tcur; - if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetLastTime" << std::endl; - return -1; - } - if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; - return -1; - } - std::cout << " [Post-step processing at t = " << std::setprecision(2) << t - << " (tn = " << tn << " , tcur = " << tcur << ")," - << std::setprecision(10) - << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl - << std::flush; - return 0; -} - -int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) -{ - sunrealtype tn, tcur; - if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetLastTime" << std::endl; - return -1; - } - if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; - return -1; - } - std::cout << " [Post-step failure processing at t = " - << std::setprecision(2) << t << " (tn = " << tn - << " , tcur = " << tcur << ")," << std::setprecision(10) - << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl - << std::flush; - return 0; -} - -int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) -{ - int stage, max_stages; - sunrealtype tn, tcur; - if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetLastTime" << std::endl; - return -1; - } - if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; - return -1; - } - if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetStageIndex" << std::endl; - return -1; - } - std::cout << " [Pre-RHS processing (stage " << stage << " of " << max_stages - << ") at t = " << std::setprecision(2) << t << " (tn = " << tn - << " , tcur = " << tcur << "), " << std::setprecision(10) - << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl - << std::flush; - return 0; -} - -int postprocess_stage(sunrealtype t, N_Vector y, void* user_data) -{ - int stage, max_stages; - sunrealtype tn, tcur; - if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetLastTime" << std::endl; - return -1; - } - if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; - return -1; - } - if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetStageIndex" << std::endl; - return -1; - } - std::cout << " [Post-stage processing (stage " << stage << " of " - << max_stages << ") at t = " << std::setprecision(2) << t - << " (tn = " << tn << " , tcur = " << tcur << "), " - << std::setprecision(10) - << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl - << std::flush; - return 0; -} +static int preprocess_step(sunrealtype t, N_Vector y, void* user_data); +static int postprocess_step(sunrealtype t, N_Vector y, void* user_data); +static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data); +static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data); +static int postprocess_stage(sunrealtype t, N_Vector y, void* user_data); int main(int argc, char* argv[]) { @@ -374,4 +261,124 @@ int main(int argc, char* argv[]) return 0; } + +// Callback functions +static int preprocess_step(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Pre-step processing at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Post-step processing at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Post-step failure processing at t = " + << std::setprecision(2) << t << " (tn = " << tn + << " , tcur = " << tcur << ")," << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) +{ + int stage, max_stages; + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetStageIndex" << std::endl; + return -1; + } + std::cout << " [Pre-RHS processing (stage " << stage << " of " << max_stages + << ") at t = " << std::setprecision(2) << t << " (tn = " << tn + << " , tcur = " << tcur << "), " << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +static int postprocess_stage(sunrealtype t, N_Vector y, void* user_data) +{ + int stage, max_stages; + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetStageIndex" << std::endl; + return -1; + } + std::cout << " [Post-stage processing (stage " << stage << " of " + << max_stages << ") at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << "), " + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + /*---- end of file ----*/ diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp index c9f8b89a92..598353f08c 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp @@ -40,124 +40,11 @@ using namespace problems::estep; // callback functions below. This would normally be stored in user_data, but // here we reuse problem definitions from other tests. void* arkode_mem = nullptr; - -int preprocess_step(sunrealtype t, N_Vector y, void* user_data) -{ - sunrealtype tn, tcur; - if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetLastTime" << std::endl; - return -1; - } - if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; - return -1; - } - std::cout << " [Pre-step processing at t = " << std::setprecision(2) << t - << " (tn = " << tn << " , tcur = " << tcur << ")," - << std::setprecision(10) - << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl - << std::flush; - return 0; -} - -int postprocess_step(sunrealtype t, N_Vector y, void* user_data) -{ - sunrealtype tn, tcur; - if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetLastTime" << std::endl; - return -1; - } - if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; - return -1; - } - std::cout << " [Post-step processing at t = " << std::setprecision(2) << t - << " (tn = " << tn << " , tcur = " << tcur << ")," - << std::setprecision(10) - << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl - << std::flush; - return 0; -} - -int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) -{ - sunrealtype tn, tcur; - if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetLastTime" << std::endl; - return -1; - } - if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; - return -1; - } - std::cout << " [Post-step failure processing at t = " - << std::setprecision(2) << t << " (tn = " << tn - << " , tcur = " << tcur << ")," << std::setprecision(10) - << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl - << std::flush; - return 0; -} - -int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) -{ - int stage, max_stages; - sunrealtype tn, tcur; - if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetLastTime" << std::endl; - return -1; - } - if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; - return -1; - } - if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetStageIndex" << std::endl; - return -1; - } - std::cout << " [Pre-RHS processing (stage " << stage << " of " << max_stages - << ") at t = " << std::setprecision(2) << t << " (tn = " << tn - << " , tcur = " << tcur << "), " << std::setprecision(10) - << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl - << std::flush; - return 0; -} - -int postprocess_stage(sunrealtype t, N_Vector y, void* user_data) -{ - int stage, max_stages; - sunrealtype tn, tcur; - if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetLastTime" << std::endl; - return -1; - } - if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; - return -1; - } - if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) - { - std::cerr << "Error in ARKodeGetStageIndex" << std::endl; - return -1; - } - std::cout << " [Post-stage processing (stage " << stage << " of " - << max_stages << ") at t = " << std::setprecision(2) << t - << " (tn = " << tn << " , tcur = " << tcur << "), " - << std::setprecision(10) - << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl - << std::flush; - return 0; -} +static int preprocess_step(sunrealtype t, N_Vector y, void* user_data); +static int postprocess_step(sunrealtype t, N_Vector y, void* user_data); +static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data); +static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data); +static int postprocess_stage(sunrealtype t, N_Vector y, void* user_data); int main(int argc, char* argv[]) { @@ -287,4 +174,124 @@ int main(int argc, char* argv[]) return 0; } + +// Callback functions +static int preprocess_step(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Pre-step processing at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Post-step processing at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) +{ + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + std::cout << " [Post-step failure processing at t = " + << std::setprecision(2) << t << " (tn = " << tn + << " , tcur = " << tcur << ")," << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) +{ + int stage, max_stages; + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetStageIndex" << std::endl; + return -1; + } + std::cout << " [Pre-RHS processing (stage " << stage << " of " << max_stages + << ") at t = " << std::setprecision(2) << t << " (tn = " << tn + << " , tcur = " << tcur << "), " << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + +static int postprocess_stage(sunrealtype t, N_Vector y, void* user_data) +{ + int stage, max_stages; + sunrealtype tn, tcur; + if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetLastTime" << std::endl; + return -1; + } + if (ARKodeGetCurrentTime(arkode_mem, &tcur) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; + return -1; + } + if (ARKodeGetStageIndex(arkode_mem, &stage, &max_stages) != ARK_SUCCESS) + { + std::cerr << "Error in ARKodeGetStageIndex" << std::endl; + return -1; + } + std::cout << " [Post-stage processing (stage " << stage << " of " + << max_stages << ") at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << "), " + << std::setprecision(10) + << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl + << std::flush; + return 0; +} + /*---- end of file ----*/ diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp index 876171bdd7..45df1a2dfd 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp @@ -39,8 +39,101 @@ using namespace problems::kepler; // callback functions below. This would normally be stored in user_data, but // here we reuse problem definitions from other tests. void* arkode_mem = nullptr; +static int preprocess_step(sunrealtype t, N_Vector y, void* user_data); +static int postprocess_step(sunrealtype t, N_Vector y, void* user_data); +static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data); +static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data); +static int postprocess_stage(sunrealtype t, N_Vector y, void* user_data); -int preprocess_step(sunrealtype t, N_Vector y, void* user_data) +int main(int argc, char* argv[]) +{ + cout << "Start SPRKStep StageInfo test" << endl; + + // SUNDIALS context object for this simulation + sundials::Context sunctx; + + // Create initial condition + N_Vector y = N_VNew_Serial(4, sunctx); + if (check_ptr(y, "N_VNew_Serial")) { return 1; } + + int flag = initial_condition(y, eccentricity); + if (check_flag(flag, "initial_condition")) { return 1; } + + // Create SPRKStep memory structure + arkode_mem = SPRKStepCreate(ode_rhs_force, ode_rhs_velocity, zero, y, sunctx); + if (check_ptr(arkode_mem, "SPKStepCreate")) { return 1; } + + // Step size + const sunrealtype dt = SUN_RCONST(0.001); + flag = ARKodeSetFixedStep(arkode_mem, dt); + if (check_flag(flag, "ARKodeSetFixedStep")) { return 1; } + + // Set pre/post step and stage routines + flag = ARKodeSetPreprocessStepFn(arkode_mem, preprocess_step); + if (check_flag(flag, "ARKodeSetPreprocessStepFn")) { return 1; } + flag = ARKodeSetPostprocessStepFn(arkode_mem, postprocess_step); + if (check_flag(flag, "ARKodeSetPostprocessStepFn")) { return 1; } + flag = ARKodeSetPostprocessStepFailFn(arkode_mem, postprocess_step_fail); + if (check_flag(flag, "ARKodeSetPostprocessStepFailFn")) { return 1; } + flag = ARKodeSetPreprocessRHSFn(arkode_mem, preprocess_stage); + if (check_flag(flag, "ARKodeSetPreprocessRHSFn")) { return 1; } + flag = ARKodeSetPostprocessStageFn(arkode_mem, postprocess_stage); + if (check_flag(flag, "ARKodeSetPostprocessStageFn")) { return 1; } + + // Initial time and fist output time + const sunrealtype dtout = dt; // output interval + const int nout = 3; // number of outputs + sunrealtype tret = zero; + sunrealtype tout = tret + dtout; + + // Output initial contion + sunrealtype* ydata = N_VGetArrayPointer(y); + if (check_ptr(y, "N_VGetArrayPointer")) { return 1; } + + cout << scientific; + cout << setprecision(numeric_limits::digits10); + cout << " t "; + cout << " q1 "; + cout << " q2 "; + cout << " q3 "; + cout << " q4 " << endl; + for (int i = 0; i < 9; i++) { cout << "--------------"; } + cout << endl; + + cout << setw(22) << tret << setw(25) << ydata[0] << setw(25) << ydata[1] + << setw(25) << ydata[2] << setw(25) << ydata[3] << endl; + + // Advance in time + for (int i = 0; i < nout; i++) + { + flag = ARKodeEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); + if (check_flag(flag, "ARKodeEvolve")) { return 1; } + + cout << setw(22) << tret << setw(25) << ydata[0] << setw(25) << ydata[1] + << setw(25) << ydata[2] << setw(25) << ydata[3] << endl; + + // update output time + tout += dtout; + } + for (int i = 0; i < 9; i++) { cout << "--------------"; } + cout << endl; + + // Print some final statistics + flag = ARKodePrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); + if (check_flag(flag, "ARKodePrintAllStats")) { return 1; } + + // Clean up and return with successful completion + N_VDestroy(y); + ARKodeFree(&arkode_mem); + + cout << "End SPRKStep StageInfo test" << endl; + + return 0; +} + + +// Callback functions +static int preprocess_step(sunrealtype t, N_Vector y, void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -61,7 +154,7 @@ int preprocess_step(sunrealtype t, N_Vector y, void* user_data) return 0; } -int postprocess_step(sunrealtype t, N_Vector y, void* user_data) +static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -82,7 +175,7 @@ int postprocess_step(sunrealtype t, N_Vector y, void* user_data) return 0; } -int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) +static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -103,7 +196,7 @@ int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) return 0; } -int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) +static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) { int stage, max_stages; sunrealtype tn, tcur; @@ -130,7 +223,7 @@ int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) return 0; } -int postprocess_stage(sunrealtype t, N_Vector y, void* user_data) +static int postprocess_stage(sunrealtype t, N_Vector y, void* user_data) { int stage, max_stages; sunrealtype tn, tcur; @@ -158,90 +251,4 @@ int postprocess_stage(sunrealtype t, N_Vector y, void* user_data) return 0; } -int main(int argc, char* argv[]) -{ - cout << "Start SPRKStep StageInfo test" << endl; - - // SUNDIALS context object for this simulation - sundials::Context sunctx; - - // Create initial condition - N_Vector y = N_VNew_Serial(4, sunctx); - if (check_ptr(y, "N_VNew_Serial")) { return 1; } - - int flag = initial_condition(y, eccentricity); - if (check_flag(flag, "initial_condition")) { return 1; } - - // Create SPRKStep memory structure - arkode_mem = SPRKStepCreate(ode_rhs_force, ode_rhs_velocity, zero, y, sunctx); - if (check_ptr(arkode_mem, "SPKStepCreate")) { return 1; } - - // Step size - const sunrealtype dt = SUN_RCONST(0.001); - flag = ARKodeSetFixedStep(arkode_mem, dt); - if (check_flag(flag, "ARKodeSetFixedStep")) { return 1; } - - // Set pre/post step and stage routines - flag = ARKodeSetPreprocessStepFn(arkode_mem, preprocess_step); - if (check_flag(flag, "ARKodeSetPreprocessStepFn")) { return 1; } - flag = ARKodeSetPostprocessStepFn(arkode_mem, postprocess_step); - if (check_flag(flag, "ARKodeSetPostprocessStepFn")) { return 1; } - flag = ARKodeSetPostprocessStepFailFn(arkode_mem, postprocess_step_fail); - if (check_flag(flag, "ARKodeSetPostprocessStepFailFn")) { return 1; } - flag = ARKodeSetPreprocessRHSFn(arkode_mem, preprocess_stage); - if (check_flag(flag, "ARKodeSetPreprocessRHSFn")) { return 1; } - flag = ARKodeSetPostprocessStageFn(arkode_mem, postprocess_stage); - if (check_flag(flag, "ARKodeSetPostprocessStageFn")) { return 1; } - - // Initial time and fist output time - const sunrealtype dtout = dt; // output interval - const int nout = 3; // number of outputs - sunrealtype tret = zero; - sunrealtype tout = tret + dtout; - - // Output initial contion - sunrealtype* ydata = N_VGetArrayPointer(y); - if (check_ptr(y, "N_VGetArrayPointer")) { return 1; } - - cout << scientific; - cout << setprecision(numeric_limits::digits10); - cout << " t "; - cout << " q1 "; - cout << " q2 "; - cout << " q3 "; - cout << " q4 " << endl; - for (int i = 0; i < 9; i++) { cout << "--------------"; } - cout << endl; - - cout << setw(22) << tret << setw(25) << ydata[0] << setw(25) << ydata[1] - << setw(25) << ydata[2] << setw(25) << ydata[3] << endl; - - // Advance in time - for (int i = 0; i < nout; i++) - { - flag = ARKodeEvolve(arkode_mem, tout, y, &tret, ARK_ONE_STEP); - if (check_flag(flag, "ARKodeEvolve")) { return 1; } - - cout << setw(22) << tret << setw(25) << ydata[0] << setw(25) << ydata[1] - << setw(25) << ydata[2] << setw(25) << ydata[3] << endl; - - // update output time - tout += dtout; - } - for (int i = 0; i < 9; i++) { cout << "--------------"; } - cout << endl; - - // Print some final statistics - flag = ARKodePrintAllStats(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE); - if (check_flag(flag, "ARKodePrintAllStats")) { return 1; } - - // Clean up and return with successful completion - N_VDestroy(y); - ARKodeFree(&arkode_mem); - - cout << "End SPRKStep StageInfo test" << endl; - - return 0; -} - /*---- end of file ----*/ From 385dba93cdb42e0809326df7fdf10f46ca4e02fa Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 30 Jan 2026 17:46:30 -0500 Subject: [PATCH 081/298] Formatting --- test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp | 1 - test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp | 1 - .../arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp | 1 - .../unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp | 1 - test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp | 1 - .../arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp | 1 - .../unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp | 1 - 7 files changed, 7 deletions(-) diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp index 72071487db..4145c3d236 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp @@ -182,7 +182,6 @@ int main(int argc, char* argv[]) return 0; } - // Callback functions static int preprocess_step(sunrealtype t, N_Vector y, void* user_data) { diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp index ee62bae0cd..375bee9e5c 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp @@ -143,7 +143,6 @@ int main(int argc, char* argv[]) return 0; } - // Callback functions static int preprocess_step(sunrealtype t, N_Vector y, void* user_data) { diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp index b3467ea454..e5b6bf75d2 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp @@ -174,7 +174,6 @@ int main(int argc, char* argv[]) return 0; } - // Callback functions static int preprocess_step(sunrealtype t, N_Vector y, void* user_data) { diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp index 03e0cff2cb..cad68e3e32 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp @@ -182,7 +182,6 @@ int main(int argc, char* argv[]) return 0; } - // Callback functions static int preprocess_step(sunrealtype t, N_Vector y, void* user_data) { diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp index 79bc2ee195..86d2c4ec54 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp @@ -261,7 +261,6 @@ int main(int argc, char* argv[]) return 0; } - // Callback functions static int preprocess_step(sunrealtype t, N_Vector y, void* user_data) { diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp index 598353f08c..66b1ee3357 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp @@ -174,7 +174,6 @@ int main(int argc, char* argv[]) return 0; } - // Callback functions static int preprocess_step(sunrealtype t, N_Vector y, void* user_data) { diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp index 45df1a2dfd..8e953e73c2 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp @@ -131,7 +131,6 @@ int main(int argc, char* argv[]) return 0; } - // Callback functions static int preprocess_step(sunrealtype t, N_Vector y, void* user_data) { From 42b97050a00a7341d2967db21da2ab825d0de2c4 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 30 Jan 2026 21:56:47 -0500 Subject: [PATCH 082/298] Updated answers submodule commit --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index 5c2937c5e9..4070d3978d 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 5c2937c5e982cf9a699c57c3e80b77a9a3bb7ea7 +Subproject commit 4070d3978de259c1063961ea0b03c4f43a1256e4 From f4c679d7ee64c3b1c1a90afa91e035411502e7f4 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 3 Feb 2026 09:22:55 -0500 Subject: [PATCH 083/298] Updated ark_test_stageinfo_mristep.cpp to use fixed step sizes, since otherwise imex-mri-gark methods would not be tested --- .../arkode/CXX_serial/ark_test_stageinfo_mristep.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp index 86d2c4ec54..25791660d3 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp @@ -177,6 +177,12 @@ int main(int argc, char* argv[]) flag = ARKodeSStolerances(arkode_mem, rtol, atol); if (check_flag(flag, "ARKodeSStolerances")) { return 1; } + // Set the slow step size + const sunrealtype hfixed = SUN_RCONST(0.001); + + flag = ARKodeSetFixedStep(arkode_mem, hfixed); + if (check_flag(flag, "ARKodeSetFixedStep")) { return 1; } + SUNMatrix A = nullptr; SUNLinearSolver LS = nullptr; From 19c521d9bc6176a6db5893650f3bd55ca4366624 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 3 Feb 2026 10:19:27 -0500 Subject: [PATCH 084/298] Updated .out files for Jenkins --- .../ark_test_stageinfo_arkstep_0.out | 46 +++---- .../ark_test_stageinfo_arkstep_1.out | 54 ++++---- .../ark_test_stageinfo_arkstep_2.out | 64 +++++----- .../CXX_serial/ark_test_stageinfo_erkstep.out | 32 ++--- .../ark_test_stageinfo_lsrkstep_0.out | 6 +- .../ark_test_stageinfo_lsrkstep_3.out | 2 +- .../ark_test_stageinfo_lsrkstep_4.out | 4 +- .../ark_test_stageinfo_lsrkstep_5.out | 4 +- .../ark_test_stageinfo_mristep_0.out | 74 +++++------ .../ark_test_stageinfo_mristep_1.out | 111 +++++++---------- .../ark_test_stageinfo_mristep_2.out | 117 +++++++++--------- .../ark_test_stageinfo_mristep_3.out | 92 ++++++-------- .../ark_test_stageinfo_mristep_4.out | 104 +++++++--------- .../ark_test_stageinfo_mristep_5.out | 106 +++++++--------- .../ark_test_stageinfo_mristep_6.out | 78 +++++------- 15 files changed, 406 insertions(+), 488 deletions(-) diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_0.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_0.out index 9acf3930f3..49bdd17c7d 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_0.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_0.out @@ -1,6 +1,6 @@ Start ARKStep StageInfo test Using ERK method - t u v u err v err + t u v u err v err ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 [Pre-RHS processing (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] @@ -20,27 +20,27 @@ Using ERK method [Pre-step processing at t = 1.03e-04 (tn = 1.03e-04 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] [Post-stage processing (stage 1 of 5) at t = 5.97e-03 (tn = 1.03e-04 , tcur = 5.97e-03), ||y||_2 = 2.1212628048e+00] [Pre-RHS processing (stage 1 of 5) at t = 5.97e-03 (tn = 1.03e-04 , tcur = 5.97e-03), ||y||_2 = 2.1212628048e+00] - [Post-stage processing (stage 2 of 5) at t = 8.90e-03 (tn = 1.03e-04 , tcur = 8.90e-03), ||y||_2 = 2.1151489029e+00] - [Pre-RHS processing (stage 2 of 5) at t = 8.90e-03 (tn = 1.03e-04 , tcur = 8.90e-03), ||y||_2 = 2.1151489029e+00] - [Post-stage processing (stage 3 of 5) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1129070889e+00] - [Pre-RHS processing (stage 3 of 5) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1129070889e+00] - [Post-stage processing (stage 4 of 5) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1110724430e+00] - [Pre-RHS processing (stage 4 of 5) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1110724430e+00] - [Post-step processing at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02),||y||_2 = 2.1110724430e+00] - 1.4770753232e-02 1.2247225752e+00 1.7195003557e+00 2.8937936936e-08 2.5927171299e-08 - [Pre-step processing at t = 1.48e-02 (tn = 1.48e-02 , tcur = 1.48e-02),||y||_2 = 2.1110724430e+00] - [Post-stage processing (stage 1 of 5) at t = 2.06e-02 (tn = 1.48e-02 , tcur = 2.06e-02), ||y||_2 = 2.1030688067e+00] - [Pre-RHS processing (stage 1 of 5) at t = 2.06e-02 (tn = 1.48e-02 , tcur = 2.06e-02), ||y||_2 = 2.1030688067e+00] - [Post-stage processing (stage 2 of 5) at t = 2.35e-02 (tn = 1.48e-02 , tcur = 2.35e-02), ||y||_2 = 2.0933502617e+00] - [Pre-RHS processing (stage 2 of 5) at t = 2.35e-02 (tn = 1.48e-02 , tcur = 2.35e-02), ||y||_2 = 2.0933502617e+00] - [Post-stage processing (stage 3 of 5) at t = 2.93e-02 (tn = 1.48e-02 , tcur = 2.93e-02), ||y||_2 = 2.0833181423e+00] - [Pre-RHS processing (stage 3 of 5) at t = 2.93e-02 (tn = 1.48e-02 , tcur = 2.93e-02), ||y||_2 = 2.0833181423e+00] - [Post-stage processing (stage 4 of 5) at t = 2.93e-02 (tn = 1.48e-02 , tcur = 2.93e-02), ||y||_2 = 2.0816387128e+00] - [Pre-RHS processing (stage 4 of 5) at t = 2.93e-02 (tn = 1.48e-02 , tcur = 2.93e-02), ||y||_2 = 2.0816387128e+00] - [Post-step processing at t = 2.93e-02 (tn = 1.48e-02 , tcur = 2.93e-02),||y||_2 = 2.0816387128e+00] - 2.9275139624e-02 1.2246573481e+00 1.6832807581e+00 5.5763322404e-08 6.7822652161e-08 + [Post-stage processing (stage 2 of 5) at t = 8.90e-03 (tn = 1.03e-04 , tcur = 8.90e-03), ||y||_2 = 2.1151489033e+00] + [Pre-RHS processing (stage 2 of 5) at t = 8.90e-03 (tn = 1.03e-04 , tcur = 8.90e-03), ||y||_2 = 2.1151489033e+00] + [Post-stage processing (stage 3 of 5) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1129070894e+00] + [Pre-RHS processing (stage 3 of 5) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1129070894e+00] + [Post-stage processing (stage 4 of 5) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1110724436e+00] + [Pre-RHS processing (stage 4 of 5) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1110724436e+00] + [Post-step processing at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02),||y||_2 = 2.1110724436e+00] + 1.4770752770e-02 1.2247225752e+00 1.7195003557e+00 2.8937936936e-08 2.5927171299e-08 + [Pre-step processing at t = 1.48e-02 (tn = 1.48e-02 , tcur = 1.48e-02),||y||_2 = 2.1110724436e+00] + [Post-stage processing (stage 1 of 5) at t = 2.06e-02 (tn = 1.48e-02 , tcur = 2.06e-02), ||y||_2 = 2.1030688076e+00] + [Pre-RHS processing (stage 1 of 5) at t = 2.06e-02 (tn = 1.48e-02 , tcur = 2.06e-02), ||y||_2 = 2.1030688076e+00] + [Post-stage processing (stage 2 of 5) at t = 2.35e-02 (tn = 1.48e-02 , tcur = 2.35e-02), ||y||_2 = 2.0933502627e+00] + [Pre-RHS processing (stage 2 of 5) at t = 2.35e-02 (tn = 1.48e-02 , tcur = 2.35e-02), ||y||_2 = 2.0933502627e+00] + [Post-stage processing (stage 3 of 5) at t = 2.93e-02 (tn = 1.48e-02 , tcur = 2.93e-02), ||y||_2 = 2.0833181435e+00] + [Pre-RHS processing (stage 3 of 5) at t = 2.93e-02 (tn = 1.48e-02 , tcur = 2.93e-02), ||y||_2 = 2.0833181435e+00] + [Post-stage processing (stage 4 of 5) at t = 2.93e-02 (tn = 1.48e-02 , tcur = 2.93e-02), ||y||_2 = 2.0816387141e+00] + [Pre-RHS processing (stage 4 of 5) at t = 2.93e-02 (tn = 1.48e-02 , tcur = 2.93e-02), ||y||_2 = 2.0816387141e+00] + [Post-step processing at t = 2.93e-02 (tn = 1.48e-02 , tcur = 2.93e-02),||y||_2 = 2.0816387141e+00] + 2.9275139161e-02 1.2246573481e+00 1.6832807581e+00 5.5763322404e-08 6.7822652161e-08 ------------------------------------------------------------------------------------------------------------------------------ -Current time = 0.0292751396243773 +Current time = 0.0292751391609328 Steps = 3 Step attempts = 3 Stability limited steps = 0 @@ -49,8 +49,8 @@ Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 Initial step size = 0.000102986025609508 -Last step size = 0.0145043863921471 -Current step size = 0.0149829090932849 +Last step size = 0.0145043863910885 +Current step size = 0.0149829090634053 Explicit RHS fn evals = 15 Implicit RHS fn evals = 0 NLS iters = 0 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_1.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_1.out index e71dadd09c..59318ce051 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_1.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_1.out @@ -2,7 +2,7 @@ Start ARKStep StageInfo test Using DIRK method Using Newton nonlinear solver Using GMRES iterative linear solver - t u v u err v err + t u v u err v err ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 [Pre-RHS processing (stage 0 of 6) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] @@ -22,33 +22,33 @@ Using GMRES iterative linear solver [Post-step processing at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] 1.0298602561e-04 1.2247448703e+00 1.7320501952e+00 7.8541617654e-12 2.7311486406e-14 [Pre-step processing at t = 1.03e-04 (tn = 1.03e-04 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] - [Post-stage processing (stage 1 of 6) at t = 8.22e-03 (tn = 1.03e-04 , tcur = 8.22e-03), ||y||_2 = 2.1181363096e+00] - [Pre-RHS processing (stage 1 of 6) at t = 8.22e-03 (tn = 1.03e-04 , tcur = 8.22e-03), ||y||_2 = 2.1181363096e+00] + [Post-stage processing (stage 1 of 6) at t = 8.22e-03 (tn = 1.03e-04 , tcur = 8.22e-03), ||y||_2 = 2.1181363098e+00] + [Pre-RHS processing (stage 1 of 6) at t = 8.22e-03 (tn = 1.03e-04 , tcur = 8.22e-03), ||y||_2 = 2.1181363098e+00] [Post-stage processing (stage 2 of 6) at t = 2.48e-03 (tn = 1.03e-04 , tcur = 2.48e-03), ||y||_2 = 2.1210284133e+00] [Pre-RHS processing (stage 2 of 6) at t = 2.48e-03 (tn = 1.03e-04 , tcur = 2.48e-03), ||y||_2 = 2.1210284133e+00] - [Post-stage processing (stage 3 of 6) at t = 1.03e-02 (tn = 1.03e-04 , tcur = 1.03e-02), ||y||_2 = 2.1163721824e+00] - [Pre-RHS processing (stage 3 of 6) at t = 1.03e-02 (tn = 1.03e-04 , tcur = 1.03e-02), ||y||_2 = 2.1163721824e+00] - [Post-stage processing (stage 4 of 6) at t = 1.70e-02 (tn = 1.03e-04 , tcur = 1.70e-02), ||y||_2 = 2.1077895068e+00] - [Pre-RHS processing (stage 4 of 6) at t = 1.70e-02 (tn = 1.03e-04 , tcur = 1.70e-02), ||y||_2 = 2.1077895068e+00] - [Post-stage processing (stage 5 of 6) at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02), ||y||_2 = 2.1087851653e+00] - [Pre-RHS processing (stage 5 of 6) at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02), ||y||_2 = 2.1087851653e+00] - [Post-step processing at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02),||y||_2 = 2.1087851653e+00] - 1.6345098954e-02 1.2247176001e+00 1.7166949855e+00 4.4663852616e-09 6.0447387096e-09 - [Pre-step processing at t = 1.63e-02 (tn = 1.63e-02 , tcur = 1.63e-02),||y||_2 = 2.1087851653e+00] - [Post-stage processing (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.0935030131e+00] - [Pre-RHS processing (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.0935030131e+00] - [Post-stage processing (stage 2 of 6) at t = 1.87e-02 (tn = 1.63e-02 , tcur = 1.87e-02), ||y||_2 = 2.1049048030e+00] - [Pre-RHS processing (stage 2 of 6) at t = 1.87e-02 (tn = 1.63e-02 , tcur = 1.87e-02), ||y||_2 = 2.1049048030e+00] - [Post-stage processing (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.0887671857e+00] - [Pre-RHS processing (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.0887671857e+00] - [Post-stage processing (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.0705966594e+00] - [Pre-RHS processing (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.0705966594e+00] - [Post-stage processing (stage 5 of 6) at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), ||y||_2 = 2.0724934048e+00] - [Pre-RHS processing (stage 5 of 6) at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), ||y||_2 = 2.0724934048e+00] - [Post-step processing at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02),||y||_2 = 2.0724934048e+00] - 3.2548715292e-02 1.2246367417e+00 1.6719730154e+00 8.0260507129e-09 5.9880216341e-09 + [Post-stage processing (stage 3 of 6) at t = 1.03e-02 (tn = 1.03e-04 , tcur = 1.03e-02), ||y||_2 = 2.1163721828e+00] + [Pre-RHS processing (stage 3 of 6) at t = 1.03e-02 (tn = 1.03e-04 , tcur = 1.03e-02), ||y||_2 = 2.1163721828e+00] + [Post-stage processing (stage 4 of 6) at t = 1.70e-02 (tn = 1.03e-04 , tcur = 1.70e-02), ||y||_2 = 2.1077895079e+00] + [Pre-RHS processing (stage 4 of 6) at t = 1.70e-02 (tn = 1.03e-04 , tcur = 1.70e-02), ||y||_2 = 2.1077895079e+00] + [Post-stage processing (stage 5 of 6) at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02), ||y||_2 = 2.1087851663e+00] + [Pre-RHS processing (stage 5 of 6) at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02), ||y||_2 = 2.1087851663e+00] + [Post-step processing at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02),||y||_2 = 2.1087851663e+00] + 1.6345098313e-02 1.2247176001e+00 1.7166949855e+00 4.4663852616e-09 6.0447387096e-09 + [Pre-step processing at t = 1.63e-02 (tn = 1.63e-02 , tcur = 1.63e-02),||y||_2 = 2.1087851663e+00] + [Post-stage processing (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.0935030146e+00] + [Pre-RHS processing (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.0935030146e+00] + [Post-stage processing (stage 2 of 6) at t = 1.87e-02 (tn = 1.63e-02 , tcur = 1.87e-02), ||y||_2 = 2.1049048041e+00] + [Pre-RHS processing (stage 2 of 6) at t = 1.87e-02 (tn = 1.63e-02 , tcur = 1.87e-02), ||y||_2 = 2.1049048041e+00] + [Post-stage processing (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.0887671872e+00] + [Pre-RHS processing (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.0887671872e+00] + [Post-stage processing (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.0705966613e+00] + [Pre-RHS processing (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.0705966613e+00] + [Post-stage processing (stage 5 of 6) at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), ||y||_2 = 2.0724934067e+00] + [Pre-RHS processing (stage 5 of 6) at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), ||y||_2 = 2.0724934067e+00] + [Post-step processing at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02),||y||_2 = 2.0724934067e+00] + 3.2548714654e-02 1.2246367417e+00 1.6719730154e+00 8.0260507129e-09 5.9880216341e-09 ------------------------------------------------------------------------------------------------------------------------------ -Current time = 0.0325487152923576 +Current time = 0.0325487146540888 Steps = 3 Step attempts = 3 Stability limited steps = 0 @@ -57,8 +57,8 @@ Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 Initial step size = 0.000102986025609508 -Last step size = 0.0162036163379197 -Current step size = 0.0160003634180696 +Last step size = 0.0162036163408584 +Current step size = 0.0160003634285686 Explicit RHS fn evals = 0 Implicit RHS fn evals = 49 NLS iters = 31 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_2.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_2.out index c7df90650a..6b88dade9c 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_2.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_2.out @@ -2,7 +2,7 @@ Start ARKStep StageInfo test Using ImEx method Using Newton nonlinear solver Using GMRES iterative linear solver - t u v u err v err + t u v u err v err ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 [Pre-RHS processing (stage 0 of 7) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] @@ -27,36 +27,36 @@ Using GMRES iterative linear solver [Pre-RHS processing (stage 0 of 7) at t = 1.03e-04 (tn = 1.03e-04 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] [Post-stage processing (stage 1 of 7) at t = 8.73e-03 (tn = 1.03e-04 , tcur = 8.73e-03), ||y||_2 = 2.1212262228e+00] [Pre-RHS processing (stage 1 of 7) at t = 8.73e-03 (tn = 1.03e-04 , tcur = 8.73e-03), ||y||_2 = 2.1212262228e+00] - [Post-stage processing (stage 2 of 7) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1109953892e+00] - [Pre-RHS processing (stage 2 of 7) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1109953892e+00] - [Post-stage processing (stage 3 of 7) at t = 1.18e-02 (tn = 1.03e-04 , tcur = 1.18e-02), ||y||_2 = 2.1147654976e+00] - [Pre-RHS processing (stage 3 of 7) at t = 1.18e-02 (tn = 1.03e-04 , tcur = 1.18e-02), ||y||_2 = 2.1147654976e+00] - [Post-stage processing (stage 4 of 7) at t = 2.72e-03 (tn = 1.03e-04 , tcur = 2.72e-03), ||y||_2 = 2.1209503426e+00] - [Pre-RHS processing (stage 4 of 7) at t = 2.72e-03 (tn = 1.03e-04 , tcur = 2.72e-03), ||y||_2 = 2.1209503426e+00] - [Post-stage processing (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.0932817810e+00] - [Pre-RHS processing (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.0932817810e+00] - [Post-stage processing (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.0649469358e+00] - [Pre-RHS processing (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.0649469358e+00] - [Post-step processing at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02),||y||_2 = 2.0649991558e+00] - 3.5024521932e-02 1.2246196097e+00 1.6626870797e+00 6.6819398681e-08 6.5525542281e-07 - [Pre-step processing at t = 3.50e-02 (tn = 3.50e-02 , tcur = 3.50e-02),||y||_2 = 2.0649991558e+00] - [Pre-RHS processing (stage 0 of 7) at t = 3.50e-02 (tn = 3.50e-02 , tcur = 3.50e-02), ||y||_2 = 2.0649991558e+00] - [Post-stage processing (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0383161449e+00] - [Pre-RHS processing (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0383161449e+00] - [Post-stage processing (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0114194404e+00] - [Pre-RHS processing (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0114194404e+00] - [Post-stage processing (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0236366549e+00] - [Pre-RHS processing (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0236366549e+00] - [Post-stage processing (stage 4 of 7) at t = 3.76e-02 (tn = 3.50e-02 , tcur = 3.76e-02), ||y||_2 = 2.0565070541e+00] - [Pre-RHS processing (stage 4 of 7) at t = 3.76e-02 (tn = 3.50e-02 , tcur = 3.76e-02), ||y||_2 = 2.0565070541e+00] - [Post-stage processing (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 1.9686914710e+00] - [Pre-RHS processing (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 1.9686914710e+00] - [Post-stage processing (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 1.9163758117e+00] - [Pre-RHS processing (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 1.9163758117e+00] - [Post-step processing at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02),||y||_2 = 1.9169542285e+00] - 6.9697813939e-02 1.2242491983e+00 1.4751025098e+00 2.2221884333e-08 2.5857302401e-06 + [Post-stage processing (stage 2 of 7) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1109953910e+00] + [Pre-RHS processing (stage 2 of 7) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1109953910e+00] + [Post-stage processing (stage 3 of 7) at t = 1.18e-02 (tn = 1.03e-04 , tcur = 1.18e-02), ||y||_2 = 2.1147654988e+00] + [Pre-RHS processing (stage 3 of 7) at t = 1.18e-02 (tn = 1.03e-04 , tcur = 1.18e-02), ||y||_2 = 2.1147654988e+00] + [Post-stage processing (stage 4 of 7) at t = 2.72e-03 (tn = 1.03e-04 , tcur = 2.72e-03), ||y||_2 = 2.1209503427e+00] + [Pre-RHS processing (stage 4 of 7) at t = 2.72e-03 (tn = 1.03e-04 , tcur = 2.72e-03), ||y||_2 = 2.1209503427e+00] + [Post-stage processing (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.0932817859e+00] + [Pre-RHS processing (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.0932817859e+00] + [Post-stage processing (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.0649469454e+00] + [Pre-RHS processing (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.0649469454e+00] + [Post-step processing at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02),||y||_2 = 2.0649991654e+00] + 3.5024518851e-02 1.2246196097e+00 1.6626870797e+00 6.6819398681e-08 6.5525542281e-07 + [Pre-step processing at t = 3.50e-02 (tn = 3.50e-02 , tcur = 3.50e-02),||y||_2 = 2.0649991654e+00] + [Pre-RHS processing (stage 0 of 7) at t = 3.50e-02 (tn = 3.50e-02 , tcur = 3.50e-02), ||y||_2 = 2.0649991654e+00] + [Post-stage processing (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0383161565e+00] + [Pre-RHS processing (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0383161565e+00] + [Post-stage processing (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0114194532e+00] + [Pre-RHS processing (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0114194532e+00] + [Post-stage processing (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0236366671e+00] + [Pre-RHS processing (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0236366671e+00] + [Post-stage processing (stage 4 of 7) at t = 3.76e-02 (tn = 3.50e-02 , tcur = 3.76e-02), ||y||_2 = 2.0565070643e+00] + [Pre-RHS processing (stage 4 of 7) at t = 3.76e-02 (tn = 3.50e-02 , tcur = 3.76e-02), ||y||_2 = 2.0565070643e+00] + [Post-stage processing (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 1.9686914853e+00] + [Pre-RHS processing (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 1.9686914853e+00] + [Post-stage processing (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 1.9163758274e+00] + [Pre-RHS processing (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 1.9163758274e+00] + [Post-step processing at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02),||y||_2 = 1.9169542441e+00] + 6.9697810906e-02 1.2242491983e+00 1.4751025098e+00 2.2221884333e-08 2.5857302401e-06 ------------------------------------------------------------------------------------------------------------------------------ -Current time = 0.0696978139393375 +Current time = 0.0696978109064544 Steps = 3 Step attempts = 3 Stability limited steps = 0 @@ -65,8 +65,8 @@ Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 Initial step size = 0.000102986025609508 -Last step size = 0.0346732920075373 -Current step size = 0.0331306528243113 +Last step size = 0.0346732920553526 +Current step size = 0.0331306530355695 Explicit RHS fn evals = 23 Implicit RHS fn evals = 62 NLS iters = 39 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.out index 24eb193950..f14856a4d7 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.out @@ -1,5 +1,5 @@ Start ERKStep StageInfo test - t u v u err v err + t u v u err v err ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 [Pre-RHS processing (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] @@ -19,13 +19,13 @@ Start ERKStep StageInfo test [Pre-step processing at t = 1.03e-04 (tn = 1.03e-04 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] [Post-stage processing (stage 1 of 5) at t = 6.56e-03 (tn = 1.03e-04 , tcur = 6.56e-03), ||y||_2 = 2.1212571010e+00] [Pre-RHS processing (stage 1 of 5) at t = 6.56e-03 (tn = 1.03e-04 , tcur = 6.56e-03), ||y||_2 = 2.1212571010e+00] - [Post-stage processing (stage 2 of 5) at t = 9.78e-03 (tn = 1.03e-04 , tcur = 9.78e-03), ||y||_2 = 2.1138657560e+00] - [Pre-RHS processing (stage 2 of 5) at t = 9.78e-03 (tn = 1.03e-04 , tcur = 9.78e-03), ||y||_2 = 2.1138657560e+00] - [Post-stage processing (stage 3 of 5) at t = 1.62e-02 (tn = 1.03e-04 , tcur = 1.62e-02), ||y||_2 = 2.1111621624e+00] - [Pre-RHS processing (stage 3 of 5) at t = 1.62e-02 (tn = 1.03e-04 , tcur = 1.62e-02), ||y||_2 = 2.1111621624e+00] - [Post-stage processing (stage 4 of 5) at t = 1.62e-02 (tn = 1.03e-04 , tcur = 1.62e-02), ||y||_2 = 2.1089486495e+00] - [Pre-RHS processing (stage 4 of 5) at t = 1.62e-02 (tn = 1.03e-04 , tcur = 1.62e-02), ||y||_2 = 2.1089486495e+00] - [Post-step failure processing at t = 1.62e-02 (tn = 1.03e-04 , tcur = 1.62e-02),||y||_2 = 2.1089486495e+00] + [Post-stage processing (stage 2 of 5) at t = 9.78e-03 (tn = 1.03e-04 , tcur = 9.78e-03), ||y||_2 = 2.1138657565e+00] + [Pre-RHS processing (stage 2 of 5) at t = 9.78e-03 (tn = 1.03e-04 , tcur = 9.78e-03), ||y||_2 = 2.1138657565e+00] + [Post-stage processing (stage 3 of 5) at t = 1.62e-02 (tn = 1.03e-04 , tcur = 1.62e-02), ||y||_2 = 2.1111621630e+00] + [Pre-RHS processing (stage 3 of 5) at t = 1.62e-02 (tn = 1.03e-04 , tcur = 1.62e-02), ||y||_2 = 2.1111621630e+00] + [Post-stage processing (stage 4 of 5) at t = 1.62e-02 (tn = 1.03e-04 , tcur = 1.62e-02), ||y||_2 = 2.1089486502e+00] + [Pre-RHS processing (stage 4 of 5) at t = 1.62e-02 (tn = 1.03e-04 , tcur = 1.62e-02), ||y||_2 = 2.1089486502e+00] + [Post-step failure processing at t = 1.62e-02 (tn = 1.03e-04 , tcur = 1.62e-02),||y||_2 = 2.1089486502e+00] [Pre-step processing at t = 1.03e-04 (tn = 1.03e-04 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] [Post-stage processing (stage 1 of 5) at t = 6.49e-03 (tn = 1.03e-04 , tcur = 6.49e-03), ||y||_2 = 2.1212577772e+00] [Pre-RHS processing (stage 1 of 5) at t = 6.49e-03 (tn = 1.03e-04 , tcur = 6.49e-03), ||y||_2 = 2.1212577772e+00] @@ -36,7 +36,7 @@ Start ERKStep StageInfo test [Post-stage processing (stage 4 of 5) at t = 1.61e-02 (tn = 1.03e-04 , tcur = 1.61e-02), ||y||_2 = 2.1092106860e+00] [Pre-RHS processing (stage 4 of 5) at t = 1.61e-02 (tn = 1.03e-04 , tcur = 1.61e-02), ||y||_2 = 2.1092106860e+00] [Post-step processing at t = 1.61e-02 (tn = 1.03e-04 , tcur = 1.61e-02),||y||_2 = 2.1092106860e+00] - 1.6063645342e-02 1.2247184913e+00 1.7172170321e+00 4.4212199679e-08 2.9106373090e-08 + 1.6063645340e-02 1.2247184913e+00 1.7172170321e+00 4.4212199679e-08 2.9106373090e-08 [Pre-step processing at t = 1.61e-02 (tn = 1.61e-02 , tcur = 1.61e-02),||y||_2 = 2.1092106860e+00] [Post-stage processing (stage 1 of 5) at t = 2.24e-02 (tn = 1.61e-02 , tcur = 2.24e-02), ||y||_2 = 2.0996520676e+00] [Pre-RHS processing (stage 1 of 5) at t = 2.24e-02 (tn = 1.61e-02 , tcur = 2.24e-02), ||y||_2 = 2.0996520676e+00] @@ -44,12 +44,12 @@ Start ERKStep StageInfo test [Pre-RHS processing (stage 2 of 5) at t = 2.56e-02 (tn = 1.61e-02 , tcur = 2.56e-02), ||y||_2 = 2.0880076268e+00] [Post-stage processing (stage 3 of 5) at t = 3.20e-02 (tn = 1.61e-02 , tcur = 3.20e-02), ||y||_2 = 2.0760211062e+00] [Pre-RHS processing (stage 3 of 5) at t = 3.20e-02 (tn = 1.61e-02 , tcur = 3.20e-02), ||y||_2 = 2.0760211062e+00] - [Post-stage processing (stage 4 of 5) at t = 3.20e-02 (tn = 1.61e-02 , tcur = 3.20e-02), ||y||_2 = 2.0740200714e+00] - [Pre-RHS processing (stage 4 of 5) at t = 3.20e-02 (tn = 1.61e-02 , tcur = 3.20e-02), ||y||_2 = 2.0740200714e+00] - [Post-step processing at t = 3.20e-02 (tn = 1.61e-02 , tcur = 3.20e-02),||y||_2 = 2.0740200714e+00] - 3.2023388183e-02 1.2246401240e+00 1.6738625462e+00 8.7464898657e-08 1.4947668547e-07 + [Post-stage processing (stage 4 of 5) at t = 3.20e-02 (tn = 1.61e-02 , tcur = 3.20e-02), ||y||_2 = 2.0740200715e+00] + [Pre-RHS processing (stage 4 of 5) at t = 3.20e-02 (tn = 1.61e-02 , tcur = 3.20e-02), ||y||_2 = 2.0740200715e+00] + [Post-step processing at t = 3.20e-02 (tn = 1.61e-02 , tcur = 3.20e-02),||y||_2 = 2.0740200715e+00] + 3.2023388180e-02 1.2246401240e+00 1.6738625462e+00 8.7464898657e-08 1.4947668547e-07 ------------------------------------------------------------------------------------------------------------------------------ -Current time = 0.032023388183152 +Current time = 0.0320233881803733 Steps = 3 Step attempts = 4 Stability limited steps = 0 @@ -58,7 +58,7 @@ Error test fails = 1 NLS step fails = 0 Inequality constraint fails = 0 Initial step size = 0.000102986025609508 -Last step size = 0.0159597428408395 -Current step size = 0.0166588795525631 +Last step size = 0.0159597428408288 +Current step size = 0.0166588795523219 RHS fn evals = 19 End ERKStep StageInfo test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_0.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_0.out index db25a45643..de95754b54 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_0.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_0.out @@ -11,19 +11,19 @@ Using RKC method [Pre-RHS processing (stage 1 of 2) at t = 1.47e-12 (tn = 0.00e+00 , tcur = 1.47e-12), ||y||_2 = 1.4693648727e-12] [Pre-RHS processing (stage 2 of 2) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] [Post-step processing at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] - 6.1035156250e-12 6.1035156250e-12 2.5041600575e-26 + 6.1035156250e-12 6.1035156250e-12 1.2116903504e-26 [Pre-step processing at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] [Post-stage processing (stage 0 of 2) at t = 1.47e-08 (tn = 6.10e-12 , tcur = 1.47e-08), ||y||_2 = 1.4699752242e-08] [Pre-RHS processing (stage 1 of 2) at t = 1.47e-08 (tn = 6.10e-12 , tcur = 1.47e-08), ||y||_2 = 1.4699752242e-08] [Pre-RHS processing (stage 2 of 2) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] [Post-step processing at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] - 6.1041259766e-08 6.1041259766e-08 1.8528845721e-22 + 6.1041259766e-08 6.1041259766e-08 5.2939559203e-22 [Pre-step processing at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] [Post-stage processing (stage 0 of 2) at t = 3.55e-07 (tn = 6.10e-08 , tcur = 3.55e-07), ||y||_2 = 3.5491423430e-07] [Pre-RHS processing (stage 1 of 2) at t = 3.55e-07 (tn = 6.10e-08 , tcur = 3.55e-07), ||y||_2 = 3.5491423430e-07] [Pre-RHS processing (stage 2 of 2) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] [Post-step processing at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06),||y||_2 = 1.2817443848e-06] - 1.2817443848e-06 1.2817443848e-06 3.8222361745e-19 + 1.2817443848e-06 1.2817443848e-06 3.8518823276e-19 --------------------------------------------------------------------- Current time = 1.28174438476563e-06 Steps = 3 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_3.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_3.out index 9b8549e6b9..9479df8ba7 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_3.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_3.out @@ -44,7 +44,7 @@ Using SSP(s,3) method [Post-stage processing (stage 7 of 9) at t = 5.09e-08 (tn = 6.10e-12 , tcur = 5.09e-08), ||y||_2 = 5.0868733724e-08] [Pre-RHS processing (stage 8 of 9) at t = 5.09e-08 (tn = 6.10e-12 , tcur = 5.09e-08), ||y||_2 = 5.0868733724e-08] [Post-step processing at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] - 6.1041259766e-08 6.1041259766e-08 1.3234889801e-23 + 6.1041259766e-08 6.1041259766e-08 0.0000000000e+00 [Pre-step processing at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] [Pre-RHS processing (stage 0 of 9) at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] [Post-stage processing (stage 0 of 9) at t = 2.64e-07 (tn = 6.10e-08 , tcur = 2.64e-07), ||y||_2 = 2.6449178060e-07] diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_4.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_4.out index 711b393e9d..e802bfd349 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_4.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_4.out @@ -24,7 +24,7 @@ Using SSP(4,3) method [Post-stage processing (stage 2 of 4) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] [Pre-RHS processing (stage 3 of 4) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] [Post-step processing at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] - 6.1041259766e-08 6.1041259766e-08 1.3234889801e-23 + 6.1041259766e-08 6.1041259766e-08 0.0000000000e+00 [Pre-step processing at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] [Pre-RHS processing (stage 0 of 4) at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] [Post-stage processing (stage 0 of 4) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] @@ -34,7 +34,7 @@ Using SSP(4,3) method [Post-stage processing (stage 2 of 4) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] [Pre-RHS processing (stage 3 of 4) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] [Post-step processing at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06),||y||_2 = 1.2817443848e-06] - 1.2817443848e-06 1.2817443848e-06 0.0000000000e+00 + 1.2817443848e-06 1.2817443848e-06 2.1175823681e-22 --------------------------------------------------------------------- Current time = 1.28174438476563e-06 Steps = 3 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_5.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_5.out index f5f575c0a7..7239080362 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_5.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_5.out @@ -27,7 +27,7 @@ Using SSP(10,4) method [Post-stage processing (stage 8 of 10) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] [Pre-RHS processing (stage 9 of 10) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] [Post-step processing at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] - 6.1035156250e-12 6.1035156250e-12 2.4233807008e-27 + 6.1035156250e-12 6.1035156250e-12 8.0779356695e-28 [Pre-step processing at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] [Pre-RHS processing (stage 0 of 10) at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] [Post-stage processing (stage 0 of 10) at t = 1.02e-08 (tn = 6.10e-12 , tcur = 1.02e-08), ||y||_2 = 1.0178629557e-08] @@ -73,7 +73,7 @@ Using SSP(10,4) method [Post-stage processing (stage 8 of 10) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] [Pre-RHS processing (stage 9 of 10) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] [Post-step processing at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06),||y||_2 = 1.2817443848e-06] - 1.2817443848e-06 1.2817443848e-06 6.3527471044e-22 + 1.2817443848e-06 1.2817443848e-06 8.4703294725e-22 --------------------------------------------------------------------- Current time = 1.28174438476563e-06 Steps = 3 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_0.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_0.out index f6b394a890..d9e0a94bac 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_0.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_0.out @@ -3,54 +3,46 @@ Using Ex-MRI-GARK method t u v u err v err ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-RHS processing (stage 0 of 4) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] [Pre-RHS processing (stage 0 of 4) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] - [Post-stage processing (stage 1 of 4) at t = 3.33e-02 (tn = 0.00e+00 , tcur = 3.33e-02), ||y||_2 = 2.0702389129e+00] - [Pre-RHS processing (stage 1 of 4) at t = 3.33e-02 (tn = 0.00e+00 , tcur = 3.33e-02), ||y||_2 = 2.0702389129e+00] - [Post-stage processing (stage 2 of 4) at t = 6.67e-02 (tn = 0.00e+00 , tcur = 6.67e-02), ||y||_2 = 1.9323793744e+00] - [Pre-RHS processing (stage 2 of 4) at t = 6.67e-02 (tn = 0.00e+00 , tcur = 6.67e-02), ||y||_2 = 1.9323793744e+00] - [Post-stage processing (stage 3 of 4) at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01), ||y||_2 = 1.7553792942e+00] - [Post-step failure processing at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01),||y||_2 = 1.7553792942e+00] - [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] - [Post-stage processing (stage 1 of 4) at t = 1.79e-02 (tn = 0.00e+00 , tcur = 1.79e-02), ||y||_2 = 2.1062747196e+00] - [Pre-RHS processing (stage 1 of 4) at t = 1.79e-02 (tn = 0.00e+00 , tcur = 1.79e-02), ||y||_2 = 2.1062747196e+00] - [Post-stage processing (stage 2 of 4) at t = 3.59e-02 (tn = 0.00e+00 , tcur = 3.59e-02), ||y||_2 = 2.0623617667e+00] - [Pre-RHS processing (stage 2 of 4) at t = 3.59e-02 (tn = 0.00e+00 , tcur = 3.59e-02), ||y||_2 = 2.0623617667e+00] - [Post-stage processing (stage 3 of 4) at t = 5.38e-02 (tn = 0.00e+00 , tcur = 5.38e-02), ||y||_2 = 1.9935724472e+00] - [Post-step processing at t = 5.38e-02 (tn = 0.00e+00 , tcur = 5.38e-02),||y||_2 = 1.9935724472e+00] - 5.3788411835e-02 1.2244498085e+00 1.5732303610e+00 1.8680695546e-07 8.2659525269e-07 - [Pre-step processing at t = 5.38e-02 (tn = 5.38e-02 , tcur = 5.38e-02),||y||_2 = 1.9935724472e+00] - [Pre-RHS processing (stage 0 of 4) at t = 5.38e-02 (tn = 5.38e-02 , tcur = 5.38e-02), ||y||_2 = 1.9935724472e+00] - [Post-stage processing (stage 1 of 4) at t = 7.17e-02 (tn = 5.38e-02 , tcur = 7.17e-02), ||y||_2 = 1.9065588348e+00] - [Pre-RHS processing (stage 1 of 4) at t = 7.17e-02 (tn = 5.38e-02 , tcur = 7.17e-02), ||y||_2 = 1.9065588348e+00] - [Post-stage processing (stage 2 of 4) at t = 8.96e-02 (tn = 5.38e-02 , tcur = 8.96e-02), ||y||_2 = 1.8105164121e+00] - [Pre-RHS processing (stage 2 of 4) at t = 8.96e-02 (tn = 5.38e-02 , tcur = 8.96e-02), ||y||_2 = 1.8105164121e+00] - [Post-stage processing (stage 3 of 4) at t = 1.08e-01 (tn = 5.38e-02 , tcur = 1.08e-01), ||y||_2 = 1.7172269130e+00] - [Post-step processing at t = 1.08e-01 (tn = 5.38e-02 , tcur = 1.08e-01),||y||_2 = 1.7172269130e+00] - 1.0755261194e-01 1.2235651438e+00 1.2048886296e+00 3.1283219726e-07 2.2452351258e-06 - [Pre-step processing at t = 1.08e-01 (tn = 1.08e-01 , tcur = 1.08e-01),||y||_2 = 1.7172269130e+00] - [Pre-RHS processing (stage 0 of 4) at t = 1.08e-01 (tn = 1.08e-01 , tcur = 1.08e-01), ||y||_2 = 1.7172269130e+00] - [Post-stage processing (stage 1 of 4) at t = 1.26e-01 (tn = 1.08e-01 , tcur = 1.26e-01), ||y||_2 = 1.6395059572e+00] - [Pre-RHS processing (stage 1 of 4) at t = 1.26e-01 (tn = 1.08e-01 , tcur = 1.26e-01), ||y||_2 = 1.6395059572e+00] - [Post-stage processing (stage 2 of 4) at t = 1.44e-01 (tn = 1.08e-01 , tcur = 1.44e-01), ||y||_2 = 1.5908512726e+00] - [Pre-RHS processing (stage 2 of 4) at t = 1.44e-01 (tn = 1.08e-01 , tcur = 1.44e-01), ||y||_2 = 1.5908512726e+00] - [Post-stage processing (stage 3 of 4) at t = 1.62e-01 (tn = 1.08e-01 , tcur = 1.62e-01), ||y||_2 = 1.5804053561e+00] - [Post-step processing at t = 1.62e-01 (tn = 1.08e-01 , tcur = 1.62e-01),||y||_2 = 1.5804053561e+00] - 1.6166698095e-01 1.2220806635e+00 1.0020977704e+00 4.0194574003e-07 2.9238596286e-06 + [Post-stage processing (stage 1 of 4) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213151057e+00] + [Pre-RHS processing (stage 1 of 4) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213151057e+00] + [Post-stage processing (stage 2 of 4) at t = 7.50e-04 (tn = 0.00e+00 , tcur = 7.50e-04), ||y||_2 = 2.1212937905e+00] + [Pre-RHS processing (stage 2 of 4) at t = 7.50e-04 (tn = 0.00e+00 , tcur = 7.50e-04), ||y||_2 = 2.1212937905e+00] + [Post-stage processing (stage 3 of 4) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] + [Post-step processing at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] + 1.0000000000e-03 1.2247447693e+00 1.7319930735e+00 2.2426505097e-14 1.9984014443e-15 + [Pre-step processing at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] + [Pre-RHS processing (stage 0 of 4) at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] + [Post-stage processing (stage 1 of 4) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212364434e+00] + [Pre-RHS processing (stage 1 of 4) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212364434e+00] + [Post-stage processing (stage 2 of 4) at t = 1.75e-03 (tn = 1.00e-03 , tcur = 1.75e-03), ||y||_2 = 2.1211758016e+00] + [Pre-RHS processing (stage 2 of 4) at t = 1.75e-03 (tn = 1.00e-03 , tcur = 1.75e-03), ||y||_2 = 2.1211758016e+00] + [Post-stage processing (stage 3 of 4) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] + [Post-step processing at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] + 2.0000000000e-03 1.2247444631e+00 1.7318198829e+00 4.4853010195e-14 3.7747582837e-15 + [Pre-step processing at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] + [Pre-RHS processing (stage 0 of 4) at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] + [Post-stage processing (stage 1 of 4) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1210634067e+00] + [Pre-RHS processing (stage 1 of 4) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1210634067e+00] + [Post-stage processing (stage 2 of 4) at t = 2.75e-03 (tn = 2.00e-03 , tcur = 2.75e-03), ||y||_2 = 2.1209634544e+00] + [Pre-RHS processing (stage 2 of 4) at t = 2.75e-03 (tn = 2.00e-03 , tcur = 2.75e-03), ||y||_2 = 2.1209634544e+00] + [Post-stage processing (stage 3 of 4) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956339e+00] + [Post-step processing at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03),||y||_2 = 2.1208956339e+00] + 3.0000000000e-03 1.2247439528e+00 1.7315312703e+00 6.7279515292e-14 5.3290705182e-15 ------------------------------------------------------------------------------------------------------------------------------ -Current time = 0.161666980946477 +Current time = 0.003 Steps = 3 -Step attempts = 4 +Step attempts = 3 Stability limited steps = 0 -Accuracy limited steps = 4 -Error test fails = 1 +Accuracy limited steps = 0 +Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 -Initial step size = 0.1 -Last step size = 0.0541143690074931 -Current step size = 0.0540029786725355 -Explicit slow RHS fn evals = 12 +Initial step size = 0.001 +Last step size = 0.001 +Current step size = 0.001 +Explicit slow RHS fn evals = 9 Implicit slow RHS fn evals = 0 Inner stepper failures = 0 NLS iters = 0 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_1.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_1.out index f356c64451..314dad11d9 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_1.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_1.out @@ -5,85 +5,70 @@ Using GMRES iterative linear solver t u v u err v err ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-RHS processing (stage 0 of 8) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] [Pre-RHS processing (stage 0 of 8) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] - [Post-stage processing (stage 1 of 8) at t = 3.33e-02 (tn = 0.00e+00 , tcur = 3.33e-02), ||y||_2 = 2.0702389129e+00] - [Post-stage processing (stage 2 of 8) at t = 3.33e-02 (tn = 0.00e+00 , tcur = 3.33e-02), ||y||_2 = 2.0700721651e+00] - [Pre-RHS processing (stage 2 of 8) at t = 3.33e-02 (tn = 0.00e+00 , tcur = 3.33e-02), ||y||_2 = 2.0700721651e+00] - [Post-stage processing (stage 3 of 8) at t = 6.67e-02 (tn = 0.00e+00 , tcur = 6.67e-02), ||y||_2 = 1.9322328933e+00] - [Post-stage processing (stage 4 of 8) at t = 6.67e-02 (tn = 0.00e+00 , tcur = 6.67e-02), ||y||_2 = 1.9321435064e+00] - [Pre-RHS processing (stage 4 of 8) at t = 6.67e-02 (tn = 0.00e+00 , tcur = 6.67e-02), ||y||_2 = 1.9321435064e+00] - [Post-stage processing (stage 5 of 8) at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01), ||y||_2 = 1.7559990525e+00] - [Post-stage processing (stage 6 of 8) at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01), ||y||_2 = 1.7553790892e+00] - [Pre-RHS processing (stage 6 of 8) at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01), ||y||_2 = 1.7553790892e+00] - [Post-step failure processing at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01),||y||_2 = 1.7553790892e+00] - [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] - [Post-stage processing (stage 1 of 8) at t = 7.64e-03 (tn = 0.00e+00 , tcur = 7.64e-03), ||y||_2 = 2.1185733610e+00] - [Post-stage processing (stage 2 of 8) at t = 7.64e-03 (tn = 0.00e+00 , tcur = 7.64e-03), ||y||_2 = 2.1185644667e+00] - [Pre-RHS processing (stage 2 of 8) at t = 7.64e-03 (tn = 0.00e+00 , tcur = 7.64e-03), ||y||_2 = 2.1185644667e+00] - [Post-stage processing (stage 3 of 8) at t = 1.53e-02 (tn = 0.00e+00 , tcur = 1.53e-02), ||y||_2 = 2.1103531773e+00] - [Post-stage processing (stage 4 of 8) at t = 1.53e-02 (tn = 0.00e+00 , tcur = 1.53e-02), ||y||_2 = 2.1103486206e+00] - [Pre-RHS processing (stage 4 of 8) at t = 1.53e-02 (tn = 0.00e+00 , tcur = 1.53e-02), ||y||_2 = 2.1103486206e+00] - [Post-stage processing (stage 5 of 8) at t = 2.29e-02 (tn = 0.00e+00 , tcur = 2.29e-02), ||y||_2 = 2.0968505281e+00] - [Post-stage processing (stage 6 of 8) at t = 2.29e-02 (tn = 0.00e+00 , tcur = 2.29e-02), ||y||_2 = 2.0968232402e+00] - [Pre-RHS processing (stage 6 of 8) at t = 2.29e-02 (tn = 0.00e+00 , tcur = 2.29e-02), ||y||_2 = 2.0968232402e+00] - [Post-step processing at t = 2.29e-02 (tn = 0.00e+00 , tcur = 2.29e-02),||y||_2 = 2.0968232402e+00] - 2.2915786214e-02 1.2246912820e+00 1.7019985207e+00 5.5793780707e-09 2.1530106586e-09 - [Pre-step processing at t = 2.29e-02 (tn = 2.29e-02 , tcur = 2.29e-02),||y||_2 = 2.0968232402e+00] - [Pre-RHS processing (stage 0 of 8) at t = 2.29e-02 (tn = 2.29e-02 , tcur = 2.29e-02), ||y||_2 = 2.0968232402e+00] - [Post-stage processing (stage 1 of 8) at t = 3.03e-02 (tn = 2.29e-02 , tcur = 3.03e-02), ||y||_2 = 2.0788798708e+00] - [Post-stage processing (stage 2 of 8) at t = 3.03e-02 (tn = 2.29e-02 , tcur = 3.03e-02), ||y||_2 = 2.0788714037e+00] - [Pre-RHS processing (stage 2 of 8) at t = 3.03e-02 (tn = 2.29e-02 , tcur = 3.03e-02), ||y||_2 = 2.0788714037e+00] - [Post-stage processing (stage 3 of 8) at t = 3.77e-02 (tn = 2.29e-02 , tcur = 3.77e-02), ||y||_2 = 2.0564153145e+00] - [Post-stage processing (stage 4 of 8) at t = 3.77e-02 (tn = 2.29e-02 , tcur = 3.77e-02), ||y||_2 = 2.0564109461e+00] - [Pre-RHS processing (stage 4 of 8) at t = 3.77e-02 (tn = 2.29e-02 , tcur = 3.77e-02), ||y||_2 = 2.0564109461e+00] - [Post-stage processing (stage 5 of 8) at t = 4.51e-02 (tn = 2.29e-02 , tcur = 4.51e-02), ||y||_2 = 2.0298368062e+00] - [Post-stage processing (stage 6 of 8) at t = 4.51e-02 (tn = 2.29e-02 , tcur = 4.51e-02), ||y||_2 = 2.0298104890e+00] - [Pre-RHS processing (stage 6 of 8) at t = 4.51e-02 (tn = 2.29e-02 , tcur = 4.51e-02), ||y||_2 = 2.0298104890e+00] - [Post-step processing at t = 4.51e-02 (tn = 2.29e-02 , tcur = 4.51e-02),||y||_2 = 2.0298104890e+00] - 4.5061997773e-02 1.2245376535e+00 1.6188385208e+00 1.0139641349e-08 1.3537759358e-08 - [Pre-step processing at t = 4.51e-02 (tn = 4.51e-02 , tcur = 4.51e-02),||y||_2 = 2.0298104890e+00] - [Pre-RHS processing (stage 0 of 8) at t = 4.51e-02 (tn = 4.51e-02 , tcur = 4.51e-02), ||y||_2 = 2.0298104890e+00] - [Post-stage processing (stage 1 of 8) at t = 5.25e-02 (tn = 4.51e-02 , tcur = 5.25e-02), ||y||_2 = 1.9994285829e+00] - [Post-stage processing (stage 2 of 8) at t = 5.25e-02 (tn = 4.51e-02 , tcur = 5.25e-02), ||y||_2 = 1.9994197633e+00] - [Pre-RHS processing (stage 2 of 8) at t = 5.25e-02 (tn = 4.51e-02 , tcur = 5.25e-02), ||y||_2 = 1.9994197633e+00] - [Post-stage processing (stage 3 of 8) at t = 5.98e-02 (tn = 4.51e-02 , tcur = 5.98e-02), ||y||_2 = 1.9657929007e+00] - [Post-stage processing (stage 4 of 8) at t = 5.98e-02 (tn = 4.51e-02 , tcur = 5.98e-02), ||y||_2 = 1.9657883234e+00] - [Pre-RHS processing (stage 4 of 8) at t = 5.98e-02 (tn = 4.51e-02 , tcur = 5.98e-02), ||y||_2 = 1.9657883234e+00] - [Post-stage processing (stage 5 of 8) at t = 6.72e-02 (tn = 4.51e-02 , tcur = 6.72e-02), ||y||_2 = 1.9295492984e+00] - [Post-stage processing (stage 6 of 8) at t = 6.72e-02 (tn = 4.51e-02 , tcur = 6.72e-02), ||y||_2 = 1.9295215670e+00] - [Pre-RHS processing (stage 6 of 8) at t = 6.72e-02 (tn = 4.51e-02 , tcur = 6.72e-02), ||y||_2 = 1.9295215670e+00] - [Post-step processing at t = 6.72e-02 (tn = 4.51e-02 , tcur = 6.72e-02),||y||_2 = 1.9295215670e+00] - 6.7234572226e-02 1.2242836022e+00 1.4913695514e+00 1.4287638628e-08 4.0154499503e-08 + [Post-stage processing (stage 1 of 8) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213151057e+00] + [Post-stage processing (stage 2 of 8) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213150886e+00] + [Pre-RHS processing (stage 2 of 8) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213150886e+00] + [Post-stage processing (stage 3 of 8) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1212993503e+00] + [Post-stage processing (stage 4 of 8) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1212993415e+00] + [Pre-RHS processing (stage 4 of 8) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1212993415e+00] + [Post-stage processing (stage 5 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731966e+00] + [Post-stage processing (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] + [Post-step processing at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] + 1.0000000000e-03 1.2247447693e+00 1.7319930735e+00 2.6090241079e-13 1.1546319456e-14 + [Pre-step processing at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] + [Pre-RHS processing (stage 0 of 8) at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] + [Post-stage processing (stage 1 of 8) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212364434e+00] + [Post-stage processing (stage 2 of 8) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212364263e+00] + [Pre-RHS processing (stage 2 of 8) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212364263e+00] + [Post-stage processing (stage 3 of 8) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1211892263e+00] + [Post-stage processing (stage 4 of 8) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1211892175e+00] + [Pre-RHS processing (stage 4 of 8) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1211892175e+00] + [Post-stage processing (stage 5 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211316142e+00] + [Post-stage processing (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] + [Post-step processing at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] + 2.0000000000e-03 1.2247444631e+00 1.7318198829e+00 2.9067859231e-12 2.3980817332e-14 + [Pre-step processing at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] + [Pre-RHS processing (stage 0 of 8) at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] + [Post-stage processing (stage 1 of 8) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1210634067e+00] + [Post-stage processing (stage 2 of 8) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1210633896e+00] + [Pre-RHS processing (stage 2 of 8) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1210633896e+00] + [Post-stage processing (stage 3 of 8) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1209847405e+00] + [Post-stage processing (stage 4 of 8) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1209847317e+00] + [Pre-RHS processing (stage 4 of 8) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1209847317e+00] + [Post-stage processing (stage 5 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956853e+00] + [Post-stage processing (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956339e+00] + [Post-step processing at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03),||y||_2 = 2.1208956339e+00] + 3.0000000000e-03 1.2247439528e+00 1.7315312703e+00 1.0538681039e-11 3.7747582837e-14 ------------------------------------------------------------------------------------------------------------------------------ -Current time = 0.0672345722257155 +Current time = 0.003 Steps = 3 -Step attempts = 4 +Step attempts = 3 Stability limited steps = 0 -Accuracy limited steps = 4 -Error test fails = 1 +Accuracy limited steps = 0 +Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 -Initial step size = 0.1 -Last step size = 0.022172574452528 -Current step size = 0.0222074352130945 +Initial step size = 0.001 +Last step size = 0.001 +Current step size = 0.001 Explicit slow RHS fn evals = 0 -Implicit slow RHS fn evals = 50 +Implicit slow RHS fn evals = 27 Inner stepper failures = 0 -NLS iters = 34 +NLS iters = 18 NLS fails = 0 -NLS iters per step = 11.3333333333333 +NLS iters per step = 6 LS setups = 0 Jac fn evals = 0 -LS RHS fn evals = 38 +LS RHS fn evals = 18 Prec setup evals = 0 Prec solves = 0 -LS iters = 38 +LS iters = 18 LS fails = 0 Jac-times setups = 0 -Jac-times evals = 38 -LS iters per NLS iter = 1.11764705882353 +Jac-times evals = 18 +LS iters per NLS iter = 1 Jac evals per NLS iter = 0 Prec evals per NLS iter = 0 End MRIStep StageInfo test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_2.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_2.out index a997566f4d..7a2f228695 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_2.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_2.out @@ -5,81 +5,76 @@ Using GMRES iterative linear solver t u v u err v err ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-RHS processing (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] - [Post-stage processing (stage 1 of 5) at t = 6.76e-02 (tn = 0.00e+00 , tcur = 6.76e-02), ||y||_2 = 1.9277014052e+00] - [Pre-RHS processing (stage 1 of 5) at t = 6.76e-02 (tn = 0.00e+00 , tcur = 6.76e-02), ||y||_2 = 1.9277014052e+00] - [Post-stage processing (stage 2 of 5) at t = 8.00e-02 (tn = 0.00e+00 , tcur = 8.00e-02), ||y||_2 = 1.8630468331e+00] - [Pre-RHS processing (stage 2 of 5) at t = 8.00e-02 (tn = 0.00e+00 , tcur = 8.00e-02), ||y||_2 = 1.8630468331e+00] - [Post-stage processing (stage 3 of 5) at t = 1.13e-01 (tn = 0.00e+00 , tcur = 1.13e-01), ||y||_2 = 1.6895511338e+00] - [Pre-RHS processing (stage 3 of 5) at t = 1.13e-01 (tn = 0.00e+00 , tcur = 1.13e-01), ||y||_2 = 1.6895511338e+00] - [Post-stage processing (stage 4 of 5) at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01), ||y||_2 = 1.7553780461e+00] - [Post-stage processing (stage 5 of 5) at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01), ||y||_2 = 1.7553690226e+00] - [Post-step failure processing at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01),||y||_2 = 1.7553780461e+00] - [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] - [Post-stage processing (stage 1 of 5) at t = 3.18e-02 (tn = 0.00e+00 , tcur = 3.18e-02), ||y||_2 = 2.0746627548e+00] - [Pre-RHS processing (stage 1 of 5) at t = 3.18e-02 (tn = 0.00e+00 , tcur = 3.18e-02), ||y||_2 = 2.0746627548e+00] - [Post-stage processing (stage 2 of 5) at t = 3.76e-02 (tn = 0.00e+00 , tcur = 3.76e-02), ||y||_2 = 2.0566853389e+00] - [Pre-RHS processing (stage 2 of 5) at t = 3.76e-02 (tn = 0.00e+00 , tcur = 3.76e-02), ||y||_2 = 2.0566853389e+00] - [Post-stage processing (stage 3 of 5) at t = 5.33e-02 (tn = 0.00e+00 , tcur = 5.33e-02), ||y||_2 = 1.9956059674e+00] - [Pre-RHS processing (stage 3 of 5) at t = 5.33e-02 (tn = 0.00e+00 , tcur = 5.33e-02), ||y||_2 = 1.9956059674e+00] - [Post-stage processing (stage 4 of 5) at t = 4.70e-02 (tn = 0.00e+00 , tcur = 4.70e-02), ||y||_2 = 2.0220308045e+00] - [Post-stage processing (stage 5 of 5) at t = 4.70e-02 (tn = 0.00e+00 , tcur = 4.70e-02), ||y||_2 = 2.0220301555e+00] - [Post-step processing at t = 4.70e-02 (tn = 0.00e+00 , tcur = 4.70e-02),||y||_2 = 2.0220308045e+00] - 4.7038717251e-02 1.2245191379e+00 1.6090871497e+00 7.2407223550e-08 3.3077079586e-07 - [Pre-step processing at t = 4.70e-02 (tn = 4.70e-02 , tcur = 4.70e-02),||y||_2 = 2.0220308045e+00] - [Pre-RHS processing (stage 0 of 5) at t = 4.70e-02 (tn = 4.70e-02 , tcur = 4.70e-02), ||y||_2 = 2.0220308045e+00] - [Post-stage processing (stage 1 of 5) at t = 7.89e-02 (tn = 4.70e-02 , tcur = 7.89e-02), ||y||_2 = 1.8687693366e+00] - [Pre-RHS processing (stage 1 of 5) at t = 7.89e-02 (tn = 4.70e-02 , tcur = 7.89e-02), ||y||_2 = 1.8687693366e+00] - [Post-stage processing (stage 2 of 5) at t = 8.47e-02 (tn = 4.70e-02 , tcur = 8.47e-02), ||y||_2 = 1.8374772654e+00] - [Pre-RHS processing (stage 2 of 5) at t = 8.47e-02 (tn = 4.70e-02 , tcur = 8.47e-02), ||y||_2 = 1.8374772654e+00] - [Post-stage processing (stage 3 of 5) at t = 1.00e-01 (tn = 4.70e-02 , tcur = 1.00e-01), ||y||_2 = 1.7534837182e+00] - [Pre-RHS processing (stage 3 of 5) at t = 1.00e-01 (tn = 4.70e-02 , tcur = 1.00e-01), ||y||_2 = 1.7534837182e+00] - [Post-stage processing (stage 4 of 5) at t = 9.41e-02 (tn = 4.70e-02 , tcur = 9.41e-02), ||y||_2 = 1.7866195702e+00] - [Post-stage processing (stage 5 of 5) at t = 9.41e-02 (tn = 4.70e-02 , tcur = 9.41e-02), ||y||_2 = 1.7866191431e+00] - [Post-step processing at t = 9.41e-02 (tn = 4.70e-02 , tcur = 9.41e-02),||y||_2 = 1.7866195702e+00] - 9.4077434503e-02 1.2238419876e+00 1.3016221719e+00 8.9882908894e-08 1.7942663662e-06 - [Pre-step processing at t = 9.41e-02 (tn = 9.41e-02 , tcur = 9.41e-02),||y||_2 = 1.7866195702e+00] - [Pre-RHS processing (stage 0 of 5) at t = 9.41e-02 (tn = 9.41e-02 , tcur = 9.41e-02), ||y||_2 = 1.7866195702e+00] - [Post-stage processing (stage 1 of 5) at t = 1.28e-01 (tn = 9.41e-02 , tcur = 1.28e-01), ||y||_2 = 1.6322862176e+00] - [Pre-RHS processing (stage 1 of 5) at t = 1.28e-01 (tn = 9.41e-02 , tcur = 1.28e-01), ||y||_2 = 1.6322862176e+00] - [Post-stage processing (stage 2 of 5) at t = 1.34e-01 (tn = 9.41e-02 , tcur = 1.34e-01), ||y||_2 = 1.6132224524e+00] - [Pre-RHS processing (stage 2 of 5) at t = 1.34e-01 (tn = 9.41e-02 , tcur = 1.34e-01), ||y||_2 = 1.6132224524e+00] - [Post-stage processing (stage 3 of 5) at t = 1.50e-01 (tn = 9.41e-02 , tcur = 1.50e-01), ||y||_2 = 1.5821211389e+00] - [Pre-RHS processing (stage 3 of 5) at t = 1.50e-01 (tn = 9.41e-02 , tcur = 1.50e-01), ||y||_2 = 1.5821211389e+00] - [Post-stage processing (stage 4 of 5) at t = 1.44e-01 (tn = 9.41e-02 , tcur = 1.44e-01), ||y||_2 = 1.5906968039e+00] - [Post-stage processing (stage 5 of 5) at t = 1.44e-01 (tn = 9.41e-02 , tcur = 1.44e-01), ||y||_2 = 1.5906958150e+00] - [Post-step processing at t = 1.44e-01 (tn = 9.41e-02 , tcur = 1.44e-01),||y||_2 = 1.5906968039e+00] - 1.4372138650e-01 1.2226386256e+00 1.0175810107e+00 1.1664470589e-07 2.7813679992e-06 + [Pre-RHS processing (stage 0 of 8) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Post-stage processing (stage 1 of 8) at t = 4.36e-04 (tn = 0.00e+00 , tcur = 4.36e-04), ||y||_2 = 2.1213113879e+00] + [Post-stage processing (stage 2 of 8) at t = 4.36e-04 (tn = 0.00e+00 , tcur = 4.36e-04), ||y||_2 = 2.1213113879e+00] + [Pre-RHS processing (stage 2 of 8) at t = 4.36e-04 (tn = 0.00e+00 , tcur = 4.36e-04), ||y||_2 = 2.1213113879e+00] + [Post-stage processing (stage 3 of 8) at t = 7.18e-04 (tn = 0.00e+00 , tcur = 7.18e-04), ||y||_2 = 2.1212960228e+00] + [Post-stage processing (stage 4 of 8) at t = 7.18e-04 (tn = 0.00e+00 , tcur = 7.18e-04), ||y||_2 = 2.1212960259e+00] + [Pre-RHS processing (stage 4 of 8) at t = 7.18e-04 (tn = 0.00e+00 , tcur = 7.18e-04), ||y||_2 = 2.1212960259e+00] + [Post-stage processing (stage 5 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731087e+00] + [Post-stage processing (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731290e+00] + [Pre-RHS processing (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731290e+00] + [Post-stage processing (stage 7 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] + [Post-step processing at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] + 1.0000000000e-03 1.2247447693e+00 1.7319930735e+00 2.6378899065e-13 8.2156503822e-15 + [Pre-step processing at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] + [Pre-RHS processing (stage 0 of 8) at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] + [Post-stage processing (stage 1 of 8) at t = 1.44e-03 (tn = 1.00e-03 , tcur = 1.44e-03), ||y||_2 = 2.1212230476e+00] + [Post-stage processing (stage 2 of 8) at t = 1.44e-03 (tn = 1.00e-03 , tcur = 1.44e-03), ||y||_2 = 2.1212230476e+00] + [Pre-RHS processing (stage 2 of 8) at t = 1.44e-03 (tn = 1.00e-03 , tcur = 1.44e-03), ||y||_2 = 2.1212230476e+00] + [Post-stage processing (stage 3 of 8) at t = 1.72e-03 (tn = 1.00e-03 , tcur = 1.72e-03), ||y||_2 = 2.1211810603e+00] + [Post-stage processing (stage 4 of 8) at t = 1.72e-03 (tn = 1.00e-03 , tcur = 1.72e-03), ||y||_2 = 2.1211810634e+00] + [Pre-RHS processing (stage 4 of 8) at t = 1.72e-03 (tn = 1.00e-03 , tcur = 1.72e-03), ||y||_2 = 2.1211810634e+00] + [Post-stage processing (stage 5 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315263e+00] + [Post-stage processing (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315465e+00] + [Pre-RHS processing (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315465e+00] + [Post-stage processing (stage 7 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] + [Post-step processing at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] + 2.0000000000e-03 1.2247444631e+00 1.7318198829e+00 3.1354918661e-12 1.3988810110e-14 + [Pre-step processing at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] + [Pre-RHS processing (stage 0 of 8) at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] + [Post-stage processing (stage 1 of 8) at t = 2.44e-03 (tn = 2.00e-03 , tcur = 2.44e-03), ||y||_2 = 2.1210403366e+00] + [Post-stage processing (stage 2 of 8) at t = 2.44e-03 (tn = 2.00e-03 , tcur = 2.44e-03), ||y||_2 = 2.1210403366e+00] + [Pre-RHS processing (stage 2 of 8) at t = 2.44e-03 (tn = 2.00e-03 , tcur = 2.44e-03), ||y||_2 = 2.1210403366e+00] + [Post-stage processing (stage 3 of 8) at t = 2.72e-03 (tn = 2.00e-03 , tcur = 2.72e-03), ||y||_2 = 2.1209717381e+00] + [Post-stage processing (stage 4 of 8) at t = 2.72e-03 (tn = 2.00e-03 , tcur = 2.72e-03), ||y||_2 = 2.1209717412e+00] + [Pre-RHS processing (stage 4 of 8) at t = 2.72e-03 (tn = 2.00e-03 , tcur = 2.72e-03), ||y||_2 = 2.1209717412e+00] + [Post-stage processing (stage 5 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208955974e+00] + [Post-stage processing (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956177e+00] + [Pre-RHS processing (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956177e+00] + [Post-stage processing (stage 7 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956339e+00] + [Post-step processing at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03),||y||_2 = 2.1208956339e+00] + 3.0000000000e-03 1.2247439528e+00 1.7315312703e+00 1.1467271577e-11 1.8207657604e-14 ------------------------------------------------------------------------------------------------------------------------------ -Current time = 0.143721386500587 +Current time = 0.003 Steps = 3 -Step attempts = 4 +Step attempts = 3 Stability limited steps = 0 -Accuracy limited steps = 4 -Error test fails = 1 +Accuracy limited steps = 0 +Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 -Initial step size = 0.1 -Last step size = 0.0496439519979517 -Current step size = 0.0499492708252477 -Explicit slow RHS fn evals = 16 -Implicit slow RHS fn evals = 64 +Initial step size = 0.001 +Last step size = 0.001 +Current step size = 0.001 +Explicit slow RHS fn evals = 12 +Implicit slow RHS fn evals = 30 Inner stepper failures = 0 -NLS iters = 48 +NLS iters = 18 NLS fails = 0 -NLS iters per step = 16 +NLS iters per step = 6 LS setups = 0 Jac fn evals = 0 -LS RHS fn evals = 58 +LS RHS fn evals = 18 Prec setup evals = 0 Prec solves = 0 -LS iters = 58 +LS iters = 18 LS fails = 0 Jac-times setups = 0 -Jac-times evals = 58 -LS iters per NLS iter = 1.20833333333333 +Jac-times evals = 18 +LS iters per NLS iter = 1 Jac evals per NLS iter = 0 Prec evals per NLS iter = 0 End MRIStep StageInfo test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_3.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_3.out index f8cb9d6025..4ddd50175a 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_3.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_3.out @@ -3,66 +3,52 @@ Using Ex-MRI-SR method t u v u err v err ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-RHS processing (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] [Pre-RHS processing (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] - [Post-stage processing (stage 1 of 5) at t = 6.76e-02 (tn = 0.00e+00 , tcur = 6.76e-02), ||y||_2 = 1.9277317531e+00] - [Pre-RHS processing (stage 1 of 5) at t = 6.76e-02 (tn = 0.00e+00 , tcur = 6.76e-02), ||y||_2 = 1.9277317531e+00] - [Post-stage processing (stage 2 of 5) at t = 8.00e-02 (tn = 0.00e+00 , tcur = 8.00e-02), ||y||_2 = 1.8631157730e+00] - [Pre-RHS processing (stage 2 of 5) at t = 8.00e-02 (tn = 0.00e+00 , tcur = 8.00e-02), ||y||_2 = 1.8631157730e+00] - [Post-stage processing (stage 3 of 5) at t = 1.13e-01 (tn = 0.00e+00 , tcur = 1.13e-01), ||y||_2 = 1.6894354844e+00] - [Pre-RHS processing (stage 3 of 5) at t = 1.13e-01 (tn = 0.00e+00 , tcur = 1.13e-01), ||y||_2 = 1.6894354844e+00] - [Post-stage processing (stage 4 of 5) at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01), ||y||_2 = 1.7553776312e+00] - [Post-stage processing (stage 5 of 5) at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01), ||y||_2 = 1.7553905174e+00] - [Post-step failure processing at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01),||y||_2 = 1.7553776312e+00] - [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] - [Post-stage processing (stage 1 of 5) at t = 2.72e-02 (tn = 0.00e+00 , tcur = 2.72e-02), ||y||_2 = 2.0871216421e+00] - [Pre-RHS processing (stage 1 of 5) at t = 2.72e-02 (tn = 0.00e+00 , tcur = 2.72e-02), ||y||_2 = 2.0871216421e+00] - [Post-stage processing (stage 2 of 5) at t = 3.21e-02 (tn = 0.00e+00 , tcur = 3.21e-02), ||y||_2 = 2.0738241098e+00] - [Pre-RHS processing (stage 2 of 5) at t = 3.21e-02 (tn = 0.00e+00 , tcur = 3.21e-02), ||y||_2 = 2.0738241098e+00] - [Post-stage processing (stage 3 of 5) at t = 4.55e-02 (tn = 0.00e+00 , tcur = 4.55e-02), ||y||_2 = 2.0280485196e+00] - [Pre-RHS processing (stage 3 of 5) at t = 4.55e-02 (tn = 0.00e+00 , tcur = 4.55e-02), ||y||_2 = 2.0280485196e+00] - [Post-stage processing (stage 4 of 5) at t = 4.01e-02 (tn = 0.00e+00 , tcur = 4.01e-02), ||y||_2 = 2.0479718989e+00] - [Post-stage processing (stage 5 of 5) at t = 4.01e-02 (tn = 0.00e+00 , tcur = 4.01e-02), ||y||_2 = 2.0479726350e+00] - [Post-step processing at t = 4.01e-02 (tn = 0.00e+00 , tcur = 4.01e-02),||y||_2 = 2.0479718989e+00] - 4.0147173279e-02 1.2245803971e+00 1.6415211694e+00 1.7833581722e-08 1.3150238765e-07 - [Pre-step processing at t = 4.01e-02 (tn = 4.01e-02 , tcur = 4.01e-02),||y||_2 = 2.0479718989e+00] - [Pre-RHS processing (stage 0 of 5) at t = 4.01e-02 (tn = 4.01e-02 , tcur = 4.01e-02), ||y||_2 = 2.0479718989e+00] - [Post-stage processing (stage 1 of 5) at t = 6.73e-02 (tn = 4.01e-02 , tcur = 6.73e-02), ||y||_2 = 1.9292098715e+00] - [Pre-RHS processing (stage 1 of 5) at t = 6.73e-02 (tn = 4.01e-02 , tcur = 6.73e-02), ||y||_2 = 1.9292098715e+00] - [Post-stage processing (stage 2 of 5) at t = 7.23e-02 (tn = 4.01e-02 , tcur = 7.23e-02), ||y||_2 = 1.9037272078e+00] - [Pre-RHS processing (stage 2 of 5) at t = 7.23e-02 (tn = 4.01e-02 , tcur = 7.23e-02), ||y||_2 = 1.9037272078e+00] - [Post-stage processing (stage 3 of 5) at t = 8.56e-02 (tn = 4.01e-02 , tcur = 8.56e-02), ||y||_2 = 1.8320067913e+00] - [Pre-RHS processing (stage 3 of 5) at t = 8.56e-02 (tn = 4.01e-02 , tcur = 8.56e-02), ||y||_2 = 1.8320067913e+00] - [Post-stage processing (stage 4 of 5) at t = 8.03e-02 (tn = 4.01e-02 , tcur = 8.03e-02), ||y||_2 = 1.8609952333e+00] - [Post-stage processing (stage 5 of 5) at t = 8.03e-02 (tn = 4.01e-02 , tcur = 8.03e-02), ||y||_2 = 1.8609960500e+00] - [Post-step processing at t = 8.03e-02 (tn = 4.01e-02 , tcur = 8.03e-02),||y||_2 = 1.8609952333e+00] - 8.0294346558e-02 1.2240870650e+00 1.4017539426e+00 2.9546360247e-08 8.8498109596e-07 - [Pre-step processing at t = 8.03e-02 (tn = 8.03e-02 , tcur = 8.03e-02),||y||_2 = 1.8609952333e+00] - [Pre-RHS processing (stage 0 of 5) at t = 8.03e-02 (tn = 8.03e-02 , tcur = 8.03e-02), ||y||_2 = 1.8609952333e+00] - [Post-stage processing (stage 1 of 5) at t = 1.07e-01 (tn = 8.03e-02 , tcur = 1.07e-01), ||y||_2 = 1.7176026494e+00] - [Pre-RHS processing (stage 1 of 5) at t = 1.07e-01 (tn = 8.03e-02 , tcur = 1.07e-01), ||y||_2 = 1.7176026494e+00] - [Post-stage processing (stage 2 of 5) at t = 1.12e-01 (tn = 8.03e-02 , tcur = 1.12e-01), ||y||_2 = 1.6940253097e+00] - [Pre-RHS processing (stage 2 of 5) at t = 1.12e-01 (tn = 8.03e-02 , tcur = 1.12e-01), ||y||_2 = 1.6940253097e+00] - [Post-stage processing (stage 3 of 5) at t = 1.26e-01 (tn = 8.03e-02 , tcur = 1.26e-01), ||y||_2 = 1.6384682995e+00] - [Pre-RHS processing (stage 3 of 5) at t = 1.26e-01 (tn = 8.03e-02 , tcur = 1.26e-01), ||y||_2 = 1.6384682995e+00] - [Post-stage processing (stage 4 of 5) at t = 1.20e-01 (tn = 8.03e-02 , tcur = 1.20e-01), ||y||_2 = 1.6590260096e+00] - [Post-stage processing (stage 5 of 5) at t = 1.20e-01 (tn = 8.03e-02 , tcur = 1.20e-01), ||y||_2 = 1.6590269385e+00] - [Post-step processing at t = 1.20e-01 (tn = 8.03e-02 , tcur = 1.20e-01),||y||_2 = 1.6590260096e+00] - 1.2049198814e-01 1.2232640221e+00 1.1207106820e+00 2.3916633340e-08 1.4539153401e-06 + [Post-stage processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1212987717e+00] + [Pre-RHS processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1212987717e+00] + [Post-stage processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1212901822e+00] + [Pre-RHS processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1212901822e+00] + [Post-stage processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1212596852e+00] + [Pre-RHS processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1212596852e+00] + [Post-stage processing (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] + [Post-step processing at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] + 1.0000000000e-03 1.2247447693e+00 1.7319930735e+00 7.9936057773e-15 1.3744561045e-13 + [Pre-step processing at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] + [Pre-RHS processing (stage 0 of 5) at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] + [Post-stage processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1211877224e+00] + [Pre-RHS processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1211877224e+00] + [Post-stage processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1211674743e+00] + [Pre-RHS processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1211674743e+00] + [Post-stage processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1211055205e+00] + [Pre-RHS processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1211055205e+00] + [Post-stage processing (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] + [Post-step processing at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] + 2.0000000000e-03 1.2247444631e+00 1.7318198829e+00 1.5987211555e-14 2.6245672302e-13 + [Pre-step processing at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] + [Pre-RHS processing (stage 0 of 5) at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] + [Post-stage processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1209823117e+00] + [Pre-RHS processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1209823117e+00] + [Post-stage processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1209504105e+00] + [Pre-RHS processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1209504105e+00] + [Post-stage processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1208570163e+00] + [Pre-RHS processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1208570163e+00] + [Post-stage processing (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956339e+00] + [Post-step processing at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03),||y||_2 = 2.1208956339e+00] + 3.0000000000e-03 1.2247439528e+00 1.7315312703e+00 2.4202861937e-14 3.7436720390e-13 ------------------------------------------------------------------------------------------------------------------------------ -Current time = 0.120491988140575 +Current time = 0.003 Steps = 3 -Step attempts = 4 +Step attempts = 3 Stability limited steps = 0 -Accuracy limited steps = 4 -Error test fails = 1 +Accuracy limited steps = 0 +Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 -Initial step size = 0.1 -Last step size = 0.0401976415827198 -Current step size = 0.0402774582255194 -Explicit slow RHS fn evals = 16 +Initial step size = 0.001 +Last step size = 0.001 +Current step size = 0.001 +Explicit slow RHS fn evals = 12 Implicit slow RHS fn evals = 0 Inner stepper failures = 0 NLS iters = 0 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_4.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_4.out index f726d25a29..ee18c25fe4 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_4.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_4.out @@ -5,81 +5,67 @@ Using GMRES iterative linear solver t u v u err v err ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-RHS processing (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] [Pre-RHS processing (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] - [Post-stage processing (stage 1 of 5) at t = 6.76e-02 (tn = 0.00e+00 , tcur = 6.76e-02), ||y||_2 = 1.9272516649e+00] - [Pre-RHS processing (stage 1 of 5) at t = 6.76e-02 (tn = 0.00e+00 , tcur = 6.76e-02), ||y||_2 = 1.9272516649e+00] - [Post-stage processing (stage 2 of 5) at t = 8.00e-02 (tn = 0.00e+00 , tcur = 8.00e-02), ||y||_2 = 1.8622728321e+00] - [Pre-RHS processing (stage 2 of 5) at t = 8.00e-02 (tn = 0.00e+00 , tcur = 8.00e-02), ||y||_2 = 1.8622728321e+00] - [Post-stage processing (stage 3 of 5) at t = 1.13e-01 (tn = 0.00e+00 , tcur = 1.13e-01), ||y||_2 = 1.6900892751e+00] - [Pre-RHS processing (stage 3 of 5) at t = 1.13e-01 (tn = 0.00e+00 , tcur = 1.13e-01), ||y||_2 = 1.6900892751e+00] - [Post-stage processing (stage 4 of 5) at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01), ||y||_2 = 1.7553777059e+00] - [Post-stage processing (stage 5 of 5) at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01), ||y||_2 = 1.7553835812e+00] - [Post-step failure processing at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01),||y||_2 = 1.7553777059e+00] - [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] - [Post-stage processing (stage 1 of 5) at t = 3.68e-02 (tn = 0.00e+00 , tcur = 3.68e-02), ||y||_2 = 2.0592361389e+00] - [Pre-RHS processing (stage 1 of 5) at t = 3.68e-02 (tn = 0.00e+00 , tcur = 3.68e-02), ||y||_2 = 2.0592361389e+00] - [Post-stage processing (stage 2 of 5) at t = 4.35e-02 (tn = 0.00e+00 , tcur = 4.35e-02), ||y||_2 = 2.0355544317e+00] - [Pre-RHS processing (stage 2 of 5) at t = 4.35e-02 (tn = 0.00e+00 , tcur = 4.35e-02), ||y||_2 = 2.0355544317e+00] - [Post-stage processing (stage 3 of 5) at t = 6.17e-02 (tn = 0.00e+00 , tcur = 6.17e-02), ||y||_2 = 1.9571096875e+00] - [Pre-RHS processing (stage 3 of 5) at t = 6.17e-02 (tn = 0.00e+00 , tcur = 6.17e-02), ||y||_2 = 1.9571096875e+00] - [Post-stage processing (stage 4 of 5) at t = 5.44e-02 (tn = 0.00e+00 , tcur = 5.44e-02), ||y||_2 = 1.9907845791e+00] - [Post-stage processing (stage 5 of 5) at t = 5.44e-02 (tn = 0.00e+00 , tcur = 5.44e-02), ||y||_2 = 1.9907852935e+00] - [Post-step processing at t = 5.44e-02 (tn = 0.00e+00 , tcur = 5.44e-02),||y||_2 = 1.9907845791e+00] - 5.4416549221e-02 1.2244425898e+00 1.5697017502e+00 9.6643187675e-08 2.9671727586e-07 - [Pre-step processing at t = 5.44e-02 (tn = 5.44e-02 , tcur = 5.44e-02),||y||_2 = 1.9907845791e+00] - [Pre-RHS processing (stage 0 of 5) at t = 5.44e-02 (tn = 5.44e-02 , tcur = 5.44e-02), ||y||_2 = 1.9907845791e+00] - [Post-stage processing (stage 1 of 5) at t = 9.12e-02 (tn = 5.44e-02 , tcur = 9.12e-02), ||y||_2 = 1.8018482507e+00] - [Pre-RHS processing (stage 1 of 5) at t = 9.12e-02 (tn = 5.44e-02 , tcur = 9.12e-02), ||y||_2 = 1.8018482507e+00] - [Post-stage processing (stage 2 of 5) at t = 9.79e-02 (tn = 5.44e-02 , tcur = 9.79e-02), ||y||_2 = 1.7659886342e+00] - [Pre-RHS processing (stage 2 of 5) at t = 9.79e-02 (tn = 5.44e-02 , tcur = 9.79e-02), ||y||_2 = 1.7659886342e+00] - [Post-stage processing (stage 3 of 5) at t = 1.16e-01 (tn = 5.44e-02 , tcur = 1.16e-01), ||y||_2 = 1.6776533917e+00] - [Pre-RHS processing (stage 3 of 5) at t = 1.16e-01 (tn = 5.44e-02 , tcur = 1.16e-01), ||y||_2 = 1.6776533917e+00] - [Post-stage processing (stage 4 of 5) at t = 1.09e-01 (tn = 5.44e-02 , tcur = 1.09e-01), ||y||_2 = 1.7110128262e+00] - [Post-stage processing (stage 5 of 5) at t = 1.09e-01 (tn = 5.44e-02 , tcur = 1.09e-01), ||y||_2 = 1.7110136723e+00] - [Post-step processing at t = 1.09e-01 (tn = 5.44e-02 , tcur = 1.09e-01),||y||_2 = 1.7110128262e+00] - 1.0883309844e-01 1.2235363746e+00 1.1960449956e+00 2.0469684348e-07 1.0505289330e-06 - [Pre-step processing at t = 1.09e-01 (tn = 1.09e-01 , tcur = 1.09e-01),||y||_2 = 1.7110128262e+00] - [Pre-RHS processing (stage 0 of 5) at t = 1.09e-01 (tn = 1.09e-01 , tcur = 1.09e-01), ||y||_2 = 1.7110128262e+00] - [Post-stage processing (stage 1 of 5) at t = 1.48e-01 (tn = 1.09e-01 , tcur = 1.48e-01), ||y||_2 = 1.5848610090e+00] - [Pre-RHS processing (stage 1 of 5) at t = 1.48e-01 (tn = 1.09e-01 , tcur = 1.48e-01), ||y||_2 = 1.5848610090e+00] - [Post-stage processing (stage 2 of 5) at t = 1.55e-01 (tn = 1.09e-01 , tcur = 1.55e-01), ||y||_2 = 1.5794413328e+00] - [Pre-RHS processing (stage 2 of 5) at t = 1.55e-01 (tn = 1.09e-01 , tcur = 1.55e-01), ||y||_2 = 1.5794413328e+00] - [Post-stage processing (stage 3 of 5) at t = 1.74e-01 (tn = 1.09e-01 , tcur = 1.74e-01), ||y||_2 = 1.5966533845e+00] - [Pre-RHS processing (stage 3 of 5) at t = 1.74e-01 (tn = 1.09e-01 , tcur = 1.74e-01), ||y||_2 = 1.5966533845e+00] - [Post-stage processing (stage 4 of 5) at t = 1.66e-01 (tn = 1.09e-01 , tcur = 1.66e-01), ||y||_2 = 1.5843328694e+00] - [Post-stage processing (stage 5 of 5) at t = 1.66e-01 (tn = 1.09e-01 , tcur = 1.66e-01), ||y||_2 = 1.5843338593e+00] - [Post-step processing at t = 1.66e-01 (tn = 1.09e-01 , tcur = 1.66e-01),||y||_2 = 1.5843328694e+00] - 1.6631602874e-01 1.2219246454e+00 1.0084695345e+00 3.4011255701e-07 1.4555240657e-06 + [Post-stage processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1212987262e+00] + [Pre-RHS processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1212987262e+00] + [Post-stage processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1212901049e+00] + [Pre-RHS processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1212901049e+00] + [Post-stage processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1212597444e+00] + [Pre-RHS processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1212597444e+00] + [Post-stage processing (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] + [Post-step processing at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] + 1.0000000000e-03 1.2247447693e+00 1.7319930735e+00 2.4846791291e-13 1.5143442056e-13 + [Pre-step processing at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] + [Pre-RHS processing (stage 0 of 5) at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] + [Post-stage processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1211876769e+00] + [Pre-RHS processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1211876769e+00] + [Post-stage processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1211673971e+00] + [Pre-RHS processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1211673971e+00] + [Post-stage processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1211055797e+00] + [Pre-RHS processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1211055797e+00] + [Post-stage processing (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] + [Post-step processing at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] + 2.0000000000e-03 1.2247444631e+00 1.7318198829e+00 2.6707525080e-12 2.9021229864e-13 + [Pre-step processing at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] + [Pre-RHS processing (stage 0 of 5) at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] + [Post-stage processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1209822662e+00] + [Pre-RHS processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1209822662e+00] + [Post-stage processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1209503332e+00] + [Pre-RHS processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1209503332e+00] + [Post-stage processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1208570755e+00] + [Pre-RHS processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1208570755e+00] + [Post-stage processing (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956339e+00] + [Post-step processing at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03),||y||_2 = 2.1208956339e+00] + 3.0000000000e-03 1.2247439528e+00 1.7315312703e+00 9.4586560806e-12 4.1744385726e-13 ------------------------------------------------------------------------------------------------------------------------------ -Current time = 0.166316028736013 +Current time = 0.003 Steps = 3 -Step attempts = 4 +Step attempts = 3 Stability limited steps = 0 -Accuracy limited steps = 4 -Error test fails = 1 +Accuracy limited steps = 0 +Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 -Initial step size = 0.1 -Last step size = 0.0574829302949148 -Current step size = 0.0577668918865172 +Initial step size = 0.001 +Last step size = 0.001 +Current step size = 0.001 Explicit slow RHS fn evals = 0 -Implicit slow RHS fn evals = 64 +Implicit slow RHS fn evals = 36 Inner stepper failures = 0 -NLS iters = 48 +NLS iters = 24 NLS fails = 0 -NLS iters per step = 16 +NLS iters per step = 8 LS setups = 0 Jac fn evals = 0 -LS RHS fn evals = 59 +LS RHS fn evals = 24 Prec setup evals = 0 Prec solves = 0 -LS iters = 59 +LS iters = 24 LS fails = 0 Jac-times setups = 0 -Jac-times evals = 59 -LS iters per NLS iter = 1.22916666666667 +Jac-times evals = 24 +LS iters per NLS iter = 1 Jac evals per NLS iter = 0 Prec evals per NLS iter = 0 End MRIStep StageInfo test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_5.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_5.out index 17f7ab21c4..0d47ad3d70 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_5.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_5.out @@ -5,81 +5,67 @@ Using GMRES iterative linear solver t u v u err v err ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-RHS processing (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] [Pre-RHS processing (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] - [Post-stage processing (stage 1 of 5) at t = 6.76e-02 (tn = 0.00e+00 , tcur = 6.76e-02), ||y||_2 = 1.9277014052e+00] - [Pre-RHS processing (stage 1 of 5) at t = 6.76e-02 (tn = 0.00e+00 , tcur = 6.76e-02), ||y||_2 = 1.9277014052e+00] - [Post-stage processing (stage 2 of 5) at t = 8.00e-02 (tn = 0.00e+00 , tcur = 8.00e-02), ||y||_2 = 1.8630468331e+00] - [Pre-RHS processing (stage 2 of 5) at t = 8.00e-02 (tn = 0.00e+00 , tcur = 8.00e-02), ||y||_2 = 1.8630468331e+00] - [Post-stage processing (stage 3 of 5) at t = 1.13e-01 (tn = 0.00e+00 , tcur = 1.13e-01), ||y||_2 = 1.6895511338e+00] - [Pre-RHS processing (stage 3 of 5) at t = 1.13e-01 (tn = 0.00e+00 , tcur = 1.13e-01), ||y||_2 = 1.6895511338e+00] - [Post-stage processing (stage 4 of 5) at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01), ||y||_2 = 1.7553780461e+00] - [Post-stage processing (stage 5 of 5) at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01), ||y||_2 = 1.7553690226e+00] - [Post-step failure processing at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01),||y||_2 = 1.7553780461e+00] - [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] - [Post-stage processing (stage 1 of 5) at t = 3.18e-02 (tn = 0.00e+00 , tcur = 3.18e-02), ||y||_2 = 2.0746627548e+00] - [Pre-RHS processing (stage 1 of 5) at t = 3.18e-02 (tn = 0.00e+00 , tcur = 3.18e-02), ||y||_2 = 2.0746627548e+00] - [Post-stage processing (stage 2 of 5) at t = 3.76e-02 (tn = 0.00e+00 , tcur = 3.76e-02), ||y||_2 = 2.0566853389e+00] - [Pre-RHS processing (stage 2 of 5) at t = 3.76e-02 (tn = 0.00e+00 , tcur = 3.76e-02), ||y||_2 = 2.0566853389e+00] - [Post-stage processing (stage 3 of 5) at t = 5.33e-02 (tn = 0.00e+00 , tcur = 5.33e-02), ||y||_2 = 1.9956059674e+00] - [Pre-RHS processing (stage 3 of 5) at t = 5.33e-02 (tn = 0.00e+00 , tcur = 5.33e-02), ||y||_2 = 1.9956059674e+00] - [Post-stage processing (stage 4 of 5) at t = 4.70e-02 (tn = 0.00e+00 , tcur = 4.70e-02), ||y||_2 = 2.0220308045e+00] - [Post-stage processing (stage 5 of 5) at t = 4.70e-02 (tn = 0.00e+00 , tcur = 4.70e-02), ||y||_2 = 2.0220301555e+00] - [Post-step processing at t = 4.70e-02 (tn = 0.00e+00 , tcur = 4.70e-02),||y||_2 = 2.0220308045e+00] - 4.7038717251e-02 1.2245191379e+00 1.6090871497e+00 7.2407223550e-08 3.3077079586e-07 - [Pre-step processing at t = 4.70e-02 (tn = 4.70e-02 , tcur = 4.70e-02),||y||_2 = 2.0220308045e+00] - [Pre-RHS processing (stage 0 of 5) at t = 4.70e-02 (tn = 4.70e-02 , tcur = 4.70e-02), ||y||_2 = 2.0220308045e+00] - [Post-stage processing (stage 1 of 5) at t = 7.89e-02 (tn = 4.70e-02 , tcur = 7.89e-02), ||y||_2 = 1.8687693366e+00] - [Pre-RHS processing (stage 1 of 5) at t = 7.89e-02 (tn = 4.70e-02 , tcur = 7.89e-02), ||y||_2 = 1.8687693366e+00] - [Post-stage processing (stage 2 of 5) at t = 8.47e-02 (tn = 4.70e-02 , tcur = 8.47e-02), ||y||_2 = 1.8374772654e+00] - [Pre-RHS processing (stage 2 of 5) at t = 8.47e-02 (tn = 4.70e-02 , tcur = 8.47e-02), ||y||_2 = 1.8374772654e+00] - [Post-stage processing (stage 3 of 5) at t = 1.00e-01 (tn = 4.70e-02 , tcur = 1.00e-01), ||y||_2 = 1.7534837182e+00] - [Pre-RHS processing (stage 3 of 5) at t = 1.00e-01 (tn = 4.70e-02 , tcur = 1.00e-01), ||y||_2 = 1.7534837182e+00] - [Post-stage processing (stage 4 of 5) at t = 9.41e-02 (tn = 4.70e-02 , tcur = 9.41e-02), ||y||_2 = 1.7866195702e+00] - [Post-stage processing (stage 5 of 5) at t = 9.41e-02 (tn = 4.70e-02 , tcur = 9.41e-02), ||y||_2 = 1.7866191431e+00] - [Post-step processing at t = 9.41e-02 (tn = 4.70e-02 , tcur = 9.41e-02),||y||_2 = 1.7866195702e+00] - 9.4077434503e-02 1.2238419876e+00 1.3016221719e+00 8.9882908894e-08 1.7942663662e-06 - [Pre-step processing at t = 9.41e-02 (tn = 9.41e-02 , tcur = 9.41e-02),||y||_2 = 1.7866195702e+00] - [Pre-RHS processing (stage 0 of 5) at t = 9.41e-02 (tn = 9.41e-02 , tcur = 9.41e-02), ||y||_2 = 1.7866195702e+00] - [Post-stage processing (stage 1 of 5) at t = 1.28e-01 (tn = 9.41e-02 , tcur = 1.28e-01), ||y||_2 = 1.6322862176e+00] - [Pre-RHS processing (stage 1 of 5) at t = 1.28e-01 (tn = 9.41e-02 , tcur = 1.28e-01), ||y||_2 = 1.6322862176e+00] - [Post-stage processing (stage 2 of 5) at t = 1.34e-01 (tn = 9.41e-02 , tcur = 1.34e-01), ||y||_2 = 1.6132224524e+00] - [Pre-RHS processing (stage 2 of 5) at t = 1.34e-01 (tn = 9.41e-02 , tcur = 1.34e-01), ||y||_2 = 1.6132224524e+00] - [Post-stage processing (stage 3 of 5) at t = 1.50e-01 (tn = 9.41e-02 , tcur = 1.50e-01), ||y||_2 = 1.5821211389e+00] - [Pre-RHS processing (stage 3 of 5) at t = 1.50e-01 (tn = 9.41e-02 , tcur = 1.50e-01), ||y||_2 = 1.5821211389e+00] - [Post-stage processing (stage 4 of 5) at t = 1.44e-01 (tn = 9.41e-02 , tcur = 1.44e-01), ||y||_2 = 1.5906968039e+00] - [Post-stage processing (stage 5 of 5) at t = 1.44e-01 (tn = 9.41e-02 , tcur = 1.44e-01), ||y||_2 = 1.5906958150e+00] - [Post-step processing at t = 1.44e-01 (tn = 9.41e-02 , tcur = 1.44e-01),||y||_2 = 1.5906968039e+00] - 1.4372138650e-01 1.2226386256e+00 1.0175810107e+00 1.1664470589e-07 2.7813679992e-06 + [Post-stage processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1212987717e+00] + [Pre-RHS processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1212987717e+00] + [Post-stage processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1212901821e+00] + [Pre-RHS processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1212901821e+00] + [Post-stage processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1212596854e+00] + [Pre-RHS processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1212596854e+00] + [Post-stage processing (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] + [Post-step processing at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] + 1.0000000000e-03 1.2247447693e+00 1.7319930735e+00 2.8288482667e-13 1.3744561045e-13 + [Pre-step processing at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] + [Pre-RHS processing (stage 0 of 5) at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] + [Post-stage processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1211877224e+00] + [Pre-RHS processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1211877224e+00] + [Post-stage processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1211674743e+00] + [Pre-RHS processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1211674743e+00] + [Post-stage processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1211055207e+00] + [Pre-RHS processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1211055207e+00] + [Post-stage processing (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] + [Post-step processing at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] + 2.0000000000e-03 1.2247444631e+00 1.7318198829e+00 2.7395863356e-12 2.6245672302e-13 + [Pre-step processing at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] + [Pre-RHS processing (stage 0 of 5) at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] + [Post-stage processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1209823117e+00] + [Pre-RHS processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1209823117e+00] + [Post-stage processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1209504105e+00] + [Pre-RHS processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1209504105e+00] + [Post-stage processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1208570165e+00] + [Pre-RHS processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1208570165e+00] + [Post-stage processing (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956339e+00] + [Post-step processing at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03),||y||_2 = 2.1208956339e+00] + 3.0000000000e-03 1.2247439528e+00 1.7315312703e+00 9.5614627327e-12 3.7592151614e-13 ------------------------------------------------------------------------------------------------------------------------------ -Current time = 0.143721386500587 +Current time = 0.003 Steps = 3 -Step attempts = 4 +Step attempts = 3 Stability limited steps = 0 -Accuracy limited steps = 4 -Error test fails = 1 +Accuracy limited steps = 0 +Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 -Initial step size = 0.1 -Last step size = 0.0496439519979517 -Current step size = 0.0499492708252477 -Explicit slow RHS fn evals = 16 -Implicit slow RHS fn evals = 64 +Initial step size = 0.001 +Last step size = 0.001 +Current step size = 0.001 +Explicit slow RHS fn evals = 12 +Implicit slow RHS fn evals = 36 Inner stepper failures = 0 -NLS iters = 48 +NLS iters = 24 NLS fails = 0 -NLS iters per step = 16 +NLS iters per step = 8 LS setups = 0 Jac fn evals = 0 -LS RHS fn evals = 58 +LS RHS fn evals = 24 Prec setup evals = 0 Prec solves = 0 -LS iters = 58 +LS iters = 24 LS fails = 0 Jac-times setups = 0 -Jac-times evals = 58 -LS iters per NLS iter = 1.20833333333333 +Jac-times evals = 24 +LS iters per NLS iter = 1 Jac evals per NLS iter = 0 Prec evals per NLS iter = 0 End MRIStep StageInfo test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_6.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_6.out index 651acf0af6..92ab1f21fe 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_6.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_6.out @@ -3,58 +3,46 @@ Using MERK method t u v u err v err ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-RHS processing (stage 0 of 4) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] [Pre-RHS processing (stage 0 of 4) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] - [Post-stage processing (stage 1 of 4) at t = 5.00e-02 (tn = 0.00e+00 , tcur = 5.00e-02), ||y||_2 = 2.0100518077e+00] - [Pre-RHS processing (stage 1 of 4) at t = 5.00e-02 (tn = 0.00e+00 , tcur = 5.00e-02), ||y||_2 = 2.0100518077e+00] - [Post-stage processing (stage 2 of 4) at t = 6.67e-02 (tn = 0.00e+00 , tcur = 6.67e-02), ||y||_2 = 1.9323737599e+00] - [Pre-RHS processing (stage 2 of 4) at t = 6.67e-02 (tn = 0.00e+00 , tcur = 6.67e-02), ||y||_2 = 1.9323737599e+00] - [Post-stage processing (stage 4 of 4) at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01), ||y||_2 = 1.7553417874e+00] - [Post-stage processing (stage 3 of 4) at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01), ||y||_2 = 1.7553802047e+00] - [Post-step failure processing at t = 1.00e-01 (tn = 0.00e+00 , tcur = 1.00e-01),||y||_2 = 1.7553802047e+00] - [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] - [Post-stage processing (stage 1 of 4) at t = 1.43e-02 (tn = 0.00e+00 , tcur = 1.43e-02), ||y||_2 = 2.1117506552e+00] - [Pre-RHS processing (stage 1 of 4) at t = 1.43e-02 (tn = 0.00e+00 , tcur = 1.43e-02), ||y||_2 = 2.1117506552e+00] - [Post-stage processing (stage 2 of 4) at t = 1.90e-02 (tn = 0.00e+00 , tcur = 1.90e-02), ||y||_2 = 2.1043459618e+00] - [Pre-RHS processing (stage 2 of 4) at t = 1.90e-02 (tn = 0.00e+00 , tcur = 1.90e-02), ||y||_2 = 2.1043459618e+00] - [Post-stage processing (stage 4 of 4) at t = 2.86e-02 (tn = 0.00e+00 , tcur = 2.86e-02), ||y||_2 = 2.0835156932e+00] - [Post-stage processing (stage 3 of 4) at t = 2.86e-02 (tn = 0.00e+00 , tcur = 2.86e-02), ||y||_2 = 2.0835163684e+00] - [Post-step processing at t = 2.86e-02 (tn = 0.00e+00 , tcur = 2.86e-02),||y||_2 = 2.0835163684e+00] - 2.8560774168e-02 1.2246616429e+00 1.6855990976e+00 2.2506326580e-08 3.6164009787e-08 - [Pre-step processing at t = 2.86e-02 (tn = 2.86e-02 , tcur = 2.86e-02),||y||_2 = 2.0835163684e+00] - [Pre-RHS processing (stage 0 of 4) at t = 2.86e-02 (tn = 2.86e-02 , tcur = 2.86e-02), ||y||_2 = 2.0835163684e+00] - [Post-stage processing (stage 1 of 4) at t = 4.28e-02 (tn = 2.86e-02 , tcur = 4.28e-02), ||y||_2 = 2.0382427189e+00] - [Pre-RHS processing (stage 1 of 4) at t = 4.28e-02 (tn = 2.86e-02 , tcur = 4.28e-02), ||y||_2 = 2.0382427189e+00] - [Post-stage processing (stage 2 of 4) at t = 4.76e-02 (tn = 2.86e-02 , tcur = 4.76e-02), ||y||_2 = 2.0197685795e+00] - [Pre-RHS processing (stage 2 of 4) at t = 4.76e-02 (tn = 2.86e-02 , tcur = 4.76e-02), ||y||_2 = 2.0197685795e+00] - [Post-stage processing (stage 4 of 4) at t = 5.71e-02 (tn = 2.86e-02 , tcur = 5.71e-02), ||y||_2 = 1.9785258650e+00] - [Post-stage processing (stage 3 of 4) at t = 5.71e-02 (tn = 2.86e-02 , tcur = 5.71e-02), ||y||_2 = 1.9785265655e+00] - [Post-step processing at t = 5.71e-02 (tn = 2.86e-02 , tcur = 5.71e-02),||y||_2 = 1.9785265655e+00] - 5.7121548336e-02 1.2244119400e+00 1.5541501767e+00 3.8773453559e-08 5.2852703813e-07 - [Pre-step processing at t = 5.71e-02 (tn = 5.71e-02 , tcur = 5.71e-02),||y||_2 = 1.9785265655e+00] - [Pre-RHS processing (stage 0 of 4) at t = 5.71e-02 (tn = 5.71e-02 , tcur = 5.71e-02), ||y||_2 = 1.9785265655e+00] - [Post-stage processing (stage 1 of 4) at t = 7.16e-02 (tn = 5.71e-02 , tcur = 7.16e-02), ||y||_2 = 1.9070735973e+00] - [Pre-RHS processing (stage 1 of 4) at t = 7.16e-02 (tn = 5.71e-02 , tcur = 7.16e-02), ||y||_2 = 1.9070735973e+00] - [Post-stage processing (stage 2 of 4) at t = 7.64e-02 (tn = 5.71e-02 , tcur = 7.64e-02), ||y||_2 = 1.8816324251e+00] - [Pre-RHS processing (stage 2 of 4) at t = 7.64e-02 (tn = 5.71e-02 , tcur = 7.64e-02), ||y||_2 = 1.8816324251e+00] - [Post-stage processing (stage 4 of 4) at t = 8.61e-02 (tn = 5.71e-02 , tcur = 8.61e-02), ||y||_2 = 1.8296338557e+00] - [Post-stage processing (stage 3 of 4) at t = 8.61e-02 (tn = 5.71e-02 , tcur = 8.61e-02), ||y||_2 = 1.8296348692e+00] - [Post-step processing at t = 8.61e-02 (tn = 5.71e-02 , tcur = 8.61e-02),||y||_2 = 1.8296348692e+00] - 8.6097654722e-02 1.2239885854e+00 1.3599322400e+00 4.6675652676e-08 9.1623140341e-07 + [Post-stage processing (stage 1 of 4) at t = 5.00e-04 (tn = 0.00e+00 , tcur = 5.00e-04), ||y||_2 = 2.1213085585e+00] + [Pre-RHS processing (stage 1 of 4) at t = 5.00e-04 (tn = 0.00e+00 , tcur = 5.00e-04), ||y||_2 = 2.1213085585e+00] + [Post-stage processing (stage 2 of 4) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1212993663e+00] + [Pre-RHS processing (stage 2 of 4) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1212993663e+00] + [Post-stage processing (stage 3 of 4) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] + [Post-step processing at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] + 1.0000000000e-03 1.2247447693e+00 1.7319930735e+00 3.3528735344e-14 1.4566126083e-13 + [Pre-step processing at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] + [Pre-RHS processing (stage 0 of 4) at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] + [Post-stage processing (stage 1 of 4) at t = 1.50e-03 (tn = 1.00e-03 , tcur = 1.50e-03), ||y||_2 = 2.1212141650e+00] + [Pre-RHS processing (stage 1 of 4) at t = 1.50e-03 (tn = 1.00e-03 , tcur = 1.50e-03), ||y||_2 = 2.1212141650e+00] + [Post-stage processing (stage 2 of 4) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1211892422e+00] + [Pre-RHS processing (stage 2 of 4) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1211892422e+00] + [Post-stage processing (stage 3 of 4) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] + [Post-step processing at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] + 2.0000000000e-03 1.2247444631e+00 1.7318198829e+00 6.7057470687e-14 2.7866597918e-13 + [Pre-step processing at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] + [Pre-RHS processing (stage 0 of 4) at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] + [Post-stage processing (stage 1 of 4) at t = 2.50e-03 (tn = 2.00e-03 , tcur = 2.50e-03), ||y||_2 = 2.1210254031e+00] + [Pre-RHS processing (stage 1 of 4) at t = 2.50e-03 (tn = 2.00e-03 , tcur = 2.50e-03), ||y||_2 = 2.1210254031e+00] + [Post-stage processing (stage 2 of 4) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1209847564e+00] + [Pre-RHS processing (stage 2 of 4) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1209847564e+00] + [Post-stage processing (stage 3 of 4) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956339e+00] + [Post-step processing at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03),||y||_2 = 2.1208956339e+00] + 3.0000000000e-03 1.2247439528e+00 1.7315312703e+00 1.0058620603e-13 3.9879211045e-13 ------------------------------------------------------------------------------------------------------------------------------ -Current time = 0.0860976547220178 +Current time = 0.003 Steps = 3 -Step attempts = 4 +Step attempts = 3 Stability limited steps = 0 -Accuracy limited steps = 4 -Error test fails = 1 +Accuracy limited steps = 0 +Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 -Initial step size = 0.1 -Last step size = 0.0289761063859351 -Current step size = 0.0288866044534405 -Explicit slow RHS fn evals = 12 +Initial step size = 0.001 +Last step size = 0.001 +Current step size = 0.001 +Explicit slow RHS fn evals = 9 Implicit slow RHS fn evals = 0 Inner stepper failures = 0 NLS iters = 0 From 9015ab5cc0e52fdab62524cb2ec3557184656b9f Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 3 Feb 2026 13:00:21 -0500 Subject: [PATCH 085/298] Updated default numbers of stages for SSP(s,2) and SSP(s,3) --- CHANGELOG.md | 5 +++++ .../guide/source/Usage/LSRKStep/User_callable.rst | 10 ++++++++-- doc/shared/RecentChanges.rst | 5 +++++ src/arkode/arkode_lsrkstep_io.c | 8 ++++---- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 991fb9ac84..f60505d993 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ ### New Features and Enhancements + The default numbers of stages for the SSP Runge--Kutta methods `ARKODE_LSRK_SSP_S_2` + and `ARKODE_LSRK_SSP_S_3` in LSRKStep were changed from 10 and 9, respectively, to + their minimum allowable values of 2 and 4. Users may revert to the previous values + by calling `LSRKStepSetNumSSPStages`. + ### Bug Fixes ### Deprecation Notices diff --git a/doc/arkode/guide/source/Usage/LSRKStep/User_callable.rst b/doc/arkode/guide/source/Usage/LSRKStep/User_callable.rst index 1e37c08b1d..4215b8bc44 100644 --- a/doc/arkode/guide/source/Usage/LSRKStep/User_callable.rst +++ b/doc/arkode/guide/source/Usage/LSRKStep/User_callable.rst @@ -387,13 +387,19 @@ Allowable Method Families If :c:func:`LSRKStepSetNumSSPStages` is not called, the default ``num_of_stages`` is set. Calling this function with ``num_of_stages <= 0`` resets the default values: - * ``num_of_stages = 10`` for :c:enumerator:`ARKODE_LSRK_SSP_S_2` - * ``num_of_stages = 9`` for :c:enumerator:`ARKODE_LSRK_SSP_S_3` + * ``num_of_stages = 2`` for :c:enumerator:`ARKODE_LSRK_SSP_S_2` + * ``num_of_stages = 4`` for :c:enumerator:`ARKODE_LSRK_SSP_S_3` * ``num_of_stages = 10`` for :c:enumerator:`ARKODE_LSRK_SSP_10_4` This routine will be called by :c:func:`ARKodeSetOptions` when using the key "arkid.num_ssp_stages". + .. versionchanged:: x.y.z + + The default numbers of stages for :c:enumerator:`ARKODE_LSRK_SSP_S_2` and :c:enumerator:`ARKODE_LSRK_SSP_S_3` + were changed from 10 and 9, respectively, to their minimum allowable values of 2 and 4. + + .. _ARKODE.Usage.LSRKStep.OptionalOutputs: Optional output functions diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index 22e47b0213..e884275a61 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -5,6 +5,11 @@ **New Features and Enhancements** + The default numbers of stages for the SSP Runge--Kutta methods :c:enumerator:`ARKODE_LSRK_SSP_S_2` + and :c:enumerator:`ARKODE_LSRK_SSP_S_3` in LSRKStep were changed from 10 and 9, respectively, to + their minimum allowable values of 2 and 4. Users may revert to the previous values by calling + :c:func:`LSRKStepSetNumSSPStages`. + **Bug Fixes** **Deprecation Notices** diff --git a/src/arkode/arkode_lsrkstep_io.c b/src/arkode/arkode_lsrkstep_io.c index 93bb0a808d..617c24c769 100644 --- a/src/arkode/arkode_lsrkstep_io.c +++ b/src/arkode/arkode_lsrkstep_io.c @@ -115,7 +115,7 @@ int LSRKStepSetSSPMethod(void* arkode_mem, ARKODE_LSRKMethodType method) case ARKODE_LSRK_SSP_S_2: ark_mem->step = lsrkStep_TakeStepSSPs2; step_mem->is_SSP = SUNTRUE; - step_mem->req_stages = 10; + step_mem->req_stages = 2; step_mem->nfusedopvecs = 3; step_mem->q = ark_mem->hadapt_mem->q = 2; step_mem->p = ark_mem->hadapt_mem->p = 1; @@ -123,7 +123,7 @@ int LSRKStepSetSSPMethod(void* arkode_mem, ARKODE_LSRKMethodType method) case ARKODE_LSRK_SSP_S_3: ark_mem->step = lsrkStep_TakeStepSSPs3; step_mem->is_SSP = SUNTRUE; - step_mem->req_stages = 9; + step_mem->req_stages = 4; step_mem->nfusedopvecs = 3; step_mem->q = ark_mem->hadapt_mem->q = 3; step_mem->p = ark_mem->hadapt_mem->p = 2; @@ -419,9 +419,9 @@ int LSRKStepSetNumSSPStages(void* arkode_mem, int num_of_stages) { switch (step_mem->LSRKmethod) { - case ARKODE_LSRK_SSP_S_2: step_mem->req_stages = 10; break; + case ARKODE_LSRK_SSP_S_2: step_mem->req_stages = 2; break; - case ARKODE_LSRK_SSP_S_3: step_mem->req_stages = 9; break; + case ARKODE_LSRK_SSP_S_3: step_mem->req_stages = 4; break; case ARKODE_LSRK_SSP_10_4: step_mem->req_stages = 10; break; From 360b360db1444009e66be2d59d7ddd33a8733278 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 3 Feb 2026 13:26:15 -0500 Subject: [PATCH 086/298] Updated .out files for SSP(s,2) and SSP(s,3) method now that the default numbers of stages has changed --- .../test_logging_arkode_lsrkstep_2.out | 10 +- .../test_logging_arkode_lsrkstep_3.out | 16 +- .../test_logging_arkode_lsrkstep_lvl3_2.out | 76 ++------ .../test_logging_arkode_lsrkstep_lvl3_3.out | 88 ++++----- .../test_logging_arkode_lsrkstep_lvl4_2.out | 82 ++------ .../test_logging_arkode_lsrkstep_lvl4_3.out | 100 ++++------ .../test_logging_arkode_lsrkstep_lvl5_2.out | 146 +++----------- .../test_logging_arkode_lsrkstep_lvl5_3.out | 178 +++++++----------- 8 files changed, 204 insertions(+), 492 deletions(-) diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_2.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_2.out index 8d6218e82e..7b0e36d36f 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_2.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_2.out @@ -2,9 +2,9 @@ Start LSRKStep Logging test t y y err --------------------------------------------------------------------- 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 - 6.103515625000001e-12 6.103515625000000e-12 8.077935669463161e-28 - 6.104125976562500e-08 6.104125976562493e-08 0.000000000000000e+00 - 1.281744384765625e-06 1.281744384764889e-06 3.388131789017201e-20 + 6.103515625000001e-12 6.103515625000001e-12 0.000000000000000e+00 + 6.104125976562500e-08 6.104125976562489e-08 3.970466940254533e-23 + 1.281744384765625e-06 1.281744384764619e-06 3.038730698274802e-19 --------------------------------------------------------------------- Current time = 1.28174438476563e-06 Steps = 3 @@ -17,6 +17,6 @@ Inequality constraint fails = 0 Initial step size = 6.103515625e-12 Last step size = 1.220703125e-06 Current step size = 2.44140625e-05 -RHS fn evals = 32 -Number of stages used = 10 +RHS fn evals = 8 +Number of stages used = 2 End LSRKStep Logging test diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_3.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_3.out index 5b31b82245..e7dbbe9162 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_3.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_3.out @@ -2,11 +2,11 @@ Start LSRKStep Logging test t y y err --------------------------------------------------------------------- 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 - 6.103515625000001e-12 6.103515625000001e-12 0.000000000000000e+00 - 6.104125976562500e-08 6.104125976562493e-08 0.000000000000000e+00 - 1.281744384765625e-06 1.281744384764923e-06 0.000000000000000e+00 + 6.103515625000001e-12 9.155273419059814e-12 3.051757794059814e-12 + 2.825056533018332e-11 4.237584763367401e-11 1.412528230349069e-11 + 8.054712348328291e-11 1.208206824125582e-10 4.027355892927531e-11 --------------------------------------------------------------------- -Current time = 1.28174438476563e-06 +Current time = 8.05471234832829e-11 Steps = 3 Step attempts = 3 Stability limited steps = 0 @@ -15,8 +15,8 @@ Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 Initial step size = 6.103515625e-12 -Last step size = 1.220703125e-06 -Current step size = 2.44140625e-05 -RHS fn evals = 29 -Number of stages used = 9 +Last step size = 5.22965581530996e-11 +Current step size = 9.27352060660382e-11 +RHS fn evals = 17 +Number of stages used = 4 End LSRKStep Logging test diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_2.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_2.out index 33eaafbdf7..6c3daff4c4 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_2.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_2.out @@ -5,78 +5,30 @@ Start LSRKStep Logging test [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 1, tn = 0, h = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 0, tcur = 0 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 6.78168402777778e-13 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 1.35633680555556e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 3, tcur = 2.03450520833333e-12 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 4, tcur = 2.71267361111111e-12 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 5, tcur = 3.39084201388889e-12 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 6, tcur = 4.06901041666667e-12 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 7, tcur = 4.74717881944444e-12 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 8, tcur = 5.42534722222222e-12 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 9, tcur = 6.103515625e-12 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 10, tcur = 6.103515625e-12 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 8.07793566946316e-18 - 6.103515625000001e-12 6.103515625000000e-12 8.077935669463161e-28 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 + 6.103515625000001e-12 6.103515625000001e-12 0.000000000000000e+00 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 6.103515625e-12, h = 6.103515625e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 0, tcur = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 6.78778754340278e-09 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 1.35694715711806e-08 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 3, tcur = 2.03511555989583e-08 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 4, tcur = 2.71328396267361e-08 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 5, tcur = 3.39145236545139e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 6.1041259765625e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 6, tcur = 4.06962076822917e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 6.1041259765625e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 7, tcur = 4.74778917100694e-08 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 8, tcur = 5.42595757378472e-08 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 9, tcur = 6.1041259765625e-08 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 10, tcur = 6.1041259765625e-08 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 - 6.104125976562500e-08 6.104125976562493e-08 0.000000000000000e+00 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 5.29395559722197e-13 + 6.104125976562500e-08 6.104125976562489e-08 3.970466940254533e-23 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 3, tn = 6.1041259765625e-08, h = 1.220703125e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 0, tcur = 6.1041259765625e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 1.96674940321181e-07 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 3.32308620876736e-07 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 3, tcur = 4.67942301432292e-07 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 4, tcur = 6.03575981987847e-07 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 5, tcur = 7.39209662543403e-07 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 6, tcur = 8.74843343098958e-07 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 7, tcur = 1.01047702365451e-06 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 8, tcur = 1.14611070421007e-06 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 9, tcur = 1.28174438476563e-06 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 1.28174438476563e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 10, tcur = 1.28174438476563e-06 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 1.28174438476563e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 2.01047602983307e-10 - 1.281744384765625e-06 1.281744384764889e-06 3.388131789017201e-20 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 3.88550946397212e-09 + 1.281744384765625e-06 1.281744384764619e-06 3.038730698274802e-19 --------------------------------------------------------------------- Current time = 1.28174438476563e-06 Steps = 3 @@ -89,6 +41,6 @@ Inequality constraint fails = 0 Initial step size = 6.103515625e-12 Last step size = 1.220703125e-06 Current step size = 2.44140625e-05 -RHS fn evals = 32 -Number of stages used = 10 +RHS fn evals = 8 +Number of stages used = 2 End LSRKStep Logging test diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_3.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_3.out index d1281b14da..673844d869 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_3.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_3.out @@ -5,80 +5,56 @@ Start LSRKStep Logging test [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 1, tn = 0, h = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 0, tcur = 0 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 1.01725260416667e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 3.0517578125e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 2.03450520833333e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 3.0517578125e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 3.0517578125e-12 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 4.06901041666667e-12 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 5, tcur = 5.08626302083333e-12 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 6, tcur = 3.0517578125e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 7, tcur = 4.06901041666667e-12 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 8, tcur = 5.08626302083333e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 3.0517578125e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 9, tcur = 6.103515625e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-compute-embedding] status = success -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 - 6.103515625000001e-12 6.103515625000001e-12 0.000000000000000e+00 -[INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 6.103515625e-12, h = 6.103515625e-08 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0.0152587890625 + 6.103515625000001e-12 9.155273419059814e-12 3.051757794059814e-12 +[INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 6.103515625e-12, h = 2.21470497051833e-11 [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 0, tcur = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 1.01786295572917e-08 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 2.03511555989583e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 1.71770404775917e-11 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 3.0523681640625e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 1.71770404775917e-11 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 4.06962076822917e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 2.82505653301833e-11 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 5, tcur = 5.08687337239583e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 1.71770404775917e-11 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 6, tcur = 3.0523681640625e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 2.82505653301833e-11 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 7, tcur = 4.06962076822917e-08 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 8, tcur = 5.08687337239583e-08 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 9, tcur = 6.1041259765625e-08 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-compute-embedding] status = success -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 1.32348889930549e-13 - 6.104125976562500e-08 6.104125976562493e-08 0.000000000000000e+00 -[INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 3, tn = 6.1041259765625e-08, h = 1.220703125e-06 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 0, tcur = 6.1041259765625e-08 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 2.64491780598958e-07 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 4.67942301432292e-07 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 6.71392822265625e-07 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 8.74843343098958e-07 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0.0553676190266225 + 2.825056533018332e-11 4.237584763367401e-11 1.412528230349069e-11 +[INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 3, tn = 2.82505653301833e-11, h = 5.22965581530996e-11 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 0, tcur = 2.82505653301833e-11 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 5, tcur = 1.07829386393229e-06 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 5.43988444067331e-11 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 6, tcur = 6.71392822265625e-07 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 5.43988444067331e-11 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 7, tcur = 8.74843343098958e-07 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 8.05471234832829e-11 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 8, tcur = 1.07829386393229e-06 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 5.43988444067331e-11 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 9, tcur = 1.28174438476563e-06 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 8.05471234832829e-11 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-compute-embedding] status = success -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 1.65070663502083e-10 - 1.281744384765625e-06 1.281744384764923e-06 2.117582368135751e-22 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0.130741338151707 + 8.054712348328291e-11 1.208206824125582e-10 4.027355892927531e-11 --------------------------------------------------------------------- -Current time = 1.28174438476563e-06 +Current time = 8.05471234832829e-11 Steps = 3 Step attempts = 3 Stability limited steps = 0 @@ -87,8 +63,8 @@ Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 Initial step size = 6.103515625e-12 -Last step size = 1.220703125e-06 -Current step size = 2.44140625e-05 -RHS fn evals = 29 -Number of stages used = 9 +Last step size = 5.22965581530996e-11 +Current step size = 9.27352060660382e-11 +RHS fn evals = 17 +Number of stages used = 4 End LSRKStep Logging test diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_2.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_2.out index ca4bd6e6d6..403052f65d 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_2.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_2.out @@ -5,87 +5,39 @@ Start LSRKStep Logging test [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 1, tn = 0, h = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 0, tcur = 0 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 6.78168402777778e-13 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 1.35633680555556e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 3, tcur = 2.03450520833333e-12 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 4, tcur = 2.71267361111111e-12 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 5, tcur = 3.39084201388889e-12 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 6, tcur = 4.06901041666667e-12 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 7, tcur = 4.74717881944444e-12 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 8, tcur = 5.42534722222222e-12 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 9, tcur = 6.103515625e-12 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 10, tcur = 6.103515625e-12 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.002147483648 +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = inf [DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 6.103515625e-08 [DEBUG][rank 0][arkAdapt][new-step-eta] eta = 10000 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 8.07793566946316e-18 - 6.103515625000001e-12 6.103515625000000e-12 8.077935669463161e-28 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 + 6.103515625000001e-12 6.103515625000001e-12 0.000000000000000e+00 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 6.103515625e-12, h = 6.103515625e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 0, tcur = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 6.78778754340278e-09 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 1.35694715711806e-08 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 3, tcur = 2.03511555989583e-08 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 4, tcur = 2.71328396267361e-08 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 5, tcur = 3.39145236545139e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 6.1041259765625e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 6, tcur = 4.06962076822917e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 6.1041259765625e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 7, tcur = 4.74778917100694e-08 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 8, tcur = 5.42595757378472e-08 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 9, tcur = 6.1041259765625e-08 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 10, tcur = 6.1041259765625e-08 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = inf +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.08388608256 [DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 1.220703125e-06 [DEBUG][rank 0][arkAdapt][new-step-eta] eta = 20 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 - 6.104125976562500e-08 6.104125976562493e-08 0.000000000000000e+00 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 5.29395559722197e-13 + 6.104125976562500e-08 6.104125976562489e-08 3.970466940254533e-23 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 3, tn = 6.1041259765625e-08, h = 1.220703125e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 0, tcur = 6.1041259765625e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 1.96674940321181e-07 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 3.32308620876736e-07 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 3, tcur = 4.67942301432292e-07 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 4, tcur = 6.03575981987847e-07 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 5, tcur = 7.39209662543403e-07 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 6, tcur = 8.74843343098958e-07 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 7, tcur = 1.01047702365451e-06 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 8, tcur = 1.14611070421007e-06 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 9, tcur = 1.28174438476563e-06 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 1.28174438476563e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 10, tcur = 1.28174438476563e-06 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 1.28174438476563e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.0860915657862948 +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.0195833087394633 [DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 2.44140625e-05 [DEBUG][rank 0][arkAdapt][new-step-eta] eta = 20 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 2.01047602983307e-10 - 1.281744384765625e-06 1.281744384764889e-06 3.388131789017201e-20 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 3.88550946397212e-09 + 1.281744384765625e-06 1.281744384764619e-06 3.038730698274802e-19 --------------------------------------------------------------------- Current time = 1.28174438476563e-06 Steps = 3 @@ -98,6 +50,6 @@ Inequality constraint fails = 0 Initial step size = 6.103515625e-12 Last step size = 1.220703125e-06 Current step size = 2.44140625e-05 -RHS fn evals = 32 -Number of stages used = 10 +RHS fn evals = 8 +Number of stages used = 2 End LSRKStep Logging test diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_3.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_3.out index c4c77f2721..7ac3c5f7f9 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_3.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_3.out @@ -5,89 +5,65 @@ Start LSRKStep Logging test [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 1, tn = 0, h = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 0, tcur = 0 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 1.01725260416667e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 3.0517578125e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 2.03450520833333e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 3.0517578125e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 3.0517578125e-12 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 4.06901041666667e-12 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 5, tcur = 5.08626302083333e-12 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 6, tcur = 3.0517578125e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 7, tcur = 4.06901041666667e-12 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 8, tcur = 5.08626302083333e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 3.0517578125e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 9, tcur = 6.103515625e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-compute-embedding] status = success -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = inf -[DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 6.103515625e-08 -[DEBUG][rank 0][arkAdapt][new-step-eta] eta = 10000 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 - 6.103515625000001e-12 6.103515625000001e-12 0.000000000000000e+00 -[INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 6.103515625e-12, h = 6.103515625e-08 +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 2.46078330057592e-11 +[DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 2.21470497051833e-11 +[DEBUG][rank 0][arkAdapt][new-step-eta] eta = 3.62857262369723 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0.0152587890625 + 6.103515625000001e-12 9.155273419059814e-12 3.051757794059814e-12 +[INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 6.103515625e-12, h = 2.21470497051833e-11 [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 0, tcur = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 1.01786295572917e-08 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 2.03511555989583e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 1.71770404775917e-11 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 3.0523681640625e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 1.71770404775917e-11 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 4.06962076822917e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 2.82505653301833e-11 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 5, tcur = 5.08687337239583e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 1.71770404775917e-11 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 6, tcur = 3.0523681640625e-08 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 7, tcur = 4.06962076822917e-08 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 8, tcur = 5.08687337239583e-08 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 9, tcur = 6.1041259765625e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 2.82505653301833e-11 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-compute-embedding] status = success -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = inf -[DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 1.220703125e-06 -[DEBUG][rank 0][arkAdapt][new-step-eta] eta = 20 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 - 6.104125976562500e-08 6.104125976562493e-08 0.000000000000000e+00 -[INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 3, tn = 6.1041259765625e-08, h = 1.220703125e-06 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 0, tcur = 6.1041259765625e-08 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 2.64491780598958e-07 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 4.67942301432292e-07 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 6.71392822265625e-07 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 8.74843343098958e-07 +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 5.81072868367773e-11 +[DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 5.22965581530996e-11 +[DEBUG][rank 0][arkAdapt][new-step-eta] eta = 2.36133294724399 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0.0553676190266225 + 2.825056533018332e-11 4.237584763367401e-11 1.412528230349069e-11 +[INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 3, tn = 2.82505653301833e-11, h = 5.22965581530996e-11 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 0, tcur = 2.82505653301833e-11 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 5, tcur = 1.07829386393229e-06 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 5.43988444067331e-11 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 6, tcur = 6.71392822265625e-07 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 5.43988444067331e-11 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 7, tcur = 8.74843343098958e-07 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 8.05471234832829e-11 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 8, tcur = 1.07829386393229e-06 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 5.43988444067331e-11 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 9, tcur = 1.28174438476563e-06 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 8.05471234832829e-11 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-compute-embedding] status = success -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.00222529072291584 -[DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 2.44140625e-05 -[DEBUG][rank 0][arkAdapt][new-step-eta] eta = 20 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 1.65070663502083e-10 - 1.281744384765625e-06 1.281744384764923e-06 2.117582368135751e-22 +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 1.03039117851154e-10 +[DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 9.27352060660382e-11 +[DEBUG][rank 0][arkAdapt][new-step-eta] eta = 1.77325639279268 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0.130741338151707 + 8.054712348328291e-11 1.208206824125582e-10 4.027355892927531e-11 --------------------------------------------------------------------- -Current time = 1.28174438476563e-06 +Current time = 8.05471234832829e-11 Steps = 3 Step attempts = 3 Stability limited steps = 0 @@ -96,8 +72,8 @@ Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 Initial step size = 6.103515625e-12 -Last step size = 1.220703125e-06 -Current step size = 2.44140625e-05 -RHS fn evals = 29 -Number of stages used = 9 +Last step size = 5.22965581530996e-11 +Current step size = 9.27352060660382e-11 +RHS fn evals = 17 +Number of stages used = 4 End LSRKStep Logging test diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_2.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_2.out index 2b7f79daf1..fea006d7a7 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_2.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_2.out @@ -9,161 +9,65 @@ Start LSRKStep Logging test [DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_0(:) = 1.000000000000000e+00 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 6.78168402777778e-13 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 6.103515625e-12 [DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_1(:) = 1.000000000000000e+00 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 1.35633680555556e-12 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_2(:) = - 1.000000000000000e+00 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 3, tcur = 2.03450520833333e-12 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_3(:) = - 1.000000000000000e+00 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 4, tcur = 2.71267361111111e-12 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_4(:) = - 1.000000000000000e+00 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 5, tcur = 3.39084201388889e-12 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_5(:) = - 1.000000000000000e+00 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 6, tcur = 4.06901041666667e-12 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_6(:) = - 1.000000000000000e+00 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 7, tcur = 4.74717881944444e-12 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_7(:) = - 1.000000000000000e+00 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 8, tcur = 5.42534722222222e-12 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_8(:) = - 1.000000000000000e+00 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 9, tcur = 6.103515625e-12 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_9(:) = - 1.000000000000000e+00 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 10, tcur = 6.103515625e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success [DEBUG][rank 0][lsrkStep_TakeStepSSPs2][updated solution] ycur(:) = - 6.103515625000000e-12 + 6.103515625000001e-12 [DEBUG][rank 0][lsrkStep_TakeStepSSPs2][embedded solution] y_embedded(:) = 6.103515625000001e-12 -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.002147483648 +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = inf [DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 6.103515625e-08 [DEBUG][rank 0][arkAdapt][new-step-eta] eta = 10000 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 8.07793566946316e-18 - 6.103515625000001e-12 6.103515625000000e-12 8.077935669463161e-28 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 + 6.103515625000001e-12 6.103515625000001e-12 0.000000000000000e+00 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 6.103515625e-12, h = 6.103515625e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 0, tcur = 6.103515625e-12 [DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage] z_0(:) = - 6.103515625000000e-12 + 6.103515625000001e-12 [DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_0(:) = 1.000000000000000e+00 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 6.78778754340278e-09 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 6.1041259765625e-08 [DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_1(:) = - 1.000000000000000e+00 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 1.35694715711806e-08 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_2(:) = - 9.999999999999998e-01 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 3, tcur = 2.03511555989583e-08 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_3(:) = - 9.999999999999996e-01 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 4, tcur = 2.71328396267361e-08 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_4(:) = - 9.999999999999993e-01 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 5, tcur = 3.39145236545139e-08 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_5(:) = - 9.999999999999989e-01 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 6, tcur = 4.06962076822917e-08 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_6(:) = - 9.999999999999984e-01 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 7, tcur = 4.74778917100694e-08 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_7(:) = - 9.999999999999978e-01 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 8, tcur = 5.42595757378472e-08 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_8(:) = - 9.999999999999971e-01 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 9, tcur = 6.1041259765625e-08 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_9(:) = 9.999999999999962e-01 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 10, tcur = 6.1041259765625e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 6.1041259765625e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success [DEBUG][rank 0][lsrkStep_TakeStepSSPs2][updated solution] ycur(:) = - 6.104125976562493e-08 + 6.104125976562489e-08 [DEBUG][rank 0][lsrkStep_TakeStepSSPs2][embedded solution] y_embedded(:) = - 6.104125976562493e-08 -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = inf + 6.104125976562494e-08 +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.08388608256 [DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 1.220703125e-06 [DEBUG][rank 0][arkAdapt][new-step-eta] eta = 20 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 - 6.104125976562500e-08 6.104125976562493e-08 0.000000000000000e+00 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 5.29395559722197e-13 + 6.104125976562500e-08 6.104125976562489e-08 3.970466940254533e-23 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 3, tn = 6.1041259765625e-08, h = 1.220703125e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 0, tcur = 6.1041259765625e-08 [DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage] z_0(:) = - 6.104125976562493e-08 + 6.104125976562489e-08 [DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_0(:) = 9.999999999999962e-01 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 1.96674940321181e-07 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 1.28174438476563e-06 [DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_1(:) = - 9.999999999999614e-01 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 3.32308620876736e-07 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_2(:) = - 9.999999999998896e-01 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 3, tcur = 4.67942301432292e-07 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_3(:) = - 9.999999999997811e-01 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 4, tcur = 6.03575981987847e-07 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_4(:) = - 9.999999999996356e-01 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 5, tcur = 7.39209662543403e-07 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_5(:) = - 9.999999999994535e-01 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 6, tcur = 8.74843343098958e-07 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_6(:) = - 9.999999999992346e-01 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 7, tcur = 1.01047702365451e-06 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_7(:) = - 9.999999999989789e-01 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 8, tcur = 1.14611070421007e-06 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_8(:) = - 9.999999999986863e-01 -[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 9, tcur = 1.28174438476563e-06 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_9(:) = - 9.999999999983570e-01 + 9.999999999983564e-01 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 10, tcur = 1.28174438476563e-06 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 1.28174438476563e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success [DEBUG][rank 0][lsrkStep_TakeStepSSPs2][updated solution] ycur(:) = - 1.281744384764889e-06 + 1.281744384764619e-06 [DEBUG][rank 0][lsrkStep_TakeStepSSPs2][embedded solution] y_embedded(:) = - 1.281744384764909e-06 -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.0860915657862948 + 1.281744384765008e-06 +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.0195833087394633 [DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 2.44140625e-05 [DEBUG][rank 0][arkAdapt][new-step-eta] eta = 20 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 2.01047602983307e-10 - 1.281744384765625e-06 1.281744384764889e-06 3.388131789017201e-20 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 3.88550946397212e-09 + 1.281744384765625e-06 1.281744384764619e-06 3.038730698274802e-19 --------------------------------------------------------------------- Current time = 1.28174438476563e-06 Steps = 3 @@ -176,6 +80,6 @@ Inequality constraint fails = 0 Initial step size = 6.103515625e-12 Last step size = 1.220703125e-06 Current step size = 2.44140625e-05 -RHS fn evals = 32 -Number of stages used = 10 +RHS fn evals = 8 +Number of stages used = 2 End LSRKStep Logging test diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_3.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_3.out index 3b709c4c43..073df00a11 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_3.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_3.out @@ -9,157 +9,109 @@ Start LSRKStep Logging test [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_0(:) = 1.000000000000000e+00 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 1.01725260416667e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 3.0517578125e-12 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_0(:) = + 9.999999969787597e-01 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 3.0517578125e-12 [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_1(:) = - 1.000000000000000e+00 + 9.999999969787597e-01 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 2.03450520833333e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 6.103515625e-12 [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_2(:) = - 1.000000000000000e+00 + 9.999999969787597e-01 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 3.0517578125e-12 [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_3(:) = - 1.000000000000000e+00 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 4.06901041666667e-12 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_4(:) = - 1.000000000000000e+00 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 5, tcur = 5.08626302083333e-12 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_5(:) = - 1.000000000000000e+00 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 6, tcur = 3.0517578125e-12 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_6(:) = - 1.000000000000000e+00 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 7, tcur = 4.06901041666667e-12 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_7(:) = - 1.000000000000000e+00 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 8, tcur = 5.08626302083333e-12 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_8(:) = - 1.000000000000000e+00 + 9.999999969787597e-01 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 9, tcur = 6.103515625e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][updated solution] ycur(:) = - 6.103515625000001e-12 + 9.155273419059814e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][embedded solution] y_embedded(:) = - 6.103515625000001e-12 + 7.629394512809814e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-compute-embedding] status = success -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = inf -[DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 6.103515625e-08 -[DEBUG][rank 0][arkAdapt][new-step-eta] eta = 10000 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 - 6.103515625000001e-12 6.103515625000001e-12 0.000000000000000e+00 -[INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 6.103515625e-12, h = 6.103515625e-08 +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 2.46078330057592e-11 +[DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 2.21470497051833e-11 +[DEBUG][rank 0][arkAdapt][new-step-eta] eta = 3.62857262369723 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0.0152587890625 + 6.103515625000001e-12 9.155273419059814e-12 3.051757794059814e-12 +[INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 6.103515625e-12, h = 2.21470497051833e-11 [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 0, tcur = 6.103515625e-12 [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage] z_0(:) = - 6.103515625000001e-12 + 9.155273419059814e-12 [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_0(:) = - 1.000000000000000e+00 + 9.999999969787597e-01 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 1.01786295572917e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 1.71770404775917e-11 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_0(:) = + 9.999999860159702e-01 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 1.71770404775917e-11 [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_1(:) = - 1.000000000000000e+00 + 9.999999860159704e-01 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 2.03511555989583e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 2.82505653301833e-11 [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_2(:) = - 9.999999999999996e-01 + 9.999999860159705e-01 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 3.0523681640625e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 1.71770404775917e-11 [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_3(:) = - 9.999999999999991e-01 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 4.06962076822917e-08 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_4(:) = - 9.999999999999984e-01 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 5, tcur = 5.08687337239583e-08 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_5(:) = - 9.999999999999973e-01 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 6, tcur = 3.0523681640625e-08 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_6(:) = - 9.999999999999991e-01 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 7, tcur = 4.06962076822917e-08 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_7(:) = - 9.999999999999984e-01 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 8, tcur = 5.08687337239583e-08 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_8(:) = - 9.999999999999973e-01 + 9.999999860159704e-01 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 9, tcur = 6.1041259765625e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 2.82505653301833e-11 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][updated solution] ycur(:) = - 6.104125976562493e-08 + 4.237584763367401e-11 [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][embedded solution] y_embedded(:) = - 6.104125976562493e-08 + 3.683908522410607e-11 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-compute-embedding] status = success -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = inf -[DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 1.220703125e-06 -[DEBUG][rank 0][arkAdapt][new-step-eta] eta = 20 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 - 6.104125976562500e-08 6.104125976562493e-08 0.000000000000000e+00 -[INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 3, tn = 6.1041259765625e-08, h = 1.220703125e-06 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 0, tcur = 6.1041259765625e-08 +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 5.81072868367773e-11 +[DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 5.22965581530996e-11 +[DEBUG][rank 0][arkAdapt][new-step-eta] eta = 2.36133294724399 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0.0553676190266225 + 2.825056533018332e-11 4.237584763367401e-11 1.412528230349069e-11 +[INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 3, tn = 2.82505653301833e-11, h = 5.22965581530996e-11 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 0, tcur = 2.82505653301833e-11 [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage] z_0(:) = - 6.104125976562493e-08 + 4.237584763367401e-11 [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_0(:) = - 9.999999999999962e-01 + 9.999999860159705e-01 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 2.64491780598958e-07 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 5.43988444067331e-11 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_0(:) = + 9.999999601291746e-01 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 5.43988444067331e-11 [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_1(:) = - 9.999999999999301e-01 + 9.999999601291756e-01 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 4.67942301432292e-07 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 8.05471234832829e-11 [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_2(:) = - 9.999999999997811e-01 + 9.999999601291767e-01 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 6.71392822265625e-07 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 5.43988444067331e-11 [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_3(:) = - 9.999999999995492e-01 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 8.74843343098958e-07 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_4(:) = - 9.999999999992345e-01 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 5, tcur = 1.07829386393229e-06 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_5(:) = - 9.999999999988373e-01 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 6, tcur = 6.71392822265625e-07 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_6(:) = - 9.999999999995494e-01 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 7, tcur = 8.74843343098958e-07 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_7(:) = - 9.999999999992347e-01 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 8, tcur = 1.07829386393229e-06 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_8(:) = - 9.999999999988374e-01 + 9.999999601291756e-01 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 9, tcur = 1.28174438476563e-06 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 8.05471234832829e-11 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][updated solution] ycur(:) = - 1.281744384764923e-06 + 1.208206824125582e-10 [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][embedded solution] y_embedded(:) = - 1.281744384764940e-06 + 1.077465430571125e-10 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-compute-embedding] status = success -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.00222529072291584 -[DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 2.44140625e-05 -[DEBUG][rank 0][arkAdapt][new-step-eta] eta = 20 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 1.65070663502083e-10 - 1.281744384765625e-06 1.281744384764923e-06 2.117582368135751e-22 +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 1.03039117851154e-10 +[DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 9.27352060660382e-11 +[DEBUG][rank 0][arkAdapt][new-step-eta] eta = 1.77325639279268 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0.130741338151707 + 8.054712348328291e-11 1.208206824125582e-10 4.027355892927531e-11 --------------------------------------------------------------------- -Current time = 1.28174438476563e-06 +Current time = 8.05471234832829e-11 Steps = 3 Step attempts = 3 Stability limited steps = 0 @@ -168,8 +120,8 @@ Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 Initial step size = 6.103515625e-12 -Last step size = 1.220703125e-06 -Current step size = 2.44140625e-05 -RHS fn evals = 29 -Number of stages used = 9 +Last step size = 5.22965581530996e-11 +Current step size = 9.27352060660382e-11 +RHS fn evals = 17 +Number of stages used = 4 End LSRKStep Logging test From 85a9373cd1b9157ee6578f27eda33d6963d46fea Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 3 Feb 2026 14:48:05 -0500 Subject: [PATCH 087/298] Updated answers submodule commit --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index 9f6d4043e7..28a8daa785 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 9f6d4043e78dc44d2aed147c055e8e0f9745f739 +Subproject commit 28a8daa7852a6843d292e27c6d86c2feb2123210 From 1c1d31c5509bfc8e242b08a72978763b8c81a3de Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 3 Feb 2026 15:11:54 -0500 Subject: [PATCH 088/298] Updated stageinfo output files due to the new default numbers of stages for SSP(s,2) and SSP(s,3) --- .../ark_test_stageinfo_lsrkstep_2.out | 80 +++---------- .../ark_test_stageinfo_lsrkstep_3.out | 108 +++++++----------- 2 files changed, 58 insertions(+), 130 deletions(-) diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_2.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_2.out index eb32a475a9..97f718113c 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_2.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_2.out @@ -3,74 +3,26 @@ Using SSP(s,2) method t y y err --------------------------------------------------------------------- 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-RHS processing (stage 0 of 10) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] - [Pre-RHS processing (stage 0 of 10) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] - [Pre-RHS processing (stage 0 of 10) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] + [Pre-RHS processing (stage 0 of 2) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] + [Pre-RHS processing (stage 0 of 2) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] + [Pre-RHS processing (stage 0 of 2) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 0.0000000000e+00] - [Post-stage processing (stage 0 of 10) at t = 6.78e-13 (tn = 0.00e+00 , tcur = 6.78e-13), ||y||_2 = 6.7816840278e-13] - [Pre-RHS processing (stage 1 of 10) at t = 6.78e-13 (tn = 0.00e+00 , tcur = 6.78e-13), ||y||_2 = 6.7816840278e-13] - [Post-stage processing (stage 1 of 10) at t = 1.36e-12 (tn = 0.00e+00 , tcur = 1.36e-12), ||y||_2 = 1.3563368056e-12] - [Pre-RHS processing (stage 2 of 10) at t = 1.36e-12 (tn = 0.00e+00 , tcur = 1.36e-12), ||y||_2 = 1.3563368056e-12] - [Post-stage processing (stage 2 of 10) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] - [Pre-RHS processing (stage 3 of 10) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] - [Post-stage processing (stage 3 of 10) at t = 2.71e-12 (tn = 0.00e+00 , tcur = 2.71e-12), ||y||_2 = 2.7126736111e-12] - [Pre-RHS processing (stage 4 of 10) at t = 2.71e-12 (tn = 0.00e+00 , tcur = 2.71e-12), ||y||_2 = 2.7126736111e-12] - [Post-stage processing (stage 4 of 10) at t = 3.39e-12 (tn = 0.00e+00 , tcur = 3.39e-12), ||y||_2 = 3.3908420139e-12] - [Pre-RHS processing (stage 5 of 10) at t = 3.39e-12 (tn = 0.00e+00 , tcur = 3.39e-12), ||y||_2 = 3.3908420139e-12] - [Post-stage processing (stage 5 of 10) at t = 4.07e-12 (tn = 0.00e+00 , tcur = 4.07e-12), ||y||_2 = 4.0690104167e-12] - [Pre-RHS processing (stage 6 of 10) at t = 4.07e-12 (tn = 0.00e+00 , tcur = 4.07e-12), ||y||_2 = 4.0690104167e-12] - [Post-stage processing (stage 6 of 10) at t = 4.75e-12 (tn = 0.00e+00 , tcur = 4.75e-12), ||y||_2 = 4.7471788194e-12] - [Pre-RHS processing (stage 7 of 10) at t = 4.75e-12 (tn = 0.00e+00 , tcur = 4.75e-12), ||y||_2 = 4.7471788194e-12] - [Post-stage processing (stage 7 of 10) at t = 5.43e-12 (tn = 0.00e+00 , tcur = 5.43e-12), ||y||_2 = 5.4253472222e-12] - [Pre-RHS processing (stage 8 of 10) at t = 5.43e-12 (tn = 0.00e+00 , tcur = 5.43e-12), ||y||_2 = 5.4253472222e-12] - [Post-stage processing (stage 8 of 10) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] - [Pre-RHS processing (stage 9 of 10) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Post-stage processing (stage 0 of 2) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Pre-RHS processing (stage 1 of 2) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] [Post-step processing at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] - 6.1035156250e-12 6.1035156250e-12 8.0779356695e-28 + 6.1035156250e-12 6.1035156250e-12 0.0000000000e+00 [Pre-step processing at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] - [Pre-RHS processing (stage 0 of 10) at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] - [Post-stage processing (stage 0 of 10) at t = 6.79e-09 (tn = 6.10e-12 , tcur = 6.79e-09), ||y||_2 = 6.7877875434e-09] - [Pre-RHS processing (stage 1 of 10) at t = 6.79e-09 (tn = 6.10e-12 , tcur = 6.79e-09), ||y||_2 = 6.7877875434e-09] - [Post-stage processing (stage 1 of 10) at t = 1.36e-08 (tn = 6.10e-12 , tcur = 1.36e-08), ||y||_2 = 1.3569471571e-08] - [Pre-RHS processing (stage 2 of 10) at t = 1.36e-08 (tn = 6.10e-12 , tcur = 1.36e-08), ||y||_2 = 1.3569471571e-08] - [Post-stage processing (stage 2 of 10) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] - [Pre-RHS processing (stage 3 of 10) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] - [Post-stage processing (stage 3 of 10) at t = 2.71e-08 (tn = 6.10e-12 , tcur = 2.71e-08), ||y||_2 = 2.7132839627e-08] - [Pre-RHS processing (stage 4 of 10) at t = 2.71e-08 (tn = 6.10e-12 , tcur = 2.71e-08), ||y||_2 = 2.7132839627e-08] - [Post-stage processing (stage 4 of 10) at t = 3.39e-08 (tn = 6.10e-12 , tcur = 3.39e-08), ||y||_2 = 3.3914523655e-08] - [Pre-RHS processing (stage 5 of 10) at t = 3.39e-08 (tn = 6.10e-12 , tcur = 3.39e-08), ||y||_2 = 3.3914523655e-08] - [Post-stage processing (stage 5 of 10) at t = 4.07e-08 (tn = 6.10e-12 , tcur = 4.07e-08), ||y||_2 = 4.0696207682e-08] - [Pre-RHS processing (stage 6 of 10) at t = 4.07e-08 (tn = 6.10e-12 , tcur = 4.07e-08), ||y||_2 = 4.0696207682e-08] - [Post-stage processing (stage 6 of 10) at t = 4.75e-08 (tn = 6.10e-12 , tcur = 4.75e-08), ||y||_2 = 4.7477891710e-08] - [Pre-RHS processing (stage 7 of 10) at t = 4.75e-08 (tn = 6.10e-12 , tcur = 4.75e-08), ||y||_2 = 4.7477891710e-08] - [Post-stage processing (stage 7 of 10) at t = 5.43e-08 (tn = 6.10e-12 , tcur = 5.43e-08), ||y||_2 = 5.4259575738e-08] - [Pre-RHS processing (stage 8 of 10) at t = 5.43e-08 (tn = 6.10e-12 , tcur = 5.43e-08), ||y||_2 = 5.4259575738e-08] - [Post-stage processing (stage 8 of 10) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] - [Pre-RHS processing (stage 9 of 10) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Pre-RHS processing (stage 0 of 2) at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Post-stage processing (stage 0 of 2) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Pre-RHS processing (stage 1 of 2) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] [Post-step processing at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] - 6.1041259766e-08 6.1041259766e-08 0.0000000000e+00 + 6.1041259766e-08 6.1041259766e-08 3.9704669403e-23 [Pre-step processing at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] - [Pre-RHS processing (stage 0 of 10) at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] - [Post-stage processing (stage 0 of 10) at t = 1.97e-07 (tn = 6.10e-08 , tcur = 1.97e-07), ||y||_2 = 1.9667494032e-07] - [Pre-RHS processing (stage 1 of 10) at t = 1.97e-07 (tn = 6.10e-08 , tcur = 1.97e-07), ||y||_2 = 1.9667494032e-07] - [Post-stage processing (stage 1 of 10) at t = 3.32e-07 (tn = 6.10e-08 , tcur = 3.32e-07), ||y||_2 = 3.3230862088e-07] - [Pre-RHS processing (stage 2 of 10) at t = 3.32e-07 (tn = 6.10e-08 , tcur = 3.32e-07), ||y||_2 = 3.3230862088e-07] - [Post-stage processing (stage 2 of 10) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] - [Pre-RHS processing (stage 3 of 10) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] - [Post-stage processing (stage 3 of 10) at t = 6.04e-07 (tn = 6.10e-08 , tcur = 6.04e-07), ||y||_2 = 6.0357598199e-07] - [Pre-RHS processing (stage 4 of 10) at t = 6.04e-07 (tn = 6.10e-08 , tcur = 6.04e-07), ||y||_2 = 6.0357598199e-07] - [Post-stage processing (stage 4 of 10) at t = 7.39e-07 (tn = 6.10e-08 , tcur = 7.39e-07), ||y||_2 = 7.3920966254e-07] - [Pre-RHS processing (stage 5 of 10) at t = 7.39e-07 (tn = 6.10e-08 , tcur = 7.39e-07), ||y||_2 = 7.3920966254e-07] - [Post-stage processing (stage 5 of 10) at t = 8.75e-07 (tn = 6.10e-08 , tcur = 8.75e-07), ||y||_2 = 8.7484334310e-07] - [Pre-RHS processing (stage 6 of 10) at t = 8.75e-07 (tn = 6.10e-08 , tcur = 8.75e-07), ||y||_2 = 8.7484334310e-07] - [Post-stage processing (stage 6 of 10) at t = 1.01e-06 (tn = 6.10e-08 , tcur = 1.01e-06), ||y||_2 = 1.0104770237e-06] - [Pre-RHS processing (stage 7 of 10) at t = 1.01e-06 (tn = 6.10e-08 , tcur = 1.01e-06), ||y||_2 = 1.0104770237e-06] - [Post-stage processing (stage 7 of 10) at t = 1.15e-06 (tn = 6.10e-08 , tcur = 1.15e-06), ||y||_2 = 1.1461107042e-06] - [Pre-RHS processing (stage 8 of 10) at t = 1.15e-06 (tn = 6.10e-08 , tcur = 1.15e-06), ||y||_2 = 1.1461107042e-06] - [Post-stage processing (stage 8 of 10) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] - [Pre-RHS processing (stage 9 of 10) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Pre-RHS processing (stage 0 of 2) at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Post-stage processing (stage 0 of 2) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Pre-RHS processing (stage 1 of 2) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] [Post-step processing at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06),||y||_2 = 1.2817443848e-06] - 1.2817443848e-06 1.2817443848e-06 3.3881317890e-20 + 1.2817443848e-06 1.2817443848e-06 3.0366131159e-19 --------------------------------------------------------------------- Current time = 1.28174438476563e-06 Steps = 3 @@ -83,6 +35,6 @@ Inequality constraint fails = 0 Initial step size = 6.103515625e-12 Last step size = 1.220703125e-06 Current step size = 2.44140625e-05 -RHS fn evals = 32 -Number of stages used = 10 +RHS fn evals = 8 +Number of stages used = 2 End LSRKStep StageInfo test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_3.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_3.out index 9479df8ba7..37f0e8cb88 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_3.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_3.out @@ -3,70 +3,46 @@ Using SSP(s,3) method t y y err --------------------------------------------------------------------- 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-RHS processing (stage 0 of 9) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] - [Pre-RHS processing (stage 0 of 9) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] - [Pre-RHS processing (stage 0 of 9) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] + [Pre-RHS processing (stage 0 of 4) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] + [Pre-RHS processing (stage 0 of 4) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] + [Pre-RHS processing (stage 0 of 4) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 0.0000000000e+00] - [Post-stage processing (stage 0 of 9) at t = 1.02e-12 (tn = 0.00e+00 , tcur = 1.02e-12), ||y||_2 = 1.0172526042e-12] - [Pre-RHS processing (stage 1 of 9) at t = 1.02e-12 (tn = 0.00e+00 , tcur = 1.02e-12), ||y||_2 = 1.0172526042e-12] - [Post-stage processing (stage 1 of 9) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] - [Pre-RHS processing (stage 2 of 9) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] - [Post-stage processing (stage 2 of 9) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] - [Pre-RHS processing (stage 3 of 9) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] - [Post-stage processing (stage 3 of 9) at t = 4.07e-12 (tn = 0.00e+00 , tcur = 4.07e-12), ||y||_2 = 4.0690104167e-12] - [Pre-RHS processing (stage 4 of 9) at t = 4.07e-12 (tn = 0.00e+00 , tcur = 4.07e-12), ||y||_2 = 4.0690104167e-12] - [Post-stage processing (stage 4 of 9) at t = 5.09e-12 (tn = 0.00e+00 , tcur = 5.09e-12), ||y||_2 = 5.0862630208e-12] - [Pre-RHS processing (stage 5 of 9) at t = 5.09e-12 (tn = 0.00e+00 , tcur = 5.09e-12), ||y||_2 = 5.0862630208e-12] - [Post-stage processing (stage 5 of 9) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] - [Pre-RHS processing (stage 6 of 9) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] - [Post-stage processing (stage 6 of 9) at t = 4.07e-12 (tn = 0.00e+00 , tcur = 4.07e-12), ||y||_2 = 4.0690104167e-12] - [Pre-RHS processing (stage 7 of 9) at t = 4.07e-12 (tn = 0.00e+00 , tcur = 4.07e-12), ||y||_2 = 4.0690104167e-12] - [Post-stage processing (stage 7 of 9) at t = 5.09e-12 (tn = 0.00e+00 , tcur = 5.09e-12), ||y||_2 = 5.0862630208e-12] - [Pre-RHS processing (stage 8 of 9) at t = 5.09e-12 (tn = 0.00e+00 , tcur = 5.09e-12), ||y||_2 = 5.0862630208e-12] - [Post-step processing at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] - 6.1035156250e-12 6.1035156250e-12 0.0000000000e+00 - [Pre-step processing at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] - [Pre-RHS processing (stage 0 of 9) at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] - [Post-stage processing (stage 0 of 9) at t = 1.02e-08 (tn = 6.10e-12 , tcur = 1.02e-08), ||y||_2 = 1.0178629557e-08] - [Pre-RHS processing (stage 1 of 9) at t = 1.02e-08 (tn = 6.10e-12 , tcur = 1.02e-08), ||y||_2 = 1.0178629557e-08] - [Post-stage processing (stage 1 of 9) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] - [Pre-RHS processing (stage 2 of 9) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] - [Post-stage processing (stage 2 of 9) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] - [Pre-RHS processing (stage 3 of 9) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] - [Post-stage processing (stage 3 of 9) at t = 4.07e-08 (tn = 6.10e-12 , tcur = 4.07e-08), ||y||_2 = 4.0696207682e-08] - [Pre-RHS processing (stage 4 of 9) at t = 4.07e-08 (tn = 6.10e-12 , tcur = 4.07e-08), ||y||_2 = 4.0696207682e-08] - [Post-stage processing (stage 4 of 9) at t = 5.09e-08 (tn = 6.10e-12 , tcur = 5.09e-08), ||y||_2 = 5.0868733724e-08] - [Pre-RHS processing (stage 5 of 9) at t = 5.09e-08 (tn = 6.10e-12 , tcur = 5.09e-08), ||y||_2 = 5.0868733724e-08] - [Post-stage processing (stage 5 of 9) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] - [Pre-RHS processing (stage 6 of 9) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] - [Post-stage processing (stage 6 of 9) at t = 4.07e-08 (tn = 6.10e-12 , tcur = 4.07e-08), ||y||_2 = 4.0696207682e-08] - [Pre-RHS processing (stage 7 of 9) at t = 4.07e-08 (tn = 6.10e-12 , tcur = 4.07e-08), ||y||_2 = 4.0696207682e-08] - [Post-stage processing (stage 7 of 9) at t = 5.09e-08 (tn = 6.10e-12 , tcur = 5.09e-08), ||y||_2 = 5.0868733724e-08] - [Pre-RHS processing (stage 8 of 9) at t = 5.09e-08 (tn = 6.10e-12 , tcur = 5.09e-08), ||y||_2 = 5.0868733724e-08] - [Post-step processing at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] - 6.1041259766e-08 6.1041259766e-08 0.0000000000e+00 - [Pre-step processing at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] - [Pre-RHS processing (stage 0 of 9) at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] - [Post-stage processing (stage 0 of 9) at t = 2.64e-07 (tn = 6.10e-08 , tcur = 2.64e-07), ||y||_2 = 2.6449178060e-07] - [Pre-RHS processing (stage 1 of 9) at t = 2.64e-07 (tn = 6.10e-08 , tcur = 2.64e-07), ||y||_2 = 2.6449178060e-07] - [Post-stage processing (stage 1 of 9) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] - [Pre-RHS processing (stage 2 of 9) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] - [Post-stage processing (stage 2 of 9) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] - [Pre-RHS processing (stage 3 of 9) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] - [Post-stage processing (stage 3 of 9) at t = 8.75e-07 (tn = 6.10e-08 , tcur = 8.75e-07), ||y||_2 = 8.7484334310e-07] - [Pre-RHS processing (stage 4 of 9) at t = 8.75e-07 (tn = 6.10e-08 , tcur = 8.75e-07), ||y||_2 = 8.7484334310e-07] - [Post-stage processing (stage 4 of 9) at t = 1.08e-06 (tn = 6.10e-08 , tcur = 1.08e-06), ||y||_2 = 1.0782938639e-06] - [Pre-RHS processing (stage 5 of 9) at t = 1.08e-06 (tn = 6.10e-08 , tcur = 1.08e-06), ||y||_2 = 1.0782938639e-06] - [Post-stage processing (stage 5 of 9) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] - [Pre-RHS processing (stage 6 of 9) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] - [Post-stage processing (stage 6 of 9) at t = 8.75e-07 (tn = 6.10e-08 , tcur = 8.75e-07), ||y||_2 = 8.7484334310e-07] - [Pre-RHS processing (stage 7 of 9) at t = 8.75e-07 (tn = 6.10e-08 , tcur = 8.75e-07), ||y||_2 = 8.7484334310e-07] - [Post-stage processing (stage 7 of 9) at t = 1.08e-06 (tn = 6.10e-08 , tcur = 1.08e-06), ||y||_2 = 1.0782938639e-06] - [Pre-RHS processing (stage 8 of 9) at t = 1.08e-06 (tn = 6.10e-08 , tcur = 1.08e-06), ||y||_2 = 1.0782938639e-06] - [Post-step processing at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06),||y||_2 = 1.2817443848e-06] - 1.2817443848e-06 1.2817443848e-06 2.1175823681e-22 + [Post-stage processing (stage 0 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Pre-RHS processing (stage 0 of 4) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 3.0517578125e-12] + [Post-stage processing (stage 0 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 6.1035156158e-12] + [Pre-RHS processing (stage 1 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 6.1035156158e-12] + [Post-stage processing (stage 1 of 4) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 9.1552734191e-12] + [Pre-RHS processing (stage 2 of 4) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 9.1552734191e-12] + [Post-stage processing (stage 2 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 6.1035156158e-12] + [Pre-RHS processing (stage 3 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 6.1035156158e-12] + [Post-step processing at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12),||y||_2 = 9.1552734191e-12] + 6.1035156250e-12 9.1552734191e-12 3.0517577941e-12 + [Pre-step processing at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12),||y||_2 = 9.1552734191e-12] + [Pre-RHS processing (stage 0 of 4) at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), ||y||_2 = 9.1552734191e-12] + [Post-stage processing (stage 0 of 4) at t = 1.72e-11 (tn = 6.10e-12 , tcur = 1.72e-11), ||y||_2 = 2.0228798238e-11] + [Pre-RHS processing (stage 0 of 4) at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), ||y||_2 = 2.0228798238e-11] + [Post-stage processing (stage 0 of 4) at t = 1.72e-11 (tn = 6.10e-12 , tcur = 1.72e-11), ||y||_2 = 3.1302322936e-11] + [Pre-RHS processing (stage 1 of 4) at t = 1.72e-11 (tn = 6.10e-12 , tcur = 1.72e-11), ||y||_2 = 3.1302322936e-11] + [Post-stage processing (stage 1 of 4) at t = 2.83e-11 (tn = 6.10e-12 , tcur = 2.83e-11), ||y||_2 = 4.2375847634e-11] + [Pre-RHS processing (stage 2 of 4) at t = 2.83e-11 (tn = 6.10e-12 , tcur = 2.83e-11), ||y||_2 = 4.2375847634e-11] + [Post-stage processing (stage 2 of 4) at t = 1.72e-11 (tn = 6.10e-12 , tcur = 1.72e-11), ||y||_2 = 3.1302322936e-11] + [Pre-RHS processing (stage 3 of 4) at t = 1.72e-11 (tn = 6.10e-12 , tcur = 1.72e-11), ||y||_2 = 3.1302322936e-11] + [Post-step processing at t = 2.83e-11 (tn = 6.10e-12 , tcur = 2.83e-11),||y||_2 = 4.2375847634e-11] + 2.8250565330e-11 4.2375847634e-11 1.4125282303e-11 + [Pre-step processing at t = 2.83e-11 (tn = 2.83e-11 , tcur = 2.83e-11),||y||_2 = 4.2375847634e-11] + [Pre-RHS processing (stage 0 of 4) at t = 2.83e-11 (tn = 2.83e-11 , tcur = 2.83e-11), ||y||_2 = 4.2375847634e-11] + [Post-stage processing (stage 0 of 4) at t = 5.44e-11 (tn = 2.83e-11 , tcur = 5.44e-11), ||y||_2 = 6.8524126345e-11] + [Pre-RHS processing (stage 0 of 4) at t = 2.83e-11 (tn = 2.83e-11 , tcur = 2.83e-11), ||y||_2 = 6.8524126345e-11] + [Post-stage processing (stage 0 of 4) at t = 5.44e-11 (tn = 2.83e-11 , tcur = 5.44e-11), ||y||_2 = 9.4672404379e-11] + [Pre-RHS processing (stage 1 of 4) at t = 5.44e-11 (tn = 2.83e-11 , tcur = 5.44e-11), ||y||_2 = 9.4672404379e-11] + [Post-stage processing (stage 1 of 4) at t = 8.05e-11 (tn = 2.83e-11 , tcur = 8.05e-11), ||y||_2 = 1.2082068241e-10] + [Pre-RHS processing (stage 2 of 4) at t = 8.05e-11 (tn = 2.83e-11 , tcur = 8.05e-11), ||y||_2 = 1.2082068241e-10] + [Post-stage processing (stage 2 of 4) at t = 5.44e-11 (tn = 2.83e-11 , tcur = 5.44e-11), ||y||_2 = 9.4672404379e-11] + [Pre-RHS processing (stage 3 of 4) at t = 5.44e-11 (tn = 2.83e-11 , tcur = 5.44e-11), ||y||_2 = 9.4672404379e-11] + [Post-step processing at t = 8.05e-11 (tn = 2.83e-11 , tcur = 8.05e-11),||y||_2 = 1.2082068241e-10] + 8.0547123483e-11 1.2082068241e-10 4.0273558929e-11 --------------------------------------------------------------------- -Current time = 1.28174438476563e-06 +Current time = 8.05471234832829e-11 Steps = 3 Step attempts = 3 Stability limited steps = 0 @@ -75,8 +51,8 @@ Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 Initial step size = 6.103515625e-12 -Last step size = 1.220703125e-06 -Current step size = 2.44140625e-05 -RHS fn evals = 29 -Number of stages used = 9 +Last step size = 5.22965581530996e-11 +Current step size = 9.27352060660382e-11 +RHS fn evals = 17 +Number of stages used = 4 End LSRKStep StageInfo test From 4fb8e682cfa4e6fa714d027ce5f9e8a248c4e00b Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 3 Feb 2026 16:09:29 -0500 Subject: [PATCH 089/298] Added preprocess-rhs before calls to the implicit RHS in the nonlinear and linear solvers --- src/arkode/arkode_arkstep_nls.c | 77 ++++++++++++++++++++++++++++++--- src/arkode/arkode_bandpre.c | 7 ++- src/arkode/arkode_ls.c | 20 ++++++++- src/arkode/arkode_mristep_nls.c | 16 ++++++- 4 files changed, 108 insertions(+), 12 deletions(-) diff --git a/src/arkode/arkode_arkstep_nls.c b/src/arkode/arkode_arkstep_nls.c index a87eded341..64038f541b 100644 --- a/src/arkode/arkode_arkstep_nls.c +++ b/src/arkode/arkode_arkstep_nls.c @@ -584,6 +584,13 @@ int arkStep_NlsResidual_MassIdent(N_Vector zcor, N_Vector r, void* arkode_mem) /* update 'ycur' value as stored predictor + current corrector */ N_VLinearSum(ONE, step_mem->zpred, ONE, zcor, ark_mem->ycur); + /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ + if (ark_mem->PreProcessRHS != NULL) + { + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + } retval = step_mem->nls_fi(ark_mem->tcur, ark_mem->ycur, step_mem->Fi[step_mem->istage], ark_mem->user_data); step_mem->nfi++; @@ -630,6 +637,13 @@ int arkStep_NlsResidual_MassIdent_TrivialPredAutonomous(N_Vector zcor, N_Vector } else { + /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ + if (ark_mem->PreProcessRHS != NULL) + { + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + } retval = step_mem->nls_fi(ark_mem->tcur, ark_mem->ycur, step_mem->Fi[step_mem->istage], ark_mem->user_data); step_mem->nfi++; @@ -697,7 +711,13 @@ int arkStep_NlsResidual_MassFixed(N_Vector zcor, N_Vector r, void* arkode_mem) /* update 'ycur' value as stored predictor + current corrector */ N_VLinearSum(ONE, step_mem->zpred, ONE, zcor, ark_mem->ycur); - /* compute implicit RHS if not already available */ + /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ + if (ark_mem->PreProcessRHS != NULL) + { + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + } retval = step_mem->nls_fi(ark_mem->tcur, ark_mem->ycur, step_mem->Fi[step_mem->istage], ark_mem->user_data); step_mem->nfi++; @@ -747,6 +767,13 @@ int arkStep_NlsResidual_MassFixed_TrivialPredAutonomous(N_Vector zcor, N_Vector } else { + /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ + if (ark_mem->PreProcessRHS != NULL) + { + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + } retval = step_mem->nls_fi(ark_mem->tcur, ark_mem->ycur, step_mem->Fi[step_mem->istage], ark_mem->user_data); step_mem->nfi++; @@ -820,7 +847,13 @@ int arkStep_NlsResidual_MassTDep(N_Vector zcor, N_Vector r, void* arkode_mem) retval = step_mem->mmult((void*)ark_mem, step_mem->Fi[step_mem->istage], r); if (retval != ARK_SUCCESS) { return (ARK_MASSMULT_FAIL); } - /* compute implicit RHS */ + /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ + if (ark_mem->PreProcessRHS != NULL) + { + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + } retval = step_mem->nls_fi(ark_mem->tcur, ark_mem->ycur, step_mem->Fi[step_mem->istage], ark_mem->user_data); step_mem->nfi++; @@ -885,7 +918,13 @@ int arkStep_NlsFPFunction_MassIdent(N_Vector zcor, N_Vector g, void* arkode_mem) /* update 'ycur' value as stored predictor + current corrector */ N_VLinearSum(ONE, step_mem->zpred, ONE, zcor, ark_mem->ycur); - /* compute implicit RHS and save for later */ + /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ + if (ark_mem->PreProcessRHS != NULL) + { + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + } retval = step_mem->nls_fi(ark_mem->tcur, ark_mem->ycur, step_mem->Fi[step_mem->istage], ark_mem->user_data); step_mem->nfi++; @@ -925,7 +964,13 @@ int arkStep_NlsFPFunction_MassIdent_TrivialPredAutonomous(N_Vector zcor, } else { - /* compute implicit RHS and save for later */ + /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ + if (ark_mem->PreProcessRHS != NULL) + { + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + } retval = step_mem->nls_fi(ark_mem->tcur, ark_mem->ycur, step_mem->Fi[step_mem->istage], ark_mem->user_data); step_mem->nfi++; @@ -994,7 +1039,13 @@ int arkStep_NlsFPFunction_MassFixed(N_Vector zcor, N_Vector g, void* arkode_mem) /* update 'ycur' value as stored predictor + current corrector */ N_VLinearSum(ONE, step_mem->zpred, ONE, zcor, ark_mem->ycur); - /* compute implicit RHS and save for later */ + /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ + if (ark_mem->PreProcessRHS != NULL) + { + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + } retval = step_mem->nls_fi(ark_mem->tcur, ark_mem->ycur, step_mem->Fi[step_mem->istage], ark_mem->user_data); step_mem->nfi++; @@ -1039,7 +1090,13 @@ int arkStep_NlsFPFunction_MassFixed_TrivialPredAutonomous(N_Vector zcor, } else { - /* compute implicit RHS and save for later */ + /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ + if (ark_mem->PreProcessRHS != NULL) + { + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + } retval = step_mem->nls_fi(ark_mem->tcur, ark_mem->ycur, step_mem->Fi[step_mem->istage], ark_mem->user_data); step_mem->nfi++; @@ -1109,7 +1166,13 @@ int arkStep_NlsFPFunction_MassTDep(N_Vector zcor, N_Vector g, void* arkode_mem) /* update 'ycur' value as stored predictor + current corrector */ N_VLinearSum(ONE, step_mem->zpred, ONE, zcor, ark_mem->ycur); - /* compute implicit RHS and save for later */ + /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ + if (ark_mem->PreProcessRHS != NULL) + { + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + } retval = step_mem->nls_fi(ark_mem->tcur, ark_mem->ycur, step_mem->Fi[step_mem->istage], ark_mem->user_data); step_mem->nfi++; diff --git a/src/arkode/arkode_bandpre.c b/src/arkode/arkode_bandpre.c index 9c3699db29..ea99f9baad 100644 --- a/src/arkode/arkode_bandpre.c +++ b/src/arkode/arkode_bandpre.c @@ -538,7 +538,12 @@ static int ARKBandPDQJac(ARKBandPrecData pdata, sunrealtype t, N_Vector y, ytemp_data[j] += inc; } - /* Evaluate f with incremented y. */ + /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ + if (ark_mem->PreProcessRHS != NULL) + { + retval = ark_mem->PreProcessRHS(t, ytemp, ark_mem->user_data); + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + } retval = fi(t, ytemp, ftemp, ark_mem->user_data); pdata->nfeBP++; if (retval != 0) { return (retval); } diff --git a/src/arkode/arkode_ls.c b/src/arkode/arkode_ls.c index 3ff1f42f20..4bd94f9ae0 100644 --- a/src/arkode/arkode_ls.c +++ b/src/arkode/arkode_ls.c @@ -2695,6 +2695,12 @@ int arkLsDenseDQJac(sunrealtype t, N_Vector y, N_Vector fy, SUNMatrix Jac, y_data[j] += inc; + /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ + if (ark_mem->PreProcessRHS != NULL) + { + retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + } retval = fi(t, y, ftemp, ark_mem->user_data); arkls_mem->nfeDQ++; if (retval != 0) { break; } @@ -2792,7 +2798,12 @@ int arkLsBandDQJac(sunrealtype t, N_Vector y, N_Vector fy, SUNMatrix Jac, ytemp_data[j] += inc; } - /* Evaluate f with incremented y */ + /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ + if (ark_mem->PreProcessRHS != NULL) + { + retval = ark_mem->PreProcessRHS(t, ytemp, ark_mem->user_data); + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + } retval = fi(t, ytemp, ftemp, ark_mem->user_data); arkls_mem->nfeDQ++; if (retval != 0) { break; } @@ -2859,7 +2870,12 @@ int arkLsDQJtimes(N_Vector v, N_Vector Jv, sunrealtype t, N_Vector y, /* Set work = y + sig*v */ N_VLinearSum(sig, v, ONE, y, work); - /* Set Jv = f(tn, y+sig*v) */ + /* Set Jv = f(tn, y+sig*v), after calling RHS preprocessing fcn (if supplied) */ + if (ark_mem->PreProcessRHS != NULL) + { + retval = ark_mem->PreProcessRHS(t, work, ark_mem->user_data); + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + } retval = arkls_mem->Jt_f(t, work, Jv, ark_mem->user_data); arkls_mem->nfeDQ++; if (retval == 0) { break; } diff --git a/src/arkode/arkode_mristep_nls.c b/src/arkode/arkode_mristep_nls.c index 23276690bb..446886c27e 100644 --- a/src/arkode/arkode_mristep_nls.c +++ b/src/arkode/arkode_mristep_nls.c @@ -474,7 +474,13 @@ int mriStep_NlsResidual(N_Vector zcor, N_Vector r, void* arkode_mem) /* update 'ycur' value as stored predictor + current corrector */ N_VLinearSum(ONE, step_mem->zpred, ONE, zcor, ark_mem->ycur); - /* compute slow implicit RHS and save for later */ + /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ + if (ark_mem->PreProcessRHS != NULL) + { + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + } retval = step_mem->nls_fsi(ark_mem->tcur, ark_mem->ycur, step_mem->Fsi[step_mem->stage_map[step_mem->istage]], ark_mem->user_data); @@ -529,7 +535,13 @@ int mriStep_NlsFPFunction(N_Vector zcor, N_Vector g, void* arkode_mem) /* update 'ycur' value as stored predictor + current corrector */ N_VLinearSum(ONE, step_mem->zpred, ONE, zcor, ark_mem->ycur); - /* compute slow implicit RHS and save for later */ + /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ + if (ark_mem->PreProcessRHS != NULL) + { + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + } retval = step_mem->nls_fsi(ark_mem->tcur, ark_mem->ycur, step_mem->Fsi[step_mem->stage_map[step_mem->istage]], ark_mem->user_data); From be7192415221a52cc8c2659e02e48de18ca5bb94 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 3 Feb 2026 16:18:24 -0500 Subject: [PATCH 090/298] Updated stageinfo output files due to the addition of preprocess-rhs calls in the implicit algebraic solvers --- .../ark_test_stageinfo_arkstep_1.out | 119 ++++++++++---- .../ark_test_stageinfo_arkstep_2.out | 149 ++++++++++++++---- .../ark_test_stageinfo_mristep_1.out | 36 +++++ .../ark_test_stageinfo_mristep_2.out | 36 +++++ .../ark_test_stageinfo_mristep_4.out | 48 ++++++ .../ark_test_stageinfo_mristep_5.out | 48 ++++++ 6 files changed, 377 insertions(+), 59 deletions(-) diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_1.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_1.out index 59318ce051..86966c499a 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_1.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_1.out @@ -2,53 +2,118 @@ Start ARKStep StageInfo test Using DIRK method Using Newton nonlinear solver Using GMRES iterative linear solver - t u v u err v err + t u v u err v err ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 [Pre-RHS processing (stage 0 of 6) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] [Pre-RHS processing (stage 0 of 6) at t = 4.71e-08 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] [Pre-RHS processing (stage 0 of 6) at t = 2.06e-04 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 1 of 6) at t = 5.15e-05 (tn = 0.00e+00 , tcur = 5.15e-05), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 1 of 6) at t = 5.15e-05 (tn = 0.00e+00 , tcur = 5.15e-05), ||y||_2 = 2.1213183410e+00] [Post-stage processing (stage 1 of 6) at t = 5.15e-05 (tn = 0.00e+00 , tcur = 5.15e-05), ||y||_2 = 2.1213202184e+00] [Pre-RHS processing (stage 1 of 6) at t = 5.15e-05 (tn = 0.00e+00 , tcur = 5.15e-05), ||y||_2 = 2.1213202184e+00] + [Pre-RHS processing (stage 2 of 6) at t = 1.51e-05 (tn = 0.00e+00 , tcur = 1.51e-05), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 2 of 6) at t = 1.51e-05 (tn = 0.00e+00 , tcur = 1.51e-05), ||y||_2 = 2.1213183410e+00] [Post-stage processing (stage 2 of 6) at t = 1.51e-05 (tn = 0.00e+00 , tcur = 1.51e-05), ||y||_2 = 2.1213203328e+00] [Pre-RHS processing (stage 2 of 6) at t = 1.51e-05 (tn = 0.00e+00 , tcur = 1.51e-05), ||y||_2 = 2.1213203328e+00] + [Pre-RHS processing (stage 3 of 6) at t = 6.44e-05 (tn = 0.00e+00 , tcur = 6.44e-05), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 3 of 6) at t = 6.44e-05 (tn = 0.00e+00 , tcur = 6.44e-05), ||y||_2 = 2.1213183410e+00] [Post-stage processing (stage 3 of 6) at t = 6.44e-05 (tn = 0.00e+00 , tcur = 6.44e-05), ||y||_2 = 2.1213201480e+00] [Pre-RHS processing (stage 3 of 6) at t = 6.44e-05 (tn = 0.00e+00 , tcur = 6.44e-05), ||y||_2 = 2.1213201480e+00] + [Pre-RHS processing (stage 4 of 6) at t = 1.07e-04 (tn = 0.00e+00 , tcur = 1.07e-04), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 4 of 6) at t = 1.07e-04 (tn = 0.00e+00 , tcur = 1.07e-04), ||y||_2 = 2.1213183410e+00] + [Pre-RHS processing (stage 4 of 6) at t = 1.07e-04 (tn = 0.00e+00 , tcur = 1.07e-04), ||y||_2 = 2.1213198021e+00] [Post-stage processing (stage 4 of 6) at t = 1.07e-04 (tn = 0.00e+00 , tcur = 1.07e-04), ||y||_2 = 2.1213198021e+00] [Pre-RHS processing (stage 4 of 6) at t = 1.07e-04 (tn = 0.00e+00 , tcur = 1.07e-04), ||y||_2 = 2.1213198021e+00] + [Pre-RHS processing (stage 5 of 6) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 5 of 6) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213183410e+00] + [Pre-RHS processing (stage 5 of 6) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] [Post-stage processing (stage 5 of 6) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] [Pre-RHS processing (stage 5 of 6) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] [Post-step processing at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] 1.0298602561e-04 1.2247448703e+00 1.7320501952e+00 7.8541617654e-12 2.7311486406e-14 [Pre-step processing at t = 1.03e-04 (tn = 1.03e-04 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] - [Post-stage processing (stage 1 of 6) at t = 8.22e-03 (tn = 1.03e-04 , tcur = 8.22e-03), ||y||_2 = 2.1181363098e+00] - [Pre-RHS processing (stage 1 of 6) at t = 8.22e-03 (tn = 1.03e-04 , tcur = 8.22e-03), ||y||_2 = 2.1181363098e+00] + [Pre-RHS processing (stage 1 of 6) at t = 8.22e-03 (tn = 1.03e-04 , tcur = 8.22e-03), ||y||_2 = 2.1213198430e+00] + [Pre-RHS processing (stage 1 of 6) at t = 8.22e-03 (tn = 1.03e-04 , tcur = 8.22e-03), ||y||_2 = 2.1213178432e+00] + [Pre-RHS processing (stage 1 of 6) at t = 8.22e-03 (tn = 1.03e-04 , tcur = 8.22e-03), ||y||_2 = 2.1213208437e+00] + [Pre-RHS processing (stage 1 of 6) at t = 8.22e-03 (tn = 1.03e-04 , tcur = 8.22e-03), ||y||_2 = 2.1181363161e+00] + [Pre-RHS processing (stage 1 of 6) at t = 8.22e-03 (tn = 1.03e-04 , tcur = 8.22e-03), ||y||_2 = 2.1181350533e+00] + [Post-stage processing (stage 1 of 6) at t = 8.22e-03 (tn = 1.03e-04 , tcur = 8.22e-03), ||y||_2 = 2.1181363096e+00] + [Pre-RHS processing (stage 1 of 6) at t = 8.22e-03 (tn = 1.03e-04 , tcur = 8.22e-03), ||y||_2 = 2.1181363096e+00] + [Pre-RHS processing (stage 2 of 6) at t = 2.48e-03 (tn = 1.03e-04 , tcur = 2.48e-03), ||y||_2 = 2.1213198430e+00] + [Pre-RHS processing (stage 2 of 6) at t = 2.48e-03 (tn = 1.03e-04 , tcur = 2.48e-03), ||y||_2 = 2.1213178432e+00] + [Pre-RHS processing (stage 2 of 6) at t = 2.48e-03 (tn = 1.03e-04 , tcur = 2.48e-03), ||y||_2 = 2.1213208437e+00] + [Pre-RHS processing (stage 2 of 6) at t = 2.48e-03 (tn = 1.03e-04 , tcur = 2.48e-03), ||y||_2 = 2.1210284133e+00] [Post-stage processing (stage 2 of 6) at t = 2.48e-03 (tn = 1.03e-04 , tcur = 2.48e-03), ||y||_2 = 2.1210284133e+00] [Pre-RHS processing (stage 2 of 6) at t = 2.48e-03 (tn = 1.03e-04 , tcur = 2.48e-03), ||y||_2 = 2.1210284133e+00] - [Post-stage processing (stage 3 of 6) at t = 1.03e-02 (tn = 1.03e-04 , tcur = 1.03e-02), ||y||_2 = 2.1163721828e+00] - [Pre-RHS processing (stage 3 of 6) at t = 1.03e-02 (tn = 1.03e-04 , tcur = 1.03e-02), ||y||_2 = 2.1163721828e+00] - [Post-stage processing (stage 4 of 6) at t = 1.70e-02 (tn = 1.03e-04 , tcur = 1.70e-02), ||y||_2 = 2.1077895079e+00] - [Pre-RHS processing (stage 4 of 6) at t = 1.70e-02 (tn = 1.03e-04 , tcur = 1.70e-02), ||y||_2 = 2.1077895079e+00] - [Post-stage processing (stage 5 of 6) at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02), ||y||_2 = 2.1087851663e+00] - [Pre-RHS processing (stage 5 of 6) at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02), ||y||_2 = 2.1087851663e+00] - [Post-step processing at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02),||y||_2 = 2.1087851663e+00] - 1.6345098313e-02 1.2247176001e+00 1.7166949855e+00 4.4663852616e-09 6.0447387096e-09 - [Pre-step processing at t = 1.63e-02 (tn = 1.63e-02 , tcur = 1.63e-02),||y||_2 = 2.1087851663e+00] - [Post-stage processing (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.0935030146e+00] - [Pre-RHS processing (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.0935030146e+00] - [Post-stage processing (stage 2 of 6) at t = 1.87e-02 (tn = 1.63e-02 , tcur = 1.87e-02), ||y||_2 = 2.1049048041e+00] - [Pre-RHS processing (stage 2 of 6) at t = 1.87e-02 (tn = 1.63e-02 , tcur = 1.87e-02), ||y||_2 = 2.1049048041e+00] - [Post-stage processing (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.0887671872e+00] - [Pre-RHS processing (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.0887671872e+00] - [Post-stage processing (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.0705966613e+00] - [Pre-RHS processing (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.0705966613e+00] - [Post-stage processing (stage 5 of 6) at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), ||y||_2 = 2.0724934067e+00] - [Pre-RHS processing (stage 5 of 6) at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), ||y||_2 = 2.0724934067e+00] - [Post-step processing at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02),||y||_2 = 2.0724934067e+00] - 3.2548714654e-02 1.2246367417e+00 1.6719730154e+00 8.0260507129e-09 5.9880216341e-09 + [Pre-RHS processing (stage 3 of 6) at t = 1.03e-02 (tn = 1.03e-04 , tcur = 1.03e-02), ||y||_2 = 2.1213198430e+00] + [Pre-RHS processing (stage 3 of 6) at t = 1.03e-02 (tn = 1.03e-04 , tcur = 1.03e-02), ||y||_2 = 2.1213178432e+00] + [Pre-RHS processing (stage 3 of 6) at t = 1.03e-02 (tn = 1.03e-04 , tcur = 1.03e-02), ||y||_2 = 2.1213208437e+00] + [Pre-RHS processing (stage 3 of 6) at t = 1.03e-02 (tn = 1.03e-04 , tcur = 1.03e-02), ||y||_2 = 2.1163722075e+00] + [Pre-RHS processing (stage 3 of 6) at t = 1.03e-02 (tn = 1.03e-04 , tcur = 1.03e-02), ||y||_2 = 2.1163703971e+00] + [Post-stage processing (stage 3 of 6) at t = 1.03e-02 (tn = 1.03e-04 , tcur = 1.03e-02), ||y||_2 = 2.1163721824e+00] + [Pre-RHS processing (stage 3 of 6) at t = 1.03e-02 (tn = 1.03e-04 , tcur = 1.03e-02), ||y||_2 = 2.1163721824e+00] + [Pre-RHS processing (stage 4 of 6) at t = 1.70e-02 (tn = 1.03e-04 , tcur = 1.70e-02), ||y||_2 = 2.1213198430e+00] + [Pre-RHS processing (stage 4 of 6) at t = 1.70e-02 (tn = 1.03e-04 , tcur = 1.70e-02), ||y||_2 = 2.1213178432e+00] + [Pre-RHS processing (stage 4 of 6) at t = 1.70e-02 (tn = 1.03e-04 , tcur = 1.70e-02), ||y||_2 = 2.1213208437e+00] + [Pre-RHS processing (stage 4 of 6) at t = 1.70e-02 (tn = 1.03e-04 , tcur = 1.70e-02), ||y||_2 = 2.1077899282e+00] + [Pre-RHS processing (stage 4 of 6) at t = 1.70e-02 (tn = 1.03e-04 , tcur = 1.70e-02), ||y||_2 = 2.1077876968e+00] + [Post-stage processing (stage 4 of 6) at t = 1.70e-02 (tn = 1.03e-04 , tcur = 1.70e-02), ||y||_2 = 2.1077895068e+00] + [Pre-RHS processing (stage 4 of 6) at t = 1.70e-02 (tn = 1.03e-04 , tcur = 1.70e-02), ||y||_2 = 2.1077895068e+00] + [Pre-RHS processing (stage 5 of 6) at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02), ||y||_2 = 2.1213198430e+00] + [Pre-RHS processing (stage 5 of 6) at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02), ||y||_2 = 2.1213178432e+00] + [Pre-RHS processing (stage 5 of 6) at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02), ||y||_2 = 2.1213208437e+00] + [Pre-RHS processing (stage 5 of 6) at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02), ||y||_2 = 2.1087855077e+00] + [Pre-RHS processing (stage 5 of 6) at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02), ||y||_2 = 2.1087832801e+00] + [Post-stage processing (stage 5 of 6) at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02), ||y||_2 = 2.1087851653e+00] + [Pre-RHS processing (stage 5 of 6) at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02), ||y||_2 = 2.1087851653e+00] + [Post-step processing at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02),||y||_2 = 2.1087851653e+00] + 1.6345098954e-02 1.2247176001e+00 1.7166949855e+00 4.4663852616e-09 6.0447387096e-09 + [Pre-step processing at t = 1.63e-02 (tn = 1.63e-02 , tcur = 1.63e-02),||y||_2 = 2.1087851653e+00] + [Pre-RHS processing (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.1087851653e+00] + [Pre-RHS processing (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.1087831891e+00] + [Pre-RHS processing (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.1087861718e+00] + [Pre-RHS processing (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.0935038900e+00] + [Pre-RHS processing (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.0935017090e+00] + [Pre-RHS processing (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.0935030131e+00] + [Post-stage processing (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.0935030131e+00] + [Pre-RHS processing (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.0935030131e+00] + [Pre-RHS processing (stage 2 of 6) at t = 1.87e-02 (tn = 1.63e-02 , tcur = 1.87e-02), ||y||_2 = 2.1087851653e+00] + [Pre-RHS processing (stage 2 of 6) at t = 1.87e-02 (tn = 1.63e-02 , tcur = 1.87e-02), ||y||_2 = 2.1087831891e+00] + [Pre-RHS processing (stage 2 of 6) at t = 1.87e-02 (tn = 1.63e-02 , tcur = 1.87e-02), ||y||_2 = 2.1087861719e+00] + [Pre-RHS processing (stage 2 of 6) at t = 1.87e-02 (tn = 1.63e-02 , tcur = 1.87e-02), ||y||_2 = 2.1049048432e+00] + [Pre-RHS processing (stage 2 of 6) at t = 1.87e-02 (tn = 1.63e-02 , tcur = 1.87e-02), ||y||_2 = 2.1049026275e+00] + [Post-stage processing (stage 2 of 6) at t = 1.87e-02 (tn = 1.63e-02 , tcur = 1.87e-02), ||y||_2 = 2.1049048030e+00] + [Pre-RHS processing (stage 2 of 6) at t = 1.87e-02 (tn = 1.63e-02 , tcur = 1.87e-02), ||y||_2 = 2.1049048030e+00] + [Pre-RHS processing (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.1087851653e+00] + [Pre-RHS processing (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.1087831891e+00] + [Pre-RHS processing (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.1087861718e+00] + [Pre-RHS processing (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.0887688409e+00] + [Pre-RHS processing (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.0887666742e+00] + [Pre-RHS processing (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.0887671857e+00] + [Post-stage processing (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.0887671857e+00] + [Pre-RHS processing (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.0887671857e+00] + [Pre-RHS processing (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.1087851653e+00] + [Pre-RHS processing (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.1087831890e+00] + [Pre-RHS processing (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.1087861717e+00] + [Pre-RHS processing (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.0706044622e+00] + [Pre-RHS processing (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.0706023387e+00] + [Pre-RHS processing (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.0705966594e+00] + [Post-stage processing (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.0705966594e+00] + [Pre-RHS processing (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.0705966594e+00] + [Pre-RHS processing (stage 5 of 6) at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), ||y||_2 = 2.1087851653e+00] + [Pre-RHS processing (stage 5 of 6) at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), ||y||_2 = 2.1087831890e+00] + [Pre-RHS processing (stage 5 of 6) at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), ||y||_2 = 2.1087861718e+00] + [Pre-RHS processing (stage 5 of 6) at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), ||y||_2 = 2.0725003000e+00] + [Pre-RHS processing (stage 5 of 6) at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), ||y||_2 = 2.0724981727e+00] + [Pre-RHS processing (stage 5 of 6) at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), ||y||_2 = 2.0724934048e+00] + [Post-stage processing (stage 5 of 6) at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), ||y||_2 = 2.0724934048e+00] + [Pre-RHS processing (stage 5 of 6) at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), ||y||_2 = 2.0724934048e+00] + [Post-step processing at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02),||y||_2 = 2.0724934048e+00] + 3.2548715292e-02 1.2246367417e+00 1.6719730154e+00 8.0260507129e-09 5.9880216341e-09 ------------------------------------------------------------------------------------------------------------------------------ -Current time = 0.0325487146540888 +Current time = 0.0325487152923576 Steps = 3 Step attempts = 3 Stability limited steps = 0 @@ -57,8 +122,8 @@ Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 Initial step size = 0.000102986025609508 -Last step size = 0.0162036163408584 -Current step size = 0.0160003634285686 +Last step size = 0.0162036163379197 +Current step size = 0.0160003634180696 Explicit RHS fn evals = 0 Implicit RHS fn evals = 49 NLS iters = 31 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_2.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_2.out index 6b88dade9c..0c42465ad2 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_2.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_2.out @@ -2,61 +2,146 @@ Start ARKStep StageInfo test Using ImEx method Using Newton nonlinear solver Using GMRES iterative linear solver - t u v u err v err + t u v u err v err ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 [Pre-RHS processing (stage 0 of 7) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] [Pre-RHS processing (stage 0 of 7) at t = 4.71e-08 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] [Pre-RHS processing (stage 0 of 7) at t = 2.06e-04 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 1 of 7) at t = 2.54e-05 (tn = 0.00e+00 , tcur = 2.54e-05), ||y||_2 = 2.1213203436e+00] [Post-stage processing (stage 1 of 7) at t = 2.54e-05 (tn = 0.00e+00 , tcur = 2.54e-05), ||y||_2 = 2.1213203436e+00] [Pre-RHS processing (stage 1 of 7) at t = 2.54e-05 (tn = 0.00e+00 , tcur = 2.54e-05), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 2 of 7) at t = 4.34e-05 (tn = 0.00e+00 , tcur = 4.34e-05), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 2 of 7) at t = 4.34e-05 (tn = 0.00e+00 , tcur = 4.34e-05), ||y||_2 = 2.1213183410e+00] [Post-stage processing (stage 2 of 7) at t = 4.34e-05 (tn = 0.00e+00 , tcur = 4.34e-05), ||y||_2 = 2.1213202546e+00] [Pre-RHS processing (stage 2 of 7) at t = 4.34e-05 (tn = 0.00e+00 , tcur = 4.34e-05), ||y||_2 = 2.1213202546e+00] + [Pre-RHS processing (stage 3 of 7) at t = 3.45e-05 (tn = 0.00e+00 , tcur = 3.45e-05), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 3 of 7) at t = 3.45e-05 (tn = 0.00e+00 , tcur = 3.45e-05), ||y||_2 = 2.1213183410e+00] [Post-stage processing (stage 3 of 7) at t = 3.45e-05 (tn = 0.00e+00 , tcur = 3.45e-05), ||y||_2 = 2.1213202874e+00] [Pre-RHS processing (stage 3 of 7) at t = 3.45e-05 (tn = 0.00e+00 , tcur = 3.45e-05), ||y||_2 = 2.1213202874e+00] + [Pre-RHS processing (stage 4 of 7) at t = 7.72e-06 (tn = 0.00e+00 , tcur = 7.72e-06), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 4 of 7) at t = 7.72e-06 (tn = 0.00e+00 , tcur = 7.72e-06), ||y||_2 = 2.1213183409e+00] [Post-stage processing (stage 4 of 7) at t = 7.72e-06 (tn = 0.00e+00 , tcur = 7.72e-06), ||y||_2 = 2.1213203407e+00] [Pre-RHS processing (stage 4 of 7) at t = 7.72e-06 (tn = 0.00e+00 , tcur = 7.72e-06), ||y||_2 = 2.1213203407e+00] + [Pre-RHS processing (stage 5 of 7) at t = 7.21e-05 (tn = 0.00e+00 , tcur = 7.21e-05), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 5 of 7) at t = 7.21e-05 (tn = 0.00e+00 , tcur = 7.21e-05), ||y||_2 = 2.1213183410e+00] + [Pre-RHS processing (stage 5 of 7) at t = 7.21e-05 (tn = 0.00e+00 , tcur = 7.21e-05), ||y||_2 = 2.1213200983e+00] [Post-stage processing (stage 5 of 7) at t = 7.21e-05 (tn = 0.00e+00 , tcur = 7.21e-05), ||y||_2 = 2.1213200983e+00] [Pre-RHS processing (stage 5 of 7) at t = 7.21e-05 (tn = 0.00e+00 , tcur = 7.21e-05), ||y||_2 = 2.1213200983e+00] + [Pre-RHS processing (stage 6 of 7) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 6 of 7) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213183410e+00] + [Pre-RHS processing (stage 6 of 7) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] [Post-stage processing (stage 6 of 7) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] [Pre-RHS processing (stage 6 of 7) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] [Post-step processing at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] 1.0298602561e-04 1.2247448703e+00 1.7320501952e+00 2.2204460493e-16 0.0000000000e+00 [Pre-step processing at t = 1.03e-04 (tn = 1.03e-04 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] [Pre-RHS processing (stage 0 of 7) at t = 1.03e-04 (tn = 1.03e-04 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] + [Pre-RHS processing (stage 1 of 7) at t = 8.73e-03 (tn = 1.03e-04 , tcur = 8.73e-03), ||y||_2 = 2.1213198430e+00] + [Pre-RHS processing (stage 1 of 7) at t = 8.73e-03 (tn = 1.03e-04 , tcur = 8.73e-03), ||y||_2 = 2.1213179609e+00] + [Pre-RHS processing (stage 1 of 7) at t = 8.73e-03 (tn = 1.03e-04 , tcur = 8.73e-03), ||y||_2 = 2.1213210506e+00] + [Pre-RHS processing (stage 1 of 7) at t = 8.73e-03 (tn = 1.03e-04 , tcur = 8.73e-03), ||y||_2 = 2.1212262228e+00] [Post-stage processing (stage 1 of 7) at t = 8.73e-03 (tn = 1.03e-04 , tcur = 8.73e-03), ||y||_2 = 2.1212262228e+00] [Pre-RHS processing (stage 1 of 7) at t = 8.73e-03 (tn = 1.03e-04 , tcur = 8.73e-03), ||y||_2 = 2.1212262228e+00] - [Post-stage processing (stage 2 of 7) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1109953910e+00] - [Pre-RHS processing (stage 2 of 7) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1109953910e+00] - [Post-stage processing (stage 3 of 7) at t = 1.18e-02 (tn = 1.03e-04 , tcur = 1.18e-02), ||y||_2 = 2.1147654988e+00] - [Pre-RHS processing (stage 3 of 7) at t = 1.18e-02 (tn = 1.03e-04 , tcur = 1.18e-02), ||y||_2 = 2.1147654988e+00] - [Post-stage processing (stage 4 of 7) at t = 2.72e-03 (tn = 1.03e-04 , tcur = 2.72e-03), ||y||_2 = 2.1209503427e+00] - [Pre-RHS processing (stage 4 of 7) at t = 2.72e-03 (tn = 1.03e-04 , tcur = 2.72e-03), ||y||_2 = 2.1209503427e+00] - [Post-stage processing (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.0932817859e+00] - [Pre-RHS processing (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.0932817859e+00] - [Post-stage processing (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.0649469454e+00] - [Pre-RHS processing (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.0649469454e+00] - [Post-step processing at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02),||y||_2 = 2.0649991654e+00] - 3.5024518851e-02 1.2246196097e+00 1.6626870797e+00 6.6819398681e-08 6.5525542281e-07 - [Pre-step processing at t = 3.50e-02 (tn = 3.50e-02 , tcur = 3.50e-02),||y||_2 = 2.0649991654e+00] - [Pre-RHS processing (stage 0 of 7) at t = 3.50e-02 (tn = 3.50e-02 , tcur = 3.50e-02), ||y||_2 = 2.0649991654e+00] - [Post-stage processing (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0383161565e+00] - [Pre-RHS processing (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0383161565e+00] - [Post-stage processing (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0114194532e+00] - [Pre-RHS processing (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0114194532e+00] - [Post-stage processing (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0236366671e+00] - [Pre-RHS processing (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0236366671e+00] - [Post-stage processing (stage 4 of 7) at t = 3.76e-02 (tn = 3.50e-02 , tcur = 3.76e-02), ||y||_2 = 2.0565070643e+00] - [Pre-RHS processing (stage 4 of 7) at t = 3.76e-02 (tn = 3.50e-02 , tcur = 3.76e-02), ||y||_2 = 2.0565070643e+00] - [Post-stage processing (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 1.9686914853e+00] - [Pre-RHS processing (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 1.9686914853e+00] - [Post-stage processing (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 1.9163758274e+00] - [Pre-RHS processing (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 1.9163758274e+00] - [Post-step processing at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02),||y||_2 = 1.9169542441e+00] - 6.9697810906e-02 1.2242491983e+00 1.4751025098e+00 2.2221884333e-08 2.5857302401e-06 + [Pre-RHS processing (stage 2 of 7) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1213198430e+00] + [Pre-RHS processing (stage 2 of 7) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1213178446e+00] + [Pre-RHS processing (stage 2 of 7) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1213208465e+00] + [Pre-RHS processing (stage 2 of 7) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1109952863e+00] + [Pre-RHS processing (stage 2 of 7) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1109963352e+00] + [Post-stage processing (stage 2 of 7) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1109953892e+00] + [Pre-RHS processing (stage 2 of 7) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1109953892e+00] + [Pre-RHS processing (stage 3 of 7) at t = 1.18e-02 (tn = 1.03e-04 , tcur = 1.18e-02), ||y||_2 = 2.1213198430e+00] + [Pre-RHS processing (stage 3 of 7) at t = 1.18e-02 (tn = 1.03e-04 , tcur = 1.18e-02), ||y||_2 = 2.1213178450e+00] + [Pre-RHS processing (stage 3 of 7) at t = 1.18e-02 (tn = 1.03e-04 , tcur = 1.18e-02), ||y||_2 = 2.1213208473e+00] + [Pre-RHS processing (stage 3 of 7) at t = 1.18e-02 (tn = 1.03e-04 , tcur = 1.18e-02), ||y||_2 = 2.1147654560e+00] + [Pre-RHS processing (stage 3 of 7) at t = 1.18e-02 (tn = 1.03e-04 , tcur = 1.18e-02), ||y||_2 = 2.1147665074e+00] + [Post-stage processing (stage 3 of 7) at t = 1.18e-02 (tn = 1.03e-04 , tcur = 1.18e-02), ||y||_2 = 2.1147654976e+00] + [Pre-RHS processing (stage 3 of 7) at t = 1.18e-02 (tn = 1.03e-04 , tcur = 1.18e-02), ||y||_2 = 2.1147654976e+00] + [Pre-RHS processing (stage 4 of 7) at t = 2.72e-03 (tn = 1.03e-04 , tcur = 2.72e-03), ||y||_2 = 2.1213198430e+00] + [Pre-RHS processing (stage 4 of 7) at t = 2.72e-03 (tn = 1.03e-04 , tcur = 2.72e-03), ||y||_2 = 2.1213178266e+00] + [Pre-RHS processing (stage 4 of 7) at t = 2.72e-03 (tn = 1.03e-04 , tcur = 2.72e-03), ||y||_2 = 2.1213208099e+00] + [Pre-RHS processing (stage 4 of 7) at t = 2.72e-03 (tn = 1.03e-04 , tcur = 2.72e-03), ||y||_2 = 2.1209503426e+00] + [Post-stage processing (stage 4 of 7) at t = 2.72e-03 (tn = 1.03e-04 , tcur = 2.72e-03), ||y||_2 = 2.1209503426e+00] + [Pre-RHS processing (stage 4 of 7) at t = 2.72e-03 (tn = 1.03e-04 , tcur = 2.72e-03), ||y||_2 = 2.1209503426e+00] + [Pre-RHS processing (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.1213198430e+00] + [Pre-RHS processing (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.1213178428e+00] + [Pre-RHS processing (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.1213208430e+00] + [Pre-RHS processing (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.0932810331e+00] + [Pre-RHS processing (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.0932820701e+00] + [Pre-RHS processing (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.0932790587e+00] + [Pre-RHS processing (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.0932817810e+00] + [Post-stage processing (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.0932817810e+00] + [Pre-RHS processing (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.0932817810e+00] + [Pre-RHS processing (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.1213198430e+00] + [Pre-RHS processing (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.1213178433e+00] + [Pre-RHS processing (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.1213208439e+00] + [Pre-RHS processing (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.0649440080e+00] + [Pre-RHS processing (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.0649450254e+00] + [Pre-RHS processing (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.0649420305e+00] + [Pre-RHS processing (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.0649469358e+00] + [Post-stage processing (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.0649469358e+00] + [Pre-RHS processing (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.0649469358e+00] + [Post-step processing at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02),||y||_2 = 2.0649991558e+00] + 3.5024521932e-02 1.2246196097e+00 1.6626870797e+00 6.6819398681e-08 6.5525542281e-07 + [Pre-step processing at t = 3.50e-02 (tn = 3.50e-02 , tcur = 3.50e-02),||y||_2 = 2.0649991558e+00] + [Pre-RHS processing (stage 0 of 7) at t = 3.50e-02 (tn = 3.50e-02 , tcur = 3.50e-02), ||y||_2 = 2.0649991558e+00] + [Pre-RHS processing (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0649991558e+00] + [Pre-RHS processing (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0649972631e+00] + [Pre-RHS processing (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0650001842e+00] + [Pre-RHS processing (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0383154536e+00] + [Pre-RHS processing (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0383164246e+00] + [Pre-RHS processing (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0383135369e+00] + [Pre-RHS processing (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0383161449e+00] + [Post-stage processing (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0383161449e+00] + [Pre-RHS processing (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0383161449e+00] + [Pre-RHS processing (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0649991558e+00] + [Pre-RHS processing (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0649972629e+00] + [Pre-RHS processing (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0650001838e+00] + [Pre-RHS processing (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0114167342e+00] + [Pre-RHS processing (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0114176855e+00] + [Pre-RHS processing (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0114148140e+00] + [Pre-RHS processing (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0114194404e+00] + [Post-stage processing (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0114194404e+00] + [Pre-RHS processing (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0114194404e+00] + [Pre-RHS processing (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0649991558e+00] + [Pre-RHS processing (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0649972629e+00] + [Pre-RHS processing (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0650001839e+00] + [Pre-RHS processing (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0236350168e+00] + [Pre-RHS processing (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0236359771e+00] + [Pre-RHS processing (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0236330982e+00] + [Pre-RHS processing (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0236366549e+00] + [Post-stage processing (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0236366549e+00] + [Pre-RHS processing (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0236366549e+00] + [Pre-RHS processing (stage 4 of 7) at t = 3.76e-02 (tn = 3.50e-02 , tcur = 3.76e-02), ||y||_2 = 2.0649991558e+00] + [Pre-RHS processing (stage 4 of 7) at t = 3.76e-02 (tn = 3.50e-02 , tcur = 3.76e-02), ||y||_2 = 2.0649972622e+00] + [Pre-RHS processing (stage 4 of 7) at t = 3.76e-02 (tn = 3.50e-02 , tcur = 3.76e-02), ||y||_2 = 2.0650001825e+00] + [Pre-RHS processing (stage 4 of 7) at t = 3.76e-02 (tn = 3.50e-02 , tcur = 3.76e-02), ||y||_2 = 2.0565069828e+00] + [Pre-RHS processing (stage 4 of 7) at t = 3.76e-02 (tn = 3.50e-02 , tcur = 3.76e-02), ||y||_2 = 2.0565079665e+00] + [Post-stage processing (stage 4 of 7) at t = 3.76e-02 (tn = 3.50e-02 , tcur = 3.76e-02), ||y||_2 = 2.0565070541e+00] + [Pre-RHS processing (stage 4 of 7) at t = 3.76e-02 (tn = 3.50e-02 , tcur = 3.76e-02), ||y||_2 = 2.0565070541e+00] + [Pre-RHS processing (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 2.0649991558e+00] + [Pre-RHS processing (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 2.0649972625e+00] + [Pre-RHS processing (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 2.0650001830e+00] + [Pre-RHS processing (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 1.9686832168e+00] + [Pre-RHS processing (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 1.9686841353e+00] + [Pre-RHS processing (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 1.9686812913e+00] + [Pre-RHS processing (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 1.9686914710e+00] + [Post-stage processing (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 1.9686914710e+00] + [Pre-RHS processing (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 1.9686914710e+00] + [Pre-RHS processing (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 2.0649991558e+00] + [Pre-RHS processing (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 2.0649972625e+00] + [Pre-RHS processing (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 2.0650001830e+00] + [Pre-RHS processing (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 1.9163575635e+00] + [Pre-RHS processing (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 1.9163584389e+00] + [Pre-RHS processing (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 1.9163556320e+00] + [Pre-RHS processing (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 1.9163758117e+00] + [Post-stage processing (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 1.9163758117e+00] + [Pre-RHS processing (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 1.9163758117e+00] + [Post-step processing at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02),||y||_2 = 1.9169542285e+00] + 6.9697813939e-02 1.2242491983e+00 1.4751025098e+00 2.2221884333e-08 2.5857302401e-06 ------------------------------------------------------------------------------------------------------------------------------ -Current time = 0.0696978109064544 +Current time = 0.0696978139393375 Steps = 3 Step attempts = 3 Stability limited steps = 0 @@ -65,8 +150,8 @@ Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 Initial step size = 0.000102986025609508 -Last step size = 0.0346732920553526 -Current step size = 0.0331306530355695 +Last step size = 0.0346732920075373 +Current step size = 0.0331306528243113 Explicit RHS fn evals = 23 Implicit RHS fn evals = 62 NLS iters = 39 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_1.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_1.out index 314dad11d9..80768d9871 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_1.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_1.out @@ -8,36 +8,72 @@ Using GMRES iterative linear solver [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] [Pre-RHS processing (stage 0 of 8) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] [Post-stage processing (stage 1 of 8) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213151057e+00] + [Pre-RHS processing (stage 2 of 8) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 2 of 8) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213183373e+00] + [Pre-RHS processing (stage 2 of 8) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213213312e+00] + [Pre-RHS processing (stage 2 of 8) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213150886e+00] [Post-stage processing (stage 2 of 8) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213150886e+00] [Pre-RHS processing (stage 2 of 8) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213150886e+00] [Post-stage processing (stage 3 of 8) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1212993503e+00] + [Pre-RHS processing (stage 4 of 8) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 4 of 8) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1213183389e+00] + [Pre-RHS processing (stage 4 of 8) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1213213345e+00] + [Pre-RHS processing (stage 4 of 8) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1212993415e+00] [Post-stage processing (stage 4 of 8) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1212993415e+00] [Pre-RHS processing (stage 4 of 8) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1212993415e+00] [Post-stage processing (stage 5 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731966e+00] + [Pre-RHS processing (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213183413e+00] + [Pre-RHS processing (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213213393e+00] + [Pre-RHS processing (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] [Post-stage processing (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] [Post-step processing at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] 1.0000000000e-03 1.2247447693e+00 1.7319930735e+00 2.6090241079e-13 1.1546319456e-14 [Pre-step processing at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] [Pre-RHS processing (stage 0 of 8) at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] [Post-stage processing (stage 1 of 8) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212364434e+00] + [Pre-RHS processing (stage 2 of 8) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS processing (stage 2 of 8) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212711424e+00] + [Pre-RHS processing (stage 2 of 8) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212741398e+00] + [Pre-RHS processing (stage 2 of 8) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212364263e+00] [Post-stage processing (stage 2 of 8) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212364263e+00] [Pre-RHS processing (stage 2 of 8) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212364263e+00] [Post-stage processing (stage 3 of 8) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1211892263e+00] + [Pre-RHS processing (stage 4 of 8) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS processing (stage 4 of 8) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1212711424e+00] + [Pre-RHS processing (stage 4 of 8) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1212741398e+00] + [Pre-RHS processing (stage 4 of 8) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1211892175e+00] [Post-stage processing (stage 4 of 8) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1211892175e+00] [Pre-RHS processing (stage 4 of 8) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1211892175e+00] [Post-stage processing (stage 5 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211316142e+00] + [Pre-RHS processing (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS processing (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212711430e+00] + [Pre-RHS processing (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212741409e+00] + [Pre-RHS processing (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] [Post-stage processing (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] [Post-step processing at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] 2.0000000000e-03 1.2247444631e+00 1.7318198829e+00 2.9067859231e-12 2.3980817332e-14 [Pre-step processing at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] [Pre-RHS processing (stage 0 of 8) at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] [Post-stage processing (stage 1 of 8) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1210634067e+00] + [Pre-RHS processing (stage 2 of 8) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS processing (stage 2 of 8) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1211295605e+00] + [Pre-RHS processing (stage 2 of 8) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1211325579e+00] + [Pre-RHS processing (stage 2 of 8) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1210633896e+00] [Post-stage processing (stage 2 of 8) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1210633896e+00] [Pre-RHS processing (stage 2 of 8) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1210633896e+00] [Post-stage processing (stage 3 of 8) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1209847405e+00] + [Pre-RHS processing (stage 4 of 8) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS processing (stage 4 of 8) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1211295605e+00] + [Pre-RHS processing (stage 4 of 8) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1211325579e+00] + [Pre-RHS processing (stage 4 of 8) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1209847317e+00] [Post-stage processing (stage 4 of 8) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1209847317e+00] [Pre-RHS processing (stage 4 of 8) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1209847317e+00] [Post-stage processing (stage 5 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956853e+00] + [Pre-RHS processing (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS processing (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211295608e+00] + [Pre-RHS processing (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211325586e+00] + [Pre-RHS processing (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956339e+00] [Post-stage processing (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956339e+00] [Post-step processing at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03),||y||_2 = 2.1208956339e+00] 3.0000000000e-03 1.2247439528e+00 1.7315312703e+00 1.0538681039e-11 3.7747582837e-14 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_2.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_2.out index 7a2f228695..fcad2aa93a 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_2.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_2.out @@ -8,12 +8,24 @@ Using GMRES iterative linear solver [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] [Pre-RHS processing (stage 0 of 8) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] [Post-stage processing (stage 1 of 8) at t = 4.36e-04 (tn = 0.00e+00 , tcur = 4.36e-04), ||y||_2 = 2.1213113879e+00] + [Pre-RHS processing (stage 2 of 8) at t = 4.36e-04 (tn = 0.00e+00 , tcur = 4.36e-04), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 2 of 8) at t = 4.36e-04 (tn = 0.00e+00 , tcur = 4.36e-04), ||y||_2 = 2.1213183438e+00] + [Pre-RHS processing (stage 2 of 8) at t = 4.36e-04 (tn = 0.00e+00 , tcur = 4.36e-04), ||y||_2 = 2.1213213443e+00] + [Pre-RHS processing (stage 2 of 8) at t = 4.36e-04 (tn = 0.00e+00 , tcur = 4.36e-04), ||y||_2 = 2.1213113879e+00] [Post-stage processing (stage 2 of 8) at t = 4.36e-04 (tn = 0.00e+00 , tcur = 4.36e-04), ||y||_2 = 2.1213113879e+00] [Pre-RHS processing (stage 2 of 8) at t = 4.36e-04 (tn = 0.00e+00 , tcur = 4.36e-04), ||y||_2 = 2.1213113879e+00] [Post-stage processing (stage 3 of 8) at t = 7.18e-04 (tn = 0.00e+00 , tcur = 7.18e-04), ||y||_2 = 2.1212960228e+00] + [Pre-RHS processing (stage 4 of 8) at t = 7.18e-04 (tn = 0.00e+00 , tcur = 7.18e-04), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 4 of 8) at t = 7.18e-04 (tn = 0.00e+00 , tcur = 7.18e-04), ||y||_2 = 2.1213183421e+00] + [Pre-RHS processing (stage 4 of 8) at t = 7.18e-04 (tn = 0.00e+00 , tcur = 7.18e-04), ||y||_2 = 2.1213213409e+00] + [Pre-RHS processing (stage 4 of 8) at t = 7.18e-04 (tn = 0.00e+00 , tcur = 7.18e-04), ||y||_2 = 2.1212960259e+00] [Post-stage processing (stage 4 of 8) at t = 7.18e-04 (tn = 0.00e+00 , tcur = 7.18e-04), ||y||_2 = 2.1212960259e+00] [Pre-RHS processing (stage 4 of 8) at t = 7.18e-04 (tn = 0.00e+00 , tcur = 7.18e-04), ||y||_2 = 2.1212960259e+00] [Post-stage processing (stage 5 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731087e+00] + [Pre-RHS processing (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213183406e+00] + [Pre-RHS processing (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213213379e+00] + [Pre-RHS processing (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731290e+00] [Post-stage processing (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731290e+00] [Pre-RHS processing (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731290e+00] [Post-stage processing (stage 7 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] @@ -22,12 +34,24 @@ Using GMRES iterative linear solver [Pre-step processing at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] [Pre-RHS processing (stage 0 of 8) at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] [Post-stage processing (stage 1 of 8) at t = 1.44e-03 (tn = 1.00e-03 , tcur = 1.44e-03), ||y||_2 = 2.1212230476e+00] + [Pre-RHS processing (stage 2 of 8) at t = 1.44e-03 (tn = 1.00e-03 , tcur = 1.44e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS processing (stage 2 of 8) at t = 1.44e-03 (tn = 1.00e-03 , tcur = 1.44e-03), ||y||_2 = 2.1212711435e+00] + [Pre-RHS processing (stage 2 of 8) at t = 1.44e-03 (tn = 1.00e-03 , tcur = 1.44e-03), ||y||_2 = 2.1212741418e+00] + [Pre-RHS processing (stage 2 of 8) at t = 1.44e-03 (tn = 1.00e-03 , tcur = 1.44e-03), ||y||_2 = 2.1212230476e+00] [Post-stage processing (stage 2 of 8) at t = 1.44e-03 (tn = 1.00e-03 , tcur = 1.44e-03), ||y||_2 = 2.1212230476e+00] [Pre-RHS processing (stage 2 of 8) at t = 1.44e-03 (tn = 1.00e-03 , tcur = 1.44e-03), ||y||_2 = 2.1212230476e+00] [Post-stage processing (stage 3 of 8) at t = 1.72e-03 (tn = 1.00e-03 , tcur = 1.72e-03), ||y||_2 = 2.1211810603e+00] + [Pre-RHS processing (stage 4 of 8) at t = 1.72e-03 (tn = 1.00e-03 , tcur = 1.72e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS processing (stage 4 of 8) at t = 1.72e-03 (tn = 1.00e-03 , tcur = 1.72e-03), ||y||_2 = 2.1212711432e+00] + [Pre-RHS processing (stage 4 of 8) at t = 1.72e-03 (tn = 1.00e-03 , tcur = 1.72e-03), ||y||_2 = 2.1212741414e+00] + [Pre-RHS processing (stage 4 of 8) at t = 1.72e-03 (tn = 1.00e-03 , tcur = 1.72e-03), ||y||_2 = 2.1211810634e+00] [Post-stage processing (stage 4 of 8) at t = 1.72e-03 (tn = 1.00e-03 , tcur = 1.72e-03), ||y||_2 = 2.1211810634e+00] [Pre-RHS processing (stage 4 of 8) at t = 1.72e-03 (tn = 1.00e-03 , tcur = 1.72e-03), ||y||_2 = 2.1211810634e+00] [Post-stage processing (stage 5 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315263e+00] + [Pre-RHS processing (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS processing (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212711428e+00] + [Pre-RHS processing (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212741405e+00] + [Pre-RHS processing (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315465e+00] [Post-stage processing (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315465e+00] [Pre-RHS processing (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315465e+00] [Post-stage processing (stage 7 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] @@ -36,12 +60,24 @@ Using GMRES iterative linear solver [Pre-step processing at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] [Pre-RHS processing (stage 0 of 8) at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] [Post-stage processing (stage 1 of 8) at t = 2.44e-03 (tn = 2.00e-03 , tcur = 2.44e-03), ||y||_2 = 2.1210403366e+00] + [Pre-RHS processing (stage 2 of 8) at t = 2.44e-03 (tn = 2.00e-03 , tcur = 2.44e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS processing (stage 2 of 8) at t = 2.44e-03 (tn = 2.00e-03 , tcur = 2.44e-03), ||y||_2 = 2.1211295611e+00] + [Pre-RHS processing (stage 2 of 8) at t = 2.44e-03 (tn = 2.00e-03 , tcur = 2.44e-03), ||y||_2 = 2.1211325591e+00] + [Pre-RHS processing (stage 2 of 8) at t = 2.44e-03 (tn = 2.00e-03 , tcur = 2.44e-03), ||y||_2 = 2.1210403366e+00] [Post-stage processing (stage 2 of 8) at t = 2.44e-03 (tn = 2.00e-03 , tcur = 2.44e-03), ||y||_2 = 2.1210403366e+00] [Pre-RHS processing (stage 2 of 8) at t = 2.44e-03 (tn = 2.00e-03 , tcur = 2.44e-03), ||y||_2 = 2.1210403366e+00] [Post-stage processing (stage 3 of 8) at t = 2.72e-03 (tn = 2.00e-03 , tcur = 2.72e-03), ||y||_2 = 2.1209717381e+00] + [Pre-RHS processing (stage 4 of 8) at t = 2.72e-03 (tn = 2.00e-03 , tcur = 2.72e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS processing (stage 4 of 8) at t = 2.72e-03 (tn = 2.00e-03 , tcur = 2.72e-03), ||y||_2 = 2.1211295610e+00] + [Pre-RHS processing (stage 4 of 8) at t = 2.72e-03 (tn = 2.00e-03 , tcur = 2.72e-03), ||y||_2 = 2.1211325588e+00] + [Pre-RHS processing (stage 4 of 8) at t = 2.72e-03 (tn = 2.00e-03 , tcur = 2.72e-03), ||y||_2 = 2.1209717412e+00] [Post-stage processing (stage 4 of 8) at t = 2.72e-03 (tn = 2.00e-03 , tcur = 2.72e-03), ||y||_2 = 2.1209717412e+00] [Pre-RHS processing (stage 4 of 8) at t = 2.72e-03 (tn = 2.00e-03 , tcur = 2.72e-03), ||y||_2 = 2.1209717412e+00] [Post-stage processing (stage 5 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208955974e+00] + [Pre-RHS processing (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS processing (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211295607e+00] + [Pre-RHS processing (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211325583e+00] + [Pre-RHS processing (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956177e+00] [Post-stage processing (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956177e+00] [Pre-RHS processing (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956177e+00] [Post-stage processing (stage 7 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956339e+00] diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_4.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_4.out index ee18c25fe4..e28d9326b8 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_4.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_4.out @@ -7,34 +7,82 @@ Using GMRES iterative linear solver 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] [Pre-RHS processing (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1213183396e+00] + [Pre-RHS processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1213213360e+00] + [Pre-RHS processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1212987262e+00] [Post-stage processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1212987262e+00] [Pre-RHS processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1212987262e+00] + [Pre-RHS processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1213183393e+00] + [Pre-RHS processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1213213353e+00] + [Pre-RHS processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1212901049e+00] [Post-stage processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1212901049e+00] [Pre-RHS processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1212901049e+00] + [Pre-RHS processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1213183421e+00] + [Pre-RHS processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1213213410e+00] + [Pre-RHS processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1212597444e+00] [Post-stage processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1212597444e+00] [Pre-RHS processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1212597444e+00] + [Pre-RHS processing (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213183414e+00] + [Pre-RHS processing (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213213394e+00] + [Pre-RHS processing (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] [Post-stage processing (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] [Post-step processing at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] 1.0000000000e-03 1.2247447693e+00 1.7319930735e+00 2.4846791291e-13 1.5143442056e-13 [Pre-step processing at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] [Pre-RHS processing (stage 0 of 5) at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1212711427e+00] + [Pre-RHS processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1212741403e+00] + [Pre-RHS processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1211876769e+00] [Post-stage processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1211876769e+00] [Pre-RHS processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1211876769e+00] + [Pre-RHS processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1212711425e+00] + [Pre-RHS processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1212741399e+00] + [Pre-RHS processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1211673971e+00] [Post-stage processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1211673971e+00] [Pre-RHS processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1211673971e+00] + [Pre-RHS processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1212711434e+00] + [Pre-RHS processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1212741417e+00] + [Pre-RHS processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1211055797e+00] [Post-stage processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1211055797e+00] [Pre-RHS processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1211055797e+00] + [Pre-RHS processing (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS processing (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212711431e+00] + [Pre-RHS processing (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212741411e+00] + [Pre-RHS processing (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] [Post-stage processing (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] [Post-step processing at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] 2.0000000000e-03 1.2247444631e+00 1.7318198829e+00 2.6707525080e-12 2.9021229864e-13 [Pre-step processing at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] [Pre-RHS processing (stage 0 of 5) at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1211295607e+00] + [Pre-RHS processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1211325583e+00] + [Pre-RHS processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1209822662e+00] [Post-stage processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1209822662e+00] [Pre-RHS processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1209822662e+00] + [Pre-RHS processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1211295606e+00] + [Pre-RHS processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1211325581e+00] + [Pre-RHS processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1209503332e+00] [Post-stage processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1209503332e+00] [Pre-RHS processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1209503332e+00] + [Pre-RHS processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1211295611e+00] + [Pre-RHS processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1211325591e+00] + [Pre-RHS processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1208570755e+00] [Post-stage processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1208570755e+00] [Pre-RHS processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1208570755e+00] + [Pre-RHS processing (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS processing (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211295609e+00] + [Pre-RHS processing (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211325588e+00] + [Pre-RHS processing (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956339e+00] [Post-stage processing (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956339e+00] [Post-step processing at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03),||y||_2 = 2.1208956339e+00] 3.0000000000e-03 1.2247439528e+00 1.7315312703e+00 9.4586560806e-12 4.1744385726e-13 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_5.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_5.out index 0d47ad3d70..7780877a70 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_5.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_5.out @@ -7,34 +7,82 @@ Using GMRES iterative linear solver 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] [Pre-RHS processing (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1213183438e+00] + [Pre-RHS processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1213213444e+00] + [Pre-RHS processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1212987717e+00] [Post-stage processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1212987717e+00] [Pre-RHS processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1212987717e+00] + [Pre-RHS processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1213183444e+00] + [Pre-RHS processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1213213455e+00] + [Pre-RHS processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1212901821e+00] [Post-stage processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1212901821e+00] [Pre-RHS processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1212901821e+00] + [Pre-RHS processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1213183402e+00] + [Pre-RHS processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1213213371e+00] + [Pre-RHS processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1212596854e+00] [Post-stage processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1212596854e+00] [Pre-RHS processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1212596854e+00] + [Pre-RHS processing (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213203436e+00] + [Pre-RHS processing (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213183414e+00] + [Pre-RHS processing (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213213394e+00] + [Pre-RHS processing (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] [Post-stage processing (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] [Post-step processing at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] 1.0000000000e-03 1.2247447693e+00 1.7319930735e+00 2.8288482667e-13 1.3744561045e-13 [Pre-step processing at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] [Pre-RHS processing (stage 0 of 5) at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1212711437e+00] + [Pre-RHS processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1212741424e+00] + [Pre-RHS processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1211877224e+00] [Post-stage processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1211877224e+00] [Pre-RHS processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1211877224e+00] + [Pre-RHS processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1212711440e+00] + [Pre-RHS processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1212741429e+00] + [Pre-RHS processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1211674743e+00] [Post-stage processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1211674743e+00] [Pre-RHS processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1211674743e+00] + [Pre-RHS processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1212711427e+00] + [Pre-RHS processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1212741403e+00] + [Pre-RHS processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1211055207e+00] [Post-stage processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1211055207e+00] [Pre-RHS processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1211055207e+00] + [Pre-RHS processing (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS processing (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212711431e+00] + [Pre-RHS processing (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212741411e+00] + [Pre-RHS processing (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] [Post-stage processing (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] [Post-step processing at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] 2.0000000000e-03 1.2247444631e+00 1.7318198829e+00 2.7395863356e-12 2.6245672302e-13 [Pre-step processing at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] [Pre-RHS processing (stage 0 of 5) at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1211295613e+00] + [Pre-RHS processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1211325595e+00] + [Pre-RHS processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1209823117e+00] [Post-stage processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1209823117e+00] [Pre-RHS processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1209823117e+00] + [Pre-RHS processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1211295614e+00] + [Pre-RHS processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1211325598e+00] + [Pre-RHS processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1209504105e+00] [Post-stage processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1209504105e+00] [Pre-RHS processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1209504105e+00] + [Pre-RHS processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1211295607e+00] + [Pre-RHS processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1211325583e+00] + [Pre-RHS processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1208570165e+00] [Post-stage processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1208570165e+00] [Pre-RHS processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1208570165e+00] + [Pre-RHS processing (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS processing (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211295609e+00] + [Pre-RHS processing (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211325588e+00] + [Pre-RHS processing (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956339e+00] [Post-stage processing (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956339e+00] [Post-step processing at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03),||y||_2 = 2.1208956339e+00] 3.0000000000e-03 1.2247439528e+00 1.7315312703e+00 9.5614627327e-12 3.7592151614e-13 From c9b0b06292788d137609acedb3927d994dad4db5 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 3 Feb 2026 22:15:41 -0500 Subject: [PATCH 091/298] Added some conditionals to only call PreProcessRHS if we will imminently call the explicit or implicit RHS function --- src/arkode/arkode_arkstep.c | 15 +++++++++------ src/arkode/arkode_mristep.c | 33 +++++++++++++++++++++------------ 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index c7ad110aa5..1b64cefd73 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -2101,13 +2101,16 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) of tcur corresponds to the stage time from the implicit table (c_i^I). */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); - if (retval != 0) + if ((step_mem->implicit && !deduce_stage) || (step_mem->explicit)) { - SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); - return (ARK_POSTPROCESS_STAGE_FAIL); + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return (ARK_POSTPROCESS_STAGE_FAIL); + } } } diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index f0a046f9a5..ff96c6edd2 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -2021,13 +2021,18 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); - if (retval != 0) + if (step_mem->explicit_rhs || + (step_mem->implicit_rhs && (!step_mem->deduce_rhs || + (step_mem->stagetypes[is] != MRISTAGE_DIRK_NOFAST)))) { - SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); - return (ARK_POSTPROCESS_STAGE_FAIL); + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return (ARK_POSTPROCESS_STAGE_FAIL); + } } } @@ -2664,13 +2669,17 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); - if (retval != 0) + if (step_mem->explicit_rhs || + step_mem->implicit_rhs && (!step_mem->deduce_rhs || !impl_corr)) { - SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); - return (ARK_POSTPROCESS_STAGE_FAIL); + retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return (ARK_POSTPROCESS_STAGE_FAIL); + } } } From c042a87c3541cc1364d0a8bc07466adfd903b3f2 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 3 Feb 2026 22:19:09 -0500 Subject: [PATCH 092/298] Updated answers submodule commit --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index 28a8daa785..177e59425f 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 28a8daa7852a6843d292e27c6d86c2feb2123210 +Subproject commit 177e59425fe3c29bf664b6107042574deaf5db2e From 1897268f9efd926d5f1e6daaaf1913cf535ee221 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 3 Feb 2026 22:39:52 -0500 Subject: [PATCH 093/298] Fixed selection of TakeStep routine for SSPs3 vs SSP43 --- src/arkode/arkode_lsrkstep_io.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/arkode/arkode_lsrkstep_io.c b/src/arkode/arkode_lsrkstep_io.c index 617c24c769..1f5eb80086 100644 --- a/src/arkode/arkode_lsrkstep_io.c +++ b/src/arkode/arkode_lsrkstep_io.c @@ -121,7 +121,7 @@ int LSRKStepSetSSPMethod(void* arkode_mem, ARKODE_LSRKMethodType method) step_mem->p = ark_mem->hadapt_mem->p = 1; break; case ARKODE_LSRK_SSP_S_3: - ark_mem->step = lsrkStep_TakeStepSSPs3; + ark_mem->step = lsrkStep_TakeStepSSP43; step_mem->is_SSP = SUNTRUE; step_mem->req_stages = 4; step_mem->nfusedopvecs = 3; @@ -465,7 +465,14 @@ int LSRKStepSetNumSSPStages(void* arkode_mem, int num_of_stages) "reset the default value"); return ARK_ILL_INPUT; } - if (num_of_stages == 4) { ark_mem->step = lsrkStep_TakeStepSSP43; } + if (num_of_stages == 4) + { + ark_mem->step = lsrkStep_TakeStepSSP43; + } + else + { + ark_mem->step = lsrkStep_TakeStepSSPs3; + } break; case ARKODE_LSRK_SSP_10_4: From f4f0512a8e3657e4d1ab7c8b5917c7f7101b319d Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 3 Feb 2026 22:46:36 -0500 Subject: [PATCH 094/298] Ensured that we separately log SSP(s,3) with s=9 and s=4 stages, now that default is 4) --- test/unit_tests/logging/test_logging_arkode_lsrkstep.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep.cpp b/test/unit_tests/logging/test_logging_arkode_lsrkstep.cpp index 48198a6f1d..46b7952e66 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep.cpp +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep.cpp @@ -83,6 +83,7 @@ int main(int argc, char* argv[]) else if (method == 3) { flag = LSRKStepSetSSPMethodByName(arkode_mem, "ARKODE_LSRK_SSP_S_3"); + if (flag == 0) { flag = LSRKStepSetNumSSPStages(arkode_mem, 9); } } else if (method == 4) { From 3db727edfbbf716e5c19b8351c8e3ff976eb2326 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 3 Feb 2026 22:47:20 -0500 Subject: [PATCH 095/298] Ensured that we separately test stageinfo output for SSP(s,3) with s=9 and s=4 stages, now that default is 4) --- .../arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp index cad68e3e32..17ee8ab6cc 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp @@ -85,8 +85,9 @@ int main(int argc, char* argv[]) } else if (method == 3) { - cout << "Using SSP(s,3) method" << endl; + cout << "Using SSP(9,3) method" << endl; flag = LSRKStepSetSSPMethodByName(arkode_mem, "ARKODE_LSRK_SSP_S_3"); + if (flag == 0) { flag = LSRKStepSetNumSSPStages(arkode_mem, 4); } } else if (method == 4) { From 2920ca4c24285ebf40e5adb9e859c16eee9baaac Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 3 Feb 2026 22:50:23 -0500 Subject: [PATCH 096/298] Formatting --- src/arkode/arkode_mristep.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index ff96c6edd2..6b4d879e1c 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -2022,8 +2022,9 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt if (ark_mem->PreProcessRHS != NULL) { if (step_mem->explicit_rhs || - (step_mem->implicit_rhs && (!step_mem->deduce_rhs || - (step_mem->stagetypes[is] != MRISTAGE_DIRK_NOFAST)))) + (step_mem->implicit_rhs && + (!step_mem->deduce_rhs || + (step_mem->stagetypes[is] != MRISTAGE_DIRK_NOFAST)))) { retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); From dd181f7dfd283eeaf0ab556708a90eeb07db63cb Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 3 Feb 2026 22:57:31 -0500 Subject: [PATCH 097/298] Formatting --- src/arkode/arkode_lsrkstep_io.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/arkode/arkode_lsrkstep_io.c b/src/arkode/arkode_lsrkstep_io.c index 1f5eb80086..a6cf3c61cf 100644 --- a/src/arkode/arkode_lsrkstep_io.c +++ b/src/arkode/arkode_lsrkstep_io.c @@ -465,14 +465,8 @@ int LSRKStepSetNumSSPStages(void* arkode_mem, int num_of_stages) "reset the default value"); return ARK_ILL_INPUT; } - if (num_of_stages == 4) - { - ark_mem->step = lsrkStep_TakeStepSSP43; - } - else - { - ark_mem->step = lsrkStep_TakeStepSSPs3; - } + if (num_of_stages == 4) { ark_mem->step = lsrkStep_TakeStepSSP43; } + else { ark_mem->step = lsrkStep_TakeStepSSPs3; } break; case ARKODE_LSRK_SSP_10_4: From e9af994b5d8ebde6068ca6869d8f2cb93325d6fb Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 3 Feb 2026 23:05:11 -0500 Subject: [PATCH 098/298] Fixed parenthesis in conditional --- src/arkode/arkode_mristep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 6b4d879e1c..43b799c621 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -2671,7 +2671,7 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (ark_mem->PreProcessRHS != NULL) { if (step_mem->explicit_rhs || - step_mem->implicit_rhs && (!step_mem->deduce_rhs || !impl_corr)) + (step_mem->implicit_rhs && (!step_mem->deduce_rhs || !impl_corr))) { retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); From 00523b8d2fed6d7e4d9f8e67bd38360ff39e9e0c Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 10 Feb 2026 09:04:01 -0500 Subject: [PATCH 099/298] Skip step preprocessing immediately following failed-step postprocessing --- src/arkode/arkode.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index c342a24815..1501e20349 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -663,6 +663,7 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, int ewtsetOK; sunrealtype troundoff, nrm; sunbooleantype inactive_roots; + sunbooleantype skip_preprocess; sunrealtype dsm; int nflag, ncf, nef, constrfails; int relax_fails; @@ -883,11 +884,12 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, } /* Looping point for step attempts */ - dsm = ZERO; - kflag = ARK_SUCCESS; + dsm = ZERO; + kflag = ARK_SUCCESS; + skip_preprocess = SUNFALSE; + relax_fails = 0; + nflag = FIRST_CALL; attempts = ncf = nef = constrfails = ark_mem->last_kflag = 0; - relax_fails = 0; - nflag = FIRST_CALL; for (;;) { /* increment attempt counters @@ -909,12 +911,13 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, N_VScale(ONE, ark_mem->yn, ark_mem->ycur); /* call the user-supplied step preprocessing function (if it exists) */ - if (ark_mem->PreProcessStep != NULL) + if (ark_mem->PreProcessStep != NULL && !skip_preprocess) { retval = ark_mem->PreProcessStep(ark_mem->tcur, ark_mem->ycur, ark_mem->ps_data); if (retval != 0) { return (ARK_POSTPROCESS_STEP_FAIL); } } + skip_preprocess = SUNFALSE; /* Call time stepper module to attempt a step: 0 => step completed successfully @@ -1019,6 +1022,7 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, retval = ark_mem->PostProcessStepFail(ark_mem->tcur, ark_mem->ycur, ark_mem->ps_data); if (retval != 0) { return (ARK_POSTPROCESS_STEP_FAIL); } + skip_preprocess = SUNTRUE; } } /* end looping for step attempts */ From d3cfd23962bfa4e1b24fe395efd29c6f0099ac9b Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 10 Feb 2026 09:44:10 -0500 Subject: [PATCH 100/298] Added documentation for step and stage pre and postprocessing functions --- CHANGELOG.md | 9 ++ .../guide/source/Usage/User_callable.rst | 121 ++++++++++++++++++ .../guide/source/Usage/User_supplied.rst | 50 ++++++-- doc/shared/RecentChanges.rst | 10 ++ 4 files changed, 181 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2ad41a8ba..6c05fc2a7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,15 @@ ### New Features and Enhancements +ARKODE now allows users to supply functions that will be called before each internal +time step, after each successful time step, after each failed time step, before +right-hand side routines are called on an updated state, and/or once each internal +stage is computed (`ARKodeSetPreprocessStepFn`, `ARKodeSetPostprocessStepFn`, +`ARKodeSetPostprocessStepFailFn`, `ARKodeSetPreprocessRHSFn`, and +`ARKodeSetPostprocessStageFn`). These are considered **advanced** functions, as they +should treat the state vector as read-only, otherwise all theoretical guarantees of +solution accuracy and stability will be lost. + ### Bug Fixes Fixed a CMake bug where the SuperLU_MT interface would not be built and diff --git a/doc/arkode/guide/source/Usage/User_callable.rst b/doc/arkode/guide/source/Usage/User_callable.rst index 724069fb50..c5db838cf9 100644 --- a/doc/arkode/guide/source/Usage/User_callable.rst +++ b/doc/arkode/guide/source/Usage/User_callable.rst @@ -911,6 +911,12 @@ Set inequality constraints on solution :c:func:`ARKodeSetConstraints Set max number of constraint failures :c:func:`ARKodeSetMaxNumConstrFails` 10 Set the checkpointing scheme to use (for adjoint) :c:func:`ARKodeSetAdjointCheckpointScheme` ``NULL`` Set the checkpointing step index (for adjoint) :c:func:`ARKodeSetAdjointCheckpointIndex` 0 +Use compensated summation for accumulating time :c:func:`ARKodeSetUseCompensatedSums` ``SUNFALSE`` +Set time step preprocessing function :c:func:`ARKodeSetPreprocessStepFn` ``NULL`` +Set time step postprocessing function :c:func:`ARKodeSetPostprocessStepFn` ``NULL`` +Set failed time step postrocessing function :c:func:`ARKodeSetPostprocessStepFailFn` ``NULL`` +Set right-hand side preprocessing function :c:func:`ARKodeSetPreprocessRHSFn` ``NULL`` +Set stage postprocessing function. :c:func:`ARKodeSetPostprocessStageFn` ``NULL`` ================================================= ========================================== ======================= @@ -1626,6 +1632,121 @@ Set the checkpointing step index (for adjoint) :c:func:`ARKodeSetAdjointChec This routine will be called by :c:func:`ARKodeSetOptions` when using the key "arkid.use_compensated_sums". + +.. c:function:: int ARKodeSetPreprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep) + + [ADVANCED] Provides a function to be called before each time step. A ``NULL`` + input function disables step preprocessing. If a user-supplied failed-step postprocessing + function is supplied by calling :c:func:`ARKodeSetPostprocessStepFailFn`, then + preprocessing will not be called on the step attempt that immediately follows a failed step. + + This should **not** adjust the state vector itself. It is designed to allow users to set + up auxiliary data structures that they will use within the time step (e.g., in their + right-hand side function(s)). + + :param arkode_mem: pointer to the ARKODE memory block. + :param ProcessStep: the user-supplied function to call. + + :retval ARK_SUCCESS: the function exited successfully. + :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. + + .. warning:: + + IF THE SUPPLIED FUNCTION MODIFIES ANY OF THE ACTIVE STATE DATA, THEN ALL + THEORETICAL GUARANTEES OF SOLUTION ACCURACY AND STABILITY ARE LOST. + + .. versionadded:: x.y.z + + +.. c:function:: int ARKodeSetPostprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep) + + [ADVANCED] Provides a function to be called following each successful time step. A ``NULL`` + input function disables step postprocessing. + + This should **not** adjust the state vector itself. It is designed to allow users to compute + relevant diagnostic information after each step. + + :param arkode_mem: pointer to the ARKODE memory block. + :param ProcessStep: the user-supplied function to call. + + :retval ARK_SUCCESS: the function exited successfully. + :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. + + .. warning:: + + IF THE SUPPLIED FUNCTION MODIFIES ANY OF THE ACTIVE STATE DATA, THEN ALL + THEORETICAL GUARANTEES OF SOLUTION ACCURACY AND STABILITY ARE LOST. + + +.. c:function:: int ARKodeSetPostprocessStepFailFn(void* arkode_mem, ARKPostProcessFn ProcessStep) + + [ADVANCED] Provides a function to be called following each failed time step. A ``NULL`` + input function disables failed step postprocessing. + + This should **not** adjust the state vector itself. It is designed to allow users to reset + any relevant diagnostic information they may have accumulated within a rejected time step. + + :param arkode_mem: pointer to the ARKODE memory block. + :param ProcessStep: the user-supplied function to call. + + :retval ARK_SUCCESS: the function exited successfully. + :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. + + .. warning:: + + IF THE SUPPLIED FUNCTION MODIFIES ANY OF THE ACTIVE STATE DATA, THEN ALL + THEORETICAL GUARANTEES OF SOLUTION ACCURACY AND STABILITY ARE LOST. + + .. versionadded:: x.y.z + + +.. c:function:: int ARKodeSetPreprocessRHSFn(void* arkode_mem, ARKPostProcessFn ProcessStep) + + [ADVANCED] Provides a function to be called prior to evaluating user-provided right-hand + side (RHS) functions. For partitioned methods (e.g., ARKStep or MRIStep), that will call + multiple RHS functions with identical inputs, this is called only once prior to the first + RHS evaluation. A ``NULL`` input function disables RHS preprocessing. + + This should **not** adjust the state vector itself. It is designed to allow users to set up + auxiliary data structures that will be used within the RHS evaluations (e.g., MPI communication + to fill and send exchange buffers). + + :param arkode_mem: pointer to the ARKODE memory block. + :param ProcessStep: the user-supplied function to call. + + :retval ARK_SUCCESS: the function exited successfully. + :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. + + .. warning:: + + IF THE SUPPLIED FUNCTION MODIFIES ANY OF THE ACTIVE STATE DATA, THEN ALL + THEORETICAL GUARANTEES OF SOLUTION ACCURACY AND STABILITY ARE LOST. + + .. versionadded:: x.y.z + + +.. c:function:: int ARKodeSetPostprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStep) + + [ADVANCED] Provides a function to be called immediately after each stage is completed within + ARKODE's multi-stage methods. A ``NULL`` input function disables stage postprocessing. + + This should **not** adjust the state vector itself. It is designed to allow users to compute + relevant diagnostic information within each step. + + :param arkode_mem: pointer to the ARKODE memory block. + :param ProcessStep: the user-supplied function to call. + + :retval ARK_SUCCESS: the function exited successfully. + :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. + + .. warning:: + + IF THE SUPPLIED FUNCTION MODIFIES ANY OF THE ACTIVE STATE DATA, THEN ALL + THEORETICAL GUARANTEES OF SOLUTION ACCURACY AND STABILITY ARE LOST. + + + + .. _ARKODE.Usage.ARKodeAdaptivityInputTable: Optional inputs for time step adaptivity diff --git a/doc/arkode/guide/source/Usage/User_supplied.rst b/doc/arkode/guide/source/Usage/User_supplied.rst index 140795b612..10fb384016 100644 --- a/doc/arkode/guide/source/Usage/User_supplied.rst +++ b/doc/arkode/guide/source/Usage/User_supplied.rst @@ -58,19 +58,19 @@ The user-supplied functions for ARKODE consist of: * one or two functions that :ref:`define the mass matrix preconditioner ` - for use if an iterative mass matrix solver is chosen (optional), and + for use if an iterative mass matrix solver is chosen (optional), * a function that :ref:`handles vector resizing operations `, if the underlying vector structure supports resizing (as opposed to deletion/recreation), and if the user plans to call - :c:func:`ARKodeResize` (optional). + :c:func:`ARKodeResize` (optional), * MRIStep only: functions to be :ref:`called before and after each inner integration ` to perform any communication or memory transfers of forcing data supplied by the outer integrator to the inner integrator, or state data supplied - by the inner integrator to the outer integrator. + by the inner integrator to the outer integrator, * if relaxation is enabled (optional), a function that :ref:`evaluates the conservative or dissipative function ` @@ -78,6 +78,10 @@ The user-supplied functions for ARKODE consist of: :ref:`evaluate its Jacobian ` :math:`\xi'(y(t))` (required). +* functions that can optionally be called :ref:`before and after each time step or + within the stages of supported ARKODE time stepping modules + `. + .. _ARKODE.Usage.ODERHS: @@ -1020,12 +1024,11 @@ integrator for the inner integration. :param f: an ``N_Vector`` array of outer forcing vectors. :param num_vecs: the number of vectors in the ``N_Vector`` array. :param user_data: the `user_data` pointer that was passed to - :c:func:`MRIStepSetUserData`. + :c:func:`ARKodeSetUserData`. :return: An *MRIStepPreInnerFn* function should return 0 if successful, a positive value if a recoverable error occurred, or a negative value if an unrecoverable - error occurred. As the MRIStep module only supports fixed step sizes at this - time any non-zero return value will halt the integration. + error occurred. .. note:: @@ -1049,12 +1052,11 @@ outer integrator for the outer integration. :param t: the current value of the independent variable. :param y: the current value of the dependent variable vector. :param user_data: the ``user_data`` pointer that was passed to - :c:func:`MRIStepSetUserData`. + :c:func:`ARKodeSetUserData`. :return: An :c:func:`MRIStepPostInnerFn` function should return 0 if successful, a positive value if a recoverable error occurred, or a negative value if an - unrecoverable error occurred. As the MRIStep module only supports fixed step - sizes at this time any non-zero return value will halt the integration. + unrecoverable error occurred. .. note:: @@ -1102,3 +1104,33 @@ Relaxation Jacobian function positive value if a recoverable error occurred, or a negative value if an unrecoverable error occurred. If a recoverable error occurs, the step size will be reduced and the step repeated. + + +.. _ARKODE.Usage.ARKodeProcessingFunctions: + +Step and stage processing functions +------------------------------------ + +The user may supply functions of type :c:type:`ARKPostProcessFn` that will be +called before each internal time step (:c:func:`ARKodeSetPreprocessStepFn`), after +each successful internal time step (:c:func:`ARKodeSetPostprocessStepFn`), after each +failed internal time step (:c:func:`ARKodeSetPostprocessStepFailFn`), before user-supplied +right-hand side function(s) are called on an updated state (:c:func:`ARKodeSetPreprocessRHSFn`), +or after each internal stage is computed (:c:func:`ARKodeSetPostprocessStageFn`). + + +.. c:type:: int (*ARKPostProcessFn)(sunrealtype t, N_Vector y, void* user_data) + + :param t: the current value of the independent variable. + :param y: the current value of the dependent variable vector. + :param user_data: the ``user_data`` pointer that was passed to + :c:func:`ARKodeSetUserData`. + + :return: An :c:func:`ARKPostProcessFn` function should return 0 if successful, a + positive value if a recoverable error occurred, or a negative value if an + unrecoverable error occurred. + + .. warning:: + + IF THE SUPPLIED FUNCTION MODIFIES ANY OF THE ACTIVE STATE DATA IN *y*, THEN ALL + THEORETICAL GUARANTEES OF SOLUTION ACCURACY AND STABILITY ARE LOST. diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index d3266f3d84..fcb7a3145c 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -5,6 +5,16 @@ **New Features and Enhancements** +ARKODE now allows users to supply functions that will be called before each internal +time step, after each successful time step, after each failed time step, before +right-hand side routines are called on an updated state, and/or once each internal +stage is computed (:c:func:`ARKodeSetPreprocessStepFn`, +:c:func:`ARKodeSetPostprocessStepFn`, :c:func:`ARKodeSetPostprocessStepFailFn`, +:c:func:`ARKodeSetPreprocessRHSFn`, and :c:func:`ARKodeSetPostprocessStageFn`). +These are considered **advanced** functions, as they should treat the state vector as +read-only, otherwise all theoretical guarantees of solution accuracy and stability +will be lost. + **Bug Fixes** Fixed a CMake bug where the SuperLU_MT interface would not be built and From c31ac477f0e78d3a06a209e48b84b01f041e133c Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 10 Feb 2026 12:19:39 -0500 Subject: [PATCH 101/298] Temporarily disabling python CI tests --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6238ad61a..ebf16cfd9b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -96,7 +96,8 @@ jobs: # Check for changes to trigger python interface checks # Updates in include or bindings/sundials4py directories if git diff --name-only "$BASE" "$HEAD" | grep -qE '^(include/|bindings/sundials4py/)'; then - echo "python=true" >> "$GITHUB_OUTPUT" + #echo "python=true" >> "$GITHUB_OUTPUT" + echo "python=false" >> "$GITHUB_OUTPUT" else echo "python=false" >> "$GITHUB_OUTPUT" fi From 58670003086fe9eee308a93eb345e2e3b03dc4c9 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 10 Feb 2026 14:40:45 -0500 Subject: [PATCH 102/298] upgraded warning messages to danger messages --- .../guide/source/Usage/User_callable.rst | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/doc/arkode/guide/source/Usage/User_callable.rst b/doc/arkode/guide/source/Usage/User_callable.rst index c5db838cf9..f5908a00d1 100644 --- a/doc/arkode/guide/source/Usage/User_callable.rst +++ b/doc/arkode/guide/source/Usage/User_callable.rst @@ -1650,10 +1650,10 @@ Set stage postprocessing function. :c:func:`ARKodeSetPostprocess :retval ARK_SUCCESS: the function exited successfully. :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. - .. warning:: + .. danger:: - IF THE SUPPLIED FUNCTION MODIFIES ANY OF THE ACTIVE STATE DATA, THEN ALL - THEORETICAL GUARANTEES OF SOLUTION ACCURACY AND STABILITY ARE LOST. + If the supplied function modifies any of the active state data, then all + theoretical guarantees of solution accuracy and stability are lost. .. versionadded:: x.y.z @@ -1672,10 +1672,10 @@ Set stage postprocessing function. :c:func:`ARKodeSetPostprocess :retval ARK_SUCCESS: the function exited successfully. :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. - .. warning:: + .. danger:: - IF THE SUPPLIED FUNCTION MODIFIES ANY OF THE ACTIVE STATE DATA, THEN ALL - THEORETICAL GUARANTEES OF SOLUTION ACCURACY AND STABILITY ARE LOST. + If the supplied function modifies any of the active state data, then all + theoretical guarantees of solution accuracy and stability are lost. .. c:function:: int ARKodeSetPostprocessStepFailFn(void* arkode_mem, ARKPostProcessFn ProcessStep) @@ -1692,10 +1692,10 @@ Set stage postprocessing function. :c:func:`ARKodeSetPostprocess :retval ARK_SUCCESS: the function exited successfully. :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. - .. warning:: + .. danger:: - IF THE SUPPLIED FUNCTION MODIFIES ANY OF THE ACTIVE STATE DATA, THEN ALL - THEORETICAL GUARANTEES OF SOLUTION ACCURACY AND STABILITY ARE LOST. + If the supplied function modifies any of the active state data, then all + theoretical guarantees of solution accuracy and stability are lost. .. versionadded:: x.y.z @@ -1717,10 +1717,10 @@ Set stage postprocessing function. :c:func:`ARKodeSetPostprocess :retval ARK_SUCCESS: the function exited successfully. :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. - .. warning:: + .. danger:: - IF THE SUPPLIED FUNCTION MODIFIES ANY OF THE ACTIVE STATE DATA, THEN ALL - THEORETICAL GUARANTEES OF SOLUTION ACCURACY AND STABILITY ARE LOST. + If the supplied function modifies any of the active state data, then all + theoretical guarantees of solution accuracy and stability are lost. .. versionadded:: x.y.z @@ -1739,10 +1739,10 @@ Set stage postprocessing function. :c:func:`ARKodeSetPostprocess :retval ARK_SUCCESS: the function exited successfully. :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. - .. warning:: + .. danger:: - IF THE SUPPLIED FUNCTION MODIFIES ANY OF THE ACTIVE STATE DATA, THEN ALL - THEORETICAL GUARANTEES OF SOLUTION ACCURACY AND STABILITY ARE LOST. + If the supplied function modifies any of the active state data, then all + theoretical guarantees of solution accuracy and stability are lost. From ce5ab6b3bf21be36b43382008d7d3abede772c73 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 10 Feb 2026 16:36:37 -0500 Subject: [PATCH 103/298] Added failure constants for new step/stage pre/post processing routines --- include/arkode/arkode.h | 45 +++++++++++++------------- src/arkode/arkode.c | 20 ++++++++++-- src/arkode/arkode_arkstep.c | 10 +++--- src/arkode/arkode_arkstep_nls.c | 20 ++++++------ src/arkode/arkode_erkstep.c | 8 ++--- src/arkode/arkode_impl.h | 9 ++++++ src/arkode/arkode_io.c | 7 +++++ src/arkode/arkode_ls.c | 6 ++-- src/arkode/arkode_lsrkstep.c | 56 ++++++++++++++++----------------- src/arkode/arkode_mristep.c | 14 ++++----- src/arkode/arkode_mristep_nls.c | 4 +-- src/arkode/arkode_sprkstep.c | 8 ++--- 12 files changed, 120 insertions(+), 87 deletions(-) diff --git a/include/arkode/arkode.h b/include/arkode/arkode.h index 54f5f5c40f..0c38d451c9 100644 --- a/include/arkode/arkode.h +++ b/include/arkode/arkode.h @@ -126,37 +126,40 @@ extern "C" { /* ARK_POSTPROCESS_FAIL equals ARK_POSTPROCESS_STEP_FAIL for backwards compatibility. Note that we use these same constants for step and stage preprocessing errors */ -#define ARK_POSTPROCESS_FAIL -37 -#define ARK_POSTPROCESS_STEP_FAIL -37 -#define ARK_POSTPROCESS_STAGE_FAIL -38 +#define ARK_POSTPROCESS_FAIL -37 +#define ARK_POSTPROCESS_STEP_FAIL -37 +#define ARK_POSTPROCESS_STAGE_FAIL -38 +#define ARK_POSTPROCESS_FAILED_STEP_FAIL -39 +#define ARK_PREPROCESS_STEP_FAIL -40 +#define ARK_PREPROCESS_RHS_FAIL -41 -#define ARK_USER_PREDICT_FAIL -39 -#define ARK_INTERP_FAIL -40 +#define ARK_USER_PREDICT_FAIL -42 +#define ARK_INTERP_FAIL -43 -#define ARK_INVALID_TABLE -41 +#define ARK_INVALID_TABLE -44 -#define ARK_CONTEXT_ERR -42 +#define ARK_CONTEXT_ERR -45 -#define ARK_RELAX_FAIL -43 -#define ARK_RELAX_MEM_NULL -44 -#define ARK_RELAX_FUNC_FAIL -45 -#define ARK_RELAX_JAC_FAIL -46 +#define ARK_RELAX_FAIL -46 +#define ARK_RELAX_MEM_NULL -47 +#define ARK_RELAX_FUNC_FAIL -48 +#define ARK_RELAX_JAC_FAIL -49 -#define ARK_CONTROLLER_ERR -47 +#define ARK_CONTROLLER_ERR -50 -#define ARK_STEPPER_UNSUPPORTED -48 +#define ARK_STEPPER_UNSUPPORTED -51 -#define ARK_DOMEIG_FAIL -49 -#define ARK_MAX_STAGE_LIMIT_FAIL -50 +#define ARK_DOMEIG_FAIL -52 +#define ARK_MAX_STAGE_LIMIT_FAIL -53 -#define ARK_SUNSTEPPER_ERR -51 -#define ARK_STEP_DIRECTION_ERR -52 +#define ARK_SUNSTEPPER_ERR -54 +#define ARK_STEP_DIRECTION_ERR -55 -#define ARK_ADJ_CHECKPOINT_FAIL -53 -#define ARK_ADJ_RECOMPUTE_FAIL -54 -#define ARK_SUNADJSTEPPER_ERR -55 +#define ARK_ADJ_CHECKPOINT_FAIL -56 +#define ARK_ADJ_RECOMPUTE_FAIL -57 +#define ARK_SUNADJSTEPPER_ERR -58 -#define ARK_DEE_FAIL -56 +#define ARK_DEE_FAIL -59 #define ARK_UNRECOGNIZED_ERROR -99 diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 1501e20349..7156bc2d32 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -915,7 +915,7 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, { retval = ark_mem->PreProcessStep(ark_mem->tcur, ark_mem->ycur, ark_mem->ps_data); - if (retval != 0) { return (ARK_POSTPROCESS_STEP_FAIL); } + if (retval != 0) { return (ARK_PREPROCESS_STEP_FAIL); } } skip_preprocess = SUNFALSE; @@ -1016,12 +1016,13 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, ark_mem->h *= ark_mem->eta; ark_mem->next_h = ark_mem->hprime = ark_mem->h; - /* since the previous step attempt failed, call the user-supplied step failure postprocessing function (if it exists) */ + /* since the previous step attempt failed, call the user-supplied + step failure postprocessing function (if it exists) */ if (ark_mem->PostProcessStepFail != NULL) { retval = ark_mem->PostProcessStepFail(ark_mem->tcur, ark_mem->ycur, ark_mem->ps_data); - if (retval != 0) { return (ARK_POSTPROCESS_STEP_FAIL); } + if (retval != 0) { return (ARK_POSTPROCESS_FAILED_STEP_FAIL); } skip_preprocess = SUNTRUE; } @@ -2891,6 +2892,19 @@ int arkHandleFailure(ARKodeMem ark_mem, int flag) arkProcessError(ark_mem, ARK_POSTPROCESS_STAGE_FAIL, __LINE__, __func__, __FILE__, MSG_ARK_POSTPROCESS_STAGE_FAIL, ark_mem->tcur); break; + case ARK_POSTPROCESS_FAILED_STEP_FAIL: + arkProcessError(ark_mem, ARK_POSTPROCESS_FAILED_STEP_FAIL, __LINE__, + __func__, __FILE__, MSG_ARK_POSTPROCESS_FAILED_STEP_FAIL, + ark_mem->tcur); + break; + case ARK_PREPROCESS_STEP_FAIL: + arkProcessError(ark_mem, ARK_PREPROCESS_STEP_FAIL, __LINE__, __func__, + __FILE__, MSG_ARK_PREPROCESS_STEP_FAIL, ark_mem->tcur); + break; + case ARK_PREPROCESS_RHS_FAIL: + arkProcessError(ark_mem, ARK_PREPROCESS_RHS_FAIL, __LINE__, __func__, + __FILE__, MSG_ARK_PREPROCESS_RHS_FAIL, ark_mem->tcur); + break; case ARK_INTERP_FAIL: arkProcessError(ark_mem, ARK_INTERP_FAIL, __LINE__, __func__, __FILE__, "At t = " SUN_FORMAT_G diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index 1b64cefd73..39f22ff19b 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1334,7 +1334,7 @@ int arkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } /* compute the implicit component */ @@ -1466,7 +1466,7 @@ int arkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } /* compute the implicit component */ @@ -1582,7 +1582,7 @@ int arkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } /* compute the implicit component and store in sdata */ @@ -1871,7 +1871,7 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) { retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, ark_mem->user_data); - if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } retval = step_mem->fi(ark_mem->tn, ark_mem->yn, step_mem->Fi[0], ark_mem->user_data); @@ -2109,7 +2109,7 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess stage, retval = %i", retval); - return (ARK_POSTPROCESS_STAGE_FAIL); + return (ARK_PREPROCESS_RHS_FAIL); } } } diff --git a/src/arkode/arkode_arkstep_nls.c b/src/arkode/arkode_arkstep_nls.c index 64038f541b..ac85cc85a0 100644 --- a/src/arkode/arkode_arkstep_nls.c +++ b/src/arkode/arkode_arkstep_nls.c @@ -589,7 +589,7 @@ int arkStep_NlsResidual_MassIdent(N_Vector zcor, N_Vector r, void* arkode_mem) { retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); - if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } retval = step_mem->nls_fi(ark_mem->tcur, ark_mem->ycur, step_mem->Fi[step_mem->istage], ark_mem->user_data); @@ -642,7 +642,7 @@ int arkStep_NlsResidual_MassIdent_TrivialPredAutonomous(N_Vector zcor, N_Vector { retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); - if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } retval = step_mem->nls_fi(ark_mem->tcur, ark_mem->ycur, step_mem->Fi[step_mem->istage], ark_mem->user_data); @@ -716,7 +716,7 @@ int arkStep_NlsResidual_MassFixed(N_Vector zcor, N_Vector r, void* arkode_mem) { retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); - if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } retval = step_mem->nls_fi(ark_mem->tcur, ark_mem->ycur, step_mem->Fi[step_mem->istage], ark_mem->user_data); @@ -772,7 +772,7 @@ int arkStep_NlsResidual_MassFixed_TrivialPredAutonomous(N_Vector zcor, N_Vector { retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); - if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } retval = step_mem->nls_fi(ark_mem->tcur, ark_mem->ycur, step_mem->Fi[step_mem->istage], ark_mem->user_data); @@ -852,7 +852,7 @@ int arkStep_NlsResidual_MassTDep(N_Vector zcor, N_Vector r, void* arkode_mem) { retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); - if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } retval = step_mem->nls_fi(ark_mem->tcur, ark_mem->ycur, step_mem->Fi[step_mem->istage], ark_mem->user_data); @@ -923,7 +923,7 @@ int arkStep_NlsFPFunction_MassIdent(N_Vector zcor, N_Vector g, void* arkode_mem) { retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); - if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } retval = step_mem->nls_fi(ark_mem->tcur, ark_mem->ycur, step_mem->Fi[step_mem->istage], ark_mem->user_data); @@ -969,7 +969,7 @@ int arkStep_NlsFPFunction_MassIdent_TrivialPredAutonomous(N_Vector zcor, { retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); - if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } retval = step_mem->nls_fi(ark_mem->tcur, ark_mem->ycur, step_mem->Fi[step_mem->istage], ark_mem->user_data); @@ -1044,7 +1044,7 @@ int arkStep_NlsFPFunction_MassFixed(N_Vector zcor, N_Vector g, void* arkode_mem) { retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); - if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } retval = step_mem->nls_fi(ark_mem->tcur, ark_mem->ycur, step_mem->Fi[step_mem->istage], ark_mem->user_data); @@ -1095,7 +1095,7 @@ int arkStep_NlsFPFunction_MassFixed_TrivialPredAutonomous(N_Vector zcor, { retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); - if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } retval = step_mem->nls_fi(ark_mem->tcur, ark_mem->ycur, step_mem->Fi[step_mem->istage], ark_mem->user_data); @@ -1171,7 +1171,7 @@ int arkStep_NlsFPFunction_MassTDep(N_Vector zcor, N_Vector g, void* arkode_mem) { retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); - if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } retval = step_mem->nls_fi(ark_mem->tcur, ark_mem->ycur, step_mem->Fi[step_mem->istage], ark_mem->user_data); diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index 91b50a995e..50fded097d 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -618,7 +618,7 @@ int erkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } /* call f */ @@ -664,7 +664,7 @@ int erkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } /* call f */ @@ -701,7 +701,7 @@ int erkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } /* call f */ @@ -900,7 +900,7 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess stage, retval = %i", retval); - return (ARK_POSTPROCESS_STAGE_FAIL); + return (ARK_PREPROCESS_RHS_FAIL); } } diff --git a/src/arkode/arkode_impl.h b/src/arkode/arkode_impl.h index b043f4bf33..7a93e4b973 100644 --- a/src/arkode/arkode_impl.h +++ b/src/arkode/arkode_impl.h @@ -815,12 +815,21 @@ void arkode_user_supplied_fn_table_destroy(void* ptr); #define MSG_ARK_VECTOROP_ERR "At " MSG_TIME ", a vector operation failed." #define MSG_ARK_INNERSTEP_FAILED \ "At " MSG_TIME ", the inner stepper failed in an unrecoverable manner." +#define MSG_ARK_PREPROCESS_STEP_FAIL \ + "At " MSG_TIME \ + ", the step preprocessing routine failed in an unrecoverable manner." #define MSG_ARK_POSTPROCESS_STEP_FAIL \ "At " MSG_TIME \ ", the step postprocessing routine failed in an unrecoverable manner." +#define MSG_ARK_POSTPROCESS_FAILED_STEP_FAIL \ + "At " MSG_TIME ", the failed step postprocessing routine failed in an " \ + "unrecoverable manner." #define MSG_ARK_POSTPROCESS_STAGE_FAIL \ "At " MSG_TIME \ ", the stage postprocessing routine failed in an unrecoverable manner." +#define MSG_ARK_PREPROCESS_RHS_FAIL \ + "At " MSG_TIME \ + ", the RHS preprocessing routine failed in an unrecoverable manner." #define MSG_ARK_NULL_SUNCTX "sunctx = NULL illegal." #define MSG_ARK_CONTEXT_MISMATCH \ "Outer and inner steppers have different contexts." diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index 4453a2b677..83b12102cd 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -3253,6 +3253,13 @@ char* ARKodeGetReturnFlagName(long int flag) case ARK_POSTPROCESS_STAGE_FAIL: sprintf(name, "ARK_POSTPROCESS_STAGE_FAIL"); break; + case ARK_POSTPROCESS_FAILED_STEP_FAIL: + sprintf(name, "ARK_POSTPROCESS_FAILED_STEP_FAIL"); + break; + case ARK_PREPROCESS_STEP_FAIL: + sprintf(name, "ARK_PREPROCESS_STEP_FAIL"); + break; + case ARK_PREPROCESS_RHS_FAIL: sprintf(name, "ARK_PREPROCESS_RHS_FAIL"); break; case ARK_USER_PREDICT_FAIL: sprintf(name, "ARK_USER_PREDICT_FAIL"); break; case ARK_INTERP_FAIL: sprintf(name, "ARK_INTERP_FAIL"); break; case ARK_INVALID_TABLE: sprintf(name, "ARK_INVALID_TABLE"); break; diff --git a/src/arkode/arkode_ls.c b/src/arkode/arkode_ls.c index 4bd94f9ae0..6232e4c62b 100644 --- a/src/arkode/arkode_ls.c +++ b/src/arkode/arkode_ls.c @@ -2699,7 +2699,7 @@ int arkLsDenseDQJac(sunrealtype t, N_Vector y, N_Vector fy, SUNMatrix Jac, if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } retval = fi(t, y, ftemp, ark_mem->user_data); arkls_mem->nfeDQ++; @@ -2802,7 +2802,7 @@ int arkLsBandDQJac(sunrealtype t, N_Vector y, N_Vector fy, SUNMatrix Jac, if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(t, ytemp, ark_mem->user_data); - if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } retval = fi(t, ytemp, ftemp, ark_mem->user_data); arkls_mem->nfeDQ++; @@ -2874,7 +2874,7 @@ int arkLsDQJtimes(N_Vector v, N_Vector Jv, sunrealtype t, N_Vector y, if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(t, work, ark_mem->user_data); - if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } retval = arkls_mem->Jt_f(t, work, Jv, ark_mem->user_data); arkls_mem->nfeDQ++; diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 239ac52729..57a51d6e45 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -455,7 +455,7 @@ int lsrkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } retval = step_mem->fe(t, y, f, ark_mem->user_data); step_mem->nfe++; @@ -480,7 +480,7 @@ int lsrkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } retval = step_mem->fe(t, y, ark_mem->fn, ark_mem->user_data); step_mem->nfe++; @@ -502,7 +502,7 @@ int lsrkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } /* call f */ @@ -638,7 +638,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; + return ARK_PREPROCESS_RHS_FAIL; } } @@ -727,7 +727,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; + return ARK_PREPROCESS_RHS_FAIL; } } @@ -824,7 +824,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; + return ARK_PREPROCESS_RHS_FAIL; } } @@ -870,7 +870,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; + return ARK_PREPROCESS_RHS_FAIL; } } @@ -1007,7 +1007,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; + return ARK_PREPROCESS_RHS_FAIL; } } retval = step_mem->fe(ark_mem->tn, ark_mem->yn, ark_mem->fn, @@ -1078,7 +1078,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; + return ARK_PREPROCESS_RHS_FAIL; } } @@ -1161,7 +1161,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; + return ARK_PREPROCESS_RHS_FAIL; } } @@ -1279,7 +1279,7 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; + return ARK_PREPROCESS_RHS_FAIL; } } @@ -1334,7 +1334,7 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; + return ARK_PREPROCESS_RHS_FAIL; } } @@ -1388,7 +1388,7 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; + return ARK_PREPROCESS_RHS_FAIL; } } retval = step_mem->fe(ark_mem->tcur + ark_mem->h, ark_mem->ycur, @@ -1503,7 +1503,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; + return ARK_PREPROCESS_RHS_FAIL; } } @@ -1557,7 +1557,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; + return ARK_PREPROCESS_RHS_FAIL; } } @@ -1615,7 +1615,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; + return ARK_PREPROCESS_RHS_FAIL; } } @@ -1670,7 +1670,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; + return ARK_PREPROCESS_RHS_FAIL; } } @@ -1740,7 +1740,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; + return ARK_PREPROCESS_RHS_FAIL; } } @@ -1864,7 +1864,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; + return ARK_PREPROCESS_RHS_FAIL; } } @@ -1914,7 +1914,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; + return ARK_PREPROCESS_RHS_FAIL; } } @@ -1963,7 +1963,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; + return ARK_PREPROCESS_RHS_FAIL; } } @@ -2025,7 +2025,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; + return ARK_PREPROCESS_RHS_FAIL; } } @@ -2121,7 +2121,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; + return ARK_PREPROCESS_RHS_FAIL; } } @@ -2179,7 +2179,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; + return ARK_PREPROCESS_RHS_FAIL; } } @@ -2261,7 +2261,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; + return ARK_PREPROCESS_RHS_FAIL; } } @@ -2320,7 +2320,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; + return ARK_PREPROCESS_RHS_FAIL; } } @@ -2738,7 +2738,7 @@ int lsrkStep_DQJtimes(void* arkode_mem, N_Vector v, N_Vector Jv) { retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, ark_mem->user_data); - if (retval != 0) { return ARK_POSTPROCESS_STAGE_FAIL; } + if (retval != 0) { return ARK_PREPROCESS_RHS_FAIL; } } retval = step_mem->fe(ark_mem->tn, ark_mem->yn, ark_mem->fn, @@ -2767,7 +2767,7 @@ int lsrkStep_DQJtimes(void* arkode_mem, N_Vector v, N_Vector Jv) if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(t, work, ark_mem->user_data); - if (retval != 0) { return ARK_POSTPROCESS_STAGE_FAIL; } + if (retval != 0) { return ARK_PREPROCESS_RHS_FAIL; } } retval = step_mem->fe(t, work, Jv, ark_mem->user_data); step_mem->nfeDQ++; diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 43b799c621..cdcec6da56 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1480,7 +1480,7 @@ int mriStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } /* compute the implicit component and store in sdata */ @@ -1610,7 +1610,7 @@ int mriStep_UpdateF0(ARKodeMem ark_mem, ARKodeMRIStepMem step_mem, (!step_mem->fsi_is_current || !ark_mem->fn_is_current))) { retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } /* implicit component */ @@ -1682,7 +1682,7 @@ int mriStep_UpdateF0(ARKodeMem ark_mem, ARKodeMRIStepMem step_mem, if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } /* compute the implicit component */ @@ -2032,7 +2032,7 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess stage, retval = %i", retval); - return (ARK_POSTPROCESS_STAGE_FAIL); + return (ARK_PREPROCESS_RHS_FAIL); } } } @@ -2679,7 +2679,7 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess stage, retval = %i", retval); - return (ARK_POSTPROCESS_STAGE_FAIL); + return (ARK_PREPROCESS_RHS_FAIL); } } } @@ -3088,7 +3088,7 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess stage, retval = %i", retval); - return (ARK_POSTPROCESS_STAGE_FAIL); + return (ARK_PREPROCESS_RHS_FAIL); } } @@ -4242,7 +4242,7 @@ int mriStep_SlowRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } /* call fsi if the problem has an implicit component */ diff --git a/src/arkode/arkode_mristep_nls.c b/src/arkode/arkode_mristep_nls.c index 446886c27e..a9dd4e7f4f 100644 --- a/src/arkode/arkode_mristep_nls.c +++ b/src/arkode/arkode_mristep_nls.c @@ -479,7 +479,7 @@ int mriStep_NlsResidual(N_Vector zcor, N_Vector r, void* arkode_mem) { retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); - if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } retval = step_mem->nls_fsi(ark_mem->tcur, ark_mem->ycur, step_mem->Fsi[step_mem->stage_map[step_mem->istage]], @@ -540,7 +540,7 @@ int mriStep_NlsFPFunction(N_Vector zcor, N_Vector g, void* arkode_mem) { retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); - if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } retval = step_mem->nls_fsi(ark_mem->tcur, ark_mem->ycur, step_mem->Fsi[step_mem->stage_map[step_mem->istage]], diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index a0fa88a224..de59b53c86 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -496,7 +496,7 @@ int sprkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (ark_mem->PreProcessRHS != NULL) { retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } /* Since f1 and f2 do not have overlapping outputs and so the f vector is @@ -582,7 +582,7 @@ int sprkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess stage, retval = %i", retval); - return (ARK_POSTPROCESS_STAGE_FAIL); + return (ARK_PREPROCESS_RHS_FAIL); } } @@ -625,7 +625,7 @@ int sprkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess stage, retval = %i", retval); - return (ARK_POSTPROCESS_STAGE_FAIL); + return (ARK_PREPROCESS_RHS_FAIL); } } @@ -710,7 +710,7 @@ int sprkStep_TakeStep_Compensated(ARKodeMem ark_mem, sunrealtype* dsmPtr, { SUNLogInfo(ARK_LOGGER, "begin-stages-list", "status = failed stage stage processing, retval = %i", - ARK_POSTPROCESS_STAGE_FAIL); + ARK_PREPROCESS_RHS_FAIL); arkProcessError(ark_mem, ARK_POSTPROCESS_STAGE_FAIL, __LINE__, __func__, __FILE__, "Compensated summation is not compatible with stage " From 363505d8f3cebc6809300d041c7fcf4659c4d950 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 10 Feb 2026 16:47:55 -0500 Subject: [PATCH 104/298] Formatting --- src/arkode/arkode_impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arkode/arkode_impl.h b/src/arkode/arkode_impl.h index 7a93e4b973..1afae4b0a1 100644 --- a/src/arkode/arkode_impl.h +++ b/src/arkode/arkode_impl.h @@ -823,7 +823,7 @@ void arkode_user_supplied_fn_table_destroy(void* ptr); ", the step postprocessing routine failed in an unrecoverable manner." #define MSG_ARK_POSTPROCESS_FAILED_STEP_FAIL \ "At " MSG_TIME ", the failed step postprocessing routine failed in an " \ - "unrecoverable manner." + "unrecoverable manner." #define MSG_ARK_POSTPROCESS_STAGE_FAIL \ "At " MSG_TIME \ ", the stage postprocessing routine failed in an unrecoverable manner." From e52eda41c903849dfd88cb34bb2b28b7c4e4f3c6 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Wed, 11 Feb 2026 09:02:30 -0500 Subject: [PATCH 105/298] Fixed locations for stage index updates in SSP(4,3) --- src/arkode/arkode_lsrkstep.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 98feb295b7..e223312548 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -1933,6 +1933,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); /* Perform the second stage, and accumulate embedding into tempv1 */ + step_mem->istage = 1; ark_mem->tcur = ark_mem->tn + hp5; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 1, ark_mem->tcur); @@ -1955,9 +1956,6 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - /* update stage index */ - step_mem->istage = 1; - /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { @@ -1986,6 +1984,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); /* Perform the third stage */ + step_mem->istage = 2; ark_mem->tcur = ark_mem->tn + ark_mem->h; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 2, ark_mem->tcur); @@ -2008,9 +2007,6 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - /* update stage index */ - step_mem->istage = 2; - /* Evaluate stage RHS */ /* apply user-supplied stage preprocessing function (if supplied) */ @@ -2040,6 +2036,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); /* Perform the fourth stage */ + step_mem->istage = 3; ark_mem->tcur = ark_mem->tn + hp5; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 3, ark_mem->tcur); @@ -2074,9 +2071,6 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - /* update stage index */ - step_mem->istage = 3; - /* Evaluate stage RHS */ /* apply user-supplied stage preprocessing function (if supplied) */ From 6e3fdef1f752f384223f671c41c9c01de3278315 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Wed, 11 Feb 2026 11:07:31 -0500 Subject: [PATCH 106/298] Ensured that all steppers applied stage postprocessing to its updated time step solution (this was inconsistent before) --- src/arkode/arkode_arkstep.c | 13 ++++++++++ src/arkode/arkode_erkstep.c | 13 ++++++++++ src/arkode/arkode_lsrkstep.c | 47 +++++++++++++++++++++++++++++++++--- src/arkode/arkode_mristep.c | 13 ++++++++++ 4 files changed, 82 insertions(+), 4 deletions(-) diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index 39f22ff19b..7267237352 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -2230,6 +2230,19 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (*nflagPtr < 0) { return (*nflagPtr); } if (*nflagPtr > 0) { return (TRY_AGAIN); } + /* apply user-supplied stage postprocessing function (if supplied) */ + if (ark_mem->PostProcessStage != NULL) + { + retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed postprocess stage, retval = %i", retval); + return (ARK_POSTPROCESS_STAGE_FAIL); + } + } + if (ark_mem->checkpoint_scheme) { sunbooleantype do_save; diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index 50fded097d..533fd60679 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -968,6 +968,19 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) return (retval); } + /* apply user-supplied stage postprocessing function (if supplied) */ + if (ark_mem->PostProcessStage != NULL) + { + retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed postprocess stage, retval = %i", retval); + return (ARK_POSTPROCESS_STAGE_FAIL); + } + } + SUNLogExtraDebugVec(ARK_LOGGER, "updated solution", ark_mem->ycur, "ycur(:) ="); SUNLogInfo(ARK_LOGGER, "end-compute-solution", "status = success"); diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 57a51d6e45..227de5850a 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -773,7 +773,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->PostProcessStage != NULL && j < step_mem->req_stages) + if (ark_mem->PostProcessStage != NULL) { retval = ark_mem->PostProcessStage(ark_mem->tcur + ark_mem->h * thj, ark_mem->ycur, ark_mem->user_data); @@ -1120,7 +1120,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->PostProcessStage != NULL && j < step_mem->req_stages) + if (ark_mem->PostProcessStage != NULL) { retval = ark_mem->PostProcessStage(ark_mem->tcur + ark_mem->h * cj, ark_mem->ycur, ark_mem->user_data); @@ -1422,6 +1422,19 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr return ARK_VECTOROP_ERR; } + /* apply user-supplied stage postprocessing function (if supplied) */ + if (ark_mem->PostProcessStage != NULL) + { + retval = ark_mem->PostProcessStage(ark_mem->tn + ark_mem->h, + ark_mem->ycur, ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed postprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); SUNLogExtraDebugVec(ARK_LOGGER, "updated solution", ark_mem->ycur, "ycur(:) ="); @@ -1771,7 +1784,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->PostProcessStage != NULL && j < step_mem->req_stages) + if (ark_mem->PostProcessStage != NULL) { retval = ark_mem->PostProcessStage(ark_mem->tcur + ((sunrealtype)j - rn) * rat * ark_mem->h, @@ -2047,6 +2060,19 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr N_VLinearSum(ONE, ark_mem->ycur, ark_mem->h * p5, ark_mem->tempv3, ark_mem->ycur); + /* apply user-supplied stage postprocessing function (if supplied) */ + if (ark_mem->PostProcessStage != NULL) + { + retval = ark_mem->PostProcessStage(ark_mem->tn + ark_mem->h, + ark_mem->ycur, ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed postprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); SUNLogExtraDebugVec(ARK_LOGGER, "updated solution", ark_mem->ycur, "ycur(:) ="); @@ -2223,7 +2249,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } } - /* no need to call stage preprocessing here, since the stage does not require + /* no need to call RHS preprocessing here, since the stage does not require a RHS function evaluation */ SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); @@ -2350,6 +2376,19 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt return ARK_VECTOROP_ERR; } + /* apply user-supplied stage postprocessing function (if supplied) */ + if (ark_mem->PostProcessStage != NULL) + { + retval = ark_mem->PostProcessStage(ark_mem->tn + ark_mem->h, + ark_mem->ycur, ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed postprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); SUNLogExtraDebugVec(ARK_LOGGER, "updated solution", ark_mem->ycur, "ycur(:) ="); diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index cdcec6da56..7c56e6378f 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -2178,6 +2178,19 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } if (retval != ARK_SUCCESS) { return retval; } + /* apply user-supplied stage postprocessing function (if supplied) */ + if (ark_mem->PostProcessStage != NULL) + { + retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed postprocess stage, retval = %i", retval); + return (ARK_POSTPROCESS_STAGE_FAIL); + } + } + SUNLogExtraDebugVec(ARK_LOGGER, "embedded solution", ark_mem->ycur, "y_embedded(:) ="); From 8e07202936cd1985a9a5cde3b72bb2dd3a143006 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Wed, 11 Feb 2026 11:26:14 -0500 Subject: [PATCH 107/298] Formatting --- src/arkode/arkode_lsrkstep.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 227de5850a..11f0e11c3a 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -1425,8 +1425,8 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* apply user-supplied stage postprocessing function (if supplied) */ if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->PostProcessStage(ark_mem->tn + ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tn + ark_mem->h, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -2063,8 +2063,8 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* apply user-supplied stage postprocessing function (if supplied) */ if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->PostProcessStage(ark_mem->tn + ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tn + ark_mem->h, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -2379,8 +2379,8 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* apply user-supplied stage postprocessing function (if supplied) */ if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->PostProcessStage(ark_mem->tn + ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tn + ark_mem->h, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", From 806a86a22b4002344053ba3277205fe1f3369ac9 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Wed, 11 Feb 2026 11:54:30 -0500 Subject: [PATCH 108/298] Standardized when the stage index is incremented --- src/arkode/arkode_erkstep.c | 6 +++--- src/arkode/arkode_lsrkstep.c | 12 +++++++++--- src/arkode/arkode_mristep.c | 6 +++--- src/arkode/arkode_sprkstep.c | 3 --- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index d6b0a2bcb9..79f9a1587f 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -841,9 +841,6 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) the first stage RHS is just the full RHS from the start of the step */ for (is = 1; is < step_mem->stages; is++) { - /* store current stage index */ - step_mem->istage = is; - /* Set current stage time(s) */ ark_mem->tcur = ark_mem->tn + step_mem->B->c[is] * ark_mem->h; @@ -896,6 +893,9 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } } + /* update current stage index */ + step_mem->istage = is; + /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index c1f357d332..04718592d4 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -1946,7 +1946,6 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); /* Perform the second stage, and accumulate embedding into tempv1 */ - step_mem->istage = 1; ark_mem->tcur = ark_mem->tn + hp5; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 1, ark_mem->tcur); @@ -1969,6 +1968,9 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } + /* update stage index */ + step_mem->istage = 1; + /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreProcessRHS != NULL) { @@ -1997,7 +1999,6 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); /* Perform the third stage */ - step_mem->istage = 2; ark_mem->tcur = ark_mem->tn + ark_mem->h; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 2, ark_mem->tcur); @@ -2020,6 +2021,9 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } + /* update stage index */ + step_mem->istage = 2; + /* Evaluate stage RHS */ /* apply user-supplied stage preprocessing function (if supplied) */ @@ -2049,7 +2053,6 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); /* Perform the fourth stage */ - step_mem->istage = 3; ark_mem->tcur = ark_mem->tn + hp5; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 3, ark_mem->tcur); @@ -2084,6 +2087,9 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } + /* update stage index */ + step_mem->istage = 3; + /* Evaluate stage RHS */ /* apply user-supplied stage preprocessing function (if supplied) */ diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 9e9aec6888..03eb9bc171 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1952,9 +1952,6 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* Loop over remaining internal stages */ for (is = 1; is < step_mem->stages - 1; is++) { - /* Set current stage index (0-based) */ - step_mem->istage = is; - /* Set relevant stage times (including desired stage time for implicit solves) */ t0 = ark_mem->tn + step_mem->MRIC->c[is - 1] * ark_mem->h; tf = ark_mem->tcur = ark_mem->tn + step_mem->MRIC->c[is] * ark_mem->h; @@ -2020,6 +2017,9 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } } + /* Update current stage index */ + step_mem->istage = is; + /* conditionally reset the inner integrator with the modified stage solution */ if (step_mem->stagetypes[is] != MRISTAGE_STIFF_ACC) { diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index 15abd7db46..8d6890254b 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -664,9 +664,6 @@ int sprkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } } - /* keep track of the stage number */ - step_mem->istage++; - prev_stage = curr_stage; SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); From 2fe4665eeee8df37d5f6e84adcd654e2a692996c Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Wed, 11 Feb 2026 13:12:51 -0500 Subject: [PATCH 109/298] Swig --- src/arkode/fmod_int32/farkode_mod.f90 | 39 ++++++++++++++------------- src/arkode/fmod_int64/farkode_mod.f90 | 39 ++++++++++++++------------- 2 files changed, 42 insertions(+), 36 deletions(-) diff --git a/src/arkode/fmod_int32/farkode_mod.f90 b/src/arkode/fmod_int32/farkode_mod.f90 index 0eab6f1ba6..818027acd0 100644 --- a/src/arkode/fmod_int32/farkode_mod.f90 +++ b/src/arkode/fmod_int32/farkode_mod.f90 @@ -87,24 +87,27 @@ module farkode_mod integer(C_INT), parameter, public :: ARK_POSTPROCESS_FAIL = -37_C_INT integer(C_INT), parameter, public :: ARK_POSTPROCESS_STEP_FAIL = -37_C_INT integer(C_INT), parameter, public :: ARK_POSTPROCESS_STAGE_FAIL = -38_C_INT - integer(C_INT), parameter, public :: ARK_USER_PREDICT_FAIL = -39_C_INT - integer(C_INT), parameter, public :: ARK_INTERP_FAIL = -40_C_INT - integer(C_INT), parameter, public :: ARK_INVALID_TABLE = -41_C_INT - integer(C_INT), parameter, public :: ARK_CONTEXT_ERR = -42_C_INT - integer(C_INT), parameter, public :: ARK_RELAX_FAIL = -43_C_INT - integer(C_INT), parameter, public :: ARK_RELAX_MEM_NULL = -44_C_INT - integer(C_INT), parameter, public :: ARK_RELAX_FUNC_FAIL = -45_C_INT - integer(C_INT), parameter, public :: ARK_RELAX_JAC_FAIL = -46_C_INT - integer(C_INT), parameter, public :: ARK_CONTROLLER_ERR = -47_C_INT - integer(C_INT), parameter, public :: ARK_STEPPER_UNSUPPORTED = -48_C_INT - integer(C_INT), parameter, public :: ARK_DOMEIG_FAIL = -49_C_INT - integer(C_INT), parameter, public :: ARK_MAX_STAGE_LIMIT_FAIL = -50_C_INT - integer(C_INT), parameter, public :: ARK_SUNSTEPPER_ERR = -51_C_INT - integer(C_INT), parameter, public :: ARK_STEP_DIRECTION_ERR = -52_C_INT - integer(C_INT), parameter, public :: ARK_ADJ_CHECKPOINT_FAIL = -53_C_INT - integer(C_INT), parameter, public :: ARK_ADJ_RECOMPUTE_FAIL = -54_C_INT - integer(C_INT), parameter, public :: ARK_SUNADJSTEPPER_ERR = -55_C_INT - integer(C_INT), parameter, public :: ARK_DEE_FAIL = -56_C_INT + integer(C_INT), parameter, public :: ARK_POSTPROCESS_FAILED_STEP_FAIL = -39_C_INT + integer(C_INT), parameter, public :: ARK_PREPROCESS_STEP_FAIL = -40_C_INT + integer(C_INT), parameter, public :: ARK_PREPROCESS_RHS_FAIL = -41_C_INT + integer(C_INT), parameter, public :: ARK_USER_PREDICT_FAIL = -42_C_INT + integer(C_INT), parameter, public :: ARK_INTERP_FAIL = -43_C_INT + integer(C_INT), parameter, public :: ARK_INVALID_TABLE = -44_C_INT + integer(C_INT), parameter, public :: ARK_CONTEXT_ERR = -45_C_INT + integer(C_INT), parameter, public :: ARK_RELAX_FAIL = -46_C_INT + integer(C_INT), parameter, public :: ARK_RELAX_MEM_NULL = -47_C_INT + integer(C_INT), parameter, public :: ARK_RELAX_FUNC_FAIL = -48_C_INT + integer(C_INT), parameter, public :: ARK_RELAX_JAC_FAIL = -49_C_INT + integer(C_INT), parameter, public :: ARK_CONTROLLER_ERR = -50_C_INT + integer(C_INT), parameter, public :: ARK_STEPPER_UNSUPPORTED = -51_C_INT + integer(C_INT), parameter, public :: ARK_DOMEIG_FAIL = -52_C_INT + integer(C_INT), parameter, public :: ARK_MAX_STAGE_LIMIT_FAIL = -53_C_INT + integer(C_INT), parameter, public :: ARK_SUNSTEPPER_ERR = -54_C_INT + integer(C_INT), parameter, public :: ARK_STEP_DIRECTION_ERR = -55_C_INT + integer(C_INT), parameter, public :: ARK_ADJ_CHECKPOINT_FAIL = -56_C_INT + integer(C_INT), parameter, public :: ARK_ADJ_RECOMPUTE_FAIL = -57_C_INT + integer(C_INT), parameter, public :: ARK_SUNADJSTEPPER_ERR = -58_C_INT + integer(C_INT), parameter, public :: ARK_DEE_FAIL = -59_C_INT integer(C_INT), parameter, public :: ARK_UNRECOGNIZED_ERROR = -99_C_INT ! enum ARKRelaxSolver enum, bind(c) diff --git a/src/arkode/fmod_int64/farkode_mod.f90 b/src/arkode/fmod_int64/farkode_mod.f90 index 48990d8dda..5c9cccd5b9 100644 --- a/src/arkode/fmod_int64/farkode_mod.f90 +++ b/src/arkode/fmod_int64/farkode_mod.f90 @@ -87,24 +87,27 @@ module farkode_mod integer(C_INT), parameter, public :: ARK_POSTPROCESS_FAIL = -37_C_INT integer(C_INT), parameter, public :: ARK_POSTPROCESS_STEP_FAIL = -37_C_INT integer(C_INT), parameter, public :: ARK_POSTPROCESS_STAGE_FAIL = -38_C_INT - integer(C_INT), parameter, public :: ARK_USER_PREDICT_FAIL = -39_C_INT - integer(C_INT), parameter, public :: ARK_INTERP_FAIL = -40_C_INT - integer(C_INT), parameter, public :: ARK_INVALID_TABLE = -41_C_INT - integer(C_INT), parameter, public :: ARK_CONTEXT_ERR = -42_C_INT - integer(C_INT), parameter, public :: ARK_RELAX_FAIL = -43_C_INT - integer(C_INT), parameter, public :: ARK_RELAX_MEM_NULL = -44_C_INT - integer(C_INT), parameter, public :: ARK_RELAX_FUNC_FAIL = -45_C_INT - integer(C_INT), parameter, public :: ARK_RELAX_JAC_FAIL = -46_C_INT - integer(C_INT), parameter, public :: ARK_CONTROLLER_ERR = -47_C_INT - integer(C_INT), parameter, public :: ARK_STEPPER_UNSUPPORTED = -48_C_INT - integer(C_INT), parameter, public :: ARK_DOMEIG_FAIL = -49_C_INT - integer(C_INT), parameter, public :: ARK_MAX_STAGE_LIMIT_FAIL = -50_C_INT - integer(C_INT), parameter, public :: ARK_SUNSTEPPER_ERR = -51_C_INT - integer(C_INT), parameter, public :: ARK_STEP_DIRECTION_ERR = -52_C_INT - integer(C_INT), parameter, public :: ARK_ADJ_CHECKPOINT_FAIL = -53_C_INT - integer(C_INT), parameter, public :: ARK_ADJ_RECOMPUTE_FAIL = -54_C_INT - integer(C_INT), parameter, public :: ARK_SUNADJSTEPPER_ERR = -55_C_INT - integer(C_INT), parameter, public :: ARK_DEE_FAIL = -56_C_INT + integer(C_INT), parameter, public :: ARK_POSTPROCESS_FAILED_STEP_FAIL = -39_C_INT + integer(C_INT), parameter, public :: ARK_PREPROCESS_STEP_FAIL = -40_C_INT + integer(C_INT), parameter, public :: ARK_PREPROCESS_RHS_FAIL = -41_C_INT + integer(C_INT), parameter, public :: ARK_USER_PREDICT_FAIL = -42_C_INT + integer(C_INT), parameter, public :: ARK_INTERP_FAIL = -43_C_INT + integer(C_INT), parameter, public :: ARK_INVALID_TABLE = -44_C_INT + integer(C_INT), parameter, public :: ARK_CONTEXT_ERR = -45_C_INT + integer(C_INT), parameter, public :: ARK_RELAX_FAIL = -46_C_INT + integer(C_INT), parameter, public :: ARK_RELAX_MEM_NULL = -47_C_INT + integer(C_INT), parameter, public :: ARK_RELAX_FUNC_FAIL = -48_C_INT + integer(C_INT), parameter, public :: ARK_RELAX_JAC_FAIL = -49_C_INT + integer(C_INT), parameter, public :: ARK_CONTROLLER_ERR = -50_C_INT + integer(C_INT), parameter, public :: ARK_STEPPER_UNSUPPORTED = -51_C_INT + integer(C_INT), parameter, public :: ARK_DOMEIG_FAIL = -52_C_INT + integer(C_INT), parameter, public :: ARK_MAX_STAGE_LIMIT_FAIL = -53_C_INT + integer(C_INT), parameter, public :: ARK_SUNSTEPPER_ERR = -54_C_INT + integer(C_INT), parameter, public :: ARK_STEP_DIRECTION_ERR = -55_C_INT + integer(C_INT), parameter, public :: ARK_ADJ_CHECKPOINT_FAIL = -56_C_INT + integer(C_INT), parameter, public :: ARK_ADJ_RECOMPUTE_FAIL = -57_C_INT + integer(C_INT), parameter, public :: ARK_SUNADJSTEPPER_ERR = -58_C_INT + integer(C_INT), parameter, public :: ARK_DEE_FAIL = -59_C_INT integer(C_INT), parameter, public :: ARK_UNRECOGNIZED_ERROR = -99_C_INT ! enum ARKRelaxSolver enum, bind(c) From 078b04be78972891ecdac34f5f2adeef8fc1f938 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 12 Feb 2026 09:03:27 -0500 Subject: [PATCH 110/298] Fixed erroneous stage processing time for the 5th stage in the SSP(10,4) method --- src/arkode/arkode_lsrkstep.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 11f0e11c3a..8382f247b5 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -2238,8 +2238,16 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* apply user-supplied stage postprocessing function (if supplied) */ if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->PostProcessStage(ark_mem->tn + j * onesixth * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + if (j == 5) + { + retval = ark_mem->PostProcessStage(ark_mem->tn + j * onesixth * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); + } + else + { + retval = ark_mem->PostProcessStage(ark_mem->tn + SUN_RCONST(2.0)* onesixth * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); + } if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", From 54097bf6a9d4f1d8ff4066c6643c97ace228deb7 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 12 Feb 2026 09:11:07 -0500 Subject: [PATCH 111/298] Formatting --- src/arkode/arkode_lsrkstep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 8382f247b5..14ebc84868 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -2245,7 +2245,8 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } else { - retval = ark_mem->PostProcessStage(ark_mem->tn + SUN_RCONST(2.0)* onesixth * ark_mem->h, + retval = ark_mem->PostProcessStage(ark_mem->tn + SUN_RCONST(2.0) * + onesixth * ark_mem->h, ark_mem->ycur, ark_mem->user_data); } if (retval != 0) From c1b3032be8bf9c5ee8002f541b490202e13c1a69 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 12 Feb 2026 09:11:49 -0500 Subject: [PATCH 112/298] Formatting --- src/arkode/arkode_lsrkstep.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 57e24a92e7..c8b3f4584f 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -2248,14 +2248,8 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); /* Begin the j-th stage by updating the state and embedding */ - if (j == 5) - { - ark_mem->tcur = ark_mem->tn + 2 * hsixth; - } - else - { - ark_mem->tcur = ark_mem->tn + j * hsixth; - } + if (j == 5) { ark_mem->tcur = ark_mem->tn + 2 * hsixth; } + else { ark_mem->tcur = ark_mem->tn + j * hsixth; } SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, j, ark_mem->tcur); N_VLinearSum(ONE, ark_mem->ycur, hsixth, ark_mem->tempv3, ark_mem->ycur); From a49397459a882f0db143647ea8533565b115522c Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 12 Feb 2026 13:03:38 -0500 Subject: [PATCH 113/298] Updated logging .out files and answers repsository for LSRKStep SSP(s,3) test with s=9 --- test/answers | 2 +- .../test_logging_arkode_lsrkstep_3.out | 16 +- .../test_logging_arkode_lsrkstep_lvl3_3.out | 82 +++++--- .../test_logging_arkode_lsrkstep_lvl4_3.out | 100 ++++++---- .../test_logging_arkode_lsrkstep_lvl5_3.out | 178 +++++++++++------- 5 files changed, 237 insertions(+), 141 deletions(-) diff --git a/test/answers b/test/answers index 177e59425f..121d849a17 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 177e59425fe3c29bf664b6107042574deaf5db2e +Subproject commit 121d849a17fcef1f56600ed019512d5649d3ebe1 diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_3.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_3.out index e7dbbe9162..c84cffbe2e 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_3.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_3.out @@ -2,11 +2,11 @@ Start LSRKStep Logging test t y y err --------------------------------------------------------------------- 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 - 6.103515625000001e-12 9.155273419059814e-12 3.051757794059814e-12 - 2.825056533018332e-11 4.237584763367401e-11 1.412528230349069e-11 - 8.054712348328291e-11 1.208206824125582e-10 4.027355892927531e-11 + 6.103515625000001e-12 6.103515625000001e-12 0.000000000000000e+00 + 6.104125976562500e-08 6.104125976562493e-08 0.000000000000000e+00 + 1.281744384765625e-06 1.281744384764923e-06 2.117582368135751e-22 --------------------------------------------------------------------- -Current time = 8.05471234832829e-11 +Current time = 1.28174438476563e-06 Steps = 3 Step attempts = 3 Stability limited steps = 0 @@ -15,8 +15,8 @@ Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 Initial step size = 6.103515625e-12 -Last step size = 5.22965581530996e-11 -Current step size = 9.27352060660382e-11 -RHS fn evals = 17 -Number of stages used = 4 +Last step size = 1.220703125e-06 +Current step size = 2.44140625e-05 +RHS fn evals = 29 +Number of stages used = 9 End LSRKStep Logging test diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_3.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_3.out index 673844d869..8bc169f9b5 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_3.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_3.out @@ -5,56 +5,80 @@ Start LSRKStep Logging test [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 1, tn = 0, h = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 0, tcur = 0 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 3.0517578125e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 1.01725260416667e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 3.0517578125e-12 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 6.103515625e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 2.03450520833333e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 3.0517578125e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 6.103515625e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 4.06901041666667e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 5, tcur = 5.08626302083333e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 6, tcur = 3.0517578125e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 7, tcur = 4.06901041666667e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 8, tcur = 5.08626302083333e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 9, tcur = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-compute-embedding] status = success -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0.0152587890625 - 6.103515625000001e-12 9.155273419059814e-12 3.051757794059814e-12 -[INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 6.103515625e-12, h = 2.21470497051833e-11 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 + 6.103515625000001e-12 6.103515625000001e-12 0.000000000000000e+00 +[INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 6.103515625e-12, h = 6.103515625e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 0, tcur = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 1.71770404775917e-11 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 1.01786295572917e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 2.03511555989583e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 1.71770404775917e-11 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 3.0523681640625e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 2.82505653301833e-11 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 4.06962076822917e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 1.71770404775917e-11 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 5, tcur = 5.08687337239583e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 2.82505653301833e-11 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 6, tcur = 3.0523681640625e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 7, tcur = 4.06962076822917e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 8, tcur = 5.08687337239583e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 9, tcur = 6.1041259765625e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-compute-embedding] status = success -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0.0553676190266225 - 2.825056533018332e-11 4.237584763367401e-11 1.412528230349069e-11 -[INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 3, tn = 2.82505653301833e-11, h = 5.22965581530996e-11 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 0, tcur = 2.82505653301833e-11 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 + 6.104125976562500e-08 6.104125976562493e-08 0.000000000000000e+00 +[INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 3, tn = 6.1041259765625e-08, h = 1.220703125e-06 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 0, tcur = 6.1041259765625e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 2.64491780598958e-07 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 4.67942301432292e-07 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 6.71392822265625e-07 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 8.74843343098958e-07 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 5.43988444067331e-11 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 5, tcur = 1.07829386393229e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 5.43988444067331e-11 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 6, tcur = 6.71392822265625e-07 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 8.05471234832829e-11 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 7, tcur = 8.74843343098958e-07 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 5.43988444067331e-11 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 8, tcur = 1.07829386393229e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 8.05471234832829e-11 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 9, tcur = 1.28174438476563e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-compute-embedding] status = success -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0.130741338151707 - 8.054712348328291e-11 1.208206824125582e-10 4.027355892927531e-11 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 1.65070663502083e-10 + 1.281744384765625e-06 1.281744384764923e-06 2.117582368135751e-22 --------------------------------------------------------------------- -Current time = 8.05471234832829e-11 +Current time = 1.28174438476563e-06 Steps = 3 Step attempts = 3 Stability limited steps = 0 @@ -63,8 +87,8 @@ Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 Initial step size = 6.103515625e-12 -Last step size = 5.22965581530996e-11 -Current step size = 9.27352060660382e-11 -RHS fn evals = 17 -Number of stages used = 4 +Last step size = 1.220703125e-06 +Current step size = 2.44140625e-05 +RHS fn evals = 29 +Number of stages used = 9 End LSRKStep Logging test diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_3.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_3.out index 7ac3c5f7f9..c4c77f2721 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_3.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_3.out @@ -5,65 +5,89 @@ Start LSRKStep Logging test [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 1, tn = 0, h = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 0, tcur = 0 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 3.0517578125e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 1.01725260416667e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 3.0517578125e-12 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 6.103515625e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 2.03450520833333e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 3.0517578125e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 6.103515625e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 4.06901041666667e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 5, tcur = 5.08626302083333e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 6, tcur = 3.0517578125e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 7, tcur = 4.06901041666667e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 8, tcur = 5.08626302083333e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 9, tcur = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-compute-embedding] status = success -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 2.46078330057592e-11 -[DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 2.21470497051833e-11 -[DEBUG][rank 0][arkAdapt][new-step-eta] eta = 3.62857262369723 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0.0152587890625 - 6.103515625000001e-12 9.155273419059814e-12 3.051757794059814e-12 -[INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 6.103515625e-12, h = 2.21470497051833e-11 +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = inf +[DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 6.103515625e-08 +[DEBUG][rank 0][arkAdapt][new-step-eta] eta = 10000 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 + 6.103515625000001e-12 6.103515625000001e-12 0.000000000000000e+00 +[INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 6.103515625e-12, h = 6.103515625e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 0, tcur = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 1.71770404775917e-11 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 1.01786295572917e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 2.03511555989583e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 1.71770404775917e-11 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 3.0523681640625e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 2.82505653301833e-11 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 4.06962076822917e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 1.71770404775917e-11 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 5, tcur = 5.08687337239583e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 2.82505653301833e-11 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 6, tcur = 3.0523681640625e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 7, tcur = 4.06962076822917e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 8, tcur = 5.08687337239583e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 9, tcur = 6.1041259765625e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-compute-embedding] status = success -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 5.81072868367773e-11 -[DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 5.22965581530996e-11 -[DEBUG][rank 0][arkAdapt][new-step-eta] eta = 2.36133294724399 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0.0553676190266225 - 2.825056533018332e-11 4.237584763367401e-11 1.412528230349069e-11 -[INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 3, tn = 2.82505653301833e-11, h = 5.22965581530996e-11 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 0, tcur = 2.82505653301833e-11 +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = inf +[DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 1.220703125e-06 +[DEBUG][rank 0][arkAdapt][new-step-eta] eta = 20 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 + 6.104125976562500e-08 6.104125976562493e-08 0.000000000000000e+00 +[INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 3, tn = 6.1041259765625e-08, h = 1.220703125e-06 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 0, tcur = 6.1041259765625e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 2.64491780598958e-07 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 4.67942301432292e-07 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 6.71392822265625e-07 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 8.74843343098958e-07 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 5.43988444067331e-11 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 5, tcur = 1.07829386393229e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 5.43988444067331e-11 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 6, tcur = 6.71392822265625e-07 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 8.05471234832829e-11 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 7, tcur = 8.74843343098958e-07 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 5.43988444067331e-11 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 8, tcur = 1.07829386393229e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 8.05471234832829e-11 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 9, tcur = 1.28174438476563e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-compute-embedding] status = success -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 1.03039117851154e-10 -[DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 9.27352060660382e-11 -[DEBUG][rank 0][arkAdapt][new-step-eta] eta = 1.77325639279268 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0.130741338151707 - 8.054712348328291e-11 1.208206824125582e-10 4.027355892927531e-11 +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.00222529072291584 +[DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 2.44140625e-05 +[DEBUG][rank 0][arkAdapt][new-step-eta] eta = 20 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 1.65070663502083e-10 + 1.281744384765625e-06 1.281744384764923e-06 2.117582368135751e-22 --------------------------------------------------------------------- -Current time = 8.05471234832829e-11 +Current time = 1.28174438476563e-06 Steps = 3 Step attempts = 3 Stability limited steps = 0 @@ -72,8 +96,8 @@ Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 Initial step size = 6.103515625e-12 -Last step size = 5.22965581530996e-11 -Current step size = 9.27352060660382e-11 -RHS fn evals = 17 -Number of stages used = 4 +Last step size = 1.220703125e-06 +Current step size = 2.44140625e-05 +RHS fn evals = 29 +Number of stages used = 9 End LSRKStep Logging test diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_3.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_3.out index 073df00a11..3b709c4c43 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_3.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_3.out @@ -9,109 +9,157 @@ Start LSRKStep Logging test [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_0(:) = 1.000000000000000e+00 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 3.0517578125e-12 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_0(:) = - 9.999999969787597e-01 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 3.0517578125e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 1.01725260416667e-12 [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_1(:) = - 9.999999969787597e-01 + 1.000000000000000e+00 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 6.103515625e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 2.03450520833333e-12 [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_2(:) = - 9.999999969787597e-01 + 1.000000000000000e+00 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 3.0517578125e-12 [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_3(:) = - 9.999999969787597e-01 + 1.000000000000000e+00 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 4.06901041666667e-12 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_4(:) = + 1.000000000000000e+00 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 5, tcur = 5.08626302083333e-12 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_5(:) = + 1.000000000000000e+00 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 6, tcur = 3.0517578125e-12 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_6(:) = + 1.000000000000000e+00 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 7, tcur = 4.06901041666667e-12 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_7(:) = + 1.000000000000000e+00 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 8, tcur = 5.08626302083333e-12 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_8(:) = + 1.000000000000000e+00 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 6.103515625e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 9, tcur = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][updated solution] ycur(:) = - 9.155273419059814e-12 + 6.103515625000001e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][embedded solution] y_embedded(:) = - 7.629394512809814e-12 + 6.103515625000001e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-compute-embedding] status = success -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 2.46078330057592e-11 -[DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 2.21470497051833e-11 -[DEBUG][rank 0][arkAdapt][new-step-eta] eta = 3.62857262369723 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0.0152587890625 - 6.103515625000001e-12 9.155273419059814e-12 3.051757794059814e-12 -[INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 6.103515625e-12, h = 2.21470497051833e-11 +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = inf +[DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 6.103515625e-08 +[DEBUG][rank 0][arkAdapt][new-step-eta] eta = 10000 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 + 6.103515625000001e-12 6.103515625000001e-12 0.000000000000000e+00 +[INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 6.103515625e-12, h = 6.103515625e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 0, tcur = 6.103515625e-12 [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage] z_0(:) = - 9.155273419059814e-12 + 6.103515625000001e-12 [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_0(:) = - 9.999999969787597e-01 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 1.71770404775917e-11 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_0(:) = - 9.999999860159702e-01 + 1.000000000000000e+00 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 1.71770404775917e-11 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 1.01786295572917e-08 [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_1(:) = - 9.999999860159704e-01 + 1.000000000000000e+00 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 2.82505653301833e-11 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 2.03511555989583e-08 [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_2(:) = - 9.999999860159705e-01 + 9.999999999999996e-01 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 1.71770404775917e-11 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 3.0523681640625e-08 [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_3(:) = - 9.999999860159704e-01 + 9.999999999999991e-01 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 4.06962076822917e-08 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_4(:) = + 9.999999999999984e-01 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 5, tcur = 5.08687337239583e-08 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_5(:) = + 9.999999999999973e-01 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 6, tcur = 3.0523681640625e-08 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_6(:) = + 9.999999999999991e-01 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 7, tcur = 4.06962076822917e-08 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_7(:) = + 9.999999999999984e-01 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 8, tcur = 5.08687337239583e-08 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_8(:) = + 9.999999999999973e-01 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 2.82505653301833e-11 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 9, tcur = 6.1041259765625e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][updated solution] ycur(:) = - 4.237584763367401e-11 + 6.104125976562493e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][embedded solution] y_embedded(:) = - 3.683908522410607e-11 + 6.104125976562493e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-compute-embedding] status = success -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 5.81072868367773e-11 -[DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 5.22965581530996e-11 -[DEBUG][rank 0][arkAdapt][new-step-eta] eta = 2.36133294724399 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0.0553676190266225 - 2.825056533018332e-11 4.237584763367401e-11 1.412528230349069e-11 -[INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 3, tn = 2.82505653301833e-11, h = 5.22965581530996e-11 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 0, tcur = 2.82505653301833e-11 +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = inf +[DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 1.220703125e-06 +[DEBUG][rank 0][arkAdapt][new-step-eta] eta = 20 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 + 6.104125976562500e-08 6.104125976562493e-08 0.000000000000000e+00 +[INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 3, tn = 6.1041259765625e-08, h = 1.220703125e-06 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 0, tcur = 6.1041259765625e-08 [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage] z_0(:) = - 4.237584763367401e-11 + 6.104125976562493e-08 [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_0(:) = - 9.999999860159705e-01 + 9.999999999999962e-01 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 5.43988444067331e-11 -[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_0(:) = - 9.999999601291746e-01 -[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 5.43988444067331e-11 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 1, tcur = 2.64491780598958e-07 [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_1(:) = - 9.999999601291756e-01 + 9.999999999999301e-01 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 8.05471234832829e-11 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 2, tcur = 4.67942301432292e-07 [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_2(:) = - 9.999999601291767e-01 + 9.999999999997811e-01 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 5.43988444067331e-11 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 3, tcur = 6.71392822265625e-07 [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_3(:) = - 9.999999601291756e-01 + 9.999999999995492e-01 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 8.74843343098958e-07 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_4(:) = + 9.999999999992345e-01 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 5, tcur = 1.07829386393229e-06 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_5(:) = + 9.999999999988373e-01 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 6, tcur = 6.71392822265625e-07 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_6(:) = + 9.999999999995494e-01 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 7, tcur = 8.74843343098958e-07 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_7(:) = + 9.999999999992347e-01 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 8, tcur = 1.07829386393229e-06 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs3][stage RHS] F_8(:) = + 9.999999999988374e-01 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 4, tcur = 8.05471234832829e-11 +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 9, tcur = 1.28174438476563e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][updated solution] ycur(:) = - 1.208206824125582e-10 + 1.281744384764923e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][embedded solution] y_embedded(:) = - 1.077465430571125e-10 + 1.281744384764940e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-compute-embedding] status = success -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 1.03039117851154e-10 -[DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 9.27352060660382e-11 -[DEBUG][rank 0][arkAdapt][new-step-eta] eta = 1.77325639279268 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0.130741338151707 - 8.054712348328291e-11 1.208206824125582e-10 4.027355892927531e-11 +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.00222529072291584 +[DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 2.44140625e-05 +[DEBUG][rank 0][arkAdapt][new-step-eta] eta = 20 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 1.65070663502083e-10 + 1.281744384765625e-06 1.281744384764923e-06 2.117582368135751e-22 --------------------------------------------------------------------- -Current time = 8.05471234832829e-11 +Current time = 1.28174438476563e-06 Steps = 3 Step attempts = 3 Stability limited steps = 0 @@ -120,8 +168,8 @@ Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 Initial step size = 6.103515625e-12 -Last step size = 5.22965581530996e-11 -Current step size = 9.27352060660382e-11 -RHS fn evals = 17 -Number of stages used = 4 +Last step size = 1.220703125e-06 +Current step size = 2.44140625e-05 +RHS fn evals = 29 +Number of stages used = 9 End LSRKStep Logging test From 66a3ead60b5b615d13445a0cca73ba23cd2bb63a Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 12 Feb 2026 17:29:30 -0500 Subject: [PATCH 114/298] Updated answers submodule commit --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index 121d849a17..f01ace5a85 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 121d849a17fcef1f56600ed019512d5649d3ebe1 +Subproject commit f01ace5a85f67823f7cc1d91a22bd1c6e75aaeef From 657e712eaa1b99699c9d3a502e8cc62741bcd878 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 12 Feb 2026 22:20:12 -0500 Subject: [PATCH 115/298] Added algorithm flow for step and stage processing functions --- .../guide/source/Usage/User_callable.rst | 344 ++++++++++++------ 1 file changed, 227 insertions(+), 117 deletions(-) diff --git a/doc/arkode/guide/source/Usage/User_callable.rst b/doc/arkode/guide/source/Usage/User_callable.rst index 69c6dbc308..95ab297a93 100644 --- a/doc/arkode/guide/source/Usage/User_callable.rst +++ b/doc/arkode/guide/source/Usage/User_callable.rst @@ -912,11 +912,6 @@ Set max number of constraint failures :c:func:`ARKodeSetMaxNumConst Set the checkpointing scheme to use (for adjoint) :c:func:`ARKodeSetAdjointCheckpointScheme` ``NULL`` Set the checkpointing step index (for adjoint) :c:func:`ARKodeSetAdjointCheckpointIndex` 0 Use compensated summation for accumulating time :c:func:`ARKodeSetUseCompensatedSums` ``SUNFALSE`` -Set time step preprocessing function :c:func:`ARKodeSetPreprocessStepFn` ``NULL`` -Set time step postprocessing function :c:func:`ARKodeSetPostprocessStepFn` ``NULL`` -Set failed time step postrocessing function :c:func:`ARKodeSetPostprocessStepFailFn` ``NULL`` -Set right-hand side preprocessing function :c:func:`ARKodeSetPreprocessRHSFn` ``NULL`` -Set stage postprocessing function. :c:func:`ARKodeSetPostprocessStageFn` ``NULL`` ================================================= ========================================== ======================= @@ -1633,118 +1628,6 @@ Set stage postprocessing function. :c:func:`ARKodeSetPostprocess when using the key "arkid.use_compensated_sums". -.. c:function:: int ARKodeSetPreprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep) - - [ADVANCED] Provides a function to be called before each time step. A ``NULL`` - input function disables step preprocessing. If a user-supplied failed-step postprocessing - function is supplied by calling :c:func:`ARKodeSetPostprocessStepFailFn`, then - preprocessing will not be called on the step attempt that immediately follows a failed step. - - This should **not** adjust the state vector itself. It is designed to allow users to set - up auxiliary data structures that they will use within the time step (e.g., in their - right-hand side function(s)). - - :param arkode_mem: pointer to the ARKODE memory block. - :param ProcessStep: the user-supplied function to call. - - :retval ARK_SUCCESS: the function exited successfully. - :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. - - .. danger:: - - If the supplied function modifies any of the active state data, then all - theoretical guarantees of solution accuracy and stability are lost. - - .. versionadded:: x.y.z - - -.. c:function:: int ARKodeSetPostprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep) - - [ADVANCED] Provides a function to be called following each successful time step. A ``NULL`` - input function disables step postprocessing. - - This should **not** adjust the state vector itself. It is designed to allow users to compute - relevant diagnostic information after each step. - - :param arkode_mem: pointer to the ARKODE memory block. - :param ProcessStep: the user-supplied function to call. - - :retval ARK_SUCCESS: the function exited successfully. - :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. - - .. danger:: - - If the supplied function modifies any of the active state data, then all - theoretical guarantees of solution accuracy and stability are lost. - - -.. c:function:: int ARKodeSetPostprocessStepFailFn(void* arkode_mem, ARKPostProcessFn ProcessStep) - - [ADVANCED] Provides a function to be called following each failed time step. A ``NULL`` - input function disables failed step postprocessing. - - This should **not** adjust the state vector itself. It is designed to allow users to reset - any relevant diagnostic information they may have accumulated within a rejected time step. - - :param arkode_mem: pointer to the ARKODE memory block. - :param ProcessStep: the user-supplied function to call. - - :retval ARK_SUCCESS: the function exited successfully. - :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. - - .. danger:: - - If the supplied function modifies any of the active state data, then all - theoretical guarantees of solution accuracy and stability are lost. - - .. versionadded:: x.y.z - - -.. c:function:: int ARKodeSetPreprocessRHSFn(void* arkode_mem, ARKPostProcessFn ProcessStep) - - [ADVANCED] Provides a function to be called prior to evaluating user-provided right-hand - side (RHS) functions. For partitioned methods (e.g., ARKStep or MRIStep), that will call - multiple RHS functions with identical inputs, this is called only once prior to the first - RHS evaluation. A ``NULL`` input function disables RHS preprocessing. - - This should **not** adjust the state vector itself. It is designed to allow users to set up - auxiliary data structures that will be used within the RHS evaluations (e.g., MPI communication - to fill and send exchange buffers). - - :param arkode_mem: pointer to the ARKODE memory block. - :param ProcessStep: the user-supplied function to call. - - :retval ARK_SUCCESS: the function exited successfully. - :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. - - .. danger:: - - If the supplied function modifies any of the active state data, then all - theoretical guarantees of solution accuracy and stability are lost. - - .. versionadded:: x.y.z - - -.. c:function:: int ARKodeSetPostprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStep) - - [ADVANCED] Provides a function to be called immediately after each stage is completed within - ARKODE's multi-stage methods. A ``NULL`` input function disables stage postprocessing. - - This should **not** adjust the state vector itself. It is designed to allow users to compute - relevant diagnostic information within each step. - - :param arkode_mem: pointer to the ARKODE memory block. - :param ProcessStep: the user-supplied function to call. - - :retval ARK_SUCCESS: the function exited successfully. - :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. - - .. danger:: - - If the supplied function modifies any of the active state data, then all - theoretical guarantees of solution accuracy and stability are lost. - - .. _ARKODE.Usage.ARKodeAdaptivityInputTable: @@ -3607,6 +3490,233 @@ Disable inactive root warnings :c:func:`ARKodeSetNoInactiveRootWarn` e +.. _ARKODE.Usage.ARKodeProcessingInputTable: + +Step and stage processing optional inputs (ADVANCED) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +ARKODE provides multiple options for user-supplied callback routines +that can be called at various times within the time-stepping process. +Each of these callback functions has the same structure, wherein the +callback function will be provided with the current time, current +solution, and the *user_data* structure that was provided to +:c:func:`ARKodeSetUserData`. Specifically, users may provide +separate callback functions for the following events within a time +step: + +* just prior to starting a time step attempt + (:c:func:`ARKodeSetPreprocessStepFn`), + +* at the end of a successful time step, but before overwriting the + "saved" state (:c:func:`ARKodeSetPostprocessStepFn`), + +* at the end of a failed time step (e.g., but before the step is + reattempted (:c:func:`ARKodeSetPostprocessStepFailFn`), + +* just prior to evaluating user-provided right-hand side (RHS) + functions (:c:func:`ARKodeSetPreprocessRHSFn`) + +* immediately after each stage is completed within a time step + (:c:func:`ARKodeSetPostprocessStageFn`) + +For users who wish to perform different actions at individual internal +stages within an ARKODE method, they may obtain the current stage index by +calling :c:func:`ARKodeGetStageIndex` +in their stage-level callback routines provided to +:c:func:`ARKodeSetPreprocessRHSFn` and :c:func:`ARKodeSetPostprocessStageFn`. + +The specific ordering of these functions within a given step depends on +whether each stage is explicit (as in ERKStep) or implicit (as in ARKStep or +MRIStep). Denoting the last "saved" time step as :math:`(t_n,y_n)`, the +time-evolving state within a step as :math:`(t_{cur},y_{cur})`, the functions +provided to the five above functions as ``PreprocessStep``, ``PostprocessStep``, +``PostprocessFailedStep``, ``PreprocessRHS``, and ``PostprocessStage``, and +denoting the IVP right hand side function as ``RHS``, then +the flow of a 3-stage explicit method would proceed as: + +1. Update :math:`(t_{cur},y_{cur}) \gets (t_n,y_n)` +2. Call ``PreprocessStep`` with :math:`(t_{cur},y_{cur})` +3. Stage 0 + a. Call ``PreprocessRHS`` with :math:`(t_{cur},y_{cur})` + b. Evaluate ``RHS`` at :math:`(t_{cur},y_{cur})` + c. Update :math:`(t_{cur},y_{cur})` with the next stage solution + d. Call ``PostprocessStage`` with :math:`(t_{cur},y_{cur})` +4. Stage 1 + a. Call ``PreprocessRHS`` with :math:`(t_{cur},y_{cur})` + b. Evaluate ``RHS`` at :math:`(t_{cur},y_{cur})` + c. Update :math:`(t_{cur},y_{cur})` with the next stage solution + d. Call ``PostprocessStage`` with :math:`(t_{cur},y_{cur})` +5. Stage 2 + a. Call ``PreprocessRHS`` with :math:`(t_{cur},y_{cur})` + b. Evaluate ``RHS`` at :math:`(t_{cur},y_{cur})` + c. Update :math:`(t_{cur},y_{cur})` with the new time step solution + d. Call ``PostprocessStage`` with :math:`(t_{cur},y_{cur})` +6. Check the local error. + a. If the step is successful then call ``PostProcessStep`` with :math:`(t_{cur},y_{cur})`, determine the next internal step size :math:`h_n`, and update :math:`(t_n,y_n) \gets (t_{cur},y_{cur})` + b. Else call ``PostProcessFailedStep`` with :math:`(t_{cur},y_{cur})`, determine the next internal step size :math:`h_n`, and return to step 3. + + +Alternately, the flow of a 3-stage method that must perform a solve of some sort for each stage (i.e., a DIRK or ARK method in ARKStep, or a multirate method with MRIstep) would proceed as follows. Here, we show the implicit-explicit approach since that also shows the relationship between both the implicit right-hand side function ``RHS_i`` and the explicit right-hand side function ``RHS_e``: + +1. Update :math:`(t_{cur},y_{cur}) \gets (t_n,y_n)` +2. Call ``PreprocessStep`` with :math:`(t_{cur},y_{cur})` +3. Stage 0 + a. Solve implicit system, calling ``PreprocessRHS`` and then ``RHS_i`` with :math:`(t_{cur},y_{cur})` at each solver iteration; at the end of this iteration :math:`(t_{cur},y_{cur})` holds the updated stage solution + b. Call ``PostprocessStage`` with :math:`(t_{cur},y_{cur})` + c. Call ``PreprocessRHS`` with :math:`(t_{cur},y_{cur})` + d. Evaluate ``RHS_i`` and then ``RHS_e`` at :math:`(t_{cur},y_{cur})` +4. Stage 1 + a. Solve implicit system, calling ``PreprocessRHS`` and then ``RHS_i`` with :math:`(t_{cur},y_{cur})` at each solver iteration; at the end of this iteration :math:`(t_{cur},y_{cur})` holds the updated stage solution + b. Call ``PostprocessStage`` with :math:`(t_{cur},y_{cur})` + c. Call ``PreprocessRHS`` with :math:`(t_{cur},y_{cur})` + d. Evaluate ``RHS_i`` and then ``RHS_e`` at :math:`(t_{cur},y_{cur})` +5. Stage 2 + a. Solve implicit system, calling ``PreprocessRHS`` and then ``RHS_i`` with :math:`(t_{cur},y_{cur})` at each solver iteration; at the end of this iteration :math:`(t_{cur},y_{cur})` holds the updated stage solution + b. Call ``PostprocessStage`` with :math:`(t_{cur},y_{cur})` + c. Call ``PreprocessRHS`` with :math:`(t_{cur},y_{cur})` + d. Evaluate ``RHS_i`` and then ``RHS_e`` at :math:`(t_{cur},y_{cur})` +6. Update :math:`(t_{cur},y_{cur})` with the new time step solution +7. Call ``PostprocessStage`` with :math:`(t_{cur},y_{cur})` +8. Check the local error. + a. If the step is successful then call ``PostProcessStep`` with :math:`(t_{cur},y_{cur})`, determine the next internal step size :math:`h_n`, and update :math:`(t_n,y_n) \gets (t_{cur},y_{cur})` + b. Else call ``PostProcessFailedStep`` with :math:`(t_{cur},y_{cur})`, determine the next internal step size :math:`h_n`, and return to step 3. + +We consider these as "advanced" because of their danger, although the +callback functions are provided with the internally-evolving state, +users should **not** adjust entries of this state vector, since doing +so will destroy all theoretical guarantees of solution accuracy and +numerical stability. + + +.. cssclass:: table-bordered + +================================================= ========================================== ======================= +Optional input Function name Default +================================================= ========================================== ======================= +Set time step preprocessing function :c:func:`ARKodeSetPreprocessStepFn` ``NULL`` +Set time step postprocessing function :c:func:`ARKodeSetPostprocessStepFn` ``NULL`` +Set failed time step postrocessing function :c:func:`ARKodeSetPostprocessStepFailFn` ``NULL`` +Set right-hand side preprocessing function :c:func:`ARKodeSetPreprocessRHSFn` ``NULL`` +Set stage postprocessing function. :c:func:`ARKodeSetPostprocessStageFn` ``NULL`` +================================================= ========================================== ======================= + + + +.. c:function:: int ARKodeSetPreprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep) + + [ADVANCED] Provides a function to be called before each time step. A ``NULL`` + input function disables step preprocessing. If a user-supplied failed-step postprocessing + function is supplied by calling :c:func:`ARKodeSetPostprocessStepFailFn`, then + preprocessing will not be called on the step attempt that immediately follows a failed step. + + This should **not** adjust the state vector itself. It is designed to allow users to set + up auxiliary data structures that they will use within the time step (e.g., in their + right-hand side function(s)). + + :param arkode_mem: pointer to the ARKODE memory block. + :param ProcessStep: the user-supplied function to call. + + :retval ARK_SUCCESS: the function exited successfully. + :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. + + .. danger:: + + If the supplied function modifies any of the active state data, then all + theoretical guarantees of solution accuracy and stability are lost. + + .. versionadded:: x.y.z + + +.. c:function:: int ARKodeSetPostprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep) + + [ADVANCED] Provides a function to be called following each successful time step. A ``NULL`` + input function disables step postprocessing. + + This should **not** adjust the state vector itself. It is designed to allow users to compute + relevant diagnostic information after each step. + + :param arkode_mem: pointer to the ARKODE memory block. + :param ProcessStep: the user-supplied function to call. + + :retval ARK_SUCCESS: the function exited successfully. + :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. + + .. danger:: + + If the supplied function modifies any of the active state data, then all + theoretical guarantees of solution accuracy and stability are lost. + + +.. c:function:: int ARKodeSetPostprocessStepFailFn(void* arkode_mem, ARKPostProcessFn ProcessStep) + + [ADVANCED] Provides a function to be called following each failed time step. A ``NULL`` + input function disables failed step postprocessing. + + This should **not** adjust the state vector itself. It is designed to allow users to reset + any relevant diagnostic information they may have accumulated within a rejected time step. + + :param arkode_mem: pointer to the ARKODE memory block. + :param ProcessStep: the user-supplied function to call. + + :retval ARK_SUCCESS: the function exited successfully. + :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. + + .. danger:: + + If the supplied function modifies any of the active state data, then all + theoretical guarantees of solution accuracy and stability are lost. + + .. versionadded:: x.y.z + + +.. c:function:: int ARKodeSetPreprocessRHSFn(void* arkode_mem, ARKPostProcessFn ProcessStep) + + [ADVANCED] Provides a function to be called prior to evaluating user-provided right-hand + side (RHS) functions. For partitioned methods (e.g., ARKStep or MRIStep), that will call + multiple RHS functions with identical inputs, this is called only once prior to the first + RHS evaluation. A ``NULL`` input function disables RHS preprocessing. + + This should **not** adjust the state vector itself. It is designed to allow users to set up + auxiliary data structures that will be used within the RHS evaluations (e.g., MPI communication + to fill and send exchange buffers). + + :param arkode_mem: pointer to the ARKODE memory block. + :param ProcessStep: the user-supplied function to call. + + :retval ARK_SUCCESS: the function exited successfully. + :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. + + .. danger:: + + If the supplied function modifies any of the active state data, then all + theoretical guarantees of solution accuracy and stability are lost. + + .. versionadded:: x.y.z + + +.. c:function:: int ARKodeSetPostprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStep) + + [ADVANCED] Provides a function to be called immediately after each stage is completed within + ARKODE's multi-stage methods. A ``NULL`` input function disables stage postprocessing. + + This should **not** adjust the state vector itself. It is designed to allow users to compute + relevant diagnostic information within each step. + + :param arkode_mem: pointer to the ARKODE memory block. + :param ProcessStep: the user-supplied function to call. + + :retval ARK_SUCCESS: the function exited successfully. + :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. + + .. danger:: + + If the supplied function modifies any of the active state data, then all + theoretical guarantees of solution accuracy and stability are lost. + + + + + .. _ARKODE.Usage.InterpolatedOutput: Interpolated output function From 8d5a64e1e7863f00ec51a2f15183835b244fb407 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 16 Feb 2026 10:56:02 -0500 Subject: [PATCH 116/298] Fixed logging output for Jenkins --- .../logging/test_logging_arkode_lsrkstep_lvl3_5.out | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_5.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_5.out index e5b1511541..7b7c12a589 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_5.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_5.out @@ -13,7 +13,7 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 4, tcur = 4.06901041666667e-12 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 5, tcur = 5.08626302083333e-12 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 5, tcur = 2.03450520833333e-12 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 2.03450520833333e-12 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success @@ -38,7 +38,7 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 4, tcur = 4.06962076822917e-08 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 5, tcur = 5.08687337239583e-08 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 5, tcur = 2.03511555989583e-08 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 2.03511555989583e-08 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success @@ -63,7 +63,7 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 4, tcur = 8.74843343098958e-07 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 5, tcur = 1.07829386393229e-06 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 5, tcur = 4.67942301432292e-07 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 4.67942301432292e-07 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success From 29552d15c5d4d79e2f6406db516278b6f601453d Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 23 Feb 2026 13:14:52 -0500 Subject: [PATCH 117/298] Fixed comment --- include/arkode/arkode.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/arkode/arkode.h b/include/arkode/arkode.h index 0c38d451c9..7c3abfbc30 100644 --- a/include/arkode/arkode.h +++ b/include/arkode/arkode.h @@ -124,8 +124,7 @@ extern "C" { #define ARK_INNERTOOUTER_FAIL -36 /* ARK_POSTPROCESS_FAIL equals ARK_POSTPROCESS_STEP_FAIL - for backwards compatibility. Note that we use these - same constants for step and stage preprocessing errors */ + for backwards compatibility. */ #define ARK_POSTPROCESS_FAIL -37 #define ARK_POSTPROCESS_STEP_FAIL -37 #define ARK_POSTPROCESS_STAGE_FAIL -38 From e1768ab47d5a14920c2d148b295203d64b411795 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 23 Feb 2026 13:17:29 -0500 Subject: [PATCH 118/298] Added requested comment to changelog --- CHANGELOG.md | 3 +++ doc/shared/RecentChanges.rst | 3 +++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c05fc2a7c..14bd6738b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,9 @@ solution accuracy and stability will be lost. Fixed a CMake bug where the SuperLU_MT interface would not be built and installed without setting the `SUPERLUMT_WORKS` option to `TRUE`. +Fixed a bug in logging output from ARKODE, where for some time stepping modules, the +the current "time" output in the logger was incorrect. + ### Deprecation Notices ## Changes to SUNDIALS in release 7.6.0 diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index fcb7a3145c..342b9460fd 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -20,4 +20,7 @@ will be lost. Fixed a CMake bug where the SuperLU_MT interface would not be built and installed without setting the ``SUPERLUMT_WORKS`` option to ``TRUE``. +Fixed a bug in logging output from ARKODE, where for some time stepping modules, the +the current "time" output in the logger was incorrect. + **Deprecation Notices** From 37eacc6b5c45991bb16030aa42b3eedc6ba292b0 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 23 Feb 2026 16:32:47 -0500 Subject: [PATCH 119/298] Updated process for resetting (tcur,ycur) in time-stepping loop --- src/arkode/arkode.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 7156bc2d32..b4d936e1d1 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -742,6 +742,10 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, } } + /* fill (tcur,ycur) with current stored solution */ + ark_mem->tcur = ark_mem->tn; + N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + /*-------------------------------------------------- Looping point for successful internal steps @@ -906,9 +910,8 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, "step = %li, tn = " SUN_FORMAT_G ", h = " SUN_FORMAT_G, ark_mem->nst + 1, ark_mem->tn, ark_mem->h); - /* fill (tcur,ycur) with the last accepted step solution */ + /* fill tcur with the last accepted step time */ ark_mem->tcur = ark_mem->tn; - N_VScale(ONE, ark_mem->yn, ark_mem->ycur); /* call the user-supplied step preprocessing function (if it exists) */ if (ark_mem->PreProcessStep != NULL && !skip_preprocess) @@ -1026,6 +1029,10 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, skip_preprocess = SUNTRUE; } + /* reset (tcur,ycur) to last saved state before reattempting step */ + ark_mem->tcur = ark_mem->tn; + N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + } /* end looping for step attempts */ /* If step attempt loop succeeded, complete step (update current time, solution, From 046ff5e538106215265c96aac22df60d18eec062 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 23 Feb 2026 16:43:44 -0500 Subject: [PATCH 120/298] Applied suggestions from PR review --- src/arkode/arkode_io.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index 83b12102cd..96fdb2bd3a 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -1599,6 +1599,7 @@ int ARKodeSetPostprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStage) /* NULL argument sets default, otherwise set inputs */ ark_mem->PostProcessStage = ProcessStage; + ark_mem->ps_data = ark_mem->user_data; return (ARK_SUCCESS); } @@ -1632,6 +1633,7 @@ int ARKodeSetPreprocessRHSFn(void* arkode_mem, ARKPostProcessFn PreprocessRHS) /* NULL argument sets default, otherwise set inputs */ ark_mem->PreProcessRHS = PreprocessRHS; + ark_mem->ps_data = ark_mem->user_data; return (ARK_SUCCESS); } From 22f573e78ce2a2a9bb6a5e6f192e428c76c2108a Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 23 Feb 2026 16:44:29 -0500 Subject: [PATCH 121/298] Applied suggestions from PR review --- src/arkode/arkode_arkstep.c | 2 +- src/arkode/arkode_erkstep.c | 2 +- src/arkode/arkode_lsrkstep.c | 52 ++++++++++++++++++------------------ src/arkode/arkode_mristep.c | 8 +++--- src/arkode/arkode_sprkstep.c | 4 +-- 5 files changed, 35 insertions(+), 33 deletions(-) diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index 7267237352..061df13fbe 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -2108,7 +2108,7 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess rhs, retval = %i", retval); return (ARK_PREPROCESS_RHS_FAIL); } } diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index 533fd60679..f1e37d9353 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -899,7 +899,7 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess RHS, retval = %i", retval); return (ARK_PREPROCESS_RHS_FAIL); } } diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 14ebc84868..0b7d4e0698 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -637,7 +637,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess rhs, retval = %i", retval); return ARK_PREPROCESS_RHS_FAIL; } } @@ -726,7 +726,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess rhs, retval = %i", retval); return ARK_PREPROCESS_RHS_FAIL; } } @@ -822,8 +822,8 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) ark_mem->user_data); if (retval != 0) { - SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + SUNLogInfo(ARK_LOGGER, "end-compute-embedding", + "status = failed preprocess rhs, retval = %i", retval); return ARK_PREPROCESS_RHS_FAIL; } } @@ -868,8 +868,8 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) ark_mem->user_data); if (retval != 0) { - SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + SUNLogInfo(ARK_LOGGER, "end-compute-embedding", + "status = failed preprocess rhs, retval = %i", retval); return ARK_PREPROCESS_RHS_FAIL; } } @@ -1006,7 +1006,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess rhs, retval = %i", retval); return ARK_PREPROCESS_RHS_FAIL; } } @@ -1077,7 +1077,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess rhs, retval = %i", retval); return ARK_PREPROCESS_RHS_FAIL; } } @@ -1159,8 +1159,8 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) ark_mem->user_data); if (retval != 0) { - SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + SUNLogInfo(ARK_LOGGER, "end-compute-embedding", + "status = failed preprocess rhs, retval = %i", retval); return ARK_PREPROCESS_RHS_FAIL; } } @@ -1278,7 +1278,7 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess rhs, retval = %i", retval); return ARK_PREPROCESS_RHS_FAIL; } } @@ -1333,7 +1333,7 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess rhs, retval = %i", retval); return ARK_PREPROCESS_RHS_FAIL; } } @@ -1387,7 +1387,7 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess rhs, retval = %i", retval); return ARK_PREPROCESS_RHS_FAIL; } } @@ -1515,7 +1515,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess rhs, retval = %i", retval); return ARK_PREPROCESS_RHS_FAIL; } } @@ -1569,7 +1569,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess rhs, retval = %i", retval); return ARK_PREPROCESS_RHS_FAIL; } } @@ -1627,7 +1627,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess rhs, retval = %i", retval); return ARK_PREPROCESS_RHS_FAIL; } } @@ -1682,7 +1682,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess rhs, retval = %i", retval); return ARK_PREPROCESS_RHS_FAIL; } } @@ -1752,7 +1752,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess rhs, retval = %i", retval); return ARK_PREPROCESS_RHS_FAIL; } } @@ -1876,7 +1876,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess rhs, retval = %i", retval); return ARK_PREPROCESS_RHS_FAIL; } } @@ -1926,7 +1926,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess rhs, retval = %i", retval); return ARK_PREPROCESS_RHS_FAIL; } } @@ -1975,7 +1975,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess rhs, retval = %i", retval); return ARK_PREPROCESS_RHS_FAIL; } } @@ -2037,7 +2037,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess rhs, retval = %i", retval); return ARK_PREPROCESS_RHS_FAIL; } } @@ -2146,7 +2146,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess rhs, retval = %i", retval); return ARK_PREPROCESS_RHS_FAIL; } } @@ -2204,7 +2204,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess rhs, retval = %i", retval); return ARK_PREPROCESS_RHS_FAIL; } } @@ -2295,7 +2295,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess rhs, retval = %i", retval); return ARK_PREPROCESS_RHS_FAIL; } } @@ -2354,7 +2354,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess rhs, retval = %i", retval); return ARK_PREPROCESS_RHS_FAIL; } } diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 7c56e6378f..e71325f50e 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -2031,7 +2031,7 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess rhs, retval = %i", retval); return (ARK_PREPROCESS_RHS_FAIL); } } @@ -2691,7 +2691,7 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess rhs, retval = %i", retval); return (ARK_PREPROCESS_RHS_FAIL); } } @@ -3100,7 +3100,9 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess rhs, retval = %i", retval); + SUNLogInfo(ARK_LOGGER, "end-groups-list", + "status = failed stage computation, retval = %i", retval); return (ARK_PREPROCESS_RHS_FAIL); } } diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index de59b53c86..eac7febf4b 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -581,7 +581,7 @@ int sprkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess rhs, retval = %i", retval); return (ARK_PREPROCESS_RHS_FAIL); } } @@ -624,7 +624,7 @@ int sprkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); + "status = failed preprocess rhs, retval = %i", retval); return (ARK_PREPROCESS_RHS_FAIL); } } From 801f0f3c547e33559ae4765259297cffb29713ef Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 26 Feb 2026 10:21:50 -0500 Subject: [PATCH 122/298] Renamed PreProcessRHS to PreRHSProcess to clarify what is being processed --- .../guide/source/Usage/User_callable.rst | 14 ++- .../guide/source/Usage/User_supplied.rst | 5 +- src/arkode/arkode.c | 4 +- src/arkode/arkode_arkstep.c | 26 ++-- src/arkode/arkode_arkstep_nls.c | 40 +++---- src/arkode/arkode_bandpre.c | 4 +- src/arkode/arkode_erkstep.c | 16 +-- src/arkode/arkode_impl.h | 2 +- src/arkode/arkode_io.c | 8 +- src/arkode/arkode_ls.c | 12 +- src/arkode/arkode_lsrkstep.c | 112 +++++++++--------- src/arkode/arkode_mristep.c | 28 ++--- src/arkode/arkode_mristep_nls.c | 8 +- src/arkode/arkode_sprkstep.c | 14 +-- 14 files changed, 151 insertions(+), 142 deletions(-) diff --git a/doc/arkode/guide/source/Usage/User_callable.rst b/doc/arkode/guide/source/Usage/User_callable.rst index f5908a00d1..fcd90383c1 100644 --- a/doc/arkode/guide/source/Usage/User_callable.rst +++ b/doc/arkode/guide/source/Usage/User_callable.rst @@ -915,7 +915,7 @@ Use compensated summation for accumulating time :c:func:`ARKodeSetUseCompensa Set time step preprocessing function :c:func:`ARKodeSetPreprocessStepFn` ``NULL`` Set time step postprocessing function :c:func:`ARKodeSetPostprocessStepFn` ``NULL`` Set failed time step postrocessing function :c:func:`ARKodeSetPostprocessStepFailFn` ``NULL`` -Set right-hand side preprocessing function :c:func:`ARKodeSetPreprocessRHSFn` ``NULL`` +Set pre right-hand side processing function :c:func:`ARKodeSetPreRHSProcessFn` ``NULL`` Set stage postprocessing function. :c:func:`ARKodeSetPostprocessStageFn` ``NULL`` ================================================= ========================================== ======================= @@ -1681,7 +1681,9 @@ Set stage postprocessing function. :c:func:`ARKodeSetPostprocess .. c:function:: int ARKodeSetPostprocessStepFailFn(void* arkode_mem, ARKPostProcessFn ProcessStep) [ADVANCED] Provides a function to be called following each failed time step. A ``NULL`` - input function disables failed step postprocessing. + input function disables failed step postprocessing. The ``ProcessStep`` function will be called + with the :math:`(t,y)` that corresponds with the saved state to be used as the initial condition + for the upcoming step attempt. This should **not** adjust the state vector itself. It is designed to allow users to reset any relevant diagnostic information they may have accumulated within a rejected time step. @@ -1700,7 +1702,7 @@ Set stage postprocessing function. :c:func:`ARKodeSetPostprocess .. versionadded:: x.y.z -.. c:function:: int ARKodeSetPreprocessRHSFn(void* arkode_mem, ARKPostProcessFn ProcessStep) +.. c:function:: int ARKodeSetPreRHSProcessFn(void* arkode_mem, ARKPostProcessFn PreRHSProcess) [ADVANCED] Provides a function to be called prior to evaluating user-provided right-hand side (RHS) functions. For partitioned methods (e.g., ARKStep or MRIStep), that will call @@ -1712,7 +1714,7 @@ Set stage postprocessing function. :c:func:`ARKodeSetPostprocess to fill and send exchange buffers). :param arkode_mem: pointer to the ARKODE memory block. - :param ProcessStep: the user-supplied function to call. + :param PreRHSProcess: the user-supplied function to call. :retval ARK_SUCCESS: the function exited successfully. :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. @@ -1725,7 +1727,7 @@ Set stage postprocessing function. :c:func:`ARKodeSetPostprocess .. versionadded:: x.y.z -.. c:function:: int ARKodeSetPostprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStep) +.. c:function:: int ARKodeSetPostprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStage) [ADVANCED] Provides a function to be called immediately after each stage is completed within ARKODE's multi-stage methods. A ``NULL`` input function disables stage postprocessing. @@ -1734,7 +1736,7 @@ Set stage postprocessing function. :c:func:`ARKodeSetPostprocess relevant diagnostic information within each step. :param arkode_mem: pointer to the ARKODE memory block. - :param ProcessStep: the user-supplied function to call. + :param ProcessStage: the user-supplied function to call. :retval ARK_SUCCESS: the function exited successfully. :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. diff --git a/doc/arkode/guide/source/Usage/User_supplied.rst b/doc/arkode/guide/source/Usage/User_supplied.rst index 10fb384016..28075d430c 100644 --- a/doc/arkode/guide/source/Usage/User_supplied.rst +++ b/doc/arkode/guide/source/Usage/User_supplied.rst @@ -1115,7 +1115,7 @@ The user may supply functions of type :c:type:`ARKPostProcessFn` that will be called before each internal time step (:c:func:`ARKodeSetPreprocessStepFn`), after each successful internal time step (:c:func:`ARKodeSetPostprocessStepFn`), after each failed internal time step (:c:func:`ARKodeSetPostprocessStepFailFn`), before user-supplied -right-hand side function(s) are called on an updated state (:c:func:`ARKodeSetPreprocessRHSFn`), +right-hand side function(s) are called on an updated state (:c:func:`ARKodeSetPreRHSProcessFn`), or after each internal stage is computed (:c:func:`ARKodeSetPostprocessStageFn`). @@ -1132,5 +1132,8 @@ or after each internal stage is computed (:c:func:`ARKodeSetPostprocessStageFn`) .. warning:: + These functions are currently incompatible with discrete adjoint capabilities in ARKODE + (:c:func:`ARKodeSetAdjointCheckpointScheme` and :c:func:`ARKodeSetAdjointCheckpointIndex`). + IF THE SUPPLIED FUNCTION MODIFIES ANY OF THE ACTIVE STATE DATA IN *y*, THEN ALL THEORETICAL GUARANTEES OF SOLUTION ACCURACY AND STABILITY ARE LOST. diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index b4d936e1d1..7f114524af 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -1023,7 +1023,7 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, step failure postprocessing function (if it exists) */ if (ark_mem->PostProcessStepFail != NULL) { - retval = ark_mem->PostProcessStepFail(ark_mem->tcur, ark_mem->ycur, + retval = ark_mem->PostProcessStepFail(ark_mem->tn, ark_mem->yn, ark_mem->ps_data); if (retval != 0) { return (ARK_POSTPROCESS_FAILED_STEP_FAIL); } skip_preprocess = SUNTRUE; @@ -1626,7 +1626,7 @@ ARKodeMem arkCreate(SUNContext sunctx) ark_mem->ps_data = NULL; /* No user-supplied stage pre- or post-processing functions yet */ - ark_mem->PreProcessRHS = NULL; + ark_mem->PreRHSProcess = NULL; ark_mem->PostProcessStage = NULL; /* No user_data pointer yet */ diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index 061df13fbe..c370f55c1f 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1331,9 +1331,9 @@ int arkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (!(ark_mem->fn_is_current)) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); + retval = ark_mem->PreRHSProcess(t, y, ark_mem->user_data); if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } @@ -1463,9 +1463,9 @@ int arkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (recomputeRHS) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); + retval = ark_mem->PreRHSProcess(t, y, ark_mem->user_data); if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } @@ -1579,9 +1579,9 @@ int arkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, case ARK_FULLRHS_OTHER: /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); + retval = ark_mem->PreRHSProcess(t, y, ark_mem->user_data); if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } @@ -1867,11 +1867,15 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) else { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, + retval = ark_mem->PreRHSProcess(ark_mem->tn, ark_mem->yn, ark_mem->user_data); - if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } + if (retval != 0) { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess rhs, retval = %i", retval); + return (ARK_PREPROCESS_RHS_FAIL); + } } retval = step_mem->fi(ark_mem->tn, ark_mem->yn, step_mem->Fi[0], ark_mem->user_data); @@ -2099,11 +2103,11 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* apply user-supplied stage preprocessing function (if supplied) */ /* NOTE: with internally inconsistent IMEX methods (c_i^E != c_i^I) the value of tcur corresponds to the stage time from the implicit table (c_i^I). */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { if ((step_mem->implicit && !deduce_stage) || (step_mem->explicit)) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { diff --git a/src/arkode/arkode_arkstep_nls.c b/src/arkode/arkode_arkstep_nls.c index ac85cc85a0..f6819ef0b7 100644 --- a/src/arkode/arkode_arkstep_nls.c +++ b/src/arkode/arkode_arkstep_nls.c @@ -585,9 +585,9 @@ int arkStep_NlsResidual_MassIdent(N_Vector zcor, N_Vector r, void* arkode_mem) N_VLinearSum(ONE, step_mem->zpred, ONE, zcor, ark_mem->ycur); /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } @@ -638,9 +638,9 @@ int arkStep_NlsResidual_MassIdent_TrivialPredAutonomous(N_Vector zcor, N_Vector else { /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } @@ -712,9 +712,9 @@ int arkStep_NlsResidual_MassFixed(N_Vector zcor, N_Vector r, void* arkode_mem) N_VLinearSum(ONE, step_mem->zpred, ONE, zcor, ark_mem->ycur); /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } @@ -768,9 +768,9 @@ int arkStep_NlsResidual_MassFixed_TrivialPredAutonomous(N_Vector zcor, N_Vector else { /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } @@ -848,9 +848,9 @@ int arkStep_NlsResidual_MassTDep(N_Vector zcor, N_Vector r, void* arkode_mem) if (retval != ARK_SUCCESS) { return (ARK_MASSMULT_FAIL); } /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } @@ -919,9 +919,9 @@ int arkStep_NlsFPFunction_MassIdent(N_Vector zcor, N_Vector g, void* arkode_mem) N_VLinearSum(ONE, step_mem->zpred, ONE, zcor, ark_mem->ycur); /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } @@ -965,9 +965,9 @@ int arkStep_NlsFPFunction_MassIdent_TrivialPredAutonomous(N_Vector zcor, else { /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } @@ -1040,9 +1040,9 @@ int arkStep_NlsFPFunction_MassFixed(N_Vector zcor, N_Vector g, void* arkode_mem) N_VLinearSum(ONE, step_mem->zpred, ONE, zcor, ark_mem->ycur); /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } @@ -1091,9 +1091,9 @@ int arkStep_NlsFPFunction_MassFixed_TrivialPredAutonomous(N_Vector zcor, else { /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } @@ -1167,9 +1167,9 @@ int arkStep_NlsFPFunction_MassTDep(N_Vector zcor, N_Vector g, void* arkode_mem) N_VLinearSum(ONE, step_mem->zpred, ONE, zcor, ark_mem->ycur); /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } diff --git a/src/arkode/arkode_bandpre.c b/src/arkode/arkode_bandpre.c index ea99f9baad..58b248412b 100644 --- a/src/arkode/arkode_bandpre.c +++ b/src/arkode/arkode_bandpre.c @@ -539,9 +539,9 @@ static int ARKBandPDQJac(ARKBandPrecData pdata, sunrealtype t, N_Vector y, } /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(t, ytemp, ark_mem->user_data); + retval = ark_mem->PreRHSProcess(t, ytemp, ark_mem->user_data); if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } } retval = fi(t, ytemp, ftemp, ark_mem->user_data); diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index f1e37d9353..5a3e0bdeb3 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -615,9 +615,9 @@ int erkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (!(ark_mem->fn_is_current)) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); + retval = ark_mem->PreRHSProcess(t, y, ark_mem->user_data); if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } @@ -661,9 +661,9 @@ int erkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (recomputeRHS) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); + retval = ark_mem->PreRHSProcess(t, y, ark_mem->user_data); if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } @@ -698,9 +698,9 @@ int erkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, case ARK_FULLRHS_OTHER: /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); + retval = ark_mem->PreRHSProcess(t, y, ark_mem->user_data); if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } @@ -892,9 +892,9 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { diff --git a/src/arkode/arkode_impl.h b/src/arkode/arkode_impl.h index 1afae4b0a1..9c872ba066 100644 --- a/src/arkode/arkode_impl.h +++ b/src/arkode/arkode_impl.h @@ -574,7 +574,7 @@ struct ARKodeMemRec ARKPostProcessFn PostProcessStage; /* User-supplied RHS function pre-processing function */ - ARKPostProcessFn PreProcessRHS; + ARKPostProcessFn PreRHSProcess; sunbooleantype use_compensated_sums; diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index 96fdb2bd3a..0f37abc632 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -1605,13 +1605,13 @@ int ARKodeSetPostprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStage) } /*--------------------------------------------------------------- - ARKodeSetPreprocessRHSFn: + ARKodeSetPreRHSProcessFn: Specifies user-provided pre-processing function having type ARKPostProcessFn. A NULL input function disables pre-RHS processing. - The "PreprocessRHS" function is called on a state vector + The "PreRHSProcess" function is called on a state vector just prior to computing the RHS. For problems with partitioned RHS functions that are called with identical inputs, this is only called before the first RHS evaluation. @@ -1620,7 +1620,7 @@ int ARKodeSetPostprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStage) THEN ALL THEORETICAL GUARANTEES OF SOLUTION ACCURACY AND STABILITY ARE LOST. ---------------------------------------------------------------*/ -int ARKodeSetPreprocessRHSFn(void* arkode_mem, ARKPostProcessFn PreprocessRHS) +int ARKodeSetPreRHSProcessFn(void* arkode_mem, ARKPostProcessFn PreRHSProcess) { ARKodeMem ark_mem; if (arkode_mem == NULL) @@ -1632,7 +1632,7 @@ int ARKodeSetPreprocessRHSFn(void* arkode_mem, ARKPostProcessFn PreprocessRHS) ark_mem = (ARKodeMem)arkode_mem; /* NULL argument sets default, otherwise set inputs */ - ark_mem->PreProcessRHS = PreprocessRHS; + ark_mem->PreRHSProcess = PreRHSProcess; ark_mem->ps_data = ark_mem->user_data; return (ARK_SUCCESS); diff --git a/src/arkode/arkode_ls.c b/src/arkode/arkode_ls.c index 6232e4c62b..215f727923 100644 --- a/src/arkode/arkode_ls.c +++ b/src/arkode/arkode_ls.c @@ -2696,9 +2696,9 @@ int arkLsDenseDQJac(sunrealtype t, N_Vector y, N_Vector fy, SUNMatrix Jac, y_data[j] += inc; /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); + retval = ark_mem->PreRHSProcess(t, y, ark_mem->user_data); if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } retval = fi(t, y, ftemp, ark_mem->user_data); @@ -2799,9 +2799,9 @@ int arkLsBandDQJac(sunrealtype t, N_Vector y, N_Vector fy, SUNMatrix Jac, } /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(t, ytemp, ark_mem->user_data); + retval = ark_mem->PreRHSProcess(t, ytemp, ark_mem->user_data); if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } retval = fi(t, ytemp, ftemp, ark_mem->user_data); @@ -2871,9 +2871,9 @@ int arkLsDQJtimes(N_Vector v, N_Vector Jv, sunrealtype t, N_Vector y, N_VLinearSum(sig, v, ONE, y, work); /* Set Jv = f(tn, y+sig*v), after calling RHS preprocessing fcn (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(t, work, ark_mem->user_data); + retval = ark_mem->PreRHSProcess(t, work, ark_mem->user_data); if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } retval = arkls_mem->Jt_f(t, work, Jv, ark_mem->user_data); diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 0b7d4e0698..8cfd172984 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -452,9 +452,9 @@ int lsrkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (!ark_mem->fn_is_current) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); + retval = ark_mem->PreRHSProcess(t, y, ark_mem->user_data); if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } retval = step_mem->fe(t, y, f, ark_mem->user_data); @@ -477,9 +477,9 @@ int lsrkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (step_mem->is_SSP) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); + retval = ark_mem->PreRHSProcess(t, y, ark_mem->user_data); if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } retval = step_mem->fe(t, y, ark_mem->fn, ark_mem->user_data); @@ -499,9 +499,9 @@ int lsrkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, case ARK_FULLRHS_OTHER: /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); + retval = ark_mem->PreRHSProcess(t, y, ark_mem->user_data); if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } @@ -630,9 +630,9 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) (step_mem->step_nst != ark_mem->nst)) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, + retval = ark_mem->PreRHSProcess(ark_mem->tn, ark_mem->yn, ark_mem->user_data); if (retval != 0) { @@ -719,9 +719,9 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) mus = mu * w1 / w0; /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h * thjm1, + retval = ark_mem->PreRHSProcess(ark_mem->tcur + ark_mem->h * thjm1, ark_mem->tempv2, ark_mem->user_data); if (retval != 0) { @@ -816,9 +816,9 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (!ark_mem->fixedstep) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h, ark_mem->ycur, + retval = ark_mem->PreRHSProcess(ark_mem->tcur + ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -862,9 +862,9 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) else { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h, ark_mem->ycur, + retval = ark_mem->PreRHSProcess(ark_mem->tcur + ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -999,9 +999,9 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) (step_mem->step_nst != ark_mem->nst)) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, + retval = ark_mem->PreRHSProcess(ark_mem->tn, ark_mem->yn, ark_mem->user_data); if (retval != 0) { @@ -1070,9 +1070,9 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) cj = temj * w1 / FOUR; /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h * cjm1, + retval = ark_mem->PreRHSProcess(ark_mem->tcur + ark_mem->h * cjm1, ark_mem->tempv2, ark_mem->user_data); if (retval != 0) { @@ -1153,9 +1153,9 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "begin-compute-embedding", ""); /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h, ark_mem->ycur, + retval = ark_mem->PreRHSProcess(ark_mem->tcur + ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -1271,9 +1271,9 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (!ark_mem->fn_is_current) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, + retval = ark_mem->PreRHSProcess(ark_mem->tn, ark_mem->yn, ark_mem->user_data); if (retval != 0) { @@ -1325,9 +1325,9 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr for (int j = 2; j < step_mem->req_stages; j++) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ((sunrealtype)j - ONE) * + retval = ark_mem->PreRHSProcess(ark_mem->tcur + ((sunrealtype)j - ONE) * sm1inv * ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) @@ -1380,9 +1380,9 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Evaluate the last stage for j = step_mem->req_stages */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h, ark_mem->ycur, + retval = ark_mem->PreRHSProcess(ark_mem->tcur + ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -1508,9 +1508,9 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (!ark_mem->fn_is_current) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, + retval = ark_mem->PreRHSProcess(ark_mem->tn, ark_mem->yn, ark_mem->user_data); if (retval != 0) { @@ -1561,9 +1561,9 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr for (int j = 2; j <= ((in - 1) * (in - 2) / 2); j++) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ((sunrealtype)j - ONE) * + retval = ark_mem->PreRHSProcess(ark_mem->tcur + ((sunrealtype)j - ONE) * rat * ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) @@ -1619,9 +1619,9 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr for (int j = ((in - 1) * (in - 2) / 2 + 1); j <= (in * (in + 1) / 2 - 1); j++) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ((sunrealtype)j - ONE) * + retval = ark_mem->PreRHSProcess(ark_mem->tcur + ((sunrealtype)j - ONE) * rat * ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) @@ -1673,10 +1673,10 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { retval = - ark_mem->PreProcessRHS(ark_mem->tcur + + ark_mem->PreRHSProcess(ark_mem->tcur + rat * (rn * (rn + ONE) / TWO - ONE) * ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) @@ -1744,9 +1744,9 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr for (int j = (in * (in + 1) / 2 + 1); j <= step_mem->req_stages; j++) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ((sunrealtype)j - rn - ONE) * + retval = ark_mem->PreRHSProcess(ark_mem->tcur + ((sunrealtype)j - rn - ONE) * rat * ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) @@ -1869,9 +1869,9 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (!ark_mem->fn_is_current) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, + retval = ark_mem->PreRHSProcess(ark_mem->tn, ark_mem->yn, ark_mem->user_data); if (retval != 0) { @@ -1919,9 +1919,9 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h * p5, + retval = ark_mem->PreRHSProcess(ark_mem->tcur + ark_mem->h * p5, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -1968,9 +1968,9 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h, ark_mem->ycur, + retval = ark_mem->PreRHSProcess(ark_mem->tcur + ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -2030,9 +2030,9 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h * p5, + retval = ark_mem->PreRHSProcess(ark_mem->tcur + ark_mem->h * p5, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -2139,9 +2139,9 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt if (!ark_mem->fn_is_current) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, + retval = ark_mem->PreRHSProcess(ark_mem->tn, ark_mem->yn, ark_mem->user_data); if (retval != 0) { @@ -2196,9 +2196,9 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt for (int j = 2; j <= 5; j++) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ((sunrealtype)j - ONE) * + retval = ark_mem->PreRHSProcess(ark_mem->tcur + ((sunrealtype)j - ONE) * onesixth * ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) @@ -2287,9 +2287,9 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt for (int j = 6; j <= 9; j++) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ((sunrealtype)j - FOUR) * + retval = ark_mem->PreRHSProcess(ark_mem->tcur + ((sunrealtype)j - FOUR) * onesixth * ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) @@ -2347,9 +2347,9 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur + ark_mem->h, ark_mem->ycur, + retval = ark_mem->PreRHSProcess(ark_mem->tcur + ark_mem->h, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -2782,9 +2782,9 @@ int lsrkStep_DQJtimes(void* arkode_mem, N_Vector v, N_Vector Jv) (step_mem->step_nst != ark_mem->nst)) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tn, ark_mem->yn, + retval = ark_mem->PreRHSProcess(ark_mem->tn, ark_mem->yn, ark_mem->user_data); if (retval != 0) { return ARK_PREPROCESS_RHS_FAIL; } } @@ -2812,9 +2812,9 @@ int lsrkStep_DQJtimes(void* arkode_mem, N_Vector v, N_Vector Jv) N_VLinearSum(sig, v, ONE, y, work); /* Set Jv = f(tn, y+sig*v) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(t, work, ark_mem->user_data); + retval = ark_mem->PreRHSProcess(t, work, ark_mem->user_data); if (retval != 0) { return ARK_PREPROCESS_RHS_FAIL; } } retval = step_mem->fe(t, work, Jv, ark_mem->user_data); diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index e71325f50e..63a4b0127e 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1477,9 +1477,9 @@ int mriStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, nvec++; /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); + retval = ark_mem->PreRHSProcess(t, y, ark_mem->user_data); if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } @@ -1605,11 +1605,11 @@ int mriStep_UpdateF0(ARKodeMem ark_mem, ARKodeMRIStepMem step_mem, /* update the RHS components */ /* apply user-supplied stage preprocessing function (if supplied) */ - if ((ark_mem->PreProcessRHS != NULL) && + if ((ark_mem->PreRHSProcess != NULL) && ((!step_mem->fse_is_current || !ark_mem->fn_is_current) || (!step_mem->fsi_is_current || !ark_mem->fn_is_current))) { - retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); + retval = ark_mem->PreRHSProcess(t, y, ark_mem->user_data); if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } @@ -1679,9 +1679,9 @@ int mriStep_UpdateF0(ARKodeMem ark_mem, ARKodeMRIStepMem step_mem, if (!(ark_mem->fn_is_current)) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); + retval = ark_mem->PreRHSProcess(t, y, ark_mem->user_data); if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } @@ -2019,14 +2019,14 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt if (calc_fslow) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { if (step_mem->explicit_rhs || (step_mem->implicit_rhs && (!step_mem->deduce_rhs || (step_mem->stagetypes[is] != MRISTAGE_DIRK_NOFAST)))) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -2681,12 +2681,12 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if ((!solution) && (!embedding)) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { if (step_mem->explicit_rhs || (step_mem->implicit_rhs && (!step_mem->deduce_rhs || !impl_corr))) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -3093,9 +3093,9 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if ((!solution) && (!embedding)) { /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { @@ -4254,9 +4254,9 @@ int mriStep_SlowRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (retval != ARK_SUCCESS) { return (retval); } /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); + retval = ark_mem->PreRHSProcess(t, y, ark_mem->user_data); if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } diff --git a/src/arkode/arkode_mristep_nls.c b/src/arkode/arkode_mristep_nls.c index a9dd4e7f4f..b2e0925920 100644 --- a/src/arkode/arkode_mristep_nls.c +++ b/src/arkode/arkode_mristep_nls.c @@ -475,9 +475,9 @@ int mriStep_NlsResidual(N_Vector zcor, N_Vector r, void* arkode_mem) N_VLinearSum(ONE, step_mem->zpred, ONE, zcor, ark_mem->ycur); /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } @@ -536,9 +536,9 @@ int mriStep_NlsFPFunction(N_Vector zcor, N_Vector g, void* arkode_mem) N_VLinearSum(ONE, step_mem->zpred, ONE, zcor, ark_mem->ycur); /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index eac7febf4b..af661a2c2c 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -493,9 +493,9 @@ int sprkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, case ARK_FULLRHS_OTHER: /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(t, y, ark_mem->user_data); + retval = ark_mem->PreRHSProcess(t, y, ark_mem->user_data); if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } } @@ -574,9 +574,9 @@ int sprkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) set other outputs to zero */ /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tn + chati * ark_mem->h, + retval = ark_mem->PreRHSProcess(ark_mem->tn + chati * ark_mem->h, prev_stage, ark_mem->user_data); if (retval != 0) { @@ -617,9 +617,9 @@ int sprkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) set other outputs to zero */ /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tn + ci * ark_mem->h, + retval = ark_mem->PreRHSProcess(ark_mem->tn + ci * ark_mem->h, curr_stage, ark_mem->user_data); if (retval != 0) { @@ -706,7 +706,7 @@ int sprkStep_TakeStep_Compensated(ARKodeMem ark_mem, sunrealtype* dsmPtr, /* if user-supplied stage preprocessing or postprocessing functions, * we error out since those won't work with the increment form */ - if ((ark_mem->PreProcessRHS != NULL) || (ark_mem->PostProcessStage != NULL)) + if ((ark_mem->PreRHSProcess != NULL) || (ark_mem->PostProcessStage != NULL)) { SUNLogInfo(ARK_LOGGER, "begin-stages-list", "status = failed stage stage processing, retval = %i", From c38f5ff8e102edae1ee09f88370d4c4ecb59aeb0 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 26 Feb 2026 10:24:36 -0500 Subject: [PATCH 123/298] Formatting --- src/arkode/arkode_arkstep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index c370f55c1f..b9ccac6495 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1871,7 +1871,8 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) { retval = ark_mem->PreRHSProcess(ark_mem->tn, ark_mem->yn, ark_mem->user_data); - if (retval != 0) { + if (retval != 0) + { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess rhs, retval = %i", retval); return (ARK_PREPROCESS_RHS_FAIL); From 97054fb2b5fc95a21b6acc90ef8b44a94d3575ef Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 26 Feb 2026 10:26:10 -0500 Subject: [PATCH 124/298] Swig --- include/arkode/arkode.h | 4 ++-- src/arkode/fmod_int32/farkode_mod.c | 4 ++-- src/arkode/fmod_int32/farkode_mod.f90 | 14 +++++++------- src/arkode/fmod_int64/farkode_mod.c | 4 ++-- src/arkode/fmod_int64/farkode_mod.f90 | 14 +++++++------- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/include/arkode/arkode.h b/include/arkode/arkode.h index 7c3abfbc30..f88ab948f1 100644 --- a/include/arkode/arkode.h +++ b/include/arkode/arkode.h @@ -285,8 +285,8 @@ SUNDIALS_EXPORT int ARKodeSetPostprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep); SUNDIALS_EXPORT int ARKodeSetPostprocessStepFailFn(void* arkode_mem, ARKPostProcessFn ProcessStep); -SUNDIALS_EXPORT int ARKodeSetPreprocessRHSFn(void* arkode_mem, - ARKPostProcessFn ProcessRHS); +SUNDIALS_EXPORT int ARKodeSetPreRHSProcessFn(void* arkode_mem, + ARKPostProcessFn PreRHSProcess); SUNDIALS_EXPORT int ARKodeSetPostprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStage); diff --git a/src/arkode/fmod_int32/farkode_mod.c b/src/arkode/fmod_int32/farkode_mod.c index d5711a8b28..1603a6e389 100644 --- a/src/arkode/fmod_int32/farkode_mod.c +++ b/src/arkode/fmod_int32/farkode_mod.c @@ -692,7 +692,7 @@ SWIGEXPORT int _wrap_FARKodeSetPostprocessStepFailFn(void *farg1, ARKPostProcess } -SWIGEXPORT int _wrap_FARKodeSetPreprocessRHSFn(void *farg1, ARKPostProcessFn farg2) { +SWIGEXPORT int _wrap_FARKodeSetPreRHSProcessFn(void *farg1, ARKPostProcessFn farg2) { int fresult ; void *arg1 = (void *) 0 ; ARKPostProcessFn arg2 = (ARKPostProcessFn) 0 ; @@ -700,7 +700,7 @@ SWIGEXPORT int _wrap_FARKodeSetPreprocessRHSFn(void *farg1, ARKPostProcessFn far arg1 = (void *)(farg1); arg2 = (ARKPostProcessFn)(farg2); - result = (int)ARKodeSetPreprocessRHSFn(arg1,arg2); + result = (int)ARKodeSetPreRHSProcessFn(arg1,arg2); fresult = (int)(result); return fresult; } diff --git a/src/arkode/fmod_int32/farkode_mod.f90 b/src/arkode/fmod_int32/farkode_mod.f90 index 818027acd0..d495a9c80f 100644 --- a/src/arkode/fmod_int32/farkode_mod.f90 +++ b/src/arkode/fmod_int32/farkode_mod.f90 @@ -151,7 +151,7 @@ module farkode_mod public :: FARKodeSetPreprocessStepFn public :: FARKodeSetPostprocessStepFn public :: FARKodeSetPostprocessStepFailFn - public :: FARKodeSetPreprocessRHSFn + public :: FARKodeSetPreRHSProcessFn public :: FARKodeSetPostprocessStageFn public :: FARKodeSetNonlinearSolver public :: FARKodeSetLinear @@ -738,8 +738,8 @@ function swigc_FARKodeSetPostprocessStepFailFn(farg1, farg2) & integer(C_INT) :: fresult end function -function swigc_FARKodeSetPreprocessRHSFn(farg1, farg2) & -bind(C, name="_wrap_FARKodeSetPreprocessRHSFn") & +function swigc_FARKodeSetPreRHSProcessFn(farg1, farg2) & +bind(C, name="_wrap_FARKodeSetPreRHSProcessFn") & result(fresult) use, intrinsic :: ISO_C_BINDING type(C_PTR), value :: farg1 @@ -2977,19 +2977,19 @@ function FARKodeSetPostprocessStepFailFn(arkode_mem, processstep) & swig_result = fresult end function -function FARKodeSetPreprocessRHSFn(arkode_mem, processrhs) & +function FARKodeSetPreRHSProcessFn(arkode_mem, prerhsprocess) & result(swig_result) use, intrinsic :: ISO_C_BINDING integer(C_INT) :: swig_result type(C_PTR) :: arkode_mem -type(C_FUNPTR), intent(in), value :: processrhs +type(C_FUNPTR), intent(in), value :: prerhsprocess integer(C_INT) :: fresult type(C_PTR) :: farg1 type(C_FUNPTR) :: farg2 farg1 = arkode_mem -farg2 = processrhs -fresult = swigc_FARKodeSetPreprocessRHSFn(farg1, farg2) +farg2 = prerhsprocess +fresult = swigc_FARKodeSetPreRHSProcessFn(farg1, farg2) swig_result = fresult end function diff --git a/src/arkode/fmod_int64/farkode_mod.c b/src/arkode/fmod_int64/farkode_mod.c index e5a9c0608b..48d330b15f 100644 --- a/src/arkode/fmod_int64/farkode_mod.c +++ b/src/arkode/fmod_int64/farkode_mod.c @@ -692,7 +692,7 @@ SWIGEXPORT int _wrap_FARKodeSetPostprocessStepFailFn(void *farg1, ARKPostProcess } -SWIGEXPORT int _wrap_FARKodeSetPreprocessRHSFn(void *farg1, ARKPostProcessFn farg2) { +SWIGEXPORT int _wrap_FARKodeSetPreRHSProcessFn(void *farg1, ARKPostProcessFn farg2) { int fresult ; void *arg1 = (void *) 0 ; ARKPostProcessFn arg2 = (ARKPostProcessFn) 0 ; @@ -700,7 +700,7 @@ SWIGEXPORT int _wrap_FARKodeSetPreprocessRHSFn(void *farg1, ARKPostProcessFn far arg1 = (void *)(farg1); arg2 = (ARKPostProcessFn)(farg2); - result = (int)ARKodeSetPreprocessRHSFn(arg1,arg2); + result = (int)ARKodeSetPreRHSProcessFn(arg1,arg2); fresult = (int)(result); return fresult; } diff --git a/src/arkode/fmod_int64/farkode_mod.f90 b/src/arkode/fmod_int64/farkode_mod.f90 index 5c9cccd5b9..9ec63c0add 100644 --- a/src/arkode/fmod_int64/farkode_mod.f90 +++ b/src/arkode/fmod_int64/farkode_mod.f90 @@ -151,7 +151,7 @@ module farkode_mod public :: FARKodeSetPreprocessStepFn public :: FARKodeSetPostprocessStepFn public :: FARKodeSetPostprocessStepFailFn - public :: FARKodeSetPreprocessRHSFn + public :: FARKodeSetPreRHSProcessFn public :: FARKodeSetPostprocessStageFn public :: FARKodeSetNonlinearSolver public :: FARKodeSetLinear @@ -738,8 +738,8 @@ function swigc_FARKodeSetPostprocessStepFailFn(farg1, farg2) & integer(C_INT) :: fresult end function -function swigc_FARKodeSetPreprocessRHSFn(farg1, farg2) & -bind(C, name="_wrap_FARKodeSetPreprocessRHSFn") & +function swigc_FARKodeSetPreRHSProcessFn(farg1, farg2) & +bind(C, name="_wrap_FARKodeSetPreRHSProcessFn") & result(fresult) use, intrinsic :: ISO_C_BINDING type(C_PTR), value :: farg1 @@ -2977,19 +2977,19 @@ function FARKodeSetPostprocessStepFailFn(arkode_mem, processstep) & swig_result = fresult end function -function FARKodeSetPreprocessRHSFn(arkode_mem, processrhs) & +function FARKodeSetPreRHSProcessFn(arkode_mem, prerhsprocess) & result(swig_result) use, intrinsic :: ISO_C_BINDING integer(C_INT) :: swig_result type(C_PTR) :: arkode_mem -type(C_FUNPTR), intent(in), value :: processrhs +type(C_FUNPTR), intent(in), value :: prerhsprocess integer(C_INT) :: fresult type(C_PTR) :: farg1 type(C_FUNPTR) :: farg2 farg1 = arkode_mem -farg2 = processrhs -fresult = swigc_FARKodeSetPreprocessRHSFn(farg1, farg2) +farg2 = prerhsprocess +fresult = swigc_FARKodeSetPreRHSProcessFn(farg1, farg2) swig_result = fresult end function From c4606e7364ac05b4598094405426509edd4c0718 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 26 Feb 2026 10:31:46 -0500 Subject: [PATCH 125/298] Updated the changelog to reflect the revised name for pre-RHS processing --- CHANGELOG.md | 2 +- doc/shared/RecentChanges.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14bd6738b7..f5c390c332 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ ARKODE now allows users to supply functions that will be called before each inte time step, after each successful time step, after each failed time step, before right-hand side routines are called on an updated state, and/or once each internal stage is computed (`ARKodeSetPreprocessStepFn`, `ARKodeSetPostprocessStepFn`, -`ARKodeSetPostprocessStepFailFn`, `ARKodeSetPreprocessRHSFn`, and +`ARKodeSetPostprocessStepFailFn`, `ARKodeSetPreRHSProcessFn`, and `ARKodeSetPostprocessStageFn`). These are considered **advanced** functions, as they should treat the state vector as read-only, otherwise all theoretical guarantees of solution accuracy and stability will be lost. diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index 342b9460fd..220ad1c473 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -10,7 +10,7 @@ time step, after each successful time step, after each failed time step, before right-hand side routines are called on an updated state, and/or once each internal stage is computed (:c:func:`ARKodeSetPreprocessStepFn`, :c:func:`ARKodeSetPostprocessStepFn`, :c:func:`ARKodeSetPostprocessStepFailFn`, -:c:func:`ARKodeSetPreprocessRHSFn`, and :c:func:`ARKodeSetPostprocessStageFn`). +:c:func:`ARKodeSetPreRHSProcessFn`, and :c:func:`ARKodeSetPostprocessStageFn`). These are considered **advanced** functions, as they should treat the state vector as read-only, otherwise all theoretical guarantees of solution accuracy and stability will be lost. From 39f6cf0cd2866ef6b322c0e8859f3409bcaba2f6 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 26 Feb 2026 10:55:52 -0500 Subject: [PATCH 126/298] Fixed merge issue --- src/arkode/arkode_lsrkstep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 0489cec7a1..72ee2da010 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -817,9 +817,9 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) ark_mem->tcur = ark_mem->tn + ark_mem->h; /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreProcessRHS != NULL) + if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreProcessRHS(ark_mem->tcur, ark_mem->ycur, + retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { From 9fec3de7540d1302131b0da951682d8c98c69d83 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 26 Feb 2026 11:14:33 -0500 Subject: [PATCH 127/298] Fixed CHANGELOG.md and RecentChanges.rst, since previous updates were clobbered when merging --- CHANGELOG.md | 2 ++ doc/shared/RecentChanges.rst | 2 ++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bbc910e1f..817ada9f0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ stage is computed (`ARKodeSetPreprocessStepFn`, `ARKodeSetPostprocessStepFn`, should treat the state vector as read-only, otherwise all theoretical guarantees of solution accuracy and stability will be lost. +Removed extraneous copy of output vector when using ARKODE in ``ARK_ONE_STEP`` mode. + ### Bug Fixes Fixed a CMake bug where the SuperLU_MT interface would not be built and diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index 220ad1c473..9b1eb6ac45 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -15,6 +15,8 @@ These are considered **advanced** functions, as they should treat the state vect read-only, otherwise all theoretical guarantees of solution accuracy and stability will be lost. +Removed extraneous copy of output vector when using ARKODE in ``ARK_ONE_STEP`` mode. + **Bug Fixes** Fixed a CMake bug where the SuperLU_MT interface would not be built and From 96d05ed36e19570876682e888e0727c37f11f6c3 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 26 Feb 2026 13:08:32 -0500 Subject: [PATCH 128/298] Updated root-finding routines to use tempv4 instead of ycur when determining if a root was passed (they still fill ycur in the case of roots) --- src/arkode/arkode_root.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/arkode/arkode_root.c b/src/arkode/arkode_root.c index 5d621987ad..90d4d76653 100644 --- a/src/arkode/arkode_root.c +++ b/src/arkode/arkode_root.c @@ -471,8 +471,8 @@ int arkRootCheck1(void* arkode_mem) hratio = SUNMAX(rootmem->ttol / SUNRabs(ark_mem->h), TENTH); smallh = hratio * ark_mem->h; tplus = rootmem->tlo + smallh; - N_VLinearSum(ONE, ark_mem->yn, smallh, ark_mem->fn, ark_mem->ycur); - retval = rootmem->gfun(tplus, ark_mem->ycur, rootmem->ghi, rootmem->root_data); + N_VLinearSum(ONE, ark_mem->yn, smallh, ark_mem->fn, ark_mem->tempv4); + retval = rootmem->gfun(tplus, ark_mem->tempv4, rootmem->ghi, rootmem->root_data); rootmem->nge++; if (retval != 0) { @@ -533,11 +533,11 @@ int arkRootCheck2(void* arkode_mem) /* return if no roots in previous step */ if (rootmem->irfnd == 0) { return (ARK_SUCCESS); } - /* Set ark_ycur = y(tlo) */ - (void)ARKodeGetDky(ark_mem, rootmem->tlo, 0, ark_mem->ycur); + /* Set tempv4 = y(tlo) */ + (void)ARKodeGetDky(ark_mem, rootmem->tlo, 0, ark_mem->tempv4); /* Evaluate root-finding function: glo = g(tlo, y(tlo)) */ - retval = rootmem->gfun(rootmem->tlo, ark_mem->ycur, rootmem->glo, + retval = rootmem->gfun(rootmem->tlo, ark_mem->tempv4, rootmem->glo, rootmem->root_data); rootmem->nge++; if (retval != 0) { return (ARK_RTFUNC_FAIL); } @@ -569,7 +569,7 @@ int arkRootCheck2(void* arkode_mem) if ((tplus - ark_mem->tcur) * ark_mem->h >= ZERO) { /* hratio = smallh/ark_mem->h; */ - N_VLinearSum(ONE, ark_mem->ycur, smallh, ark_mem->fn, ark_mem->ycur); + N_VLinearSum(ONE, ark_mem->tempv4, smallh, ark_mem->fn, ark_mem->ycur); } else { @@ -632,24 +632,24 @@ int arkRootCheck3(void* arkode_mem, sunrealtype tout, int itask) if (itask == ARK_ONE_STEP) { rootmem->thi = ark_mem->tcur; - N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + N_VScale(ONE, ark_mem->yn, ark_mem->tempv4); } if (itask == ARK_NORMAL) { if ((tout - ark_mem->tcur) * ark_mem->h >= ZERO) { rootmem->thi = ark_mem->tcur; - N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + N_VScale(ONE, ark_mem->yn, ark_mem->tempv4); } else { rootmem->thi = tout; - (void)ARKodeGetDky(ark_mem, rootmem->thi, 0, ark_mem->ycur); + (void)ARKodeGetDky(ark_mem, rootmem->thi, 0, ark_mem->tempv4); } } /* Set rootmem->ghi = g(thi) and call arkRootfind to search (tlo,thi) for roots. */ - retval = rootmem->gfun(rootmem->thi, ark_mem->ycur, rootmem->ghi, + retval = rootmem->gfun(rootmem->thi, ark_mem->tempv4, rootmem->ghi, rootmem->root_data); rootmem->nge++; if (retval != 0) { return (ARK_RTFUNC_FAIL); } @@ -861,8 +861,8 @@ int arkRootfind(void* arkode_mem) tmid = rootmem->thi - fracsub * (rootmem->thi - rootmem->tlo); } - (void)ARKodeGetDky(ark_mem, tmid, 0, ark_mem->ycur); - retval = rootmem->gfun(tmid, ark_mem->ycur, rootmem->grout, + (void)ARKodeGetDky(ark_mem, tmid, 0, ark_mem->tempv4); + retval = rootmem->gfun(tmid, ark_mem->tempv4, rootmem->grout, rootmem->root_data); rootmem->nge++; if (retval != 0) { return (ARK_RTFUNC_FAIL); } From 9bbd8cd59e2c62df58536c1227467ba5ad41333e Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 26 Feb 2026 14:07:05 -0500 Subject: [PATCH 129/298] Updated signature of lsrkStep_DomEigUpdateLogic to accept f_{n+1} vector as an input --- src/arkode/arkode_lsrkstep.c | 44 +++++++++++++++---------------- src/arkode/arkode_lsrkstep_impl.h | 2 +- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 72ee2da010..4ec0ca315d 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -538,7 +538,7 @@ int lsrkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, should be 0. The variables (ark_mem->tcur, ark_mem->ycur) should - contain the current time and solution at each stage of within + contain the current time and solution at each stage within the time step. The input/output variable nflagPtr is generally used in ARKODE @@ -861,9 +861,9 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) return ARK_VECTOROP_ERR; } *dsmPtr = N_VWrmsNorm(ark_mem->tempv1, ark_mem->ewt); - lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr); + lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr, ark_mem->tempv3); } - else { lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr); } + else { lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr, ark_mem->tempv3); } SUNLogInfo(ARK_LOGGER, "end-compute-embedding", "status = success"); @@ -1180,9 +1180,9 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) return ARK_VECTOROP_ERR; } *dsmPtr = N_VWrmsNorm(ark_mem->tempv1, ark_mem->ewt); - lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr); + lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr, ark_mem->tempv3); } - else { lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr); } + else { lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr, ark_mem->tempv3); } SUNLogInfo(ARK_LOGGER, "end-compute-embedding", "status = success"); @@ -1236,21 +1236,21 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr const sunrealtype hsm1inv = ark_mem->h * sm1inv; const sunrealtype rsinv = ONE / rs; const sunrealtype hrsinv = ark_mem->h * rsinv; - sunrealtype bt1, bt2, bt3; + sunrealtype hbt1, hbt2, hbt3; /* Embedding coefficients differ when req_stages == 2 */ if (step_mem->req_stages == 2) { // from https://doi.org/10.1016/j.cam.2022.114325 pg 5 - bt1 = ark_mem->h * SUN_RCONST(0.694021459207626); - bt2 = ZERO; - bt3 = ark_mem->h * (ONE - SUN_RCONST(0.694021459207626)); + hbt1 = ark_mem->h * SUN_RCONST(0.694021459207626); + hbt2 = ZERO; + hbt3 = ark_mem->h * (ONE - SUN_RCONST(0.694021459207626)); } else { - bt1 = ark_mem->h * (rs + ONE) / (rs * rs); - bt2 = hrsinv; - bt3 = ark_mem->h * (rs - ONE) / (rs * rs); + hbt1 = ark_mem->h * (rs + ONE) / (rs * rs); + hbt2 = hrsinv; + hbt3 = ark_mem->h * (rs - ONE) / (rs * rs); } /* Begin first stage */ @@ -1297,7 +1297,7 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr N_VLinearSum(ONE, ark_mem->yn, hsm1inv, ark_mem->fn, ark_mem->ycur); if (!ark_mem->fixedstep) { - N_VLinearSum(ONE, ark_mem->yn, bt1, ark_mem->fn, ark_mem->tempv1); + N_VLinearSum(ONE, ark_mem->yn, hbt1, ark_mem->fn, ark_mem->tempv1); } /* apply user-supplied stage postprocessing function (if supplied) */ @@ -1353,7 +1353,7 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr N_VLinearSum(ONE, ark_mem->ycur, hsm1inv, ark_mem->tempv2, ark_mem->ycur); if (!ark_mem->fixedstep) { - N_VLinearSum(ONE, ark_mem->tempv1, bt2, ark_mem->tempv2, ark_mem->tempv1); + N_VLinearSum(ONE, ark_mem->tempv1, hbt2, ark_mem->tempv2, ark_mem->tempv1); } /* apply user-supplied stage postprocessing function (if supplied) */ @@ -1433,7 +1433,7 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Compute yerr (if step adaptivity enabled) */ if (!ark_mem->fixedstep) { - N_VLinearSum(ONE, ark_mem->tempv1, bt3, ark_mem->tempv2, ark_mem->tempv1); + N_VLinearSum(ONE, ark_mem->tempv1, hbt3, ark_mem->tempv2, ark_mem->tempv1); SUNLogExtraDebugVec(ARK_LOGGER, "embedded solution", ark_mem->tempv1, "y_embedded(:) ="); N_VLinearSum(ONE, ark_mem->ycur, -ONE, ark_mem->tempv1, ark_mem->tempv1); @@ -2072,7 +2072,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Compute the time step solution and embedding */ ark_mem->tcur = ark_mem->tn + ark_mem->h; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, - step_mem->req_stages, ark_mem->tcur); + 4, ark_mem->tcur); N_VLinearSum(ONE, ark_mem->ycur, hp5, ark_mem->tempv3, ark_mem->ycur); /* apply user-supplied stage postprocessing function (if supplied) */ @@ -2150,9 +2150,6 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt const sunrealtype hsixth = ark_mem->h / SIX; const sunrealtype hfifth = ark_mem->h / FIVE; - /* Copy yn into tempv2 for use in later stages */ - N_VScale(ONE, ark_mem->yn, ark_mem->tempv2); - /* Begin the first stage */ SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 0, ark_mem->tcur); @@ -2191,6 +2188,9 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->fn, "F_0(:) ="); SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); + /* Copy yn into tempv2 for use in later stages */ + N_VScale(ONE, ark_mem->yn, ark_mem->tempv2); + /* Begin the second stage, and accumulate embedding into tempv1 */ ark_mem->tcur = ark_mem->tn + hsixth; SUNLogInfo(ARK_LOGGER, "begin-stages-list", @@ -2214,7 +2214,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } } - /* Evaluate stages j = 2,...,4 */ + /* Evaluate stages j = 2,...,5 */ for (int j = 2; j <= 5; j++) { /* Complete previous stage by evaluating RHS and storing in tempv3 */ @@ -2647,11 +2647,11 @@ int lsrkStep_AccessStepMem(ARKodeMem ark_mem, const char* fname, ---------------------------------------------------------------*/ void lsrkStep_DomEigUpdateLogic(ARKodeMem ark_mem, ARKodeLSRKStepMem step_mem, - sunrealtype dsm) + sunrealtype dsm, N_Vector fnew) { if (dsm <= ONE) { - N_VScale(ONE, ark_mem->tempv3, ark_mem->fn); + N_VScale(ONE, fnew, ark_mem->fn); ark_mem->fn_is_current = SUNTRUE; step_mem->dom_eig_is_current = (step_mem->const_Jac == SUNTRUE); diff --git a/src/arkode/arkode_lsrkstep_impl.h b/src/arkode/arkode_lsrkstep_impl.h index 7dde8529bc..f7113962ac 100644 --- a/src/arkode/arkode_lsrkstep_impl.h +++ b/src/arkode/arkode_lsrkstep_impl.h @@ -216,7 +216,7 @@ int lsrkStep_AccessARKODEStepMem(void* arkode_mem, const char* fname, int lsrkStep_AccessStepMem(ARKodeMem ark_mem, const char* fname, ARKodeLSRKStepMem* step_mem); void lsrkStep_DomEigUpdateLogic(ARKodeMem ark_mem, ARKodeLSRKStepMem step_mem, - sunrealtype dsm); + sunrealtype dsm, N_Vector fnew); int lsrkStep_ComputeNewDomEig(ARKodeMem ark_mem, ARKodeLSRKStepMem step_mem); int lsrkStep_DQJtimes(void* arkode_mem, N_Vector v, N_Vector Jv); From ff0131fc9d8421dcb36472384f6d81d237bb1910 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 26 Feb 2026 14:07:21 -0500 Subject: [PATCH 130/298] Updated CHANGELOG according to PR comments --- CHANGELOG.md | 7 +++++-- doc/shared/RecentChanges.rst | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e0f2104017..6e0b4031eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,9 +17,9 @@ solution accuracy and stability will be lost. Removed extraneous copy of output vector when using ARKODE in ``ARK_ONE_STEP`` mode. -The default numbers of stages for the SSP Runge--Kutta methods `ARKODE_LSRK_SSP_S_2` +The default number of stages for the SSP Runge-Kutta methods `ARKODE_LSRK_SSP_S_2` and `ARKODE_LSRK_SSP_S_3` in LSRKStep were changed from 10 and 9, respectively, to -their minimum allowable values of 2 and 4. Users may revert to the previous values +their minimum allowable values of 2 and 4. Users may revert to the previous values by calling `LSRKStepSetNumSSPStages`. ### Bug Fixes @@ -30,6 +30,9 @@ installed without setting the `SUPERLUMT_WORKS` option to `TRUE`. Fixed a bug in logging output from ARKODE, where for some time stepping modules, the the current "time" output in the logger was incorrect. +Fixed a potential bug in LSRKStep's `ARKODE_LSRK_SSP_S_3` method, where a real +number was used instead of an integer, potentially resulting in a rounding error. + ### Deprecation Notices ## Changes to SUNDIALS in release 7.6.0 diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index 2830655fb8..750eb7be02 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -17,9 +17,9 @@ will be lost. Removed extraneous copy of output vector when using ARKODE in ``ARK_ONE_STEP`` mode. -The default numbers of stages for the SSP Runge--Kutta methods :c:enumerator:`ARKODE_LSRK_SSP_S_2` +The default number of stages for the SSP Runge-Kutta methods :c:enumerator:`ARKODE_LSRK_SSP_S_2` and :c:enumerator:`ARKODE_LSRK_SSP_S_3` in LSRKStep were changed from 10 and 9, respectively, to -their minimum allowable values of 2 and 4. Users may revert to the previous values by calling +their minimum allowable values of 2 and 4. Users may revert to the previous values by calling :c:func:`LSRKStepSetNumSSPStages`. **Bug Fixes** @@ -30,4 +30,7 @@ installed without setting the ``SUPERLUMT_WORKS`` option to ``TRUE``. Fixed a bug in logging output from ARKODE, where for some time stepping modules, the the current "time" output in the logger was incorrect. +Fixed a potential bug in LSRKStep's :c:enumerator:`ARKODE_LSRK_SSP_S_3` method, where a real +number was used instead of an integer, potentially resulting in a rounding error. + **Deprecation Notices** From 69ac8a2dc897f48ef648bb005a9a65d9b7041398 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 26 Feb 2026 14:16:16 -0500 Subject: [PATCH 131/298] Applied suggestions from PR review --- src/arkode/arkode_lsrkstep.c | 2 +- test/unit_tests/logging/test_logging_arkode_lsrkstep.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 4ec0ca315d..8585a44700 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -484,13 +484,13 @@ int lsrkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, } retval = step_mem->fe(t, y, ark_mem->fn, ark_mem->user_data); step_mem->nfe++; - ark_mem->fn_is_current = SUNTRUE; if (retval != 0) { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, __FILE__, MSG_ARK_RHSFUNC_FAILED, t); return ARK_RHSFUNC_FAIL; } + ark_mem->fn_is_current = SUNTRUE; } N_VScale(ONE, ark_mem->fn, f); diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep.cpp b/test/unit_tests/logging/test_logging_arkode_lsrkstep.cpp index 46b7952e66..fbc8f40b47 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep.cpp +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep.cpp @@ -79,6 +79,7 @@ int main(int argc, char* argv[]) else if (method == 2) { flag = LSRKStepSetSSPMethodByName(arkode_mem, "ARKODE_LSRK_SSP_S_2"); + if (flag == 0) { flag = LSRKStepSetNumSSPStages(arkode_mem, 10); } } else if (method == 3) { From e9a38726ce8026e154fb55d5bd12a82a9aa08f1d Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 26 Feb 2026 14:21:11 -0500 Subject: [PATCH 132/298] Applied suggestions from PR review --- src/arkode/arkode_lsrkstep.c | 39 ++++++++++++------------------------ 1 file changed, 13 insertions(+), 26 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 8585a44700..54ab57565d 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -2201,25 +2201,25 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt N_VLinearSum(ONE, ark_mem->yn, hfifth, ark_mem->fn, ark_mem->tempv1); } - /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->PostProcessStage != NULL) - { - retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); - if (retval != 0) - { - SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed postprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; - } - } - /* Evaluate stages j = 2,...,5 */ for (int j = 2; j <= 5; j++) { /* Complete previous stage by evaluating RHS and storing in tempv3 */ ark_mem->tcur = ark_mem->tn + (j - 1) * hsixth; + /* apply user-supplied stage postprocessing function (if supplied) */ + if (ark_mem->PostProcessStage != NULL) + { + retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed postprocess stage, retval = %i", retval); + return ARK_POSTPROCESS_STAGE_FAIL; + } + } + /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRHSProcess != NULL) { @@ -2258,19 +2258,6 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt N_VLinearSum(ONE, ark_mem->tempv1, SUN_RCONST(0.3) * ark_mem->h, ark_mem->tempv3, ark_mem->tempv1); } - - /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->PostProcessStage != NULL) - { - retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); - if (retval != 0) - { - SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed postprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; - } - } } /* no need to call RHS preprocessing here, since the stage does not require From 1745089d4ac1582ff1bbb21b784b36ed53467dff Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 26 Feb 2026 22:31:22 -0500 Subject: [PATCH 133/298] Formatting --- src/arkode/arkode_root.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/arkode/arkode_root.c b/src/arkode/arkode_root.c index 90d4d76653..5714e87de0 100644 --- a/src/arkode/arkode_root.c +++ b/src/arkode/arkode_root.c @@ -472,7 +472,8 @@ int arkRootCheck1(void* arkode_mem) smallh = hratio * ark_mem->h; tplus = rootmem->tlo + smallh; N_VLinearSum(ONE, ark_mem->yn, smallh, ark_mem->fn, ark_mem->tempv4); - retval = rootmem->gfun(tplus, ark_mem->tempv4, rootmem->ghi, rootmem->root_data); + retval = rootmem->gfun(tplus, ark_mem->tempv4, rootmem->ghi, + rootmem->root_data); rootmem->nge++; if (retval != 0) { From 6efc5e63dac2273e73bf7997e67a5cbabb316fbc Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 26 Feb 2026 22:35:39 -0500 Subject: [PATCH 134/298] Fixed merge issue due to renamed upstream Set function --- .../arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp | 4 ++-- .../arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp | 4 ++-- .../arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp | 4 ++-- .../arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp | 4 ++-- .../arkode/CXX_serial/ark_test_stageinfo_mristep.cpp | 4 ++-- .../arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp | 4 ++-- .../arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp index 4145c3d236..755b49897d 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp @@ -122,8 +122,8 @@ int main(int argc, char* argv[]) if (check_flag(flag, "ARKodeSetPostprocessStepFn")) { return 1; } flag = ARKodeSetPostprocessStepFailFn(arkode_mem, postprocess_step_fail); if (check_flag(flag, "ARKodeSetPostprocessStepFailFn")) { return 1; } - flag = ARKodeSetPreprocessRHSFn(arkode_mem, preprocess_stage); - if (check_flag(flag, "ARKodeSetPreprocessRHSFn")) { return 1; } + flag = ARKodeSetPreRHSProcessFn(arkode_mem, preprocess_stage); + if (check_flag(flag, "ARKodeSetPreRHSProcessFn")) { return 1; } flag = ARKodeSetPostprocessStageFn(arkode_mem, postprocess_stage); if (check_flag(flag, "ARKodeSetPostprocessStageFn")) { return 1; } diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp index 375bee9e5c..cdbf144a99 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp @@ -85,8 +85,8 @@ int main(int argc, char* argv[]) if (check_flag(flag, "ARKodeSetPostprocessStepFn")) { return 1; } flag = ARKodeSetPostprocessStepFailFn(arkode_mem, postprocess_step_fail); if (check_flag(flag, "ARKodeSetPostprocessStepFailFn")) { return 1; } - flag = ARKodeSetPreprocessRHSFn(arkode_mem, preprocess_stage); - if (check_flag(flag, "ARKodeSetPreprocessRHSFn")) { return 1; } + flag = ARKodeSetPreRHSProcessFn(arkode_mem, preprocess_stage); + if (check_flag(flag, "ARKodeSetPreRHSProcessFn")) { return 1; } flag = ARKodeSetPostprocessStageFn(arkode_mem, postprocess_stage); if (check_flag(flag, "ARKodeSetPostprocessStageFn")) { return 1; } diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp index e5b6bf75d2..938c18424d 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp @@ -104,8 +104,8 @@ int main(int argc, char* argv[]) if (check_flag(flag, "ARKodeSetPostprocessStepFn")) { return 1; } flag = ARKodeSetPostprocessStepFailFn(arkode_mem, postprocess_step_fail); if (check_flag(flag, "ARKodeSetPostprocessStepFailFn")) { return 1; } - flag = ARKodeSetPreprocessRHSFn(arkode_mem, preprocess_stage); - if (check_flag(flag, "ARKodeSetPreprocessRHSFn")) { return 1; } + flag = ARKodeSetPreRHSProcessFn(arkode_mem, preprocess_stage); + if (check_flag(flag, "ARKodeSetPreRHSProcessFn")) { return 1; } flag = ARKodeSetPostprocessStageFn(arkode_mem, postprocess_stage); if (check_flag(flag, "ARKodeSetPostprocessStageFn")) { return 1; } diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp index 17ee8ab6cc..3160acbebc 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp @@ -128,8 +128,8 @@ int main(int argc, char* argv[]) if (check_flag(flag, "ARKodeSetPostprocessStepFn")) { return 1; } flag = ARKodeSetPostprocessStepFailFn(arkode_mem, postprocess_step_fail); if (check_flag(flag, "ARKodeSetPostprocessStepFailFn")) { return 1; } - flag = ARKodeSetPreprocessRHSFn(arkode_mem, preprocess_stage); - if (check_flag(flag, "ARKodeSetPreprocessRHSFn")) { return 1; } + flag = ARKodeSetPreRHSProcessFn(arkode_mem, preprocess_stage); + if (check_flag(flag, "ARKodeSetPreRHSProcessFn")) { return 1; } flag = ARKodeSetPostprocessStageFn(arkode_mem, postprocess_stage); if (check_flag(flag, "ARKodeSetPostprocessStageFn")) { return 1; } diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp index 25791660d3..47a2e30577 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp @@ -205,8 +205,8 @@ int main(int argc, char* argv[]) if (check_flag(flag, "ARKodeSetPostprocessStepFn")) { return 1; } flag = ARKodeSetPostprocessStepFailFn(arkode_mem, postprocess_step_fail); if (check_flag(flag, "ARKodeSetPostprocessStepFailFn")) { return 1; } - flag = ARKodeSetPreprocessRHSFn(arkode_mem, preprocess_stage); - if (check_flag(flag, "ARKodeSetPreprocessRHSFn")) { return 1; } + flag = ARKodeSetPreRHSProcessFn(arkode_mem, preprocess_stage); + if (check_flag(flag, "ARKodeSetPreRHSProcessFn")) { return 1; } flag = ARKodeSetPostprocessStageFn(arkode_mem, postprocess_stage); if (check_flag(flag, "ARKodeSetPostprocessStageFn")) { return 1; } diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp index 66b1ee3357..a3ccf6b8d4 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp @@ -104,8 +104,8 @@ int main(int argc, char* argv[]) if (check_flag(flag, "ARKodeSetPostprocessStepFn")) { return 1; } flag = ARKodeSetPostprocessStepFailFn(arkode_mem, postprocess_step_fail); if (check_flag(flag, "ARKodeSetPostprocessStepFailFn")) { return 1; } - flag = ARKodeSetPreprocessRHSFn(arkode_mem, preprocess_stage); - if (check_flag(flag, "ARKodeSetPreprocessRHSFn")) { return 1; } + flag = ARKodeSetPreRHSProcessFn(arkode_mem, preprocess_stage); + if (check_flag(flag, "ARKodeSetPreRHSProcessFn")) { return 1; } flag = ARKodeSetPostprocessStageFn(arkode_mem, postprocess_stage); if (check_flag(flag, "ARKodeSetPostprocessStageFn")) { return 1; } diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp index 8e953e73c2..eabdfaa9c0 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp @@ -75,8 +75,8 @@ int main(int argc, char* argv[]) if (check_flag(flag, "ARKodeSetPostprocessStepFn")) { return 1; } flag = ARKodeSetPostprocessStepFailFn(arkode_mem, postprocess_step_fail); if (check_flag(flag, "ARKodeSetPostprocessStepFailFn")) { return 1; } - flag = ARKodeSetPreprocessRHSFn(arkode_mem, preprocess_stage); - if (check_flag(flag, "ARKodeSetPreprocessRHSFn")) { return 1; } + flag = ARKodeSetPreRHSProcessFn(arkode_mem, preprocess_stage); + if (check_flag(flag, "ARKodeSetPreRHSProcessFn")) { return 1; } flag = ARKodeSetPostprocessStageFn(arkode_mem, postprocess_stage); if (check_flag(flag, "ARKodeSetPostprocessStageFn")) { return 1; } From 8df81470c36a7fcf3e563adee9e51b22045072d9 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 26 Feb 2026 22:52:21 -0500 Subject: [PATCH 135/298] Formatting --- src/arkode/arkode_lsrkstep.c | 18 ++++++++++++------ src/arkode/arkode_root.c | 3 ++- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 54ab57565d..8205dddcd5 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -863,7 +863,10 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) *dsmPtr = N_VWrmsNorm(ark_mem->tempv1, ark_mem->ewt); lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr, ark_mem->tempv3); } - else { lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr, ark_mem->tempv3); } + else + { + lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr, ark_mem->tempv3); + } SUNLogInfo(ARK_LOGGER, "end-compute-embedding", "status = success"); @@ -1182,7 +1185,10 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) *dsmPtr = N_VWrmsNorm(ark_mem->tempv1, ark_mem->ewt); lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr, ark_mem->tempv3); } - else { lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr, ark_mem->tempv3); } + else + { + lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr, ark_mem->tempv3); + } SUNLogInfo(ARK_LOGGER, "end-compute-embedding", "status = success"); @@ -2071,8 +2077,8 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Compute the time step solution and embedding */ ark_mem->tcur = ark_mem->tn + ark_mem->h; - SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, - 4, ark_mem->tcur); + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "stage = %i, tcur = " SUN_FORMAT_G, 4, ark_mem->tcur); N_VLinearSum(ONE, ark_mem->ycur, hp5, ark_mem->tempv3, ark_mem->ycur); /* apply user-supplied stage postprocessing function (if supplied) */ @@ -2211,11 +2217,11 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt if (ark_mem->PostProcessStage != NULL) { retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed postprocess stage, retval = %i", retval); + "status = failed postprocess stage, retval = %i", retval); return ARK_POSTPROCESS_STAGE_FAIL; } } diff --git a/src/arkode/arkode_root.c b/src/arkode/arkode_root.c index 90d4d76653..5714e87de0 100644 --- a/src/arkode/arkode_root.c +++ b/src/arkode/arkode_root.c @@ -472,7 +472,8 @@ int arkRootCheck1(void* arkode_mem) smallh = hratio * ark_mem->h; tplus = rootmem->tlo + smallh; N_VLinearSum(ONE, ark_mem->yn, smallh, ark_mem->fn, ark_mem->tempv4); - retval = rootmem->gfun(tplus, ark_mem->tempv4, rootmem->ghi, rootmem->root_data); + retval = rootmem->gfun(tplus, ark_mem->tempv4, rootmem->ghi, + rootmem->root_data); rootmem->nge++; if (retval != 0) { From 67354b7f28d319900e9aaa6c96ba7e82f28293ea Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 27 Feb 2026 15:47:02 -0500 Subject: [PATCH 136/298] Updated SSP(s,2) logging output --- test/answers | 2 +- .../test_logging_arkode_lsrkstep_2.out | 10 +- .../test_logging_arkode_lsrkstep_lvl3_2.out | 76 +++++++-- .../test_logging_arkode_lsrkstep_lvl4_2.out | 82 ++++++++-- .../test_logging_arkode_lsrkstep_lvl5_2.out | 146 +++++++++++++++--- 5 files changed, 254 insertions(+), 62 deletions(-) diff --git a/test/answers b/test/answers index 8fbdfeca79..840a730b23 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 8fbdfeca79243cb0136225291bdf3d8236500a9d +Subproject commit 840a730b2351cd2438c2ade7d3594aaa778190ff diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_2.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_2.out index 7b0e36d36f..8d6218e82e 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_2.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_2.out @@ -2,9 +2,9 @@ Start LSRKStep Logging test t y y err --------------------------------------------------------------------- 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 - 6.103515625000001e-12 6.103515625000001e-12 0.000000000000000e+00 - 6.104125976562500e-08 6.104125976562489e-08 3.970466940254533e-23 - 1.281744384765625e-06 1.281744384764619e-06 3.038730698274802e-19 + 6.103515625000001e-12 6.103515625000000e-12 8.077935669463161e-28 + 6.104125976562500e-08 6.104125976562493e-08 0.000000000000000e+00 + 1.281744384765625e-06 1.281744384764889e-06 3.388131789017201e-20 --------------------------------------------------------------------- Current time = 1.28174438476563e-06 Steps = 3 @@ -17,6 +17,6 @@ Inequality constraint fails = 0 Initial step size = 6.103515625e-12 Last step size = 1.220703125e-06 Current step size = 2.44140625e-05 -RHS fn evals = 8 -Number of stages used = 2 +RHS fn evals = 32 +Number of stages used = 10 End LSRKStep Logging test diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_2.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_2.out index 6c3daff4c4..33eaafbdf7 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_2.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_2.out @@ -5,30 +5,78 @@ Start LSRKStep Logging test [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 1, tn = 0, h = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 0, tcur = 0 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 6.103515625e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 6.78168402777778e-13 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 6.103515625e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 1.35633680555556e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 - 6.103515625000001e-12 6.103515625000001e-12 0.000000000000000e+00 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 3, tcur = 2.03450520833333e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 4, tcur = 2.71267361111111e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 5, tcur = 3.39084201388889e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 6, tcur = 4.06901041666667e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 7, tcur = 4.74717881944444e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 8, tcur = 5.42534722222222e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 9, tcur = 6.103515625e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 10, tcur = 6.103515625e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 8.07793566946316e-18 + 6.103515625000001e-12 6.103515625000000e-12 8.077935669463161e-28 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 6.103515625e-12, h = 6.103515625e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 0, tcur = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 6.1041259765625e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 6.78778754340278e-09 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 1.35694715711806e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 3, tcur = 2.03511555989583e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 4, tcur = 2.71328396267361e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 5, tcur = 3.39145236545139e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 6.1041259765625e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 6, tcur = 4.06962076822917e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 5.29395559722197e-13 - 6.104125976562500e-08 6.104125976562489e-08 3.970466940254533e-23 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 7, tcur = 4.74778917100694e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 8, tcur = 5.42595757378472e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 9, tcur = 6.1041259765625e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 10, tcur = 6.1041259765625e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 + 6.104125976562500e-08 6.104125976562493e-08 0.000000000000000e+00 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 3, tn = 6.1041259765625e-08, h = 1.220703125e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 0, tcur = 6.1041259765625e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 1.28174438476563e-06 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 1.96674940321181e-07 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 3.32308620876736e-07 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 3, tcur = 4.67942301432292e-07 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 4, tcur = 6.03575981987847e-07 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 5, tcur = 7.39209662543403e-07 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 6, tcur = 8.74843343098958e-07 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 7, tcur = 1.01047702365451e-06 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 8, tcur = 1.14611070421007e-06 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 9, tcur = 1.28174438476563e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 1.28174438476563e-06 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 10, tcur = 1.28174438476563e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 3.88550946397212e-09 - 1.281744384765625e-06 1.281744384764619e-06 3.038730698274802e-19 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 2.01047602983307e-10 + 1.281744384765625e-06 1.281744384764889e-06 3.388131789017201e-20 --------------------------------------------------------------------- Current time = 1.28174438476563e-06 Steps = 3 @@ -41,6 +89,6 @@ Inequality constraint fails = 0 Initial step size = 6.103515625e-12 Last step size = 1.220703125e-06 Current step size = 2.44140625e-05 -RHS fn evals = 8 -Number of stages used = 2 +RHS fn evals = 32 +Number of stages used = 10 End LSRKStep Logging test diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_2.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_2.out index 403052f65d..ca4bd6e6d6 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_2.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_2.out @@ -5,39 +5,87 @@ Start LSRKStep Logging test [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 1, tn = 0, h = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 0, tcur = 0 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 6.103515625e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 6.78168402777778e-13 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 6.103515625e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 1.35633680555556e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = inf +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 3, tcur = 2.03450520833333e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 4, tcur = 2.71267361111111e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 5, tcur = 3.39084201388889e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 6, tcur = 4.06901041666667e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 7, tcur = 4.74717881944444e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 8, tcur = 5.42534722222222e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 9, tcur = 6.103515625e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 10, tcur = 6.103515625e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.002147483648 [DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 6.103515625e-08 [DEBUG][rank 0][arkAdapt][new-step-eta] eta = 10000 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 - 6.103515625000001e-12 6.103515625000001e-12 0.000000000000000e+00 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 8.07793566946316e-18 + 6.103515625000001e-12 6.103515625000000e-12 8.077935669463161e-28 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 6.103515625e-12, h = 6.103515625e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 0, tcur = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 6.1041259765625e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 6.78778754340278e-09 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 1.35694715711806e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 3, tcur = 2.03511555989583e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 4, tcur = 2.71328396267361e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 5, tcur = 3.39145236545139e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 6.1041259765625e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 6, tcur = 4.06962076822917e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.08388608256 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 7, tcur = 4.74778917100694e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 8, tcur = 5.42595757378472e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 9, tcur = 6.1041259765625e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 10, tcur = 6.1041259765625e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = inf [DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 1.220703125e-06 [DEBUG][rank 0][arkAdapt][new-step-eta] eta = 20 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 5.29395559722197e-13 - 6.104125976562500e-08 6.104125976562489e-08 3.970466940254533e-23 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 + 6.104125976562500e-08 6.104125976562493e-08 0.000000000000000e+00 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 3, tn = 6.1041259765625e-08, h = 1.220703125e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 0, tcur = 6.1041259765625e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 1.28174438476563e-06 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 1.96674940321181e-07 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 3.32308620876736e-07 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 3, tcur = 4.67942301432292e-07 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 4, tcur = 6.03575981987847e-07 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 5, tcur = 7.39209662543403e-07 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 6, tcur = 8.74843343098958e-07 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 7, tcur = 1.01047702365451e-06 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 8, tcur = 1.14611070421007e-06 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 9, tcur = 1.28174438476563e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 1.28174438476563e-06 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 10, tcur = 1.28174438476563e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.0195833087394633 +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.0860915657862948 [DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 2.44140625e-05 [DEBUG][rank 0][arkAdapt][new-step-eta] eta = 20 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 3.88550946397212e-09 - 1.281744384765625e-06 1.281744384764619e-06 3.038730698274802e-19 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 2.01047602983307e-10 + 1.281744384765625e-06 1.281744384764889e-06 3.388131789017201e-20 --------------------------------------------------------------------- Current time = 1.28174438476563e-06 Steps = 3 @@ -50,6 +98,6 @@ Inequality constraint fails = 0 Initial step size = 6.103515625e-12 Last step size = 1.220703125e-06 Current step size = 2.44140625e-05 -RHS fn evals = 8 -Number of stages used = 2 +RHS fn evals = 32 +Number of stages used = 10 End LSRKStep Logging test diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_2.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_2.out index fea006d7a7..2b7f79daf1 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_2.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_2.out @@ -9,65 +9,161 @@ Start LSRKStep Logging test [DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_0(:) = 1.000000000000000e+00 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 6.103515625e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 6.78168402777778e-13 [DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_1(:) = 1.000000000000000e+00 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 6.103515625e-12 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 1.35633680555556e-12 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_2(:) = + 1.000000000000000e+00 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 3, tcur = 2.03450520833333e-12 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_3(:) = + 1.000000000000000e+00 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 4, tcur = 2.71267361111111e-12 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_4(:) = + 1.000000000000000e+00 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 5, tcur = 3.39084201388889e-12 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_5(:) = + 1.000000000000000e+00 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 6, tcur = 4.06901041666667e-12 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_6(:) = + 1.000000000000000e+00 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 7, tcur = 4.74717881944444e-12 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_7(:) = + 1.000000000000000e+00 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 8, tcur = 5.42534722222222e-12 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_8(:) = + 1.000000000000000e+00 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 9, tcur = 6.103515625e-12 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_9(:) = + 1.000000000000000e+00 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 10, tcur = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success [DEBUG][rank 0][lsrkStep_TakeStepSSPs2][updated solution] ycur(:) = - 6.103515625000001e-12 + 6.103515625000000e-12 [DEBUG][rank 0][lsrkStep_TakeStepSSPs2][embedded solution] y_embedded(:) = 6.103515625000001e-12 -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = inf +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.002147483648 [DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 6.103515625e-08 [DEBUG][rank 0][arkAdapt][new-step-eta] eta = 10000 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 - 6.103515625000001e-12 6.103515625000001e-12 0.000000000000000e+00 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 8.07793566946316e-18 + 6.103515625000001e-12 6.103515625000000e-12 8.077935669463161e-28 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 6.103515625e-12, h = 6.103515625e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 0, tcur = 6.103515625e-12 [DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage] z_0(:) = - 6.103515625000001e-12 + 6.103515625000000e-12 [DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_0(:) = 1.000000000000000e+00 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 6.1041259765625e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 6.78778754340278e-09 [DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_1(:) = + 1.000000000000000e+00 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 1.35694715711806e-08 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_2(:) = + 9.999999999999998e-01 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 3, tcur = 2.03511555989583e-08 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_3(:) = + 9.999999999999996e-01 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 4, tcur = 2.71328396267361e-08 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_4(:) = + 9.999999999999993e-01 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 5, tcur = 3.39145236545139e-08 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_5(:) = + 9.999999999999989e-01 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 6, tcur = 4.06962076822917e-08 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_6(:) = + 9.999999999999984e-01 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 7, tcur = 4.74778917100694e-08 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_7(:) = + 9.999999999999978e-01 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 8, tcur = 5.42595757378472e-08 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_8(:) = + 9.999999999999971e-01 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 9, tcur = 6.1041259765625e-08 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_9(:) = 9.999999999999962e-01 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 6.1041259765625e-08 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 10, tcur = 6.1041259765625e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success [DEBUG][rank 0][lsrkStep_TakeStepSSPs2][updated solution] ycur(:) = - 6.104125976562489e-08 + 6.104125976562493e-08 [DEBUG][rank 0][lsrkStep_TakeStepSSPs2][embedded solution] y_embedded(:) = - 6.104125976562494e-08 -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.08388608256 + 6.104125976562493e-08 +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = inf [DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 1.220703125e-06 [DEBUG][rank 0][arkAdapt][new-step-eta] eta = 20 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 5.29395559722197e-13 - 6.104125976562500e-08 6.104125976562489e-08 3.970466940254533e-23 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 + 6.104125976562500e-08 6.104125976562493e-08 0.000000000000000e+00 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 3, tn = 6.1041259765625e-08, h = 1.220703125e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 0, tcur = 6.1041259765625e-08 [DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage] z_0(:) = - 6.104125976562489e-08 + 6.104125976562493e-08 [DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_0(:) = 9.999999999999962e-01 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 1.28174438476563e-06 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 1, tcur = 1.96674940321181e-07 [DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_1(:) = - 9.999999999983564e-01 + 9.999999999999614e-01 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 3.32308620876736e-07 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_2(:) = + 9.999999999998896e-01 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 3, tcur = 4.67942301432292e-07 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_3(:) = + 9.999999999997811e-01 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 4, tcur = 6.03575981987847e-07 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_4(:) = + 9.999999999996356e-01 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 5, tcur = 7.39209662543403e-07 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_5(:) = + 9.999999999994535e-01 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 6, tcur = 8.74843343098958e-07 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_6(:) = + 9.999999999992346e-01 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 7, tcur = 1.01047702365451e-06 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_7(:) = + 9.999999999989789e-01 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 8, tcur = 1.14611070421007e-06 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_8(:) = + 9.999999999986863e-01 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 9, tcur = 1.28174438476563e-06 +[DEBUG][rank 0][lsrkStep_TakeStepSSPs2][stage RHS] F_9(:) = + 9.999999999983570e-01 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 2, tcur = 1.28174438476563e-06 +[INFO][rank 0][lsrkStep_TakeStepSSPs2][begin-stages-list] stage = 10, tcur = 1.28174438476563e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs2][end-stages-list] status = success [DEBUG][rank 0][lsrkStep_TakeStepSSPs2][updated solution] ycur(:) = - 1.281744384764619e-06 + 1.281744384764889e-06 [DEBUG][rank 0][lsrkStep_TakeStepSSPs2][embedded solution] y_embedded(:) = - 1.281744384765008e-06 -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.0195833087394633 + 1.281744384764909e-06 +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.0860915657862948 [DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 2.44140625e-05 [DEBUG][rank 0][arkAdapt][new-step-eta] eta = 20 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 3.88550946397212e-09 - 1.281744384765625e-06 1.281744384764619e-06 3.038730698274802e-19 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 2.01047602983307e-10 + 1.281744384765625e-06 1.281744384764889e-06 3.388131789017201e-20 --------------------------------------------------------------------- Current time = 1.28174438476563e-06 Steps = 3 @@ -80,6 +176,6 @@ Inequality constraint fails = 0 Initial step size = 6.103515625e-12 Last step size = 1.220703125e-06 Current step size = 2.44140625e-05 -RHS fn evals = 8 -Number of stages used = 2 +RHS fn evals = 32 +Number of stages used = 10 End LSRKStep Logging test From 500392ceeaf5220a4892ba65587de8544e7037f9 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 27 Feb 2026 16:09:05 -0500 Subject: [PATCH 137/298] Updated SSP(s,2) logging output --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index 840a730b23..81baab21d3 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 840a730b2351cd2438c2ade7d3594aaa778190ff +Subproject commit 81baab21d3d0ef87112f96f54fcfa87fba588a48 From 77d5d5abfaf099248e7fc0950c5ae8742c0cc952 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 27 Feb 2026 16:34:27 -0500 Subject: [PATCH 138/298] Reverted RKC and RKL to use pointer swaps and a temporary vector for the evolving stage solution, as requested during PR review --- src/arkode/arkode_lsrkstep.c | 93 +++++++++++++++++------------------- 1 file changed, 45 insertions(+), 48 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 8205dddcd5..dc970b345c 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -578,6 +578,8 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) sunrealtype* cvals = step_mem->cvals; N_Vector* Xvecs = step_mem->Xvecs; + N_Vector tmp1 = ark_mem->tempv1; + N_Vector tmp2 = ark_mem->tempv2; /* Compute dominant eigenvalue and update stats */ if (step_mem->dom_eig_update) @@ -677,18 +679,17 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) bjm2 = bjm1; mus = w1 * bjm1; - /* Evaluate the first stage and initialize embedding */ + /* Evaluate the first stage (store in tmp2) and initialize embedding */ ark_mem->tcur = ark_mem->tn + ark_mem->h * mus; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 1, ark_mem->tcur); - N_VLinearSum(ONE, ark_mem->yn, ark_mem->h * mus, ark_mem->fn, ark_mem->ycur); - N_VScale(ONE, ark_mem->yn, ark_mem->tempv1); + N_VLinearSum(ONE, ark_mem->yn, ark_mem->h * mus, ark_mem->fn, tmp2); + N_VScale(ONE, ark_mem->yn, tmp1); /* apply user-supplied stage postprocessing function (if supplied) */ if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur, tmp2, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -716,8 +717,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PreRHSProcess(ark_mem->tcur, tmp2, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -726,11 +726,11 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } } - retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv3, - ark_mem->user_data); + /* store the rhs in ycur */ + retval = step_mem->fe(ark_mem->tcur, tmp2, ark_mem->ycur, ark_mem->user_data); step_mem->nfe++; - SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->tempv3, + SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->ycur, "F_%i(:) =", j - 1); SUNLogInfoIf(retval != 0, ARK_LOGGER, "end-stages-list", "status = failed rhs eval, retval = %i", retval); @@ -740,9 +740,6 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - /* Copy previous stage solution into tempv2 */ - N_VScale(ONE, ark_mem->ycur, ark_mem->tempv2); - /* Compute new stage value and store in ycur */ zj = TWO * w0 * zjm1 - zjm2; dzj = TWO * w0 * dzjm1 - dzjm2 + TWO * zjm1; @@ -757,13 +754,13 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, j, ark_mem->tcur); cvals[0] = mus * ark_mem->h; - Xvecs[0] = ark_mem->tempv3; + Xvecs[0] = ark_mem->ycur; cvals[1] = nu; - Xvecs[1] = ark_mem->tempv1; + Xvecs[1] = tmp1; cvals[2] = ONE - mu - nu; Xvecs[2] = ark_mem->yn; cvals[3] = mu; - Xvecs[3] = ark_mem->tempv2; + Xvecs[3] = tmp2; cvals[4] = -mus * ajm1 * ark_mem->h; Xvecs[4] = ark_mem->fn; retval = N_VLinearCombination(5, cvals, Xvecs, ark_mem->ycur); @@ -791,9 +788,11 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (j < step_mem->req_stages) { /* Swap tempv1 and tempv2 pointers to handle two-previous-stage logic */ - N_Vector temp = ark_mem->tempv1; - ark_mem->tempv1 = ark_mem->tempv2; - ark_mem->tempv2 = temp; + N_Vector temp = tmp1; + tmp1 = tmp2; + tmp2 = temp; + + N_VScale(ONE, ark_mem->ycur, tmp2); /* Update coefficients to handle the two-previous stage logic */ thjm2 = thjm1; @@ -829,11 +828,11 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } } - retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv3, + retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv2, ark_mem->user_data); step_mem->nfe++; - SUNLogExtraDebugVec(ARK_LOGGER, "solution RHS", ark_mem->tempv3, "F_n(:) ="); + SUNLogExtraDebugVec(ARK_LOGGER, "solution RHS", ark_mem->tempv2, "F_n(:) ="); SUNLogInfoIf(retval != 0, ARK_LOGGER, "end-compute-embedding", "status = failed rhs eval, retval = %i", retval); @@ -851,7 +850,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) cvals[2] = p4 * ark_mem->h; Xvecs[2] = ark_mem->fn; cvals[3] = p4 * ark_mem->h; - Xvecs[3] = ark_mem->tempv3; + Xvecs[3] = ark_mem->tempv2; retval = N_VLinearCombination(4, cvals, Xvecs, ark_mem->tempv1); if (retval != 0) @@ -861,11 +860,11 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) return ARK_VECTOROP_ERR; } *dsmPtr = N_VWrmsNorm(ark_mem->tempv1, ark_mem->ewt); - lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr, ark_mem->tempv3); + lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr, ark_mem->tempv2); } else { - lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr, ark_mem->tempv3); + lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr, ark_mem->tempv2); } SUNLogInfo(ARK_LOGGER, "end-compute-embedding", "status = success"); @@ -921,6 +920,8 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) sunrealtype* cvals = step_mem->cvals; N_Vector* Xvecs = step_mem->Xvecs; + N_Vector tmp1 = ark_mem->tempv1; + N_Vector tmp2 = ark_mem->tempv2; /* Compute dominant eigenvalue and update stats */ if (step_mem->dom_eig_update) @@ -1020,18 +1021,17 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) mus = w1 * bjm1; cjm1 = mus; - /* Evaluate the first stage and initialize embedding */ + /* Evaluate the first stage (store in tmp2) and initialize embedding */ ark_mem->tcur = ark_mem->tn + ark_mem->h * mus; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 1, ark_mem->tcur); - N_VLinearSum(ONE, ark_mem->yn, ark_mem->h * mus, ark_mem->fn, ark_mem->ycur); - N_VScale(ONE, ark_mem->yn, ark_mem->tempv1); + N_VLinearSum(ONE, ark_mem->yn, ark_mem->h * mus, ark_mem->fn, tmp2); + N_VScale(ONE, ark_mem->yn, tmp1); /* apply user-supplied stage postprocessing function (if supplied) */ if (ark_mem->PostProcessStage != NULL) { - retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PostProcessStage(ark_mem->tcur, tmp2, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1049,8 +1049,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRHSProcess != NULL) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PreRHSProcess(ark_mem->tcur, tmp2, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1060,11 +1059,10 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } /* Use the ycur array for temporary storage here */ - retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv3, - ark_mem->user_data); + retval = step_mem->fe(ark_mem->tcur, tmp2, ark_mem->ycur, ark_mem->user_data); step_mem->nfe++; - SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->tempv3, + SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->ycur, "F_%i(:) =", j - 1); SUNLogInfoIf(retval != 0, ARK_LOGGER, "end-stages-list", "status = failed rhs eval, retval = %i", retval); @@ -1074,9 +1072,6 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - /* Copy previous stage solution into tempv2 */ - N_VScale(ONE, ark_mem->ycur, ark_mem->tempv2); - /* Compute new stage value and store in ycur */ temj = (j + TWO) * (j - ONE); bj = temj / (TWO * j * (j + ONE)); @@ -1089,13 +1084,13 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, j, ark_mem->tcur); cvals[0] = mus * ark_mem->h; - Xvecs[0] = ark_mem->tempv3; + Xvecs[0] = ark_mem->ycur; cvals[1] = nu; - Xvecs[1] = ark_mem->tempv1; + Xvecs[1] = tmp1; cvals[2] = ONE - mu - nu; Xvecs[2] = ark_mem->yn; cvals[3] = mu; - Xvecs[3] = ark_mem->tempv2; + Xvecs[3] = tmp2; cvals[4] = -mus * ajm1 * ark_mem->h; Xvecs[4] = ark_mem->fn; retval = N_VLinearCombination(5, cvals, Xvecs, ark_mem->ycur); @@ -1123,9 +1118,11 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (j < step_mem->req_stages) { /* To avoid two data copies we swap ARKODE's tempv1 and tempv2 pointers*/ - N_Vector temp = ark_mem->tempv1; - ark_mem->tempv1 = ark_mem->tempv2; - ark_mem->tempv2 = temp; + N_Vector temp = tmp1; + tmp1 = tmp2; + tmp2 = temp; + + N_VScale(ONE, ark_mem->ycur, tmp2); cjm1 = cj; bjm2 = bjm1; @@ -1152,11 +1149,11 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) return ARK_PREPROCESS_RHS_FAIL; } } - retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv3, + retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv2, ark_mem->user_data); step_mem->nfe++; - SUNLogExtraDebugVec(ARK_LOGGER, "solution RHS", ark_mem->tempv3, "F_n(:) ="); + SUNLogExtraDebugVec(ARK_LOGGER, "solution RHS", ark_mem->tempv2, "F_n(:) ="); SUNLogInfoIf(retval != 0, ARK_LOGGER, "end-compute-embedding", "status = failed rhs eval, retval = %i", retval); @@ -1174,7 +1171,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) cvals[2] = p4 * ark_mem->h; Xvecs[2] = ark_mem->fn; cvals[3] = p4 * ark_mem->h; - Xvecs[3] = ark_mem->tempv3; + Xvecs[3] = ark_mem->tempv2; retval = N_VLinearCombination(4, cvals, Xvecs, ark_mem->tempv1); if (retval != 0) { @@ -1183,11 +1180,11 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) return ARK_VECTOROP_ERR; } *dsmPtr = N_VWrmsNorm(ark_mem->tempv1, ark_mem->ewt); - lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr, ark_mem->tempv3); + lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr, ark_mem->tempv2); } else { - lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr, ark_mem->tempv3); + lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr, ark_mem->tempv2); } SUNLogInfo(ARK_LOGGER, "end-compute-embedding", "status = success"); From 44bce062dc5750b9c867cd622e471c64073d0042 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Sun, 1 Mar 2026 11:04:09 -0500 Subject: [PATCH 139/298] Updated comments --- src/arkode/arkode_lsrkstep.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index dc970b345c..721e7f132e 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -711,7 +711,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Evaluate stages j = 2,...,step_mem->req_stages */ for (int j = 2; j <= step_mem->req_stages; j++) { - /* Evaluate RHS and store in tempv3 */ + /* Evaluate RHS and store in ycur */ ark_mem->tcur = ark_mem->tn + ark_mem->h * thjm1; /* apply user-supplied stage preprocessing function (if supplied) */ @@ -726,7 +726,6 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } } - /* store the rhs in ycur */ retval = step_mem->fe(ark_mem->tcur, tmp2, ark_mem->ycur, ark_mem->user_data); step_mem->nfe++; @@ -1043,7 +1042,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Evaluate stages j = 2,...,step_mem->req_stages */ for (int j = 2; j <= step_mem->req_stages; j++) { - /* Evaluate RHS and store in tempv3 */ + /* Evaluate RHS and store in ycur */ ark_mem->tcur = ark_mem->tn + ark_mem->h * cjm1; /* apply user-supplied stage preprocessing function (if supplied) */ @@ -1058,7 +1057,6 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } } - /* Use the ycur array for temporary storage here */ retval = step_mem->fe(ark_mem->tcur, tmp2, ark_mem->ycur, ark_mem->user_data); step_mem->nfe++; From 33380c23f221bf8af75a6e94d25e824c54667c23 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Sun, 1 Mar 2026 22:09:43 -0500 Subject: [PATCH 140/298] Removed extraneous RHS call from RKC and RKL at the end of a fixed step and when 'Reset' will be called thereafter --- src/arkode/arkode_lsrkstep.c | 156 +++++++++++++++--------------- src/arkode/arkode_lsrkstep_impl.h | 2 +- 2 files changed, 79 insertions(+), 79 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 721e7f132e..23a5b6d9cd 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -470,11 +470,11 @@ int lsrkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, break; case ARK_FULLRHS_END: - /* No further action is needed if STS since the currently available STS methods - evaluate the RHS at the end of each time step. If the stepper is an SSP, fn is - updated and reused at the beginning of the step unless - ark_mem->fn_is_current is changed by ARKODE. */ - if (step_mem->is_SSP) + /* No further action is needed for adaptive STS methods since the currently + available STS methods evaluate the RHS at the end of each time step. If + the stepper is an SSP, fn is updated and reused at the beginning of the + step unless ark_mem->fn_is_current is changed by ARKODE. */ + if (step_mem->is_SSP || !ark_mem->fixedstep) { /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRHSProcess != NULL) @@ -492,7 +492,7 @@ int lsrkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, } ark_mem->fn_is_current = SUNTRUE; } - N_VScale(ONE, ark_mem->fn, f); + if (ark_mem->fn != f) N_VScale(ONE, ark_mem->fn, f); break; @@ -632,8 +632,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogExtraDebugVec(ARK_LOGGER, "stage", ark_mem->yn, "z_0(:) ="); /* Compute RHS function for the start of the step, if necessary. */ - if ((!ark_mem->fn_is_current && ark_mem->initsetup) || - (step_mem->step_nst != ark_mem->nst)) + if ((!ark_mem->fn_is_current) || (step_mem->step_nst != ark_mem->nst)) { /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRHSProcess != NULL) @@ -809,38 +808,39 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); SUNLogExtraDebugVec(ARK_LOGGER, "updated solution", ark_mem->ycur, "ycur(:) ="); - SUNLogInfo(ARK_LOGGER, "begin-compute-embedding", ""); - - /* final stage processing */ - ark_mem->tcur = ark_mem->tn + ark_mem->h; - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* Compute yerr (if step adaptivity enabled) */ + if (!ark_mem->fixedstep) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); - if (retval != 0) + SUNLogInfo(ARK_LOGGER, "begin-compute-embedding", ""); + + /* compute RHS at end of step */ + ark_mem->tcur = ark_mem->tn + ark_mem->h; + + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreRHSProcess != NULL) { - SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); - return ARK_PREPROCESS_RHS_FAIL; + retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return ARK_PREPROCESS_RHS_FAIL; + } } - } - retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv2, - ark_mem->user_data); - step_mem->nfe++; + retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv2, + ark_mem->user_data); + step_mem->nfe++; - SUNLogExtraDebugVec(ARK_LOGGER, "solution RHS", ark_mem->tempv2, "F_n(:) ="); - SUNLogInfoIf(retval != 0, ARK_LOGGER, "end-compute-embedding", - "status = failed rhs eval, retval = %i", retval); + SUNLogExtraDebugVec(ARK_LOGGER, "solution RHS", ark_mem->tempv2, "F_n(:) ="); + SUNLogInfoIf(retval != 0, ARK_LOGGER, "end-compute-embedding", + "status = failed rhs eval, retval = %i", retval); - if (retval < 0) { return ARK_RHSFUNC_FAIL; } - if (retval > 0) { return RHSFUNC_RECVR; } + if (retval < 0) { return ARK_RHSFUNC_FAIL; } + if (retval > 0) { return RHSFUNC_RECVR; } - /* Compute yerr (if step adaptivity enabled) */ - if (!ark_mem->fixedstep) - { /* Estimate the local error and compute its weighted RMS norm */ cvals[0] = p8; Xvecs[0] = ark_mem->yn; @@ -859,14 +859,16 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) return ARK_VECTOROP_ERR; } *dsmPtr = N_VWrmsNorm(ark_mem->tempv1, ark_mem->ewt); - lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr, ark_mem->tempv2); - } - else - { - lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr, ark_mem->tempv2); - } + if (*dsmPtr <= ONE) + { + N_VScale(ONE, ark_mem->tempv2, ark_mem->fn); + ark_mem->fn_is_current = SUNTRUE; + } - SUNLogInfo(ARK_LOGGER, "end-compute-embedding", "status = success"); + SUNLogInfo(ARK_LOGGER, "end-compute-embedding", "status = success"); + } + else { ark_mem->fn_is_current = SUNFALSE; } + lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr); return ARK_SUCCESS; } @@ -979,8 +981,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogExtraDebugVec(ARK_LOGGER, "stage", ark_mem->yn, "z_0(:) ="); /* Compute RHS function for the start of the step, if necessary. */ - if ((!ark_mem->fn_is_current && ark_mem->initsetup) || - (step_mem->step_nst != ark_mem->nst)) + if ((!ark_mem->fn_is_current) || (step_mem->step_nst != ark_mem->nst)) { /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRHSProcess != NULL) @@ -1131,36 +1132,36 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); SUNLogExtraDebugVec(ARK_LOGGER, "updated solution", ark_mem->ycur, "ycur(:) ="); - /* final stage processing */ - SUNLogInfo(ARK_LOGGER, "begin-compute-embedding", ""); - ark_mem->tcur = ark_mem->tn + ark_mem->h; - - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* Compute yerr (if step adaptivity enabled) */ + if (!ark_mem->fixedstep) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); - if (retval != 0) + /* compute RHS at end of step */ + SUNLogInfo(ARK_LOGGER, "begin-compute-embedding", ""); + ark_mem->tcur = ark_mem->tn + ark_mem->h; + + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreRHSProcess != NULL) { - SUNLogInfo(ARK_LOGGER, "end-compute-embedding", - "status = failed preprocess rhs, retval = %i", retval); - return ARK_PREPROCESS_RHS_FAIL; + retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-compute-embedding", + "status = failed preprocess rhs, retval = %i", retval); + return ARK_PREPROCESS_RHS_FAIL; + } } - } - retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv2, - ark_mem->user_data); - step_mem->nfe++; + retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv2, + ark_mem->user_data); + step_mem->nfe++; - SUNLogExtraDebugVec(ARK_LOGGER, "solution RHS", ark_mem->tempv2, "F_n(:) ="); - SUNLogInfoIf(retval != 0, ARK_LOGGER, "end-compute-embedding", - "status = failed rhs eval, retval = %i", retval); + SUNLogExtraDebugVec(ARK_LOGGER, "solution RHS", ark_mem->tempv2, "F_n(:) ="); + SUNLogInfoIf(retval != 0, ARK_LOGGER, "end-compute-embedding", + "status = failed rhs eval, retval = %i", retval); - if (retval < 0) { return ARK_RHSFUNC_FAIL; } - if (retval > 0) { return RHSFUNC_RECVR; } + if (retval < 0) { return ARK_RHSFUNC_FAIL; } + if (retval > 0) { return RHSFUNC_RECVR; } - /* Compute yerr (if step adaptivity enabled) */ - if (!ark_mem->fixedstep) - { /* Estimate the local error and compute its weighted RMS norm */ cvals[0] = p8; Xvecs[0] = ark_mem->yn; @@ -1178,14 +1179,15 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) return ARK_VECTOROP_ERR; } *dsmPtr = N_VWrmsNorm(ark_mem->tempv1, ark_mem->ewt); - lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr, ark_mem->tempv2); - } - else - { - lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr, ark_mem->tempv2); + if (*dsmPtr <= ONE) + { + N_VScale(ONE, ark_mem->tempv2, ark_mem->fn); + ark_mem->fn_is_current = SUNTRUE; + } + SUNLogInfo(ARK_LOGGER, "end-compute-embedding", "status = success"); } - - SUNLogInfo(ARK_LOGGER, "end-compute-embedding", "status = success"); + else { ark_mem->fn_is_current = SUNFALSE; } + lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr); return ARK_SUCCESS; } @@ -2635,13 +2637,10 @@ int lsrkStep_AccessStepMem(ARKodeMem ark_mem, const char* fname, ---------------------------------------------------------------*/ void lsrkStep_DomEigUpdateLogic(ARKodeMem ark_mem, ARKodeLSRKStepMem step_mem, - sunrealtype dsm, N_Vector fnew) + sunrealtype dsm) { if (dsm <= ONE) { - N_VScale(ONE, fnew, ark_mem->fn); - ark_mem->fn_is_current = SUNTRUE; - step_mem->dom_eig_is_current = (step_mem->const_Jac == SUNTRUE); step_mem->dom_eig_update = SUNFALSE; @@ -2787,8 +2786,9 @@ int lsrkStep_DQJtimes(void* arkode_mem, N_Vector v, N_Vector Jv) N_Vector work = ark_mem->tempv3; /* Compute RHS function, if necessary. */ - if ((!ark_mem->fn_is_current && ark_mem->initsetup) || - (step_mem->step_nst != ark_mem->nst)) + // if ((!ark_mem->fn_is_current && ark_mem->initsetup) || + // (step_mem->step_nst != ark_mem->nst)) + if ((!ark_mem->fn_is_current) || (step_mem->step_nst != ark_mem->nst)) { /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRHSProcess != NULL) diff --git a/src/arkode/arkode_lsrkstep_impl.h b/src/arkode/arkode_lsrkstep_impl.h index f7113962ac..7dde8529bc 100644 --- a/src/arkode/arkode_lsrkstep_impl.h +++ b/src/arkode/arkode_lsrkstep_impl.h @@ -216,7 +216,7 @@ int lsrkStep_AccessARKODEStepMem(void* arkode_mem, const char* fname, int lsrkStep_AccessStepMem(ARKodeMem ark_mem, const char* fname, ARKodeLSRKStepMem* step_mem); void lsrkStep_DomEigUpdateLogic(ARKodeMem ark_mem, ARKodeLSRKStepMem step_mem, - sunrealtype dsm, N_Vector fnew); + sunrealtype dsm); int lsrkStep_ComputeNewDomEig(ARKodeMem ark_mem, ARKodeLSRKStepMem step_mem); int lsrkStep_DQJtimes(void* arkode_mem, N_Vector v, N_Vector Jv); From 7c088c58d94e7e741f38ed964a19afc7b253498a Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Sun, 1 Mar 2026 22:28:10 -0500 Subject: [PATCH 141/298] Revert "Removed extraneous RHS call from RKC and RKL at the end of a fixed step and when 'Reset' will be called thereafter" This reverts commit 33380c23f221bf8af75a6e94d25e824c54667c23. --- src/arkode/arkode_lsrkstep.c | 156 +++++++++++++++--------------- src/arkode/arkode_lsrkstep_impl.h | 2 +- 2 files changed, 79 insertions(+), 79 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 23a5b6d9cd..721e7f132e 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -470,11 +470,11 @@ int lsrkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, break; case ARK_FULLRHS_END: - /* No further action is needed for adaptive STS methods since the currently - available STS methods evaluate the RHS at the end of each time step. If - the stepper is an SSP, fn is updated and reused at the beginning of the - step unless ark_mem->fn_is_current is changed by ARKODE. */ - if (step_mem->is_SSP || !ark_mem->fixedstep) + /* No further action is needed if STS since the currently available STS methods + evaluate the RHS at the end of each time step. If the stepper is an SSP, fn is + updated and reused at the beginning of the step unless + ark_mem->fn_is_current is changed by ARKODE. */ + if (step_mem->is_SSP) { /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRHSProcess != NULL) @@ -492,7 +492,7 @@ int lsrkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, } ark_mem->fn_is_current = SUNTRUE; } - if (ark_mem->fn != f) N_VScale(ONE, ark_mem->fn, f); + N_VScale(ONE, ark_mem->fn, f); break; @@ -632,7 +632,8 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogExtraDebugVec(ARK_LOGGER, "stage", ark_mem->yn, "z_0(:) ="); /* Compute RHS function for the start of the step, if necessary. */ - if ((!ark_mem->fn_is_current) || (step_mem->step_nst != ark_mem->nst)) + if ((!ark_mem->fn_is_current && ark_mem->initsetup) || + (step_mem->step_nst != ark_mem->nst)) { /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRHSProcess != NULL) @@ -808,39 +809,38 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); SUNLogExtraDebugVec(ARK_LOGGER, "updated solution", ark_mem->ycur, "ycur(:) ="); + SUNLogInfo(ARK_LOGGER, "begin-compute-embedding", ""); - /* Compute yerr (if step adaptivity enabled) */ - if (!ark_mem->fixedstep) - { - SUNLogInfo(ARK_LOGGER, "begin-compute-embedding", ""); - - /* compute RHS at end of step */ - ark_mem->tcur = ark_mem->tn + ark_mem->h; + /* final stage processing */ + ark_mem->tcur = ark_mem->tn + ark_mem->h; - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreRHSProcess != NULL) + { + retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); - if (retval != 0) - { - SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed preprocess stage, retval = %i", retval); - return ARK_PREPROCESS_RHS_FAIL; - } + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed preprocess stage, retval = %i", retval); + return ARK_PREPROCESS_RHS_FAIL; } + } - retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv2, - ark_mem->user_data); - step_mem->nfe++; + retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv2, + ark_mem->user_data); + step_mem->nfe++; - SUNLogExtraDebugVec(ARK_LOGGER, "solution RHS", ark_mem->tempv2, "F_n(:) ="); - SUNLogInfoIf(retval != 0, ARK_LOGGER, "end-compute-embedding", - "status = failed rhs eval, retval = %i", retval); + SUNLogExtraDebugVec(ARK_LOGGER, "solution RHS", ark_mem->tempv2, "F_n(:) ="); + SUNLogInfoIf(retval != 0, ARK_LOGGER, "end-compute-embedding", + "status = failed rhs eval, retval = %i", retval); - if (retval < 0) { return ARK_RHSFUNC_FAIL; } - if (retval > 0) { return RHSFUNC_RECVR; } + if (retval < 0) { return ARK_RHSFUNC_FAIL; } + if (retval > 0) { return RHSFUNC_RECVR; } + /* Compute yerr (if step adaptivity enabled) */ + if (!ark_mem->fixedstep) + { /* Estimate the local error and compute its weighted RMS norm */ cvals[0] = p8; Xvecs[0] = ark_mem->yn; @@ -859,16 +859,14 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) return ARK_VECTOROP_ERR; } *dsmPtr = N_VWrmsNorm(ark_mem->tempv1, ark_mem->ewt); - if (*dsmPtr <= ONE) - { - N_VScale(ONE, ark_mem->tempv2, ark_mem->fn); - ark_mem->fn_is_current = SUNTRUE; - } - - SUNLogInfo(ARK_LOGGER, "end-compute-embedding", "status = success"); + lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr, ark_mem->tempv2); + } + else + { + lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr, ark_mem->tempv2); } - else { ark_mem->fn_is_current = SUNFALSE; } - lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr); + + SUNLogInfo(ARK_LOGGER, "end-compute-embedding", "status = success"); return ARK_SUCCESS; } @@ -981,7 +979,8 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogExtraDebugVec(ARK_LOGGER, "stage", ark_mem->yn, "z_0(:) ="); /* Compute RHS function for the start of the step, if necessary. */ - if ((!ark_mem->fn_is_current) || (step_mem->step_nst != ark_mem->nst)) + if ((!ark_mem->fn_is_current && ark_mem->initsetup) || + (step_mem->step_nst != ark_mem->nst)) { /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRHSProcess != NULL) @@ -1132,36 +1131,36 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); SUNLogExtraDebugVec(ARK_LOGGER, "updated solution", ark_mem->ycur, "ycur(:) ="); - /* Compute yerr (if step adaptivity enabled) */ - if (!ark_mem->fixedstep) - { - /* compute RHS at end of step */ - SUNLogInfo(ARK_LOGGER, "begin-compute-embedding", ""); - ark_mem->tcur = ark_mem->tn + ark_mem->h; + /* final stage processing */ + SUNLogInfo(ARK_LOGGER, "begin-compute-embedding", ""); + ark_mem->tcur = ark_mem->tn + ark_mem->h; - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* apply user-supplied stage preprocessing function (if supplied) */ + if (ark_mem->PreRHSProcess != NULL) + { + retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); - if (retval != 0) - { - SUNLogInfo(ARK_LOGGER, "end-compute-embedding", - "status = failed preprocess rhs, retval = %i", retval); - return ARK_PREPROCESS_RHS_FAIL; - } + SUNLogInfo(ARK_LOGGER, "end-compute-embedding", + "status = failed preprocess rhs, retval = %i", retval); + return ARK_PREPROCESS_RHS_FAIL; } - retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv2, - ark_mem->user_data); - step_mem->nfe++; + } + retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->tempv2, + ark_mem->user_data); + step_mem->nfe++; - SUNLogExtraDebugVec(ARK_LOGGER, "solution RHS", ark_mem->tempv2, "F_n(:) ="); - SUNLogInfoIf(retval != 0, ARK_LOGGER, "end-compute-embedding", - "status = failed rhs eval, retval = %i", retval); + SUNLogExtraDebugVec(ARK_LOGGER, "solution RHS", ark_mem->tempv2, "F_n(:) ="); + SUNLogInfoIf(retval != 0, ARK_LOGGER, "end-compute-embedding", + "status = failed rhs eval, retval = %i", retval); - if (retval < 0) { return ARK_RHSFUNC_FAIL; } - if (retval > 0) { return RHSFUNC_RECVR; } + if (retval < 0) { return ARK_RHSFUNC_FAIL; } + if (retval > 0) { return RHSFUNC_RECVR; } + /* Compute yerr (if step adaptivity enabled) */ + if (!ark_mem->fixedstep) + { /* Estimate the local error and compute its weighted RMS norm */ cvals[0] = p8; Xvecs[0] = ark_mem->yn; @@ -1179,15 +1178,14 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) return ARK_VECTOROP_ERR; } *dsmPtr = N_VWrmsNorm(ark_mem->tempv1, ark_mem->ewt); - if (*dsmPtr <= ONE) - { - N_VScale(ONE, ark_mem->tempv2, ark_mem->fn); - ark_mem->fn_is_current = SUNTRUE; - } - SUNLogInfo(ARK_LOGGER, "end-compute-embedding", "status = success"); + lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr, ark_mem->tempv2); + } + else + { + lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr, ark_mem->tempv2); } - else { ark_mem->fn_is_current = SUNFALSE; } - lsrkStep_DomEigUpdateLogic(ark_mem, step_mem, *dsmPtr); + + SUNLogInfo(ARK_LOGGER, "end-compute-embedding", "status = success"); return ARK_SUCCESS; } @@ -2637,10 +2635,13 @@ int lsrkStep_AccessStepMem(ARKodeMem ark_mem, const char* fname, ---------------------------------------------------------------*/ void lsrkStep_DomEigUpdateLogic(ARKodeMem ark_mem, ARKodeLSRKStepMem step_mem, - sunrealtype dsm) + sunrealtype dsm, N_Vector fnew) { if (dsm <= ONE) { + N_VScale(ONE, fnew, ark_mem->fn); + ark_mem->fn_is_current = SUNTRUE; + step_mem->dom_eig_is_current = (step_mem->const_Jac == SUNTRUE); step_mem->dom_eig_update = SUNFALSE; @@ -2786,9 +2787,8 @@ int lsrkStep_DQJtimes(void* arkode_mem, N_Vector v, N_Vector Jv) N_Vector work = ark_mem->tempv3; /* Compute RHS function, if necessary. */ - // if ((!ark_mem->fn_is_current && ark_mem->initsetup) || - // (step_mem->step_nst != ark_mem->nst)) - if ((!ark_mem->fn_is_current) || (step_mem->step_nst != ark_mem->nst)) + if ((!ark_mem->fn_is_current && ark_mem->initsetup) || + (step_mem->step_nst != ark_mem->nst)) { /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRHSProcess != NULL) diff --git a/src/arkode/arkode_lsrkstep_impl.h b/src/arkode/arkode_lsrkstep_impl.h index 7dde8529bc..f7113962ac 100644 --- a/src/arkode/arkode_lsrkstep_impl.h +++ b/src/arkode/arkode_lsrkstep_impl.h @@ -216,7 +216,7 @@ int lsrkStep_AccessARKODEStepMem(void* arkode_mem, const char* fname, int lsrkStep_AccessStepMem(ARKodeMem ark_mem, const char* fname, ARKodeLSRKStepMem* step_mem); void lsrkStep_DomEigUpdateLogic(ARKodeMem ark_mem, ARKodeLSRKStepMem step_mem, - sunrealtype dsm); + sunrealtype dsm, N_Vector fnew); int lsrkStep_ComputeNewDomEig(ARKodeMem ark_mem, ARKodeLSRKStepMem step_mem); int lsrkStep_DQJtimes(void* arkode_mem, N_Vector v, N_Vector Jv); From f9b311e83df36807625900292024958126a4d649 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 3 Mar 2026 08:59:48 -0500 Subject: [PATCH 142/298] Apply suggestions from code review Co-authored-by: David Gardner --- src/arkode/arkode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 345ecf3cd5..329d1707df 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -1161,7 +1161,7 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, break; } - /* In ONE_STEP mode, copy y and exit loop */ + /* In ONE_STEP mode, exit loop (arkCompleteStep already copied yn to ycur, an alias to yout) */ if (itask == ARK_ONE_STEP) { istate = ARK_SUCCESS; From 75590c079a08aeec948e0501425be7508c198c39 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 3 Mar 2026 09:01:59 -0500 Subject: [PATCH 143/298] Additional fix for bad merge --- CHANGELOG.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d54aef0aa..f57989fdfe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,8 +55,6 @@ failing the step. The functions `CVodeGetUserDataB` and `IDAGetUserDataB` were added to CVODES and IDAS, respectively. -Removed extraneous copy of output vector when using ARKODE in `ARK_ONE_STEP` mode. - ### Bug Fixes Fixed a bug in the CVODE(S) inequality constraint handling where the predicted From 603c9d17167a191d533be240e51534c5cb8db759 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 3 Mar 2026 09:14:43 -0500 Subject: [PATCH 144/298] Formatting --- src/arkode/arkode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 329d1707df..61b41aa021 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -1161,7 +1161,7 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, break; } - /* In ONE_STEP mode, exit loop (arkCompleteStep already copied yn to ycur, an alias to yout) */ + /* In ONE_STEP mode, exit loop (arkCompleteStep already copied yn to ycur, an alias to yout) */ if (itask == ARK_ONE_STEP) { istate = ARK_SUCCESS; From b0f6a4aedb9e02f65077cbe40f110f22240399db Mon Sep 17 00:00:00 2001 From: David Gardner Date: Tue, 3 Mar 2026 18:12:34 -0800 Subject: [PATCH 145/298] Merging feature/stageprocessing-updates (#853) This PR * Replaces `PreProcessStep` with `PreStepFn` -- removes "process" from the name, adds the current step and attempt index as inputs, and always call before a step attempt * Removes `PostProcessStepFail` -- users can handle this case by checking the attempt index in `PreProcessStep` * Replaces `PostProcessStep` call in `arkCompleteStep` with a `PostStepFn` * Replaces `PostProcessStage` calls on the new state in `TakeStep` functions with `PostProcessStep` calls and account cases where the last stage is the new state * Replaces `PreRHSProcess` with `PreRhsFn` to remove the idea of processing from the name --- include/arkode/arkode.h | 30 +- src/arkode/arkode.c | 77 ++--- src/arkode/arkode_arkstep.c | 95 ++--- src/arkode/arkode_arkstep_nls.c | 94 +++-- src/arkode/arkode_bandpre.c | 8 +- src/arkode/arkode_erkstep.c | 132 ++++--- src/arkode/arkode_impl.h | 30 +- src/arkode/arkode_io.c | 135 +++----- src/arkode/arkode_ls.c | 24 +- src/arkode/arkode_lsrkstep.c | 479 ++++++++++++++------------ src/arkode/arkode_mristep.c | 158 +++++---- src/arkode/arkode_mristep_nls.c | 18 +- src/arkode/arkode_sprkstep.c | 50 ++- src/arkode/fmod_int32/farkode_mod.c | 28 +- src/arkode/fmod_int32/farkode_mod.f90 | 60 ++-- src/arkode/fmod_int64/farkode_mod.c | 28 +- src/arkode/fmod_int64/farkode_mod.f90 | 60 ++-- 17 files changed, 787 insertions(+), 719 deletions(-) diff --git a/include/arkode/arkode.h b/include/arkode/arkode.h index f88ab948f1..5c6094b6ed 100644 --- a/include/arkode/arkode.h +++ b/include/arkode/arkode.h @@ -125,12 +125,12 @@ extern "C" { /* ARK_POSTPROCESS_FAIL equals ARK_POSTPROCESS_STEP_FAIL for backwards compatibility. */ -#define ARK_POSTPROCESS_FAIL -37 -#define ARK_POSTPROCESS_STEP_FAIL -37 -#define ARK_POSTPROCESS_STAGE_FAIL -38 -#define ARK_POSTPROCESS_FAILED_STEP_FAIL -39 -#define ARK_PREPROCESS_STEP_FAIL -40 -#define ARK_PREPROCESS_RHS_FAIL -41 +#define ARK_POSTPROCESS_FAIL -37 +#define ARK_POSTPROCESS_STEP_FAIL -37 +#define ARK_POSTPROCESS_STAGE_FAIL -38 +#define ARK_PRESTEPFN_FAIL -39 +#define ARK_POSTSTEPFN_FAIL -40 +#define ARK_PRERHSFN_FAIL -41 #define ARK_USER_PREDICT_FAIL -42 #define ARK_INTERP_FAIL -43 @@ -186,8 +186,16 @@ typedef int (*ARKExpStabFn)(N_Vector y, sunrealtype t, sunrealtype* hstab, typedef int (*ARKVecResizeFn)(N_Vector y, N_Vector ytemplate, void* user_data); +typedef int (*ARKPreStepFn)(sunrealtype t, N_Vector y, long int step, + int attempt, void* user_data); + +typedef int (*ARKPostStepFn)(sunrealtype t, N_Vector y, long int step, + void* user_data); + typedef int (*ARKPostProcessFn)(sunrealtype t, N_Vector y, void* user_data); +typedef int (*ARKPreRhsFn)(sunrealtype t, N_Vector y, void* user_data); + typedef int (*ARKStagePredictFn)(sunrealtype t, N_Vector zpred, void* user_data); typedef int (*ARKRelaxFn)(N_Vector y, sunrealtype* r, void* user_data); @@ -279,14 +287,12 @@ SUNDIALS_EXPORT int ARKodeClearStopTime(void* arkode_mem); SUNDIALS_EXPORT int ARKodeSetFixedStep(void* arkode_mem, sunrealtype hfixed); SUNDIALS_EXPORT int ARKodeSetStepDirection(void* arkode_mem, sunrealtype stepdir); SUNDIALS_EXPORT int ARKodeSetUserData(void* arkode_mem, void* user_data); -SUNDIALS_EXPORT int ARKodeSetPreprocessStepFn(void* arkode_mem, - ARKPostProcessFn ProcessStep); +SUNDIALS_EXPORT int ARKodeSetPreStepFn(void* arkode_mem, ARKPreStepFn prestep_fn); +SUNDIALS_EXPORT int ARKodeSetPostStepFn(void* arkode_mem, + ARKPostStepFn poststep_fn); +SUNDIALS_EXPORT int ARKodeSetPreRhsFn(void* arkode_mem, ARKPreRhsFn prerhs_fn); SUNDIALS_EXPORT int ARKodeSetPostprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep); -SUNDIALS_EXPORT int ARKodeSetPostprocessStepFailFn(void* arkode_mem, - ARKPostProcessFn ProcessStep); -SUNDIALS_EXPORT int ARKodeSetPreRHSProcessFn(void* arkode_mem, - ARKPostProcessFn PreRHSProcess); SUNDIALS_EXPORT int ARKodeSetPostprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStage); diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 7f114524af..2793ac89f9 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -663,7 +663,6 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, int ewtsetOK; sunrealtype troundoff, nrm; sunbooleantype inactive_roots; - sunbooleantype skip_preprocess; sunrealtype dsm; int nflag, ncf, nef, constrfails; int relax_fails; @@ -888,11 +887,10 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, } /* Looping point for step attempts */ - dsm = ZERO; - kflag = ARK_SUCCESS; - skip_preprocess = SUNFALSE; - relax_fails = 0; - nflag = FIRST_CALL; + dsm = ZERO; + kflag = ARK_SUCCESS; + relax_fails = 0; + nflag = FIRST_CALL; attempts = ncf = nef = constrfails = ark_mem->last_kflag = 0; for (;;) { @@ -913,14 +911,13 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, /* fill tcur with the last accepted step time */ ark_mem->tcur = ark_mem->tn; - /* call the user-supplied step preprocessing function (if it exists) */ - if (ark_mem->PreProcessStep != NULL && !skip_preprocess) + /* call the user-supplied pre-step function (if it exists) */ + if (ark_mem->PreStepFn) { - retval = ark_mem->PreProcessStep(ark_mem->tcur, ark_mem->ycur, - ark_mem->ps_data); - if (retval != 0) { return (ARK_PREPROCESS_STEP_FAIL); } + retval = ark_mem->PreStepFn(ark_mem->tcur, ark_mem->ycur, ark_mem->nst, + attempts, ark_mem->user_data); + if (retval != 0) { return (ARK_PRESTEPFN_FAIL); } } - skip_preprocess = SUNFALSE; /* Call time stepper module to attempt a step: 0 => step completed successfully @@ -1019,16 +1016,6 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, ark_mem->h *= ark_mem->eta; ark_mem->next_h = ark_mem->hprime = ark_mem->h; - /* since the previous step attempt failed, call the user-supplied - step failure postprocessing function (if it exists) */ - if (ark_mem->PostProcessStepFail != NULL) - { - retval = ark_mem->PostProcessStepFail(ark_mem->tn, ark_mem->yn, - ark_mem->ps_data); - if (retval != 0) { return (ARK_POSTPROCESS_FAILED_STEP_FAIL); } - skip_preprocess = SUNTRUE; - } - /* reset (tcur,ycur) to last saved state before reattempting step */ ark_mem->tcur = ark_mem->tn; N_VScale(ONE, ark_mem->yn, ark_mem->ycur); @@ -1619,15 +1606,16 @@ ARKodeMem arkCreate(SUNContext sunctx) ark_mem->VRabstolMallocDone = SUNFALSE; ark_mem->MallocDone = SUNFALSE; - /* No user-supplied step pre- or post-processing functions yet */ - ark_mem->PreProcessStep = NULL; - ark_mem->PostProcessStep = NULL; - ark_mem->PostProcessStepFail = NULL; - ark_mem->ps_data = NULL; + /* No user-supplied pre- or post-step functions yet */ + ark_mem->PreStepFn = NULL; + ark_mem->PostStepFn = NULL; - /* No user-supplied stage pre- or post-processing functions yet */ - ark_mem->PreRHSProcess = NULL; - ark_mem->PostProcessStage = NULL; + /* No user-supplied pre-RHS function yet */ + ark_mem->PreRhsFn = NULL; + + /* No user-supplied stage/step post-processing functions yet */ + ark_mem->PostProcessStepFn = NULL; + ark_mem->PostProcessStageFn = NULL; /* No user_data pointer yet */ ark_mem->user_data = NULL; @@ -2761,12 +2749,12 @@ int arkCompleteStep(ARKodeMem ark_mem, sunrealtype dsm) else /* ARK_ACCUMERROR_AVG */ { ark_mem->AccumError += (dsm * ark_mem->h); } } - /* apply user-supplied step postprocessing function (if supplied) */ - if (ark_mem->PostProcessStep != NULL) + /* call the user-supplied post-step function (if supplied) */ + if (ark_mem->PostStepFn) { - retval = ark_mem->PostProcessStep(ark_mem->tcur, ark_mem->ycur, - ark_mem->ps_data); - if (retval != 0) { return (ARK_POSTPROCESS_STEP_FAIL); } + retval = ark_mem->PostStepFn(ark_mem->tcur, ark_mem->ycur, ark_mem->nst, + ark_mem->user_data); + if (retval != 0) { return (ARK_POSTSTEPFN_FAIL); } } /* update interpolation structure @@ -2899,18 +2887,17 @@ int arkHandleFailure(ARKodeMem ark_mem, int flag) arkProcessError(ark_mem, ARK_POSTPROCESS_STAGE_FAIL, __LINE__, __func__, __FILE__, MSG_ARK_POSTPROCESS_STAGE_FAIL, ark_mem->tcur); break; - case ARK_POSTPROCESS_FAILED_STEP_FAIL: - arkProcessError(ark_mem, ARK_POSTPROCESS_FAILED_STEP_FAIL, __LINE__, - __func__, __FILE__, MSG_ARK_POSTPROCESS_FAILED_STEP_FAIL, - ark_mem->tcur); + case ARK_PRESTEPFN_FAIL: + arkProcessError(ark_mem, ARK_PRESTEPFN_FAIL, __LINE__, __func__, __FILE__, + MSG_ARK_PRESTEPFN_FAIL, ark_mem->tcur); break; - case ARK_PREPROCESS_STEP_FAIL: - arkProcessError(ark_mem, ARK_PREPROCESS_STEP_FAIL, __LINE__, __func__, - __FILE__, MSG_ARK_PREPROCESS_STEP_FAIL, ark_mem->tcur); + case ARK_POSTSTEPFN_FAIL: + arkProcessError(ark_mem, ARK_POSTSTEPFN_FAIL, __LINE__, __func__, __FILE__, + MSG_ARK_POSTSTEPFN_FAIL, ark_mem->tcur); break; - case ARK_PREPROCESS_RHS_FAIL: - arkProcessError(ark_mem, ARK_PREPROCESS_RHS_FAIL, __LINE__, __func__, - __FILE__, MSG_ARK_PREPROCESS_RHS_FAIL, ark_mem->tcur); + case ARK_PRERHSFN_FAIL: + arkProcessError(ark_mem, ARK_PRERHSFN_FAIL, __LINE__, __func__, __FILE__, + MSG_ARK_PRERHSFN_FAIL, ark_mem->tcur); break; case ARK_INTERP_FAIL: arkProcessError(ark_mem, ARK_INTERP_FAIL, __LINE__, __func__, __FILE__, diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index b9ccac6495..5dba291bbc 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1330,11 +1330,11 @@ int arkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, /* compute the full RHS */ if (!(ark_mem->fn_is_current)) { - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } + retval = ark_mem->PreRhsFn(t, y, ark_mem->user_data); + if (retval != 0) { return (ARK_PRERHSFN_FAIL); } } /* compute the implicit component */ @@ -1462,11 +1462,11 @@ int arkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, /* recompute RHS functions */ if (recomputeRHS) { - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } + retval = ark_mem->PreRhsFn(t, y, ark_mem->user_data); + if (retval != 0) { return (ARK_PRERHSFN_FAIL); } } /* compute the implicit component */ @@ -1578,11 +1578,11 @@ int arkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, case ARK_FULLRHS_OTHER: - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } + retval = ark_mem->PreRhsFn(t, y, ark_mem->user_data); + if (retval != 0) { return (ARK_PRERHSFN_FAIL); } } /* compute the implicit component and store in sdata */ @@ -1866,16 +1866,16 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } else { - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tn, ark_mem->yn, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tn, ark_mem->yn, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess rhs, retval = %i", retval); - return (ARK_PREPROCESS_RHS_FAIL); + return (ARK_PRERHSFN_FAIL); } } retval = step_mem->fi(ark_mem->tn, ark_mem->yn, step_mem->Fi[0], @@ -2045,13 +2045,27 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) "z_%i(:) =", is); } - /* apply user-supplied stage postprocessing function (if supplied) */ + /* apply user-supplied stage postprocessing function (if supplied) unless + this is the last stage of a FSAL method, then apply the user-supplied + step postprocessing function instead (if supplied) */ /* NOTE: with internally inconsistent IMEX methods (c_i^E != c_i^I) the value of tcur corresponds to the stage time from the implicit table (c_i^I). */ - if (ark_mem->PostProcessStage != NULL) + if (is == step_mem->stages - 1 && stiffly_accurate && + ark_mem->PostProcessStepFn) { - retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PostProcessStepFn(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed postprocess step, retval = %i", retval); + return (ARK_POSTPROCESS_STEP_FAIL); + } + } + else if (ark_mem->PostProcessStageFn) + { + retval = ark_mem->PostProcessStageFn(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -2101,20 +2115,20 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } } - /* apply user-supplied stage preprocessing function (if supplied) */ + /* call the user-supplied pre-RHS function (if supplied) */ /* NOTE: with internally inconsistent IMEX methods (c_i^E != c_i^I) the value of tcur corresponds to the stage time from the implicit table (c_i^I). */ - if (ark_mem->PreRHSProcess != NULL) + if (ark_mem->PreRhsFn) { if ((step_mem->implicit && !deduce_stage) || (step_mem->explicit)) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess rhs, retval = %i", retval); - return (ARK_PREPROCESS_RHS_FAIL); + return (ARK_PRERHSFN_FAIL); } } } @@ -2223,6 +2237,8 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* compute time-evolved solution (in ark_ycur), error estimate (in dsm). This can fail recoverably due to nonconvergence of the mass matrix solve, so handle that appropriately. */ + ark_mem->tcur = ark_mem->tn + ark_mem->h; + if (step_mem->mass_type == MASS_FIXED) { *nflagPtr = arkStep_ComputeSolutions_MassFixed(ark_mem, dsmPtr); @@ -2235,19 +2251,6 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (*nflagPtr < 0) { return (*nflagPtr); } if (*nflagPtr > 0) { return (TRY_AGAIN); } - /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->PostProcessStage != NULL) - { - retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); - if (retval != 0) - { - SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed postprocess stage, retval = %i", retval); - return (ARK_POSTPROCESS_STAGE_FAIL); - } - } - if (ark_mem->checkpoint_scheme) { sunbooleantype do_save; @@ -3329,6 +3332,13 @@ int arkStep_ComputeSolutions(ARKodeMem ark_mem, sunrealtype* dsmPtr) /* call fused vector operation to do the work */ retval = N_VLinearCombination(nvec, cvals, Xvecs, y); if (retval != 0) { return (ARK_VECTOROP_ERR); } + + if (ark_mem->PostProcessStepFn) + { + retval = ark_mem->PostProcessStepFn(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) { return (ARK_POSTPROCESS_STEP_FAIL); } + } } /* Compute yerr (if temporal error estimation is enabled). */ @@ -3489,6 +3499,13 @@ int arkStep_ComputeSolutions_MassFixed(ARKodeMem ark_mem, sunrealtype* dsmPtr) /* compute y = yn + update */ N_VLinearSum(ONE, ark_mem->yn, ONE, y, y); + + if (ark_mem->PostProcessStepFn) + { + retval = ark_mem->PostProcessStepFn(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) { return (ARK_POSTPROCESS_STEP_FAIL); } + } } /* compute yerr (if step adaptivity enabled) */ diff --git a/src/arkode/arkode_arkstep_nls.c b/src/arkode/arkode_arkstep_nls.c index f6819ef0b7..0c5b87f9f9 100644 --- a/src/arkode/arkode_arkstep_nls.c +++ b/src/arkode/arkode_arkstep_nls.c @@ -584,12 +584,11 @@ int arkStep_NlsResidual_MassIdent(N_Vector zcor, N_Vector r, void* arkode_mem) /* update 'ycur' value as stored predictor + current corrector */ N_VLinearSum(ONE, step_mem->zpred, ONE, zcor, ark_mem->ycur); - /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied), then call RHS */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); - if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); + if (retval != 0) { return (ARK_PRERHSFN_FAIL); } } retval = step_mem->nls_fi(ark_mem->tcur, ark_mem->ycur, step_mem->Fi[step_mem->istage], ark_mem->user_data); @@ -637,12 +636,12 @@ int arkStep_NlsResidual_MassIdent_TrivialPredAutonomous(N_Vector zcor, N_Vector } else { - /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied), then call RHS */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); - if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) { return (ARK_PRERHSFN_FAIL); } } retval = step_mem->nls_fi(ark_mem->tcur, ark_mem->ycur, step_mem->Fi[step_mem->istage], ark_mem->user_data); @@ -711,12 +710,11 @@ int arkStep_NlsResidual_MassFixed(N_Vector zcor, N_Vector r, void* arkode_mem) /* update 'ycur' value as stored predictor + current corrector */ N_VLinearSum(ONE, step_mem->zpred, ONE, zcor, ark_mem->ycur); - /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied), then call RHS */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); - if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); + if (retval != 0) { return (ARK_PRERHSFN_FAIL); } } retval = step_mem->nls_fi(ark_mem->tcur, ark_mem->ycur, step_mem->Fi[step_mem->istage], ark_mem->user_data); @@ -767,12 +765,12 @@ int arkStep_NlsResidual_MassFixed_TrivialPredAutonomous(N_Vector zcor, N_Vector } else { - /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied), then call RHS */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); - if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) { return (ARK_PRERHSFN_FAIL); } } retval = step_mem->nls_fi(ark_mem->tcur, ark_mem->ycur, step_mem->Fi[step_mem->istage], ark_mem->user_data); @@ -847,12 +845,11 @@ int arkStep_NlsResidual_MassTDep(N_Vector zcor, N_Vector r, void* arkode_mem) retval = step_mem->mmult((void*)ark_mem, step_mem->Fi[step_mem->istage], r); if (retval != ARK_SUCCESS) { return (ARK_MASSMULT_FAIL); } - /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied), then call RHS */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); - if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); + if (retval != 0) { return (ARK_PRERHSFN_FAIL); } } retval = step_mem->nls_fi(ark_mem->tcur, ark_mem->ycur, step_mem->Fi[step_mem->istage], ark_mem->user_data); @@ -918,12 +915,11 @@ int arkStep_NlsFPFunction_MassIdent(N_Vector zcor, N_Vector g, void* arkode_mem) /* update 'ycur' value as stored predictor + current corrector */ N_VLinearSum(ONE, step_mem->zpred, ONE, zcor, ark_mem->ycur); - /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied), then call RHS */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); - if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); + if (retval != 0) { return (ARK_PRERHSFN_FAIL); } } retval = step_mem->nls_fi(ark_mem->tcur, ark_mem->ycur, step_mem->Fi[step_mem->istage], ark_mem->user_data); @@ -964,12 +960,12 @@ int arkStep_NlsFPFunction_MassIdent_TrivialPredAutonomous(N_Vector zcor, } else { - /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied), then call RHS */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); - if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) { return (ARK_PRERHSFN_FAIL); } } retval = step_mem->nls_fi(ark_mem->tcur, ark_mem->ycur, step_mem->Fi[step_mem->istage], ark_mem->user_data); @@ -1039,12 +1035,11 @@ int arkStep_NlsFPFunction_MassFixed(N_Vector zcor, N_Vector g, void* arkode_mem) /* update 'ycur' value as stored predictor + current corrector */ N_VLinearSum(ONE, step_mem->zpred, ONE, zcor, ark_mem->ycur); - /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied), then call RHS */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); - if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); + if (retval != 0) { return (ARK_PRERHSFN_FAIL); } } retval = step_mem->nls_fi(ark_mem->tcur, ark_mem->ycur, step_mem->Fi[step_mem->istage], ark_mem->user_data); @@ -1090,12 +1085,12 @@ int arkStep_NlsFPFunction_MassFixed_TrivialPredAutonomous(N_Vector zcor, } else { - /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied), then call RHS */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); - if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) { return (ARK_PRERHSFN_FAIL); } } retval = step_mem->nls_fi(ark_mem->tcur, ark_mem->ycur, step_mem->Fi[step_mem->istage], ark_mem->user_data); @@ -1166,12 +1161,11 @@ int arkStep_NlsFPFunction_MassTDep(N_Vector zcor, N_Vector g, void* arkode_mem) /* update 'ycur' value as stored predictor + current corrector */ N_VLinearSum(ONE, step_mem->zpred, ONE, zcor, ark_mem->ycur); - /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied), then call RHS */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); - if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); + if (retval != 0) { return (ARK_PRERHSFN_FAIL); } } retval = step_mem->nls_fi(ark_mem->tcur, ark_mem->ycur, step_mem->Fi[step_mem->istage], ark_mem->user_data); diff --git a/src/arkode/arkode_bandpre.c b/src/arkode/arkode_bandpre.c index 58b248412b..814520405f 100644 --- a/src/arkode/arkode_bandpre.c +++ b/src/arkode/arkode_bandpre.c @@ -538,11 +538,11 @@ static int ARKBandPDQJac(ARKBandPrecData pdata, sunrealtype t, N_Vector y, ytemp_data[j] += inc; } - /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied), then call RHS */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(t, ytemp, ark_mem->user_data); - if (retval != 0) { return (ARK_POSTPROCESS_STAGE_FAIL); } + retval = ark_mem->PreRhsFn(t, ytemp, ark_mem->user_data); + if (retval != 0) { return (ARK_PRERHSFN_FAIL); } } retval = fi(t, ytemp, ftemp, ark_mem->user_data); pdata->nfeBP++; diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index 5a3e0bdeb3..93db20db1d 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -614,11 +614,11 @@ int erkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, /* compute the RHS if needed */ if (!(ark_mem->fn_is_current)) { - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } + retval = ark_mem->PreRhsFn(t, y, ark_mem->user_data); + if (retval != 0) { return (ARK_PRERHSFN_FAIL); } } /* call f */ @@ -660,11 +660,11 @@ int erkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, /* base RHS call on recomputeRHS argument */ if (recomputeRHS) { - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } + retval = ark_mem->PreRhsFn(t, y, ark_mem->user_data); + if (retval != 0) { return (ARK_PRERHSFN_FAIL); } } /* call f */ @@ -697,11 +697,11 @@ int erkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, case ARK_FULLRHS_OTHER: - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } + retval = ark_mem->PreRhsFn(t, y, ark_mem->user_data); + if (retval != 0) { return (ARK_PRERHSFN_FAIL); } } /* call f */ @@ -769,6 +769,9 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) retval = erkStep_AccessStepMem(ark_mem, __func__, &step_mem); if (retval != ARK_SUCCESS) { return (retval); } + /* determine if method has fsal property */ + sunbooleantype fsal = ARKodeButcherTable_IsStifflyAccurate(step_mem->B); + /* local shortcuts for fused vector operations */ cvals = step_mem->cvals; Xvecs = step_mem->Xvecs; @@ -878,11 +881,24 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) return (ARK_VECTOROP_ERR); } - /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->PostProcessStage != NULL) + /* apply user-supplied stage postprocessing function (if supplied) unless + this is the last stage of a FSAL method, then apply the user-supplied + step postprocessing function (if supplied) */ + if (is == step_mem->stages - 1 && fsal && ark_mem->PostProcessStepFn) { - retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PostProcessStepFn(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed postprocess step, retval = %i", retval); + return (ARK_POSTPROCESS_STEP_FAIL); + } + } + else if (ark_mem->PostProcessStageFn) + { + retval = ark_mem->PostProcessStageFn(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -891,16 +907,16 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } } - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess RHS, retval = %i", retval); - return (ARK_PREPROCESS_RHS_FAIL); + return (ARK_PRERHSFN_FAIL); } } @@ -960,6 +976,8 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "begin-compute-solution", ""); /* compute time-evolved solution (in ark_ycur), error estimate (in dsm) */ + ark_mem->tcur = ark_mem->tn + ark_mem->h; + retval = erkStep_ComputeSolutions(ark_mem, dsmPtr); if (retval < 0) { @@ -968,19 +986,6 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) return (retval); } - /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->PostProcessStage != NULL) - { - retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); - if (retval != 0) - { - SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed postprocess stage, retval = %i", retval); - return (ARK_POSTPROCESS_STAGE_FAIL); - } - } - SUNLogExtraDebugVec(ARK_LOGGER, "updated solution", ark_mem->ycur, "ycur(:) ="); SUNLogInfo(ARK_LOGGER, "end-compute-solution", "status = success"); @@ -1487,34 +1492,49 @@ int erkStep_ComputeSolutions(ARKodeMem ark_mem, sunrealtype* dsmPtr) /* initialize output */ *dsmPtr = ZERO; - /* Compute time step solution */ - /* set arrays for fused vector operation */ - nvec = 0; - for (j = 0; j < step_mem->stages; j++) - { - cvals[nvec] = ark_mem->h * step_mem->B->b[j]; - Xvecs[nvec] = step_mem->F[j]; - nvec += 1; - } - cvals[nvec] = ONE; - Xvecs[nvec] = ark_mem->yn; - nvec += 1; + /* determine if method has fsal property */ + sunbooleantype fsal = ARKodeButcherTable_IsStifflyAccurate(step_mem->B); - /* apply external polynomial forcing */ - if (step_mem->nforcing > 0) + /* Compute time step solution. For FSAL methods, ycur already contains the new + solution. */ + if (!fsal) { + /* set arrays for fused vector operation */ + nvec = 0; for (j = 0; j < step_mem->stages; j++) { - step_mem->stage_times[j] = ark_mem->tn + step_mem->B->c[j] * ark_mem->h; - step_mem->stage_coefs[j] = ark_mem->h * step_mem->B->b[j]; + cvals[nvec] = ark_mem->h * step_mem->B->b[j]; + Xvecs[nvec] = step_mem->F[j]; + nvec += 1; } - erkStep_ApplyForcing(step_mem, step_mem->stage_times, step_mem->stage_coefs, - step_mem->stages, &nvec); - } + cvals[nvec] = ONE; + Xvecs[nvec] = ark_mem->yn; + nvec += 1; - /* call fused vector operation to do the work */ - retval = N_VLinearCombination(nvec, cvals, Xvecs, y); - if (retval != 0) { return (ARK_VECTOROP_ERR); } + /* apply external polynomial forcing */ + if (step_mem->nforcing > 0) + { + for (j = 0; j < step_mem->stages; j++) + { + step_mem->stage_times[j] = ark_mem->tn + step_mem->B->c[j] * ark_mem->h; + step_mem->stage_coefs[j] = ark_mem->h * step_mem->B->b[j]; + } + erkStep_ApplyForcing(step_mem, step_mem->stage_times, + step_mem->stage_coefs, step_mem->stages, &nvec); + } + + /* call fused vector operation to do the work */ + retval = N_VLinearCombination(nvec, cvals, Xvecs, y); + if (retval != 0) { return (ARK_VECTOROP_ERR); } + + /* apply user-supplied step postprocessing function (if supplied) */ + if (ark_mem->PostProcessStepFn) + { + retval = ark_mem->PostProcessStepFn(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) { return (ARK_POSTPROCESS_STEP_FAIL); } + } + } /* Compute yerr (if step adaptivity or error accumulation enabled) */ if (!ark_mem->fixedstep || (ark_mem->AccumErrorType != ARK_ACCUMERROR_NONE)) diff --git a/src/arkode/arkode_impl.h b/src/arkode/arkode_impl.h index 9c872ba066..b977d1ae0c 100644 --- a/src/arkode/arkode_impl.h +++ b/src/arkode/arkode_impl.h @@ -565,16 +565,15 @@ struct ARKodeMemRec ARKodeRelaxMem relax_mem; /* relaxation data structure */ /* User-supplied step solution pre/post-processing functions */ - ARKPostProcessFn PreProcessStep; - ARKPostProcessFn PostProcessStep; - ARKPostProcessFn PostProcessStepFail; - void* ps_data; /* pointer to user_data */ - - /* User-supplied stage solution post-processing function */ - ARKPostProcessFn PostProcessStage; + ARKPreStepFn PreStepFn; + ARKPostStepFn PostStepFn; /* User-supplied RHS function pre-processing function */ - ARKPostProcessFn PreRHSProcess; + ARKPreRhsFn PreRhsFn; + + /* User-supplied stage and step solution post-processing function */ + ARKPostProcessFn PostProcessStepFn; + ARKPostProcessFn PostProcessStageFn; sunbooleantype use_compensated_sums; @@ -815,21 +814,18 @@ void arkode_user_supplied_fn_table_destroy(void* ptr); #define MSG_ARK_VECTOROP_ERR "At " MSG_TIME ", a vector operation failed." #define MSG_ARK_INNERSTEP_FAILED \ "At " MSG_TIME ", the inner stepper failed in an unrecoverable manner." -#define MSG_ARK_PREPROCESS_STEP_FAIL \ - "At " MSG_TIME \ - ", the step preprocessing routine failed in an unrecoverable manner." +#define MSG_ARK_PRESTEPFN_FAIL \ + "At " MSG_TIME ", the pre-step function failed in an unrecoverable manner." +#define MSG_ARK_POSTSTEPFN_FAIL \ + "At " MSG_TIME ", the post-step function failed in an unrecoverable manner." #define MSG_ARK_POSTPROCESS_STEP_FAIL \ "At " MSG_TIME \ ", the step postprocessing routine failed in an unrecoverable manner." -#define MSG_ARK_POSTPROCESS_FAILED_STEP_FAIL \ - "At " MSG_TIME ", the failed step postprocessing routine failed in an " \ - "unrecoverable manner." #define MSG_ARK_POSTPROCESS_STAGE_FAIL \ "At " MSG_TIME \ ", the stage postprocessing routine failed in an unrecoverable manner." -#define MSG_ARK_PREPROCESS_RHS_FAIL \ - "At " MSG_TIME \ - ", the RHS preprocessing routine failed in an unrecoverable manner." +#define MSG_ARK_PRERHSFN_FAIL \ + "At " MSG_TIME ", the pre-RHS function failed in an unrecoverable manner." #define MSG_ARK_NULL_SUNCTX "sunctx = NULL illegal." #define MSG_ARK_CONTEXT_MISMATCH \ "Outer and inner steppers have different contexts." diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index 0f37abc632..6a902681c7 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -873,13 +873,6 @@ int ARKodeSetUserData(void* arkode_mem, void* user_data) /* Set data for root finding */ if (ark_mem->root_mem != NULL) { ark_mem->root_mem->root_data = user_data; } - /* Set data for post-processing a step */ - if ((ark_mem->PreProcessStep != NULL) || (ark_mem->PostProcessStep != NULL) || - (ark_mem->PostProcessStepFail != NULL)) - { - ark_mem->ps_data = user_data; - } - /* Set user data into stepper (if provided) */ if (ark_mem->step_setuserdata) { @@ -1493,25 +1486,19 @@ int ARKodeSetNoInactiveRootWarn(void* arkode_mem) return (ARK_SUCCESS); } -/*--------------------------------------------------------------- - ARKodeSetPreprocessStepFn: - ARKodeSetPostprocessStepFn: - ARKodeSetPostprocessStepFailFn: +/*------------------------------------------------------------------------------ + ARKodeSetPreStepFn: + ARKodeSetPostStepFn: - Specifies user-provided step pre- and post-processing functions - having type ARKPostProcessFn. A NULL input function disables step - pre- or post-step processing. + Specifies user-provided step pre- and post-step functions. - The "Preprocess" function is called just prior to taking a step, - while the "Postprocess" function is called immediately after - a successful step. The "PostprocessStepFail" function is called - immediately after a failed step. + The pre-step function is called just prior to taking a step and the post-step + function is called immediately after completing a successful step. - IF THE SUPPLIED FUNCTION MODIFIES ANY OF THE ACTIVE STATE DATA, - THEN ALL THEORETICAL GUARANTEES OF SOLUTION ACCURACY AND - STABILITY ARE LOST. - ---------------------------------------------------------------*/ -int ARKodeSetPreprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep) + IF THE SUPPLIED FUNCTION MODIFIES ANY OF THE ACTIVE STATE DATA, THEN ALL + THEORETICAL GUARANTEES OF SOLUTION ACCURACY AND STABILITY ARE LOST. + ----------------------------------------------------------------------------*/ +int ARKodeSetPreStepFn(void* arkode_mem, ARKPreStepFn prestep_fn) { ARKodeMem ark_mem; if (arkode_mem == NULL) @@ -1522,14 +1509,13 @@ int ARKodeSetPreprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep) } ark_mem = (ARKodeMem)arkode_mem; - /* NULL argument sets default, otherwise set inputs */ - ark_mem->PreProcessStep = ProcessStep; - ark_mem->ps_data = ark_mem->user_data; + /* NULL argument disables the pre-step function */ + ark_mem->PreStepFn = prestep_fn; return (ARK_SUCCESS); } -int ARKodeSetPostprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep) +int ARKodeSetPostStepFn(void* arkode_mem, ARKPostStepFn poststep_fn) { ARKodeMem ark_mem; if (arkode_mem == NULL) @@ -1540,14 +1526,25 @@ int ARKodeSetPostprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep) } ark_mem = (ARKodeMem)arkode_mem; - /* NULL argument sets default, otherwise set inputs */ - ark_mem->PostProcessStep = ProcessStep; - ark_mem->ps_data = ark_mem->user_data; + /* NULL argument disables the post-step function */ + ark_mem->PostStepFn = poststep_fn; return (ARK_SUCCESS); } -int ARKodeSetPostprocessStepFailFn(void* arkode_mem, ARKPostProcessFn ProcessStep) +/*------------------------------------------------------------------------------ + ARKodeSetPreRhsFn: + + Specifies user-provided pre-RHS function. + + The pre-RHS function is called on a state vector just prior to computing the + RHS. For problems with partitioned RHS functions that are called with + identical inputs, this is only called before the first RHS evaluation. + + IF THE SUPPLIED FUNCTION MODIFIES ANY OF THE ACTIVE STATE DATA, THEN ALL + THEORETICAL GUARANTEES OF SOLUTION ACCURACY AND STABILITY ARE LOST. + ---------------------------------------------------------------*/ +int ARKodeSetPreRhsFn(void* arkode_mem, ARKPreRhsFn prerhs_fn) { ARKodeMem ark_mem; if (arkode_mem == NULL) @@ -1558,35 +1555,33 @@ int ARKodeSetPostprocessStepFailFn(void* arkode_mem, ARKPostProcessFn ProcessSte } ark_mem = (ARKodeMem)arkode_mem; - /* NULL argument sets default, otherwise set inputs */ - ark_mem->PostProcessStepFail = ProcessStep; - ark_mem->ps_data = ark_mem->user_data; + /* NULL argument disables the pre-RHS function */ + ark_mem->PreRhsFn = prerhs_fn; return (ARK_SUCCESS); } -/*--------------------------------------------------------------- +/*------------------------------------------------------------------------------ + ARKodeSetPostprocessStepFn: ARKodeSetPostprocessStageFn: - Specifies user-provided stage post-processing - function having type ARKPostProcessFn. A NULL input function - disables post-stage processing. + Specifies user-provided step and stage post-processing functions. - The "ProcessStage" function is called immediately after - computing a stage. + These functions are called immediately after computing a stage or the new step + solution (before error checks or other post-step actions e.g., constraint + handling or relaxation). - IF THE SUPPLIED FUNCTION MODIFIES ANY OF THE ACTIVE STATE DATA, - THEN ALL THEORETICAL GUARANTEES OF SOLUTION ACCURACY AND - STABILITY ARE LOST. + IF THE SUPPLIED FUNCTION MODIFIES ANY OF THE ACTIVE STATE DATA, THEN ALL + THEORETICAL GUARANTEES OF SOLUTION ACCURACY AND STABILITY ARE LOST. - While it is possible to perform postprocessing when - ARKodeSetDeduceImplicitRhs is enabled, this can cause implicit - RHS evaluations to be inconsistent with the postprocessed stage - values. It is strongly recommended to disable - ARKodeSetDeduceImplicitRhs in order to guarantee - postprocessing constraints are enforced. - ---------------------------------------------------------------*/ -int ARKodeSetPostprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStage) + While it is possible to perform stage postprocessing when + ARKodeSetDeduceImplicitRhs is enabled, this can cause implicit RHS evaluations + to be inconsistent with the postprocessed values (this similarly applies when + using step post processing with FSAL methods). It is strongly recommended to + disable ARKodeSetDeduceImplicitRhs in order to guarantee postprocessing + constraints are enforced. + ----------------------------------------------------------------------------*/ +int ARKodeSetPostprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep) { ARKodeMem ark_mem; if (arkode_mem == NULL) @@ -1597,30 +1592,13 @@ int ARKodeSetPostprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStage) } ark_mem = (ARKodeMem)arkode_mem; - /* NULL argument sets default, otherwise set inputs */ - ark_mem->PostProcessStage = ProcessStage; - ark_mem->ps_data = ark_mem->user_data; + /* NULL argument disables the postprocessing function */ + ark_mem->PostProcessStepFn = ProcessStep; return (ARK_SUCCESS); } -/*--------------------------------------------------------------- - ARKodeSetPreRHSProcessFn: - - Specifies user-provided pre-processing function having type - ARKPostProcessFn. A NULL input function disables pre-RHS - processing. - - The "PreRHSProcess" function is called on a state vector - just prior to computing the RHS. For problems with partitioned - RHS functions that are called with identical inputs, this is - only called before the first RHS evaluation. - - IF THE SUPPLIED FUNCTION MODIFIES ANY OF THE ACTIVE STATE DATA, - THEN ALL THEORETICAL GUARANTEES OF SOLUTION ACCURACY AND - STABILITY ARE LOST. - ---------------------------------------------------------------*/ -int ARKodeSetPreRHSProcessFn(void* arkode_mem, ARKPostProcessFn PreRHSProcess) +int ARKodeSetPostprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStage) { ARKodeMem ark_mem; if (arkode_mem == NULL) @@ -1631,9 +1609,8 @@ int ARKodeSetPreRHSProcessFn(void* arkode_mem, ARKPostProcessFn PreRHSProcess) } ark_mem = (ARKodeMem)arkode_mem; - /* NULL argument sets default, otherwise set inputs */ - ark_mem->PreRHSProcess = PreRHSProcess; - ark_mem->ps_data = ark_mem->user_data; + /* NULL argument disables the postprocessing function */ + ark_mem->PostProcessStageFn = ProcessStage; return (ARK_SUCCESS); } @@ -3255,13 +3232,9 @@ char* ARKodeGetReturnFlagName(long int flag) case ARK_POSTPROCESS_STAGE_FAIL: sprintf(name, "ARK_POSTPROCESS_STAGE_FAIL"); break; - case ARK_POSTPROCESS_FAILED_STEP_FAIL: - sprintf(name, "ARK_POSTPROCESS_FAILED_STEP_FAIL"); - break; - case ARK_PREPROCESS_STEP_FAIL: - sprintf(name, "ARK_PREPROCESS_STEP_FAIL"); - break; - case ARK_PREPROCESS_RHS_FAIL: sprintf(name, "ARK_PREPROCESS_RHS_FAIL"); break; + case ARK_PRESTEPFN_FAIL: sprintf(name, "ARK_PRESTEPFN_FAIL"); break; + case ARK_POSTSTEPFN_FAIL: sprintf(name, "ARK_POSTSTEPFN_FAIL"); break; + case ARK_PRERHSFN_FAIL: sprintf(name, "ARK_PRERHSFN_FAIL"); break; case ARK_USER_PREDICT_FAIL: sprintf(name, "ARK_USER_PREDICT_FAIL"); break; case ARK_INTERP_FAIL: sprintf(name, "ARK_INTERP_FAIL"); break; case ARK_INVALID_TABLE: sprintf(name, "ARK_INVALID_TABLE"); break; diff --git a/src/arkode/arkode_ls.c b/src/arkode/arkode_ls.c index 215f727923..b3d1abd2a9 100644 --- a/src/arkode/arkode_ls.c +++ b/src/arkode/arkode_ls.c @@ -2695,11 +2695,11 @@ int arkLsDenseDQJac(sunrealtype t, N_Vector y, N_Vector fy, SUNMatrix Jac, y_data[j] += inc; - /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied), then call RHS */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } + retval = ark_mem->PreRhsFn(t, y, ark_mem->user_data); + if (retval != 0) { return (ARK_PRERHSFN_FAIL); } } retval = fi(t, y, ftemp, ark_mem->user_data); arkls_mem->nfeDQ++; @@ -2798,11 +2798,11 @@ int arkLsBandDQJac(sunrealtype t, N_Vector y, N_Vector fy, SUNMatrix Jac, ytemp_data[j] += inc; } - /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied), then call RHS */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(t, ytemp, ark_mem->user_data); - if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } + retval = ark_mem->PreRhsFn(t, ytemp, ark_mem->user_data); + if (retval != 0) { return (ARK_PRERHSFN_FAIL); } } retval = fi(t, ytemp, ftemp, ark_mem->user_data); arkls_mem->nfeDQ++; @@ -2870,11 +2870,11 @@ int arkLsDQJtimes(N_Vector v, N_Vector Jv, sunrealtype t, N_Vector y, /* Set work = y + sig*v */ N_VLinearSum(sig, v, ONE, y, work); - /* Set Jv = f(tn, y+sig*v), after calling RHS preprocessing fcn (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* Set Jv = f(tn, y+sig*v), after calling pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(t, work, ark_mem->user_data); - if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } + retval = ark_mem->PreRhsFn(t, work, ark_mem->user_data); + if (retval != 0) { return (ARK_PRERHSFN_FAIL); } } retval = arkls_mem->Jt_f(t, work, Jv, ark_mem->user_data); arkls_mem->nfeDQ++; diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 8cfd172984..67af3a5353 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -451,11 +451,11 @@ int lsrkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, /* compute the RHS */ if (!ark_mem->fn_is_current) { - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-rhs function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } + retval = ark_mem->PreRhsFn(t, y, ark_mem->user_data); + if (retval != 0) { return (ARK_PRERHSFN_FAIL); } } retval = step_mem->fe(t, y, f, ark_mem->user_data); step_mem->nfe++; @@ -476,11 +476,11 @@ int lsrkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, ark_mem->fn_is_current is changed by ARKODE. */ if (step_mem->is_SSP) { - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-rhs function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } + retval = ark_mem->PreRhsFn(t, y, ark_mem->user_data); + if (retval != 0) { return (ARK_PRERHSFN_FAIL); } } retval = step_mem->fe(t, y, ark_mem->fn, ark_mem->user_data); step_mem->nfe++; @@ -498,11 +498,11 @@ int lsrkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, case ARK_FULLRHS_OTHER: - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-rhs function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } + retval = ark_mem->PreRhsFn(t, y, ark_mem->user_data); + if (retval != 0) { return (ARK_PRERHSFN_FAIL); } } /* call f */ @@ -629,16 +629,15 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if ((!ark_mem->fn_is_current && ark_mem->initsetup) || (step_mem->step_nst != ark_mem->nst)) { - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-rhs function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tn, ark_mem->yn, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tn, ark_mem->yn, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess rhs, retval = %i", retval); - return ARK_PREPROCESS_RHS_FAIL; + return ARK_PRERHSFN_FAIL; } } @@ -685,10 +684,10 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) N_VLinearSum(ONE, ark_mem->yn, ark_mem->h * mus, ark_mem->fn, ark_mem->tempv2); /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->PostProcessStage != NULL) + if (ark_mem->PostProcessStageFn) { - retval = ark_mem->PostProcessStage(ark_mem->tn + ark_mem->h * mus, - ark_mem->tempv2, ark_mem->user_data); + retval = ark_mem->PostProcessStageFn(ark_mem->tn + ark_mem->h * mus, + ark_mem->tempv2, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -718,16 +717,16 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) nu = -bj / bjm2; mus = mu * w1 / w0; - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur + ark_mem->h * thjm1, - ark_mem->tempv2, ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur + ark_mem->h * thjm1, + ark_mem->tempv2, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess rhs, retval = %i", retval); - return ARK_PREPROCESS_RHS_FAIL; + return ARK_PRERHSFN_FAIL; } } @@ -772,11 +771,11 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) return ARK_VECTOROP_ERR; } - /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->PostProcessStage != NULL) + /* apply user-supplied stage or step postprocessing function (if supplied) */ + if (j < step_mem->req_stages && ark_mem->PostProcessStageFn) { - retval = ark_mem->PostProcessStage(ark_mem->tcur + ark_mem->h * thj, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStageFn(ark_mem->tcur + ark_mem->h * thj, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -784,6 +783,17 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) return ARK_POSTPROCESS_STAGE_FAIL; } } + else if (j == step_mem->req_stages && ark_mem->PostProcessStepFn) + { + retval = ark_mem->PostProcessStepFn(ark_mem->tcur + ark_mem->h * thj, + ark_mem->ycur, ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed postprocess step, retval = %i", retval); + return ARK_POSTPROCESS_STEP_FAIL; + } + } /* Shift the data for the next stage */ if (j < step_mem->req_stages) @@ -815,16 +825,16 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Compute yerr (if step adaptivity enabled) */ if (!ark_mem->fixedstep) { - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur + ark_mem->h, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur + ark_mem->h, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-compute-embedding", "status = failed preprocess rhs, retval = %i", retval); - return ARK_PREPROCESS_RHS_FAIL; + return ARK_PRERHSFN_FAIL; } } @@ -861,16 +871,16 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } else { - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur + ark_mem->h, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur + ark_mem->h, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-compute-embedding", "status = failed preprocess rhs, retval = %i", retval); - return ARK_PREPROCESS_RHS_FAIL; + return ARK_PRERHSFN_FAIL; } } @@ -998,16 +1008,15 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if ((!ark_mem->fn_is_current && ark_mem->initsetup) || (step_mem->step_nst != ark_mem->nst)) { - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tn, ark_mem->yn, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tn, ark_mem->yn, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess rhs, retval = %i", retval); - return ARK_PREPROCESS_RHS_FAIL; + return ARK_PRERHSFN_FAIL; } } retval = step_mem->fe(ark_mem->tn, ark_mem->yn, ark_mem->fn, @@ -1046,10 +1055,10 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) N_VLinearSum(ONE, ark_mem->yn, ark_mem->h * mus, ark_mem->fn, ark_mem->tempv2); /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->PostProcessStage != NULL) + if (ark_mem->PostProcessStageFn) { - retval = ark_mem->PostProcessStage(ark_mem->tn + ark_mem->h * mus, - ark_mem->tempv2, ark_mem->user_data); + retval = ark_mem->PostProcessStageFn(ark_mem->tn + ark_mem->h * mus, + ark_mem->tempv2, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1069,16 +1078,16 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) mus = w1 * mu; cj = temj * w1 / FOUR; - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur + ark_mem->h * cjm1, - ark_mem->tempv2, ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur + ark_mem->h * cjm1, + ark_mem->tempv2, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess rhs, retval = %i", retval); - return ARK_PREPROCESS_RHS_FAIL; + return ARK_PRERHSFN_FAIL; } } @@ -1119,11 +1128,11 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) return ARK_VECTOROP_ERR; } - /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->PostProcessStage != NULL) + /* apply user-supplied stage or step postprocessing function (if supplied) */ + if (j < step_mem->req_stages && ark_mem->PostProcessStageFn) { - retval = ark_mem->PostProcessStage(ark_mem->tcur + ark_mem->h * cj, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStageFn(ark_mem->tcur + ark_mem->h * cj, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1131,6 +1140,17 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) return ARK_POSTPROCESS_STAGE_FAIL; } } + else if (j == step_mem->req_stages && ark_mem->PostProcessStepFn) + { + retval = ark_mem->PostProcessStepFn(ark_mem->tcur + ark_mem->h * cj, + ark_mem->ycur, ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed postprocess step, retval = %i", retval); + return ARK_POSTPROCESS_STEP_FAIL; + } + } /* Shift the data for the next stage */ if (j < step_mem->req_stages) @@ -1152,16 +1172,16 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogExtraDebugVec(ARK_LOGGER, "updated solution", ark_mem->ycur, "ycur(:) ="); SUNLogInfo(ARK_LOGGER, "begin-compute-embedding", ""); - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur + ark_mem->h, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur + ark_mem->h, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-compute-embedding", "status = failed preprocess rhs, retval = %i", retval); - return ARK_PREPROCESS_RHS_FAIL; + return ARK_PRERHSFN_FAIL; } } @@ -1270,16 +1290,15 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr of the step unless a renewed step or ARKODE updated fn. */ if (!ark_mem->fn_is_current) { - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tn, ark_mem->yn, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tn, ark_mem->yn, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess rhs, retval = %i", retval); - return ARK_PREPROCESS_RHS_FAIL; + return ARK_PRERHSFN_FAIL; } } @@ -1309,10 +1328,10 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->PostProcessStage != NULL) + if (ark_mem->PostProcessStageFn) { - retval = ark_mem->PostProcessStage(ark_mem->tn + sm1inv * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStageFn(ark_mem->tn + sm1inv * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1324,17 +1343,17 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Evaluate stages j = 2,...,step_mem->req_stages - 1 */ for (int j = 2; j < step_mem->req_stages; j++) { - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur + ((sunrealtype)j - ONE) * - sm1inv * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur + + ((sunrealtype)j - ONE) * sm1inv * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess rhs, retval = %i", retval); - return ARK_PREPROCESS_RHS_FAIL; + return ARK_PRERHSFN_FAIL; } } @@ -1365,10 +1384,10 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->PostProcessStage != NULL) + if (ark_mem->PostProcessStageFn) { - retval = ark_mem->PostProcessStage(ark_mem->tcur + j * sm1inv * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStageFn(ark_mem->tcur + j * sm1inv * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1380,15 +1399,16 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Evaluate the last stage for j = step_mem->req_stages */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur + ark_mem->h, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur + ark_mem->h, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess rhs, retval = %i", retval); - return ARK_PREPROCESS_RHS_FAIL; + return ARK_PRERHSFN_FAIL; } } retval = step_mem->fe(ark_mem->tcur + ark_mem->h, ark_mem->ycur, @@ -1422,16 +1442,16 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr return ARK_VECTOROP_ERR; } - /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->PostProcessStage != NULL) + /* apply user-supplied step postprocessing function (if supplied) */ + if (ark_mem->PostProcessStepFn) { - retval = ark_mem->PostProcessStage(ark_mem->tn + ark_mem->h, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PostProcessStepFn(ark_mem->tn + ark_mem->h, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed postprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; + "status = failed postprocess step, retval = %i", retval); + return ARK_POSTPROCESS_STEP_FAIL; } } @@ -1507,16 +1527,15 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr of the step unless ARKODE updated fn. */ if (!ark_mem->fn_is_current) { - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tn, ark_mem->yn, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tn, ark_mem->yn, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess rhs, retval = %i", retval); - return ARK_PREPROCESS_RHS_FAIL; + return ARK_PRERHSFN_FAIL; } } @@ -1545,10 +1564,10 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->PostProcessStage != NULL) + if (ark_mem->PostProcessStageFn) { - retval = ark_mem->PostProcessStage(ark_mem->tn + ark_mem->h * rat, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStageFn(ark_mem->tn + ark_mem->h * rat, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1560,17 +1579,17 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Evaluate stages j = 2,...,step_mem->req_stages */ for (int j = 2; j <= ((in - 1) * (in - 2) / 2); j++) { - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur + ((sunrealtype)j - ONE) * - rat * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur + + ((sunrealtype)j - ONE) * rat * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess rhs, retval = %i", retval); - return ARK_PREPROCESS_RHS_FAIL; + return ARK_PRERHSFN_FAIL; } } @@ -1601,10 +1620,10 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->PostProcessStage != NULL) + if (ark_mem->PostProcessStageFn) { - retval = ark_mem->PostProcessStage(ark_mem->tcur + j * rat * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStageFn(ark_mem->tcur + j * rat * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1618,17 +1637,17 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr for (int j = ((in - 1) * (in - 2) / 2 + 1); j <= (in * (in + 1) / 2 - 1); j++) { - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur + ((sunrealtype)j - ONE) * - rat * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur + + ((sunrealtype)j - ONE) * rat * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess rhs, retval = %i", retval); - return ARK_PREPROCESS_RHS_FAIL; + return ARK_PRERHSFN_FAIL; } } @@ -1659,10 +1678,10 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->PostProcessStage != NULL) + if (ark_mem->PostProcessStageFn) { - retval = ark_mem->PostProcessStage(ark_mem->tcur + j * rat * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStageFn(ark_mem->tcur + j * rat * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1672,18 +1691,17 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = - ark_mem->PreRHSProcess(ark_mem->tcur + - rat * (rn * (rn + ONE) / TWO - ONE) * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur + + rat * (rn * (rn + ONE) / TWO - ONE) * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess rhs, retval = %i", retval); - return ARK_PREPROCESS_RHS_FAIL; + return ARK_PRERHSFN_FAIL; } } @@ -1727,12 +1745,12 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->PostProcessStage != NULL) + if (ark_mem->PostProcessStageFn) { retval = - ark_mem->PostProcessStage(ark_mem->tcur + - rat * (rn * (rn - ONE) / TWO) * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + ark_mem->PostProcessStageFn(ark_mem->tcur + + rat * (rn * (rn - ONE) / TWO) * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1743,17 +1761,17 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr for (int j = (in * (in + 1) / 2 + 1); j <= step_mem->req_stages; j++) { - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur + ((sunrealtype)j - rn - ONE) * - rat * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur + ((sunrealtype)j - rn - ONE) * + rat * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess rhs, retval = %i", retval); - return ARK_PREPROCESS_RHS_FAIL; + return ARK_PRERHSFN_FAIL; } } @@ -1783,12 +1801,12 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr ark_mem->tempv1); } - /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->PostProcessStage != NULL) + /* apply user-supplied stage or step postprocessing function (if supplied) */ + if (j < step_mem->req_stages && ark_mem->PostProcessStageFn) { - retval = ark_mem->PostProcessStage(ark_mem->tcur + ((sunrealtype)j - rn) * - rat * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStageFn(ark_mem->tcur + ((sunrealtype)j - rn) * + rat * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1796,6 +1814,17 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr return ARK_POSTPROCESS_STAGE_FAIL; } } + else if (j == step_mem->req_stages && ark_mem->PostProcessStepFn) + { + retval = ark_mem->PostProcessStepFn(ark_mem->tn + ark_mem->h, + ark_mem->ycur, ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed postprocess step, retval = %i", retval); + return ARK_POSTPROCESS_STEP_FAIL; + } + } } SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); @@ -1868,16 +1897,15 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr of the step unless ARKODE updated fn. */ if (!ark_mem->fn_is_current) { - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tn, ark_mem->yn, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tn, ark_mem->yn, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess rhs, retval = %i", retval); - return ARK_PREPROCESS_RHS_FAIL; + return ARK_PRERHSFN_FAIL; } } @@ -1906,10 +1934,10 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->PostProcessStage != NULL) + if (ark_mem->PostProcessStageFn) { - retval = ark_mem->PostProcessStage(ark_mem->tn + ark_mem->h * p5, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStageFn(ark_mem->tn + ark_mem->h * p5, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1918,16 +1946,16 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur + ark_mem->h * p5, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur + ark_mem->h * p5, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess rhs, retval = %i", retval); - return ARK_PREPROCESS_RHS_FAIL; + return ARK_PRERHSFN_FAIL; } } @@ -1955,10 +1983,10 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->PostProcessStage != NULL) + if (ark_mem->PostProcessStageFn) { - retval = ark_mem->PostProcessStage(ark_mem->tcur + ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStageFn(ark_mem->tcur + ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1967,16 +1995,16 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur + ark_mem->h, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur + ark_mem->h, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess rhs, retval = %i", retval); - return ARK_PREPROCESS_RHS_FAIL; + return ARK_PRERHSFN_FAIL; } } @@ -2017,10 +2045,10 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->PostProcessStage != NULL) + if (ark_mem->PostProcessStageFn) { - retval = ark_mem->PostProcessStage(ark_mem->tcur + ark_mem->h * p5, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStageFn(ark_mem->tcur + ark_mem->h * p5, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -2029,16 +2057,16 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur + ark_mem->h * p5, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur + ark_mem->h * p5, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess rhs, retval = %i", retval); - return ARK_PREPROCESS_RHS_FAIL; + return ARK_PRERHSFN_FAIL; } } @@ -2060,16 +2088,16 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr N_VLinearSum(ONE, ark_mem->ycur, ark_mem->h * p5, ark_mem->tempv3, ark_mem->ycur); - /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->PostProcessStage != NULL) + /* apply user-supplied step postprocessing function (if supplied) */ + if (ark_mem->PostProcessStepFn) { - retval = ark_mem->PostProcessStage(ark_mem->tn + ark_mem->h, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PostProcessStepFn(ark_mem->tn + ark_mem->h, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed postprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; + "status = failed postprocess step, retval = %i", retval); + return ARK_POSTPROCESS_STEP_FAIL; } } @@ -2138,16 +2166,15 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt of the step unless ARKODE updated fn. */ if (!ark_mem->fn_is_current) { - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tn, ark_mem->yn, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tn, ark_mem->yn, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess rhs, retval = %i", retval); - return ARK_PREPROCESS_RHS_FAIL; + return ARK_PRERHSFN_FAIL; } } @@ -2180,10 +2207,10 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->PostProcessStage != NULL) + if (ark_mem->PostProcessStageFn) { - retval = ark_mem->PostProcessStage(ark_mem->tn + onesixth * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStageFn(ark_mem->tn + onesixth * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -2195,17 +2222,17 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* Evaluate stages j = 2,...,step_mem->req_stages */ for (int j = 2; j <= 5; j++) { - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur + ((sunrealtype)j - ONE) * - onesixth * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur + ((sunrealtype)j - ONE) * + onesixth * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess rhs, retval = %i", retval); - return ARK_PREPROCESS_RHS_FAIL; + return ARK_PRERHSFN_FAIL; } } @@ -2236,18 +2263,20 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->PostProcessStage != NULL) + if (ark_mem->PostProcessStageFn) { if (j == 5) { - retval = ark_mem->PostProcessStage(ark_mem->tn + j * onesixth * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = + ark_mem->PostProcessStageFn(ark_mem->tn + j * onesixth * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); } else { - retval = ark_mem->PostProcessStage(ark_mem->tn + SUN_RCONST(2.0) * - onesixth * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStageFn(ark_mem->tn + SUN_RCONST(2.0) * + onesixth * + ark_mem->h, + ark_mem->ycur, ark_mem->user_data); } if (retval != 0) { @@ -2272,10 +2301,11 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt ark_mem->ycur, ark_mem->ycur); /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->PostProcessStage != NULL) + if (ark_mem->PostProcessStageFn) { - retval = ark_mem->PostProcessStage(ark_mem->tcur + TWO * onesixth * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = + ark_mem->PostProcessStageFn(ark_mem->tcur + TWO * onesixth * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -2286,17 +2316,17 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt for (int j = 6; j <= 9; j++) { - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur + ((sunrealtype)j - FOUR) * - onesixth * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur + ((sunrealtype)j - FOUR) * + onesixth * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess rhs, retval = %i", retval); - return ARK_PREPROCESS_RHS_FAIL; + return ARK_PRERHSFN_FAIL; } } @@ -2332,11 +2362,12 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->PostProcessStage != NULL) + if (ark_mem->PostProcessStageFn) { - retval = ark_mem->PostProcessStage(ark_mem->tcur + ((sunrealtype)j - THREE) * - onesixth * ark_mem->h, - ark_mem->ycur, ark_mem->user_data); + retval = + ark_mem->PostProcessStageFn(ark_mem->tcur + ((sunrealtype)j - THREE) * + onesixth * ark_mem->h, + ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -2346,16 +2377,16 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } } - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur + ark_mem->h, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur + ark_mem->h, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess rhs, retval = %i", retval); - return ARK_PREPROCESS_RHS_FAIL; + return ARK_PRERHSFN_FAIL; } } @@ -2385,16 +2416,16 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt return ARK_VECTOROP_ERR; } - /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->PostProcessStage != NULL) + /* apply user-supplied step postprocessing function (if supplied) */ + if (ark_mem->PostProcessStepFn) { - retval = ark_mem->PostProcessStage(ark_mem->tn + ark_mem->h, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PostProcessStepFn(ark_mem->tn + ark_mem->h, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed postprocess stage, retval = %i", retval); - return ARK_POSTPROCESS_STAGE_FAIL; + "status = failed postprocess step, retval = %i", retval); + return ARK_POSTPROCESS_STEP_FAIL; } } @@ -2781,12 +2812,11 @@ int lsrkStep_DQJtimes(void* arkode_mem, N_Vector v, N_Vector Jv) if ((!ark_mem->fn_is_current && ark_mem->initsetup) || (step_mem->step_nst != ark_mem->nst)) { - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tn, ark_mem->yn, - ark_mem->user_data); - if (retval != 0) { return ARK_PREPROCESS_RHS_FAIL; } + retval = ark_mem->PreRhsFn(ark_mem->tn, ark_mem->yn, ark_mem->user_data); + if (retval != 0) { return ARK_PRERHSFN_FAIL; } } retval = step_mem->fe(ark_mem->tn, ark_mem->yn, ark_mem->fn, @@ -2811,12 +2841,13 @@ int lsrkStep_DQJtimes(void* arkode_mem, N_Vector v, N_Vector Jv) /* Set work = y + sig*v */ N_VLinearSum(sig, v, ONE, y, work); - /* Set Jv = f(tn, y+sig*v) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(t, work, ark_mem->user_data); - if (retval != 0) { return ARK_PREPROCESS_RHS_FAIL; } + retval = ark_mem->PreRhsFn(t, work, ark_mem->user_data); + if (retval != 0) { return ARK_PRERHSFN_FAIL; } } + /* Set Jv = f(tn, y+sig*v) */ retval = step_mem->fe(t, work, Jv, ark_mem->user_data); step_mem->nfeDQ++; if (retval == 0) { break; } diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 63a4b0127e..b76b7bfa04 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1476,11 +1476,11 @@ int mriStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, step_mem->Xvecs[nvec] = f; nvec++; - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } + retval = ark_mem->PreRhsFn(t, y, ark_mem->user_data); + if (retval != 0) { return (ARK_PRERHSFN_FAIL); } } /* compute the implicit component and store in sdata */ @@ -1604,13 +1604,13 @@ int mriStep_UpdateF0(ARKodeMem ark_mem, ARKodeMRIStepMem step_mem, /* update the RHS components */ - /* apply user-supplied stage preprocessing function (if supplied) */ - if ((ark_mem->PreRHSProcess != NULL) && + /* call the user-supplied pre-RHS function (if supplied) */ + if ((ark_mem->PreRhsFn) && ((!step_mem->fse_is_current || !ark_mem->fn_is_current) || (!step_mem->fsi_is_current || !ark_mem->fn_is_current))) { - retval = ark_mem->PreRHSProcess(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } + retval = ark_mem->PreRhsFn(t, y, ark_mem->user_data); + if (retval != 0) { return (ARK_PRERHSFN_FAIL); } } /* implicit component */ @@ -1678,11 +1678,11 @@ int mriStep_UpdateF0(ARKodeMem ark_mem, ARKodeMRIStepMem step_mem, /* compute the full RHS */ if (!(ark_mem->fn_is_current)) { - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } + retval = ark_mem->PreRhsFn(t, y, ark_mem->user_data); + if (retval != 0) { return (ARK_PRERHSFN_FAIL); } } /* compute the implicit component */ @@ -1976,11 +1976,11 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt SUNLogExtraDebugVec(ARK_LOGGER, "slow stage", ark_mem->ycur, "z_%i(:) =", is); /* apply user-supplied stage postprocessing function (if supplied) */ - if ((ark_mem->PostProcessStage != NULL) && + if ((ark_mem->PostProcessStageFn) && (step_mem->stagetypes[is] != MRISTAGE_STIFF_ACC)) { - retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PostProcessStageFn(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1993,7 +1993,7 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt if (step_mem->stagetypes[is] != MRISTAGE_STIFF_ACC) { if ((step_mem->stagetypes[is] != MRISTAGE_ERK_FAST) || - (ark_mem->PostProcessStage != NULL)) + (ark_mem->PostProcessStageFn)) { retval = mriStepInnerStepper_Reset(step_mem->stepper, tf, ark_mem->ycur); if (retval != ARK_SUCCESS) @@ -2018,21 +2018,21 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } if (calc_fslow) { - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { if (step_mem->explicit_rhs || (step_mem->implicit_rhs && (!step_mem->deduce_rhs || (step_mem->stagetypes[is] != MRISTAGE_DIRK_NOFAST)))) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess rhs, retval = %i", retval); - return (ARK_PREPROCESS_RHS_FAIL); + return (ARK_PRERHSFN_FAIL); } } } @@ -2178,19 +2178,6 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } if (retval != ARK_SUCCESS) { return retval; } - /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->PostProcessStage != NULL) - { - retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); - if (retval != 0) - { - SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed postprocess stage, retval = %i", retval); - return (ARK_POSTPROCESS_STAGE_FAIL); - } - } - SUNLogExtraDebugVec(ARK_LOGGER, "embedded solution", ark_mem->ycur, "y_embedded(:) ="); @@ -2266,17 +2253,17 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt SUNLogExtraDebugVec(ARK_LOGGER, "slow stage", ark_mem->ycur, "z_%i(:) =", is); - /* apply user-supplied stage postprocessing function (if supplied) */ - if ((ark_mem->PostProcessStage != NULL) && + /* apply user-supplied step postprocessing function (if supplied) */ + if ((ark_mem->PostProcessStepFn) && (step_mem->stagetypes[is] != MRISTAGE_STIFF_ACC)) { - retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PostProcessStepFn(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", - "status = failed postprocess stage, retval = %i", retval); - return (ARK_POSTPROCESS_STAGE_FAIL); + "status = failed postprocess step, retval = %i", retval); + return (ARK_POSTPROCESS_STEP_FAIL); } } @@ -2284,7 +2271,7 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt if (step_mem->stagetypes[is] != MRISTAGE_STIFF_ACC) { if ((step_mem->stagetypes[is] != MRISTAGE_ERK_FAST) || - (ark_mem->PostProcessStage != NULL)) + (ark_mem->PostProcessStepFn)) { retval = mriStepInnerStepper_Reset(step_mem->stepper, tf, ark_mem->ycur); if (retval != ARK_SUCCESS) @@ -2653,12 +2640,12 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogExtraDebugVec(ARK_LOGGER, "slow stage", ark_mem->ycur, "z_%i(:) =", stage); - /* apply user-supplied stage postprocessing function (if supplied), + /* apply user-supplied stage or step postprocessing function (if supplied), and reset the inner integrator with the modified stage solution */ - if (ark_mem->PostProcessStage != NULL) + if (!solution && !embedding && ark_mem->PostProcessStageFn) { - retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PostProcessStageFn(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -2676,23 +2663,44 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) return (ARK_INNERSTEP_FAIL); } } + else if (solution && ark_mem->PostProcessStepFn) + { + retval = ark_mem->PostProcessStepFn(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed postprocess step, retval = %i", retval); + return (ARK_POSTPROCESS_STEP_FAIL); + } + retval = mriStepInnerStepper_Reset(step_mem->stepper, ark_mem->tcur, + ark_mem->ycur); + if (retval != ARK_SUCCESS) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed reset, retval = %i", retval); + arkProcessError(ark_mem, ARK_INNERSTEP_FAIL, __LINE__, __func__, + __FILE__, "Unable to reset the inner stepper"); + return (ARK_INNERSTEP_FAIL); + } + } /* Compute updated slow RHS (except for final solution or embedding) */ if ((!solution) && (!embedding)) { - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { if (step_mem->explicit_rhs || (step_mem->implicit_rhs && (!step_mem->deduce_rhs || !impl_corr))) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess rhs, retval = %i", retval); - return (ARK_PREPROCESS_RHS_FAIL); + return (ARK_PRERHSFN_FAIL); } } } @@ -3062,10 +3070,10 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* apply user-supplied stage postprocessing function (if supplied), and reset the inner integrator with the modified stage solution */ - if (ark_mem->PostProcessStage != NULL) + if (!solution && !embedding && ark_mem->PostProcessStageFn) { - retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PostProcessStageFn(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -3088,22 +3096,48 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) return (ARK_INNERSTEP_FAIL); } } + else if (solution && ark_mem->PostProcessStepFn) + { + retval = ark_mem->PostProcessStepFn(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed postprocess step, retval = %i", retval); + SUNLogInfo(ARK_LOGGER, "end-groups-list", + "status = failed stage computation, retval = %i", retval); + return (ARK_POSTPROCESS_STEP_FAIL); + } + + retval = mriStepInnerStepper_Reset(step_mem->stepper, ark_mem->tcur, + ark_mem->ycur); + if (retval != ARK_SUCCESS) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed reset, retval = %i", retval); + SUNLogInfo(ARK_LOGGER, "end-groups-list", + "status = failed stage computation, retval = %i", retval); + arkProcessError(ark_mem, ARK_INNERSTEP_FAIL, __LINE__, __func__, + __FILE__, "Unable to reset the inner stepper"); + return (ARK_INNERSTEP_FAIL); + } + } /* Compute updated slow RHS (except for final solution or embedding) */ if ((!solution) && (!embedding)) { - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess rhs, retval = %i", retval); SUNLogInfo(ARK_LOGGER, "end-groups-list", "status = failed stage computation, retval = %i", retval); - return (ARK_PREPROCESS_RHS_FAIL); + return (ARK_PRERHSFN_FAIL); } } @@ -4253,11 +4287,11 @@ int mriStep_SlowRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, retval = mriStep_AccessStepMem(ark_mem, __func__, &step_mem); if (retval != ARK_SUCCESS) { return (retval); } - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } + retval = ark_mem->PreRhsFn(t, y, ark_mem->user_data); + if (retval != 0) { return (ARK_PRERHSFN_FAIL); } } /* call fsi if the problem has an implicit component */ diff --git a/src/arkode/arkode_mristep_nls.c b/src/arkode/arkode_mristep_nls.c index b2e0925920..b10e294eb8 100644 --- a/src/arkode/arkode_mristep_nls.c +++ b/src/arkode/arkode_mristep_nls.c @@ -474,12 +474,11 @@ int mriStep_NlsResidual(N_Vector zcor, N_Vector r, void* arkode_mem) /* update 'ycur' value as stored predictor + current corrector */ N_VLinearSum(ONE, step_mem->zpred, ONE, zcor, ark_mem->ycur); - /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied), then call RHS */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); - if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); + if (retval != 0) { return (ARK_PRERHSFN_FAIL); } } retval = step_mem->nls_fsi(ark_mem->tcur, ark_mem->ycur, step_mem->Fsi[step_mem->stage_map[step_mem->istage]], @@ -535,12 +534,11 @@ int mriStep_NlsFPFunction(N_Vector zcor, N_Vector g, void* arkode_mem) /* update 'ycur' value as stored predictor + current corrector */ N_VLinearSum(ONE, step_mem->zpred, ONE, zcor, ark_mem->ycur); - /* apply user-supplied RHS preprocessing function (if supplied), and then call RHS */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied), then call RHS */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); - if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); + if (retval != 0) { return (ARK_PRERHSFN_FAIL); } } retval = step_mem->nls_fsi(ark_mem->tcur, ark_mem->ycur, step_mem->Fsi[step_mem->stage_map[step_mem->istage]], diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index af661a2c2c..9b02136de6 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -492,11 +492,11 @@ int sprkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, case ARK_FULLRHS_END: case ARK_FULLRHS_OTHER: - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_PREPROCESS_RHS_FAIL); } + retval = ark_mem->PreRhsFn(t, y, ark_mem->user_data); + if (retval != 0) { return (ARK_PRERHSFN_FAIL); } } /* Since f1 and f2 do not have overlapping outputs and so the f vector is @@ -573,16 +573,16 @@ int sprkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tn + chati * ark_mem->h, - prev_stage, ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tn + chati * ark_mem->h, prev_stage, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess rhs, retval = %i", retval); - return (ARK_PREPROCESS_RHS_FAIL); + return (ARK_PRERHSFN_FAIL); } } @@ -616,16 +616,16 @@ int sprkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) N_VConst(ZERO, step_mem->sdata); /* either have to do this or ask user to set other outputs to zero */ - /* apply user-supplied stage preprocessing function (if supplied) */ - if (ark_mem->PreRHSProcess != NULL) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRHSProcess(ark_mem->tn + ci * ark_mem->h, - curr_stage, ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tn + ci * ark_mem->h, curr_stage, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = failed preprocess rhs, retval = %i", retval); - return (ARK_PREPROCESS_RHS_FAIL); + return (ARK_PRERHSFN_FAIL); } } @@ -648,10 +648,10 @@ int sprkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } /* apply user-supplied stage postprocessing function (if supplied) */ - if (ark_mem->PostProcessStage != NULL) + if (is < step_mem->method->stages - 1 && ark_mem->PostProcessStageFn) { - retval = ark_mem->PostProcessStage(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PostProcessStageFn(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -659,6 +659,17 @@ int sprkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) return (ARK_POSTPROCESS_STAGE_FAIL); } } + else if (is == step_mem->method->stages - 1 && ark_mem->PostProcessStepFn) + { + retval = ark_mem->PostProcessStepFn(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); + if (retval != 0) + { + SUNLogInfo(ARK_LOGGER, "end-stages-list", + "status = failed postprocess step, retval = %i", retval); + return (ARK_POSTPROCESS_STEP_FAIL); + } + } /* keep track of the stage number */ step_mem->istage++; @@ -706,11 +717,12 @@ int sprkStep_TakeStep_Compensated(ARKodeMem ark_mem, sunrealtype* dsmPtr, /* if user-supplied stage preprocessing or postprocessing functions, * we error out since those won't work with the increment form */ - if ((ark_mem->PreRHSProcess != NULL) || (ark_mem->PostProcessStage != NULL)) + if ((ark_mem->PreRhsFn) || (ark_mem->PostProcessStageFn) || + (ark_mem->PostProcessStepFn)) { SUNLogInfo(ARK_LOGGER, "begin-stages-list", "status = failed stage stage processing, retval = %i", - ARK_PREPROCESS_RHS_FAIL); + ARK_PRERHSFN_FAIL); arkProcessError(ark_mem, ARK_POSTPROCESS_STAGE_FAIL, __LINE__, __func__, __FILE__, "Compensated summation is not compatible with stage " diff --git a/src/arkode/fmod_int32/farkode_mod.c b/src/arkode/fmod_int32/farkode_mod.c index 1603a6e389..eb14e8ff07 100644 --- a/src/arkode/fmod_int32/farkode_mod.c +++ b/src/arkode/fmod_int32/farkode_mod.c @@ -650,49 +650,49 @@ SWIGEXPORT int _wrap_FARKodeSetUserData(void *farg1, void *farg2) { } -SWIGEXPORT int _wrap_FARKodeSetPreprocessStepFn(void *farg1, ARKPostProcessFn farg2) { +SWIGEXPORT int _wrap_FARKodeSetPreStepFn(void *farg1, ARKPreStepFn farg2) { int fresult ; void *arg1 = (void *) 0 ; - ARKPostProcessFn arg2 = (ARKPostProcessFn) 0 ; + ARKPreStepFn arg2 = (ARKPreStepFn) 0 ; int result; arg1 = (void *)(farg1); - arg2 = (ARKPostProcessFn)(farg2); - result = (int)ARKodeSetPreprocessStepFn(arg1,arg2); + arg2 = (ARKPreStepFn)(farg2); + result = (int)ARKodeSetPreStepFn(arg1,arg2); fresult = (int)(result); return fresult; } -SWIGEXPORT int _wrap_FARKodeSetPostprocessStepFn(void *farg1, ARKPostProcessFn farg2) { +SWIGEXPORT int _wrap_FARKodeSetPostStepFn(void *farg1, ARKPostStepFn farg2) { int fresult ; void *arg1 = (void *) 0 ; - ARKPostProcessFn arg2 = (ARKPostProcessFn) 0 ; + ARKPostStepFn arg2 = (ARKPostStepFn) 0 ; int result; arg1 = (void *)(farg1); - arg2 = (ARKPostProcessFn)(farg2); - result = (int)ARKodeSetPostprocessStepFn(arg1,arg2); + arg2 = (ARKPostStepFn)(farg2); + result = (int)ARKodeSetPostStepFn(arg1,arg2); fresult = (int)(result); return fresult; } -SWIGEXPORT int _wrap_FARKodeSetPostprocessStepFailFn(void *farg1, ARKPostProcessFn farg2) { +SWIGEXPORT int _wrap_FARKodeSetPreRhsFn(void *farg1, ARKPreRhsFn farg2) { int fresult ; void *arg1 = (void *) 0 ; - ARKPostProcessFn arg2 = (ARKPostProcessFn) 0 ; + ARKPreRhsFn arg2 = (ARKPreRhsFn) 0 ; int result; arg1 = (void *)(farg1); - arg2 = (ARKPostProcessFn)(farg2); - result = (int)ARKodeSetPostprocessStepFailFn(arg1,arg2); + arg2 = (ARKPreRhsFn)(farg2); + result = (int)ARKodeSetPreRhsFn(arg1,arg2); fresult = (int)(result); return fresult; } -SWIGEXPORT int _wrap_FARKodeSetPreRHSProcessFn(void *farg1, ARKPostProcessFn farg2) { +SWIGEXPORT int _wrap_FARKodeSetPostprocessStepFn(void *farg1, ARKPostProcessFn farg2) { int fresult ; void *arg1 = (void *) 0 ; ARKPostProcessFn arg2 = (ARKPostProcessFn) 0 ; @@ -700,7 +700,7 @@ SWIGEXPORT int _wrap_FARKodeSetPreRHSProcessFn(void *farg1, ARKPostProcessFn far arg1 = (void *)(farg1); arg2 = (ARKPostProcessFn)(farg2); - result = (int)ARKodeSetPreRHSProcessFn(arg1,arg2); + result = (int)ARKodeSetPostprocessStepFn(arg1,arg2); fresult = (int)(result); return fresult; } diff --git a/src/arkode/fmod_int32/farkode_mod.f90 b/src/arkode/fmod_int32/farkode_mod.f90 index d495a9c80f..7bfcad878b 100644 --- a/src/arkode/fmod_int32/farkode_mod.f90 +++ b/src/arkode/fmod_int32/farkode_mod.f90 @@ -87,9 +87,9 @@ module farkode_mod integer(C_INT), parameter, public :: ARK_POSTPROCESS_FAIL = -37_C_INT integer(C_INT), parameter, public :: ARK_POSTPROCESS_STEP_FAIL = -37_C_INT integer(C_INT), parameter, public :: ARK_POSTPROCESS_STAGE_FAIL = -38_C_INT - integer(C_INT), parameter, public :: ARK_POSTPROCESS_FAILED_STEP_FAIL = -39_C_INT - integer(C_INT), parameter, public :: ARK_PREPROCESS_STEP_FAIL = -40_C_INT - integer(C_INT), parameter, public :: ARK_PREPROCESS_RHS_FAIL = -41_C_INT + integer(C_INT), parameter, public :: ARK_PRESTEPFN_FAIL = -39_C_INT + integer(C_INT), parameter, public :: ARK_POSTSTEPFN_FAIL = -40_C_INT + integer(C_INT), parameter, public :: ARK_PRERHSFN_FAIL = -41_C_INT integer(C_INT), parameter, public :: ARK_USER_PREDICT_FAIL = -42_C_INT integer(C_INT), parameter, public :: ARK_INTERP_FAIL = -43_C_INT integer(C_INT), parameter, public :: ARK_INVALID_TABLE = -44_C_INT @@ -148,10 +148,10 @@ module farkode_mod public :: FARKodeSetFixedStep public :: FARKodeSetStepDirection public :: FARKodeSetUserData - public :: FARKodeSetPreprocessStepFn + public :: FARKodeSetPreStepFn + public :: FARKodeSetPostStepFn + public :: FARKodeSetPreRhsFn public :: FARKodeSetPostprocessStepFn - public :: FARKodeSetPostprocessStepFailFn - public :: FARKodeSetPreRHSProcessFn public :: FARKodeSetPostprocessStageFn public :: FARKodeSetNonlinearSolver public :: FARKodeSetLinear @@ -711,8 +711,8 @@ function swigc_FARKodeSetUserData(farg1, farg2) & integer(C_INT) :: fresult end function -function swigc_FARKodeSetPreprocessStepFn(farg1, farg2) & -bind(C, name="_wrap_FARKodeSetPreprocessStepFn") & +function swigc_FARKodeSetPreStepFn(farg1, farg2) & +bind(C, name="_wrap_FARKodeSetPreStepFn") & result(fresult) use, intrinsic :: ISO_C_BINDING type(C_PTR), value :: farg1 @@ -720,8 +720,8 @@ function swigc_FARKodeSetPreprocessStepFn(farg1, farg2) & integer(C_INT) :: fresult end function -function swigc_FARKodeSetPostprocessStepFn(farg1, farg2) & -bind(C, name="_wrap_FARKodeSetPostprocessStepFn") & +function swigc_FARKodeSetPostStepFn(farg1, farg2) & +bind(C, name="_wrap_FARKodeSetPostStepFn") & result(fresult) use, intrinsic :: ISO_C_BINDING type(C_PTR), value :: farg1 @@ -729,8 +729,8 @@ function swigc_FARKodeSetPostprocessStepFn(farg1, farg2) & integer(C_INT) :: fresult end function -function swigc_FARKodeSetPostprocessStepFailFn(farg1, farg2) & -bind(C, name="_wrap_FARKodeSetPostprocessStepFailFn") & +function swigc_FARKodeSetPreRhsFn(farg1, farg2) & +bind(C, name="_wrap_FARKodeSetPreRhsFn") & result(fresult) use, intrinsic :: ISO_C_BINDING type(C_PTR), value :: farg1 @@ -738,8 +738,8 @@ function swigc_FARKodeSetPostprocessStepFailFn(farg1, farg2) & integer(C_INT) :: fresult end function -function swigc_FARKodeSetPreRHSProcessFn(farg1, farg2) & -bind(C, name="_wrap_FARKodeSetPreRHSProcessFn") & +function swigc_FARKodeSetPostprocessStepFn(farg1, farg2) & +bind(C, name="_wrap_FARKodeSetPostprocessStepFn") & result(fresult) use, intrinsic :: ISO_C_BINDING type(C_PTR), value :: farg1 @@ -2929,67 +2929,67 @@ function FARKodeSetUserData(arkode_mem, user_data) & swig_result = fresult end function -function FARKodeSetPreprocessStepFn(arkode_mem, processstep) & +function FARKodeSetPreStepFn(arkode_mem, prestep_fn) & result(swig_result) use, intrinsic :: ISO_C_BINDING integer(C_INT) :: swig_result type(C_PTR) :: arkode_mem -type(C_FUNPTR), intent(in), value :: processstep +type(C_FUNPTR), intent(in), value :: prestep_fn integer(C_INT) :: fresult type(C_PTR) :: farg1 type(C_FUNPTR) :: farg2 farg1 = arkode_mem -farg2 = processstep -fresult = swigc_FARKodeSetPreprocessStepFn(farg1, farg2) +farg2 = prestep_fn +fresult = swigc_FARKodeSetPreStepFn(farg1, farg2) swig_result = fresult end function -function FARKodeSetPostprocessStepFn(arkode_mem, processstep) & +function FARKodeSetPostStepFn(arkode_mem, poststep_fn) & result(swig_result) use, intrinsic :: ISO_C_BINDING integer(C_INT) :: swig_result type(C_PTR) :: arkode_mem -type(C_FUNPTR), intent(in), value :: processstep +type(C_FUNPTR), intent(in), value :: poststep_fn integer(C_INT) :: fresult type(C_PTR) :: farg1 type(C_FUNPTR) :: farg2 farg1 = arkode_mem -farg2 = processstep -fresult = swigc_FARKodeSetPostprocessStepFn(farg1, farg2) +farg2 = poststep_fn +fresult = swigc_FARKodeSetPostStepFn(farg1, farg2) swig_result = fresult end function -function FARKodeSetPostprocessStepFailFn(arkode_mem, processstep) & +function FARKodeSetPreRhsFn(arkode_mem, prerhs_fn) & result(swig_result) use, intrinsic :: ISO_C_BINDING integer(C_INT) :: swig_result type(C_PTR) :: arkode_mem -type(C_FUNPTR), intent(in), value :: processstep +type(C_FUNPTR), intent(in), value :: prerhs_fn integer(C_INT) :: fresult type(C_PTR) :: farg1 type(C_FUNPTR) :: farg2 farg1 = arkode_mem -farg2 = processstep -fresult = swigc_FARKodeSetPostprocessStepFailFn(farg1, farg2) +farg2 = prerhs_fn +fresult = swigc_FARKodeSetPreRhsFn(farg1, farg2) swig_result = fresult end function -function FARKodeSetPreRHSProcessFn(arkode_mem, prerhsprocess) & +function FARKodeSetPostprocessStepFn(arkode_mem, processstep) & result(swig_result) use, intrinsic :: ISO_C_BINDING integer(C_INT) :: swig_result type(C_PTR) :: arkode_mem -type(C_FUNPTR), intent(in), value :: prerhsprocess +type(C_FUNPTR), intent(in), value :: processstep integer(C_INT) :: fresult type(C_PTR) :: farg1 type(C_FUNPTR) :: farg2 farg1 = arkode_mem -farg2 = prerhsprocess -fresult = swigc_FARKodeSetPreRHSProcessFn(farg1, farg2) +farg2 = processstep +fresult = swigc_FARKodeSetPostprocessStepFn(farg1, farg2) swig_result = fresult end function diff --git a/src/arkode/fmod_int64/farkode_mod.c b/src/arkode/fmod_int64/farkode_mod.c index 48d330b15f..3436b06573 100644 --- a/src/arkode/fmod_int64/farkode_mod.c +++ b/src/arkode/fmod_int64/farkode_mod.c @@ -650,49 +650,49 @@ SWIGEXPORT int _wrap_FARKodeSetUserData(void *farg1, void *farg2) { } -SWIGEXPORT int _wrap_FARKodeSetPreprocessStepFn(void *farg1, ARKPostProcessFn farg2) { +SWIGEXPORT int _wrap_FARKodeSetPreStepFn(void *farg1, ARKPreStepFn farg2) { int fresult ; void *arg1 = (void *) 0 ; - ARKPostProcessFn arg2 = (ARKPostProcessFn) 0 ; + ARKPreStepFn arg2 = (ARKPreStepFn) 0 ; int result; arg1 = (void *)(farg1); - arg2 = (ARKPostProcessFn)(farg2); - result = (int)ARKodeSetPreprocessStepFn(arg1,arg2); + arg2 = (ARKPreStepFn)(farg2); + result = (int)ARKodeSetPreStepFn(arg1,arg2); fresult = (int)(result); return fresult; } -SWIGEXPORT int _wrap_FARKodeSetPostprocessStepFn(void *farg1, ARKPostProcessFn farg2) { +SWIGEXPORT int _wrap_FARKodeSetPostStepFn(void *farg1, ARKPostStepFn farg2) { int fresult ; void *arg1 = (void *) 0 ; - ARKPostProcessFn arg2 = (ARKPostProcessFn) 0 ; + ARKPostStepFn arg2 = (ARKPostStepFn) 0 ; int result; arg1 = (void *)(farg1); - arg2 = (ARKPostProcessFn)(farg2); - result = (int)ARKodeSetPostprocessStepFn(arg1,arg2); + arg2 = (ARKPostStepFn)(farg2); + result = (int)ARKodeSetPostStepFn(arg1,arg2); fresult = (int)(result); return fresult; } -SWIGEXPORT int _wrap_FARKodeSetPostprocessStepFailFn(void *farg1, ARKPostProcessFn farg2) { +SWIGEXPORT int _wrap_FARKodeSetPreRhsFn(void *farg1, ARKPreRhsFn farg2) { int fresult ; void *arg1 = (void *) 0 ; - ARKPostProcessFn arg2 = (ARKPostProcessFn) 0 ; + ARKPreRhsFn arg2 = (ARKPreRhsFn) 0 ; int result; arg1 = (void *)(farg1); - arg2 = (ARKPostProcessFn)(farg2); - result = (int)ARKodeSetPostprocessStepFailFn(arg1,arg2); + arg2 = (ARKPreRhsFn)(farg2); + result = (int)ARKodeSetPreRhsFn(arg1,arg2); fresult = (int)(result); return fresult; } -SWIGEXPORT int _wrap_FARKodeSetPreRHSProcessFn(void *farg1, ARKPostProcessFn farg2) { +SWIGEXPORT int _wrap_FARKodeSetPostprocessStepFn(void *farg1, ARKPostProcessFn farg2) { int fresult ; void *arg1 = (void *) 0 ; ARKPostProcessFn arg2 = (ARKPostProcessFn) 0 ; @@ -700,7 +700,7 @@ SWIGEXPORT int _wrap_FARKodeSetPreRHSProcessFn(void *farg1, ARKPostProcessFn far arg1 = (void *)(farg1); arg2 = (ARKPostProcessFn)(farg2); - result = (int)ARKodeSetPreRHSProcessFn(arg1,arg2); + result = (int)ARKodeSetPostprocessStepFn(arg1,arg2); fresult = (int)(result); return fresult; } diff --git a/src/arkode/fmod_int64/farkode_mod.f90 b/src/arkode/fmod_int64/farkode_mod.f90 index 9ec63c0add..b7a0774301 100644 --- a/src/arkode/fmod_int64/farkode_mod.f90 +++ b/src/arkode/fmod_int64/farkode_mod.f90 @@ -87,9 +87,9 @@ module farkode_mod integer(C_INT), parameter, public :: ARK_POSTPROCESS_FAIL = -37_C_INT integer(C_INT), parameter, public :: ARK_POSTPROCESS_STEP_FAIL = -37_C_INT integer(C_INT), parameter, public :: ARK_POSTPROCESS_STAGE_FAIL = -38_C_INT - integer(C_INT), parameter, public :: ARK_POSTPROCESS_FAILED_STEP_FAIL = -39_C_INT - integer(C_INT), parameter, public :: ARK_PREPROCESS_STEP_FAIL = -40_C_INT - integer(C_INT), parameter, public :: ARK_PREPROCESS_RHS_FAIL = -41_C_INT + integer(C_INT), parameter, public :: ARK_PRESTEPFN_FAIL = -39_C_INT + integer(C_INT), parameter, public :: ARK_POSTSTEPFN_FAIL = -40_C_INT + integer(C_INT), parameter, public :: ARK_PRERHSFN_FAIL = -41_C_INT integer(C_INT), parameter, public :: ARK_USER_PREDICT_FAIL = -42_C_INT integer(C_INT), parameter, public :: ARK_INTERP_FAIL = -43_C_INT integer(C_INT), parameter, public :: ARK_INVALID_TABLE = -44_C_INT @@ -148,10 +148,10 @@ module farkode_mod public :: FARKodeSetFixedStep public :: FARKodeSetStepDirection public :: FARKodeSetUserData - public :: FARKodeSetPreprocessStepFn + public :: FARKodeSetPreStepFn + public :: FARKodeSetPostStepFn + public :: FARKodeSetPreRhsFn public :: FARKodeSetPostprocessStepFn - public :: FARKodeSetPostprocessStepFailFn - public :: FARKodeSetPreRHSProcessFn public :: FARKodeSetPostprocessStageFn public :: FARKodeSetNonlinearSolver public :: FARKodeSetLinear @@ -711,8 +711,8 @@ function swigc_FARKodeSetUserData(farg1, farg2) & integer(C_INT) :: fresult end function -function swigc_FARKodeSetPreprocessStepFn(farg1, farg2) & -bind(C, name="_wrap_FARKodeSetPreprocessStepFn") & +function swigc_FARKodeSetPreStepFn(farg1, farg2) & +bind(C, name="_wrap_FARKodeSetPreStepFn") & result(fresult) use, intrinsic :: ISO_C_BINDING type(C_PTR), value :: farg1 @@ -720,8 +720,8 @@ function swigc_FARKodeSetPreprocessStepFn(farg1, farg2) & integer(C_INT) :: fresult end function -function swigc_FARKodeSetPostprocessStepFn(farg1, farg2) & -bind(C, name="_wrap_FARKodeSetPostprocessStepFn") & +function swigc_FARKodeSetPostStepFn(farg1, farg2) & +bind(C, name="_wrap_FARKodeSetPostStepFn") & result(fresult) use, intrinsic :: ISO_C_BINDING type(C_PTR), value :: farg1 @@ -729,8 +729,8 @@ function swigc_FARKodeSetPostprocessStepFn(farg1, farg2) & integer(C_INT) :: fresult end function -function swigc_FARKodeSetPostprocessStepFailFn(farg1, farg2) & -bind(C, name="_wrap_FARKodeSetPostprocessStepFailFn") & +function swigc_FARKodeSetPreRhsFn(farg1, farg2) & +bind(C, name="_wrap_FARKodeSetPreRhsFn") & result(fresult) use, intrinsic :: ISO_C_BINDING type(C_PTR), value :: farg1 @@ -738,8 +738,8 @@ function swigc_FARKodeSetPostprocessStepFailFn(farg1, farg2) & integer(C_INT) :: fresult end function -function swigc_FARKodeSetPreRHSProcessFn(farg1, farg2) & -bind(C, name="_wrap_FARKodeSetPreRHSProcessFn") & +function swigc_FARKodeSetPostprocessStepFn(farg1, farg2) & +bind(C, name="_wrap_FARKodeSetPostprocessStepFn") & result(fresult) use, intrinsic :: ISO_C_BINDING type(C_PTR), value :: farg1 @@ -2929,67 +2929,67 @@ function FARKodeSetUserData(arkode_mem, user_data) & swig_result = fresult end function -function FARKodeSetPreprocessStepFn(arkode_mem, processstep) & +function FARKodeSetPreStepFn(arkode_mem, prestep_fn) & result(swig_result) use, intrinsic :: ISO_C_BINDING integer(C_INT) :: swig_result type(C_PTR) :: arkode_mem -type(C_FUNPTR), intent(in), value :: processstep +type(C_FUNPTR), intent(in), value :: prestep_fn integer(C_INT) :: fresult type(C_PTR) :: farg1 type(C_FUNPTR) :: farg2 farg1 = arkode_mem -farg2 = processstep -fresult = swigc_FARKodeSetPreprocessStepFn(farg1, farg2) +farg2 = prestep_fn +fresult = swigc_FARKodeSetPreStepFn(farg1, farg2) swig_result = fresult end function -function FARKodeSetPostprocessStepFn(arkode_mem, processstep) & +function FARKodeSetPostStepFn(arkode_mem, poststep_fn) & result(swig_result) use, intrinsic :: ISO_C_BINDING integer(C_INT) :: swig_result type(C_PTR) :: arkode_mem -type(C_FUNPTR), intent(in), value :: processstep +type(C_FUNPTR), intent(in), value :: poststep_fn integer(C_INT) :: fresult type(C_PTR) :: farg1 type(C_FUNPTR) :: farg2 farg1 = arkode_mem -farg2 = processstep -fresult = swigc_FARKodeSetPostprocessStepFn(farg1, farg2) +farg2 = poststep_fn +fresult = swigc_FARKodeSetPostStepFn(farg1, farg2) swig_result = fresult end function -function FARKodeSetPostprocessStepFailFn(arkode_mem, processstep) & +function FARKodeSetPreRhsFn(arkode_mem, prerhs_fn) & result(swig_result) use, intrinsic :: ISO_C_BINDING integer(C_INT) :: swig_result type(C_PTR) :: arkode_mem -type(C_FUNPTR), intent(in), value :: processstep +type(C_FUNPTR), intent(in), value :: prerhs_fn integer(C_INT) :: fresult type(C_PTR) :: farg1 type(C_FUNPTR) :: farg2 farg1 = arkode_mem -farg2 = processstep -fresult = swigc_FARKodeSetPostprocessStepFailFn(farg1, farg2) +farg2 = prerhs_fn +fresult = swigc_FARKodeSetPreRhsFn(farg1, farg2) swig_result = fresult end function -function FARKodeSetPreRHSProcessFn(arkode_mem, prerhsprocess) & +function FARKodeSetPostprocessStepFn(arkode_mem, processstep) & result(swig_result) use, intrinsic :: ISO_C_BINDING integer(C_INT) :: swig_result type(C_PTR) :: arkode_mem -type(C_FUNPTR), intent(in), value :: prerhsprocess +type(C_FUNPTR), intent(in), value :: processstep integer(C_INT) :: fresult type(C_PTR) :: farg1 type(C_FUNPTR) :: farg2 farg1 = arkode_mem -farg2 = prerhsprocess -fresult = swigc_FARKodeSetPreRHSProcessFn(farg1, farg2) +farg2 = processstep +fresult = swigc_FARKodeSetPostprocessStepFn(farg1, farg2) swig_result = fresult end function From d23c70d9ac1157995788230784765674f51f9c5d Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Wed, 4 Mar 2026 09:59:03 -0500 Subject: [PATCH 146/298] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Mustafa Ağgül <33010171+maggul@users.noreply.github.com> --- src/arkode/arkode_lsrkstep.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 721e7f132e..3f8d35fa08 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -1245,13 +1245,13 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr // from https://doi.org/10.1016/j.cam.2022.114325 pg 5 hbt1 = ark_mem->h * SUN_RCONST(0.694021459207626); hbt2 = ZERO; - hbt3 = ark_mem->h * (ONE - SUN_RCONST(0.694021459207626)); + hbt3 = ark_mem->h - hbt1; } else { - hbt1 = ark_mem->h * (rs + ONE) / (rs * rs); + hbt1 = hrsinv * (ONE + rsinv); hbt2 = hrsinv; - hbt3 = ark_mem->h * (rs - ONE) / (rs * rs); + hbt3 = hrsinv * (ONE - rsinv); } /* Begin first stage */ @@ -1493,8 +1493,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr const sunrealtype rs = (sunrealtype)step_mem->req_stages; const sunrealtype rn = SUNRsqrt(rs); const sunrealtype hrat = ark_mem->h / (rs - rn); - const sunrealtype rsinv = ONE / rs; - const sunrealtype hrsinv = ark_mem->h * rsinv; + const sunrealtype hrsinv = ark_mem->h / rs; const int in = (int)SUNRround(rn); /* Begin the first stage */ @@ -1865,8 +1864,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Initialize method coefficients */ const sunrealtype rs = SUN_RCONST(4.0); const sunrealtype hp5 = ark_mem->h * SUN_RCONST(0.5); - const sunrealtype rsinv = ONE / rs; - const sunrealtype hrsinv = ark_mem->h * rsinv; + const sunrealtype hrsinv = ark_mem->h / rs; /* Begin the first stage */ SUNLogInfo(ARK_LOGGER, "begin-stages-list", @@ -2312,7 +2310,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt ark_mem->user_data); step_mem->nfe++; - SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->tempv3, "F_%i(:) =", j); + SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->tempv3, "F_%i(:) =", j - 1); SUNLogInfoIf(retval != 0, ARK_LOGGER, "end-stages-list", "status = failed rhs eval, retval = %i", retval); @@ -2372,7 +2370,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt ark_mem->user_data); step_mem->nfe++; - SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->tempv3, "F_10(:) =", 9); + SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->tempv3, "F_9(:) =", 9); SUNLogInfoIf(retval != 0, ARK_LOGGER, "end-stages-list", "status = failed rhs eval, retval = %i", retval); From f4280004467b7b3cf5eeccaa43f79a6a2d669d0e Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Wed, 4 Mar 2026 10:05:11 -0500 Subject: [PATCH 147/298] Formatting --- src/arkode/arkode_lsrkstep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 3f8d35fa08..836a6e0362 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -2310,7 +2310,8 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt ark_mem->user_data); step_mem->nfe++; - SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->tempv3, "F_%i(:) =", j - 1); + SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->tempv3, + "F_%i(:) =", j - 1); SUNLogInfoIf(retval != 0, ARK_LOGGER, "end-stages-list", "status = failed rhs eval, retval = %i", retval); From 93be86de98c262e89860126726c26c53cc13ffb7 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Wed, 4 Mar 2026 10:19:28 -0500 Subject: [PATCH 148/298] Updated PR to remove the 'promise' that we call user routines with ycur, and removed changes that increased cost --- CHANGELOG.md | 10 +--------- doc/shared/RecentChanges.rst | 10 +--------- src/arkode/arkode.c | 3 +-- src/arkode/arkode_mristep.c | 32 +++++++++++++++++--------------- 4 files changed, 20 insertions(+), 35 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c0f2e4c66..d5c2778fc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,15 +7,7 @@ ### New Features and Enhancements Multiple minor updates were made to the ARKODE package. We removed an extraneous -copy of the output vector when using ARKODE in `ARK_ONE_STEP` mode. We -standardized calls to the user-supplied right-hand-side functions so that these -are provided the user-supplied solution vector passed to `ARKodeEvolve` whenever -possible -- the notable exceptions are the Hermite temporal interpolation module, -the provided preconditioners ARKBANDPRE and ARKBBDPRE, banded or dense linear -solvers with automatically-approximated Jacobian matrices, iterative linear solvers -with automatically-approximated Jacobian-times-vector product, temporal root-finding, -discrete adjoint modules in ARKStep or ERKStep, the SPRKStep stepper, and LSRKStep's -use of the automated dominant eigenvalue estimation module. +copy of the output vector when using ARKODE in `ARK_ONE_STEP` mode. The default number of stages for the SSP Runge-Kutta methods `ARKODE_LSRK_SSP_S_2` and `ARKODE_LSRK_SSP_S_3` in LSRKStep were changed from 10 and 9, respectively, to their minimum allowable values of 2 and 4. Users may revert to the previous values diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index 49119362c3..33d22ce658 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -6,15 +6,7 @@ **New Features and Enhancements** Multiple minor updates were made to the ARKODE package. We removed an extraneous -copy of the output vector when using ARKODE in ``ARK_ONE_STEP`` mode. We -standardized calls to the user-supplied right-hand-side functions so that these -are provided the user-supplied solution vector passed to :c:func:`ARKodeEvolve` whenever -possible -- the notable exceptions are the Hermite temporal interpolation module, -the provided preconditioners ARKBANDPRE and ARKBBDPRE, banded or dense linear -solvers with automatically-approximated Jacobian matrices, iterative linear solvers -with automatically-approximated Jacobian-times-vector product, temporal root-finding, -discrete adjoint modules in ARKStep or ERKStep, the SPRKStep stepper, and LSRKStep's -use of the automated dominant eigenvalue estimation module. +copy of the output vector when using ARKODE in ``ARK_ONE_STEP`` mode. The default number of stages for the SSP Runge-Kutta methods :c:enumerator:`ARKODE_LSRK_SSP_S_2` and :c:enumerator:`ARKODE_LSRK_SSP_S_3` in LSRKStep were changed from 10 and 9, respectively, to their minimum allowable values of 2 and 4. Users may revert to the previous values by calling diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 29c39943d7..345ecf3cd5 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -2546,8 +2546,7 @@ int arkHin(ARKodeMem ark_mem, sunrealtype tout) mass matrix solve when computing the full RHS. Before calling arkHin, h is set to |tout - tcur| or 1 and so we do not need to guard against h == 0 here before calling the full RHS. */ - N_VScale(ONE, ark_mem->yn, ark_mem->ycur); - retval = ark_mem->step_fullrhs(ark_mem, ark_mem->tn, ark_mem->ycur, + retval = ark_mem->step_fullrhs(ark_mem, ark_mem->tn, ark_mem->yn, ark_mem->fn, ARK_FULLRHS_START); if (retval) { return ARK_RHSFUNC_FAIL; } ark_mem->fn_is_current = SUNTRUE; diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 83dc047042..6d4518fe6c 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1320,12 +1320,9 @@ int mriStep_Init(ARKodeMem ark_mem, sunrealtype tout, int init_type) } if (ark_mem->hin == ZERO) { - /* initialize (tcur,ycur) to (t0,y0) */ - ark_mem->tcur = ark_mem->tn; - N_VScale(ONE, ark_mem->yn, ark_mem->ycur); - /* tempv1 = fslow(t0, y0) */ - if (mriStep_SlowRHS(ark_mem, ark_mem->tcur, ark_mem->ycur, + ark_mem->tcur = ark_mem->tn; + if (mriStep_SlowRHS(ark_mem, ark_mem->tcur, ark_mem->yn, ark_mem->tempv1, ARK_FULLRHS_START) != ARK_SUCCESS) { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, __FILE__, @@ -1795,6 +1792,7 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt ARKodeMRIStepMem step_mem; /* outer stepper memory */ int is; /* current stage index */ int retval; /* reusable return flag */ + N_Vector tmp; /* N_Vector pointer */ SUNAdaptController_Type adapt_type; /* timestep adaptivity type */ sunrealtype t0, tf; /* start/end of each stage */ sunbooleantype calc_fslow; @@ -2122,9 +2120,15 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt { is = step_mem->stages; - /* Copy ark_mem->ycur into ark_mem->tempv4, since it serves as the initial condition - for both this embedding stage, and the subsequent final stage. */ + /* Temporarily swap ark_mem->ycur and ark_mem->tempv4 pointers, copying + data so that both hold the current ark_mem->ycur value. This ensures + that during this embedding "stage": + - ark_mem->ycur will be the correct initial condition for the final stage. + - ark_mem->tempv4 will hold the embedded solution vector. */ N_VScale(ONE, ark_mem->ycur, ark_mem->tempv4); + tmp = ark_mem->ycur; + ark_mem->ycur = ark_mem->tempv4; + ark_mem->tempv4 = tmp; /* Reset ark_mem->tcur as the time value corresponding with the end of the step */ /* Set relevant stage times (including desired stage time for implicit solves) */ @@ -2191,11 +2195,10 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt SUNLogExtraDebugVec(ARK_LOGGER, "embedded solution", ark_mem->ycur, "y_embedded(:) ="); - /* Copy embedding solution into ark_mem->tempv1 for later error estimation, - reset ark_mem->ycur to ark_mem->tempv4 in preparation for the final stage, - and reset the inner integrator */ - N_VScale(ONE, ark_mem->ycur, ark_mem->tempv1); - N_VScale(ONE, ark_mem->tempv4, ark_mem->ycur); + /* Swap back ark_mem->ycur with ark_mem->tempv4, and reset the inner integrator */ + tmp = ark_mem->ycur; + ark_mem->ycur = ark_mem->tempv4; + ark_mem->tempv4 = tmp; retval = mriStepInnerStepper_Reset(step_mem->stepper, t0, ark_mem->ycur); if (retval != ARK_SUCCESS) { @@ -2297,11 +2300,10 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } /* Compute temporal error estimate via difference between step - solution and embedding (embedding is already stored in ark_mem->tempv1 - so we need only subtract off ark_mem->ycur) and take norm. */ + solution and embedding, store in ark_mem->tempv1, and take norm. */ if (do_embedding) { - N_VLinearSum(ONE, ark_mem->tempv1, -ONE, ark_mem->ycur, ark_mem->tempv1); + N_VLinearSum(ONE, ark_mem->tempv4, -ONE, ark_mem->ycur, ark_mem->tempv1); *dsmPtr = N_VWrmsNorm(ark_mem->tempv1, ark_mem->ewt); } From db848c98e8c18159d1099e6fc3e179f0c73ee310 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Wed, 4 Mar 2026 10:29:30 -0500 Subject: [PATCH 149/298] Updated logging output to reflect stage index shift --- .../test_logging_arkode_lsrkstep_lvl4_3.out | 4 +-- .../test_logging_arkode_lsrkstep_lvl5_3.out | 6 ++-- .../test_logging_arkode_lsrkstep_lvl5_5.out | 36 +++++++++---------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_3.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_3.out index c4c77f2721..ff2c449d12 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_3.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_3.out @@ -53,10 +53,10 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-compute-embedding] status = success -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = inf +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.0011976776899388 [DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 1.220703125e-06 [DEBUG][rank 0][arkAdapt][new-step-eta] eta = 20 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 1.32348889930549e-13 6.104125976562500e-08 6.104125976562493e-08 0.000000000000000e+00 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 3, tn = 6.1041259765625e-08, h = 1.220703125e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 0, tcur = 6.1041259765625e-08 diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_3.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_3.out index 3b709c4c43..d3e7fbc226 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_3.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_3.out @@ -99,12 +99,12 @@ Start LSRKStep Logging test 6.104125976562493e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] [DEBUG][rank 0][lsrkStep_TakeStepSSPs3][embedded solution] y_embedded(:) = - 6.104125976562493e-08 + 6.104125976562494e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-compute-embedding] status = success -[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = inf +[DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.0011976776899388 [DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 1.220703125e-06 [DEBUG][rank 0][arkAdapt][new-step-eta] eta = 20 -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 1.32348889930549e-13 6.104125976562500e-08 6.104125976562493e-08 0.000000000000000e+00 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 3, tn = 6.1041259765625e-08, h = 1.220703125e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 0, tcur = 6.1041259765625e-08 diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_5.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_5.out index b3b8e0ea52..4104961898 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_5.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_5.out @@ -25,26 +25,26 @@ Start LSRKStep Logging test [DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_4(:) = 1.000000000000000e+00 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 5, tcur = 5.08626302083333e-12 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 5, tcur = 2.03450520833333e-12 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 2.03450520833333e-12 -[DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_6(:) = +[DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_5(:) = 1.000000000000000e+00 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 7, tcur = 3.0517578125e-12 -[DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_7(:) = +[DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_6(:) = 1.000000000000000e+00 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 8, tcur = 4.06901041666667e-12 -[DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_8(:) = +[DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_7(:) = 1.000000000000000e+00 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 9, tcur = 5.08626302083333e-12 -[DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_9(:) = +[DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_8(:) = 1.000000000000000e+00 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 10, tcur = 6.103515625e-12 -[DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_10(:) = +[DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_9(:) = 1.000000000000000e+00 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [DEBUG][rank 0][lsrkStep_TakeStepSSP104][updated solution] ycur(:) = @@ -79,26 +79,26 @@ Start LSRKStep Logging test [DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_4(:) = 9.999999999999984e-01 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 5, tcur = 5.08687337239583e-08 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 5, tcur = 2.03511555989583e-08 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 2.03511555989583e-08 -[DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_6(:) = +[DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_5(:) = 9.999999999999996e-01 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 7, tcur = 3.0523681640625e-08 -[DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_7(:) = +[DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_6(:) = 9.999999999999991e-01 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 8, tcur = 4.06962076822917e-08 -[DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_8(:) = +[DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_7(:) = 9.999999999999984e-01 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 9, tcur = 5.08687337239583e-08 -[DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_9(:) = +[DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_8(:) = 9.999999999999973e-01 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 10, tcur = 6.1041259765625e-08 -[DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_10(:) = +[DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_9(:) = 9.999999999999962e-01 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [DEBUG][rank 0][lsrkStep_TakeStepSSP104][updated solution] ycur(:) = @@ -133,26 +133,26 @@ Start LSRKStep Logging test [DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_4(:) = 9.999999999992345e-01 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 5, tcur = 1.07829386393229e-06 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 5, tcur = 4.67942301432292e-07 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 4.67942301432292e-07 -[DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_6(:) = +[DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_5(:) = 9.999999999997812e-01 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 7, tcur = 6.71392822265625e-07 -[DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_7(:) = +[DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_6(:) = 9.999999999995494e-01 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 8, tcur = 8.74843343098958e-07 -[DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_8(:) = +[DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_7(:) = 9.999999999992346e-01 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 9, tcur = 1.07829386393229e-06 -[DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_9(:) = +[DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_8(:) = 9.999999999988374e-01 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 10, tcur = 1.28174438476563e-06 -[DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_10(:) = +[DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_9(:) = 9.999999999983571e-01 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [DEBUG][rank 0][lsrkStep_TakeStepSSP104][updated solution] ycur(:) = From 2aacc711340a29ef8b8660aa959f946a62319a99 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Wed, 4 Mar 2026 10:44:37 -0500 Subject: [PATCH 150/298] Formatting --- src/arkode/arkode_mristep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 6d4518fe6c..6090eaab92 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1322,8 +1322,8 @@ int mriStep_Init(ARKodeMem ark_mem, sunrealtype tout, int init_type) { /* tempv1 = fslow(t0, y0) */ ark_mem->tcur = ark_mem->tn; - if (mriStep_SlowRHS(ark_mem, ark_mem->tcur, ark_mem->yn, - ark_mem->tempv1, ARK_FULLRHS_START) != ARK_SUCCESS) + if (mriStep_SlowRHS(ark_mem, ark_mem->tcur, ark_mem->yn, ark_mem->tempv1, + ARK_FULLRHS_START) != ARK_SUCCESS) { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, __FILE__, "error calling slow RHS function(s)"); From a734e0254a7187a9f6ea0dfd3f2b732998e095da Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Wed, 4 Mar 2026 12:42:54 -0500 Subject: [PATCH 151/298] Fixed misplaced stage index update in SSP-10-4 --- src/arkode/arkode_lsrkstep.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 67343eaf29..1b2105b6c8 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -2255,9 +2255,6 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* Evaluate stages j = 2,...,5 */ for (int j = 2; j <= 5; j++) { - /* set stage index (0-based) */ - step_mem->istage = j - 1; - /* Complete previous stage by evaluating RHS and storing in tempv3 */ ark_mem->tcur = ark_mem->tn + (j - 1) * hsixth; @@ -2274,6 +2271,9 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } } + /* update stage index (0-based) */ + step_mem->istage = j - 1; + /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRHSProcess != NULL) { From d74c8d909138095df53c716c9eda0c69e59b3227 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 6 Mar 2026 12:29:21 -0500 Subject: [PATCH 152/298] Re-enabled Python CI --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ebf16cfd9b..b6238ad61a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -96,8 +96,7 @@ jobs: # Check for changes to trigger python interface checks # Updates in include or bindings/sundials4py directories if git diff --name-only "$BASE" "$HEAD" | grep -qE '^(include/|bindings/sundials4py/)'; then - #echo "python=true" >> "$GITHUB_OUTPUT" - echo "python=false" >> "$GITHUB_OUTPUT" + echo "python=true" >> "$GITHUB_OUTPUT" else echo "python=false" >> "$GITHUB_OUTPUT" fi From 85dc9430c59676ab7b89b6cf028bb2d1218064db Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 6 Mar 2026 12:47:16 -0500 Subject: [PATCH 153/298] Python --- .../sundials4py/arkode/arkode_generated.hpp | 39 ++++++++++--------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/bindings/sundials4py/arkode/arkode_generated.hpp b/bindings/sundials4py/arkode/arkode_generated.hpp index e5e6bba6c3..c4ca9f591b 100644 --- a/bindings/sundials4py/arkode/arkode_generated.hpp +++ b/bindings/sundials4py/arkode/arkode_generated.hpp @@ -62,24 +62,27 @@ m.attr("ARK_INNERTOOUTER_FAIL") = -36; m.attr("ARK_POSTPROCESS_FAIL") = -37; m.attr("ARK_POSTPROCESS_STEP_FAIL") = -37; m.attr("ARK_POSTPROCESS_STAGE_FAIL") = -38; -m.attr("ARK_USER_PREDICT_FAIL") = -39; -m.attr("ARK_INTERP_FAIL") = -40; -m.attr("ARK_INVALID_TABLE") = -41; -m.attr("ARK_CONTEXT_ERR") = -42; -m.attr("ARK_RELAX_FAIL") = -43; -m.attr("ARK_RELAX_MEM_NULL") = -44; -m.attr("ARK_RELAX_FUNC_FAIL") = -45; -m.attr("ARK_RELAX_JAC_FAIL") = -46; -m.attr("ARK_CONTROLLER_ERR") = -47; -m.attr("ARK_STEPPER_UNSUPPORTED") = -48; -m.attr("ARK_DOMEIG_FAIL") = -49; -m.attr("ARK_MAX_STAGE_LIMIT_FAIL") = -50; -m.attr("ARK_SUNSTEPPER_ERR") = -51; -m.attr("ARK_STEP_DIRECTION_ERR") = -52; -m.attr("ARK_ADJ_CHECKPOINT_FAIL") = -53; -m.attr("ARK_ADJ_RECOMPUTE_FAIL") = -54; -m.attr("ARK_SUNADJSTEPPER_ERR") = -55; -m.attr("ARK_DEE_FAIL") = -56; +m.attr("ARK_PRESTEPFN_FAIL") = -39; +m.attr("ARK_POSTSTEPFN_FAIL") = -40; +m.attr("ARK_PRERHSFN_FAIL") = -41; +m.attr("ARK_USER_PREDICT_FAIL") = -42; +m.attr("ARK_INTERP_FAIL") = -43; +m.attr("ARK_INVALID_TABLE") = -44; +m.attr("ARK_CONTEXT_ERR") = -45; +m.attr("ARK_RELAX_FAIL") = -46; +m.attr("ARK_RELAX_MEM_NULL") = -47; +m.attr("ARK_RELAX_FUNC_FAIL") = -48; +m.attr("ARK_RELAX_JAC_FAIL") = -49; +m.attr("ARK_CONTROLLER_ERR") = -50; +m.attr("ARK_STEPPER_UNSUPPORTED") = -51; +m.attr("ARK_DOMEIG_FAIL") = -52; +m.attr("ARK_MAX_STAGE_LIMIT_FAIL") = -53; +m.attr("ARK_SUNSTEPPER_ERR") = -54; +m.attr("ARK_STEP_DIRECTION_ERR") = -55; +m.attr("ARK_ADJ_CHECKPOINT_FAIL") = -56; +m.attr("ARK_ADJ_RECOMPUTE_FAIL") = -57; +m.attr("ARK_SUNADJSTEPPER_ERR") = -58; +m.attr("ARK_DEE_FAIL") = -59; m.attr("ARK_UNRECOGNIZED_ERROR") = -99; auto pyEnumARKRelaxSolver = nb::enum_(m, "ARKRelaxSolver", From 51bfcc46827f4eb365827c7fdb6053916ad1d617 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Sat, 7 Mar 2026 16:12:38 -0500 Subject: [PATCH 154/298] Formatting --- src/arkode/arkode_lsrkstep.c | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index e4ffa1f689..518991c9d1 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -828,8 +828,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-compute-embedding", @@ -1156,8 +1155,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-compute-embedding", @@ -1393,8 +1391,7 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr ark_mem->tcur = ark_mem->tn + ark_mem->h; if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1623,7 +1620,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr if (ark_mem->PostProcessStageFn) { retval = ark_mem->PostProcessStageFn(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1700,8 +1697,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1959,8 +1955,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -2011,8 +2006,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -2074,8 +2068,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -2252,7 +2245,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt if (ark_mem->PreRhsFn) { retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -2326,7 +2319,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt if (ark_mem->PreRhsFn) { retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -2386,8 +2379,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", From 82fb71b6beabedf5787b1c2d64a61e04186de883 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Sat, 7 Mar 2026 16:19:21 -0500 Subject: [PATCH 155/298] Fixed merge error --- src/arkode/arkode_lsrkstep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 518991c9d1..a9f5d5e13a 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -2814,7 +2814,7 @@ int lsrkStep_DQJtimes(void* arkode_mem, N_Vector v, N_Vector Jv) if (ark_mem->PreRhsFn) { retval = ark_mem->PreRhsFn(t, y, ark_mem->user_data); - if (retval != 0) { return ARK_PREPROCESS_RHS_FAIL; } + if (retval != 0) { return ARK_PRERHSFN_FAIL; } } retval = step_mem->fe(t, y, ark_mem->fn, ark_mem->user_data); From d90dfb2f527615e4e28df5aadd219a19c9aa6e38 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Wed, 11 Mar 2026 10:27:22 -0400 Subject: [PATCH 156/298] Fixed logging output for Jenkins --- .../logging/test_logging_arkode_lsrkstep_lvl3_3.out | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_3.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_3.out index 8bc169f9b5..d1281b14da 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_3.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_3.out @@ -23,7 +23,7 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 9, tcur = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-compute-embedding] status = success [INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 6.103515625000001e-12 6.103515625000001e-12 0.000000000000000e+00 @@ -48,9 +48,9 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 9, tcur = 6.1041259765625e-08 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-compute-embedding] status = success -[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 0 +[INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 1.32348889930549e-13 6.104125976562500e-08 6.104125976562493e-08 0.000000000000000e+00 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 3, tn = 6.1041259765625e-08, h = 1.220703125e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 0, tcur = 6.1041259765625e-08 @@ -73,7 +73,7 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-stages-list] stage = 9, tcur = 1.28174438476563e-06 [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] +[INFO][rank 0][lsrkStep_TakeStepSSPs3][begin-compute-embedding] [INFO][rank 0][lsrkStep_TakeStepSSPs3][end-compute-embedding] status = success [INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 1.65070663502083e-10 1.281744384765625e-06 1.281744384764923e-06 2.117582368135751e-22 From 3f0df2705381bc3a52fcff9e9eeae16a62f9314b Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Wed, 11 Mar 2026 13:35:47 -0400 Subject: [PATCH 157/298] Updated new unit tests based on upstream changes from feature/stageprocessing branch --- .../CXX_serial/ark_test_stageinfo_arkstep.cpp | 37 ++++++++++--------- .../CXX_serial/ark_test_stageinfo_erkstep.cpp | 37 ++++++++++--------- .../ark_test_stageinfo_forcingstep.cpp | 37 ++++++++++--------- .../ark_test_stageinfo_lsrkstep.cpp | 37 ++++++++++--------- .../CXX_serial/ark_test_stageinfo_mristep.cpp | 37 ++++++++++--------- .../ark_test_stageinfo_splittingstep.cpp | 37 ++++++++++--------- .../ark_test_stageinfo_sprkstep.cpp | 37 ++++++++++--------- 7 files changed, 140 insertions(+), 119 deletions(-) diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp index 755b49897d..557c0cb231 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp @@ -41,10 +41,10 @@ using namespace problems::kpr; // callback functions below. This would normally be stored in user_data, but // here we reuse problem definitions from other tests. void* arkode_mem = nullptr; -static int preprocess_step(sunrealtype t, N_Vector y, void* user_data); +static int pre_step(sunrealtype t, N_Vector y, long int step, int attempt, void* user_data); +static int post_step(sunrealtype t, N_Vector y, long int step, void* user_data); +static int pre_rhs(sunrealtype t, N_Vector y, void* user_data); static int postprocess_step(sunrealtype t, N_Vector y, void* user_data); -static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data); -static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data); static int postprocess_stage(sunrealtype t, N_Vector y, void* user_data); int main(int argc, char* argv[]) @@ -116,14 +116,14 @@ int main(int argc, char* argv[]) } // Set pre/post step and stage routines - flag = ARKodeSetPreprocessStepFn(arkode_mem, preprocess_step); - if (check_flag(flag, "ARKodeSetPreprocessStepFn")) { return 1; } + flag = ARKodeSetPreStepFn(arkode_mem, pre_step); + if (check_flag(flag, "ARKodeSetPreStepFn")) { return 1; } + flag = ARKodeSetPostStepFn(arkode_mem, post_step); + if (check_flag(flag, "ARKodeSetPostStepFn")) { return 1; } flag = ARKodeSetPostprocessStepFn(arkode_mem, postprocess_step); if (check_flag(flag, "ARKodeSetPostprocessStepFn")) { return 1; } - flag = ARKodeSetPostprocessStepFailFn(arkode_mem, postprocess_step_fail); - if (check_flag(flag, "ARKodeSetPostprocessStepFailFn")) { return 1; } - flag = ARKodeSetPreRHSProcessFn(arkode_mem, preprocess_stage); - if (check_flag(flag, "ARKodeSetPreRHSProcessFn")) { return 1; } + flag = ARKodeSetPreRhsFn(arkode_mem, pre_rhs); + if (check_flag(flag, "ARKodeSetPreRhsFn")) { return 1; } flag = ARKodeSetPostprocessStageFn(arkode_mem, postprocess_stage); if (check_flag(flag, "ARKodeSetPostprocessStageFn")) { return 1; } @@ -183,7 +183,8 @@ int main(int argc, char* argv[]) } // Callback functions -static int preprocess_step(sunrealtype t, N_Vector y, void* user_data) +static int pre_step(sunrealtype t, N_Vector y, long int step, + int attempt, void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -196,15 +197,16 @@ static int preprocess_step(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; return -1; } - std::cout << " [Pre-step processing at t = " << std::setprecision(2) << t + std::cout << " [Pre-step at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << ")," + << " step = " << step << ", attempt = " << attempt << ", " << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; return 0; } -static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) +static int post_step(sunrealtype t, N_Vector y, long int step, void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -217,15 +219,16 @@ static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; return -1; } - std::cout << " [Post-step processing at t = " << std::setprecision(2) << t + std::cout << " [Post-step at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << ")," + << " step = " << step << ", " << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; return 0; } -static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) +static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -238,7 +241,7 @@ static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; return -1; } - std::cout << " [Post-step failure processing at t = " + std::cout << " [Postprocess-step at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << ")," << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl @@ -246,7 +249,7 @@ static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) return 0; } -static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) +static int pre_rhs(sunrealtype t, N_Vector y, void* user_data) { int stage, max_stages; sunrealtype tn, tcur; @@ -265,7 +268,7 @@ static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetStageIndex" << std::endl; return -1; } - std::cout << " [Pre-RHS processing (stage " << stage << " of " << max_stages + std::cout << " [Pre-RHS (stage " << stage << " of " << max_stages << ") at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << "), " << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp index cdbf144a99..bb71052033 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp @@ -39,10 +39,10 @@ using namespace problems::kpr; // callback functions below. This would normally be stored in user_data, but // here we reuse problem definitions from other tests. void* arkode_mem = nullptr; -static int preprocess_step(sunrealtype t, N_Vector y, void* user_data); +static int pre_step(sunrealtype t, N_Vector y, long int step, int attempt, void* user_data); +static int post_step(sunrealtype t, N_Vector y, long int step, void* user_data); +static int pre_rhs(sunrealtype t, N_Vector y, void* user_data); static int postprocess_step(sunrealtype t, N_Vector y, void* user_data); -static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data); -static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data); static int postprocess_stage(sunrealtype t, N_Vector y, void* user_data); int main(int argc, char* argv[]) @@ -79,14 +79,14 @@ int main(int argc, char* argv[]) if (check_flag(flag, "ARKodeSStolerances")) { return 1; } // Set pre/post step and stage routines - flag = ARKodeSetPreprocessStepFn(arkode_mem, preprocess_step); - if (check_flag(flag, "ARKodeSetPreprocessStepFn")) { return 1; } + flag = ARKodeSetPreStepFn(arkode_mem, pre_step); + if (check_flag(flag, "ARKodeSetPreStepFn")) { return 1; } + flag = ARKodeSetPostStepFn(arkode_mem, post_step); + if (check_flag(flag, "ARKodeSetPostStepFn")) { return 1; } flag = ARKodeSetPostprocessStepFn(arkode_mem, postprocess_step); if (check_flag(flag, "ARKodeSetPostprocessStepFn")) { return 1; } - flag = ARKodeSetPostprocessStepFailFn(arkode_mem, postprocess_step_fail); - if (check_flag(flag, "ARKodeSetPostprocessStepFailFn")) { return 1; } - flag = ARKodeSetPreRHSProcessFn(arkode_mem, preprocess_stage); - if (check_flag(flag, "ARKodeSetPreRHSProcessFn")) { return 1; } + flag = ARKodeSetPreRhsFn(arkode_mem, pre_rhs); + if (check_flag(flag, "ARKodeSetPreRhsFn")) { return 1; } flag = ARKodeSetPostprocessStageFn(arkode_mem, postprocess_stage); if (check_flag(flag, "ARKodeSetPostprocessStageFn")) { return 1; } @@ -144,7 +144,8 @@ int main(int argc, char* argv[]) } // Callback functions -static int preprocess_step(sunrealtype t, N_Vector y, void* user_data) +static int pre_step(sunrealtype t, N_Vector y, long int step, + int attempt, void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -157,15 +158,16 @@ static int preprocess_step(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; return -1; } - std::cout << " [Pre-step processing at t = " << std::setprecision(2) << t + std::cout << " [Pre-step at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << ")," + << " step = " << step << ", attempt = " << attempt << ", " << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; return 0; } -static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) +static int post_step(sunrealtype t, N_Vector y, long int step, void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -178,15 +180,16 @@ static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; return -1; } - std::cout << " [Post-step processing at t = " << std::setprecision(2) << t + std::cout << " [Post-step at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << ")," + << " step = " << step << ", " << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; return 0; } -static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) +static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -199,7 +202,7 @@ static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; return -1; } - std::cout << " [Post-step failure processing at t = " + std::cout << " [Postprocess-step at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << ")," << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl @@ -207,7 +210,7 @@ static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) return 0; } -static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) +static int pre_rhs(sunrealtype t, N_Vector y, void* user_data) { int stage, max_stages; sunrealtype tn, tcur; @@ -226,7 +229,7 @@ static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetStageIndex" << std::endl; return -1; } - std::cout << " [Pre-RHS processing (stage " << stage << " of " << max_stages + std::cout << " [Pre-RHS (stage " << stage << " of " << max_stages << ") at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << "), " << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp index 938c18424d..ad8473faa8 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp @@ -40,10 +40,10 @@ using namespace problems::estep; // callback functions below. This would normally be stored in user_data, but // here we reuse problem definitions from other tests. void* arkode_mem = nullptr; -static int preprocess_step(sunrealtype t, N_Vector y, void* user_data); +static int pre_step(sunrealtype t, N_Vector y, long int step, int attempt, void* user_data); +static int post_step(sunrealtype t, N_Vector y, long int step, void* user_data); +static int pre_rhs(sunrealtype t, N_Vector y, void* user_data); static int postprocess_step(sunrealtype t, N_Vector y, void* user_data); -static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data); -static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data); static int postprocess_stage(sunrealtype t, N_Vector y, void* user_data); int main(int argc, char* argv[]) @@ -98,14 +98,14 @@ int main(int argc, char* argv[]) if (check_flag(flag, "ARKodeSetFixedStep")) { return 1; } // Set pre/post step and stage routines - flag = ARKodeSetPreprocessStepFn(arkode_mem, preprocess_step); - if (check_flag(flag, "ARKodeSetPreprocessStepFn")) { return 1; } + flag = ARKodeSetPreStepFn(arkode_mem, pre_step); + if (check_flag(flag, "ARKodeSetPreStepFn")) { return 1; } + flag = ARKodeSetPostStepFn(arkode_mem, post_step); + if (check_flag(flag, "ARKodeSetPostStepFn")) { return 1; } flag = ARKodeSetPostprocessStepFn(arkode_mem, postprocess_step); if (check_flag(flag, "ARKodeSetPostprocessStepFn")) { return 1; } - flag = ARKodeSetPostprocessStepFailFn(arkode_mem, postprocess_step_fail); - if (check_flag(flag, "ARKodeSetPostprocessStepFailFn")) { return 1; } - flag = ARKodeSetPreRHSProcessFn(arkode_mem, preprocess_stage); - if (check_flag(flag, "ARKodeSetPreRHSProcessFn")) { return 1; } + flag = ARKodeSetPreRhsFn(arkode_mem, pre_rhs); + if (check_flag(flag, "ARKodeSetPreRhsFn")) { return 1; } flag = ARKodeSetPostprocessStageFn(arkode_mem, postprocess_stage); if (check_flag(flag, "ARKodeSetPostprocessStageFn")) { return 1; } @@ -175,7 +175,8 @@ int main(int argc, char* argv[]) } // Callback functions -static int preprocess_step(sunrealtype t, N_Vector y, void* user_data) +static int pre_step(sunrealtype t, N_Vector y, long int step, + int attempt, void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -188,15 +189,16 @@ static int preprocess_step(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; return -1; } - std::cout << " [Pre-step processing at t = " << std::setprecision(2) << t + std::cout << " [Pre-step at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << ")," + << " step = " << step << ", attempt = " << attempt << ", " << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; return 0; } -static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) +static int post_step(sunrealtype t, N_Vector y, long int step, void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -209,15 +211,16 @@ static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; return -1; } - std::cout << " [Post-step processing at t = " << std::setprecision(2) << t + std::cout << " [Post-step at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << ")," + << " step = " << step << ", " << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; return 0; } -static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) +static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -230,7 +233,7 @@ static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; return -1; } - std::cout << " [Post-step failure processing at t = " + std::cout << " [Postprocess-step at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << ")," << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl @@ -238,7 +241,7 @@ static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) return 0; } -static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) +static int pre_rhs(sunrealtype t, N_Vector y, void* user_data) { int stage, max_stages; sunrealtype tn, tcur; @@ -257,7 +260,7 @@ static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetStageIndex" << std::endl; return -1; } - std::cout << " [Pre-RHS processing (stage " << stage << " of " << max_stages + std::cout << " [Pre-RHS (stage " << stage << " of " << max_stages << ") at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << "), " << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp index 3160acbebc..197eafed44 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp @@ -39,10 +39,10 @@ using namespace problems::prv; // callback functions below. This would normally be stored in user_data, but // here we reuse problem definitions from other tests. void* arkode_mem = nullptr; -static int preprocess_step(sunrealtype t, N_Vector y, void* user_data); +static int pre_step(sunrealtype t, N_Vector y, long int step, int attempt, void* user_data); +static int post_step(sunrealtype t, N_Vector y, long int step, void* user_data); +static int pre_rhs(sunrealtype t, N_Vector y, void* user_data); static int postprocess_step(sunrealtype t, N_Vector y, void* user_data); -static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data); -static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data); static int postprocess_stage(sunrealtype t, N_Vector y, void* user_data); int main(int argc, char* argv[]) @@ -122,14 +122,14 @@ int main(int argc, char* argv[]) if (check_flag(flag, "LSRKStepSetDomEigFn")) { return 1; } // Set pre/post step and stage routines - flag = ARKodeSetPreprocessStepFn(arkode_mem, preprocess_step); - if (check_flag(flag, "ARKodeSetPreprocessStepFn")) { return 1; } + flag = ARKodeSetPreStepFn(arkode_mem, pre_step); + if (check_flag(flag, "ARKodeSetPreStepFn")) { return 1; } + flag = ARKodeSetPostStepFn(arkode_mem, post_step); + if (check_flag(flag, "ARKodeSetPostStepFn")) { return 1; } flag = ARKodeSetPostprocessStepFn(arkode_mem, postprocess_step); if (check_flag(flag, "ARKodeSetPostprocessStepFn")) { return 1; } - flag = ARKodeSetPostprocessStepFailFn(arkode_mem, postprocess_step_fail); - if (check_flag(flag, "ARKodeSetPostprocessStepFailFn")) { return 1; } - flag = ARKodeSetPreRHSProcessFn(arkode_mem, preprocess_stage); - if (check_flag(flag, "ARKodeSetPreRHSProcessFn")) { return 1; } + flag = ARKodeSetPreRhsFn(arkode_mem, pre_rhs); + if (check_flag(flag, "ARKodeSetPreRhsFn")) { return 1; } flag = ARKodeSetPostprocessStageFn(arkode_mem, postprocess_stage); if (check_flag(flag, "ARKodeSetPostprocessStageFn")) { return 1; } @@ -184,7 +184,8 @@ int main(int argc, char* argv[]) } // Callback functions -static int preprocess_step(sunrealtype t, N_Vector y, void* user_data) +static int pre_step(sunrealtype t, N_Vector y, long int step, + int attempt, void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -197,15 +198,16 @@ static int preprocess_step(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; return -1; } - std::cout << " [Pre-step processing at t = " << std::setprecision(2) << t + std::cout << " [Pre-step at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << ")," + << " step = " << step << ", attempt = " << attempt << ", " << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; return 0; } -static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) +static int post_step(sunrealtype t, N_Vector y, long int step, void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -218,15 +220,16 @@ static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; return -1; } - std::cout << " [Post-step processing at t = " << std::setprecision(2) << t + std::cout << " [Post-step at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << ")," + << " step = " << step << ", " << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; return 0; } -static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) +static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -239,7 +242,7 @@ static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; return -1; } - std::cout << " [Post-step failure processing at t = " + std::cout << " [Postprocess-step at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << ")," << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl @@ -247,7 +250,7 @@ static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) return 0; } -static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) +static int pre_rhs(sunrealtype t, N_Vector y, void* user_data) { int stage, max_stages; sunrealtype tn, tcur; @@ -266,7 +269,7 @@ static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetStageIndex" << std::endl; return -1; } - std::cout << " [Pre-RHS processing (stage " << stage << " of " << max_stages + std::cout << " [Pre-RHS (stage " << stage << " of " << max_stages << ") at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << "), " << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp index 47a2e30577..715a170caf 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp @@ -44,10 +44,10 @@ using namespace problems::kpr; // callback functions below. This would normally be stored in user_data, but // here we reuse problem definitions from other tests. void* arkode_mem = nullptr; -static int preprocess_step(sunrealtype t, N_Vector y, void* user_data); +static int pre_step(sunrealtype t, N_Vector y, long int step, int attempt, void* user_data); +static int post_step(sunrealtype t, N_Vector y, long int step, void* user_data); +static int pre_rhs(sunrealtype t, N_Vector y, void* user_data); static int postprocess_step(sunrealtype t, N_Vector y, void* user_data); -static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data); -static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data); static int postprocess_stage(sunrealtype t, N_Vector y, void* user_data); int main(int argc, char* argv[]) @@ -199,14 +199,14 @@ int main(int argc, char* argv[]) } // Set pre/post step and stage routines - flag = ARKodeSetPreprocessStepFn(arkode_mem, preprocess_step); - if (check_flag(flag, "ARKodeSetPreprocessStepFn")) { return 1; } + flag = ARKodeSetPreStepFn(arkode_mem, pre_step); + if (check_flag(flag, "ARKodeSetPreStepFn")) { return 1; } + flag = ARKodeSetPostStepFn(arkode_mem, post_step); + if (check_flag(flag, "ARKodeSetPostStepFn")) { return 1; } flag = ARKodeSetPostprocessStepFn(arkode_mem, postprocess_step); if (check_flag(flag, "ARKodeSetPostprocessStepFn")) { return 1; } - flag = ARKodeSetPostprocessStepFailFn(arkode_mem, postprocess_step_fail); - if (check_flag(flag, "ARKodeSetPostprocessStepFailFn")) { return 1; } - flag = ARKodeSetPreRHSProcessFn(arkode_mem, preprocess_stage); - if (check_flag(flag, "ARKodeSetPreRHSProcessFn")) { return 1; } + flag = ARKodeSetPreRhsFn(arkode_mem, pre_rhs); + if (check_flag(flag, "ARKodeSetPreRhsFn")) { return 1; } flag = ARKodeSetPostprocessStageFn(arkode_mem, postprocess_stage); if (check_flag(flag, "ARKodeSetPostprocessStageFn")) { return 1; } @@ -268,7 +268,8 @@ int main(int argc, char* argv[]) } // Callback functions -static int preprocess_step(sunrealtype t, N_Vector y, void* user_data) +static int pre_step(sunrealtype t, N_Vector y, long int step, + int attempt, void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -281,15 +282,16 @@ static int preprocess_step(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; return -1; } - std::cout << " [Pre-step processing at t = " << std::setprecision(2) << t + std::cout << " [Pre-step at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << ")," + << " step = " << step << ", attempt = " << attempt << ", " << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; return 0; } -static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) +static int post_step(sunrealtype t, N_Vector y, long int step, void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -302,15 +304,16 @@ static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; return -1; } - std::cout << " [Post-step processing at t = " << std::setprecision(2) << t + std::cout << " [Post-step at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << ")," + << " step = " << step << ", " << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; return 0; } -static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) +static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -323,7 +326,7 @@ static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; return -1; } - std::cout << " [Post-step failure processing at t = " + std::cout << " [Postprocess-step at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << ")," << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl @@ -331,7 +334,7 @@ static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) return 0; } -static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) +static int pre_rhs(sunrealtype t, N_Vector y, void* user_data) { int stage, max_stages; sunrealtype tn, tcur; @@ -350,7 +353,7 @@ static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetStageIndex" << std::endl; return -1; } - std::cout << " [Pre-RHS processing (stage " << stage << " of " << max_stages + std::cout << " [Pre-RHS (stage " << stage << " of " << max_stages << ") at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << "), " << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp index a3ccf6b8d4..bc17f99830 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp @@ -40,10 +40,10 @@ using namespace problems::estep; // callback functions below. This would normally be stored in user_data, but // here we reuse problem definitions from other tests. void* arkode_mem = nullptr; -static int preprocess_step(sunrealtype t, N_Vector y, void* user_data); +static int pre_step(sunrealtype t, N_Vector y, long int step, int attempt, void* user_data); +static int post_step(sunrealtype t, N_Vector y, long int step, void* user_data); +static int pre_rhs(sunrealtype t, N_Vector y, void* user_data); static int postprocess_step(sunrealtype t, N_Vector y, void* user_data); -static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data); -static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data); static int postprocess_stage(sunrealtype t, N_Vector y, void* user_data); int main(int argc, char* argv[]) @@ -98,14 +98,14 @@ int main(int argc, char* argv[]) if (check_flag(flag, "ARKodeSetFixedStep")) { return 1; } // Set pre/post step and stage routines - flag = ARKodeSetPreprocessStepFn(arkode_mem, preprocess_step); - if (check_flag(flag, "ARKodeSetPreprocessStepFn")) { return 1; } + flag = ARKodeSetPreStepFn(arkode_mem, pre_step); + if (check_flag(flag, "ARKodeSetPreStepFn")) { return 1; } + flag = ARKodeSetPostStepFn(arkode_mem, post_step); + if (check_flag(flag, "ARKodeSetPostStepFn")) { return 1; } flag = ARKodeSetPostprocessStepFn(arkode_mem, postprocess_step); if (check_flag(flag, "ARKodeSetPostprocessStepFn")) { return 1; } - flag = ARKodeSetPostprocessStepFailFn(arkode_mem, postprocess_step_fail); - if (check_flag(flag, "ARKodeSetPostprocessStepFailFn")) { return 1; } - flag = ARKodeSetPreRHSProcessFn(arkode_mem, preprocess_stage); - if (check_flag(flag, "ARKodeSetPreRHSProcessFn")) { return 1; } + flag = ARKodeSetPreRhsFn(arkode_mem, pre_rhs); + if (check_flag(flag, "ARKodeSetPreRhsFn")) { return 1; } flag = ARKodeSetPostprocessStageFn(arkode_mem, postprocess_stage); if (check_flag(flag, "ARKodeSetPostprocessStageFn")) { return 1; } @@ -175,7 +175,8 @@ int main(int argc, char* argv[]) } // Callback functions -static int preprocess_step(sunrealtype t, N_Vector y, void* user_data) +static int pre_step(sunrealtype t, N_Vector y, long int step, + int attempt, void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -188,15 +189,16 @@ static int preprocess_step(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; return -1; } - std::cout << " [Pre-step processing at t = " << std::setprecision(2) << t + std::cout << " [Pre-step at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << ")," + << " step = " << step << ", attempt = " << attempt << ", " << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; return 0; } -static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) +static int post_step(sunrealtype t, N_Vector y, long int step, void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -209,15 +211,16 @@ static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; return -1; } - std::cout << " [Post-step processing at t = " << std::setprecision(2) << t + std::cout << " [Post-step at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << ")," + << " step = " << step << ", " << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; return 0; } -static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) +static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -230,7 +233,7 @@ static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; return -1; } - std::cout << " [Post-step failure processing at t = " + std::cout << " [Postprocess-step at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << ")," << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl @@ -238,7 +241,7 @@ static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) return 0; } -static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) +static int pre_rhs(sunrealtype t, N_Vector y, void* user_data) { int stage, max_stages; sunrealtype tn, tcur; @@ -257,7 +260,7 @@ static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetStageIndex" << std::endl; return -1; } - std::cout << " [Pre-RHS processing (stage " << stage << " of " << max_stages + std::cout << " [Pre-RHS (stage " << stage << " of " << max_stages << ") at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << "), " << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp index eabdfaa9c0..12b7293bff 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp @@ -39,10 +39,10 @@ using namespace problems::kepler; // callback functions below. This would normally be stored in user_data, but // here we reuse problem definitions from other tests. void* arkode_mem = nullptr; -static int preprocess_step(sunrealtype t, N_Vector y, void* user_data); +static int pre_step(sunrealtype t, N_Vector y, long int step, int attempt, void* user_data); +static int post_step(sunrealtype t, N_Vector y, long int step, void* user_data); +static int pre_rhs(sunrealtype t, N_Vector y, void* user_data); static int postprocess_step(sunrealtype t, N_Vector y, void* user_data); -static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data); -static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data); static int postprocess_stage(sunrealtype t, N_Vector y, void* user_data); int main(int argc, char* argv[]) @@ -69,14 +69,14 @@ int main(int argc, char* argv[]) if (check_flag(flag, "ARKodeSetFixedStep")) { return 1; } // Set pre/post step and stage routines - flag = ARKodeSetPreprocessStepFn(arkode_mem, preprocess_step); - if (check_flag(flag, "ARKodeSetPreprocessStepFn")) { return 1; } + flag = ARKodeSetPreStepFn(arkode_mem, pre_step); + if (check_flag(flag, "ARKodeSetPreStepFn")) { return 1; } + flag = ARKodeSetPostStepFn(arkode_mem, post_step); + if (check_flag(flag, "ARKodeSetPostStepFn")) { return 1; } flag = ARKodeSetPostprocessStepFn(arkode_mem, postprocess_step); if (check_flag(flag, "ARKodeSetPostprocessStepFn")) { return 1; } - flag = ARKodeSetPostprocessStepFailFn(arkode_mem, postprocess_step_fail); - if (check_flag(flag, "ARKodeSetPostprocessStepFailFn")) { return 1; } - flag = ARKodeSetPreRHSProcessFn(arkode_mem, preprocess_stage); - if (check_flag(flag, "ARKodeSetPreRHSProcessFn")) { return 1; } + flag = ARKodeSetPreRhsFn(arkode_mem, pre_rhs); + if (check_flag(flag, "ARKodeSetPreRhsFn")) { return 1; } flag = ARKodeSetPostprocessStageFn(arkode_mem, postprocess_stage); if (check_flag(flag, "ARKodeSetPostprocessStageFn")) { return 1; } @@ -132,7 +132,8 @@ int main(int argc, char* argv[]) } // Callback functions -static int preprocess_step(sunrealtype t, N_Vector y, void* user_data) +static int pre_step(sunrealtype t, N_Vector y, long int step, + int attempt, void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -145,15 +146,16 @@ static int preprocess_step(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; return -1; } - std::cout << " [Pre-step processing at t = " << std::setprecision(2) << t + std::cout << " [Pre-step at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << ")," + << " step = " << step << ", attempt = " << attempt << ", " << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; return 0; } -static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) +static int post_step(sunrealtype t, N_Vector y, long int step, void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -166,15 +168,16 @@ static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; return -1; } - std::cout << " [Post-step processing at t = " << std::setprecision(2) << t + std::cout << " [Post-step at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << ")," + << " step = " << step << ", " << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; return 0; } -static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) +static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -187,7 +190,7 @@ static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; return -1; } - std::cout << " [Post-step failure processing at t = " + std::cout << " [Postprocess-step at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << ")," << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl @@ -195,7 +198,7 @@ static int postprocess_step_fail(sunrealtype t, N_Vector y, void* user_data) return 0; } -static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) +static int pre_rhs(sunrealtype t, N_Vector y, void* user_data) { int stage, max_stages; sunrealtype tn, tcur; @@ -214,7 +217,7 @@ static int preprocess_stage(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetStageIndex" << std::endl; return -1; } - std::cout << " [Pre-RHS processing (stage " << stage << " of " << max_stages + std::cout << " [Pre-RHS (stage " << stage << " of " << max_stages << ") at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << "), " << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl From 2a909bd6e4d451ac625d68a286fc7a05ab60b867 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Wed, 11 Mar 2026 14:00:02 -0400 Subject: [PATCH 158/298] Formatting --- .../CXX_serial/ark_test_stageinfo_arkstep.cpp | 16 ++++++++-------- .../CXX_serial/ark_test_stageinfo_erkstep.cpp | 16 ++++++++-------- .../ark_test_stageinfo_forcingstep.cpp | 16 ++++++++-------- .../CXX_serial/ark_test_stageinfo_lsrkstep.cpp | 16 ++++++++-------- .../CXX_serial/ark_test_stageinfo_mristep.cpp | 16 ++++++++-------- .../ark_test_stageinfo_splittingstep.cpp | 16 ++++++++-------- .../CXX_serial/ark_test_stageinfo_sprkstep.cpp | 16 ++++++++-------- 7 files changed, 56 insertions(+), 56 deletions(-) diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp index 557c0cb231..8a876f40b0 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep.cpp @@ -41,7 +41,8 @@ using namespace problems::kpr; // callback functions below. This would normally be stored in user_data, but // here we reuse problem definitions from other tests. void* arkode_mem = nullptr; -static int pre_step(sunrealtype t, N_Vector y, long int step, int attempt, void* user_data); +static int pre_step(sunrealtype t, N_Vector y, long int step, int attempt, + void* user_data); static int post_step(sunrealtype t, N_Vector y, long int step, void* user_data); static int pre_rhs(sunrealtype t, N_Vector y, void* user_data); static int postprocess_step(sunrealtype t, N_Vector y, void* user_data); @@ -183,8 +184,8 @@ int main(int argc, char* argv[]) } // Callback functions -static int pre_step(sunrealtype t, N_Vector y, long int step, - int attempt, void* user_data) +static int pre_step(sunrealtype t, N_Vector y, long int step, int attempt, + void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -221,8 +222,7 @@ static int post_step(sunrealtype t, N_Vector y, long int step, void* user_data) } std::cout << " [Post-step at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << ")," - << " step = " << step << ", " - << std::setprecision(10) + << " step = " << step << ", " << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; return 0; @@ -241,9 +241,9 @@ static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; return -1; } - std::cout << " [Postprocess-step at t = " - << std::setprecision(2) << t << " (tn = " << tn - << " , tcur = " << tcur << ")," << std::setprecision(10) + std::cout << " [Postprocess-step at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; return 0; diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp index bb71052033..c55cff3b9d 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.cpp @@ -39,7 +39,8 @@ using namespace problems::kpr; // callback functions below. This would normally be stored in user_data, but // here we reuse problem definitions from other tests. void* arkode_mem = nullptr; -static int pre_step(sunrealtype t, N_Vector y, long int step, int attempt, void* user_data); +static int pre_step(sunrealtype t, N_Vector y, long int step, int attempt, + void* user_data); static int post_step(sunrealtype t, N_Vector y, long int step, void* user_data); static int pre_rhs(sunrealtype t, N_Vector y, void* user_data); static int postprocess_step(sunrealtype t, N_Vector y, void* user_data); @@ -144,8 +145,8 @@ int main(int argc, char* argv[]) } // Callback functions -static int pre_step(sunrealtype t, N_Vector y, long int step, - int attempt, void* user_data) +static int pre_step(sunrealtype t, N_Vector y, long int step, int attempt, + void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -182,8 +183,7 @@ static int post_step(sunrealtype t, N_Vector y, long int step, void* user_data) } std::cout << " [Post-step at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << ")," - << " step = " << step << ", " - << std::setprecision(10) + << " step = " << step << ", " << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; return 0; @@ -202,9 +202,9 @@ static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; return -1; } - std::cout << " [Postprocess-step at t = " - << std::setprecision(2) << t << " (tn = " << tn - << " , tcur = " << tcur << ")," << std::setprecision(10) + std::cout << " [Postprocess-step at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; return 0; diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp index ad8473faa8..0902c5c02c 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.cpp @@ -40,7 +40,8 @@ using namespace problems::estep; // callback functions below. This would normally be stored in user_data, but // here we reuse problem definitions from other tests. void* arkode_mem = nullptr; -static int pre_step(sunrealtype t, N_Vector y, long int step, int attempt, void* user_data); +static int pre_step(sunrealtype t, N_Vector y, long int step, int attempt, + void* user_data); static int post_step(sunrealtype t, N_Vector y, long int step, void* user_data); static int pre_rhs(sunrealtype t, N_Vector y, void* user_data); static int postprocess_step(sunrealtype t, N_Vector y, void* user_data); @@ -175,8 +176,8 @@ int main(int argc, char* argv[]) } // Callback functions -static int pre_step(sunrealtype t, N_Vector y, long int step, - int attempt, void* user_data) +static int pre_step(sunrealtype t, N_Vector y, long int step, int attempt, + void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -213,8 +214,7 @@ static int post_step(sunrealtype t, N_Vector y, long int step, void* user_data) } std::cout << " [Post-step at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << ")," - << " step = " << step << ", " - << std::setprecision(10) + << " step = " << step << ", " << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; return 0; @@ -233,9 +233,9 @@ static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; return -1; } - std::cout << " [Postprocess-step at t = " - << std::setprecision(2) << t << " (tn = " << tn - << " , tcur = " << tcur << ")," << std::setprecision(10) + std::cout << " [Postprocess-step at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; return 0; diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp index 197eafed44..325bd5c14a 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep.cpp @@ -39,7 +39,8 @@ using namespace problems::prv; // callback functions below. This would normally be stored in user_data, but // here we reuse problem definitions from other tests. void* arkode_mem = nullptr; -static int pre_step(sunrealtype t, N_Vector y, long int step, int attempt, void* user_data); +static int pre_step(sunrealtype t, N_Vector y, long int step, int attempt, + void* user_data); static int post_step(sunrealtype t, N_Vector y, long int step, void* user_data); static int pre_rhs(sunrealtype t, N_Vector y, void* user_data); static int postprocess_step(sunrealtype t, N_Vector y, void* user_data); @@ -184,8 +185,8 @@ int main(int argc, char* argv[]) } // Callback functions -static int pre_step(sunrealtype t, N_Vector y, long int step, - int attempt, void* user_data) +static int pre_step(sunrealtype t, N_Vector y, long int step, int attempt, + void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -222,8 +223,7 @@ static int post_step(sunrealtype t, N_Vector y, long int step, void* user_data) } std::cout << " [Post-step at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << ")," - << " step = " << step << ", " - << std::setprecision(10) + << " step = " << step << ", " << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; return 0; @@ -242,9 +242,9 @@ static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; return -1; } - std::cout << " [Postprocess-step at t = " - << std::setprecision(2) << t << " (tn = " << tn - << " , tcur = " << tcur << ")," << std::setprecision(10) + std::cout << " [Postprocess-step at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; return 0; diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp index 715a170caf..7116873015 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep.cpp @@ -44,7 +44,8 @@ using namespace problems::kpr; // callback functions below. This would normally be stored in user_data, but // here we reuse problem definitions from other tests. void* arkode_mem = nullptr; -static int pre_step(sunrealtype t, N_Vector y, long int step, int attempt, void* user_data); +static int pre_step(sunrealtype t, N_Vector y, long int step, int attempt, + void* user_data); static int post_step(sunrealtype t, N_Vector y, long int step, void* user_data); static int pre_rhs(sunrealtype t, N_Vector y, void* user_data); static int postprocess_step(sunrealtype t, N_Vector y, void* user_data); @@ -268,8 +269,8 @@ int main(int argc, char* argv[]) } // Callback functions -static int pre_step(sunrealtype t, N_Vector y, long int step, - int attempt, void* user_data) +static int pre_step(sunrealtype t, N_Vector y, long int step, int attempt, + void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -306,8 +307,7 @@ static int post_step(sunrealtype t, N_Vector y, long int step, void* user_data) } std::cout << " [Post-step at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << ")," - << " step = " << step << ", " - << std::setprecision(10) + << " step = " << step << ", " << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; return 0; @@ -326,9 +326,9 @@ static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; return -1; } - std::cout << " [Postprocess-step at t = " - << std::setprecision(2) << t << " (tn = " << tn - << " , tcur = " << tcur << ")," << std::setprecision(10) + std::cout << " [Postprocess-step at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; return 0; diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp index bc17f99830..6283120ea7 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.cpp @@ -40,7 +40,8 @@ using namespace problems::estep; // callback functions below. This would normally be stored in user_data, but // here we reuse problem definitions from other tests. void* arkode_mem = nullptr; -static int pre_step(sunrealtype t, N_Vector y, long int step, int attempt, void* user_data); +static int pre_step(sunrealtype t, N_Vector y, long int step, int attempt, + void* user_data); static int post_step(sunrealtype t, N_Vector y, long int step, void* user_data); static int pre_rhs(sunrealtype t, N_Vector y, void* user_data); static int postprocess_step(sunrealtype t, N_Vector y, void* user_data); @@ -175,8 +176,8 @@ int main(int argc, char* argv[]) } // Callback functions -static int pre_step(sunrealtype t, N_Vector y, long int step, - int attempt, void* user_data) +static int pre_step(sunrealtype t, N_Vector y, long int step, int attempt, + void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -213,8 +214,7 @@ static int post_step(sunrealtype t, N_Vector y, long int step, void* user_data) } std::cout << " [Post-step at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << ")," - << " step = " << step << ", " - << std::setprecision(10) + << " step = " << step << ", " << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; return 0; @@ -233,9 +233,9 @@ static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; return -1; } - std::cout << " [Postprocess-step at t = " - << std::setprecision(2) << t << " (tn = " << tn - << " , tcur = " << tcur << ")," << std::setprecision(10) + std::cout << " [Postprocess-step at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; return 0; diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp index 12b7293bff..38c78811a7 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.cpp @@ -39,7 +39,8 @@ using namespace problems::kepler; // callback functions below. This would normally be stored in user_data, but // here we reuse problem definitions from other tests. void* arkode_mem = nullptr; -static int pre_step(sunrealtype t, N_Vector y, long int step, int attempt, void* user_data); +static int pre_step(sunrealtype t, N_Vector y, long int step, int attempt, + void* user_data); static int post_step(sunrealtype t, N_Vector y, long int step, void* user_data); static int pre_rhs(sunrealtype t, N_Vector y, void* user_data); static int postprocess_step(sunrealtype t, N_Vector y, void* user_data); @@ -132,8 +133,8 @@ int main(int argc, char* argv[]) } // Callback functions -static int pre_step(sunrealtype t, N_Vector y, long int step, - int attempt, void* user_data) +static int pre_step(sunrealtype t, N_Vector y, long int step, int attempt, + void* user_data) { sunrealtype tn, tcur; if (ARKodeGetLastTime(arkode_mem, &tn) != ARK_SUCCESS) @@ -170,8 +171,7 @@ static int post_step(sunrealtype t, N_Vector y, long int step, void* user_data) } std::cout << " [Post-step at t = " << std::setprecision(2) << t << " (tn = " << tn << " , tcur = " << tcur << ")," - << " step = " << step << ", " - << std::setprecision(10) + << " step = " << step << ", " << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; return 0; @@ -190,9 +190,9 @@ static int postprocess_step(sunrealtype t, N_Vector y, void* user_data) std::cerr << "Error in ARKodeGetCurrentTime" << std::endl; return -1; } - std::cout << " [Postprocess-step at t = " - << std::setprecision(2) << t << " (tn = " << tn - << " , tcur = " << tcur << ")," << std::setprecision(10) + std::cout << " [Postprocess-step at t = " << std::setprecision(2) << t + << " (tn = " << tn << " , tcur = " << tcur << ")," + << std::setprecision(10) << "||y||_2 = " << SUNRsqrt(N_VDotProd(y, y)) << "]" << std::endl << std::flush; return 0; From 749d629f0984448cbced7df178b20c3fc09f46bd Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Wed, 11 Mar 2026 14:06:03 -0400 Subject: [PATCH 159/298] Converting extended precision CI tests to build-only --- .github/actions/test-driver/action.yml | 11 ++++++++++- .github/workflows/ubuntu-latest.yml | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/actions/test-driver/action.yml b/.github/actions/test-driver/action.yml index 47c0fab83f..322f533fc2 100644 --- a/.github/actions/test-driver/action.yml +++ b/.github/actions/test-driver/action.yml @@ -11,6 +11,10 @@ inputs: tpls: description: "enable/disable TPLs" required: true + phase: + description: "Optional phase passed to test_driver.sh as --phase (e.g., BUILD)" + required: false + default: "" runs: using: composite @@ -29,10 +33,15 @@ runs: run: | git config --global --add safe.directory $GITHUB_WORKSPACE cd test + extra_args="" + if [ -n "${{ inputs.phase }}" ]; then + extra_args="--phase ${{ inputs.phase }}" + fi ./test_driver.sh \ --testtype CUSTOM \ --env env/docker.sh \ --tpls ${{ inputs.tpls }} \ --sunrealtype ${{ inputs.precision }} \ - --indexsize ${{ inputs.indexsize }} + --indexsize ${{ inputs.indexsize }}\ + ${extra_args} shell: bash diff --git a/.github/workflows/ubuntu-latest.yml b/.github/workflows/ubuntu-latest.yml index 2326d6454d..1fe2c2c25b 100644 --- a/.github/workflows/ubuntu-latest.yml +++ b/.github/workflows/ubuntu-latest.yml @@ -52,6 +52,7 @@ jobs: indexsize: ${{ matrix.indexsize }} precision: ${{ matrix.precision }} tpls: ${{ matrix.tpls }} + phase: ${{ matrix.precision == 'extended' && 'BUILD' || '' }} env: CMAKE_BUILD_TYPE: ${{ matrix.buildtype }} - name: Archive build files from failed build From 733a101206313aadbb1998cea40ef12d0c9a7956 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Wed, 11 Mar 2026 15:55:55 -0400 Subject: [PATCH 160/298] Added missing space --- .github/actions/test-driver/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/test-driver/action.yml b/.github/actions/test-driver/action.yml index 322f533fc2..65b0d877e2 100644 --- a/.github/actions/test-driver/action.yml +++ b/.github/actions/test-driver/action.yml @@ -35,7 +35,7 @@ runs: cd test extra_args="" if [ -n "${{ inputs.phase }}" ]; then - extra_args="--phase ${{ inputs.phase }}" + extra_args=" --phase ${{ inputs.phase }}" fi ./test_driver.sh \ --testtype CUSTOM \ From 5b37908cfc3b8d69ed3c0315c4310135c8db20a9 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 12 Mar 2026 08:21:15 -0400 Subject: [PATCH 161/298] Updated answers submodule commit --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index 677747b775..87bfb96190 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 677747b77568c574a2ea24af4344a7d68c93b294 +Subproject commit 87bfb96190b21db911e3f20b8cfd208288a66b8a From 44ffbc6410b6f8eaf806ca01cd201555c7132723 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 12 Mar 2026 08:56:04 -0400 Subject: [PATCH 162/298] Updated new output files based on upstream changes from feature/stageprocessing branch --- .../ark_test_stageinfo_arkstep_0.out | 54 ++-- .../ark_test_stageinfo_arkstep_1.out | 208 +++++++------- .../ark_test_stageinfo_arkstep_2.out | 263 +++++++++--------- .../CXX_serial/ark_test_stageinfo_erkstep.out | 91 +++--- .../ark_test_stageinfo_forcingstep.out | 12 +- .../ark_test_stageinfo_lsrkstep_0.out | 35 +-- .../ark_test_stageinfo_lsrkstep_1.out | 33 ++- .../ark_test_stageinfo_lsrkstep_2.out | 33 ++- .../ark_test_stageinfo_lsrkstep_3.out | 81 +++--- .../ark_test_stageinfo_lsrkstep_4.out | 43 +-- .../ark_test_stageinfo_lsrkstep_5.out | 82 +++--- .../ark_test_stageinfo_mristep_0.out | 48 ++-- .../ark_test_stageinfo_mristep_1.out | 120 ++++---- .../ark_test_stageinfo_mristep_2.out | 132 ++++----- .../ark_test_stageinfo_mristep_3.out | 42 +-- .../ark_test_stageinfo_mristep_4.out | 138 ++++----- .../ark_test_stageinfo_mristep_5.out | 138 ++++----- .../ark_test_stageinfo_mristep_6.out | 36 +-- .../ark_test_stageinfo_splittingstep.out | 12 +- .../ark_test_stageinfo_sprkstep.out | 66 ++--- 20 files changed, 839 insertions(+), 828 deletions(-) diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_0.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_0.out index 49bdd17c7d..44f56dd231 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_0.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_0.out @@ -1,44 +1,44 @@ Start ARKStep StageInfo test Using ERK method - t u v u err v err + t u v u err v err ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-RHS processing (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 0 of 5) at t = 4.71e-08 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 0 of 5) at t = 2.06e-04 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] - [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 0 of 5) at t = 4.71e-08 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 0 of 5) at t = 2.06e-04 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-step at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), step = 0, attempt = 1, ||y||_2 = 2.1213203436e+00] [Post-stage processing (stage 1 of 5) at t = 4.12e-05 (tn = 0.00e+00 , tcur = 4.12e-05), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 1 of 5) at t = 4.12e-05 (tn = 0.00e+00 , tcur = 4.12e-05), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 1 of 5) at t = 4.12e-05 (tn = 0.00e+00 , tcur = 4.12e-05), ||y||_2 = 2.1213203436e+00] [Post-stage processing (stage 2 of 5) at t = 6.18e-05 (tn = 0.00e+00 , tcur = 6.18e-05), ||y||_2 = 2.1213200432e+00] - [Pre-RHS processing (stage 2 of 5) at t = 6.18e-05 (tn = 0.00e+00 , tcur = 6.18e-05), ||y||_2 = 2.1213200432e+00] + [Pre-RHS (stage 2 of 5) at t = 6.18e-05 (tn = 0.00e+00 , tcur = 6.18e-05), ||y||_2 = 2.1213200432e+00] [Post-stage processing (stage 3 of 5) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213199340e+00] - [Pre-RHS processing (stage 3 of 5) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213199340e+00] - [Post-stage processing (stage 4 of 5) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] - [Pre-RHS processing (stage 4 of 5) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] - [Post-step processing at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] + [Pre-RHS (stage 3 of 5) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213199340e+00] + [Postprocess-step at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] + [Pre-RHS (stage 4 of 5) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] + [Post-step at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), step = 0, ||y||_2 = 2.1213198430e+00] 1.0298602561e-04 1.2247448703e+00 1.7320501952e+00 2.2204460493e-16 0.0000000000e+00 - [Pre-step processing at t = 1.03e-04 (tn = 1.03e-04 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] + [Pre-step at t = 1.03e-04 (tn = 1.03e-04 , tcur = 1.03e-04), step = 1, attempt = 1, ||y||_2 = 2.1213198430e+00] [Post-stage processing (stage 1 of 5) at t = 5.97e-03 (tn = 1.03e-04 , tcur = 5.97e-03), ||y||_2 = 2.1212628048e+00] - [Pre-RHS processing (stage 1 of 5) at t = 5.97e-03 (tn = 1.03e-04 , tcur = 5.97e-03), ||y||_2 = 2.1212628048e+00] + [Pre-RHS (stage 1 of 5) at t = 5.97e-03 (tn = 1.03e-04 , tcur = 5.97e-03), ||y||_2 = 2.1212628048e+00] [Post-stage processing (stage 2 of 5) at t = 8.90e-03 (tn = 1.03e-04 , tcur = 8.90e-03), ||y||_2 = 2.1151489033e+00] - [Pre-RHS processing (stage 2 of 5) at t = 8.90e-03 (tn = 1.03e-04 , tcur = 8.90e-03), ||y||_2 = 2.1151489033e+00] + [Pre-RHS (stage 2 of 5) at t = 8.90e-03 (tn = 1.03e-04 , tcur = 8.90e-03), ||y||_2 = 2.1151489033e+00] [Post-stage processing (stage 3 of 5) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1129070894e+00] - [Pre-RHS processing (stage 3 of 5) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1129070894e+00] - [Post-stage processing (stage 4 of 5) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1110724436e+00] - [Pre-RHS processing (stage 4 of 5) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1110724436e+00] - [Post-step processing at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02),||y||_2 = 2.1110724436e+00] - 1.4770752770e-02 1.2247225752e+00 1.7195003557e+00 2.8937936936e-08 2.5927171299e-08 - [Pre-step processing at t = 1.48e-02 (tn = 1.48e-02 , tcur = 1.48e-02),||y||_2 = 2.1110724436e+00] + [Pre-RHS (stage 3 of 5) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1129070894e+00] + [Postprocess-step at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02),||y||_2 = 2.1110724436e+00] + [Pre-RHS (stage 4 of 5) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1110724436e+00] + [Post-step at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), step = 1, ||y||_2 = 2.1110724436e+00] + 1.4770752770e-02 1.2247225752e+00 1.7195003565e+00 2.8937932495e-08 2.5927169522e-08 + [Pre-step at t = 1.48e-02 (tn = 1.48e-02 , tcur = 1.48e-02), step = 2, attempt = 1, ||y||_2 = 2.1110724436e+00] [Post-stage processing (stage 1 of 5) at t = 2.06e-02 (tn = 1.48e-02 , tcur = 2.06e-02), ||y||_2 = 2.1030688076e+00] - [Pre-RHS processing (stage 1 of 5) at t = 2.06e-02 (tn = 1.48e-02 , tcur = 2.06e-02), ||y||_2 = 2.1030688076e+00] + [Pre-RHS (stage 1 of 5) at t = 2.06e-02 (tn = 1.48e-02 , tcur = 2.06e-02), ||y||_2 = 2.1030688076e+00] [Post-stage processing (stage 2 of 5) at t = 2.35e-02 (tn = 1.48e-02 , tcur = 2.35e-02), ||y||_2 = 2.0933502627e+00] - [Pre-RHS processing (stage 2 of 5) at t = 2.35e-02 (tn = 1.48e-02 , tcur = 2.35e-02), ||y||_2 = 2.0933502627e+00] + [Pre-RHS (stage 2 of 5) at t = 2.35e-02 (tn = 1.48e-02 , tcur = 2.35e-02), ||y||_2 = 2.0933502627e+00] [Post-stage processing (stage 3 of 5) at t = 2.93e-02 (tn = 1.48e-02 , tcur = 2.93e-02), ||y||_2 = 2.0833181435e+00] - [Pre-RHS processing (stage 3 of 5) at t = 2.93e-02 (tn = 1.48e-02 , tcur = 2.93e-02), ||y||_2 = 2.0833181435e+00] - [Post-stage processing (stage 4 of 5) at t = 2.93e-02 (tn = 1.48e-02 , tcur = 2.93e-02), ||y||_2 = 2.0816387141e+00] - [Pre-RHS processing (stage 4 of 5) at t = 2.93e-02 (tn = 1.48e-02 , tcur = 2.93e-02), ||y||_2 = 2.0816387141e+00] - [Post-step processing at t = 2.93e-02 (tn = 1.48e-02 , tcur = 2.93e-02),||y||_2 = 2.0816387141e+00] - 2.9275139161e-02 1.2246573481e+00 1.6832807581e+00 5.5763322404e-08 6.7822652161e-08 + [Pre-RHS (stage 3 of 5) at t = 2.93e-02 (tn = 1.48e-02 , tcur = 2.93e-02), ||y||_2 = 2.0833181435e+00] + [Postprocess-step at t = 2.93e-02 (tn = 1.48e-02 , tcur = 2.93e-02),||y||_2 = 2.0816387141e+00] + [Pre-RHS (stage 4 of 5) at t = 2.93e-02 (tn = 1.48e-02 , tcur = 2.93e-02), ||y||_2 = 2.0816387141e+00] + [Post-step at t = 2.93e-02 (tn = 1.48e-02 , tcur = 2.93e-02), step = 2, ||y||_2 = 2.0816387141e+00] + 2.9275139161e-02 1.2246573481e+00 1.6832807596e+00 5.5763317741e-08 6.7822650163e-08 ------------------------------------------------------------------------------------------------------------------------------ Current time = 0.0292751391609328 Steps = 3 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_1.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_1.out index 86966c499a..381c09b96e 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_1.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_1.out @@ -5,115 +5,115 @@ Using GMRES iterative linear solver t u v u err v err ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-RHS processing (stage 0 of 6) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 0 of 6) at t = 4.71e-08 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 0 of 6) at t = 2.06e-04 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] - [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 1 of 6) at t = 5.15e-05 (tn = 0.00e+00 , tcur = 5.15e-05), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 1 of 6) at t = 5.15e-05 (tn = 0.00e+00 , tcur = 5.15e-05), ||y||_2 = 2.1213183410e+00] + [Pre-RHS (stage 0 of 6) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 0 of 6) at t = 4.71e-08 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 0 of 6) at t = 2.06e-04 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-step at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), step = 0, attempt = 1, ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 1 of 6) at t = 5.15e-05 (tn = 0.00e+00 , tcur = 5.15e-05), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 1 of 6) at t = 5.15e-05 (tn = 0.00e+00 , tcur = 5.15e-05), ||y||_2 = 2.1213183410e+00] [Post-stage processing (stage 1 of 6) at t = 5.15e-05 (tn = 0.00e+00 , tcur = 5.15e-05), ||y||_2 = 2.1213202184e+00] - [Pre-RHS processing (stage 1 of 6) at t = 5.15e-05 (tn = 0.00e+00 , tcur = 5.15e-05), ||y||_2 = 2.1213202184e+00] - [Pre-RHS processing (stage 2 of 6) at t = 1.51e-05 (tn = 0.00e+00 , tcur = 1.51e-05), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 2 of 6) at t = 1.51e-05 (tn = 0.00e+00 , tcur = 1.51e-05), ||y||_2 = 2.1213183410e+00] + [Pre-RHS (stage 1 of 6) at t = 5.15e-05 (tn = 0.00e+00 , tcur = 5.15e-05), ||y||_2 = 2.1213202184e+00] + [Pre-RHS (stage 2 of 6) at t = 1.51e-05 (tn = 0.00e+00 , tcur = 1.51e-05), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 2 of 6) at t = 1.51e-05 (tn = 0.00e+00 , tcur = 1.51e-05), ||y||_2 = 2.1213183410e+00] [Post-stage processing (stage 2 of 6) at t = 1.51e-05 (tn = 0.00e+00 , tcur = 1.51e-05), ||y||_2 = 2.1213203328e+00] - [Pre-RHS processing (stage 2 of 6) at t = 1.51e-05 (tn = 0.00e+00 , tcur = 1.51e-05), ||y||_2 = 2.1213203328e+00] - [Pre-RHS processing (stage 3 of 6) at t = 6.44e-05 (tn = 0.00e+00 , tcur = 6.44e-05), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 3 of 6) at t = 6.44e-05 (tn = 0.00e+00 , tcur = 6.44e-05), ||y||_2 = 2.1213183410e+00] + [Pre-RHS (stage 2 of 6) at t = 1.51e-05 (tn = 0.00e+00 , tcur = 1.51e-05), ||y||_2 = 2.1213203328e+00] + [Pre-RHS (stage 3 of 6) at t = 6.44e-05 (tn = 0.00e+00 , tcur = 6.44e-05), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 3 of 6) at t = 6.44e-05 (tn = 0.00e+00 , tcur = 6.44e-05), ||y||_2 = 2.1213183410e+00] [Post-stage processing (stage 3 of 6) at t = 6.44e-05 (tn = 0.00e+00 , tcur = 6.44e-05), ||y||_2 = 2.1213201480e+00] - [Pre-RHS processing (stage 3 of 6) at t = 6.44e-05 (tn = 0.00e+00 , tcur = 6.44e-05), ||y||_2 = 2.1213201480e+00] - [Pre-RHS processing (stage 4 of 6) at t = 1.07e-04 (tn = 0.00e+00 , tcur = 1.07e-04), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 4 of 6) at t = 1.07e-04 (tn = 0.00e+00 , tcur = 1.07e-04), ||y||_2 = 2.1213183410e+00] - [Pre-RHS processing (stage 4 of 6) at t = 1.07e-04 (tn = 0.00e+00 , tcur = 1.07e-04), ||y||_2 = 2.1213198021e+00] + [Pre-RHS (stage 3 of 6) at t = 6.44e-05 (tn = 0.00e+00 , tcur = 6.44e-05), ||y||_2 = 2.1213201480e+00] + [Pre-RHS (stage 4 of 6) at t = 1.07e-04 (tn = 0.00e+00 , tcur = 1.07e-04), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 4 of 6) at t = 1.07e-04 (tn = 0.00e+00 , tcur = 1.07e-04), ||y||_2 = 2.1213183410e+00] + [Pre-RHS (stage 4 of 6) at t = 1.07e-04 (tn = 0.00e+00 , tcur = 1.07e-04), ||y||_2 = 2.1213198021e+00] [Post-stage processing (stage 4 of 6) at t = 1.07e-04 (tn = 0.00e+00 , tcur = 1.07e-04), ||y||_2 = 2.1213198021e+00] - [Pre-RHS processing (stage 4 of 6) at t = 1.07e-04 (tn = 0.00e+00 , tcur = 1.07e-04), ||y||_2 = 2.1213198021e+00] - [Pre-RHS processing (stage 5 of 6) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 5 of 6) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213183410e+00] - [Pre-RHS processing (stage 5 of 6) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] - [Post-stage processing (stage 5 of 6) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] - [Pre-RHS processing (stage 5 of 6) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] - [Post-step processing at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] + [Pre-RHS (stage 4 of 6) at t = 1.07e-04 (tn = 0.00e+00 , tcur = 1.07e-04), ||y||_2 = 2.1213198021e+00] + [Pre-RHS (stage 5 of 6) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 5 of 6) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213183410e+00] + [Pre-RHS (stage 5 of 6) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] + [Postprocess-step at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] + [Pre-RHS (stage 5 of 6) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] + [Post-step at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), step = 0, ||y||_2 = 2.1213198430e+00] 1.0298602561e-04 1.2247448703e+00 1.7320501952e+00 7.8541617654e-12 2.7311486406e-14 - [Pre-step processing at t = 1.03e-04 (tn = 1.03e-04 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] - [Pre-RHS processing (stage 1 of 6) at t = 8.22e-03 (tn = 1.03e-04 , tcur = 8.22e-03), ||y||_2 = 2.1213198430e+00] - [Pre-RHS processing (stage 1 of 6) at t = 8.22e-03 (tn = 1.03e-04 , tcur = 8.22e-03), ||y||_2 = 2.1213178432e+00] - [Pre-RHS processing (stage 1 of 6) at t = 8.22e-03 (tn = 1.03e-04 , tcur = 8.22e-03), ||y||_2 = 2.1213208437e+00] - [Pre-RHS processing (stage 1 of 6) at t = 8.22e-03 (tn = 1.03e-04 , tcur = 8.22e-03), ||y||_2 = 2.1181363161e+00] - [Pre-RHS processing (stage 1 of 6) at t = 8.22e-03 (tn = 1.03e-04 , tcur = 8.22e-03), ||y||_2 = 2.1181350533e+00] - [Post-stage processing (stage 1 of 6) at t = 8.22e-03 (tn = 1.03e-04 , tcur = 8.22e-03), ||y||_2 = 2.1181363096e+00] - [Pre-RHS processing (stage 1 of 6) at t = 8.22e-03 (tn = 1.03e-04 , tcur = 8.22e-03), ||y||_2 = 2.1181363096e+00] - [Pre-RHS processing (stage 2 of 6) at t = 2.48e-03 (tn = 1.03e-04 , tcur = 2.48e-03), ||y||_2 = 2.1213198430e+00] - [Pre-RHS processing (stage 2 of 6) at t = 2.48e-03 (tn = 1.03e-04 , tcur = 2.48e-03), ||y||_2 = 2.1213178432e+00] - [Pre-RHS processing (stage 2 of 6) at t = 2.48e-03 (tn = 1.03e-04 , tcur = 2.48e-03), ||y||_2 = 2.1213208437e+00] - [Pre-RHS processing (stage 2 of 6) at t = 2.48e-03 (tn = 1.03e-04 , tcur = 2.48e-03), ||y||_2 = 2.1210284133e+00] + [Pre-step at t = 1.03e-04 (tn = 1.03e-04 , tcur = 1.03e-04), step = 1, attempt = 1, ||y||_2 = 2.1213198430e+00] + [Pre-RHS (stage 1 of 6) at t = 8.22e-03 (tn = 1.03e-04 , tcur = 8.22e-03), ||y||_2 = 2.1213198430e+00] + [Pre-RHS (stage 1 of 6) at t = 8.22e-03 (tn = 1.03e-04 , tcur = 8.22e-03), ||y||_2 = 2.1213178432e+00] + [Pre-RHS (stage 1 of 6) at t = 8.22e-03 (tn = 1.03e-04 , tcur = 8.22e-03), ||y||_2 = 2.1213208437e+00] + [Pre-RHS (stage 1 of 6) at t = 8.22e-03 (tn = 1.03e-04 , tcur = 8.22e-03), ||y||_2 = 2.1181363163e+00] + [Pre-RHS (stage 1 of 6) at t = 8.22e-03 (tn = 1.03e-04 , tcur = 8.22e-03), ||y||_2 = 2.1181350536e+00] + [Post-stage processing (stage 1 of 6) at t = 8.22e-03 (tn = 1.03e-04 , tcur = 8.22e-03), ||y||_2 = 2.1181363098e+00] + [Pre-RHS (stage 1 of 6) at t = 8.22e-03 (tn = 1.03e-04 , tcur = 8.22e-03), ||y||_2 = 2.1181363098e+00] + [Pre-RHS (stage 2 of 6) at t = 2.48e-03 (tn = 1.03e-04 , tcur = 2.48e-03), ||y||_2 = 2.1213198430e+00] + [Pre-RHS (stage 2 of 6) at t = 2.48e-03 (tn = 1.03e-04 , tcur = 2.48e-03), ||y||_2 = 2.1213178432e+00] + [Pre-RHS (stage 2 of 6) at t = 2.48e-03 (tn = 1.03e-04 , tcur = 2.48e-03), ||y||_2 = 2.1213208437e+00] + [Pre-RHS (stage 2 of 6) at t = 2.48e-03 (tn = 1.03e-04 , tcur = 2.48e-03), ||y||_2 = 2.1210284133e+00] [Post-stage processing (stage 2 of 6) at t = 2.48e-03 (tn = 1.03e-04 , tcur = 2.48e-03), ||y||_2 = 2.1210284133e+00] - [Pre-RHS processing (stage 2 of 6) at t = 2.48e-03 (tn = 1.03e-04 , tcur = 2.48e-03), ||y||_2 = 2.1210284133e+00] - [Pre-RHS processing (stage 3 of 6) at t = 1.03e-02 (tn = 1.03e-04 , tcur = 1.03e-02), ||y||_2 = 2.1213198430e+00] - [Pre-RHS processing (stage 3 of 6) at t = 1.03e-02 (tn = 1.03e-04 , tcur = 1.03e-02), ||y||_2 = 2.1213178432e+00] - [Pre-RHS processing (stage 3 of 6) at t = 1.03e-02 (tn = 1.03e-04 , tcur = 1.03e-02), ||y||_2 = 2.1213208437e+00] - [Pre-RHS processing (stage 3 of 6) at t = 1.03e-02 (tn = 1.03e-04 , tcur = 1.03e-02), ||y||_2 = 2.1163722075e+00] - [Pre-RHS processing (stage 3 of 6) at t = 1.03e-02 (tn = 1.03e-04 , tcur = 1.03e-02), ||y||_2 = 2.1163703971e+00] - [Post-stage processing (stage 3 of 6) at t = 1.03e-02 (tn = 1.03e-04 , tcur = 1.03e-02), ||y||_2 = 2.1163721824e+00] - [Pre-RHS processing (stage 3 of 6) at t = 1.03e-02 (tn = 1.03e-04 , tcur = 1.03e-02), ||y||_2 = 2.1163721824e+00] - [Pre-RHS processing (stage 4 of 6) at t = 1.70e-02 (tn = 1.03e-04 , tcur = 1.70e-02), ||y||_2 = 2.1213198430e+00] - [Pre-RHS processing (stage 4 of 6) at t = 1.70e-02 (tn = 1.03e-04 , tcur = 1.70e-02), ||y||_2 = 2.1213178432e+00] - [Pre-RHS processing (stage 4 of 6) at t = 1.70e-02 (tn = 1.03e-04 , tcur = 1.70e-02), ||y||_2 = 2.1213208437e+00] - [Pre-RHS processing (stage 4 of 6) at t = 1.70e-02 (tn = 1.03e-04 , tcur = 1.70e-02), ||y||_2 = 2.1077899282e+00] - [Pre-RHS processing (stage 4 of 6) at t = 1.70e-02 (tn = 1.03e-04 , tcur = 1.70e-02), ||y||_2 = 2.1077876968e+00] - [Post-stage processing (stage 4 of 6) at t = 1.70e-02 (tn = 1.03e-04 , tcur = 1.70e-02), ||y||_2 = 2.1077895068e+00] - [Pre-RHS processing (stage 4 of 6) at t = 1.70e-02 (tn = 1.03e-04 , tcur = 1.70e-02), ||y||_2 = 2.1077895068e+00] - [Pre-RHS processing (stage 5 of 6) at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02), ||y||_2 = 2.1213198430e+00] - [Pre-RHS processing (stage 5 of 6) at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02), ||y||_2 = 2.1213178432e+00] - [Pre-RHS processing (stage 5 of 6) at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02), ||y||_2 = 2.1213208437e+00] - [Pre-RHS processing (stage 5 of 6) at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02), ||y||_2 = 2.1087855077e+00] - [Pre-RHS processing (stage 5 of 6) at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02), ||y||_2 = 2.1087832801e+00] - [Post-stage processing (stage 5 of 6) at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02), ||y||_2 = 2.1087851653e+00] - [Pre-RHS processing (stage 5 of 6) at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02), ||y||_2 = 2.1087851653e+00] - [Post-step processing at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02),||y||_2 = 2.1087851653e+00] - 1.6345098954e-02 1.2247176001e+00 1.7166949855e+00 4.4663852616e-09 6.0447387096e-09 - [Pre-step processing at t = 1.63e-02 (tn = 1.63e-02 , tcur = 1.63e-02),||y||_2 = 2.1087851653e+00] - [Pre-RHS processing (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.1087851653e+00] - [Pre-RHS processing (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.1087831891e+00] - [Pre-RHS processing (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.1087861718e+00] - [Pre-RHS processing (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.0935038900e+00] - [Pre-RHS processing (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.0935017090e+00] - [Pre-RHS processing (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.0935030131e+00] - [Post-stage processing (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.0935030131e+00] - [Pre-RHS processing (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.0935030131e+00] - [Pre-RHS processing (stage 2 of 6) at t = 1.87e-02 (tn = 1.63e-02 , tcur = 1.87e-02), ||y||_2 = 2.1087851653e+00] - [Pre-RHS processing (stage 2 of 6) at t = 1.87e-02 (tn = 1.63e-02 , tcur = 1.87e-02), ||y||_2 = 2.1087831891e+00] - [Pre-RHS processing (stage 2 of 6) at t = 1.87e-02 (tn = 1.63e-02 , tcur = 1.87e-02), ||y||_2 = 2.1087861719e+00] - [Pre-RHS processing (stage 2 of 6) at t = 1.87e-02 (tn = 1.63e-02 , tcur = 1.87e-02), ||y||_2 = 2.1049048432e+00] - [Pre-RHS processing (stage 2 of 6) at t = 1.87e-02 (tn = 1.63e-02 , tcur = 1.87e-02), ||y||_2 = 2.1049026275e+00] - [Post-stage processing (stage 2 of 6) at t = 1.87e-02 (tn = 1.63e-02 , tcur = 1.87e-02), ||y||_2 = 2.1049048030e+00] - [Pre-RHS processing (stage 2 of 6) at t = 1.87e-02 (tn = 1.63e-02 , tcur = 1.87e-02), ||y||_2 = 2.1049048030e+00] - [Pre-RHS processing (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.1087851653e+00] - [Pre-RHS processing (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.1087831891e+00] - [Pre-RHS processing (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.1087861718e+00] - [Pre-RHS processing (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.0887688409e+00] - [Pre-RHS processing (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.0887666742e+00] - [Pre-RHS processing (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.0887671857e+00] - [Post-stage processing (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.0887671857e+00] - [Pre-RHS processing (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.0887671857e+00] - [Pre-RHS processing (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.1087851653e+00] - [Pre-RHS processing (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.1087831890e+00] - [Pre-RHS processing (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.1087861717e+00] - [Pre-RHS processing (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.0706044622e+00] - [Pre-RHS processing (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.0706023387e+00] - [Pre-RHS processing (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.0705966594e+00] - [Post-stage processing (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.0705966594e+00] - [Pre-RHS processing (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.0705966594e+00] - [Pre-RHS processing (stage 5 of 6) at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), ||y||_2 = 2.1087851653e+00] - [Pre-RHS processing (stage 5 of 6) at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), ||y||_2 = 2.1087831890e+00] - [Pre-RHS processing (stage 5 of 6) at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), ||y||_2 = 2.1087861718e+00] - [Pre-RHS processing (stage 5 of 6) at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), ||y||_2 = 2.0725003000e+00] - [Pre-RHS processing (stage 5 of 6) at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), ||y||_2 = 2.0724981727e+00] - [Pre-RHS processing (stage 5 of 6) at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), ||y||_2 = 2.0724934048e+00] - [Post-stage processing (stage 5 of 6) at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), ||y||_2 = 2.0724934048e+00] - [Pre-RHS processing (stage 5 of 6) at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), ||y||_2 = 2.0724934048e+00] - [Post-step processing at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02),||y||_2 = 2.0724934048e+00] - 3.2548715292e-02 1.2246367417e+00 1.6719730154e+00 8.0260507129e-09 5.9880216341e-09 + [Pre-RHS (stage 2 of 6) at t = 2.48e-03 (tn = 1.03e-04 , tcur = 2.48e-03), ||y||_2 = 2.1210284133e+00] + [Pre-RHS (stage 3 of 6) at t = 1.03e-02 (tn = 1.03e-04 , tcur = 1.03e-02), ||y||_2 = 2.1213198430e+00] + [Pre-RHS (stage 3 of 6) at t = 1.03e-02 (tn = 1.03e-04 , tcur = 1.03e-02), ||y||_2 = 2.1213178432e+00] + [Pre-RHS (stage 3 of 6) at t = 1.03e-02 (tn = 1.03e-04 , tcur = 1.03e-02), ||y||_2 = 2.1213208437e+00] + [Pre-RHS (stage 3 of 6) at t = 1.03e-02 (tn = 1.03e-04 , tcur = 1.03e-02), ||y||_2 = 2.1163722079e+00] + [Pre-RHS (stage 3 of 6) at t = 1.03e-02 (tn = 1.03e-04 , tcur = 1.03e-02), ||y||_2 = 2.1163703975e+00] + [Post-stage processing (stage 3 of 6) at t = 1.03e-02 (tn = 1.03e-04 , tcur = 1.03e-02), ||y||_2 = 2.1163721828e+00] + [Pre-RHS (stage 3 of 6) at t = 1.03e-02 (tn = 1.03e-04 , tcur = 1.03e-02), ||y||_2 = 2.1163721828e+00] + [Pre-RHS (stage 4 of 6) at t = 1.70e-02 (tn = 1.03e-04 , tcur = 1.70e-02), ||y||_2 = 2.1213198430e+00] + [Pre-RHS (stage 4 of 6) at t = 1.70e-02 (tn = 1.03e-04 , tcur = 1.70e-02), ||y||_2 = 2.1213178432e+00] + [Pre-RHS (stage 4 of 6) at t = 1.70e-02 (tn = 1.03e-04 , tcur = 1.70e-02), ||y||_2 = 2.1213208437e+00] + [Pre-RHS (stage 4 of 6) at t = 1.70e-02 (tn = 1.03e-04 , tcur = 1.70e-02), ||y||_2 = 2.1077899293e+00] + [Pre-RHS (stage 4 of 6) at t = 1.70e-02 (tn = 1.03e-04 , tcur = 1.70e-02), ||y||_2 = 2.1077876979e+00] + [Post-stage processing (stage 4 of 6) at t = 1.70e-02 (tn = 1.03e-04 , tcur = 1.70e-02), ||y||_2 = 2.1077895079e+00] + [Pre-RHS (stage 4 of 6) at t = 1.70e-02 (tn = 1.03e-04 , tcur = 1.70e-02), ||y||_2 = 2.1077895079e+00] + [Pre-RHS (stage 5 of 6) at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02), ||y||_2 = 2.1213198430e+00] + [Pre-RHS (stage 5 of 6) at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02), ||y||_2 = 2.1213178432e+00] + [Pre-RHS (stage 5 of 6) at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02), ||y||_2 = 2.1213208437e+00] + [Pre-RHS (stage 5 of 6) at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02), ||y||_2 = 2.1087855087e+00] + [Pre-RHS (stage 5 of 6) at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02), ||y||_2 = 2.1087832811e+00] + [Postprocess-step at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02),||y||_2 = 2.1087851663e+00] + [Pre-RHS (stage 5 of 6) at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02), ||y||_2 = 2.1087851663e+00] + [Post-step at t = 1.63e-02 (tn = 1.03e-04 , tcur = 1.63e-02), step = 1, ||y||_2 = 2.1087851663e+00] + 1.6345098313e-02 1.2247176001e+00 1.7166949867e+00 4.4663841514e-09 6.0447369332e-09 + [Pre-step at t = 1.63e-02 (tn = 1.63e-02 , tcur = 1.63e-02), step = 2, attempt = 1, ||y||_2 = 2.1087851663e+00] + [Pre-RHS (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.1087851663e+00] + [Pre-RHS (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.1087831901e+00] + [Pre-RHS (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.1087861728e+00] + [Pre-RHS (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.0935038914e+00] + [Pre-RHS (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.0935017104e+00] + [Pre-RHS (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.0935030146e+00] + [Post-stage processing (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.0935030146e+00] + [Pre-RHS (stage 1 of 6) at t = 2.44e-02 (tn = 1.63e-02 , tcur = 2.44e-02), ||y||_2 = 2.0935030146e+00] + [Pre-RHS (stage 2 of 6) at t = 1.87e-02 (tn = 1.63e-02 , tcur = 1.87e-02), ||y||_2 = 2.1087851663e+00] + [Pre-RHS (stage 2 of 6) at t = 1.87e-02 (tn = 1.63e-02 , tcur = 1.87e-02), ||y||_2 = 2.1087831901e+00] + [Pre-RHS (stage 2 of 6) at t = 1.87e-02 (tn = 1.63e-02 , tcur = 1.87e-02), ||y||_2 = 2.1087861728e+00] + [Pre-RHS (stage 2 of 6) at t = 1.87e-02 (tn = 1.63e-02 , tcur = 1.87e-02), ||y||_2 = 2.1049048443e+00] + [Pre-RHS (stage 2 of 6) at t = 1.87e-02 (tn = 1.63e-02 , tcur = 1.87e-02), ||y||_2 = 2.1049026286e+00] + [Post-stage processing (stage 2 of 6) at t = 1.87e-02 (tn = 1.63e-02 , tcur = 1.87e-02), ||y||_2 = 2.1049048041e+00] + [Pre-RHS (stage 2 of 6) at t = 1.87e-02 (tn = 1.63e-02 , tcur = 1.87e-02), ||y||_2 = 2.1049048041e+00] + [Pre-RHS (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.1087851663e+00] + [Pre-RHS (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.1087831900e+00] + [Pre-RHS (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.1087861728e+00] + [Pre-RHS (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.0887688424e+00] + [Pre-RHS (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.0887666758e+00] + [Pre-RHS (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.0887671872e+00] + [Post-stage processing (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.0887671872e+00] + [Pre-RHS (stage 3 of 6) at t = 2.65e-02 (tn = 1.63e-02 , tcur = 2.65e-02), ||y||_2 = 2.0887671872e+00] + [Pre-RHS (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.1087851663e+00] + [Pre-RHS (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.1087831900e+00] + [Pre-RHS (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.1087861727e+00] + [Pre-RHS (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.0706044641e+00] + [Pre-RHS (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.0706023406e+00] + [Pre-RHS (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.0705966613e+00] + [Post-stage processing (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.0705966613e+00] + [Pre-RHS (stage 4 of 6) at t = 3.32e-02 (tn = 1.63e-02 , tcur = 3.32e-02), ||y||_2 = 2.0705966613e+00] + [Pre-RHS (stage 5 of 6) at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), ||y||_2 = 2.1087851663e+00] + [Pre-RHS (stage 5 of 6) at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), ||y||_2 = 2.1087831900e+00] + [Pre-RHS (stage 5 of 6) at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), ||y||_2 = 2.1087861727e+00] + [Pre-RHS (stage 5 of 6) at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), ||y||_2 = 2.0725003019e+00] + [Pre-RHS (stage 5 of 6) at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), ||y||_2 = 2.0724981746e+00] + [Pre-RHS (stage 5 of 6) at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), ||y||_2 = 2.0724934067e+00] + [Postprocess-step at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02),||y||_2 = 2.0724934067e+00] + [Pre-RHS (stage 5 of 6) at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), ||y||_2 = 2.0724934067e+00] + [Post-step at t = 3.25e-02 (tn = 1.63e-02 , tcur = 3.25e-02), step = 2, ||y||_2 = 2.0724934067e+00] + 3.2548714654e-02 1.2246367417e+00 1.6719730177e+00 8.0260502688e-09 5.9880200798e-09 ------------------------------------------------------------------------------------------------------------------------------ -Current time = 0.0325487152923576 +Current time = 0.0325487146540888 Steps = 3 Step attempts = 3 Stability limited steps = 0 @@ -122,8 +122,8 @@ Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 Initial step size = 0.000102986025609508 -Last step size = 0.0162036163379197 -Current step size = 0.0160003634180696 +Last step size = 0.0162036163408584 +Current step size = 0.0160003634285686 Explicit RHS fn evals = 0 Implicit RHS fn evals = 49 NLS iters = 31 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_2.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_2.out index 0c42465ad2..b73f848bec 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_2.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_arkstep_2.out @@ -5,143 +5,146 @@ Using GMRES iterative linear solver t u v u err v err ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-RHS processing (stage 0 of 7) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 0 of 7) at t = 4.71e-08 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 0 of 7) at t = 2.06e-04 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] - [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 1 of 7) at t = 2.54e-05 (tn = 0.00e+00 , tcur = 2.54e-05), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 0 of 7) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 0 of 7) at t = 4.71e-08 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 0 of 7) at t = 2.06e-04 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-step at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), step = 0, attempt = 1, ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 1 of 7) at t = 2.54e-05 (tn = 0.00e+00 , tcur = 2.54e-05), ||y||_2 = 2.1213203436e+00] [Post-stage processing (stage 1 of 7) at t = 2.54e-05 (tn = 0.00e+00 , tcur = 2.54e-05), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 1 of 7) at t = 2.54e-05 (tn = 0.00e+00 , tcur = 2.54e-05), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 2 of 7) at t = 4.34e-05 (tn = 0.00e+00 , tcur = 4.34e-05), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 2 of 7) at t = 4.34e-05 (tn = 0.00e+00 , tcur = 4.34e-05), ||y||_2 = 2.1213183410e+00] + [Pre-RHS (stage 1 of 7) at t = 2.54e-05 (tn = 0.00e+00 , tcur = 2.54e-05), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 2 of 7) at t = 4.34e-05 (tn = 0.00e+00 , tcur = 4.34e-05), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 2 of 7) at t = 4.34e-05 (tn = 0.00e+00 , tcur = 4.34e-05), ||y||_2 = 2.1213183410e+00] [Post-stage processing (stage 2 of 7) at t = 4.34e-05 (tn = 0.00e+00 , tcur = 4.34e-05), ||y||_2 = 2.1213202546e+00] - [Pre-RHS processing (stage 2 of 7) at t = 4.34e-05 (tn = 0.00e+00 , tcur = 4.34e-05), ||y||_2 = 2.1213202546e+00] - [Pre-RHS processing (stage 3 of 7) at t = 3.45e-05 (tn = 0.00e+00 , tcur = 3.45e-05), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 3 of 7) at t = 3.45e-05 (tn = 0.00e+00 , tcur = 3.45e-05), ||y||_2 = 2.1213183410e+00] + [Pre-RHS (stage 2 of 7) at t = 4.34e-05 (tn = 0.00e+00 , tcur = 4.34e-05), ||y||_2 = 2.1213202546e+00] + [Pre-RHS (stage 3 of 7) at t = 3.45e-05 (tn = 0.00e+00 , tcur = 3.45e-05), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 3 of 7) at t = 3.45e-05 (tn = 0.00e+00 , tcur = 3.45e-05), ||y||_2 = 2.1213183410e+00] [Post-stage processing (stage 3 of 7) at t = 3.45e-05 (tn = 0.00e+00 , tcur = 3.45e-05), ||y||_2 = 2.1213202874e+00] - [Pre-RHS processing (stage 3 of 7) at t = 3.45e-05 (tn = 0.00e+00 , tcur = 3.45e-05), ||y||_2 = 2.1213202874e+00] - [Pre-RHS processing (stage 4 of 7) at t = 7.72e-06 (tn = 0.00e+00 , tcur = 7.72e-06), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 4 of 7) at t = 7.72e-06 (tn = 0.00e+00 , tcur = 7.72e-06), ||y||_2 = 2.1213183409e+00] + [Pre-RHS (stage 3 of 7) at t = 3.45e-05 (tn = 0.00e+00 , tcur = 3.45e-05), ||y||_2 = 2.1213202874e+00] + [Pre-RHS (stage 4 of 7) at t = 7.72e-06 (tn = 0.00e+00 , tcur = 7.72e-06), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 4 of 7) at t = 7.72e-06 (tn = 0.00e+00 , tcur = 7.72e-06), ||y||_2 = 2.1213183409e+00] [Post-stage processing (stage 4 of 7) at t = 7.72e-06 (tn = 0.00e+00 , tcur = 7.72e-06), ||y||_2 = 2.1213203407e+00] - [Pre-RHS processing (stage 4 of 7) at t = 7.72e-06 (tn = 0.00e+00 , tcur = 7.72e-06), ||y||_2 = 2.1213203407e+00] - [Pre-RHS processing (stage 5 of 7) at t = 7.21e-05 (tn = 0.00e+00 , tcur = 7.21e-05), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 5 of 7) at t = 7.21e-05 (tn = 0.00e+00 , tcur = 7.21e-05), ||y||_2 = 2.1213183410e+00] - [Pre-RHS processing (stage 5 of 7) at t = 7.21e-05 (tn = 0.00e+00 , tcur = 7.21e-05), ||y||_2 = 2.1213200983e+00] + [Pre-RHS (stage 4 of 7) at t = 7.72e-06 (tn = 0.00e+00 , tcur = 7.72e-06), ||y||_2 = 2.1213203407e+00] + [Pre-RHS (stage 5 of 7) at t = 7.21e-05 (tn = 0.00e+00 , tcur = 7.21e-05), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 5 of 7) at t = 7.21e-05 (tn = 0.00e+00 , tcur = 7.21e-05), ||y||_2 = 2.1213183410e+00] + [Pre-RHS (stage 5 of 7) at t = 7.21e-05 (tn = 0.00e+00 , tcur = 7.21e-05), ||y||_2 = 2.1213200983e+00] [Post-stage processing (stage 5 of 7) at t = 7.21e-05 (tn = 0.00e+00 , tcur = 7.21e-05), ||y||_2 = 2.1213200983e+00] - [Pre-RHS processing (stage 5 of 7) at t = 7.21e-05 (tn = 0.00e+00 , tcur = 7.21e-05), ||y||_2 = 2.1213200983e+00] - [Pre-RHS processing (stage 6 of 7) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 6 of 7) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213183410e+00] - [Pre-RHS processing (stage 6 of 7) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] + [Pre-RHS (stage 5 of 7) at t = 7.21e-05 (tn = 0.00e+00 , tcur = 7.21e-05), ||y||_2 = 2.1213200983e+00] + [Pre-RHS (stage 6 of 7) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 6 of 7) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213183410e+00] + [Pre-RHS (stage 6 of 7) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] [Post-stage processing (stage 6 of 7) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] - [Pre-RHS processing (stage 6 of 7) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] - [Post-step processing at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] + [Pre-RHS (stage 6 of 7) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] + [Postprocess-step at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] + [Post-step at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), step = 0, ||y||_2 = 2.1213198430e+00] 1.0298602561e-04 1.2247448703e+00 1.7320501952e+00 2.2204460493e-16 0.0000000000e+00 - [Pre-step processing at t = 1.03e-04 (tn = 1.03e-04 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] - [Pre-RHS processing (stage 0 of 7) at t = 1.03e-04 (tn = 1.03e-04 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] - [Pre-RHS processing (stage 1 of 7) at t = 8.73e-03 (tn = 1.03e-04 , tcur = 8.73e-03), ||y||_2 = 2.1213198430e+00] - [Pre-RHS processing (stage 1 of 7) at t = 8.73e-03 (tn = 1.03e-04 , tcur = 8.73e-03), ||y||_2 = 2.1213179609e+00] - [Pre-RHS processing (stage 1 of 7) at t = 8.73e-03 (tn = 1.03e-04 , tcur = 8.73e-03), ||y||_2 = 2.1213210506e+00] - [Pre-RHS processing (stage 1 of 7) at t = 8.73e-03 (tn = 1.03e-04 , tcur = 8.73e-03), ||y||_2 = 2.1212262228e+00] + [Pre-step at t = 1.03e-04 (tn = 1.03e-04 , tcur = 1.03e-04), step = 1, attempt = 1, ||y||_2 = 2.1213198430e+00] + [Pre-RHS (stage 0 of 7) at t = 1.03e-04 (tn = 1.03e-04 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] + [Pre-RHS (stage 1 of 7) at t = 8.73e-03 (tn = 1.03e-04 , tcur = 8.73e-03), ||y||_2 = 2.1213198430e+00] + [Pre-RHS (stage 1 of 7) at t = 8.73e-03 (tn = 1.03e-04 , tcur = 8.73e-03), ||y||_2 = 2.1213179609e+00] + [Pre-RHS (stage 1 of 7) at t = 8.73e-03 (tn = 1.03e-04 , tcur = 8.73e-03), ||y||_2 = 2.1213210506e+00] + [Pre-RHS (stage 1 of 7) at t = 8.73e-03 (tn = 1.03e-04 , tcur = 8.73e-03), ||y||_2 = 2.1212262228e+00] [Post-stage processing (stage 1 of 7) at t = 8.73e-03 (tn = 1.03e-04 , tcur = 8.73e-03), ||y||_2 = 2.1212262228e+00] - [Pre-RHS processing (stage 1 of 7) at t = 8.73e-03 (tn = 1.03e-04 , tcur = 8.73e-03), ||y||_2 = 2.1212262228e+00] - [Pre-RHS processing (stage 2 of 7) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1213198430e+00] - [Pre-RHS processing (stage 2 of 7) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1213178446e+00] - [Pre-RHS processing (stage 2 of 7) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1213208465e+00] - [Pre-RHS processing (stage 2 of 7) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1109952863e+00] - [Pre-RHS processing (stage 2 of 7) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1109963352e+00] - [Post-stage processing (stage 2 of 7) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1109953892e+00] - [Pre-RHS processing (stage 2 of 7) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1109953892e+00] - [Pre-RHS processing (stage 3 of 7) at t = 1.18e-02 (tn = 1.03e-04 , tcur = 1.18e-02), ||y||_2 = 2.1213198430e+00] - [Pre-RHS processing (stage 3 of 7) at t = 1.18e-02 (tn = 1.03e-04 , tcur = 1.18e-02), ||y||_2 = 2.1213178450e+00] - [Pre-RHS processing (stage 3 of 7) at t = 1.18e-02 (tn = 1.03e-04 , tcur = 1.18e-02), ||y||_2 = 2.1213208473e+00] - [Pre-RHS processing (stage 3 of 7) at t = 1.18e-02 (tn = 1.03e-04 , tcur = 1.18e-02), ||y||_2 = 2.1147654560e+00] - [Pre-RHS processing (stage 3 of 7) at t = 1.18e-02 (tn = 1.03e-04 , tcur = 1.18e-02), ||y||_2 = 2.1147665074e+00] - [Post-stage processing (stage 3 of 7) at t = 1.18e-02 (tn = 1.03e-04 , tcur = 1.18e-02), ||y||_2 = 2.1147654976e+00] - [Pre-RHS processing (stage 3 of 7) at t = 1.18e-02 (tn = 1.03e-04 , tcur = 1.18e-02), ||y||_2 = 2.1147654976e+00] - [Pre-RHS processing (stage 4 of 7) at t = 2.72e-03 (tn = 1.03e-04 , tcur = 2.72e-03), ||y||_2 = 2.1213198430e+00] - [Pre-RHS processing (stage 4 of 7) at t = 2.72e-03 (tn = 1.03e-04 , tcur = 2.72e-03), ||y||_2 = 2.1213178266e+00] - [Pre-RHS processing (stage 4 of 7) at t = 2.72e-03 (tn = 1.03e-04 , tcur = 2.72e-03), ||y||_2 = 2.1213208099e+00] - [Pre-RHS processing (stage 4 of 7) at t = 2.72e-03 (tn = 1.03e-04 , tcur = 2.72e-03), ||y||_2 = 2.1209503426e+00] - [Post-stage processing (stage 4 of 7) at t = 2.72e-03 (tn = 1.03e-04 , tcur = 2.72e-03), ||y||_2 = 2.1209503426e+00] - [Pre-RHS processing (stage 4 of 7) at t = 2.72e-03 (tn = 1.03e-04 , tcur = 2.72e-03), ||y||_2 = 2.1209503426e+00] - [Pre-RHS processing (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.1213198430e+00] - [Pre-RHS processing (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.1213178428e+00] - [Pre-RHS processing (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.1213208430e+00] - [Pre-RHS processing (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.0932810331e+00] - [Pre-RHS processing (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.0932820701e+00] - [Pre-RHS processing (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.0932790587e+00] - [Pre-RHS processing (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.0932817810e+00] - [Post-stage processing (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.0932817810e+00] - [Pre-RHS processing (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.0932817810e+00] - [Pre-RHS processing (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.1213198430e+00] - [Pre-RHS processing (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.1213178433e+00] - [Pre-RHS processing (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.1213208439e+00] - [Pre-RHS processing (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.0649440080e+00] - [Pre-RHS processing (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.0649450254e+00] - [Pre-RHS processing (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.0649420305e+00] - [Pre-RHS processing (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.0649469358e+00] - [Post-stage processing (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.0649469358e+00] - [Pre-RHS processing (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.0649469358e+00] - [Post-step processing at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02),||y||_2 = 2.0649991558e+00] - 3.5024521932e-02 1.2246196097e+00 1.6626870797e+00 6.6819398681e-08 6.5525542281e-07 - [Pre-step processing at t = 3.50e-02 (tn = 3.50e-02 , tcur = 3.50e-02),||y||_2 = 2.0649991558e+00] - [Pre-RHS processing (stage 0 of 7) at t = 3.50e-02 (tn = 3.50e-02 , tcur = 3.50e-02), ||y||_2 = 2.0649991558e+00] - [Pre-RHS processing (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0649991558e+00] - [Pre-RHS processing (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0649972631e+00] - [Pre-RHS processing (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0650001842e+00] - [Pre-RHS processing (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0383154536e+00] - [Pre-RHS processing (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0383164246e+00] - [Pre-RHS processing (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0383135369e+00] - [Pre-RHS processing (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0383161449e+00] - [Post-stage processing (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0383161449e+00] - [Pre-RHS processing (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0383161449e+00] - [Pre-RHS processing (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0649991558e+00] - [Pre-RHS processing (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0649972629e+00] - [Pre-RHS processing (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0650001838e+00] - [Pre-RHS processing (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0114167342e+00] - [Pre-RHS processing (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0114176855e+00] - [Pre-RHS processing (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0114148140e+00] - [Pre-RHS processing (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0114194404e+00] - [Post-stage processing (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0114194404e+00] - [Pre-RHS processing (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0114194404e+00] - [Pre-RHS processing (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0649991558e+00] - [Pre-RHS processing (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0649972629e+00] - [Pre-RHS processing (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0650001839e+00] - [Pre-RHS processing (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0236350168e+00] - [Pre-RHS processing (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0236359771e+00] - [Pre-RHS processing (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0236330982e+00] - [Pre-RHS processing (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0236366549e+00] - [Post-stage processing (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0236366549e+00] - [Pre-RHS processing (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0236366549e+00] - [Pre-RHS processing (stage 4 of 7) at t = 3.76e-02 (tn = 3.50e-02 , tcur = 3.76e-02), ||y||_2 = 2.0649991558e+00] - [Pre-RHS processing (stage 4 of 7) at t = 3.76e-02 (tn = 3.50e-02 , tcur = 3.76e-02), ||y||_2 = 2.0649972622e+00] - [Pre-RHS processing (stage 4 of 7) at t = 3.76e-02 (tn = 3.50e-02 , tcur = 3.76e-02), ||y||_2 = 2.0650001825e+00] - [Pre-RHS processing (stage 4 of 7) at t = 3.76e-02 (tn = 3.50e-02 , tcur = 3.76e-02), ||y||_2 = 2.0565069828e+00] - [Pre-RHS processing (stage 4 of 7) at t = 3.76e-02 (tn = 3.50e-02 , tcur = 3.76e-02), ||y||_2 = 2.0565079665e+00] - [Post-stage processing (stage 4 of 7) at t = 3.76e-02 (tn = 3.50e-02 , tcur = 3.76e-02), ||y||_2 = 2.0565070541e+00] - [Pre-RHS processing (stage 4 of 7) at t = 3.76e-02 (tn = 3.50e-02 , tcur = 3.76e-02), ||y||_2 = 2.0565070541e+00] - [Pre-RHS processing (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 2.0649991558e+00] - [Pre-RHS processing (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 2.0649972625e+00] - [Pre-RHS processing (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 2.0650001830e+00] - [Pre-RHS processing (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 1.9686832168e+00] - [Pre-RHS processing (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 1.9686841353e+00] - [Pre-RHS processing (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 1.9686812913e+00] - [Pre-RHS processing (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 1.9686914710e+00] - [Post-stage processing (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 1.9686914710e+00] - [Pre-RHS processing (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 1.9686914710e+00] - [Pre-RHS processing (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 2.0649991558e+00] - [Pre-RHS processing (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 2.0649972625e+00] - [Pre-RHS processing (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 2.0650001830e+00] - [Pre-RHS processing (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 1.9163575635e+00] - [Pre-RHS processing (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 1.9163584389e+00] - [Pre-RHS processing (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 1.9163556320e+00] - [Pre-RHS processing (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 1.9163758117e+00] - [Post-stage processing (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 1.9163758117e+00] - [Pre-RHS processing (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 1.9163758117e+00] - [Post-step processing at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02),||y||_2 = 1.9169542285e+00] - 6.9697813939e-02 1.2242491983e+00 1.4751025098e+00 2.2221884333e-08 2.5857302401e-06 + [Pre-RHS (stage 1 of 7) at t = 8.73e-03 (tn = 1.03e-04 , tcur = 8.73e-03), ||y||_2 = 2.1212262228e+00] + [Pre-RHS (stage 2 of 7) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1213198430e+00] + [Pre-RHS (stage 2 of 7) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1213178446e+00] + [Pre-RHS (stage 2 of 7) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1213208465e+00] + [Pre-RHS (stage 2 of 7) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1109952881e+00] + [Pre-RHS (stage 2 of 7) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1109963370e+00] + [Post-stage processing (stage 2 of 7) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1109953910e+00] + [Pre-RHS (stage 2 of 7) at t = 1.48e-02 (tn = 1.03e-04 , tcur = 1.48e-02), ||y||_2 = 2.1109953910e+00] + [Pre-RHS (stage 3 of 7) at t = 1.18e-02 (tn = 1.03e-04 , tcur = 1.18e-02), ||y||_2 = 2.1213198430e+00] + [Pre-RHS (stage 3 of 7) at t = 1.18e-02 (tn = 1.03e-04 , tcur = 1.18e-02), ||y||_2 = 2.1213178450e+00] + [Pre-RHS (stage 3 of 7) at t = 1.18e-02 (tn = 1.03e-04 , tcur = 1.18e-02), ||y||_2 = 2.1213208473e+00] + [Pre-RHS (stage 3 of 7) at t = 1.18e-02 (tn = 1.03e-04 , tcur = 1.18e-02), ||y||_2 = 2.1147654571e+00] + [Pre-RHS (stage 3 of 7) at t = 1.18e-02 (tn = 1.03e-04 , tcur = 1.18e-02), ||y||_2 = 2.1147665085e+00] + [Post-stage processing (stage 3 of 7) at t = 1.18e-02 (tn = 1.03e-04 , tcur = 1.18e-02), ||y||_2 = 2.1147654988e+00] + [Pre-RHS (stage 3 of 7) at t = 1.18e-02 (tn = 1.03e-04 , tcur = 1.18e-02), ||y||_2 = 2.1147654988e+00] + [Pre-RHS (stage 4 of 7) at t = 2.72e-03 (tn = 1.03e-04 , tcur = 2.72e-03), ||y||_2 = 2.1213198430e+00] + [Pre-RHS (stage 4 of 7) at t = 2.72e-03 (tn = 1.03e-04 , tcur = 2.72e-03), ||y||_2 = 2.1213178266e+00] + [Pre-RHS (stage 4 of 7) at t = 2.72e-03 (tn = 1.03e-04 , tcur = 2.72e-03), ||y||_2 = 2.1213208099e+00] + [Pre-RHS (stage 4 of 7) at t = 2.72e-03 (tn = 1.03e-04 , tcur = 2.72e-03), ||y||_2 = 2.1209503427e+00] + [Post-stage processing (stage 4 of 7) at t = 2.72e-03 (tn = 1.03e-04 , tcur = 2.72e-03), ||y||_2 = 2.1209503427e+00] + [Pre-RHS (stage 4 of 7) at t = 2.72e-03 (tn = 1.03e-04 , tcur = 2.72e-03), ||y||_2 = 2.1209503427e+00] + [Pre-RHS (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.1213198430e+00] + [Pre-RHS (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.1213178428e+00] + [Pre-RHS (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.1213208430e+00] + [Pre-RHS (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.0932810380e+00] + [Pre-RHS (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.0932820750e+00] + [Pre-RHS (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.0932790635e+00] + [Pre-RHS (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.0932817859e+00] + [Post-stage processing (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.0932817859e+00] + [Pre-RHS (stage 5 of 7) at t = 2.45e-02 (tn = 1.03e-04 , tcur = 2.45e-02), ||y||_2 = 2.0932817859e+00] + [Pre-RHS (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.1213198430e+00] + [Pre-RHS (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.1213178433e+00] + [Pre-RHS (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.1213208439e+00] + [Pre-RHS (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.0649440177e+00] + [Pre-RHS (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.0649450350e+00] + [Pre-RHS (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.0649420402e+00] + [Pre-RHS (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.0649469454e+00] + [Post-stage processing (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.0649469454e+00] + [Pre-RHS (stage 6 of 7) at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), ||y||_2 = 2.0649469454e+00] + [Postprocess-step at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02),||y||_2 = 2.0649991654e+00] + [Post-step at t = 3.50e-02 (tn = 1.03e-04 , tcur = 3.50e-02), step = 1, ||y||_2 = 2.0649991654e+00] + 3.5024518851e-02 1.2246196097e+00 1.6626870917e+00 6.6819370037e-08 6.5525508308e-07 + [Pre-step at t = 3.50e-02 (tn = 3.50e-02 , tcur = 3.50e-02), step = 2, attempt = 1, ||y||_2 = 2.0649991654e+00] + [Pre-RHS (stage 0 of 7) at t = 3.50e-02 (tn = 3.50e-02 , tcur = 3.50e-02), ||y||_2 = 2.0649991654e+00] + [Pre-RHS (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0649991654e+00] + [Pre-RHS (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0649972727e+00] + [Pre-RHS (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0650001938e+00] + [Pre-RHS (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0383154653e+00] + [Pre-RHS (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0383164362e+00] + [Pre-RHS (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0383135485e+00] + [Pre-RHS (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0383161565e+00] + [Post-stage processing (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0383161565e+00] + [Pre-RHS (stage 1 of 7) at t = 4.36e-02 (tn = 3.50e-02 , tcur = 4.36e-02), ||y||_2 = 2.0383161565e+00] + [Pre-RHS (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0649991654e+00] + [Pre-RHS (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0649972725e+00] + [Pre-RHS (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0650001934e+00] + [Pre-RHS (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0114167469e+00] + [Pre-RHS (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0114176982e+00] + [Pre-RHS (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0114148267e+00] + [Pre-RHS (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0114194532e+00] + [Post-stage processing (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0114194532e+00] + [Pre-RHS (stage 2 of 7) at t = 4.96e-02 (tn = 3.50e-02 , tcur = 4.96e-02), ||y||_2 = 2.0114194532e+00] + [Pre-RHS (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0649991654e+00] + [Pre-RHS (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0649972725e+00] + [Pre-RHS (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0650001935e+00] + [Pre-RHS (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0236350290e+00] + [Pre-RHS (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0236359893e+00] + [Pre-RHS (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0236331104e+00] + [Pre-RHS (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0236366671e+00] + [Post-stage processing (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0236366671e+00] + [Pre-RHS (stage 3 of 7) at t = 4.66e-02 (tn = 3.50e-02 , tcur = 4.66e-02), ||y||_2 = 2.0236366671e+00] + [Pre-RHS (stage 4 of 7) at t = 3.76e-02 (tn = 3.50e-02 , tcur = 3.76e-02), ||y||_2 = 2.0649991654e+00] + [Pre-RHS (stage 4 of 7) at t = 3.76e-02 (tn = 3.50e-02 , tcur = 3.76e-02), ||y||_2 = 2.0649972718e+00] + [Pre-RHS (stage 4 of 7) at t = 3.76e-02 (tn = 3.50e-02 , tcur = 3.76e-02), ||y||_2 = 2.0650001921e+00] + [Pre-RHS (stage 4 of 7) at t = 3.76e-02 (tn = 3.50e-02 , tcur = 3.76e-02), ||y||_2 = 2.0565069930e+00] + [Pre-RHS (stage 4 of 7) at t = 3.76e-02 (tn = 3.50e-02 , tcur = 3.76e-02), ||y||_2 = 2.0565079768e+00] + [Post-stage processing (stage 4 of 7) at t = 3.76e-02 (tn = 3.50e-02 , tcur = 3.76e-02), ||y||_2 = 2.0565070643e+00] + [Pre-RHS (stage 4 of 7) at t = 3.76e-02 (tn = 3.50e-02 , tcur = 3.76e-02), ||y||_2 = 2.0565070643e+00] + [Pre-RHS (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 2.0649991654e+00] + [Pre-RHS (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 2.0649972721e+00] + [Pre-RHS (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 2.0650001927e+00] + [Pre-RHS (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 1.9686832311e+00] + [Pre-RHS (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 1.9686841496e+00] + [Pre-RHS (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 1.9686813056e+00] + [Pre-RHS (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 1.9686914853e+00] + [Post-stage processing (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 1.9686914853e+00] + [Pre-RHS (stage 5 of 7) at t = 5.93e-02 (tn = 3.50e-02 , tcur = 5.93e-02), ||y||_2 = 1.9686914853e+00] + [Pre-RHS (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 2.0649991654e+00] + [Pre-RHS (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 2.0649972721e+00] + [Pre-RHS (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 2.0650001927e+00] + [Pre-RHS (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 1.9163575792e+00] + [Pre-RHS (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 1.9163584545e+00] + [Pre-RHS (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 1.9163556476e+00] + [Pre-RHS (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 1.9163758274e+00] + [Post-stage processing (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 1.9163758274e+00] + [Pre-RHS (stage 6 of 7) at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), ||y||_2 = 1.9163758274e+00] + [Postprocess-step at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02),||y||_2 = 1.9169542441e+00] + [Post-step at t = 6.97e-02 (tn = 3.50e-02 , tcur = 6.97e-02), step = 2, ||y||_2 = 1.9169542441e+00] + 6.9697810906e-02 1.2242491984e+00 1.4751025300e+00 2.2221884555e-08 2.5857295849e-06 ------------------------------------------------------------------------------------------------------------------------------ -Current time = 0.0696978139393375 +Current time = 0.0696978109064544 Steps = 3 Step attempts = 3 Stability limited steps = 0 @@ -150,8 +153,8 @@ Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 Initial step size = 0.000102986025609508 -Last step size = 0.0346732920075373 -Current step size = 0.0331306528243113 +Last step size = 0.0346732920553526 +Current step size = 0.0331306530355695 Explicit RHS fn evals = 23 Implicit RHS fn evals = 62 NLS iters = 39 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.out index f14856a4d7..f07040bd8b 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.out @@ -1,53 +1,52 @@ Start ERKStep StageInfo test - t u v u err v err + t u v u err v err ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-RHS processing (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 0 of 5) at t = 4.71e-08 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 0 of 5) at t = 2.06e-04 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] - [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] - [Post-stage processing (stage 1 of 5) at t = 4.12e-05 (tn = 0.00e+00 , tcur = 4.12e-05), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 1 of 5) at t = 4.12e-05 (tn = 0.00e+00 , tcur = 4.12e-05), ||y||_2 = 2.1213203436e+00] - [Post-stage processing (stage 2 of 5) at t = 6.18e-05 (tn = 0.00e+00 , tcur = 6.18e-05), ||y||_2 = 2.1213200432e+00] - [Pre-RHS processing (stage 2 of 5) at t = 6.18e-05 (tn = 0.00e+00 , tcur = 6.18e-05), ||y||_2 = 2.1213200432e+00] - [Post-stage processing (stage 3 of 5) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213199340e+00] - [Pre-RHS processing (stage 3 of 5) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213199340e+00] - [Post-stage processing (stage 4 of 5) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] - [Pre-RHS processing (stage 4 of 5) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] - [Post-step processing at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] + [Pre-RHS (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 0 of 5) at t = 4.71e-08 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 0 of 5) at t = 2.06e-04 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-step at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), step = 0, attempt = 1, ||y||_2 = 2.1213203436e+00] + [Post-stage processing (stage 0 of 5) at t = 4.12e-05 (tn = 0.00e+00 , tcur = 4.12e-05), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 1 of 5) at t = 4.12e-05 (tn = 0.00e+00 , tcur = 4.12e-05), ||y||_2 = 2.1213203436e+00] + [Post-stage processing (stage 1 of 5) at t = 6.18e-05 (tn = 0.00e+00 , tcur = 6.18e-05), ||y||_2 = 2.1213200432e+00] + [Pre-RHS (stage 2 of 5) at t = 6.18e-05 (tn = 0.00e+00 , tcur = 6.18e-05), ||y||_2 = 2.1213200432e+00] + [Post-stage processing (stage 2 of 5) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213199340e+00] + [Pre-RHS (stage 3 of 5) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213199340e+00] + [Postprocess-step at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] + [Pre-RHS (stage 4 of 5) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] + [Post-step at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), step = 0, ||y||_2 = 2.1213198430e+00] 1.0298602561e-04 1.2247448703e+00 1.7320501952e+00 2.2204460493e-16 0.0000000000e+00 - [Pre-step processing at t = 1.03e-04 (tn = 1.03e-04 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] - [Post-stage processing (stage 1 of 5) at t = 6.56e-03 (tn = 1.03e-04 , tcur = 6.56e-03), ||y||_2 = 2.1212571010e+00] - [Pre-RHS processing (stage 1 of 5) at t = 6.56e-03 (tn = 1.03e-04 , tcur = 6.56e-03), ||y||_2 = 2.1212571010e+00] - [Post-stage processing (stage 2 of 5) at t = 9.78e-03 (tn = 1.03e-04 , tcur = 9.78e-03), ||y||_2 = 2.1138657565e+00] - [Pre-RHS processing (stage 2 of 5) at t = 9.78e-03 (tn = 1.03e-04 , tcur = 9.78e-03), ||y||_2 = 2.1138657565e+00] - [Post-stage processing (stage 3 of 5) at t = 1.62e-02 (tn = 1.03e-04 , tcur = 1.62e-02), ||y||_2 = 2.1111621630e+00] - [Pre-RHS processing (stage 3 of 5) at t = 1.62e-02 (tn = 1.03e-04 , tcur = 1.62e-02), ||y||_2 = 2.1111621630e+00] - [Post-stage processing (stage 4 of 5) at t = 1.62e-02 (tn = 1.03e-04 , tcur = 1.62e-02), ||y||_2 = 2.1089486502e+00] - [Pre-RHS processing (stage 4 of 5) at t = 1.62e-02 (tn = 1.03e-04 , tcur = 1.62e-02), ||y||_2 = 2.1089486502e+00] - [Post-step failure processing at t = 1.62e-02 (tn = 1.03e-04 , tcur = 1.62e-02),||y||_2 = 2.1089486502e+00] - [Pre-step processing at t = 1.03e-04 (tn = 1.03e-04 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] - [Post-stage processing (stage 1 of 5) at t = 6.49e-03 (tn = 1.03e-04 , tcur = 6.49e-03), ||y||_2 = 2.1212577772e+00] - [Pre-RHS processing (stage 1 of 5) at t = 6.49e-03 (tn = 1.03e-04 , tcur = 6.49e-03), ||y||_2 = 2.1212577772e+00] - [Post-stage processing (stage 2 of 5) at t = 9.68e-03 (tn = 1.03e-04 , tcur = 9.68e-03), ||y||_2 = 2.1140241446e+00] - [Pre-RHS processing (stage 2 of 5) at t = 9.68e-03 (tn = 1.03e-04 , tcur = 9.68e-03), ||y||_2 = 2.1140241446e+00] - [Post-stage processing (stage 3 of 5) at t = 1.61e-02 (tn = 1.03e-04 , tcur = 1.61e-02), ||y||_2 = 2.1113775352e+00] - [Pre-RHS processing (stage 3 of 5) at t = 1.61e-02 (tn = 1.03e-04 , tcur = 1.61e-02), ||y||_2 = 2.1113775352e+00] - [Post-stage processing (stage 4 of 5) at t = 1.61e-02 (tn = 1.03e-04 , tcur = 1.61e-02), ||y||_2 = 2.1092106860e+00] - [Pre-RHS processing (stage 4 of 5) at t = 1.61e-02 (tn = 1.03e-04 , tcur = 1.61e-02), ||y||_2 = 2.1092106860e+00] - [Post-step processing at t = 1.61e-02 (tn = 1.03e-04 , tcur = 1.61e-02),||y||_2 = 2.1092106860e+00] - 1.6063645340e-02 1.2247184913e+00 1.7172170321e+00 4.4212199679e-08 2.9106373090e-08 - [Pre-step processing at t = 1.61e-02 (tn = 1.61e-02 , tcur = 1.61e-02),||y||_2 = 2.1092106860e+00] - [Post-stage processing (stage 1 of 5) at t = 2.24e-02 (tn = 1.61e-02 , tcur = 2.24e-02), ||y||_2 = 2.0996520676e+00] - [Pre-RHS processing (stage 1 of 5) at t = 2.24e-02 (tn = 1.61e-02 , tcur = 2.24e-02), ||y||_2 = 2.0996520676e+00] - [Post-stage processing (stage 2 of 5) at t = 2.56e-02 (tn = 1.61e-02 , tcur = 2.56e-02), ||y||_2 = 2.0880076268e+00] - [Pre-RHS processing (stage 2 of 5) at t = 2.56e-02 (tn = 1.61e-02 , tcur = 2.56e-02), ||y||_2 = 2.0880076268e+00] - [Post-stage processing (stage 3 of 5) at t = 3.20e-02 (tn = 1.61e-02 , tcur = 3.20e-02), ||y||_2 = 2.0760211062e+00] - [Pre-RHS processing (stage 3 of 5) at t = 3.20e-02 (tn = 1.61e-02 , tcur = 3.20e-02), ||y||_2 = 2.0760211062e+00] - [Post-stage processing (stage 4 of 5) at t = 3.20e-02 (tn = 1.61e-02 , tcur = 3.20e-02), ||y||_2 = 2.0740200715e+00] - [Pre-RHS processing (stage 4 of 5) at t = 3.20e-02 (tn = 1.61e-02 , tcur = 3.20e-02), ||y||_2 = 2.0740200715e+00] - [Post-step processing at t = 3.20e-02 (tn = 1.61e-02 , tcur = 3.20e-02),||y||_2 = 2.0740200715e+00] - 3.2023388180e-02 1.2246401240e+00 1.6738625462e+00 8.7464898657e-08 1.4947668547e-07 + [Pre-step at t = 1.03e-04 (tn = 1.03e-04 , tcur = 1.03e-04), step = 1, attempt = 1, ||y||_2 = 2.1213198430e+00] + [Post-stage processing (stage 0 of 5) at t = 6.56e-03 (tn = 1.03e-04 , tcur = 6.56e-03), ||y||_2 = 2.1212571010e+00] + [Pre-RHS (stage 1 of 5) at t = 6.56e-03 (tn = 1.03e-04 , tcur = 6.56e-03), ||y||_2 = 2.1212571010e+00] + [Post-stage processing (stage 1 of 5) at t = 9.78e-03 (tn = 1.03e-04 , tcur = 9.78e-03), ||y||_2 = 2.1138657565e+00] + [Pre-RHS (stage 2 of 5) at t = 9.78e-03 (tn = 1.03e-04 , tcur = 9.78e-03), ||y||_2 = 2.1138657565e+00] + [Post-stage processing (stage 2 of 5) at t = 1.62e-02 (tn = 1.03e-04 , tcur = 1.62e-02), ||y||_2 = 2.1111621630e+00] + [Pre-RHS (stage 3 of 5) at t = 1.62e-02 (tn = 1.03e-04 , tcur = 1.62e-02), ||y||_2 = 2.1111621630e+00] + [Postprocess-step at t = 1.62e-02 (tn = 1.03e-04 , tcur = 1.62e-02),||y||_2 = 2.1089486502e+00] + [Pre-RHS (stage 4 of 5) at t = 1.62e-02 (tn = 1.03e-04 , tcur = 1.62e-02), ||y||_2 = 2.1089486502e+00] + [Pre-step at t = 1.03e-04 (tn = 1.03e-04 , tcur = 1.03e-04), step = 1, attempt = 2, ||y||_2 = 2.1213198430e+00] + [Post-stage processing (stage 0 of 5) at t = 6.49e-03 (tn = 1.03e-04 , tcur = 6.49e-03), ||y||_2 = 2.1212577772e+00] + [Pre-RHS (stage 1 of 5) at t = 6.49e-03 (tn = 1.03e-04 , tcur = 6.49e-03), ||y||_2 = 2.1212577772e+00] + [Post-stage processing (stage 1 of 5) at t = 9.68e-03 (tn = 1.03e-04 , tcur = 9.68e-03), ||y||_2 = 2.1140241446e+00] + [Pre-RHS (stage 2 of 5) at t = 9.68e-03 (tn = 1.03e-04 , tcur = 9.68e-03), ||y||_2 = 2.1140241446e+00] + [Post-stage processing (stage 2 of 5) at t = 1.61e-02 (tn = 1.03e-04 , tcur = 1.61e-02), ||y||_2 = 2.1113775352e+00] + [Pre-RHS (stage 3 of 5) at t = 1.61e-02 (tn = 1.03e-04 , tcur = 1.61e-02), ||y||_2 = 2.1113775352e+00] + [Postprocess-step at t = 1.61e-02 (tn = 1.03e-04 , tcur = 1.61e-02),||y||_2 = 2.1092106860e+00] + [Pre-RHS (stage 4 of 5) at t = 1.61e-02 (tn = 1.03e-04 , tcur = 1.61e-02), ||y||_2 = 2.1092106860e+00] + [Post-step at t = 1.61e-02 (tn = 1.03e-04 , tcur = 1.61e-02), step = 1, ||y||_2 = 2.1092106860e+00] + 1.6063645340e-02 1.2247184913e+00 1.7172170321e+00 4.4212199679e-08 2.9106373312e-08 + [Pre-step at t = 1.61e-02 (tn = 1.61e-02 , tcur = 1.61e-02), step = 2, attempt = 1, ||y||_2 = 2.1092106860e+00] + [Post-stage processing (stage 0 of 5) at t = 2.24e-02 (tn = 1.61e-02 , tcur = 2.24e-02), ||y||_2 = 2.0996520676e+00] + [Pre-RHS (stage 1 of 5) at t = 2.24e-02 (tn = 1.61e-02 , tcur = 2.24e-02), ||y||_2 = 2.0996520676e+00] + [Post-stage processing (stage 1 of 5) at t = 2.56e-02 (tn = 1.61e-02 , tcur = 2.56e-02), ||y||_2 = 2.0880076268e+00] + [Pre-RHS (stage 2 of 5) at t = 2.56e-02 (tn = 1.61e-02 , tcur = 2.56e-02), ||y||_2 = 2.0880076268e+00] + [Post-stage processing (stage 2 of 5) at t = 3.20e-02 (tn = 1.61e-02 , tcur = 3.20e-02), ||y||_2 = 2.0760211062e+00] + [Pre-RHS (stage 3 of 5) at t = 3.20e-02 (tn = 1.61e-02 , tcur = 3.20e-02), ||y||_2 = 2.0760211062e+00] + [Postprocess-step at t = 3.20e-02 (tn = 1.61e-02 , tcur = 3.20e-02),||y||_2 = 2.0740200715e+00] + [Pre-RHS (stage 4 of 5) at t = 3.20e-02 (tn = 1.61e-02 , tcur = 3.20e-02), ||y||_2 = 2.0740200715e+00] + [Post-step at t = 3.20e-02 (tn = 1.61e-02 , tcur = 3.20e-02), step = 2, ||y||_2 = 2.0740200715e+00] + 3.2023388180e-02 1.2246401240e+00 1.6738625462e+00 8.7464898657e-08 1.4947668525e-07 ------------------------------------------------------------------------------------------------------------------------------ Current time = 0.0320233881803733 Steps = 3 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.out index c27dcd9965..46e8738591 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_forcingstep.out @@ -2,14 +2,14 @@ Start ForcingStep StageInfo test t y y err --------------------------------------------------------------------- 0.000000000000000e+00 1.000000000000000e+00 0.000000000000000e+00 - [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 1.0000000000e+00] - [Post-step processing at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03),||y||_2 = 9.9900100033e-01] + [Pre-step at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), step = 0, attempt = 1, ||y||_2 = 1.0000000000e+00] + [Post-step at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), step = 0, ||y||_2 = 9.9900100033e-01] 1.0000000000e-03 9.9900100033e-01 9.9999966707e-07 - [Pre-step processing at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03),||y||_2 = 9.9900100033e-01] - [Post-step processing at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03),||y||_2 = 9.9800200066e-01] + [Pre-step at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), step = 1, attempt = 1, ||y||_2 = 9.9900100033e-01] + [Post-step at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), step = 1, ||y||_2 = 9.9800200066e-01] 2.0000000000e-03 9.9800200066e-01 1.9979980046e-06 - [Pre-step processing at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03),||y||_2 = 9.9800200066e-01] - [Post-step processing at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03),||y||_2 = 9.9700300299e-01] + [Pre-step at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), step = 2, attempt = 1, ||y||_2 = 9.9800200066e-01] + [Post-step at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), step = 2, ||y||_2 = 9.9700300299e-01] 3.0000000000e-03 9.9700300299e-01 2.9939930263e-06 --------------------------------------------------------------------- Current time = 0.003 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_0.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_0.out index de95754b54..c664c7cc22 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_0.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_0.out @@ -3,26 +3,29 @@ Using RKC method t y y err --------------------------------------------------------------------- 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-RHS processing (stage 0 of 0) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] - [Pre-RHS processing (stage 0 of 0) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] - [Pre-RHS processing (stage 0 of 0) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] - [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 0.0000000000e+00] + [Pre-RHS (stage 0 of 0) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] + [Pre-RHS (stage 0 of 0) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] + [Pre-RHS (stage 0 of 0) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] + [Pre-step at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), step = 0, attempt = 1, ||y||_2 = 0.0000000000e+00] [Post-stage processing (stage 0 of 2) at t = 1.47e-12 (tn = 0.00e+00 , tcur = 1.47e-12), ||y||_2 = 1.4693648727e-12] - [Pre-RHS processing (stage 1 of 2) at t = 1.47e-12 (tn = 0.00e+00 , tcur = 1.47e-12), ||y||_2 = 1.4693648727e-12] - [Pre-RHS processing (stage 2 of 2) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] - [Post-step processing at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] + [Pre-RHS (stage 1 of 2) at t = 1.47e-12 (tn = 0.00e+00 , tcur = 1.47e-12), ||y||_2 = 1.4693648727e-12] + [Postprocess-step at t = 1.22e-11 (tn = 0.00e+00 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] + [Pre-RHS (stage 2 of 2) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Post-step at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), step = 0, ||y||_2 = 6.1035156250e-12] 6.1035156250e-12 6.1035156250e-12 1.2116903504e-26 - [Pre-step processing at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] + [Pre-step at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), step = 1, attempt = 1, ||y||_2 = 6.1035156250e-12] [Post-stage processing (stage 0 of 2) at t = 1.47e-08 (tn = 6.10e-12 , tcur = 1.47e-08), ||y||_2 = 1.4699752242e-08] - [Pre-RHS processing (stage 1 of 2) at t = 1.47e-08 (tn = 6.10e-12 , tcur = 1.47e-08), ||y||_2 = 1.4699752242e-08] - [Pre-RHS processing (stage 2 of 2) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] - [Post-step processing at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] - 6.1041259766e-08 6.1041259766e-08 5.2939559203e-22 - [Pre-step processing at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] + [Pre-RHS (stage 1 of 2) at t = 1.47e-08 (tn = 6.10e-12 , tcur = 1.47e-08), ||y||_2 = 1.4699752242e-08] + [Postprocess-step at t = 1.22e-07 (tn = 6.10e-12 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] + [Pre-RHS (stage 2 of 2) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Post-step at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), step = 1, ||y||_2 = 6.1041259766e-08] + 6.1041259766e-08 6.1041259766e-08 5.2939559203e-23 + [Pre-step at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), step = 2, attempt = 1, ||y||_2 = 6.1041259766e-08] [Post-stage processing (stage 0 of 2) at t = 3.55e-07 (tn = 6.10e-08 , tcur = 3.55e-07), ||y||_2 = 3.5491423430e-07] - [Pre-RHS processing (stage 1 of 2) at t = 3.55e-07 (tn = 6.10e-08 , tcur = 3.55e-07), ||y||_2 = 3.5491423430e-07] - [Pre-RHS processing (stage 2 of 2) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] - [Post-step processing at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06),||y||_2 = 1.2817443848e-06] + [Pre-RHS (stage 1 of 2) at t = 3.55e-07 (tn = 6.10e-08 , tcur = 3.55e-07), ||y||_2 = 3.5491423430e-07] + [Postprocess-step at t = 2.50e-06 (tn = 6.10e-08 , tcur = 1.28e-06),||y||_2 = 1.2817443848e-06] + [Pre-RHS (stage 2 of 2) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Post-step at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), step = 2, ||y||_2 = 1.2817443848e-06] 1.2817443848e-06 1.2817443848e-06 3.8518823276e-19 --------------------------------------------------------------------- Current time = 1.28174438476563e-06 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_1.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_1.out index 851b298a95..9874a7359c 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_1.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_1.out @@ -3,26 +3,29 @@ Using RKL method t y y err --------------------------------------------------------------------- 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-RHS processing (stage 0 of 0) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] - [Pre-RHS processing (stage 0 of 0) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] - [Pre-RHS processing (stage 0 of 0) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] - [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 0.0000000000e+00] + [Pre-RHS (stage 0 of 0) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] + [Pre-RHS (stage 0 of 0) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] + [Pre-RHS (stage 0 of 0) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] + [Pre-step at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), step = 0, attempt = 1, ||y||_2 = 0.0000000000e+00] [Post-stage processing (stage 0 of 2) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] - [Pre-RHS processing (stage 1 of 2) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] - [Pre-RHS processing (stage 2 of 2) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] - [Post-step processing at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] + [Pre-RHS (stage 1 of 2) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] + [Postprocess-step at t = 1.22e-11 (tn = 0.00e+00 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] + [Pre-RHS (stage 2 of 2) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Post-step at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), step = 0, ||y||_2 = 6.1035156250e-12] 6.1035156250e-12 6.1035156250e-12 0.0000000000e+00 - [Pre-step processing at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] + [Pre-step at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), step = 1, attempt = 1, ||y||_2 = 6.1035156250e-12] [Post-stage processing (stage 0 of 2) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] - [Pre-RHS processing (stage 1 of 2) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] - [Pre-RHS processing (stage 2 of 2) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] - [Post-step processing at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] + [Pre-RHS (stage 1 of 2) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] + [Postprocess-step at t = 1.22e-07 (tn = 6.10e-12 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] + [Pre-RHS (stage 2 of 2) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Post-step at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), step = 1, ||y||_2 = 6.1041259766e-08] 6.1041259766e-08 6.1041259766e-08 3.9704669403e-23 - [Pre-step processing at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] + [Pre-step at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), step = 2, attempt = 1, ||y||_2 = 6.1041259766e-08] [Post-stage processing (stage 0 of 2) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] - [Pre-RHS processing (stage 1 of 2) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] - [Pre-RHS processing (stage 2 of 2) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] - [Post-step processing at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06),||y||_2 = 1.2817443848e-06] + [Pre-RHS (stage 1 of 2) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] + [Postprocess-step at t = 2.50e-06 (tn = 6.10e-08 , tcur = 1.28e-06),||y||_2 = 1.2817443848e-06] + [Pre-RHS (stage 2 of 2) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Post-step at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), step = 2, ||y||_2 = 1.2817443848e-06] 1.2817443848e-06 1.2817443848e-06 3.0323779512e-19 --------------------------------------------------------------------- Current time = 1.28174438476563e-06 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_2.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_2.out index 97f718113c..5b7eb5e241 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_2.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_2.out @@ -3,26 +3,29 @@ Using SSP(s,2) method t y y err --------------------------------------------------------------------- 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-RHS processing (stage 0 of 2) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] - [Pre-RHS processing (stage 0 of 2) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] - [Pre-RHS processing (stage 0 of 2) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] - [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 0.0000000000e+00] + [Pre-RHS (stage 0 of 2) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] + [Pre-RHS (stage 0 of 2) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] + [Pre-RHS (stage 0 of 2) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] + [Pre-step at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), step = 0, attempt = 1, ||y||_2 = 0.0000000000e+00] [Post-stage processing (stage 0 of 2) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] - [Pre-RHS processing (stage 1 of 2) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] - [Post-step processing at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] + [Pre-RHS (stage 1 of 2) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Postprocess-step at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] + [Post-step at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), step = 0, ||y||_2 = 6.1035156250e-12] 6.1035156250e-12 6.1035156250e-12 0.0000000000e+00 - [Pre-step processing at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] - [Pre-RHS processing (stage 0 of 2) at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Pre-step at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), step = 1, attempt = 1, ||y||_2 = 6.1035156250e-12] + [Pre-RHS (stage 0 of 2) at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] [Post-stage processing (stage 0 of 2) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] - [Pre-RHS processing (stage 1 of 2) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] - [Post-step processing at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] + [Pre-RHS (stage 1 of 2) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Postprocess-step at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] + [Post-step at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), step = 1, ||y||_2 = 6.1041259766e-08] 6.1041259766e-08 6.1041259766e-08 3.9704669403e-23 - [Pre-step processing at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] - [Pre-RHS processing (stage 0 of 2) at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Pre-step at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), step = 2, attempt = 1, ||y||_2 = 6.1041259766e-08] + [Pre-RHS (stage 0 of 2) at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] [Post-stage processing (stage 0 of 2) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] - [Pre-RHS processing (stage 1 of 2) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] - [Post-step processing at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06),||y||_2 = 1.2817443848e-06] - 1.2817443848e-06 1.2817443848e-06 3.0366131159e-19 + [Pre-RHS (stage 1 of 2) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Postprocess-step at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06),||y||_2 = 1.2817443848e-06] + [Post-step at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), step = 2, ||y||_2 = 1.2817443848e-06] + 1.2817443848e-06 1.2817443848e-06 3.0387306983e-19 --------------------------------------------------------------------- Current time = 1.28174438476563e-06 Steps = 3 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_3.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_3.out index 37f0e8cb88..95a545b21a 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_3.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_3.out @@ -1,48 +1,45 @@ Start LSRKStep StageInfo test -Using SSP(s,3) method +Using SSP(9,3) method t y y err --------------------------------------------------------------------- 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-RHS processing (stage 0 of 4) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] - [Pre-RHS processing (stage 0 of 4) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] - [Pre-RHS processing (stage 0 of 4) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] - [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 0.0000000000e+00] + [Pre-RHS (stage 0 of 4) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] + [Pre-RHS (stage 0 of 4) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] + [Pre-RHS (stage 0 of 4) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] + [Pre-step at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), step = 0, attempt = 1, ||y||_2 = 0.0000000000e+00] [Post-stage processing (stage 0 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] - [Pre-RHS processing (stage 0 of 4) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 3.0517578125e-12] - [Post-stage processing (stage 0 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 6.1035156158e-12] - [Pre-RHS processing (stage 1 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 6.1035156158e-12] - [Post-stage processing (stage 1 of 4) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 9.1552734191e-12] - [Pre-RHS processing (stage 2 of 4) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 9.1552734191e-12] - [Post-stage processing (stage 2 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 6.1035156158e-12] - [Pre-RHS processing (stage 3 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 6.1035156158e-12] - [Post-step processing at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12),||y||_2 = 9.1552734191e-12] - 6.1035156250e-12 9.1552734191e-12 3.0517577941e-12 - [Pre-step processing at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12),||y||_2 = 9.1552734191e-12] - [Pre-RHS processing (stage 0 of 4) at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), ||y||_2 = 9.1552734191e-12] - [Post-stage processing (stage 0 of 4) at t = 1.72e-11 (tn = 6.10e-12 , tcur = 1.72e-11), ||y||_2 = 2.0228798238e-11] - [Pre-RHS processing (stage 0 of 4) at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), ||y||_2 = 2.0228798238e-11] - [Post-stage processing (stage 0 of 4) at t = 1.72e-11 (tn = 6.10e-12 , tcur = 1.72e-11), ||y||_2 = 3.1302322936e-11] - [Pre-RHS processing (stage 1 of 4) at t = 1.72e-11 (tn = 6.10e-12 , tcur = 1.72e-11), ||y||_2 = 3.1302322936e-11] - [Post-stage processing (stage 1 of 4) at t = 2.83e-11 (tn = 6.10e-12 , tcur = 2.83e-11), ||y||_2 = 4.2375847634e-11] - [Pre-RHS processing (stage 2 of 4) at t = 2.83e-11 (tn = 6.10e-12 , tcur = 2.83e-11), ||y||_2 = 4.2375847634e-11] - [Post-stage processing (stage 2 of 4) at t = 1.72e-11 (tn = 6.10e-12 , tcur = 1.72e-11), ||y||_2 = 3.1302322936e-11] - [Pre-RHS processing (stage 3 of 4) at t = 1.72e-11 (tn = 6.10e-12 , tcur = 1.72e-11), ||y||_2 = 3.1302322936e-11] - [Post-step processing at t = 2.83e-11 (tn = 6.10e-12 , tcur = 2.83e-11),||y||_2 = 4.2375847634e-11] - 2.8250565330e-11 4.2375847634e-11 1.4125282303e-11 - [Pre-step processing at t = 2.83e-11 (tn = 2.83e-11 , tcur = 2.83e-11),||y||_2 = 4.2375847634e-11] - [Pre-RHS processing (stage 0 of 4) at t = 2.83e-11 (tn = 2.83e-11 , tcur = 2.83e-11), ||y||_2 = 4.2375847634e-11] - [Post-stage processing (stage 0 of 4) at t = 5.44e-11 (tn = 2.83e-11 , tcur = 5.44e-11), ||y||_2 = 6.8524126345e-11] - [Pre-RHS processing (stage 0 of 4) at t = 2.83e-11 (tn = 2.83e-11 , tcur = 2.83e-11), ||y||_2 = 6.8524126345e-11] - [Post-stage processing (stage 0 of 4) at t = 5.44e-11 (tn = 2.83e-11 , tcur = 5.44e-11), ||y||_2 = 9.4672404379e-11] - [Pre-RHS processing (stage 1 of 4) at t = 5.44e-11 (tn = 2.83e-11 , tcur = 5.44e-11), ||y||_2 = 9.4672404379e-11] - [Post-stage processing (stage 1 of 4) at t = 8.05e-11 (tn = 2.83e-11 , tcur = 8.05e-11), ||y||_2 = 1.2082068241e-10] - [Pre-RHS processing (stage 2 of 4) at t = 8.05e-11 (tn = 2.83e-11 , tcur = 8.05e-11), ||y||_2 = 1.2082068241e-10] - [Post-stage processing (stage 2 of 4) at t = 5.44e-11 (tn = 2.83e-11 , tcur = 5.44e-11), ||y||_2 = 9.4672404379e-11] - [Pre-RHS processing (stage 3 of 4) at t = 5.44e-11 (tn = 2.83e-11 , tcur = 5.44e-11), ||y||_2 = 9.4672404379e-11] - [Post-step processing at t = 8.05e-11 (tn = 2.83e-11 , tcur = 8.05e-11),||y||_2 = 1.2082068241e-10] - 8.0547123483e-11 1.2082068241e-10 4.0273558929e-11 + [Pre-RHS (stage 1 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Post-stage processing (stage 1 of 4) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Pre-RHS (stage 2 of 4) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Post-stage processing (stage 2 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Pre-RHS (stage 3 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Post-stage processing (stage 3 of 4) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Post-step at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), step = 0, ||y||_2 = 6.1035156250e-12] + 6.1035156250e-12 6.1035156250e-12 8.0779356695e-28 + [Pre-step at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), step = 1, attempt = 1, ||y||_2 = 6.1035156250e-12] + [Pre-RHS (stage 0 of 4) at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Post-stage processing (stage 0 of 4) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Pre-RHS (stage 1 of 4) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Post-stage processing (stage 1 of 4) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Pre-RHS (stage 2 of 4) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Post-stage processing (stage 2 of 4) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Pre-RHS (stage 3 of 4) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Post-stage processing (stage 3 of 4) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Post-step at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), step = 1, ||y||_2 = 6.1041259766e-08] + 6.1041259766e-08 6.1041259766e-08 0.0000000000e+00 + [Pre-step at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), step = 2, attempt = 1, ||y||_2 = 6.1041259766e-08] + [Pre-RHS (stage 0 of 4) at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Post-stage processing (stage 0 of 4) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Pre-RHS (stage 1 of 4) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Post-stage processing (stage 1 of 4) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Pre-RHS (stage 2 of 4) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Post-stage processing (stage 2 of 4) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Pre-RHS (stage 3 of 4) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Post-stage processing (stage 3 of 4) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Post-step at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), step = 2, ||y||_2 = 1.2817443848e-06] + 1.2817443848e-06 1.2817443848e-06 2.1175823681e-22 --------------------------------------------------------------------- -Current time = 8.05471234832829e-11 +Current time = 1.28174438476563e-06 Steps = 3 Step attempts = 3 Stability limited steps = 0 @@ -51,8 +48,8 @@ Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 Initial step size = 6.103515625e-12 -Last step size = 5.22965581530996e-11 -Current step size = 9.27352060660382e-11 -RHS fn evals = 17 +Last step size = 1.220703125e-06 +Current step size = 2.44140625e-05 +RHS fn evals = 14 Number of stages used = 4 End LSRKStep StageInfo test diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_4.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_4.out index e802bfd349..128df59791 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_4.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_4.out @@ -3,37 +3,40 @@ Using SSP(4,3) method t y y err --------------------------------------------------------------------- 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-RHS processing (stage 0 of 4) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] - [Pre-RHS processing (stage 0 of 4) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] - [Pre-RHS processing (stage 0 of 4) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] - [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 0.0000000000e+00] + [Pre-RHS (stage 0 of 4) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] + [Pre-RHS (stage 0 of 4) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] + [Pre-RHS (stage 0 of 4) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] + [Pre-step at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), step = 0, attempt = 1, ||y||_2 = 0.0000000000e+00] [Post-stage processing (stage 0 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] - [Pre-RHS processing (stage 1 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Pre-RHS (stage 1 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] [Post-stage processing (stage 1 of 4) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] - [Pre-RHS processing (stage 2 of 4) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Pre-RHS (stage 2 of 4) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] [Post-stage processing (stage 2 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] - [Pre-RHS processing (stage 3 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] - [Post-step processing at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] + [Pre-RHS (stage 3 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Post-stage processing (stage 3 of 4) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Post-step at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), step = 0, ||y||_2 = 6.1035156250e-12] 6.1035156250e-12 6.1035156250e-12 8.0779356695e-28 - [Pre-step processing at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] - [Pre-RHS processing (stage 0 of 4) at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Pre-step at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), step = 1, attempt = 1, ||y||_2 = 6.1035156250e-12] + [Pre-RHS (stage 0 of 4) at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] [Post-stage processing (stage 0 of 4) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] - [Pre-RHS processing (stage 1 of 4) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Pre-RHS (stage 1 of 4) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] [Post-stage processing (stage 1 of 4) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] - [Pre-RHS processing (stage 2 of 4) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Pre-RHS (stage 2 of 4) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] [Post-stage processing (stage 2 of 4) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] - [Pre-RHS processing (stage 3 of 4) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] - [Post-step processing at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] + [Pre-RHS (stage 3 of 4) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Post-stage processing (stage 3 of 4) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Post-step at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), step = 1, ||y||_2 = 6.1041259766e-08] 6.1041259766e-08 6.1041259766e-08 0.0000000000e+00 - [Pre-step processing at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] - [Pre-RHS processing (stage 0 of 4) at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Pre-step at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), step = 2, attempt = 1, ||y||_2 = 6.1041259766e-08] + [Pre-RHS (stage 0 of 4) at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] [Post-stage processing (stage 0 of 4) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] - [Pre-RHS processing (stage 1 of 4) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Pre-RHS (stage 1 of 4) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] [Post-stage processing (stage 1 of 4) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] - [Pre-RHS processing (stage 2 of 4) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Pre-RHS (stage 2 of 4) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] [Post-stage processing (stage 2 of 4) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] - [Pre-RHS processing (stage 3 of 4) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] - [Post-step processing at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06),||y||_2 = 1.2817443848e-06] + [Pre-RHS (stage 3 of 4) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Post-stage processing (stage 3 of 4) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Post-step at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), step = 2, ||y||_2 = 1.2817443848e-06] 1.2817443848e-06 1.2817443848e-06 2.1175823681e-22 --------------------------------------------------------------------- Current time = 1.28174438476563e-06 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_5.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_5.out index 7239080362..9436550f58 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_5.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_5.out @@ -3,76 +3,76 @@ Using SSP(10,4) method t y y err --------------------------------------------------------------------- 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-RHS processing (stage 0 of 10) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] - [Pre-RHS processing (stage 0 of 10) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] - [Pre-RHS processing (stage 0 of 10) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] - [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 0.0000000000e+00] + [Pre-RHS (stage 0 of 10) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] + [Pre-RHS (stage 0 of 10) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] + [Pre-RHS (stage 0 of 10) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] + [Pre-step at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), step = 0, attempt = 1, ||y||_2 = 0.0000000000e+00] [Post-stage processing (stage 0 of 10) at t = 1.02e-12 (tn = 0.00e+00 , tcur = 1.02e-12), ||y||_2 = 1.0172526042e-12] - [Pre-RHS processing (stage 1 of 10) at t = 1.02e-12 (tn = 0.00e+00 , tcur = 1.02e-12), ||y||_2 = 1.0172526042e-12] + [Pre-RHS (stage 1 of 10) at t = 1.02e-12 (tn = 0.00e+00 , tcur = 1.02e-12), ||y||_2 = 1.0172526042e-12] [Post-stage processing (stage 1 of 10) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] - [Pre-RHS processing (stage 2 of 10) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] + [Pre-RHS (stage 2 of 10) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] [Post-stage processing (stage 2 of 10) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] - [Pre-RHS processing (stage 3 of 10) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Pre-RHS (stage 3 of 10) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] [Post-stage processing (stage 3 of 10) at t = 4.07e-12 (tn = 0.00e+00 , tcur = 4.07e-12), ||y||_2 = 4.0690104167e-12] - [Pre-RHS processing (stage 4 of 10) at t = 4.07e-12 (tn = 0.00e+00 , tcur = 4.07e-12), ||y||_2 = 4.0690104167e-12] - [Post-stage processing (stage 4 of 10) at t = 5.09e-12 (tn = 0.00e+00 , tcur = 5.09e-12), ||y||_2 = 5.0862630208e-12] + [Pre-RHS (stage 4 of 10) at t = 4.07e-12 (tn = 0.00e+00 , tcur = 4.07e-12), ||y||_2 = 4.0690104167e-12] [Post-stage processing (stage 4 of 10) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] - [Pre-RHS processing (stage 5 of 10) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] + [Pre-RHS (stage 5 of 10) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] [Post-stage processing (stage 5 of 10) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] - [Pre-RHS processing (stage 6 of 10) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Pre-RHS (stage 6 of 10) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] [Post-stage processing (stage 6 of 10) at t = 4.07e-12 (tn = 0.00e+00 , tcur = 4.07e-12), ||y||_2 = 4.0690104167e-12] - [Pre-RHS processing (stage 7 of 10) at t = 4.07e-12 (tn = 0.00e+00 , tcur = 4.07e-12), ||y||_2 = 4.0690104167e-12] + [Pre-RHS (stage 7 of 10) at t = 4.07e-12 (tn = 0.00e+00 , tcur = 4.07e-12), ||y||_2 = 4.0690104167e-12] [Post-stage processing (stage 7 of 10) at t = 5.09e-12 (tn = 0.00e+00 , tcur = 5.09e-12), ||y||_2 = 5.0862630208e-12] - [Pre-RHS processing (stage 8 of 10) at t = 5.09e-12 (tn = 0.00e+00 , tcur = 5.09e-12), ||y||_2 = 5.0862630208e-12] + [Pre-RHS (stage 8 of 10) at t = 5.09e-12 (tn = 0.00e+00 , tcur = 5.09e-12), ||y||_2 = 5.0862630208e-12] [Post-stage processing (stage 8 of 10) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] - [Pre-RHS processing (stage 9 of 10) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] - [Post-step processing at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] + [Pre-RHS (stage 9 of 10) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Post-stage processing (stage 9 of 10) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Post-step at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), step = 0, ||y||_2 = 6.1035156250e-12] 6.1035156250e-12 6.1035156250e-12 8.0779356695e-28 - [Pre-step processing at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] - [Pre-RHS processing (stage 0 of 10) at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Pre-step at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), step = 1, attempt = 1, ||y||_2 = 6.1035156250e-12] + [Pre-RHS (stage 0 of 10) at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] [Post-stage processing (stage 0 of 10) at t = 1.02e-08 (tn = 6.10e-12 , tcur = 1.02e-08), ||y||_2 = 1.0178629557e-08] - [Pre-RHS processing (stage 1 of 10) at t = 1.02e-08 (tn = 6.10e-12 , tcur = 1.02e-08), ||y||_2 = 1.0178629557e-08] + [Pre-RHS (stage 1 of 10) at t = 1.02e-08 (tn = 6.10e-12 , tcur = 1.02e-08), ||y||_2 = 1.0178629557e-08] [Post-stage processing (stage 1 of 10) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] - [Pre-RHS processing (stage 2 of 10) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] + [Pre-RHS (stage 2 of 10) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] [Post-stage processing (stage 2 of 10) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] - [Pre-RHS processing (stage 3 of 10) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Pre-RHS (stage 3 of 10) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] [Post-stage processing (stage 3 of 10) at t = 4.07e-08 (tn = 6.10e-12 , tcur = 4.07e-08), ||y||_2 = 4.0696207682e-08] - [Pre-RHS processing (stage 4 of 10) at t = 4.07e-08 (tn = 6.10e-12 , tcur = 4.07e-08), ||y||_2 = 4.0696207682e-08] - [Post-stage processing (stage 4 of 10) at t = 5.09e-08 (tn = 6.10e-12 , tcur = 5.09e-08), ||y||_2 = 5.0868733724e-08] + [Pre-RHS (stage 4 of 10) at t = 4.07e-08 (tn = 6.10e-12 , tcur = 4.07e-08), ||y||_2 = 4.0696207682e-08] [Post-stage processing (stage 4 of 10) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] - [Pre-RHS processing (stage 5 of 10) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] + [Pre-RHS (stage 5 of 10) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] [Post-stage processing (stage 5 of 10) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] - [Pre-RHS processing (stage 6 of 10) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Pre-RHS (stage 6 of 10) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] [Post-stage processing (stage 6 of 10) at t = 4.07e-08 (tn = 6.10e-12 , tcur = 4.07e-08), ||y||_2 = 4.0696207682e-08] - [Pre-RHS processing (stage 7 of 10) at t = 4.07e-08 (tn = 6.10e-12 , tcur = 4.07e-08), ||y||_2 = 4.0696207682e-08] + [Pre-RHS (stage 7 of 10) at t = 4.07e-08 (tn = 6.10e-12 , tcur = 4.07e-08), ||y||_2 = 4.0696207682e-08] [Post-stage processing (stage 7 of 10) at t = 5.09e-08 (tn = 6.10e-12 , tcur = 5.09e-08), ||y||_2 = 5.0868733724e-08] - [Pre-RHS processing (stage 8 of 10) at t = 5.09e-08 (tn = 6.10e-12 , tcur = 5.09e-08), ||y||_2 = 5.0868733724e-08] + [Pre-RHS (stage 8 of 10) at t = 5.09e-08 (tn = 6.10e-12 , tcur = 5.09e-08), ||y||_2 = 5.0868733724e-08] [Post-stage processing (stage 8 of 10) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] - [Pre-RHS processing (stage 9 of 10) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] - [Post-step processing at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] + [Pre-RHS (stage 9 of 10) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Post-stage processing (stage 9 of 10) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Post-step at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), step = 1, ||y||_2 = 6.1041259766e-08] 6.1041259766e-08 6.1041259766e-08 0.0000000000e+00 - [Pre-step processing at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] - [Pre-RHS processing (stage 0 of 10) at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Pre-step at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), step = 2, attempt = 1, ||y||_2 = 6.1041259766e-08] + [Pre-RHS (stage 0 of 10) at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] [Post-stage processing (stage 0 of 10) at t = 2.64e-07 (tn = 6.10e-08 , tcur = 2.64e-07), ||y||_2 = 2.6449178060e-07] - [Pre-RHS processing (stage 1 of 10) at t = 2.64e-07 (tn = 6.10e-08 , tcur = 2.64e-07), ||y||_2 = 2.6449178060e-07] + [Pre-RHS (stage 1 of 10) at t = 2.64e-07 (tn = 6.10e-08 , tcur = 2.64e-07), ||y||_2 = 2.6449178060e-07] [Post-stage processing (stage 1 of 10) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] - [Pre-RHS processing (stage 2 of 10) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] + [Pre-RHS (stage 2 of 10) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] [Post-stage processing (stage 2 of 10) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] - [Pre-RHS processing (stage 3 of 10) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Pre-RHS (stage 3 of 10) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] [Post-stage processing (stage 3 of 10) at t = 8.75e-07 (tn = 6.10e-08 , tcur = 8.75e-07), ||y||_2 = 8.7484334310e-07] - [Pre-RHS processing (stage 4 of 10) at t = 8.75e-07 (tn = 6.10e-08 , tcur = 8.75e-07), ||y||_2 = 8.7484334310e-07] - [Post-stage processing (stage 4 of 10) at t = 1.08e-06 (tn = 6.10e-08 , tcur = 1.08e-06), ||y||_2 = 1.0782938639e-06] + [Pre-RHS (stage 4 of 10) at t = 8.75e-07 (tn = 6.10e-08 , tcur = 8.75e-07), ||y||_2 = 8.7484334310e-07] [Post-stage processing (stage 4 of 10) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] - [Pre-RHS processing (stage 5 of 10) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] + [Pre-RHS (stage 5 of 10) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] [Post-stage processing (stage 5 of 10) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] - [Pre-RHS processing (stage 6 of 10) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Pre-RHS (stage 6 of 10) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] [Post-stage processing (stage 6 of 10) at t = 8.75e-07 (tn = 6.10e-08 , tcur = 8.75e-07), ||y||_2 = 8.7484334310e-07] - [Pre-RHS processing (stage 7 of 10) at t = 8.75e-07 (tn = 6.10e-08 , tcur = 8.75e-07), ||y||_2 = 8.7484334310e-07] + [Pre-RHS (stage 7 of 10) at t = 8.75e-07 (tn = 6.10e-08 , tcur = 8.75e-07), ||y||_2 = 8.7484334310e-07] [Post-stage processing (stage 7 of 10) at t = 1.08e-06 (tn = 6.10e-08 , tcur = 1.08e-06), ||y||_2 = 1.0782938639e-06] - [Pre-RHS processing (stage 8 of 10) at t = 1.08e-06 (tn = 6.10e-08 , tcur = 1.08e-06), ||y||_2 = 1.0782938639e-06] + [Pre-RHS (stage 8 of 10) at t = 1.08e-06 (tn = 6.10e-08 , tcur = 1.08e-06), ||y||_2 = 1.0782938639e-06] [Post-stage processing (stage 8 of 10) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] - [Pre-RHS processing (stage 9 of 10) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] - [Post-step processing at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06),||y||_2 = 1.2817443848e-06] + [Pre-RHS (stage 9 of 10) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Post-stage processing (stage 9 of 10) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Post-step at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), step = 2, ||y||_2 = 1.2817443848e-06] 1.2817443848e-06 1.2817443848e-06 8.4703294725e-22 --------------------------------------------------------------------- Current time = 1.28174438476563e-06 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_0.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_0.out index d9e0a94bac..1a8dba4f46 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_0.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_0.out @@ -3,32 +3,32 @@ Using Ex-MRI-GARK method t u v u err v err ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 0 of 4) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] - [Post-stage processing (stage 1 of 4) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213151057e+00] - [Pre-RHS processing (stage 1 of 4) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213151057e+00] - [Post-stage processing (stage 2 of 4) at t = 7.50e-04 (tn = 0.00e+00 , tcur = 7.50e-04), ||y||_2 = 2.1212937905e+00] - [Pre-RHS processing (stage 2 of 4) at t = 7.50e-04 (tn = 0.00e+00 , tcur = 7.50e-04), ||y||_2 = 2.1212937905e+00] - [Post-stage processing (stage 3 of 4) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] - [Post-step processing at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] + [Pre-step at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), step = 0, attempt = 1, ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 0 of 4) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Post-stage processing (stage 0 of 4) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213151057e+00] + [Pre-RHS (stage 1 of 4) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213151057e+00] + [Post-stage processing (stage 1 of 4) at t = 7.50e-04 (tn = 0.00e+00 , tcur = 7.50e-04), ||y||_2 = 2.1212937905e+00] + [Pre-RHS (stage 2 of 4) at t = 7.50e-04 (tn = 0.00e+00 , tcur = 7.50e-04), ||y||_2 = 2.1212937905e+00] + [Postprocess-step at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] + [Post-step at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), step = 0, ||y||_2 = 2.1212731452e+00] 1.0000000000e-03 1.2247447693e+00 1.7319930735e+00 2.2426505097e-14 1.9984014443e-15 - [Pre-step processing at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] - [Pre-RHS processing (stage 0 of 4) at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] - [Post-stage processing (stage 1 of 4) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212364434e+00] - [Pre-RHS processing (stage 1 of 4) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212364434e+00] - [Post-stage processing (stage 2 of 4) at t = 1.75e-03 (tn = 1.00e-03 , tcur = 1.75e-03), ||y||_2 = 2.1211758016e+00] - [Pre-RHS processing (stage 2 of 4) at t = 1.75e-03 (tn = 1.00e-03 , tcur = 1.75e-03), ||y||_2 = 2.1211758016e+00] - [Post-stage processing (stage 3 of 4) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] - [Post-step processing at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] + [Pre-step at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), step = 1, attempt = 1, ||y||_2 = 2.1212731452e+00] + [Pre-RHS (stage 0 of 4) at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] + [Post-stage processing (stage 0 of 4) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212364434e+00] + [Pre-RHS (stage 1 of 4) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212364434e+00] + [Post-stage processing (stage 1 of 4) at t = 1.75e-03 (tn = 1.00e-03 , tcur = 1.75e-03), ||y||_2 = 2.1211758016e+00] + [Pre-RHS (stage 2 of 4) at t = 1.75e-03 (tn = 1.00e-03 , tcur = 1.75e-03), ||y||_2 = 2.1211758016e+00] + [Postprocess-step at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] + [Post-step at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), step = 1, ||y||_2 = 2.1211315628e+00] 2.0000000000e-03 1.2247444631e+00 1.7318198829e+00 4.4853010195e-14 3.7747582837e-15 - [Pre-step processing at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] - [Pre-RHS processing (stage 0 of 4) at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] - [Post-stage processing (stage 1 of 4) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1210634067e+00] - [Pre-RHS processing (stage 1 of 4) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1210634067e+00] - [Post-stage processing (stage 2 of 4) at t = 2.75e-03 (tn = 2.00e-03 , tcur = 2.75e-03), ||y||_2 = 2.1209634544e+00] - [Pre-RHS processing (stage 2 of 4) at t = 2.75e-03 (tn = 2.00e-03 , tcur = 2.75e-03), ||y||_2 = 2.1209634544e+00] - [Post-stage processing (stage 3 of 4) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956339e+00] - [Post-step processing at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03),||y||_2 = 2.1208956339e+00] + [Pre-step at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), step = 2, attempt = 1, ||y||_2 = 2.1211315628e+00] + [Pre-RHS (stage 0 of 4) at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] + [Post-stage processing (stage 0 of 4) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1210634067e+00] + [Pre-RHS (stage 1 of 4) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1210634067e+00] + [Post-stage processing (stage 1 of 4) at t = 2.75e-03 (tn = 2.00e-03 , tcur = 2.75e-03), ||y||_2 = 2.1209634544e+00] + [Pre-RHS (stage 2 of 4) at t = 2.75e-03 (tn = 2.00e-03 , tcur = 2.75e-03), ||y||_2 = 2.1209634544e+00] + [Postprocess-step at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03),||y||_2 = 2.1208956339e+00] + [Post-step at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), step = 2, ||y||_2 = 2.1208956339e+00] 3.0000000000e-03 1.2247439528e+00 1.7315312703e+00 6.7279515292e-14 5.3290705182e-15 ------------------------------------------------------------------------------------------------------------------------------ Current time = 0.003 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_1.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_1.out index 80768d9871..c744a9ffdd 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_1.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_1.out @@ -5,77 +5,77 @@ Using GMRES iterative linear solver t u v u err v err ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 0 of 8) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] - [Post-stage processing (stage 1 of 8) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213151057e+00] - [Pre-RHS processing (stage 2 of 8) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 2 of 8) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213183373e+00] - [Pre-RHS processing (stage 2 of 8) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213213312e+00] - [Pre-RHS processing (stage 2 of 8) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213150886e+00] + [Pre-step at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), step = 0, attempt = 1, ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 0 of 8) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Post-stage processing (stage 0 of 8) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213151057e+00] + [Pre-RHS (stage 2 of 8) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 2 of 8) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213183373e+00] + [Pre-RHS (stage 2 of 8) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213213312e+00] + [Pre-RHS (stage 2 of 8) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213150886e+00] [Post-stage processing (stage 2 of 8) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213150886e+00] - [Pre-RHS processing (stage 2 of 8) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213150886e+00] - [Post-stage processing (stage 3 of 8) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1212993503e+00] - [Pre-RHS processing (stage 4 of 8) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 4 of 8) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1213183389e+00] - [Pre-RHS processing (stage 4 of 8) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1213213345e+00] - [Pre-RHS processing (stage 4 of 8) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1212993415e+00] + [Pre-RHS (stage 2 of 8) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213150886e+00] + [Post-stage processing (stage 2 of 8) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1212993503e+00] + [Pre-RHS (stage 4 of 8) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 4 of 8) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1213183389e+00] + [Pre-RHS (stage 4 of 8) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1213213345e+00] + [Pre-RHS (stage 4 of 8) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1212993415e+00] [Post-stage processing (stage 4 of 8) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1212993415e+00] - [Pre-RHS processing (stage 4 of 8) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1212993415e+00] - [Post-stage processing (stage 5 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731966e+00] - [Pre-RHS processing (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213183413e+00] - [Pre-RHS processing (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213213393e+00] - [Pre-RHS processing (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS (stage 4 of 8) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1212993415e+00] + [Post-stage processing (stage 4 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731966e+00] + [Pre-RHS (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213183413e+00] + [Pre-RHS (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213213393e+00] + [Pre-RHS (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] [Post-stage processing (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] - [Post-step processing at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] + [Post-step at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), step = 0, ||y||_2 = 2.1212731452e+00] 1.0000000000e-03 1.2247447693e+00 1.7319930735e+00 2.6090241079e-13 1.1546319456e-14 - [Pre-step processing at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] - [Pre-RHS processing (stage 0 of 8) at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] - [Post-stage processing (stage 1 of 8) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212364434e+00] - [Pre-RHS processing (stage 2 of 8) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212731452e+00] - [Pre-RHS processing (stage 2 of 8) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212711424e+00] - [Pre-RHS processing (stage 2 of 8) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212741398e+00] - [Pre-RHS processing (stage 2 of 8) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212364263e+00] + [Pre-step at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), step = 1, attempt = 1, ||y||_2 = 2.1212731452e+00] + [Pre-RHS (stage 0 of 8) at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] + [Post-stage processing (stage 0 of 8) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212364434e+00] + [Pre-RHS (stage 2 of 8) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS (stage 2 of 8) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212711424e+00] + [Pre-RHS (stage 2 of 8) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212741398e+00] + [Pre-RHS (stage 2 of 8) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212364263e+00] [Post-stage processing (stage 2 of 8) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212364263e+00] - [Pre-RHS processing (stage 2 of 8) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212364263e+00] - [Post-stage processing (stage 3 of 8) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1211892263e+00] - [Pre-RHS processing (stage 4 of 8) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1212731452e+00] - [Pre-RHS processing (stage 4 of 8) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1212711424e+00] - [Pre-RHS processing (stage 4 of 8) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1212741398e+00] - [Pre-RHS processing (stage 4 of 8) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1211892175e+00] + [Pre-RHS (stage 2 of 8) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212364263e+00] + [Post-stage processing (stage 2 of 8) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1211892263e+00] + [Pre-RHS (stage 4 of 8) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS (stage 4 of 8) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1212711424e+00] + [Pre-RHS (stage 4 of 8) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1212741398e+00] + [Pre-RHS (stage 4 of 8) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1211892175e+00] [Post-stage processing (stage 4 of 8) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1211892175e+00] - [Pre-RHS processing (stage 4 of 8) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1211892175e+00] - [Post-stage processing (stage 5 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211316142e+00] - [Pre-RHS processing (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212731452e+00] - [Pre-RHS processing (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212711430e+00] - [Pre-RHS processing (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212741409e+00] - [Pre-RHS processing (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS (stage 4 of 8) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1211892175e+00] + [Post-stage processing (stage 4 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211316142e+00] + [Pre-RHS (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212711430e+00] + [Pre-RHS (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212741409e+00] + [Pre-RHS (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] [Post-stage processing (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] - [Post-step processing at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] + [Post-step at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), step = 1, ||y||_2 = 2.1211315628e+00] 2.0000000000e-03 1.2247444631e+00 1.7318198829e+00 2.9067859231e-12 2.3980817332e-14 - [Pre-step processing at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] - [Pre-RHS processing (stage 0 of 8) at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] - [Post-stage processing (stage 1 of 8) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1210634067e+00] - [Pre-RHS processing (stage 2 of 8) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1211315628e+00] - [Pre-RHS processing (stage 2 of 8) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1211295605e+00] - [Pre-RHS processing (stage 2 of 8) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1211325579e+00] - [Pre-RHS processing (stage 2 of 8) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1210633896e+00] + [Pre-step at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), step = 2, attempt = 1, ||y||_2 = 2.1211315628e+00] + [Pre-RHS (stage 0 of 8) at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] + [Post-stage processing (stage 0 of 8) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1210634067e+00] + [Pre-RHS (stage 2 of 8) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS (stage 2 of 8) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1211295605e+00] + [Pre-RHS (stage 2 of 8) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1211325579e+00] + [Pre-RHS (stage 2 of 8) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1210633896e+00] [Post-stage processing (stage 2 of 8) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1210633896e+00] - [Pre-RHS processing (stage 2 of 8) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1210633896e+00] - [Post-stage processing (stage 3 of 8) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1209847405e+00] - [Pre-RHS processing (stage 4 of 8) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1211315628e+00] - [Pre-RHS processing (stage 4 of 8) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1211295605e+00] - [Pre-RHS processing (stage 4 of 8) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1211325579e+00] - [Pre-RHS processing (stage 4 of 8) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1209847317e+00] + [Pre-RHS (stage 2 of 8) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1210633896e+00] + [Post-stage processing (stage 2 of 8) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1209847405e+00] + [Pre-RHS (stage 4 of 8) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS (stage 4 of 8) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1211295605e+00] + [Pre-RHS (stage 4 of 8) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1211325579e+00] + [Pre-RHS (stage 4 of 8) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1209847317e+00] [Post-stage processing (stage 4 of 8) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1209847317e+00] - [Pre-RHS processing (stage 4 of 8) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1209847317e+00] - [Post-stage processing (stage 5 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956853e+00] - [Pre-RHS processing (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211315628e+00] - [Pre-RHS processing (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211295608e+00] - [Pre-RHS processing (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211325586e+00] - [Pre-RHS processing (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956339e+00] + [Pre-RHS (stage 4 of 8) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1209847317e+00] + [Post-stage processing (stage 4 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956853e+00] + [Pre-RHS (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211295608e+00] + [Pre-RHS (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211325586e+00] + [Pre-RHS (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956339e+00] [Post-stage processing (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956339e+00] - [Post-step processing at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03),||y||_2 = 2.1208956339e+00] + [Post-step at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), step = 2, ||y||_2 = 2.1208956339e+00] 3.0000000000e-03 1.2247439528e+00 1.7315312703e+00 1.0538681039e-11 3.7747582837e-14 ------------------------------------------------------------------------------------------------------------------------------ Current time = 0.003 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_2.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_2.out index fcad2aa93a..425ec5812a 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_2.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_2.out @@ -5,83 +5,83 @@ Using GMRES iterative linear solver t u v u err v err ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 0 of 8) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] - [Post-stage processing (stage 1 of 8) at t = 4.36e-04 (tn = 0.00e+00 , tcur = 4.36e-04), ||y||_2 = 2.1213113879e+00] - [Pre-RHS processing (stage 2 of 8) at t = 4.36e-04 (tn = 0.00e+00 , tcur = 4.36e-04), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 2 of 8) at t = 4.36e-04 (tn = 0.00e+00 , tcur = 4.36e-04), ||y||_2 = 2.1213183438e+00] - [Pre-RHS processing (stage 2 of 8) at t = 4.36e-04 (tn = 0.00e+00 , tcur = 4.36e-04), ||y||_2 = 2.1213213443e+00] - [Pre-RHS processing (stage 2 of 8) at t = 4.36e-04 (tn = 0.00e+00 , tcur = 4.36e-04), ||y||_2 = 2.1213113879e+00] + [Pre-step at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), step = 0, attempt = 1, ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 0 of 8) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Post-stage processing (stage 0 of 8) at t = 4.36e-04 (tn = 0.00e+00 , tcur = 4.36e-04), ||y||_2 = 2.1213113879e+00] + [Pre-RHS (stage 2 of 8) at t = 4.36e-04 (tn = 0.00e+00 , tcur = 4.36e-04), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 2 of 8) at t = 4.36e-04 (tn = 0.00e+00 , tcur = 4.36e-04), ||y||_2 = 2.1213183438e+00] + [Pre-RHS (stage 2 of 8) at t = 4.36e-04 (tn = 0.00e+00 , tcur = 4.36e-04), ||y||_2 = 2.1213213443e+00] + [Pre-RHS (stage 2 of 8) at t = 4.36e-04 (tn = 0.00e+00 , tcur = 4.36e-04), ||y||_2 = 2.1213113879e+00] [Post-stage processing (stage 2 of 8) at t = 4.36e-04 (tn = 0.00e+00 , tcur = 4.36e-04), ||y||_2 = 2.1213113879e+00] - [Pre-RHS processing (stage 2 of 8) at t = 4.36e-04 (tn = 0.00e+00 , tcur = 4.36e-04), ||y||_2 = 2.1213113879e+00] - [Post-stage processing (stage 3 of 8) at t = 7.18e-04 (tn = 0.00e+00 , tcur = 7.18e-04), ||y||_2 = 2.1212960228e+00] - [Pre-RHS processing (stage 4 of 8) at t = 7.18e-04 (tn = 0.00e+00 , tcur = 7.18e-04), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 4 of 8) at t = 7.18e-04 (tn = 0.00e+00 , tcur = 7.18e-04), ||y||_2 = 2.1213183421e+00] - [Pre-RHS processing (stage 4 of 8) at t = 7.18e-04 (tn = 0.00e+00 , tcur = 7.18e-04), ||y||_2 = 2.1213213409e+00] - [Pre-RHS processing (stage 4 of 8) at t = 7.18e-04 (tn = 0.00e+00 , tcur = 7.18e-04), ||y||_2 = 2.1212960259e+00] + [Pre-RHS (stage 2 of 8) at t = 4.36e-04 (tn = 0.00e+00 , tcur = 4.36e-04), ||y||_2 = 2.1213113879e+00] + [Post-stage processing (stage 2 of 8) at t = 7.18e-04 (tn = 0.00e+00 , tcur = 7.18e-04), ||y||_2 = 2.1212960228e+00] + [Pre-RHS (stage 4 of 8) at t = 7.18e-04 (tn = 0.00e+00 , tcur = 7.18e-04), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 4 of 8) at t = 7.18e-04 (tn = 0.00e+00 , tcur = 7.18e-04), ||y||_2 = 2.1213183421e+00] + [Pre-RHS (stage 4 of 8) at t = 7.18e-04 (tn = 0.00e+00 , tcur = 7.18e-04), ||y||_2 = 2.1213213409e+00] + [Pre-RHS (stage 4 of 8) at t = 7.18e-04 (tn = 0.00e+00 , tcur = 7.18e-04), ||y||_2 = 2.1212960259e+00] [Post-stage processing (stage 4 of 8) at t = 7.18e-04 (tn = 0.00e+00 , tcur = 7.18e-04), ||y||_2 = 2.1212960259e+00] - [Pre-RHS processing (stage 4 of 8) at t = 7.18e-04 (tn = 0.00e+00 , tcur = 7.18e-04), ||y||_2 = 2.1212960259e+00] - [Post-stage processing (stage 5 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731087e+00] - [Pre-RHS processing (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213183406e+00] - [Pre-RHS processing (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213213379e+00] - [Pre-RHS processing (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731290e+00] + [Pre-RHS (stage 4 of 8) at t = 7.18e-04 (tn = 0.00e+00 , tcur = 7.18e-04), ||y||_2 = 2.1212960259e+00] + [Post-stage processing (stage 4 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731087e+00] + [Pre-RHS (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213183406e+00] + [Pre-RHS (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213213379e+00] + [Pre-RHS (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731290e+00] [Post-stage processing (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731290e+00] - [Pre-RHS processing (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731290e+00] - [Post-stage processing (stage 7 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] - [Post-step processing at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] + [Pre-RHS (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731290e+00] + [Postprocess-step at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] + [Post-step at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), step = 0, ||y||_2 = 2.1212731452e+00] 1.0000000000e-03 1.2247447693e+00 1.7319930735e+00 2.6378899065e-13 8.2156503822e-15 - [Pre-step processing at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] - [Pre-RHS processing (stage 0 of 8) at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] - [Post-stage processing (stage 1 of 8) at t = 1.44e-03 (tn = 1.00e-03 , tcur = 1.44e-03), ||y||_2 = 2.1212230476e+00] - [Pre-RHS processing (stage 2 of 8) at t = 1.44e-03 (tn = 1.00e-03 , tcur = 1.44e-03), ||y||_2 = 2.1212731452e+00] - [Pre-RHS processing (stage 2 of 8) at t = 1.44e-03 (tn = 1.00e-03 , tcur = 1.44e-03), ||y||_2 = 2.1212711435e+00] - [Pre-RHS processing (stage 2 of 8) at t = 1.44e-03 (tn = 1.00e-03 , tcur = 1.44e-03), ||y||_2 = 2.1212741418e+00] - [Pre-RHS processing (stage 2 of 8) at t = 1.44e-03 (tn = 1.00e-03 , tcur = 1.44e-03), ||y||_2 = 2.1212230476e+00] + [Pre-step at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), step = 1, attempt = 1, ||y||_2 = 2.1212731452e+00] + [Pre-RHS (stage 0 of 8) at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] + [Post-stage processing (stage 0 of 8) at t = 1.44e-03 (tn = 1.00e-03 , tcur = 1.44e-03), ||y||_2 = 2.1212230476e+00] + [Pre-RHS (stage 2 of 8) at t = 1.44e-03 (tn = 1.00e-03 , tcur = 1.44e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS (stage 2 of 8) at t = 1.44e-03 (tn = 1.00e-03 , tcur = 1.44e-03), ||y||_2 = 2.1212711435e+00] + [Pre-RHS (stage 2 of 8) at t = 1.44e-03 (tn = 1.00e-03 , tcur = 1.44e-03), ||y||_2 = 2.1212741418e+00] + [Pre-RHS (stage 2 of 8) at t = 1.44e-03 (tn = 1.00e-03 , tcur = 1.44e-03), ||y||_2 = 2.1212230476e+00] [Post-stage processing (stage 2 of 8) at t = 1.44e-03 (tn = 1.00e-03 , tcur = 1.44e-03), ||y||_2 = 2.1212230476e+00] - [Pre-RHS processing (stage 2 of 8) at t = 1.44e-03 (tn = 1.00e-03 , tcur = 1.44e-03), ||y||_2 = 2.1212230476e+00] - [Post-stage processing (stage 3 of 8) at t = 1.72e-03 (tn = 1.00e-03 , tcur = 1.72e-03), ||y||_2 = 2.1211810603e+00] - [Pre-RHS processing (stage 4 of 8) at t = 1.72e-03 (tn = 1.00e-03 , tcur = 1.72e-03), ||y||_2 = 2.1212731452e+00] - [Pre-RHS processing (stage 4 of 8) at t = 1.72e-03 (tn = 1.00e-03 , tcur = 1.72e-03), ||y||_2 = 2.1212711432e+00] - [Pre-RHS processing (stage 4 of 8) at t = 1.72e-03 (tn = 1.00e-03 , tcur = 1.72e-03), ||y||_2 = 2.1212741414e+00] - [Pre-RHS processing (stage 4 of 8) at t = 1.72e-03 (tn = 1.00e-03 , tcur = 1.72e-03), ||y||_2 = 2.1211810634e+00] + [Pre-RHS (stage 2 of 8) at t = 1.44e-03 (tn = 1.00e-03 , tcur = 1.44e-03), ||y||_2 = 2.1212230476e+00] + [Post-stage processing (stage 2 of 8) at t = 1.72e-03 (tn = 1.00e-03 , tcur = 1.72e-03), ||y||_2 = 2.1211810603e+00] + [Pre-RHS (stage 4 of 8) at t = 1.72e-03 (tn = 1.00e-03 , tcur = 1.72e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS (stage 4 of 8) at t = 1.72e-03 (tn = 1.00e-03 , tcur = 1.72e-03), ||y||_2 = 2.1212711432e+00] + [Pre-RHS (stage 4 of 8) at t = 1.72e-03 (tn = 1.00e-03 , tcur = 1.72e-03), ||y||_2 = 2.1212741414e+00] + [Pre-RHS (stage 4 of 8) at t = 1.72e-03 (tn = 1.00e-03 , tcur = 1.72e-03), ||y||_2 = 2.1211810634e+00] [Post-stage processing (stage 4 of 8) at t = 1.72e-03 (tn = 1.00e-03 , tcur = 1.72e-03), ||y||_2 = 2.1211810634e+00] - [Pre-RHS processing (stage 4 of 8) at t = 1.72e-03 (tn = 1.00e-03 , tcur = 1.72e-03), ||y||_2 = 2.1211810634e+00] - [Post-stage processing (stage 5 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315263e+00] - [Pre-RHS processing (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212731452e+00] - [Pre-RHS processing (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212711428e+00] - [Pre-RHS processing (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212741405e+00] - [Pre-RHS processing (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315465e+00] + [Pre-RHS (stage 4 of 8) at t = 1.72e-03 (tn = 1.00e-03 , tcur = 1.72e-03), ||y||_2 = 2.1211810634e+00] + [Post-stage processing (stage 4 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315263e+00] + [Pre-RHS (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212711428e+00] + [Pre-RHS (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212741405e+00] + [Pre-RHS (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315465e+00] [Post-stage processing (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315465e+00] - [Pre-RHS processing (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315465e+00] - [Post-stage processing (stage 7 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] - [Post-step processing at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] + [Pre-RHS (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315465e+00] + [Postprocess-step at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] + [Post-step at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), step = 1, ||y||_2 = 2.1211315628e+00] 2.0000000000e-03 1.2247444631e+00 1.7318198829e+00 3.1354918661e-12 1.3988810110e-14 - [Pre-step processing at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] - [Pre-RHS processing (stage 0 of 8) at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] - [Post-stage processing (stage 1 of 8) at t = 2.44e-03 (tn = 2.00e-03 , tcur = 2.44e-03), ||y||_2 = 2.1210403366e+00] - [Pre-RHS processing (stage 2 of 8) at t = 2.44e-03 (tn = 2.00e-03 , tcur = 2.44e-03), ||y||_2 = 2.1211315628e+00] - [Pre-RHS processing (stage 2 of 8) at t = 2.44e-03 (tn = 2.00e-03 , tcur = 2.44e-03), ||y||_2 = 2.1211295611e+00] - [Pre-RHS processing (stage 2 of 8) at t = 2.44e-03 (tn = 2.00e-03 , tcur = 2.44e-03), ||y||_2 = 2.1211325591e+00] - [Pre-RHS processing (stage 2 of 8) at t = 2.44e-03 (tn = 2.00e-03 , tcur = 2.44e-03), ||y||_2 = 2.1210403366e+00] + [Pre-step at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), step = 2, attempt = 1, ||y||_2 = 2.1211315628e+00] + [Pre-RHS (stage 0 of 8) at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] + [Post-stage processing (stage 0 of 8) at t = 2.44e-03 (tn = 2.00e-03 , tcur = 2.44e-03), ||y||_2 = 2.1210403366e+00] + [Pre-RHS (stage 2 of 8) at t = 2.44e-03 (tn = 2.00e-03 , tcur = 2.44e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS (stage 2 of 8) at t = 2.44e-03 (tn = 2.00e-03 , tcur = 2.44e-03), ||y||_2 = 2.1211295611e+00] + [Pre-RHS (stage 2 of 8) at t = 2.44e-03 (tn = 2.00e-03 , tcur = 2.44e-03), ||y||_2 = 2.1211325591e+00] + [Pre-RHS (stage 2 of 8) at t = 2.44e-03 (tn = 2.00e-03 , tcur = 2.44e-03), ||y||_2 = 2.1210403366e+00] [Post-stage processing (stage 2 of 8) at t = 2.44e-03 (tn = 2.00e-03 , tcur = 2.44e-03), ||y||_2 = 2.1210403366e+00] - [Pre-RHS processing (stage 2 of 8) at t = 2.44e-03 (tn = 2.00e-03 , tcur = 2.44e-03), ||y||_2 = 2.1210403366e+00] - [Post-stage processing (stage 3 of 8) at t = 2.72e-03 (tn = 2.00e-03 , tcur = 2.72e-03), ||y||_2 = 2.1209717381e+00] - [Pre-RHS processing (stage 4 of 8) at t = 2.72e-03 (tn = 2.00e-03 , tcur = 2.72e-03), ||y||_2 = 2.1211315628e+00] - [Pre-RHS processing (stage 4 of 8) at t = 2.72e-03 (tn = 2.00e-03 , tcur = 2.72e-03), ||y||_2 = 2.1211295610e+00] - [Pre-RHS processing (stage 4 of 8) at t = 2.72e-03 (tn = 2.00e-03 , tcur = 2.72e-03), ||y||_2 = 2.1211325588e+00] - [Pre-RHS processing (stage 4 of 8) at t = 2.72e-03 (tn = 2.00e-03 , tcur = 2.72e-03), ||y||_2 = 2.1209717412e+00] + [Pre-RHS (stage 2 of 8) at t = 2.44e-03 (tn = 2.00e-03 , tcur = 2.44e-03), ||y||_2 = 2.1210403366e+00] + [Post-stage processing (stage 2 of 8) at t = 2.72e-03 (tn = 2.00e-03 , tcur = 2.72e-03), ||y||_2 = 2.1209717381e+00] + [Pre-RHS (stage 4 of 8) at t = 2.72e-03 (tn = 2.00e-03 , tcur = 2.72e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS (stage 4 of 8) at t = 2.72e-03 (tn = 2.00e-03 , tcur = 2.72e-03), ||y||_2 = 2.1211295610e+00] + [Pre-RHS (stage 4 of 8) at t = 2.72e-03 (tn = 2.00e-03 , tcur = 2.72e-03), ||y||_2 = 2.1211325588e+00] + [Pre-RHS (stage 4 of 8) at t = 2.72e-03 (tn = 2.00e-03 , tcur = 2.72e-03), ||y||_2 = 2.1209717412e+00] [Post-stage processing (stage 4 of 8) at t = 2.72e-03 (tn = 2.00e-03 , tcur = 2.72e-03), ||y||_2 = 2.1209717412e+00] - [Pre-RHS processing (stage 4 of 8) at t = 2.72e-03 (tn = 2.00e-03 , tcur = 2.72e-03), ||y||_2 = 2.1209717412e+00] - [Post-stage processing (stage 5 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208955974e+00] - [Pre-RHS processing (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211315628e+00] - [Pre-RHS processing (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211295607e+00] - [Pre-RHS processing (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211325583e+00] - [Pre-RHS processing (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956177e+00] + [Pre-RHS (stage 4 of 8) at t = 2.72e-03 (tn = 2.00e-03 , tcur = 2.72e-03), ||y||_2 = 2.1209717412e+00] + [Post-stage processing (stage 4 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208955974e+00] + [Pre-RHS (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211295607e+00] + [Pre-RHS (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211325583e+00] + [Pre-RHS (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956177e+00] [Post-stage processing (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956177e+00] - [Pre-RHS processing (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956177e+00] - [Post-stage processing (stage 7 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956339e+00] - [Post-step processing at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03),||y||_2 = 2.1208956339e+00] + [Pre-RHS (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956177e+00] + [Postprocess-step at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03),||y||_2 = 2.1208956339e+00] + [Post-step at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), step = 2, ||y||_2 = 2.1208956339e+00] 3.0000000000e-03 1.2247439528e+00 1.7315312703e+00 1.1467271577e-11 1.8207657604e-14 ------------------------------------------------------------------------------------------------------------------------------ Current time = 0.003 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_3.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_3.out index 4ddd50175a..29f3cc49ca 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_3.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_3.out @@ -3,38 +3,38 @@ Using Ex-MRI-SR method t u v u err v err ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-step at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), step = 0, attempt = 1, ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] [Post-stage processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1212987717e+00] - [Pre-RHS processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1212987717e+00] + [Pre-RHS (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1212987717e+00] [Post-stage processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1212901822e+00] - [Pre-RHS processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1212901822e+00] + [Pre-RHS (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1212901822e+00] [Post-stage processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1212596852e+00] - [Pre-RHS processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1212596852e+00] - [Post-stage processing (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] - [Post-step processing at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] + [Pre-RHS (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1212596852e+00] + [Postprocess-step at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] + [Post-step at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), step = 0, ||y||_2 = 2.1212731452e+00] 1.0000000000e-03 1.2247447693e+00 1.7319930735e+00 7.9936057773e-15 1.3744561045e-13 - [Pre-step processing at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] - [Pre-RHS processing (stage 0 of 5) at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] + [Pre-step at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), step = 1, attempt = 1, ||y||_2 = 2.1212731452e+00] + [Pre-RHS (stage 0 of 5) at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] [Post-stage processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1211877224e+00] - [Pre-RHS processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1211877224e+00] + [Pre-RHS (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1211877224e+00] [Post-stage processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1211674743e+00] - [Pre-RHS processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1211674743e+00] + [Pre-RHS (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1211674743e+00] [Post-stage processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1211055205e+00] - [Pre-RHS processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1211055205e+00] - [Post-stage processing (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] - [Post-step processing at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] + [Pre-RHS (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1211055205e+00] + [Postprocess-step at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] + [Post-step at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), step = 1, ||y||_2 = 2.1211315628e+00] 2.0000000000e-03 1.2247444631e+00 1.7318198829e+00 1.5987211555e-14 2.6245672302e-13 - [Pre-step processing at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] - [Pre-RHS processing (stage 0 of 5) at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] + [Pre-step at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), step = 2, attempt = 1, ||y||_2 = 2.1211315628e+00] + [Pre-RHS (stage 0 of 5) at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] [Post-stage processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1209823117e+00] - [Pre-RHS processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1209823117e+00] + [Pre-RHS (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1209823117e+00] [Post-stage processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1209504105e+00] - [Pre-RHS processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1209504105e+00] + [Pre-RHS (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1209504105e+00] [Post-stage processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1208570163e+00] - [Pre-RHS processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1208570163e+00] - [Post-stage processing (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956339e+00] - [Post-step processing at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03),||y||_2 = 2.1208956339e+00] + [Pre-RHS (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1208570163e+00] + [Postprocess-step at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03),||y||_2 = 2.1208956339e+00] + [Post-step at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), step = 2, ||y||_2 = 2.1208956339e+00] 3.0000000000e-03 1.2247439528e+00 1.7315312703e+00 2.4202861937e-14 3.7436720390e-13 ------------------------------------------------------------------------------------------------------------------------------ Current time = 0.003 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_4.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_4.out index e28d9326b8..ec5ca03534 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_4.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_4.out @@ -5,86 +5,86 @@ Using GMRES iterative linear solver t u v u err v err ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1213183396e+00] - [Pre-RHS processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1213213360e+00] - [Pre-RHS processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1212987262e+00] + [Pre-step at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), step = 0, attempt = 1, ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1213183396e+00] + [Pre-RHS (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1213213360e+00] + [Pre-RHS (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1212987262e+00] [Post-stage processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1212987262e+00] - [Pre-RHS processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1212987262e+00] - [Pre-RHS processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1213183393e+00] - [Pre-RHS processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1213213353e+00] - [Pre-RHS processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1212901049e+00] + [Pre-RHS (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1212987262e+00] + [Pre-RHS (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1213183393e+00] + [Pre-RHS (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1213213353e+00] + [Pre-RHS (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1212901049e+00] [Post-stage processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1212901049e+00] - [Pre-RHS processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1212901049e+00] - [Pre-RHS processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1213183421e+00] - [Pre-RHS processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1213213410e+00] - [Pre-RHS processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1212597444e+00] + [Pre-RHS (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1212901049e+00] + [Pre-RHS (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1213183421e+00] + [Pre-RHS (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1213213410e+00] + [Pre-RHS (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1212597444e+00] [Post-stage processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1212597444e+00] - [Pre-RHS processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1212597444e+00] - [Pre-RHS processing (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213183414e+00] - [Pre-RHS processing (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213213394e+00] - [Pre-RHS processing (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] - [Post-stage processing (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] - [Post-step processing at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] + [Pre-RHS (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1212597444e+00] + [Pre-RHS (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213183414e+00] + [Pre-RHS (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213213394e+00] + [Pre-RHS (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] + [Postprocess-step at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] + [Post-step at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), step = 0, ||y||_2 = 2.1212731452e+00] 1.0000000000e-03 1.2247447693e+00 1.7319930735e+00 2.4846791291e-13 1.5143442056e-13 - [Pre-step processing at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] - [Pre-RHS processing (stage 0 of 5) at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] - [Pre-RHS processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1212731452e+00] - [Pre-RHS processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1212711427e+00] - [Pre-RHS processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1212741403e+00] - [Pre-RHS processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1211876769e+00] + [Pre-step at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), step = 1, attempt = 1, ||y||_2 = 2.1212731452e+00] + [Pre-RHS (stage 0 of 5) at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1212711427e+00] + [Pre-RHS (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1212741403e+00] + [Pre-RHS (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1211876769e+00] [Post-stage processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1211876769e+00] - [Pre-RHS processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1211876769e+00] - [Pre-RHS processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1212731452e+00] - [Pre-RHS processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1212711425e+00] - [Pre-RHS processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1212741399e+00] - [Pre-RHS processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1211673971e+00] + [Pre-RHS (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1211876769e+00] + [Pre-RHS (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1212711425e+00] + [Pre-RHS (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1212741399e+00] + [Pre-RHS (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1211673971e+00] [Post-stage processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1211673971e+00] - [Pre-RHS processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1211673971e+00] - [Pre-RHS processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1212731452e+00] - [Pre-RHS processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1212711434e+00] - [Pre-RHS processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1212741417e+00] - [Pre-RHS processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1211055797e+00] + [Pre-RHS (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1211673971e+00] + [Pre-RHS (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1212711434e+00] + [Pre-RHS (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1212741417e+00] + [Pre-RHS (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1211055797e+00] [Post-stage processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1211055797e+00] - [Pre-RHS processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1211055797e+00] - [Pre-RHS processing (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212731452e+00] - [Pre-RHS processing (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212711431e+00] - [Pre-RHS processing (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212741411e+00] - [Pre-RHS processing (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] - [Post-stage processing (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] - [Post-step processing at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] + [Pre-RHS (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1211055797e+00] + [Pre-RHS (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212711431e+00] + [Pre-RHS (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212741411e+00] + [Pre-RHS (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] + [Postprocess-step at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] + [Post-step at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), step = 1, ||y||_2 = 2.1211315628e+00] 2.0000000000e-03 1.2247444631e+00 1.7318198829e+00 2.6707525080e-12 2.9021229864e-13 - [Pre-step processing at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] - [Pre-RHS processing (stage 0 of 5) at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] - [Pre-RHS processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1211315628e+00] - [Pre-RHS processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1211295607e+00] - [Pre-RHS processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1211325583e+00] - [Pre-RHS processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1209822662e+00] + [Pre-step at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), step = 2, attempt = 1, ||y||_2 = 2.1211315628e+00] + [Pre-RHS (stage 0 of 5) at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1211295607e+00] + [Pre-RHS (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1211325583e+00] + [Pre-RHS (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1209822662e+00] [Post-stage processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1209822662e+00] - [Pre-RHS processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1209822662e+00] - [Pre-RHS processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1211315628e+00] - [Pre-RHS processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1211295606e+00] - [Pre-RHS processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1211325581e+00] - [Pre-RHS processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1209503332e+00] + [Pre-RHS (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1209822662e+00] + [Pre-RHS (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1211295606e+00] + [Pre-RHS (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1211325581e+00] + [Pre-RHS (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1209503332e+00] [Post-stage processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1209503332e+00] - [Pre-RHS processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1209503332e+00] - [Pre-RHS processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1211315628e+00] - [Pre-RHS processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1211295611e+00] - [Pre-RHS processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1211325591e+00] - [Pre-RHS processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1208570755e+00] + [Pre-RHS (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1209503332e+00] + [Pre-RHS (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1211295611e+00] + [Pre-RHS (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1211325591e+00] + [Pre-RHS (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1208570755e+00] [Post-stage processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1208570755e+00] - [Pre-RHS processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1208570755e+00] - [Pre-RHS processing (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211315628e+00] - [Pre-RHS processing (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211295609e+00] - [Pre-RHS processing (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211325588e+00] - [Pre-RHS processing (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956339e+00] - [Post-stage processing (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956339e+00] - [Post-step processing at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03),||y||_2 = 2.1208956339e+00] + [Pre-RHS (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1208570755e+00] + [Pre-RHS (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211295609e+00] + [Pre-RHS (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211325588e+00] + [Pre-RHS (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956339e+00] + [Postprocess-step at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03),||y||_2 = 2.1208956339e+00] + [Post-step at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), step = 2, ||y||_2 = 2.1208956339e+00] 3.0000000000e-03 1.2247439528e+00 1.7315312703e+00 9.4586560806e-12 4.1744385726e-13 ------------------------------------------------------------------------------------------------------------------------------ Current time = 0.003 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_5.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_5.out index 7780877a70..df2b6beac4 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_5.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_5.out @@ -5,86 +5,86 @@ Using GMRES iterative linear solver t u v u err v err ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1213183438e+00] - [Pre-RHS processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1213213444e+00] - [Pre-RHS processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1212987717e+00] + [Pre-step at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), step = 0, attempt = 1, ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1213183438e+00] + [Pre-RHS (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1213213444e+00] + [Pre-RHS (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1212987717e+00] [Post-stage processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1212987717e+00] - [Pre-RHS processing (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1212987717e+00] - [Pre-RHS processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1213183444e+00] - [Pre-RHS processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1213213455e+00] - [Pre-RHS processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1212901821e+00] + [Pre-RHS (stage 1 of 5) at t = 6.76e-04 (tn = 0.00e+00 , tcur = 6.76e-04), ||y||_2 = 2.1212987717e+00] + [Pre-RHS (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1213183444e+00] + [Pre-RHS (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1213213455e+00] + [Pre-RHS (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1212901821e+00] [Post-stage processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1212901821e+00] - [Pre-RHS processing (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1212901821e+00] - [Pre-RHS processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1213183402e+00] - [Pre-RHS processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1213213371e+00] - [Pre-RHS processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1212596854e+00] + [Pre-RHS (stage 2 of 5) at t = 8.00e-04 (tn = 0.00e+00 , tcur = 8.00e-04), ||y||_2 = 2.1212901821e+00] + [Pre-RHS (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1213183402e+00] + [Pre-RHS (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1213213371e+00] + [Pre-RHS (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1212596854e+00] [Post-stage processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1212596854e+00] - [Pre-RHS processing (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1212596854e+00] - [Pre-RHS processing (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213183414e+00] - [Pre-RHS processing (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213213394e+00] - [Pre-RHS processing (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] - [Post-stage processing (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] - [Post-step processing at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] + [Pre-RHS (stage 3 of 5) at t = 1.13e-03 (tn = 0.00e+00 , tcur = 1.13e-03), ||y||_2 = 2.1212596854e+00] + [Pre-RHS (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213183414e+00] + [Pre-RHS (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213213394e+00] + [Pre-RHS (stage 4 of 5) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] + [Postprocess-step at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] + [Post-step at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), step = 0, ||y||_2 = 2.1212731452e+00] 1.0000000000e-03 1.2247447693e+00 1.7319930735e+00 2.8288482667e-13 1.3744561045e-13 - [Pre-step processing at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] - [Pre-RHS processing (stage 0 of 5) at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] - [Pre-RHS processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1212731452e+00] - [Pre-RHS processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1212711437e+00] - [Pre-RHS processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1212741424e+00] - [Pre-RHS processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1211877224e+00] + [Pre-step at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), step = 1, attempt = 1, ||y||_2 = 2.1212731452e+00] + [Pre-RHS (stage 0 of 5) at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1212711437e+00] + [Pre-RHS (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1212741424e+00] + [Pre-RHS (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1211877224e+00] [Post-stage processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1211877224e+00] - [Pre-RHS processing (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1211877224e+00] - [Pre-RHS processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1212731452e+00] - [Pre-RHS processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1212711440e+00] - [Pre-RHS processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1212741429e+00] - [Pre-RHS processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1211674743e+00] + [Pre-RHS (stage 1 of 5) at t = 1.68e-03 (tn = 1.00e-03 , tcur = 1.68e-03), ||y||_2 = 2.1211877224e+00] + [Pre-RHS (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1212711440e+00] + [Pre-RHS (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1212741429e+00] + [Pre-RHS (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1211674743e+00] [Post-stage processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1211674743e+00] - [Pre-RHS processing (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1211674743e+00] - [Pre-RHS processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1212731452e+00] - [Pre-RHS processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1212711427e+00] - [Pre-RHS processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1212741403e+00] - [Pre-RHS processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1211055207e+00] + [Pre-RHS (stage 2 of 5) at t = 1.80e-03 (tn = 1.00e-03 , tcur = 1.80e-03), ||y||_2 = 2.1211674743e+00] + [Pre-RHS (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1212711427e+00] + [Pre-RHS (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1212741403e+00] + [Pre-RHS (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1211055207e+00] [Post-stage processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1211055207e+00] - [Pre-RHS processing (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1211055207e+00] - [Pre-RHS processing (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212731452e+00] - [Pre-RHS processing (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212711431e+00] - [Pre-RHS processing (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212741411e+00] - [Pre-RHS processing (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] - [Post-stage processing (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] - [Post-step processing at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] + [Pre-RHS (stage 3 of 5) at t = 2.13e-03 (tn = 1.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.1211055207e+00] + [Pre-RHS (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212731452e+00] + [Pre-RHS (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212711431e+00] + [Pre-RHS (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212741411e+00] + [Pre-RHS (stage 4 of 5) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] + [Postprocess-step at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] + [Post-step at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), step = 1, ||y||_2 = 2.1211315628e+00] 2.0000000000e-03 1.2247444631e+00 1.7318198829e+00 2.7395863356e-12 2.6245672302e-13 - [Pre-step processing at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] - [Pre-RHS processing (stage 0 of 5) at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] - [Pre-RHS processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1211315628e+00] - [Pre-RHS processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1211295613e+00] - [Pre-RHS processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1211325595e+00] - [Pre-RHS processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1209823117e+00] + [Pre-step at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), step = 2, attempt = 1, ||y||_2 = 2.1211315628e+00] + [Pre-RHS (stage 0 of 5) at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1211295613e+00] + [Pre-RHS (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1211325595e+00] + [Pre-RHS (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1209823117e+00] [Post-stage processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1209823117e+00] - [Pre-RHS processing (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1209823117e+00] - [Pre-RHS processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1211315628e+00] - [Pre-RHS processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1211295614e+00] - [Pre-RHS processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1211325598e+00] - [Pre-RHS processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1209504105e+00] + [Pre-RHS (stage 1 of 5) at t = 2.68e-03 (tn = 2.00e-03 , tcur = 2.68e-03), ||y||_2 = 2.1209823117e+00] + [Pre-RHS (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1211295614e+00] + [Pre-RHS (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1211325598e+00] + [Pre-RHS (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1209504105e+00] [Post-stage processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1209504105e+00] - [Pre-RHS processing (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1209504105e+00] - [Pre-RHS processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1211315628e+00] - [Pre-RHS processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1211295607e+00] - [Pre-RHS processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1211325583e+00] - [Pre-RHS processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1208570165e+00] + [Pre-RHS (stage 2 of 5) at t = 2.80e-03 (tn = 2.00e-03 , tcur = 2.80e-03), ||y||_2 = 2.1209504105e+00] + [Pre-RHS (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1211295607e+00] + [Pre-RHS (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1211325583e+00] + [Pre-RHS (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1208570165e+00] [Post-stage processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1208570165e+00] - [Pre-RHS processing (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1208570165e+00] - [Pre-RHS processing (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211315628e+00] - [Pre-RHS processing (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211295609e+00] - [Pre-RHS processing (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211325588e+00] - [Pre-RHS processing (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956339e+00] - [Post-stage processing (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956339e+00] - [Post-step processing at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03),||y||_2 = 2.1208956339e+00] + [Pre-RHS (stage 3 of 5) at t = 3.13e-03 (tn = 2.00e-03 , tcur = 3.13e-03), ||y||_2 = 2.1208570165e+00] + [Pre-RHS (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211315628e+00] + [Pre-RHS (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211295609e+00] + [Pre-RHS (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211325588e+00] + [Pre-RHS (stage 4 of 5) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956339e+00] + [Postprocess-step at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03),||y||_2 = 2.1208956339e+00] + [Post-step at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), step = 2, ||y||_2 = 2.1208956339e+00] 3.0000000000e-03 1.2247439528e+00 1.7315312703e+00 9.5614627327e-12 3.7592151614e-13 ------------------------------------------------------------------------------------------------------------------------------ Current time = 0.003 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_6.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_6.out index 92ab1f21fe..b12725e9d0 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_6.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_6.out @@ -3,32 +3,32 @@ Using MERK method t u v u err v err ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.1213203436e+00] - [Pre-RHS processing (stage 0 of 4) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] + [Pre-step at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), step = 0, attempt = 1, ||y||_2 = 2.1213203436e+00] + [Pre-RHS (stage 0 of 4) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] [Post-stage processing (stage 1 of 4) at t = 5.00e-04 (tn = 0.00e+00 , tcur = 5.00e-04), ||y||_2 = 2.1213085585e+00] - [Pre-RHS processing (stage 1 of 4) at t = 5.00e-04 (tn = 0.00e+00 , tcur = 5.00e-04), ||y||_2 = 2.1213085585e+00] + [Pre-RHS (stage 1 of 4) at t = 5.00e-04 (tn = 0.00e+00 , tcur = 5.00e-04), ||y||_2 = 2.1213085585e+00] [Post-stage processing (stage 2 of 4) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1212993663e+00] - [Pre-RHS processing (stage 2 of 4) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1212993663e+00] - [Post-stage processing (stage 3 of 4) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] - [Post-step processing at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] + [Pre-RHS (stage 2 of 4) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1212993663e+00] + [Postprocess-step at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] + [Post-step at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), step = 0, ||y||_2 = 2.1212731452e+00] 1.0000000000e-03 1.2247447693e+00 1.7319930735e+00 3.3528735344e-14 1.4566126083e-13 - [Pre-step processing at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] - [Pre-RHS processing (stage 0 of 4) at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] + [Pre-step at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), step = 1, attempt = 1, ||y||_2 = 2.1212731452e+00] + [Pre-RHS (stage 0 of 4) at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] [Post-stage processing (stage 1 of 4) at t = 1.50e-03 (tn = 1.00e-03 , tcur = 1.50e-03), ||y||_2 = 2.1212141650e+00] - [Pre-RHS processing (stage 1 of 4) at t = 1.50e-03 (tn = 1.00e-03 , tcur = 1.50e-03), ||y||_2 = 2.1212141650e+00] + [Pre-RHS (stage 1 of 4) at t = 1.50e-03 (tn = 1.00e-03 , tcur = 1.50e-03), ||y||_2 = 2.1212141650e+00] [Post-stage processing (stage 2 of 4) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1211892422e+00] - [Pre-RHS processing (stage 2 of 4) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1211892422e+00] - [Post-stage processing (stage 3 of 4) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] - [Post-step processing at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] + [Pre-RHS (stage 2 of 4) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1211892422e+00] + [Postprocess-step at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] + [Post-step at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), step = 1, ||y||_2 = 2.1211315628e+00] 2.0000000000e-03 1.2247444631e+00 1.7318198829e+00 6.7057470687e-14 2.7866597918e-13 - [Pre-step processing at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] - [Pre-RHS processing (stage 0 of 4) at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] + [Pre-step at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), step = 2, attempt = 1, ||y||_2 = 2.1211315628e+00] + [Pre-RHS (stage 0 of 4) at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] [Post-stage processing (stage 1 of 4) at t = 2.50e-03 (tn = 2.00e-03 , tcur = 2.50e-03), ||y||_2 = 2.1210254031e+00] - [Pre-RHS processing (stage 1 of 4) at t = 2.50e-03 (tn = 2.00e-03 , tcur = 2.50e-03), ||y||_2 = 2.1210254031e+00] + [Pre-RHS (stage 1 of 4) at t = 2.50e-03 (tn = 2.00e-03 , tcur = 2.50e-03), ||y||_2 = 2.1210254031e+00] [Post-stage processing (stage 2 of 4) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1209847564e+00] - [Pre-RHS processing (stage 2 of 4) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1209847564e+00] - [Post-stage processing (stage 3 of 4) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956339e+00] - [Post-step processing at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03),||y||_2 = 2.1208956339e+00] + [Pre-RHS (stage 2 of 4) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1209847564e+00] + [Postprocess-step at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03),||y||_2 = 2.1208956339e+00] + [Post-step at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), step = 2, ||y||_2 = 2.1208956339e+00] 3.0000000000e-03 1.2247439528e+00 1.7315312703e+00 1.0058620603e-13 3.9879211045e-13 ------------------------------------------------------------------------------------------------------------------------------ Current time = 0.003 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.out index 3e8770502d..9f2f473c7b 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_splittingstep.out @@ -2,14 +2,14 @@ Start SplittingStep StageInfo test t y y err --------------------------------------------------------------------- 0.000000000000000e+00 1.000000000000000e+00 0.000000000000000e+00 - [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 1.0000000000e+00] - [Post-step processing at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03),||y||_2 = 9.9899900167e-01] + [Pre-step at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), step = 0, attempt = 1, ||y||_2 = 1.0000000000e+00] + [Post-step at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), step = 0, ||y||_2 = 9.9899900167e-01] 1.0000000000e-03 9.9899900167e-01 9.9866566894e-07 - [Pre-step processing at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03),||y||_2 = 9.9899900167e-01] - [Post-step processing at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03),||y||_2 = 9.9799800734e-01] + [Pre-step at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), step = 1, attempt = 1, ||y||_2 = 9.9899900167e-01] + [Post-step at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), step = 1, ||y||_2 = 9.9799800734e-01] 2.0000000000e-03 9.9799800734e-01 1.9953280224e-06 - [Pre-step processing at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03),||y||_2 = 9.9799800734e-01] - [Post-step processing at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03),||y||_2 = 9.9699701901e-01] + [Pre-step at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), step = 2, attempt = 1, ||y||_2 = 9.9799800734e-01] + [Post-step at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), step = 2, ||y||_2 = 9.9699701901e-01] 3.0000000000e-03 9.9699701901e-01 2.9899850904e-06 --------------------------------------------------------------------- Current time = 0.003 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.out index 1388944790..edf33f1ccd 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_sprkstep.out @@ -2,50 +2,50 @@ Start SPRKStep StageInfo test t q1 q2 q3 q4 ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 4.000000000000000e-01 0.000000000000000e+00 0.000000000000000e+00 2.000000000000000e+00 - [Pre-step processing at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00),||y||_2 = 2.0396078054e+00] - [Pre-RHS processing (stage 0 of 4) at t = 1.34e-04 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.0396078054e+00] - [Pre-RHS processing (stage 0 of 4) at t = 5.15e-04 (tn = 0.00e+00 , tcur = 1.34e-04), ||y||_2 = 2.0396079787e+00] + [Pre-step at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), step = 0, attempt = 1, ||y||_2 = 2.0396078054e+00] + [Pre-RHS (stage 0 of 4) at t = 1.34e-04 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.0396078054e+00] + [Pre-RHS (stage 0 of 4) at t = 5.15e-04 (tn = 0.00e+00 , tcur = 1.34e-04), ||y||_2 = 2.0396079787e+00] [Post-stage processing (stage 0 of 4) at t = 1.34e-04 (tn = 0.00e+00 , tcur = 1.34e-04), ||y||_2 = 2.0396081541e+00] - [Pre-RHS processing (stage 1 of 4) at t = -9.03e-05 (tn = 0.00e+00 , tcur = 1.34e-04), ||y||_2 = 2.0396081541e+00] - [Pre-RHS processing (stage 1 of 4) at t = 4.30e-04 (tn = 0.00e+00 , tcur = -9.03e-05), ||y||_2 = 2.0396116094e+00] + [Pre-RHS (stage 1 of 4) at t = -9.03e-05 (tn = 0.00e+00 , tcur = 1.34e-04), ||y||_2 = 2.0396081541e+00] + [Pre-RHS (stage 1 of 4) at t = 4.30e-04 (tn = 0.00e+00 , tcur = -9.03e-05), ||y||_2 = 2.0396116094e+00] [Post-stage processing (stage 1 of 4) at t = -9.03e-05 (tn = 0.00e+00 , tcur = -9.03e-05), ||y||_2 = 2.0396115204e+00] - [Pre-RHS processing (stage 2 of 4) at t = 6.66e-04 (tn = 0.00e+00 , tcur = -9.03e-05), ||y||_2 = 2.0396115204e+00] - [Pre-RHS processing (stage 2 of 4) at t = 8.71e-04 (tn = 0.00e+00 , tcur = 6.66e-04), ||y||_2 = 2.0396057340e+00] + [Pre-RHS (stage 2 of 4) at t = 6.66e-04 (tn = 0.00e+00 , tcur = -9.03e-05), ||y||_2 = 2.0396115204e+00] + [Pre-RHS (stage 2 of 4) at t = 8.71e-04 (tn = 0.00e+00 , tcur = 6.66e-04), ||y||_2 = 2.0396057340e+00] [Post-stage processing (stage 2 of 4) at t = 6.66e-04 (tn = 0.00e+00 , tcur = 6.66e-04), ||y||_2 = 2.0396059367e+00] - [Pre-RHS processing (stage 3 of 4) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 6.66e-04), ||y||_2 = 2.0396059367e+00] - [Pre-RHS processing (stage 3 of 4) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.0396023491e+00] - [Post-stage processing (stage 3 of 4) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.0396024276e+00] - [Post-step processing at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03),||y||_2 = 2.0396024276e+00] + [Pre-RHS (stage 3 of 4) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 6.66e-04), ||y||_2 = 2.0396059367e+00] + [Pre-RHS (stage 3 of 4) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.0396023491e+00] + [Postprocess-step at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03),||y||_2 = 2.0396024276e+00] + [Post-step at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), step = 0, ||y||_2 = 2.0396024276e+00] 1.0000000000e-03 3.9999687501e-01 1.9999947917e-03 -6.2499544275e-03 1.9999843751e+00 - [Pre-step processing at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03),||y||_2 = 2.0396024276e+00] - [Pre-RHS processing (stage 0 of 4) at t = 1.13e-03 (tn = 1.00e-03 , tcur = 1.00e-03), ||y||_2 = 2.0396024276e+00] - [Pre-RHS processing (stage 0 of 4) at t = 1.52e-03 (tn = 1.00e-03 , tcur = 1.13e-03), ||y||_2 = 2.0396010553e+00] + [Pre-step at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), step = 1, attempt = 1, ||y||_2 = 2.0396024276e+00] + [Pre-RHS (stage 0 of 4) at t = 1.13e-03 (tn = 1.00e-03 , tcur = 1.00e-03), ||y||_2 = 2.0396024276e+00] + [Pre-RHS (stage 0 of 4) at t = 1.52e-03 (tn = 1.00e-03 , tcur = 1.13e-03), ||y||_2 = 2.0396010553e+00] [Post-stage processing (stage 0 of 4) at t = 1.13e-03 (tn = 1.00e-03 , tcur = 1.13e-03), ||y||_2 = 2.0396016098e+00] - [Pre-RHS processing (stage 1 of 4) at t = 9.10e-04 (tn = 1.00e-03 , tcur = 1.13e-03), ||y||_2 = 2.0396016098e+00] - [Pre-RHS processing (stage 1 of 4) at t = 1.43e-03 (tn = 1.00e-03 , tcur = 9.10e-04), ||y||_2 = 2.0396076483e+00] + [Pre-RHS (stage 1 of 4) at t = 9.10e-04 (tn = 1.00e-03 , tcur = 1.13e-03), ||y||_2 = 2.0396016098e+00] + [Pre-RHS (stage 1 of 4) at t = 1.43e-03 (tn = 1.00e-03 , tcur = 9.10e-04), ||y||_2 = 2.0396076483e+00] [Post-stage processing (stage 1 of 4) at t = 9.10e-04 (tn = 1.00e-03 , tcur = 9.10e-04), ||y||_2 = 2.0396074962e+00] - [Pre-RHS processing (stage 2 of 4) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 9.10e-04), ||y||_2 = 2.0396074962e+00] - [Pre-RHS processing (stage 2 of 4) at t = 1.87e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.0395930192e+00] + [Pre-RHS (stage 2 of 4) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 9.10e-04), ||y||_2 = 2.0396074962e+00] + [Pre-RHS (stage 2 of 4) at t = 1.87e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.0395930192e+00] [Post-stage processing (stage 2 of 4) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.0395935467e+00] - [Pre-RHS processing (stage 3 of 4) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.0395935467e+00] - [Pre-RHS processing (stage 3 of 4) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.0395861214e+00] - [Post-stage processing (stage 3 of 4) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.0395862946e+00] - [Post-step processing at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03),||y||_2 = 2.0395862946e+00] + [Pre-RHS (stage 3 of 4) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.0395935467e+00] + [Pre-RHS (stage 3 of 4) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.0395861214e+00] + [Postprocess-step at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03),||y||_2 = 2.0395862946e+00] + [Post-step at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), step = 1, ||y||_2 = 2.0395862946e+00] 2.0000000000e-03 3.9998750018e-01 3.9999583342e-03 -1.2499635430e-02 1.9999375021e+00 - [Pre-step processing at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03),||y||_2 = 2.0395862946e+00] - [Pre-RHS processing (stage 0 of 4) at t = 2.13e-03 (tn = 2.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.0395862946e+00] - [Pre-RHS processing (stage 0 of 4) at t = 2.52e-03 (tn = 2.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.0395833769e+00] + [Pre-step at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), step = 2, attempt = 1, ||y||_2 = 2.0395862946e+00] + [Pre-RHS (stage 0 of 4) at t = 2.13e-03 (tn = 2.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.0395862946e+00] + [Pre-RHS (stage 0 of 4) at t = 2.52e-03 (tn = 2.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.0395833769e+00] [Post-stage processing (stage 0 of 4) at t = 2.13e-03 (tn = 2.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.0395843104e+00] - [Pre-RHS processing (stage 1 of 4) at t = 1.91e-03 (tn = 2.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.0395843104e+00] - [Pre-RHS processing (stage 1 of 4) at t = 2.43e-03 (tn = 2.00e-03 , tcur = 1.91e-03), ||y||_2 = 2.0395929317e+00] + [Pre-RHS (stage 1 of 4) at t = 1.91e-03 (tn = 2.00e-03 , tcur = 2.13e-03), ||y||_2 = 2.0395843104e+00] + [Pre-RHS (stage 1 of 4) at t = 2.43e-03 (tn = 2.00e-03 , tcur = 1.91e-03), ||y||_2 = 2.0395929317e+00] [Post-stage processing (stage 1 of 4) at t = 1.91e-03 (tn = 2.00e-03 , tcur = 1.91e-03), ||y||_2 = 2.0395927166e+00] - [Pre-RHS processing (stage 2 of 4) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 1.91e-03), ||y||_2 = 2.0395927166e+00] - [Pre-RHS processing (stage 2 of 4) at t = 2.87e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.0395695501e+00] + [Pre-RHS (stage 2 of 4) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 1.91e-03), ||y||_2 = 2.0395927166e+00] + [Pre-RHS (stage 2 of 4) at t = 2.87e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.0395695501e+00] [Post-stage processing (stage 2 of 4) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.0395704024e+00] - [Pre-RHS processing (stage 3 of 4) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.0395704024e+00] - [Pre-RHS processing (stage 3 of 4) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.0395591399e+00] - [Post-stage processing (stage 3 of 4) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.0395594079e+00] - [Post-step processing at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03),||y||_2 = 2.0395594079e+00] + [Pre-RHS (stage 3 of 4) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.0395704024e+00] + [Pre-RHS (stage 3 of 4) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.0395591399e+00] + [Postprocess-step at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03),||y||_2 = 2.0395594079e+00] + [Post-step at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), step = 2, ||y||_2 = 2.0395594079e+00] 3.0000000000e-03 3.9997187592e-01 5.9998593813e-03 -1.8748769629e-02 1.9998593855e+00 ------------------------------------------------------------------------------------------------------------------------------ Current time = 0.003 From 39ecd601c8ba1d3480169cafe9b1f716c131b2ec Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 12 Mar 2026 13:38:57 -0400 Subject: [PATCH 163/298] Updated documentation to capture upstream changes in stageprocessing branch --- .../guide/source/Usage/User_callable.rst | 149 +++++++++--------- .../guide/source/Usage/User_supplied.rst | 105 ++++++++++-- 2 files changed, 168 insertions(+), 86 deletions(-) diff --git a/doc/arkode/guide/source/Usage/User_callable.rst b/doc/arkode/guide/source/Usage/User_callable.rst index 96715532c8..5b364776c0 100644 --- a/doc/arkode/guide/source/Usage/User_callable.rst +++ b/doc/arkode/guide/source/Usage/User_callable.rst @@ -3497,48 +3497,51 @@ Step and stage processing optional inputs (ADVANCED) ARKODE provides multiple options for user-supplied callback routines that can be called at various times within the time-stepping process. -Each of these callback functions has the same structure, wherein the +Each of these callback functions has a similar structure, wherein the callback function will be provided with the current time, current solution, and the *user_data* structure that was provided to -:c:func:`ARKodeSetUserData`. Specifically, users may provide -separate callback functions for the following events within a time -step: +:c:func:`ARKodeSetUserData`; some functions are also provided the current +time step counter, or even a counter indicating how many times this step +has been attempted previously. More specifically, users may provide +callback functions for the following events within a time step: * just prior to starting a time step attempt - (:c:func:`ARKodeSetPreprocessStepFn`), + (:c:func:`ARKodeSetPreStepFn`), -* at the end of a successful time step, but before overwriting the - "saved" state (:c:func:`ARKodeSetPostprocessStepFn`), - -* at the end of a failed time step (e.g., but before the step is - reattempted (:c:func:`ARKodeSetPostprocessStepFailFn`), +* at the end of a successful time step (:c:func:`ARKodeSetPostStepFn`), * just prior to evaluating user-provided right-hand side (RHS) - functions (:c:func:`ARKodeSetPreRHSProcessFn`) + functions (:c:func:`ARKodeSetPreRHSFn`) * immediately after each stage is completed within a time step (:c:func:`ARKodeSetPostprocessStageFn`) +* at the end of each step attempt -- called with the temporary vector + containing the internal step, before it would overwrite the + "saved" state on a successful step (:c:func:`ARKodeSetPostprocessStepFn`), + For users who wish to perform different actions at individual internal stages within an ARKODE method, they may obtain the current stage index by calling :c:func:`ARKodeGetStageIndex` in their stage-level callback routines provided to -:c:func:`ARKodeSetPreRHSProcessFn` and :c:func:`ARKodeSetPostprocessStageFn`. +:c:func:`ARKodeSetPreRHSFn` and :c:func:`ARKodeSetPostprocessStageFn`. The specific ordering of these functions within a given step depends on whether each stage is explicit (as in ERKStep) or implicit (as in ARKStep or -MRIStep). Denoting the last "saved" time step as :math:`(t_n,y_n)`, the -time-evolving state within a step as :math:`(t_{cur},y_{cur})`, the functions -provided to the five above functions as ``PreprocessStep``, ``PostprocessStep``, -``PostprocessFailedStep``, ``PreRHSProcess``, and ``PostprocessStage``, and -denoting the IVP right hand side function as ``RHS``, then -the flow of a 3-stage explicit method would proceed as: +MRIStep). Denoting the most-recent "saved" time step as :math:`(t_n,y_n)`, +the time-evolving temporary state within a step as :math:`(t_{cur},y_{cur})`, +the functions provided to the five above functions as ``PreStep``, +``PostStep``, ``PreRHS``, ``PostprocessStage``, and ``PostprocessStep``, and +denoting the IVP right hand side function as ``RHS``, then the flow of a +3-stage explicit method would proceed as: + +0. Initialize ``attempt`` counter to 0 -1. Call ``PreprocessStep`` with :math:`(t_{cur},y_{cur})` +1. Call ``PreStep`` with :math:`(t_{cur},y_{cur})` 2. Stage 0 - a. Call ``PreRHSProcess`` with :math:`(t_{cur},y_{cur})` + a. Call ``PreRHS`` with :math:`(t_{cur},y_{cur})` b. Evaluate ``RHS`` at :math:`(t_{cur},y_{cur})` @@ -3548,7 +3551,7 @@ the flow of a 3-stage explicit method would proceed as: 3. Stage 1 - a. Call ``PreRHSProcess`` with :math:`(t_{cur},y_{cur})` + a. Call ``PreRHS`` with :math:`(t_{cur},y_{cur})` b. Evaluate ``RHS`` at :math:`(t_{cur},y_{cur})` @@ -3558,22 +3561,22 @@ the flow of a 3-stage explicit method would proceed as: 4. Stage 2 - a. Call ``PreRHSProcess`` with :math:`(t_{cur},y_{cur})` + a. Call ``PreRHS`` with :math:`(t_{cur},y_{cur})` b. Evaluate ``RHS`` at :math:`(t_{cur},y_{cur})` c. Update :math:`(t_{cur},y_{cur})` with the new time step solution - d. Call ``PostprocessStage`` with :math:`(t_{cur},y_{cur})` + d. Call ``PostprocessStep`` with :math:`(t_{cur},y_{cur})` 5. Check the local error. - a. If the step is successful then call ``PostProcessStep`` with + a. If the step is successful then call ``PostStep`` with :math:`(t_{cur},y_{cur})`, determine the next internal step size :math:`h_n`, and update :math:`(t_n,y_n) \gets (t_{cur},y_{cur})` - b. Else call ``PostProcessFailedStep`` with :math:`(t_{cur},y_{cur})`, - determine the next internal step size :math:`h_n`, and return to step 2. + b. Else rewind :math:`(t_{cur},y_{cur}) \gets (t_n,y_n)`, increment ``attempt`` + counter, determine the next internal step size :math:`h_n`, and return to step 1 Alternately, the flow of a 3-stage method that must perform a solve of some sort @@ -3582,57 +3585,59 @@ MRIstep) would proceed as follows. Here, we show the implicit-explicit approach since that also shows the relationship between both the implicit right-hand side function ``RHS_i`` and the explicit right-hand side function ``RHS_e``: -1. Call ``PreprocessStep`` with :math:`(t_{cur},y_{cur})` +0. Initialize ``attempt`` counter to 0 + +1. Call ``PreStep`` with :math:`(t_{cur},y_{cur})` 2. Stage 0 - a. Solve implicit system, calling ``PreRHSProcess`` and then ``RHS_i`` with + a. Solve implicit system, calling ``PreRHS`` and then ``RHS_i`` with :math:`(t_{cur},y_{cur})` at each solver iteration; at the end of this iteration :math:`(t_{cur},y_{cur})` holds the updated stage solution b. Call ``PostprocessStage`` with :math:`(t_{cur},y_{cur})` - c. Call ``PreRHSProcess`` with :math:`(t_{cur},y_{cur})` + c. Call ``PreRHS`` with :math:`(t_{cur},y_{cur})` d. Evaluate ``RHS_i`` and then ``RHS_e`` at :math:`(t_{cur},y_{cur})` 3. Stage 1 - a. Solve implicit system, calling ``PreRHSProcess`` and then ``RHS_i`` with + a. Solve implicit system, calling ``PreRHS`` and then ``RHS_i`` with :math:`(t_{cur},y_{cur})` at each solver iteration; at the end of this iteration :math:`(t_{cur},y_{cur})` holds the updated stage solution b. Call ``PostprocessStage`` with :math:`(t_{cur},y_{cur})` - c. Call ``PreRHSProcess`` with :math:`(t_{cur},y_{cur})` + c. Call ``PreRHS`` with :math:`(t_{cur},y_{cur})` d. Evaluate ``RHS_i`` and then ``RHS_e`` at :math:`(t_{cur},y_{cur})` 4. Stage 2 - a. Solve implicit system, calling ``PreRHSProcess`` and then ``RHS_i`` with + a. Solve implicit system, calling ``PreRHS`` and then ``RHS_i`` with :math:`(t_{cur},y_{cur})` at each solver iteration; at the end of this iteration :math:`(t_{cur},y_{cur})` holds the updated stage solution - b. Call ``PostprocessStage`` with :math:`(t_{cur},y_{cur})` + b. If the method is stiffly accurate, call ``PostprocessStep`` with :math:`(t_{cur},y_{cur})`, + else call ``PostprocessStage`` with :math:`(t_{cur},y_{cur})`, - c. Call ``PreRHSProcess`` with :math:`(t_{cur},y_{cur})` + c. Call ``PreRHS`` with :math:`(t_{cur},y_{cur})` d. Evaluate ``RHS_i`` and then ``RHS_e`` at :math:`(t_{cur},y_{cur})` 5. Update :math:`(t_{cur},y_{cur})` with the new time step solution -6. Call ``PostprocessStage`` with :math:`(t_{cur},y_{cur})` +6. If the method is not stiffly accurate, call ``PostprocessStep`` with :math:`(t_{cur},y_{cur})` 7. Check the local error. - a. If the step is successful then call ``PostProcessStep`` with + a. If the step is successful then call ``PostStep`` with :math:`(t_{cur},y_{cur})`, determine the next internal step size :math:`h_n`, and update :math:`(t_n,y_n) \gets (t_{cur},y_{cur})` - b. Else call ``PostProcessFailedStep`` with :math:`(t_{n},y_{n})`, - update :math:`(t_{cur},y_{cur}) \gets (t_n,y_n)`, determine the next - internal step size :math:`h_n`, and return to step 2. + b. Else rewind :math:`(t_{cur},y_{cur}) \gets (t_n,y_n)`, increment ``attempt`` + counter, determine the next internal step size :math:`h_n`, and return to step 1 We consider these as "advanced" because of their danger, although the callback functions are provided with the internally-evolving state, @@ -3654,28 +3659,26 @@ and :c:func:`ARKodeSetAdjointCheckpointIndex`). ================================================= ========================================== ======================= Optional input Function name Default ================================================= ========================================== ======================= -Set time step preprocessing function :c:func:`ARKodeSetPreprocessStepFn` ``NULL`` +Set pre time step function :c:func:`ARKodeSetPreStepFn` ``NULL`` +Set post time step function :c:func:`ARKodeSetPostStepFn` ``NULL`` +Set pre right-hand side function :c:func:`ARKodeSetPreRHSFn` ``NULL`` +Set stage postprocessing function :c:func:`ARKodeSetPostprocessStageFn` ``NULL`` Set time step postprocessing function :c:func:`ARKodeSetPostprocessStepFn` ``NULL`` -Set failed time step postrocessing function :c:func:`ARKodeSetPostprocessStepFailFn` ``NULL`` -Set right-hand side preprocessing function :c:func:`ARKodeSetPreRHSProcessFn` ``NULL`` -Set stage postprocessing function. :c:func:`ARKodeSetPostprocessStageFn` ``NULL`` ================================================= ========================================== ======================= -.. c:function:: int ARKodeSetPreprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep) +.. c:function:: int ARKodeSetPreStepFn(void* arkode_mem, ARKPreStepFn PreStep) - [ADVANCED] Provides a function to be called before each time step. A ``NULL`` - input function disables step preprocessing. If a user-supplied failed-step postprocessing - function is supplied by calling :c:func:`ARKodeSetPostprocessStepFailFn`, then - preprocessing will not be called on the step attempt that immediately follows a failed step. + [ADVANCED] Provides a function to be called before each time step attempt. A ``NULL`` + input function disables these calls. This should **not** adjust the state vector itself. It is designed to allow users to set up auxiliary data structures that they will use within the time step (e.g., in their right-hand side function(s)). :param arkode_mem: pointer to the ARKODE memory block. - :param ProcessStep: the user-supplied function to call. + :param PreStep: the user-supplied function to call. :retval ARK_SUCCESS: the function exited successfully. :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. @@ -3688,16 +3691,16 @@ Set stage postprocessing function. :c:func:`ARKodeSetPostprocess .. versionadded:: x.y.z -.. c:function:: int ARKodeSetPostprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep) +.. c:function:: int ARKodeSetPostStepFn(void* arkode_mem, ARKPostStepFn PostStep) [ADVANCED] Provides a function to be called following each successful time step. A ``NULL`` - input function disables step postprocessing. + input function disables these calls. This should **not** adjust the state vector itself. It is designed to allow users to compute - relevant diagnostic information after each step. + relevant diagnostic information after each successful step. :param arkode_mem: pointer to the ARKODE memory block. - :param ProcessStep: the user-supplied function to call. + :param PostStep: the user-supplied function to call. :retval ARK_SUCCESS: the function exited successfully. :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. @@ -3708,16 +3711,19 @@ Set stage postprocessing function. :c:func:`ARKodeSetPostprocess theoretical guarantees of solution accuracy and stability are lost. -.. c:function:: int ARKodeSetPostprocessStepFailFn(void* arkode_mem, ARKPostProcessFn ProcessStep) +.. c:function:: int ARKodeSetPreRHSFn(void* arkode_mem, ARKPreRhsFn PreRhs) - [ADVANCED] Provides a function to be called following each failed time step. A ``NULL`` - input function disables failed step postprocessing. + [ADVANCED] Provides a function to be called prior to evaluating user-provided right-hand + side (RHS) functions. For partitioned methods (e.g., ARKStep or MRIStep), that will call + multiple RHS functions with identical inputs, this is called only once prior to the first + RHS evaluation. A ``NULL`` input function disables these calls. - This should **not** adjust the state vector itself. It is designed to allow users to reset - any relevant diagnostic information they may have accumulated within a rejected time step. + This should **not** adjust the state vector itself. It is designed to allow users to set up + auxiliary data structures that will be used within the RHS evaluations (e.g., MPI communication + to fill and send exchange buffers). :param arkode_mem: pointer to the ARKODE memory block. - :param ProcessStep: the user-supplied function to call. + :param PreRhs: the user-supplied function to call. :retval ARK_SUCCESS: the function exited successfully. :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. @@ -3730,19 +3736,16 @@ Set stage postprocessing function. :c:func:`ARKodeSetPostprocess .. versionadded:: x.y.z -.. c:function:: int ARKodeSetPreRHSProcessFn(void* arkode_mem, ARKPostProcessFn ProcessStep) +.. c:function:: int ARKodeSetPostprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStage) - [ADVANCED] Provides a function to be called prior to evaluating user-provided right-hand - side (RHS) functions. For partitioned methods (e.g., ARKStep or MRIStep), that will call - multiple RHS functions with identical inputs, this is called only once prior to the first - RHS evaluation. A ``NULL`` input function disables RHS preprocessing. + [ADVANCED] Provides a function to be called immediately after each stage is completed within + ARKODE's multi-stage methods. A ``NULL`` input function disables stage postprocessing. - This should **not** adjust the state vector itself. It is designed to allow users to set up - auxiliary data structures that will be used within the RHS evaluations (e.g., MPI communication - to fill and send exchange buffers). + This should **not** adjust the state vector itself. It is designed to allow users to compute + relevant diagnostic information within each step. :param arkode_mem: pointer to the ARKODE memory block. - :param ProcessStep: the user-supplied function to call. + :param ProcessStage: the user-supplied function to call. :retval ARK_SUCCESS: the function exited successfully. :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. @@ -3752,16 +3755,14 @@ Set stage postprocessing function. :c:func:`ARKodeSetPostprocess If the supplied function modifies any of the active state data, then all theoretical guarantees of solution accuracy and stability are lost. - .. versionadded:: x.y.z - -.. c:function:: int ARKodeSetPostprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStep) +.. c:function:: int ARKodeSetPostprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep) - [ADVANCED] Provides a function to be called immediately after each stage is completed within - ARKODE's multi-stage methods. A ``NULL`` input function disables stage postprocessing. + [ADVANCED] Provides a function to be called following each attempted time step. A ``NULL`` + input function disables step postprocessing. This should **not** adjust the state vector itself. It is designed to allow users to compute - relevant diagnostic information within each step. + relevant diagnostic information after each step attempt. :param arkode_mem: pointer to the ARKODE memory block. :param ProcessStep: the user-supplied function to call. diff --git a/doc/arkode/guide/source/Usage/User_supplied.rst b/doc/arkode/guide/source/Usage/User_supplied.rst index 28075d430c..05aa11d56e 100644 --- a/doc/arkode/guide/source/Usage/User_supplied.rst +++ b/doc/arkode/guide/source/Usage/User_supplied.rst @@ -1111,18 +1111,100 @@ Relaxation Jacobian function Step and stage processing functions ------------------------------------ -The user may supply functions of type :c:type:`ARKPostProcessFn` that will be -called before each internal time step (:c:func:`ARKodeSetPreprocessStepFn`), after -each successful internal time step (:c:func:`ARKodeSetPostprocessStepFn`), after each -failed internal time step (:c:func:`ARKodeSetPostprocessStepFailFn`), before user-supplied -right-hand side function(s) are called on an updated state (:c:func:`ARKodeSetPreRHSProcessFn`), -or after each internal stage is computed (:c:func:`ARKodeSetPostprocessStageFn`). +The user may supply functions that will be called before/after each internal time +step, before their :c:type:`ARKRhsFn` problem-defining functions are called, and +after each internal stage. These user-supplied functions vary slightly in type, +depending on their use case, as outlined below. Such functions are typically used +for applications that compute auxiliary diagnostic data between time steps or stages, +and store that data in their `user_data` pointer or output to screen or disk. +Alternately, some may be used to better prepare auxiliary data for an upcoming time +step or :c:type:`ARKRhsFn` evaluation. **These should not be used to modify the +active state data; if so then all theoretical guarantees of solution accuracy and +stability will be lost.** +A user-provided :c:type:`ARKPreStepFn` will be called before each internal time +step attempt by ARKODE (see :c:func:`ARKSetPreStepFn`). + +.. c:type:: int (*ARKPreStepFn)(sunrealtype t, N_Vector y, long int step, int attempt, void* user_data) + + :param t: the current value of the independent variable. + :param y: the current value of the dependent variable vector that will be used + as the initial condition for the upcoming step. + :param step: the step index (starting from the first internal step since ARKODE + was (re-)initialized). + :param attempt: a counter indicating which attempt at the step is about to + occur -- 0 indicates that the previous step succeeded and this + is the first attempt the step `step`, while a number greater than + 0 indicates that the previous step attempt failed and this is a + subsequent try at computing the step `step`. + :param user_data: the ``user_data`` pointer that was passed to + :c:func:`ARKodeSetUserData`. + + :return: An :c:func:`ARKPreStepFn` function should return 0 if successful, a + positive value if a recoverable error occurred, or a negative value if an + unrecoverable error occurred. + + .. danger:: + + If the supplied function modifies any of the active state data, then all + theoretical guarantees of solution accuracy and stability are lost. + + .. versionadded:: x.y.z + +A user-provided :c:type:`ARKPostStepFn` will be called following each *successful* internal time +step by ARKODE (see :c:func:`ARKSetPostStepFn`). + +.. c:type:: int (*ARKPostStepFn)(sunrealtype t, N_Vector y, long int step, void* user_data) + + :param t: the current value of the independent variable. + :param y: the current value of the dependent variable vector that resulted from + the successful time step. + :param step: the step index (starting from the first internal step since ARKODE + was (re-)initialized). + :param user_data: the ``user_data`` pointer that was passed to + :c:func:`ARKodeSetUserData`. + + :return: An :c:func:`ARKPostStepFn` function should return 0 if successful, a + positive value if a recoverable error occurred, or a negative value if an + unrecoverable error occurred. + + .. danger:: + + If the supplied function modifies any of the active state data, then all + theoretical guarantees of solution accuracy and stability are lost. + + .. versionadded:: x.y.z + +A user-provided :c:type:`ARKPreRhsFn` will be called just prior to any user-supplied :c:type:`ARKRhsFn` (see :c:func:`ARKSetPreRhsFn`). In the case of partitioned integration methods (e.g., ARKStep, MRIStep), if multiple :c:type:`ARKRhsFn` will be called with the same :math:`(t,y)` argument, then the :c:type:`ARKPreRhsFn` will be called only once just prior to the first :c:type:`ARKRhsFn` that will be called with that :math:`(t,y)` input. + +.. c:type:: int (*ARKPreRhsFn)(sunrealtype t, N_Vector y, void* user_data) + + :param t: the current value of the independent variable that will be provided + to the :c:type:`ARKRhsFn`. + :param y: the current value of the dependent variable vector that will be + provided to the :c:type:`ARKRhsFn`. + :param user_data: the ``user_data`` pointer that was passed to + :c:func:`ARKodeSetUserData`. + + :return: An :c:func:`ARKPreRhsFn` function should return 0 if successful, a + positive value if a recoverable error occurred, or a negative value if an + unrecoverable error occurred. + + .. danger:: + + If the supplied function modifies any of the active state data, then all + theoretical guarantees of solution accuracy and stability are lost. + + .. versionadded:: x.y.z + +A user-provided :c:type:`ARKPostProcessFn` will be called either after each internal stage (see :c:func:`ARKodeSetPostprocessStageFn`) or after each internal step attempt (see :c:func:`ARKodeSetPostprocessStepFn`). + .. c:type:: int (*ARKPostProcessFn)(sunrealtype t, N_Vector y, void* user_data) :param t: the current value of the independent variable. - :param y: the current value of the dependent variable vector. + :param y: the current value of the dependent variable vector resulting from + the step or stage. :param user_data: the ``user_data`` pointer that was passed to :c:func:`ARKodeSetUserData`. @@ -1130,10 +1212,9 @@ or after each internal stage is computed (:c:func:`ARKodeSetPostprocessStageFn`) positive value if a recoverable error occurred, or a negative value if an unrecoverable error occurred. - .. warning:: + .. danger:: - These functions are currently incompatible with discrete adjoint capabilities in ARKODE - (:c:func:`ARKodeSetAdjointCheckpointScheme` and :c:func:`ARKodeSetAdjointCheckpointIndex`). + If the supplied function modifies any of the active state data, then all + theoretical guarantees of solution accuracy and stability are lost. - IF THE SUPPLIED FUNCTION MODIFIES ANY OF THE ACTIVE STATE DATA IN *y*, THEN ALL - THEORETICAL GUARANTEES OF SOLUTION ACCURACY AND STABILITY ARE LOST. + .. versionadded:: x.y.z From 63145ee5acbd1a1cf1c7ed76a3d4539d0835adbb Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 13 Mar 2026 08:41:24 -0400 Subject: [PATCH 164/298] Minor cleanup to step flow in docs --- doc/arkode/guide/source/Usage/User_callable.rst | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/doc/arkode/guide/source/Usage/User_callable.rst b/doc/arkode/guide/source/Usage/User_callable.rst index 5b364776c0..b729336a4e 100644 --- a/doc/arkode/guide/source/Usage/User_callable.rst +++ b/doc/arkode/guide/source/Usage/User_callable.rst @@ -3567,9 +3567,14 @@ denoting the IVP right hand side function as ``RHS``, then the flow of a c. Update :math:`(t_{cur},y_{cur})` with the new time step solution - d. Call ``PostprocessStep`` with :math:`(t_{cur},y_{cur})` + d. If the method is FSAL (the last stage is the time step solution), + call ``PostprocessStep`` with :math:`(t_{cur},y_{cur})`, else call + ``PostprocessStage`` with :math:`(t_{cur},y_{cur})`. -5. Check the local error. +5. If the method is not FSAL, update :math:`(t_{cur},y_{cur})` with the + new time step solution and call ``PostprocessStep``. + +6. Check the local error. a. If the step is successful then call ``PostStep`` with :math:`(t_{cur},y_{cur})`, determine the next internal step size :math:`h_n`, @@ -3626,11 +3631,10 @@ function ``RHS_i`` and the explicit right-hand side function ``RHS_e``: d. Evaluate ``RHS_i`` and then ``RHS_e`` at :math:`(t_{cur},y_{cur})` -5. Update :math:`(t_{cur},y_{cur})` with the new time step solution - -6. If the method is not stiffly accurate, call ``PostprocessStep`` with :math:`(t_{cur},y_{cur})` +5. If the method is not stiffly accurate, update :math:`(t_{cur},y_{cur})` with the new + time step solution and call ``PostprocessStep``. -7. Check the local error. +6. Check the local error. a. If the step is successful then call ``PostStep`` with :math:`(t_{cur},y_{cur})`, determine the next internal step size From c4929da7f4fae0d1eb0b2c1c212d31972d927d57 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 13 Mar 2026 10:47:54 -0400 Subject: [PATCH 165/298] Fixed CHANGELOG and RecentChanges files --- CHANGELOG.md | 12 ++++++------ doc/shared/RecentChanges.rst | 17 ++++++++--------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1aab663cc9..1cfa1a0a25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,12 +21,12 @@ and `ARKODE_LSRK_SSP_S_3` in LSRKStep were changed from 10 and 9, respectively, their minimum allowable values of 2 and 4. Users may revert to the previous values by calling `LSRKStepSetNumSSPStages`. -ARKODE now allows users to supply functions that will be called before each internal -time step, after each successful time step, after each failed time step, before -right-hand side routines are called on an updated state, and/or once each internal -stage is computed (`ARKodeSetPreprocessStepFn`, `ARKodeSetPostprocessStepFn`, -`ARKodeSetPostprocessStepFailFn`, `ARKodeSetPreRHSProcessFn`, and -`ARKodeSetPostprocessStageFn`). These are considered **advanced** functions, as they +ARKODE now allows users to supply functions that will be called before before right-hand +side routines are called on an updated state, before each internal time step attempt, +after each internal time step attempt, after each internal stage, and after each +successful time step (`ARKodeSetPreRHSFn`, `ARKodeSetPreStepFn`, +`ARKodeSetPostprocessStepFn`, `ARKodeSetPostprocessStageFn`, and +`ARKodeSetPostStepFn`). These are considered **advanced** functions, as they should treat the state vector as read-only, otherwise all theoretical guarantees of solution accuracy and stability will be lost. diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index 8679e605ba..10b29ccfe2 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -20,15 +20,14 @@ and :c:enumerator:`ARKODE_LSRK_SSP_S_3` in LSRKStep were changed from 10 and 9, their minimum allowable values of 2 and 4. Users may revert to the previous values by calling :c:func:`LSRKStepSetNumSSPStages`. -ARKODE now allows users to supply functions that will be called before each internal -time step, after each successful time step, after each failed time step, before -right-hand side routines are called on an updated state, and/or once each internal -stage is computed (:c:func:`ARKodeSetPreprocessStepFn`, -:c:func:`ARKodeSetPostprocessStepFn`, :c:func:`ARKodeSetPostprocessStepFailFn`, -:c:func:`ARKodeSetPreRHSProcessFn`, and :c:func:`ARKodeSetPostprocessStageFn`). -These are considered **advanced** functions, as they should treat the state vector as -read-only, otherwise all theoretical guarantees of solution accuracy and stability -will be lost. +ARKODE now allows users to supply functions that will be called before before right-hand +side routines are called on an updated state, before each internal time step attempt, +after each internal time step attempt, after each internal stage, and after each +successful time step (:c:func:`ARKodeSetPreRHSFn`, :c:func:`ARKodeSetPreStepFn`, +:c:func:`ARKodeSetPostprocessStepFn`, :c:func:`ARKodeSetPostprocessStageFn`, and +:c:func:`ARKodeSetPostStepFn`). These are considered **advanced** functions, as they +should treat the state vector as read-only, otherwise all theoretical guarantees of +solution accuracy and stability will be lost. **Bug Fixes** From cbba76d501c2d4665216499f879d40cca7a46b67 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 13 Mar 2026 12:29:04 -0400 Subject: [PATCH 166/298] Fixed minor typos --- doc/arkode/guide/source/Usage/User_supplied.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/arkode/guide/source/Usage/User_supplied.rst b/doc/arkode/guide/source/Usage/User_supplied.rst index 05aa11d56e..4b82a0e30a 100644 --- a/doc/arkode/guide/source/Usage/User_supplied.rst +++ b/doc/arkode/guide/source/Usage/User_supplied.rst @@ -1124,7 +1124,7 @@ stability will be lost.** A user-provided :c:type:`ARKPreStepFn` will be called before each internal time -step attempt by ARKODE (see :c:func:`ARKSetPreStepFn`). +step attempt by ARKODE (see :c:func:`ARKodeSetPreStepFn`). .. c:type:: int (*ARKPreStepFn)(sunrealtype t, N_Vector y, long int step, int attempt, void* user_data) @@ -1153,7 +1153,7 @@ step attempt by ARKODE (see :c:func:`ARKSetPreStepFn`). .. versionadded:: x.y.z A user-provided :c:type:`ARKPostStepFn` will be called following each *successful* internal time -step by ARKODE (see :c:func:`ARKSetPostStepFn`). +step by ARKODE (see :c:func:`ARKodeSetPostStepFn`). .. c:type:: int (*ARKPostStepFn)(sunrealtype t, N_Vector y, long int step, void* user_data) @@ -1176,7 +1176,7 @@ step by ARKODE (see :c:func:`ARKSetPostStepFn`). .. versionadded:: x.y.z -A user-provided :c:type:`ARKPreRhsFn` will be called just prior to any user-supplied :c:type:`ARKRhsFn` (see :c:func:`ARKSetPreRhsFn`). In the case of partitioned integration methods (e.g., ARKStep, MRIStep), if multiple :c:type:`ARKRhsFn` will be called with the same :math:`(t,y)` argument, then the :c:type:`ARKPreRhsFn` will be called only once just prior to the first :c:type:`ARKRhsFn` that will be called with that :math:`(t,y)` input. +A user-provided :c:type:`ARKPreRhsFn` will be called just prior to any user-supplied :c:type:`ARKRhsFn` (see :c:func:`ARKodeSetPreRhsFn`). In the case of partitioned integration methods (e.g., ARKStep, MRIStep), if multiple :c:type:`ARKRhsFn` will be called with the same :math:`(t,y)` argument, then the :c:type:`ARKPreRhsFn` will be called only once just prior to the first :c:type:`ARKRhsFn` that will be called with that :math:`(t,y)` input. .. c:type:: int (*ARKPreRhsFn)(sunrealtype t, N_Vector y, void* user_data) From d70df42aa6cbec4723537a5a495b92d33586c326 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 13 Mar 2026 14:15:25 -0400 Subject: [PATCH 167/298] Fixed capitalization --- doc/arkode/guide/source/Usage/User_callable.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/arkode/guide/source/Usage/User_callable.rst b/doc/arkode/guide/source/Usage/User_callable.rst index b729336a4e..278cf980a2 100644 --- a/doc/arkode/guide/source/Usage/User_callable.rst +++ b/doc/arkode/guide/source/Usage/User_callable.rst @@ -3511,7 +3511,7 @@ callback functions for the following events within a time step: * at the end of a successful time step (:c:func:`ARKodeSetPostStepFn`), * just prior to evaluating user-provided right-hand side (RHS) - functions (:c:func:`ARKodeSetPreRHSFn`) + functions (:c:func:`ARKodeSetPreRhsFn`) * immediately after each stage is completed within a time step (:c:func:`ARKodeSetPostprocessStageFn`) @@ -3524,7 +3524,7 @@ For users who wish to perform different actions at individual internal stages within an ARKODE method, they may obtain the current stage index by calling :c:func:`ARKodeGetStageIndex` in their stage-level callback routines provided to -:c:func:`ARKodeSetPreRHSFn` and :c:func:`ARKodeSetPostprocessStageFn`. +:c:func:`ARKodeSetPreRhsFn` and :c:func:`ARKodeSetPostprocessStageFn`. The specific ordering of these functions within a given step depends on whether each stage is explicit (as in ERKStep) or implicit (as in ARKStep or @@ -3665,7 +3665,7 @@ Optional input Function name ================================================= ========================================== ======================= Set pre time step function :c:func:`ARKodeSetPreStepFn` ``NULL`` Set post time step function :c:func:`ARKodeSetPostStepFn` ``NULL`` -Set pre right-hand side function :c:func:`ARKodeSetPreRHSFn` ``NULL`` +Set pre right-hand side function :c:func:`ARKodeSetPreRhsFn` ``NULL`` Set stage postprocessing function :c:func:`ARKodeSetPostprocessStageFn` ``NULL`` Set time step postprocessing function :c:func:`ARKodeSetPostprocessStepFn` ``NULL`` ================================================= ========================================== ======================= @@ -3715,7 +3715,7 @@ Set time step postprocessing function :c:func:`ARKodeSetPostprocess theoretical guarantees of solution accuracy and stability are lost. -.. c:function:: int ARKodeSetPreRHSFn(void* arkode_mem, ARKPreRhsFn PreRhs) +.. c:function:: int ARKodeSetPreRhsFn(void* arkode_mem, ARKPreRhsFn PreRhs) [ADVANCED] Provides a function to be called prior to evaluating user-provided right-hand side (RHS) functions. For partitioned methods (e.g., ARKStep or MRIStep), that will call From a4e900f1a1625bf6396ed69581bcb55940569475 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 13 Mar 2026 18:47:56 -0400 Subject: [PATCH 168/298] Fixed capitalization --- CHANGELOG.md | 2 +- doc/shared/RecentChanges.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cfa1a0a25..e4c50eb6d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,7 +24,7 @@ by calling `LSRKStepSetNumSSPStages`. ARKODE now allows users to supply functions that will be called before before right-hand side routines are called on an updated state, before each internal time step attempt, after each internal time step attempt, after each internal stage, and after each -successful time step (`ARKodeSetPreRHSFn`, `ARKodeSetPreStepFn`, +successful time step (`ARKodeSetPreRhsFn`, `ARKodeSetPreStepFn`, `ARKodeSetPostprocessStepFn`, `ARKodeSetPostprocessStageFn`, and `ARKodeSetPostStepFn`). These are considered **advanced** functions, as they should treat the state vector as read-only, otherwise all theoretical guarantees of diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index 10b29ccfe2..8dc513bba6 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -23,7 +23,7 @@ their minimum allowable values of 2 and 4. Users may revert to the previous valu ARKODE now allows users to supply functions that will be called before before right-hand side routines are called on an updated state, before each internal time step attempt, after each internal time step attempt, after each internal stage, and after each -successful time step (:c:func:`ARKodeSetPreRHSFn`, :c:func:`ARKodeSetPreStepFn`, +successful time step (:c:func:`ARKodeSetPreRhsFn`, :c:func:`ARKodeSetPreStepFn`, :c:func:`ARKodeSetPostprocessStepFn`, :c:func:`ARKodeSetPostprocessStageFn`, and :c:func:`ARKodeSetPostStepFn`). These are considered **advanced** functions, as they should treat the state vector as read-only, otherwise all theoretical guarantees of From 3f7ffa95ec8f6dc49d6d289243cbc89896f1de58 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 15 Mar 2026 13:49:57 -0700 Subject: [PATCH 169/298] add space --- .github/actions/test-driver/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/test-driver/action.yml b/.github/actions/test-driver/action.yml index 65b0d877e2..9427be71b0 100644 --- a/.github/actions/test-driver/action.yml +++ b/.github/actions/test-driver/action.yml @@ -42,6 +42,6 @@ runs: --env env/docker.sh \ --tpls ${{ inputs.tpls }} \ --sunrealtype ${{ inputs.precision }} \ - --indexsize ${{ inputs.indexsize }}\ + --indexsize ${{ inputs.indexsize }} \ ${extra_args} shell: bash From a47a9ffe1c81cefa1403d3af83b99c9bfe9243ea Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 15 Mar 2026 15:28:42 -0700 Subject: [PATCH 170/298] update documentation for new functions --- CHANGELOG.md | 16 +- .../guide/source/Usage/User_callable.rst | 133 ++++++++-------- .../guide/source/Usage/User_supplied.rst | 150 +++++++++++++++--- doc/shared/RecentChanges.rst | 17 +- 4 files changed, 215 insertions(+), 101 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 22216ca69a..9e164d64ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,14 +6,14 @@ ### New Features and Enhancements -ARKODE now allows users to supply functions that will be called before each internal -time step, after each successful time step, after each failed time step, before -right-hand side routines are called on an updated state, and/or once each internal -stage is computed (`ARKodeSetPreprocessStepFn`, `ARKodeSetPostprocessStepFn`, -`ARKodeSetPostprocessStepFailFn`, `ARKodeSetPreRHSProcessFn`, and -`ARKodeSetPostprocessStageFn`). These are considered **advanced** functions, as they -should treat the state vector as read-only, otherwise all theoretical guarantees of -solution accuracy and stability will be lost. +ARKODE now allows users to supply functions that will be called before each +internal time step attempt (`ARKodeSetPreStepFn`), after each successful time +step (`ARKodeSetPostStepFn`), before right-hand side routines are called on an +updated state (`ARKodeSetPreRhsFn`), and/or once each internal stage/stage is +computed (`ARKodeSetPostprocessStepFn`/ `ARKodeSetPostprocessStageFn`). These +are considered **advanced** functions, as they should treat the state vector as +read-only, otherwise all theoretical guarantees of solution accuracy and +stability will be lost. ### Bug Fixes diff --git a/doc/arkode/guide/source/Usage/User_callable.rst b/doc/arkode/guide/source/Usage/User_callable.rst index fcd90383c1..91e2bb443a 100644 --- a/doc/arkode/guide/source/Usage/User_callable.rst +++ b/doc/arkode/guide/source/Usage/User_callable.rst @@ -912,11 +912,11 @@ Set max number of constraint failures :c:func:`ARKodeSetMaxNumConst Set the checkpointing scheme to use (for adjoint) :c:func:`ARKodeSetAdjointCheckpointScheme` ``NULL`` Set the checkpointing step index (for adjoint) :c:func:`ARKodeSetAdjointCheckpointIndex` 0 Use compensated summation for accumulating time :c:func:`ARKodeSetUseCompensatedSums` ``SUNFALSE`` -Set time step preprocessing function :c:func:`ARKodeSetPreprocessStepFn` ``NULL`` -Set time step postprocessing function :c:func:`ARKodeSetPostprocessStepFn` ``NULL`` -Set failed time step postrocessing function :c:func:`ARKodeSetPostprocessStepFailFn` ``NULL`` -Set pre right-hand side processing function :c:func:`ARKodeSetPreRHSProcessFn` ``NULL`` -Set stage postprocessing function. :c:func:`ARKodeSetPostprocessStageFn` ``NULL`` +Set pre time step function :c:func:`ARKodeSetPreStepFn` ``NULL`` +Set post time step function :c:func:`ARKodeSetPostStepFn` ``NULL`` +Set pre right-hand side function :c:func:`ARKodeSetPreRhsFn` ``NULL`` +Set step postprocessing function :c:func:`ARKodeSetPostprocessStepFn` ``NULL`` +Set stage postprocessing function :c:func:`ARKodeSetPostprocessStageFn` ``NULL`` ================================================= ========================================== ======================= @@ -1633,120 +1633,129 @@ Set stage postprocessing function. :c:func:`ARKodeSetPostprocess when using the key "arkid.use_compensated_sums". -.. c:function:: int ARKodeSetPreprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep) +.. c:function:: int ARKodeSetPreStepFn(void* arkode_mem, ARKPreStepFn prestep_fn) - [ADVANCED] Provides a function to be called before each time step. A ``NULL`` - input function disables step preprocessing. If a user-supplied failed-step postprocessing - function is supplied by calling :c:func:`ARKodeSetPostprocessStepFailFn`, then - preprocessing will not be called on the step attempt that immediately follows a failed step. + [ADVANCED] Provide a function to be called before each step attempt. - This should **not** adjust the state vector itself. It is designed to allow users to set - up auxiliary data structures that they will use within the time step (e.g., in their - right-hand side function(s)). - - :param arkode_mem: pointer to the ARKODE memory block. - :param ProcessStep: the user-supplied function to call. - - :retval ARK_SUCCESS: the function exited successfully. - :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. + The attached function allows users to set up auxiliary data structures that + only need to be updated at the start of a step and can be reused within the + time step (e.g., in their right-hand side function(s)). .. danger:: If the supplied function modifies any of the active state data, then all theoretical guarantees of solution accuracy and stability are lost. - .. versionadded:: x.y.z + :param arkode_mem: pointer to the ARKODE memory block. + :param prestep_fn: the user-supplied function to call. A ``NULL`` input + function disables calling a prestep function. + :retval ARK_SUCCESS: the function exited successfully. + :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. -.. c:function:: int ARKodeSetPostprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep) + .. versionadded:: x.y.z - [ADVANCED] Provides a function to be called following each successful time step. A ``NULL`` - input function disables step postprocessing. - This should **not** adjust the state vector itself. It is designed to allow users to compute - relevant diagnostic information after each step. +.. c:function:: int ARKodeSetPostStepFn(void* arkode_mem, ARKPostStepFn poststep_fn) - :param arkode_mem: pointer to the ARKODE memory block. - :param ProcessStep: the user-supplied function to call. + [ADVANCED] Provide a function to be called following each successful time + step. - :retval ARK_SUCCESS: the function exited successfully. - :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. + The attached function allows users to compute relevant diagnostic information + after each step. .. danger:: If the supplied function modifies any of the active state data, then all theoretical guarantees of solution accuracy and stability are lost. + :param arkode_mem: pointer to the ARKODE memory block. + :param poststep_fn: the user-supplied function to call. A ``NULL`` input + function disables calling a poststep function. + + :retval ARK_SUCCESS: the function exited successfully. + :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. -.. c:function:: int ARKodeSetPostprocessStepFailFn(void* arkode_mem, ARKPostProcessFn ProcessStep) + .. versionadded:: x.y.z - [ADVANCED] Provides a function to be called following each failed time step. A ``NULL`` - input function disables failed step postprocessing. The ``ProcessStep`` function will be called - with the :math:`(t,y)` that corresponds with the saved state to be used as the initial condition - for the upcoming step attempt. - This should **not** adjust the state vector itself. It is designed to allow users to reset - any relevant diagnostic information they may have accumulated within a rejected time step. +.. c:function:: int ARKodeSetPreRhsFn(void* arkode_mem, ARKPreRhsFn prerhs_fn) - :param arkode_mem: pointer to the ARKODE memory block. - :param ProcessStep: the user-supplied function to call. + [ADVANCED] Provides a function to be called prior to evaluating user-provided + right-hand side (RHS) functions. For partitioned methods with multiple RHS + functions (e.g., ARKStep or MRIStep), when multiple RHS functions will be + called in succession with identical inputs, this function is called only once + prior to the RHS function evaluations. - :retval ARK_SUCCESS: the function exited successfully. - :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. + The attached function allows users to set up auxiliary data structures that + will be used within the RHS evaluations (e.g., MPI communication to fill and + send exchange buffers). .. danger:: If the supplied function modifies any of the active state data, then all theoretical guarantees of solution accuracy and stability are lost. + :param arkode_mem: pointer to the ARKODE memory block. + :param prerhs_fn: the user-supplied function to call. A ``NULL`` input + function disables calling a pre-RHS function. + + :retval ARK_SUCCESS: the function exited successfully. + :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. + .. versionadded:: x.y.z -.. c:function:: int ARKodeSetPreRHSProcessFn(void* arkode_mem, ARKPostProcessFn PreRHSProcess) +.. c:function:: int ARKodeSetPostprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep) + + [ADVANCED] Provides a function to be called immediately after computing a new + step but before the step is accepted/rejected. - [ADVANCED] Provides a function to be called prior to evaluating user-provided right-hand - side (RHS) functions. For partitioned methods (e.g., ARKStep or MRIStep), that will call - multiple RHS functions with identical inputs, this is called only once prior to the first - RHS evaluation. A ``NULL`` input function disables RHS preprocessing. + .. danger:: - This should **not** adjust the state vector itself. It is designed to allow users to set up - auxiliary data structures that will be used within the RHS evaluations (e.g., MPI communication - to fill and send exchange buffers). + If the supplied function modifies any of the active state data, then all + theoretical guarantees of solution accuracy and stability are lost. :param arkode_mem: pointer to the ARKODE memory block. - :param PreRHSProcess: the user-supplied function to call. + :param ProcessStep: the user-supplied function to call. A ``NULL`` input + function disables step postprocessing. :retval ARK_SUCCESS: the function exited successfully. :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. - .. danger:: + .. versionadded:: x.y.z - If the supplied function modifies any of the active state data, then all - theoretical guarantees of solution accuracy and stability are lost. + .. warning:: - .. versionadded:: x.y.z + This function is currently incompatible with discrete adjoint capabilities + in ARKODE (:c:func:`ARKodeSetAdjointCheckpointScheme` and + :c:func:`ARKodeSetAdjointCheckpointIndex`). .. c:function:: int ARKodeSetPostprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStage) - [ADVANCED] Provides a function to be called immediately after each stage is completed within - ARKODE's multi-stage methods. A ``NULL`` input function disables stage postprocessing. + [ADVANCED] Provides a function to be called immediately after each stage is + completed within ARKODE's multi-stage methods. + + .. danger:: - This should **not** adjust the state vector itself. It is designed to allow users to compute - relevant diagnostic information within each step. + If the supplied function modifies any of the active state data, then all + theoretical guarantees of solution accuracy and stability are lost. :param arkode_mem: pointer to the ARKODE memory block. - :param ProcessStage: the user-supplied function to call. + :param ProcessStage: the user-supplied function to call. A ``NULL`` input + function disables stage postprocessing. :retval ARK_SUCCESS: the function exited successfully. :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. - .. danger:: - - If the supplied function modifies any of the active state data, then all - theoretical guarantees of solution accuracy and stability are lost. + .. versionadded:: x.y.z + .. warning:: + This function is currently incompatible with discrete adjoint capabilities + in ARKODE (:c:func:`ARKodeSetAdjointCheckpointScheme` and + :c:func:`ARKodeSetAdjointCheckpointIndex`). .. _ARKODE.Usage.ARKodeAdaptivityInputTable: diff --git a/doc/arkode/guide/source/Usage/User_supplied.rst b/doc/arkode/guide/source/Usage/User_supplied.rst index 28075d430c..0436410f5c 100644 --- a/doc/arkode/guide/source/Usage/User_supplied.rst +++ b/doc/arkode/guide/source/Usage/User_supplied.rst @@ -76,10 +76,16 @@ The user-supplied functions for ARKODE consist of: :ref:`evaluates the conservative or dissipative function ` :math:`\xi(y(t))` (required) and a function to :ref:`evaluate its Jacobian ` - :math:`\xi'(y(t))` (required). + :math:`\xi'(y(t))` (required), -* functions that can optionally be called :ref:`before and after each time step or - within the stages of supported ARKODE time stepping modules +* functions that can optionally be called :ref:`before each step attempt and + after each successful step `, + +* a function that can optionally be called :ref:`before right-hand side function + evaluations `, and + +* functions that can optionally be called :ref:`after each step or stage + computation within supported ARKODE time stepping modules `. @@ -1106,34 +1112,134 @@ Relaxation Jacobian function will be reduced and the step repeated. +.. _ARKODE.Usage.ARKodePrePostStepFunctions: + +Pre and post step functions +--------------------------- + +The user may supply a function of the type :c:type:`ARKPreStepFn` that will be +called before each internal time step attempt and a function of the type +:c:type:`ARKPostStepFn` that will be called after each successful step attempt. + +.. c:type:: int (*ARKPreStepFn)(sunrealtype t, N_Vector y, long int step, int attempt, void* user_data); + + A function to be called before each step attempt. + + .. danger:: + + If the supplied function modifies any of the active state data, then all + theoretical guarantees of solution accuracy and stability are lost. + + **Parameters:** + + * **t** -- the current value of the independent variable. + * **y** -- the current value of the dependent variable vector. + * **step** -- the index of the step being computed (starting at ``0``). + * **attempt** -- the index of the step attempted being computed (starting at + ``0``). + * **user_data** -- the `user_data` pointer that was passed to + :c:func:`ARKodeSetUserData`. + + **Returns:** + + An :c:func:`ARKPreStepFn` function should return 0 if successful, a + positive value if a recoverable error occurred, or a negative value if an + unrecoverable error occurred. + + +.. c:type:: int (*ARKPostStepFn)(sunrealtype t, N_Vector y, long int step, void* user_data); + + A function to be called before after each successful step attempt. + + .. danger:: + + If the supplied function modifies any of the active state data, then all + theoretical guarantees of solution accuracy and stability are lost. + + **Parameters:** + + * **t** -- the current value of the independent variable. + * **y** -- the current value of the dependent variable vector. + * **step** -- the index of the step being completed (starting at ``0``). + * **user_data** -- the `user_data` pointer that was passed to + :c:func:`ARKodeSetUserData`. + + **Returns:** + + An :c:func:`ARKPostStepFn` function should return 0 if successful, a + positive value if a recoverable error occurred, or a negative value if an + unrecoverable error occurred. + + +.. _ARKODE.Usage.ARKodePreRhsFunction: + +Pre right-hand side function +---------------------------- + +The user may supply a function of the type :c:type:`ARKPreRhsFn` that will be +called before right-hand side (RHS) function evaluations. For partitioned +methods with multiple RHS functions (e.g., ARKStep or MRIStep), when multiple +RHS functions will be called in succession with identical inputs, this function +is called only once prior to the RHS function evaluations. + +.. c:type:: int (*ARKPreRhsFn)(sunrealtype t, N_Vector y, void* user_data); + + A function to be called before righ-hand side (RHS) evaluations. + + .. danger:: + + If the supplied function modifies any of the active state data, then all + theoretical guarantees of solution accuracy and stability are lost. + + **Parameters:** + + * **t** -- the current value of the independent variable. + * **y** -- the current value of the dependent variable vector. + * **user_data** -- the `user_data` pointer that was passed to + :c:func:`ARKodeSetUserData`. + + **Returns:** + + An :c:func:`ARKPreRhsFn` function should return 0 if successful, a positive + value if a recoverable error occurred, or a negative value if an + unrecoverable error occurred. + + .. _ARKODE.Usage.ARKodeProcessingFunctions: Step and stage processing functions ------------------------------------- +----------------------------------- The user may supply functions of type :c:type:`ARKPostProcessFn` that will be -called before each internal time step (:c:func:`ARKodeSetPreprocessStepFn`), after -each successful internal time step (:c:func:`ARKodeSetPostprocessStepFn`), after each -failed internal time step (:c:func:`ARKodeSetPostprocessStepFailFn`), before user-supplied -right-hand side function(s) are called on an updated state (:c:func:`ARKodeSetPreRHSProcessFn`), -or after each internal stage is computed (:c:func:`ARKodeSetPostprocessStageFn`). - +after computing but before accepting/rejection a new step +(:c:func:`ARKodeSetPostprocessStepFn`) and after computing an internal stage +(:c:func:`ARKodeSetPostprocessStageFn`). .. c:type:: int (*ARKPostProcessFn)(sunrealtype t, N_Vector y, void* user_data) - :param t: the current value of the independent variable. - :param y: the current value of the dependent variable vector. - :param user_data: the ``user_data`` pointer that was passed to - :c:func:`ARKodeSetUserData`. + A function to postprocess step or stage data. - :return: An :c:func:`ARKPostProcessFn` function should return 0 if successful, a - positive value if a recoverable error occurred, or a negative value if an - unrecoverable error occurred. + .. danger:: - .. warning:: + If the supplied function modifies any of the active state data, then all + theoretical guarantees of solution accuracy and stability are lost. + + **Parameters:** + + * **t** -- the current value of the independent variable. + * **y** -- the current value of the dependent variable vector. + * **user_data** -- the `user_data` pointer that was passed to + :c:func:`ARKodeSetUserData`. - These functions are currently incompatible with discrete adjoint capabilities in ARKODE - (:c:func:`ARKodeSetAdjointCheckpointScheme` and :c:func:`ARKodeSetAdjointCheckpointIndex`). + **Returns:** + + An :c:func:`ARKPostProcessFn` function should return 0 if successful, a + positive value if a recoverable error occurred, or a negative value if an + unrecoverable error occurred. + + .. warning:: - IF THE SUPPLIED FUNCTION MODIFIES ANY OF THE ACTIVE STATE DATA IN *y*, THEN ALL - THEORETICAL GUARANTEES OF SOLUTION ACCURACY AND STABILITY ARE LOST. + :c:func:`ARKPostProcessFn` functions are currently incompatible with + discrete adjoint capabilities in ARKODE + (:c:func:`ARKodeSetAdjointCheckpointScheme` and + :c:func:`ARKodeSetAdjointCheckpointIndex`). diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index 9194c08ced..9781df4f0e 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -5,15 +5,14 @@ **New Features and Enhancements** -ARKODE now allows users to supply functions that will be called before each internal -time step, after each successful time step, after each failed time step, before -right-hand side routines are called on an updated state, and/or once each internal -stage is computed (:c:func:`ARKodeSetPreprocessStepFn`, -:c:func:`ARKodeSetPostprocessStepFn`, :c:func:`ARKodeSetPostprocessStepFailFn`, -:c:func:`ARKodeSetPreRHSProcessFn`, and :c:func:`ARKodeSetPostprocessStageFn`). -These are considered **advanced** functions, as they should treat the state vector as -read-only, otherwise all theoretical guarantees of solution accuracy and stability -will be lost. +ARKODE now allows users to supply functions that will be called before each +internal time step attempt (:c:func:`ARKodeSetPreStepFn`), after each successful +time step (:c:func:`ARKodeSetPostStepFn`), before right-hand side routines are +called on an updated state (:c:func:`ARKodeSetPreRhsFn`), and/or once each +internal stage/stage is computed (:c:func:`ARKodeSetPostprocessStepFn`/ +:c:func:`ARKodeSetPostprocessStageFn`). These are considered **advanced** +functions, as they should treat the state vector as read-only, otherwise all +theoretical guarantees of solution accuracy and stability will be lost. **Bug Fixes** From 0e6f175492267455eb36fa40fcd9ef169c040734 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 15 Mar 2026 15:37:09 -0700 Subject: [PATCH 171/298] update constants table --- doc/arkode/guide/source/Constants.rst | 50 +++++++++++++++++---------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/doc/arkode/guide/source/Constants.rst b/doc/arkode/guide/source/Constants.rst index 1a410a4495..61c4856dd9 100644 --- a/doc/arkode/guide/source/Constants.rst +++ b/doc/arkode/guide/source/Constants.rst @@ -369,52 +369,64 @@ contains the ARKODE output constants. +-------------------------------------+------+------------------------------------------------------------+ | :index:`ARK_INNERSTEP_FAIL` | -34 | An error occurred in the inner stepper module. | +-------------------------------------+------+------------------------------------------------------------+ - | :index:`ARK_PREINNERFN_FAIL` | -35 | An error occurred in the MRIStep pre inner integrator | + | :index:`ARK_OUTERTOINNER_FAIL` | -35 | An error occurred in the MRIStep pre inner integrator | | | | function. | +-------------------------------------+------+------------------------------------------------------------+ - | :index:`ARK_POSTINNERFN_FAIL` | -36 | An error occurred in the MRIStep post inner integrator | + | :index:`ARK_INNERTOOUTER_FAIL` | -36 | An error occurred in the MRIStep post inner integrator | | | | function. | +-------------------------------------+------+------------------------------------------------------------+ - | :index:`ARK_INTERP_FAIL` | -40 | An error occurred in the ARKODE polynomial interpolation | + | :index:`ARK_POSTPROCESS_STEP_FAIL` | -37 | An error occurred in a step postprocessing function. | + +-------------------------------------+------+------------------------------------------------------------+ + | :index:`ARK_POSTPROCESS_STAGE_FAIL` | -38 | An error occurred in a stage postprocessing function. | + +-------------------------------------+------+------------------------------------------------------------+ + | :index:`ARK_PRESTEPFN_FAIL` | -39 | An error occurred in a prestep function. | + +-------------------------------------+------+------------------------------------------------------------+ + | :index:`ARK_POSTSTEPFN_FAIL` | -40 | An error occurred in a poststep function. | + +-------------------------------------+------+------------------------------------------------------------+ + | :index:`ARK_PRERHS_FAIL` | -41 | An error occurred in a pre-RHS function. | + +-------------------------------------+------+------------------------------------------------------------+ + | :index:`ARK_USER_PREDICT_FAIL` | -42 | An error occurred in a user predictor function. | + +-------------------------------------+------+------------------------------------------------------------+ + | :index:`ARK_INTERP_FAIL` | -43 | An error occurred in the ARKODE polynomial interpolation | | | | module. | +-------------------------------------+------+------------------------------------------------------------+ - | :index:`ARK_INVALID_TABLE` | -41 | An invalid Butcher or MRI table was encountered. | + | :index:`ARK_INVALID_TABLE` | -44 | An invalid Butcher or MRI table was encountered. | +-------------------------------------+------+------------------------------------------------------------+ - | :index:`ARK_CONTEXT_ERR` | -42 | An error occurred with the SUNDIALS context object | + | :index:`ARK_CONTEXT_ERR` | -45 | An error occurred with the SUNDIALS context object | +-------------------------------------+------+------------------------------------------------------------+ - | :index:`ARK_RELAX_FAIL` | -43 | An error occurred in computing the relaxation parameter | + | :index:`ARK_RELAX_FAIL` | -46 | An error occurred in computing the relaxation parameter | +-------------------------------------+------+------------------------------------------------------------+ - | :index:`ARK_RELAX_MEM_FAIL` | -44 | The relaxation memory structure is ``NULL`` | + | :index:`ARK_RELAX_MEM_FAIL` | -47 | The relaxation memory structure is ``NULL`` | +-------------------------------------+------+------------------------------------------------------------+ - | :index:`ARK_RELAX_FUNC_FAIL` | -45 | The relaxation function returned an unrecoverable error | + | :index:`ARK_RELAX_FUNC_FAIL` | -48 | The relaxation function returned an unrecoverable error | +-------------------------------------+------+------------------------------------------------------------+ - | :index:`ARK_RELAX_JAC_FAIL` | -46 | The relaxation Jacobian function returned an unrecoverable | + | :index:`ARK_RELAX_JAC_FAIL` | -49 | The relaxation Jacobian function returned an unrecoverable | | | | error | +-------------------------------------+------+------------------------------------------------------------+ - | :index:`ARK_CONTROLLER_ERR` | -47 | An error with a SUNAdaptController object was encountered. | + | :index:`ARK_CONTROLLER_ERR` | -50 | An error with a SUNAdaptController object was encountered. | +-------------------------------------+------+------------------------------------------------------------+ - | :index:`ARK_STEPPER_UNSUPPORTED` | -48 | An operation was not supported by the current | + | :index:`ARK_STEPPER_UNSUPPORTED` | -51 | An operation was not supported by the current | | | | time-stepping module. | +-------------------------------------+------+------------------------------------------------------------+ - | :index:`ARK_DOMEIG_FAIL` | -49 | The dominant eigenvalue function failed. It is either not | + | :index:`ARK_DOMEIG_FAIL` | -52 | The dominant eigenvalue function failed. It is either not | | | | provided or returns an illegal value. | +-------------------------------------+------+------------------------------------------------------------+ - | :index:`ARK_MAX_STAGE_LIMIT_FAIL` | -50 | Stepper failed to achieve stable results. Either reduce | + | :index:`ARK_MAX_STAGE_LIMIT_FAIL` | -53 | Stepper failed to achieve stable results. Either reduce | | | | the step size or increase the stage_max_limit | +-------------------------------------+------+------------------------------------------------------------+ - | :index:`ARK_SUNSTEPPER_ERR` | -51 | An error occurred in the SUNStepper module. | + | :index:`ARK_SUNSTEPPER_ERR` | -54 | An error occurred in the SUNStepper module. | +-------------------------------------+------+------------------------------------------------------------+ - | :index:`ARK_STEP_DIRECTION_ERR` | -52 | An error occurred changing the step direction. | + | :index:`ARK_STEP_DIRECTION_ERR` | -55 | An error occurred changing the step direction. | +-------------------------------------+------+------------------------------------------------------------+ - | :index:`ARK_ADJ_CHECKPOINT_FAIL` | -53 | An occurred when checkpointing a state during the adjoint | + | :index:`ARK_ADJ_CHECKPOINT_FAIL` | -56 | An occurred when checkpointing a state during the adjoint | | | | integration. | +-------------------------------------+------+------------------------------------------------------------+ - | :index:`ARK_ADJ_RECOMPUTE_FAIL` | -54 | An occurred recomputing steps during the adjoint | + | :index:`ARK_ADJ_RECOMPUTE_FAIL` | -57 | An occurred recomputing steps during the adjoint | | | | integration. | +-------------------------------------+------+------------------------------------------------------------+ - | :index:`ARK_SUNADJSTEPPER_ERR` | -55 | An error occurred in the SUNAdjStepper module. | + | :index:`ARK_SUNADJSTEPPER_ERR` | -58 | An error occurred in the SUNAdjStepper module. | +-------------------------------------+------+------------------------------------------------------------+ - | :index:`ARK_DEE_FAIL` | -56 | An error occurred in the SUNDomEigEstimator module. | + | :index:`ARK_DEE_FAIL` | -59 | An error occurred in the SUNDomEigEstimator module. | +-------------------------------------+------+------------------------------------------------------------+ | :index:`ARK_UNRECOGNIZED_ERROR` | -99 | An unknown error was encountered. | +-------------------------------------+------+------------------------------------------------------------+ From 41fd559945551e3e88c2c90b709774e9361e99b3 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 15 Mar 2026 15:53:48 -0700 Subject: [PATCH 172/298] note behavior change, fix typo --- CHANGELOG.md | 12 +++++++++--- doc/shared/RecentChanges.rst | 12 +++++++++--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e164d64ac..8413c56bc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,12 +9,18 @@ ARKODE now allows users to supply functions that will be called before each internal time step attempt (`ARKodeSetPreStepFn`), after each successful time step (`ARKodeSetPostStepFn`), before right-hand side routines are called on an -updated state (`ARKodeSetPreRhsFn`), and/or once each internal stage/stage is +updated state (`ARKodeSetPreRhsFn`), and/or once each internal step/stage is computed (`ARKodeSetPostprocessStepFn`/ `ARKodeSetPostprocessStageFn`). These are considered **advanced** functions, as they should treat the state vector as read-only, otherwise all theoretical guarantees of solution accuracy and stability will be lost. +Note to users utilizing the previously undocumented `ARKodeSetPostprocessStepFn` +function, the supplied function is now called on the newly computed state vector +for all step attempts not just successful steps. To obtain the previous behavior +of only calling a function on successful steps, switch to using +`ARKodeSetPostStepFn`. + ### Bug Fixes Fixed a CMake bug where the SuperLU_MT interface would not be built and @@ -22,8 +28,8 @@ installed without setting the `SUPERLUMT_WORKS` option to `TRUE`. Fixed the embedded coefficients for the `ARKODE_TSITOURAS_7_4_5` Butcher table. -Fixed a bug in logging output from ARKODE, where for some time stepping modules, the -the current "time" output in the logger was incorrect. +Fixed a bug in logging output from ARKODE, where for some time stepping modules, +the the current "time" output in the logger was incorrect. ### Deprecation Notices diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index 9781df4f0e..b5dd364c0a 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -9,11 +9,17 @@ ARKODE now allows users to supply functions that will be called before each internal time step attempt (:c:func:`ARKodeSetPreStepFn`), after each successful time step (:c:func:`ARKodeSetPostStepFn`), before right-hand side routines are called on an updated state (:c:func:`ARKodeSetPreRhsFn`), and/or once each -internal stage/stage is computed (:c:func:`ARKodeSetPostprocessStepFn`/ +internal step/stage is computed (:c:func:`ARKodeSetPostprocessStepFn`/ :c:func:`ARKodeSetPostprocessStageFn`). These are considered **advanced** functions, as they should treat the state vector as read-only, otherwise all theoretical guarantees of solution accuracy and stability will be lost. +Note to users utilizing the previously undocumented +:c:func:`ARKodeSetPostprocessStepFn` function, the supplied function is now +called on the newly computed state vector for all step attempts not just +successful steps. To obtain the previous behavior of only calling a function on +successful steps, switch to using :c:func:`ARKodeSetPostStepFn`. + **Bug Fixes** Fixed a CMake bug where the SuperLU_MT interface would not be built and @@ -22,8 +28,8 @@ installed without setting the ``SUPERLUMT_WORKS`` option to ``TRUE``. Fixed the embedded coefficients for the ``ARKODE_TSITOURAS_7_4_5`` Butcher table. -Fixed a bug in logging output from ARKODE, where for some time stepping modules, the -the current "time" output in the logger was incorrect. +Fixed a bug in logging output from ARKODE, where for some time stepping modules, +the the current "time" output in the logger was incorrect. **Deprecation Notices** From e8a0415f8b6369d96788e2522146f8f650cc4a9a Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 15 Mar 2026 15:54:59 -0700 Subject: [PATCH 173/298] fix typo --- CHANGELOG.md | 6 +++--- doc/shared/RecentChanges.rst | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8413c56bc8..c9c826b436 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,9 +16,9 @@ read-only, otherwise all theoretical guarantees of solution accuracy and stability will be lost. Note to users utilizing the previously undocumented `ARKodeSetPostprocessStepFn` -function, the supplied function is now called on the newly computed state vector -for all step attempts not just successful steps. To obtain the previous behavior -of only calling a function on successful steps, switch to using +function, the supplied function is now called on the newly computed state +vectors for all step attempts not just successful steps. To obtain the previous +behavior of only calling a function on successful steps, switch to using `ARKodeSetPostStepFn`. ### Bug Fixes diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index b5dd364c0a..995fcead4c 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -16,7 +16,7 @@ theoretical guarantees of solution accuracy and stability will be lost. Note to users utilizing the previously undocumented :c:func:`ARKodeSetPostprocessStepFn` function, the supplied function is now -called on the newly computed state vector for all step attempts not just +called on the newly computed state vectors for all step attempts not just successful steps. To obtain the previous behavior of only calling a function on successful steps, switch to using :c:func:`ARKodeSetPostStepFn`. From 57451154e5c5cabd3f2e622d34eee035d69c9936 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 15 Mar 2026 15:55:54 -0700 Subject: [PATCH 174/298] Revert "fix typo" This reverts commit e8a0415f8b6369d96788e2522146f8f650cc4a9a. --- CHANGELOG.md | 6 +++--- doc/shared/RecentChanges.rst | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9c826b436..8413c56bc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,9 +16,9 @@ read-only, otherwise all theoretical guarantees of solution accuracy and stability will be lost. Note to users utilizing the previously undocumented `ARKodeSetPostprocessStepFn` -function, the supplied function is now called on the newly computed state -vectors for all step attempts not just successful steps. To obtain the previous -behavior of only calling a function on successful steps, switch to using +function, the supplied function is now called on the newly computed state vector +for all step attempts not just successful steps. To obtain the previous behavior +of only calling a function on successful steps, switch to using `ARKodeSetPostStepFn`. ### Bug Fixes diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index 995fcead4c..b5dd364c0a 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -16,7 +16,7 @@ theoretical guarantees of solution accuracy and stability will be lost. Note to users utilizing the previously undocumented :c:func:`ARKodeSetPostprocessStepFn` function, the supplied function is now -called on the newly computed state vectors for all step attempts not just +called on the newly computed state vector for all step attempts not just successful steps. To obtain the previous behavior of only calling a function on successful steps, switch to using :c:func:`ARKodeSetPostStepFn`. From 178b9eaa0217dc1a58465752add6a780abae326a Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 15 Mar 2026 17:00:28 -0700 Subject: [PATCH 175/298] fix typo --- doc/arkode/guide/source/Usage/LSRKStep/User_callable.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/arkode/guide/source/Usage/LSRKStep/User_callable.rst b/doc/arkode/guide/source/Usage/LSRKStep/User_callable.rst index 4215b8bc44..2eed85172d 100644 --- a/doc/arkode/guide/source/Usage/LSRKStep/User_callable.rst +++ b/doc/arkode/guide/source/Usage/LSRKStep/User_callable.rst @@ -396,8 +396,9 @@ Allowable Method Families .. versionchanged:: x.y.z - The default numbers of stages for :c:enumerator:`ARKODE_LSRK_SSP_S_2` and :c:enumerator:`ARKODE_LSRK_SSP_S_3` - were changed from 10 and 9, respectively, to their minimum allowable values of 2 and 4. + The default number of stages for :c:enumerator:`ARKODE_LSRK_SSP_S_2` and + :c:enumerator:`ARKODE_LSRK_SSP_S_3` were changed from 10 and 9, + respectively, to their minimum allowable values of 2 and 4. .. _ARKODE.Usage.LSRKStep.OptionalOutputs: From 1691829acb83d8f09f2102ca509be2cc73cf4f1b Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Sun, 15 Mar 2026 20:59:37 -0400 Subject: [PATCH 176/298] Added set routine to disregard tstop-limited time steps from adaptivity process --- .../guide/source/Usage/User_callable.rst | 25 +++++++++++++++++++ examples/arkode/CXX_serial/CMakeLists.txt | 1 + .../arkode/CXX_serial/ark_kpr_nestedmri.cpp | 9 +++++++ include/arkode/arkode.h | 2 ++ src/arkode/arkode.c | 24 +++++++++++++++--- src/arkode/arkode_cli.c | 1 + src/arkode/arkode_impl.h | 2 ++ src/arkode/arkode_io.c | 25 +++++++++++++++++++ 8 files changed, 85 insertions(+), 4 deletions(-) diff --git a/doc/arkode/guide/source/Usage/User_callable.rst b/doc/arkode/guide/source/Usage/User_callable.rst index 278cf980a2..ca2ed0bceb 100644 --- a/doc/arkode/guide/source/Usage/User_callable.rst +++ b/doc/arkode/guide/source/Usage/User_callable.rst @@ -905,6 +905,7 @@ Minimum absolute step size :c:func:`ARKodeSetMinStep` Set a value for :math:`t_{stop}` :c:func:`ARKodeSetStopTime` undefined Interpolate at :math:`t_{stop}` :c:func:`ARKodeSetInterpolateStopTime` ``SUNFALSE`` Disable the stop time :c:func:`ARKodeClearStopTime` N/A +Disregard stop time limited steps in adaptivity :c:func:`ARKodeSkipAdaptStopTime` ``SUNFALSE`` Supply a pointer for user data :c:func:`ARKodeSetUserData` ``NULL`` Maximum no. of ARKODE error test failures :c:func:`ARKodeSetMaxErrTestFails` 7 Set inequality constraints on solution :c:func:`ARKodeSetConstraints` ``NULL`` @@ -1447,6 +1448,30 @@ Use compensated summation for accumulating time :c:func:`ARKodeSetUseCompensa .. versionadded:: 6.1.0 +.. c:function:: int ARKodeSkipAdaptStopTime(void* arkode_mem, sunbooleantype skip) + + Specifies whether stop-time-limited steps should be disregarded + when selecting step sizes for time step adaptivity. + + :param arkode_mem: pointer to the ARKODE memory block. + :param skip: flag indicating to disregard (1) or retain (0) stop time + limited steps from the temporal adaptivity algorithm. + + :retval ARK_SUCCESS: the function exited successfully. + :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. + + .. note:: + + The default behavior is to use all successful time steps + (including stop-time-limited steps) when determining an + adapted time step size. + + This routine will be called by :c:func:`ARKodeSetOptions` + when using the key "arkid.skip_adapt_stop_time". + + .. versionadded:: x.y.z + + .. c:function:: int ARKodeSetUserData(void* arkode_mem, void* user_data) Specifies the user data block *user_data* and diff --git a/examples/arkode/CXX_serial/CMakeLists.txt b/examples/arkode/CXX_serial/CMakeLists.txt index c76c0eb148..6910616388 100644 --- a/examples/arkode/CXX_serial/CMakeLists.txt +++ b/examples/arkode/CXX_serial/CMakeLists.txt @@ -39,6 +39,7 @@ set(ARKODE_examples "ark_kpr_Mt.cpp\;0 4 0 -10 1 10 1\;develop" "ark_kpr_Mt.cpp\;0 4 0 -10 0 10 1\;develop" "ark_kpr_nestedmri.cpp\;\;exclude-single" + "ark_kpr_nestedmri.cpp\;arkfast.skip_adapt_stop_time 1 arkmod.skip_adapt_stop_time 1\;exclude-single" "ark_pendulum.cpp\;\;develop") # Header files to install diff --git a/examples/arkode/CXX_serial/ark_kpr_nestedmri.cpp b/examples/arkode/CXX_serial/ark_kpr_nestedmri.cpp index c574f5814f..ae4146d26b 100644 --- a/examples/arkode/CXX_serial/ark_kpr_nestedmri.cpp +++ b/examples/arkode/CXX_serial/ark_kpr_nestedmri.cpp @@ -451,6 +451,9 @@ int main(int argc, char* argv[]) if (check_flag(retval, "ARKodeSetMaxNumSteps")) return 1; retval = ARKodeSetUserData(inner_arkode_mem, (void*)&opts); if (check_flag(retval, "ARKodeSetUserData")) return 1; + retval = ARKodeSetOptions(inner_arkode_mem, "arkfast", nullptr, + argc, argv); + if (check_flag(retval, "ARKodeSetOptions")) return 1; // Create inner stepper MRIStepInnerStepper inner_stepper = nullptr; @@ -873,6 +876,9 @@ int main(int argc, char* argv[]) retval = ARKodeSetFixedStep(mid_arkode_mem, opts.hm); if (check_flag(retval, "ARKodeSetFixedStep")) return 1; } + retval = ARKodeSetOptions(mid_arkode_mem, "arkmid", nullptr, + argc, argv); + if (check_flag(retval, "ARKodeSetOptions")) return 1; // Create intermediate stepper MRIStepInnerStepper intermediate_stepper = nullptr; @@ -931,6 +937,9 @@ int main(int argc, char* argv[]) retval = ARKodeSetFixedStep(arkode_mem, opts.hs); if (check_flag(retval, "ARKodeSetFixedStep")) return 1; } + retval = ARKodeSetOptions(arkode_mem, "arkslow", nullptr, + argc, argv); + if (check_flag(retval, "ARKodeSetOptions")) return 1; // // Integrate ODE diff --git a/include/arkode/arkode.h b/include/arkode/arkode.h index cba3630373..54bcecf79c 100644 --- a/include/arkode/arkode.h +++ b/include/arkode/arkode.h @@ -284,6 +284,8 @@ SUNDIALS_EXPORT int ARKodeSetInterpolateStopTime(void* arkode_mem, sunbooleantype interp); SUNDIALS_EXPORT int ARKodeSetStopTime(void* arkode_mem, sunrealtype tstop); SUNDIALS_EXPORT int ARKodeClearStopTime(void* arkode_mem); +SUNDIALS_EXPORT int ARKodeSkipAdaptStopTime(void* arkode_mem, + sunbooleantype skipadapttstop); SUNDIALS_EXPORT int ARKodeSetFixedStep(void* arkode_mem, sunrealtype hfixed); SUNDIALS_EXPORT int ARKodeSetStepDirection(void* arkode_mem, sunrealtype stepdir); SUNDIALS_EXPORT int ARKodeSetUserData(void* arkode_mem, void* user_data); diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 70ae504b57..f77accce8c 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -128,6 +128,7 @@ int ARKodeResize(void* arkode_mem, N_Vector y0, sunrealtype hscale, ark_mem->hprime *= hscale; /* If next step would overtake tstop, adjust stepsize */ + ark_mem->tstoplimited = SUNFALSE; if (ark_mem->tstopset) { if ((ark_mem->tcur + ark_mem->hprime - ark_mem->tstop) * ark_mem->hprime > @@ -136,6 +137,7 @@ int ARKodeResize(void* arkode_mem, N_Vector y0, sunrealtype hscale, ark_mem->hprime = (ark_mem->tstop - ark_mem->tcur) * (ONE - FOUR * ark_mem->uround); ark_mem->eta = ark_mem->hprime / ark_mem->h; + if (ark_mem->skipadapttstop) ark_mem->tstoplimited = SUNTRUE; } } } @@ -866,8 +868,8 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, /* Update parameter for upcoming step size */ if (ark_mem->hprime != ark_mem->h) { - ark_mem->h = ark_mem->h * ark_mem->eta; - ark_mem->next_h = ark_mem->h; + ark_mem->h = ark_mem->h * ark_mem->eta; + if (!ark_mem->skipadapttstop) ark_mem->next_h = ark_mem->h; } if (ark_mem->fixedstep) { @@ -1084,6 +1086,7 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, } /* Check if tn is at tstop or near tstop */ + ark_mem->tstoplimited = SUNFALSE; if (ark_mem->tstopset) { troundoff = FUZZ_FACTOR * ark_mem->uround * @@ -1120,6 +1123,7 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, ark_mem->hprime = (ark_mem->tstop - ark_mem->tcur) * (ONE - FOUR * ark_mem->uround); ark_mem->eta = ark_mem->hprime / ark_mem->h; + if (ark_mem->skipadapttstop) ark_mem->tstoplimited = SUNTRUE; } } @@ -1335,6 +1339,8 @@ void ARKodePrintMem(void* arkode_mem, FILE* outfile) fprintf(outfile, "user_efun = %i\n", ark_mem->user_efun); fprintf(outfile, "tstopset = %i\n", ark_mem->tstopset); fprintf(outfile, "tstopinterp = %i\n", ark_mem->tstopinterp); + fprintf(outfile, "tstoplimited = %i\n", ark_mem->tstoplimited); + fprintf(outfile, "skipadapttstop = %i\n", ark_mem->skipadapttstop); fprintf(outfile, "tstop = " SUN_FORMAT_G "\n", ark_mem->tstop); fprintf(outfile, "VabstolMallocDone = %i\n", ark_mem->VabstolMallocDone); fprintf(outfile, "MallocDone = %i\n", ark_mem->MallocDone); @@ -2276,6 +2282,7 @@ int arkInitialSetup(ARKodeMem ark_mem, sunrealtype tout) ark_mem->h0u = ark_mem->h; ark_mem->eta = ONE; ark_mem->hprime = ark_mem->h; + ark_mem->hold = ark_mem->h; } else { @@ -2782,8 +2789,9 @@ int arkCompleteStep(ARKodeMem ark_mem, sunrealtype dsm) N_VScale(ONE, ark_mem->ycur, ark_mem->yn); ark_mem->fn_is_current = SUNFALSE; - /* Notify time step controller object of successful step */ - if (ark_mem->hadapt_mem->hcontroller) + /* Notify time step controller object of successful step + (skip this if the previous step was stop-time-limited) */ + if (ark_mem->hadapt_mem->hcontroller && !ark_mem->tstoplimited) { retval = SUNAdaptController_UpdateH(ark_mem->hadapt_mem->hcontroller, ark_mem->h, dsm); @@ -3421,6 +3429,14 @@ int arkCheckTemporalError(ARKodeMem ark_mem, int* nflagPtr, int* nefPtr, } hadapt_mem = ark_mem->hadapt_mem; + /* If a stop-time-limited step will succeed, set eta so that the step size + reverts to the last "full size" successful step for the next attempt */ + if (ark_mem->tstoplimited && dsm <= ONE) + { + ark_mem->eta = ark_mem->hold / ark_mem->h; + return (ARK_SUCCESS); + } + /* consider change of step size for next step attempt (may be larger/smaller than current step, depending on dsm) */ ttmp = (dsm <= ONE) ? ark_mem->tn + ark_mem->h : ark_mem->tn; diff --git a/src/arkode/arkode_cli.c b/src/arkode/arkode_cli.c index 91aa2c78f4..ad49060e41 100644 --- a/src/arkode/arkode_cli.c +++ b/src/arkode/arkode_cli.c @@ -84,6 +84,7 @@ static int arkSetFromCommandLine(void* arkode_mem, const char* arkid, int argc, {"max_nonlin_iters", ARKodeSetMaxNonlinIters}, {"max_hnil_warns", ARKodeSetMaxHnilWarns}, {"interpolate_stop_time", ARKodeSetInterpolateStopTime}, + {"skip_adapt_stop_time", ARKodeSkipAdaptStopTime}, {"max_num_constr_fails", ARKodeSetMaxNumConstrFails}, {"adaptivity_adjustment", ARKodeSetAdaptivityAdjustment}, {"small_num_efails", ARKodeSetSmallNumEFails}, diff --git a/src/arkode/arkode_impl.h b/src/arkode/arkode_impl.h index b7c0e56d49..9b683bc68b 100644 --- a/src/arkode/arkode_impl.h +++ b/src/arkode/arkode_impl.h @@ -499,6 +499,8 @@ struct ARKodeMemRec /* Tstop information */ sunbooleantype tstopset; sunbooleantype tstopinterp; + sunbooleantype tstoplimited; + sunbooleantype skipadapttstop; sunrealtype tstop; /* Time step data */ diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index 7a9f43a0fd..4ac0d7b797 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -84,6 +84,8 @@ int ARKodeSetDefaults(void* arkode_mem) ark_mem->hmax_inv = ZERO; /* no maximum step size */ ark_mem->tstopset = SUNFALSE; /* no stop time set */ ark_mem->tstopinterp = SUNFALSE; /* copy at stop time */ + ark_mem->tstoplimited = SUNFALSE; /* tstop did not limit last step */ + ark_mem->skipadapttstop = SUNFALSE; /* tstop-limited steps can affect adaptivity */ ark_mem->tstop = ZERO; /* no fixed stop time */ ark_mem->hadapt_mem->etamx1 = ETAMX1; /* max change on first step */ ark_mem->hadapt_mem->etamxf = ETAMXF; /* max change on error-failed step */ @@ -1271,6 +1273,27 @@ int ARKodeClearStopTime(void* arkode_mem) return (ARK_SUCCESS); } +/*--------------------------------------------------------------- + ARKodeSkipAdaptStopTime: + + Specifies whether stop-time-limited steps should be disregarded + when selecting step sizes for time step adaptivity. + ---------------------------------------------------------------*/ +int ARKodeSkipAdaptStopTime(void* arkode_mem, sunbooleantype skip) +{ + ARKodeMem ark_mem; + if (arkode_mem == NULL) + { + arkProcessError(NULL, ARK_MEM_NULL, __LINE__, __func__, __FILE__, + MSG_ARK_NO_MEM); + return (ARK_MEM_NULL); + } + ark_mem = (ARKodeMem)arkode_mem; + ark_mem->skipadapttstop = skip; + + return (ARK_SUCCESS); +} + /*--------------------------------------------------------------- ARKodeSetFixedStep: @@ -3480,6 +3503,8 @@ int ARKodeWriteParameters(void* arkode_mem, FILE* fp) { (void)SUNAdaptController_Write(ark_mem->hadapt_mem->hcontroller, fp); } + fprintf(fp, " Skip tstop-limited steps from affecting temporal adaptivity = %i\n", + ark_mem->skipadapttstop); fprintf(fp, " Maximum number of error test failures = %i\n", ark_mem->maxnef); fprintf(fp, " Maximum number of convergence test failures = %i\n", From 80fecf5e023494e6de6cefe6e7b869d3fc0c8234 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Sun, 15 Mar 2026 21:12:00 -0400 Subject: [PATCH 177/298] Updated documentation that David inserted to match with what I'd put in a subsequent PR in this stack --- .../guide/source/Usage/User_supplied.rst | 166 ++++++++---------- 1 file changed, 78 insertions(+), 88 deletions(-) diff --git a/doc/arkode/guide/source/Usage/User_supplied.rst b/doc/arkode/guide/source/Usage/User_supplied.rst index 0436410f5c..2aff89a515 100644 --- a/doc/arkode/guide/source/Usage/User_supplied.rst +++ b/doc/arkode/guide/source/Usage/User_supplied.rst @@ -1112,130 +1112,118 @@ Relaxation Jacobian function will be reduced and the step repeated. -.. _ARKODE.Usage.ARKodePrePostStepFunctions: - -Pre and post step functions ---------------------------- - -The user may supply a function of the type :c:type:`ARKPreStepFn` that will be -called before each internal time step attempt and a function of the type -:c:type:`ARKPostStepFn` that will be called after each successful step attempt. - -.. c:type:: int (*ARKPreStepFn)(sunrealtype t, N_Vector y, long int step, int attempt, void* user_data); - - A function to be called before each step attempt. - - .. danger:: - - If the supplied function modifies any of the active state data, then all - theoretical guarantees of solution accuracy and stability are lost. +.. _ARKODE.Usage.ARKodeProcessingFunctions: - **Parameters:** +Step and stage processing functions +------------------------------------ - * **t** -- the current value of the independent variable. - * **y** -- the current value of the dependent variable vector. - * **step** -- the index of the step being computed (starting at ``0``). - * **attempt** -- the index of the step attempted being computed (starting at - ``0``). - * **user_data** -- the `user_data` pointer that was passed to - :c:func:`ARKodeSetUserData`. +The user may supply functions that will be called before/after each internal time +step, before their :c:type:`ARKRhsFn` problem-defining functions are called, and +after each internal stage. These user-supplied functions vary slightly in type, +depending on their use case, as outlined below. Such functions are typically used +for applications that compute auxiliary diagnostic data between time steps or stages, +and store that data in their `user_data` pointer or output to screen or disk. +Alternately, some may be used to better prepare auxiliary data for an upcoming time +step or :c:type:`ARKRhsFn` evaluation. **These should not be used to modify the +active state data; if so then all theoretical guarantees of solution accuracy and +stability will be lost.** - **Returns:** - An :c:func:`ARKPreStepFn` function should return 0 if successful, a - positive value if a recoverable error occurred, or a negative value if an - unrecoverable error occurred. +A user-provided :c:type:`ARKPreStepFn` will be called before each internal time +step attempt by ARKODE (see :c:func:`ARKodeSetPreStepFn`). +.. c:type:: int (*ARKPreStepFn)(sunrealtype t, N_Vector y, long int step, int attempt, void* user_data) -.. c:type:: int (*ARKPostStepFn)(sunrealtype t, N_Vector y, long int step, void* user_data); + :param t: the current value of the independent variable. + :param y: the current value of the dependent variable vector that will be used + as the initial condition for the upcoming step. + :param step: the step index (starting from the first internal step since ARKODE + was (re-)initialized). + :param attempt: a counter indicating which attempt at the step is about to + occur -- 0 indicates that the previous step succeeded and this + is the first attempt the step `step`, while a number greater than + 0 indicates that the previous step attempt failed and this is a + subsequent try at computing the step `step`. + :param user_data: the ``user_data`` pointer that was passed to + :c:func:`ARKodeSetUserData`. - A function to be called before after each successful step attempt. + :return: An :c:func:`ARKPreStepFn` function should return 0 if successful, a + positive value if a recoverable error occurred, or a negative value if an + unrecoverable error occurred. .. danger:: If the supplied function modifies any of the active state data, then all theoretical guarantees of solution accuracy and stability are lost. - **Parameters:** - - * **t** -- the current value of the independent variable. - * **y** -- the current value of the dependent variable vector. - * **step** -- the index of the step being completed (starting at ``0``). - * **user_data** -- the `user_data` pointer that was passed to - :c:func:`ARKodeSetUserData`. + .. versionadded:: x.y.z - **Returns:** +A user-provided :c:type:`ARKPostStepFn` will be called following each *successful* internal time +step by ARKODE (see :c:func:`ARKodeSetPostStepFn`). - An :c:func:`ARKPostStepFn` function should return 0 if successful, a - positive value if a recoverable error occurred, or a negative value if an - unrecoverable error occurred. +.. c:type:: int (*ARKPostStepFn)(sunrealtype t, N_Vector y, long int step, void* user_data) + :param t: the current value of the independent variable. + :param y: the current value of the dependent variable vector that resulted from + the successful time step. + :param step: the step index (starting from the first internal step since ARKODE + was (re-)initialized). + :param user_data: the ``user_data`` pointer that was passed to + :c:func:`ARKodeSetUserData`. -.. _ARKODE.Usage.ARKodePreRhsFunction: - -Pre right-hand side function ----------------------------- - -The user may supply a function of the type :c:type:`ARKPreRhsFn` that will be -called before right-hand side (RHS) function evaluations. For partitioned -methods with multiple RHS functions (e.g., ARKStep or MRIStep), when multiple -RHS functions will be called in succession with identical inputs, this function -is called only once prior to the RHS function evaluations. - -.. c:type:: int (*ARKPreRhsFn)(sunrealtype t, N_Vector y, void* user_data); - - A function to be called before righ-hand side (RHS) evaluations. + :return: An :c:func:`ARKPostStepFn` function should return 0 if successful, a + positive value if a recoverable error occurred, or a negative value if an + unrecoverable error occurred. .. danger:: If the supplied function modifies any of the active state data, then all theoretical guarantees of solution accuracy and stability are lost. - **Parameters:** - - * **t** -- the current value of the independent variable. - * **y** -- the current value of the dependent variable vector. - * **user_data** -- the `user_data` pointer that was passed to - :c:func:`ARKodeSetUserData`. - - **Returns:** + .. versionadded:: x.y.z - An :c:func:`ARKPreRhsFn` function should return 0 if successful, a positive - value if a recoverable error occurred, or a negative value if an - unrecoverable error occurred. +A user-provided :c:type:`ARKPreRhsFn` will be called just prior to any user-supplied +:c:type:`ARKRhsFn` (see :c:func:`ARKodeSetPreRhsFn`). In the case of partitioned +integration methods (e.g., ARKStep, MRIStep), if multiple :c:type:`ARKRhsFn` will be +called with the same :math:`(t,y)` argument, then the :c:type:`ARKPreRhsFn` will be +called only once just prior to the first :c:type:`ARKRhsFn` that will be called with +that :math:`(t,y)` input. +.. c:type:: int (*ARKPreRhsFn)(sunrealtype t, N_Vector y, void* user_data) -.. _ARKODE.Usage.ARKodeProcessingFunctions: - -Step and stage processing functions ------------------------------------ - -The user may supply functions of type :c:type:`ARKPostProcessFn` that will be -after computing but before accepting/rejection a new step -(:c:func:`ARKodeSetPostprocessStepFn`) and after computing an internal stage -(:c:func:`ARKodeSetPostprocessStageFn`). - -.. c:type:: int (*ARKPostProcessFn)(sunrealtype t, N_Vector y, void* user_data) + :param t: the current value of the independent variable that will be provided + to the :c:type:`ARKRhsFn`. + :param y: the current value of the dependent variable vector that will be + provided to the :c:type:`ARKRhsFn`. + :param user_data: the ``user_data`` pointer that was passed to + :c:func:`ARKodeSetUserData`. - A function to postprocess step or stage data. + :return: An :c:func:`ARKPreRhsFn` function should return 0 if successful, a + positive value if a recoverable error occurred, or a negative value if an + unrecoverable error occurred. .. danger:: If the supplied function modifies any of the active state data, then all theoretical guarantees of solution accuracy and stability are lost. - **Parameters:** + .. versionadded:: x.y.z + +A user-provided :c:type:`ARKPostProcessFn` will be called either after each internal +stage (see :c:func:`ARKodeSetPostprocessStageFn`) or after each internal step attempt +(see :c:func:`ARKodeSetPostprocessStepFn`). - * **t** -- the current value of the independent variable. - * **y** -- the current value of the dependent variable vector. - * **user_data** -- the `user_data` pointer that was passed to - :c:func:`ARKodeSetUserData`. +.. c:type:: int (*ARKPostProcessFn)(sunrealtype t, N_Vector y, void* user_data) - **Returns:** + :param t: the current value of the independent variable. + :param y: the current value of the dependent variable vector resulting from + the step or stage. + :param user_data: the ``user_data`` pointer that was passed to + :c:func:`ARKodeSetUserData`. - An :c:func:`ARKPostProcessFn` function should return 0 if successful, a - positive value if a recoverable error occurred, or a negative value if an - unrecoverable error occurred. + :return: An :c:func:`ARKPostProcessFn` function should return 0 if successful, a + positive value if a recoverable error occurred, or a negative value if an + unrecoverable error occurred. .. warning:: @@ -1243,3 +1231,5 @@ after computing but before accepting/rejection a new step discrete adjoint capabilities in ARKODE (:c:func:`ARKodeSetAdjointCheckpointScheme` and :c:func:`ARKodeSetAdjointCheckpointIndex`). + + .. versionadded:: x.y.z From 66148e6a49ee0294aa6572cd80e207fb5ebea934 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Sun, 15 Mar 2026 21:18:43 -0400 Subject: [PATCH 178/298] Updated documentation that David inserted to match with what I'd put in a subsequent PR in this stack --- .../guide/source/Usage/User_callable.rst | 304 +++++++++++++++++- 1 file changed, 299 insertions(+), 5 deletions(-) diff --git a/doc/arkode/guide/source/Usage/User_callable.rst b/doc/arkode/guide/source/Usage/User_callable.rst index 91e2bb443a..4717cba5fc 100644 --- a/doc/arkode/guide/source/Usage/User_callable.rst +++ b/doc/arkode/guide/source/Usage/User_callable.rst @@ -912,11 +912,6 @@ Set max number of constraint failures :c:func:`ARKodeSetMaxNumConst Set the checkpointing scheme to use (for adjoint) :c:func:`ARKodeSetAdjointCheckpointScheme` ``NULL`` Set the checkpointing step index (for adjoint) :c:func:`ARKodeSetAdjointCheckpointIndex` 0 Use compensated summation for accumulating time :c:func:`ARKodeSetUseCompensatedSums` ``SUNFALSE`` -Set pre time step function :c:func:`ARKodeSetPreStepFn` ``NULL`` -Set post time step function :c:func:`ARKodeSetPostStepFn` ``NULL`` -Set pre right-hand side function :c:func:`ARKodeSetPreRhsFn` ``NULL`` -Set step postprocessing function :c:func:`ARKodeSetPostprocessStepFn` ``NULL`` -Set stage postprocessing function :c:func:`ARKodeSetPostprocessStageFn` ``NULL`` ================================================= ========================================== ======================= @@ -3618,6 +3613,305 @@ Disable inactive root warnings :c:func:`ARKodeSetNoInactiveRootWarn` e +.. _ARKODE.Usage.ARKodeProcessingInputTable: + +Step and stage processing optional inputs (ADVANCED) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +ARKODE provides multiple options for user-supplied callback routines +that can be called at various times within the time-stepping process. +Each of these callback functions has a similar structure, wherein the +callback function will be provided with the current time, current +solution, and the *user_data* structure that was provided to +:c:func:`ARKodeSetUserData`; some functions are also provided the current +time step counter, or even a counter indicating how many times this step +has been attempted previously. More specifically, users may provide +callback functions for the following events within a time step: + +* just prior to starting a time step attempt + (:c:func:`ARKodeSetPreStepFn`), + +* at the end of a successful time step (:c:func:`ARKodeSetPostStepFn`), + +* just prior to evaluating user-provided right-hand side (RHS) + functions (:c:func:`ARKodeSetPreRhsFn`) + +* immediately after each stage is completed within a time step + (:c:func:`ARKodeSetPostprocessStageFn`) + +* at the end of each step attempt -- called with the temporary vector + containing the internal step, before it would overwrite the + "saved" state on a successful step (:c:func:`ARKodeSetPostprocessStepFn`), + +The specific ordering of these functions within a given step depends on +whether each stage is explicit (as in ERKStep) or implicit (as in ARKStep or +MRIStep). Denoting the most-recent "saved" time step as :math:`(t_n,y_n)`, +the time-evolving temporary state within a step as :math:`(t_{cur},y_{cur})`, +the functions provided to the five above functions as ``PreStep``, +``PostStep``, ``PreRHS``, ``PostprocessStage``, and ``PostprocessStep``, and +denoting the IVP right hand side function as ``RHS``, then the flow of a +3-stage explicit method would proceed as: + +0. Initialize ``attempt`` counter to 0 + +1. Call ``PreStep`` with :math:`(t_{cur},y_{cur})` + +2. Stage 0 + + a. Call ``PreRHS`` with :math:`(t_{cur},y_{cur})` + + b. Evaluate ``RHS`` at :math:`(t_{cur},y_{cur})` + + c. Update :math:`(t_{cur},y_{cur})` with the next stage solution + + d. Call ``PostprocessStage`` with :math:`(t_{cur},y_{cur})` + +3. Stage 1 + + a. Call ``PreRHS`` with :math:`(t_{cur},y_{cur})` + + b. Evaluate ``RHS`` at :math:`(t_{cur},y_{cur})` + + c. Update :math:`(t_{cur},y_{cur})` with the next stage solution + + d. Call ``PostprocessStage`` with :math:`(t_{cur},y_{cur})` + +4. Stage 2 + + a. Call ``PreRHS`` with :math:`(t_{cur},y_{cur})` + + b. Evaluate ``RHS`` at :math:`(t_{cur},y_{cur})` + + c. Update :math:`(t_{cur},y_{cur})` with the new time step solution + + d. If the method is FSAL (the last stage is the time step solution), + call ``PostprocessStep`` with :math:`(t_{cur},y_{cur})`, else call + ``PostprocessStage`` with :math:`(t_{cur},y_{cur})`. + +5. If the method is not FSAL, update :math:`(t_{cur},y_{cur})` with the + new time step solution and call ``PostprocessStep``. + +6. Check the local error. + + a. If the step is successful then call ``PostStep`` with + :math:`(t_{cur},y_{cur})`, determine the next internal step size :math:`h_n`, + and update :math:`(t_n,y_n) \gets (t_{cur},y_{cur})` + + b. Else rewind :math:`(t_{cur},y_{cur}) \gets (t_n,y_n)`, increment ``attempt`` + counter, determine the next internal step size :math:`h_n`, and return to step 1 + + +Alternately, the flow of a 3-stage method that must perform a solve of some sort +for each stage (i.e., a DIRK or ARK method in ARKStep, or a multirate method with +MRIstep) would proceed as follows. Here, we show the implicit-explicit approach +since that also shows the relationship between both the implicit right-hand side +function ``RHS_i`` and the explicit right-hand side function ``RHS_e``: + +0. Initialize ``attempt`` counter to 0 + +1. Call ``PreStep`` with :math:`(t_{cur},y_{cur})` + +2. Stage 0 + + a. Solve implicit system, calling ``PreRHS`` and then ``RHS_i`` with + :math:`(t_{cur},y_{cur})` at each solver iteration; at the end of this + iteration :math:`(t_{cur},y_{cur})` holds the updated stage solution + + b. Call ``PostprocessStage`` with :math:`(t_{cur},y_{cur})` + + c. Call ``PreRHS`` with :math:`(t_{cur},y_{cur})` + + d. Evaluate ``RHS_i`` and then ``RHS_e`` at :math:`(t_{cur},y_{cur})` + +3. Stage 1 + + a. Solve implicit system, calling ``PreRHS`` and then ``RHS_i`` with + :math:`(t_{cur},y_{cur})` at each solver iteration; at the end of this + iteration :math:`(t_{cur},y_{cur})` holds the updated stage solution + + b. Call ``PostprocessStage`` with :math:`(t_{cur},y_{cur})` + + c. Call ``PreRHS`` with :math:`(t_{cur},y_{cur})` + + d. Evaluate ``RHS_i`` and then ``RHS_e`` at :math:`(t_{cur},y_{cur})` + +4. Stage 2 + + a. Solve implicit system, calling ``PreRHS`` and then ``RHS_i`` with + :math:`(t_{cur},y_{cur})` at each solver iteration; at the end of this + iteration :math:`(t_{cur},y_{cur})` holds the updated stage solution + + b. If the method is stiffly accurate, call ``PostprocessStep`` with :math:`(t_{cur},y_{cur})`, + else call ``PostprocessStage`` with :math:`(t_{cur},y_{cur})`, + + c. Call ``PreRHS`` with :math:`(t_{cur},y_{cur})` + + d. Evaluate ``RHS_i`` and then ``RHS_e`` at :math:`(t_{cur},y_{cur})` + +5. If the method is not stiffly accurate, update :math:`(t_{cur},y_{cur})` with the new + time step solution and call ``PostprocessStep``. + +6. Check the local error. + + a. If the step is successful then call ``PostStep`` with + :math:`(t_{cur},y_{cur})`, determine the next internal step size + :math:`h_n`, and update :math:`(t_n,y_n) \gets (t_{cur},y_{cur})` + + b. Else rewind :math:`(t_{cur},y_{cur}) \gets (t_n,y_n)`, increment ``attempt`` + counter, determine the next internal step size :math:`h_n`, and return to step 1 + +We consider these as "advanced" because of their danger, although the +callback functions are provided with the internally-evolving state, +users should **not** adjust entries of this state vector, since doing +so will destroy all theoretical guarantees of solution accuracy and +numerical stability. The only "supported" approach for user modifications +to the state vector is if this occurs between calls to :c:func:`ARKodeEvolve`, +and if the user calls :c:func:`ARKodeReset` after every modification to +the state vector so that ARKODE can reset its saved solution. + + + +.. cssclass:: table-bordered + +================================================= ========================================== ======================= +Optional input Function name Default +================================================= ========================================== ======================= +Set pre time step function :c:func:`ARKodeSetPreStepFn` ``NULL`` +Set post time step function :c:func:`ARKodeSetPostStepFn` ``NULL`` +Set pre right-hand side function :c:func:`ARKodeSetPreRhsFn` ``NULL`` +Set stage postprocessing function :c:func:`ARKodeSetPostprocessStageFn` ``NULL`` +Set time step postprocessing function :c:func:`ARKodeSetPostprocessStepFn` ``NULL`` +================================================= ========================================== ======================= + + + +.. c:function:: int ARKodeSetPreStepFn(void* arkode_mem, ARKPreStepFn prestep_fn) + + [ADVANCED] Provide a function to be called before each step attempt. + + The attached function allows users to set up auxiliary data structures that + only need to be updated at the start of a step and can be reused within the + time step (e.g., in their right-hand side function(s)). + + .. danger:: + + If the supplied function modifies any of the active state data, then all + theoretical guarantees of solution accuracy and stability are lost. + + :param arkode_mem: pointer to the ARKODE memory block. + :param prestep_fn: the user-supplied function to call. A ``NULL`` input + function disables calling a prestep function. + + :retval ARK_SUCCESS: the function exited successfully. + :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. + + .. versionadded:: x.y.z + + +.. c:function:: int ARKodeSetPostStepFn(void* arkode_mem, ARKPostStepFn poststep_fn) + + [ADVANCED] Provide a function to be called following each successful time + step. + + The attached function allows users to compute relevant diagnostic information + after each step. + + .. danger:: + + If the supplied function modifies any of the active state data, then all + theoretical guarantees of solution accuracy and stability are lost. + + :param arkode_mem: pointer to the ARKODE memory block. + :param poststep_fn: the user-supplied function to call. A ``NULL`` input + function disables calling a poststep function. + + :retval ARK_SUCCESS: the function exited successfully. + :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. + + .. versionadded:: x.y.z + + +.. c:function:: int ARKodeSetPreRhsFn(void* arkode_mem, ARKPreRhsFn prerhs_fn) + + [ADVANCED] Provides a function to be called prior to evaluating user-provided + right-hand side (RHS) functions. For partitioned methods with multiple RHS + functions (e.g., ARKStep or MRIStep), when multiple RHS functions will be + called in succession with identical inputs, this function is called only once + prior to the RHS function evaluations. + + The attached function allows users to set up auxiliary data structures that + will be used within the RHS evaluations (e.g., MPI communication to fill and + send exchange buffers). + + .. danger:: + + If the supplied function modifies any of the active state data, then all + theoretical guarantees of solution accuracy and stability are lost. + + :param arkode_mem: pointer to the ARKODE memory block. + :param prerhs_fn: the user-supplied function to call. A ``NULL`` input + function disables calling a pre-RHS function. + + :retval ARK_SUCCESS: the function exited successfully. + :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. + + .. versionadded:: x.y.z + + +.. c:function:: int ARKodeSetPostprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep) + + [ADVANCED] Provides a function to be called immediately after computing a new + step but before the step is accepted/rejected. + + .. danger:: + + If the supplied function modifies any of the active state data, then all + theoretical guarantees of solution accuracy and stability are lost. + + :param arkode_mem: pointer to the ARKODE memory block. + :param ProcessStep: the user-supplied function to call. A ``NULL`` input + function disables step postprocessing. + + :retval ARK_SUCCESS: the function exited successfully. + :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. + + .. versionadded:: x.y.z + + .. warning:: + + This function is currently incompatible with discrete adjoint capabilities + in ARKODE (:c:func:`ARKodeSetAdjointCheckpointScheme` and + :c:func:`ARKodeSetAdjointCheckpointIndex`). + + +.. c:function:: int ARKodeSetPostprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStage) + + [ADVANCED] Provides a function to be called immediately after each stage is + completed within ARKODE's multi-stage methods. + + .. danger:: + + If the supplied function modifies any of the active state data, then all + theoretical guarantees of solution accuracy and stability are lost. + + :param arkode_mem: pointer to the ARKODE memory block. + :param ProcessStage: the user-supplied function to call. A ``NULL`` input + function disables stage postprocessing. + + :retval ARK_SUCCESS: the function exited successfully. + :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. + + .. versionadded:: x.y.z + + .. warning:: + + This function is currently incompatible with discrete adjoint capabilities + in ARKODE (:c:func:`ARKodeSetAdjointCheckpointScheme` and + :c:func:`ARKodeSetAdjointCheckpointIndex`). + + + + .. _ARKODE.Usage.InterpolatedOutput: Interpolated output function From 4aa1560bf6c1f39d52cf3a8c86757ae63401d74c Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Sun, 15 Mar 2026 21:24:47 -0400 Subject: [PATCH 179/298] Minor update --- .../guide/source/Usage/User_supplied.rst | 43 ++++++++++++------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/doc/arkode/guide/source/Usage/User_supplied.rst b/doc/arkode/guide/source/Usage/User_supplied.rst index 2aff89a515..757fc27511 100644 --- a/doc/arkode/guide/source/Usage/User_supplied.rst +++ b/doc/arkode/guide/source/Usage/User_supplied.rst @@ -1134,6 +1134,13 @@ step attempt by ARKODE (see :c:func:`ARKodeSetPreStepFn`). .. c:type:: int (*ARKPreStepFn)(sunrealtype t, N_Vector y, long int step, int attempt, void* user_data) + A function to be called before each internal step attempt. + + .. danger:: + + If the supplied function modifies any of the active state data, then all + theoretical guarantees of solution accuracy and stability are lost. + :param t: the current value of the independent variable. :param y: the current value of the dependent variable vector that will be used as the initial condition for the upcoming step. @@ -1151,11 +1158,6 @@ step attempt by ARKODE (see :c:func:`ARKodeSetPreStepFn`). positive value if a recoverable error occurred, or a negative value if an unrecoverable error occurred. - .. danger:: - - If the supplied function modifies any of the active state data, then all - theoretical guarantees of solution accuracy and stability are lost. - .. versionadded:: x.y.z A user-provided :c:type:`ARKPostStepFn` will be called following each *successful* internal time @@ -1163,6 +1165,13 @@ step by ARKODE (see :c:func:`ARKodeSetPostStepFn`). .. c:type:: int (*ARKPostStepFn)(sunrealtype t, N_Vector y, long int step, void* user_data) + A function to be called after each successful step attempt. + + .. danger:: + + If the supplied function modifies any of the active state data, then all + theoretical guarantees of solution accuracy and stability are lost. + :param t: the current value of the independent variable. :param y: the current value of the dependent variable vector that resulted from the successful time step. @@ -1175,11 +1184,6 @@ step by ARKODE (see :c:func:`ARKodeSetPostStepFn`). positive value if a recoverable error occurred, or a negative value if an unrecoverable error occurred. - .. danger:: - - If the supplied function modifies any of the active state data, then all - theoretical guarantees of solution accuracy and stability are lost. - .. versionadded:: x.y.z A user-provided :c:type:`ARKPreRhsFn` will be called just prior to any user-supplied @@ -1191,6 +1195,13 @@ that :math:`(t,y)` input. .. c:type:: int (*ARKPreRhsFn)(sunrealtype t, N_Vector y, void* user_data) + A function to be called before right-hand side (RHS) evaluations. + + .. danger:: + + If the supplied function modifies any of the active state data, then all + theoretical guarantees of solution accuracy and stability are lost. + :param t: the current value of the independent variable that will be provided to the :c:type:`ARKRhsFn`. :param y: the current value of the dependent variable vector that will be @@ -1202,11 +1213,6 @@ that :math:`(t,y)` input. positive value if a recoverable error occurred, or a negative value if an unrecoverable error occurred. - .. danger:: - - If the supplied function modifies any of the active state data, then all - theoretical guarantees of solution accuracy and stability are lost. - .. versionadded:: x.y.z A user-provided :c:type:`ARKPostProcessFn` will be called either after each internal @@ -1215,6 +1221,13 @@ stage (see :c:func:`ARKodeSetPostprocessStageFn`) or after each internal step at .. c:type:: int (*ARKPostProcessFn)(sunrealtype t, N_Vector y, void* user_data) + A function to postprocess step or stage data. + + .. danger:: + + If the supplied function modifies any of the active state data, then all + theoretical guarantees of solution accuracy and stability are lost. + :param t: the current value of the independent variable. :param y: the current value of the dependent variable vector resulting from the step or stage. From 840bfa1c3e790dddbf0a88a795a2aced64e98b8b Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 15 Mar 2026 18:56:17 -0700 Subject: [PATCH 180/298] fix PostProcessStepFn calls --- src/arkode/arkode_lsrkstep.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index a9f5d5e13a..94dfd9ab53 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -2099,8 +2099,8 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* apply user-supplied step postprocessing function (if supplied) */ if (ark_mem->PostProcessStepFn) { - retval = ark_mem->PostProcessStageFn(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PostProcessStepFn(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -2417,8 +2417,8 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* apply user-supplied step postprocessing function (if supplied) */ if (ark_mem->PostProcessStepFn) { - retval = ark_mem->PostProcessStageFn(ark_mem->tcur, ark_mem->ycur, - ark_mem->user_data); + retval = ark_mem->PostProcessStepFn(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", From bbde52bda72870b734d32754ba2b2541d24ee61a Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 15 Mar 2026 22:54:20 -0700 Subject: [PATCH 181/298] remove duplicate documentation, revise postprocesses stage timing description --- .../guide/source/Usage/User_callable.rst | 223 ++++-------------- 1 file changed, 49 insertions(+), 174 deletions(-) diff --git a/doc/arkode/guide/source/Usage/User_callable.rst b/doc/arkode/guide/source/Usage/User_callable.rst index 4717cba5fc..7e6a1ca68a 100644 --- a/doc/arkode/guide/source/Usage/User_callable.rst +++ b/doc/arkode/guide/source/Usage/User_callable.rst @@ -1628,131 +1628,6 @@ Use compensated summation for accumulating time :c:func:`ARKodeSetUseCompensa when using the key "arkid.use_compensated_sums". -.. c:function:: int ARKodeSetPreStepFn(void* arkode_mem, ARKPreStepFn prestep_fn) - - [ADVANCED] Provide a function to be called before each step attempt. - - The attached function allows users to set up auxiliary data structures that - only need to be updated at the start of a step and can be reused within the - time step (e.g., in their right-hand side function(s)). - - .. danger:: - - If the supplied function modifies any of the active state data, then all - theoretical guarantees of solution accuracy and stability are lost. - - :param arkode_mem: pointer to the ARKODE memory block. - :param prestep_fn: the user-supplied function to call. A ``NULL`` input - function disables calling a prestep function. - - :retval ARK_SUCCESS: the function exited successfully. - :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. - - .. versionadded:: x.y.z - - -.. c:function:: int ARKodeSetPostStepFn(void* arkode_mem, ARKPostStepFn poststep_fn) - - [ADVANCED] Provide a function to be called following each successful time - step. - - The attached function allows users to compute relevant diagnostic information - after each step. - - .. danger:: - - If the supplied function modifies any of the active state data, then all - theoretical guarantees of solution accuracy and stability are lost. - - :param arkode_mem: pointer to the ARKODE memory block. - :param poststep_fn: the user-supplied function to call. A ``NULL`` input - function disables calling a poststep function. - - :retval ARK_SUCCESS: the function exited successfully. - :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. - - .. versionadded:: x.y.z - - -.. c:function:: int ARKodeSetPreRhsFn(void* arkode_mem, ARKPreRhsFn prerhs_fn) - - [ADVANCED] Provides a function to be called prior to evaluating user-provided - right-hand side (RHS) functions. For partitioned methods with multiple RHS - functions (e.g., ARKStep or MRIStep), when multiple RHS functions will be - called in succession with identical inputs, this function is called only once - prior to the RHS function evaluations. - - The attached function allows users to set up auxiliary data structures that - will be used within the RHS evaluations (e.g., MPI communication to fill and - send exchange buffers). - - .. danger:: - - If the supplied function modifies any of the active state data, then all - theoretical guarantees of solution accuracy and stability are lost. - - :param arkode_mem: pointer to the ARKODE memory block. - :param prerhs_fn: the user-supplied function to call. A ``NULL`` input - function disables calling a pre-RHS function. - - :retval ARK_SUCCESS: the function exited successfully. - :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. - - .. versionadded:: x.y.z - - -.. c:function:: int ARKodeSetPostprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep) - - [ADVANCED] Provides a function to be called immediately after computing a new - step but before the step is accepted/rejected. - - .. danger:: - - If the supplied function modifies any of the active state data, then all - theoretical guarantees of solution accuracy and stability are lost. - - :param arkode_mem: pointer to the ARKODE memory block. - :param ProcessStep: the user-supplied function to call. A ``NULL`` input - function disables step postprocessing. - - :retval ARK_SUCCESS: the function exited successfully. - :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. - - .. versionadded:: x.y.z - - .. warning:: - - This function is currently incompatible with discrete adjoint capabilities - in ARKODE (:c:func:`ARKodeSetAdjointCheckpointScheme` and - :c:func:`ARKodeSetAdjointCheckpointIndex`). - - -.. c:function:: int ARKodeSetPostprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStage) - - [ADVANCED] Provides a function to be called immediately after each stage is - completed within ARKODE's multi-stage methods. - - .. danger:: - - If the supplied function modifies any of the active state data, then all - theoretical guarantees of solution accuracy and stability are lost. - - :param arkode_mem: pointer to the ARKODE memory block. - :param ProcessStage: the user-supplied function to call. A ``NULL`` input - function disables stage postprocessing. - - :retval ARK_SUCCESS: the function exited successfully. - :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. - - .. versionadded:: x.y.z - - .. warning:: - - This function is currently incompatible with discrete adjoint capabilities - in ARKODE (:c:func:`ARKodeSetAdjointCheckpointScheme` and - :c:func:`ARKodeSetAdjointCheckpointIndex`). - - .. _ARKODE.Usage.ARKodeAdaptivityInputTable: Optional inputs for time step adaptivity @@ -3615,18 +3490,17 @@ Disable inactive root warnings :c:func:`ARKodeSetNoInactiveRootWarn` e .. _ARKODE.Usage.ARKodeProcessingInputTable: -Step and stage processing optional inputs (ADVANCED) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Pre-step, Post-step, and Post-processing optional inputs (ADVANCED) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -ARKODE provides multiple options for user-supplied callback routines -that can be called at various times within the time-stepping process. -Each of these callback functions has a similar structure, wherein the -callback function will be provided with the current time, current -solution, and the *user_data* structure that was provided to -:c:func:`ARKodeSetUserData`; some functions are also provided the current -time step counter, or even a counter indicating how many times this step -has been attempted previously. More specifically, users may provide -callback functions for the following events within a time step: +ARKODE provides multiple options for user-supplied callback routines that can be +called at various times within the time-stepping process. Each of these +callback functions has a similar structure, wherein the callback function will +be provided with the current time, current solution, and the *user_data* +structure that was provided to :c:func:`ARKodeSetUserData`; some functions are +also provided the current time step counter, or even a counter indicating how +many times this step has been attempted previously. More specifically, users may +provide callback functions for the following events within a time step: * just prior to starting a time step attempt (:c:func:`ARKodeSetPreStepFn`), @@ -3634,23 +3508,22 @@ callback functions for the following events within a time step: * at the end of a successful time step (:c:func:`ARKodeSetPostStepFn`), * just prior to evaluating user-provided right-hand side (RHS) - functions (:c:func:`ARKodeSetPreRhsFn`) + functions (:c:func:`ARKodeSetPreRhsFn`), * immediately after each stage is completed within a time step - (:c:func:`ARKodeSetPostprocessStageFn`) + (:c:func:`ARKodeSetPostprocessStageFn`), and -* at the end of each step attempt -- called with the temporary vector - containing the internal step, before it would overwrite the - "saved" state on a successful step (:c:func:`ARKodeSetPostprocessStepFn`), +* immedaiately after computing the new step but before the step is + accepted or rejected (:c:func:`ARKodeSetPostprocessStepFn`). -The specific ordering of these functions within a given step depends on -whether each stage is explicit (as in ERKStep) or implicit (as in ARKStep or -MRIStep). Denoting the most-recent "saved" time step as :math:`(t_n,y_n)`, -the time-evolving temporary state within a step as :math:`(t_{cur},y_{cur})`, -the functions provided to the five above functions as ``PreStep``, -``PostStep``, ``PreRHS``, ``PostprocessStage``, and ``PostprocessStep``, and -denoting the IVP right hand side function as ``RHS``, then the flow of a -3-stage explicit method would proceed as: +The specific ordering of these functions within a given step depends on whether +each stage is explicit (as in ERKStep) or implicit (as in ARKStep or MRIStep). +Denoting the most-recent "saved" time step as :math:`(t_n,y_n)`, the +time-evolving temporary state within a step as :math:`(t_{cur},y_{cur})`, the +functions provided to the five above functions as ``PreStep``, ``PostStep``, +``PreRHS``, ``PostprocessStage``, and ``PostprocessStep``, and denoting the IVP +right hand side function as ``RHS``, then the flow of a 3-stage explicit method +would proceed as: 0. Initialize ``attempt`` counter to 0 @@ -3694,18 +3567,19 @@ denoting the IVP right hand side function as ``RHS``, then the flow of a 6. Check the local error. a. If the step is successful then call ``PostStep`` with - :math:`(t_{cur},y_{cur})`, determine the next internal step size :math:`h_n`, - and update :math:`(t_n,y_n) \gets (t_{cur},y_{cur})` - - b. Else rewind :math:`(t_{cur},y_{cur}) \gets (t_n,y_n)`, increment ``attempt`` - counter, determine the next internal step size :math:`h_n`, and return to step 1 + :math:`(t_{cur},y_{cur})`, determine the next internal step size + :math:`h_n`, and update :math:`(t_n,y_n) \gets (t_{cur},y_{cur})` + b. Else rewind :math:`(t_{cur},y_{cur}) \gets (t_n,y_n)`, increment + ``attempt`` counter, determine the next internal step size :math:`h_n`, + and return to step 1 Alternately, the flow of a 3-stage method that must perform a solve of some sort -for each stage (i.e., a DIRK or ARK method in ARKStep, or a multirate method with -MRIstep) would proceed as follows. Here, we show the implicit-explicit approach -since that also shows the relationship between both the implicit right-hand side -function ``RHS_i`` and the explicit right-hand side function ``RHS_e``: +for each stage (i.e., a DIRK or ARK method in ARKStep, or a multirate method +with MRIstep) would proceed as follows. Here, we show the implicit-explicit +approach since that also shows the relationship between both the implicit +right-hand side function ``RHS_i`` and the explicit right-hand side function +``RHS_e``: 0. Initialize ``attempt`` counter to 0 @@ -3741,15 +3615,16 @@ function ``RHS_i`` and the explicit right-hand side function ``RHS_e``: :math:`(t_{cur},y_{cur})` at each solver iteration; at the end of this iteration :math:`(t_{cur},y_{cur})` holds the updated stage solution - b. If the method is stiffly accurate, call ``PostprocessStep`` with :math:`(t_{cur},y_{cur})`, - else call ``PostprocessStage`` with :math:`(t_{cur},y_{cur})`, + b. If the method is stiffly accurate, call ``PostprocessStep`` with + :math:`(t_{cur},y_{cur})`, else call ``PostprocessStage`` with + :math:`(t_{cur},y_{cur})`, c. Call ``PreRHS`` with :math:`(t_{cur},y_{cur})` d. Evaluate ``RHS_i`` and then ``RHS_e`` at :math:`(t_{cur},y_{cur})` -5. If the method is not stiffly accurate, update :math:`(t_{cur},y_{cur})` with the new - time step solution and call ``PostprocessStep``. +5. If the method is not stiffly accurate, update :math:`(t_{cur},y_{cur})` with + the new time step solution and call ``PostprocessStep``. 6. Check the local error. @@ -3757,18 +3632,18 @@ function ``RHS_i`` and the explicit right-hand side function ``RHS_e``: :math:`(t_{cur},y_{cur})`, determine the next internal step size :math:`h_n`, and update :math:`(t_n,y_n) \gets (t_{cur},y_{cur})` - b. Else rewind :math:`(t_{cur},y_{cur}) \gets (t_n,y_n)`, increment ``attempt`` - counter, determine the next internal step size :math:`h_n`, and return to step 1 - -We consider these as "advanced" because of their danger, although the -callback functions are provided with the internally-evolving state, -users should **not** adjust entries of this state vector, since doing -so will destroy all theoretical guarantees of solution accuracy and -numerical stability. The only "supported" approach for user modifications -to the state vector is if this occurs between calls to :c:func:`ARKodeEvolve`, -and if the user calls :c:func:`ARKodeReset` after every modification to -the state vector so that ARKODE can reset its saved solution. - + b. Else rewind :math:`(t_{cur},y_{cur}) \gets (t_n,y_n)`, increment + ``attempt`` counter, determine the next internal step size :math:`h_n`, + and return to step 1 + +We consider these as "advanced" because of their danger, although the callback +functions are provided with the internally-evolving state, users should **not** +adjust entries of this state vector, since doing so will destroy all theoretical +guarantees of solution accuracy and numerical stability. The only "supported" +approach for user modifications to the state vector is if this occurs between +calls to :c:func:`ARKodeEvolve`, and if the user calls :c:func:`ARKodeReset` +after every modification to the state vector so that ARKODE can reset its saved +solution. .. cssclass:: table-bordered From b295325f7a45593c1e1acd7be39184b483cd9cd8 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 15 Mar 2026 23:15:31 -0700 Subject: [PATCH 182/298] fix links, follow user-suppled function doc style --- .../guide/source/Usage/User_supplied.rst | 152 ++++++++++-------- 1 file changed, 84 insertions(+), 68 deletions(-) diff --git a/doc/arkode/guide/source/Usage/User_supplied.rst b/doc/arkode/guide/source/Usage/User_supplied.rst index 757fc27511..436acaf593 100644 --- a/doc/arkode/guide/source/Usage/User_supplied.rst +++ b/doc/arkode/guide/source/Usage/User_supplied.rst @@ -79,10 +79,10 @@ The user-supplied functions for ARKODE consist of: :math:`\xi'(y(t))` (required), * functions that can optionally be called :ref:`before each step attempt and - after each successful step `, + after each successful step `, * a function that can optionally be called :ref:`before right-hand side function - evaluations `, and + evaluations `, and * functions that can optionally be called :ref:`after each step or stage computation within supported ARKODE time stepping modules @@ -1114,21 +1114,21 @@ Relaxation Jacobian function .. _ARKODE.Usage.ARKodeProcessingFunctions: -Step and stage processing functions ------------------------------------- - -The user may supply functions that will be called before/after each internal time -step, before their :c:type:`ARKRhsFn` problem-defining functions are called, and -after each internal stage. These user-supplied functions vary slightly in type, -depending on their use case, as outlined below. Such functions are typically used -for applications that compute auxiliary diagnostic data between time steps or stages, -and store that data in their `user_data` pointer or output to screen or disk. -Alternately, some may be used to better prepare auxiliary data for an upcoming time -step or :c:type:`ARKRhsFn` evaluation. **These should not be used to modify the -active state data; if so then all theoretical guarantees of solution accuracy and +Pre-Step, Post-Step, and Post-processing functions (ADVANCED) +------------------------------------------------------------- + +The user may supply functions that will be called before each time step attempt, +after each successful step, before their :c:type:`ARKRhsFn` problem-defining +functions are called, and after each internal step/stage computation. These +user-supplied functions vary slightly in type, depending on their use case, as +outlined below. Such functions are typically used for applications that compute +auxiliary diagnostic data between time steps or stages, and store that data in +their `user_data` pointer or output to screen or disk. Alternately, some may be +used to better prepare auxiliary data for an upcoming time step or +:c:type:`ARKRhsFn` evaluation. **These should not be used to modify the active +state data; if so then all theoretical guarantees of solution accuracy and stability will be lost.** - A user-provided :c:type:`ARKPreStepFn` will be called before each internal time step attempt by ARKODE (see :c:func:`ARKodeSetPreStepFn`). @@ -1141,27 +1141,31 @@ step attempt by ARKODE (see :c:func:`ARKodeSetPreStepFn`). If the supplied function modifies any of the active state data, then all theoretical guarantees of solution accuracy and stability are lost. - :param t: the current value of the independent variable. - :param y: the current value of the dependent variable vector that will be used - as the initial condition for the upcoming step. - :param step: the step index (starting from the first internal step since ARKODE - was (re-)initialized). - :param attempt: a counter indicating which attempt at the step is about to - occur -- 0 indicates that the previous step succeeded and this - is the first attempt the step `step`, while a number greater than - 0 indicates that the previous step attempt failed and this is a - subsequent try at computing the step `step`. - :param user_data: the ``user_data`` pointer that was passed to - :c:func:`ARKodeSetUserData`. + **Parameters:** - :return: An :c:func:`ARKPreStepFn` function should return 0 if successful, a - positive value if a recoverable error occurred, or a negative value if an - unrecoverable error occurred. + * **t** -- the current value of the independent variable. + * **y** -- the current value of the dependent variable vector that will be + used as the initial condition for the upcoming step. + * **step** -- the step index (starting from the first internal step since + ARKODE was (re-)initialized). + * **attempt** -- a counter indicating which attempt at the step is about to + occur -- 0 indicates that the previous step succeeded and this is the first + attempt the step `step`, while a number greater than 0 indicates that the + previous step attempt failed and this is a subsequent try at computing the + step `step`. + * **user_data** -- the ``user_data`` pointer that was passed to + :c:func:`ARKodeSetUserData`. + + **Returns:** + + An :c:func:`ARKPreStepFn` function should return 0 if successful, a + positive value if a recoverable error occurred, or a negative value if an + unrecoverable error occurred. .. versionadded:: x.y.z -A user-provided :c:type:`ARKPostStepFn` will be called following each *successful* internal time -step by ARKODE (see :c:func:`ARKodeSetPostStepFn`). +A user-provided :c:type:`ARKPostStepFn` will be called following each +*successful* internal time step by ARKODE (see :c:func:`ARKodeSetPostStepFn`). .. c:type:: int (*ARKPostStepFn)(sunrealtype t, N_Vector y, long int step, void* user_data) @@ -1172,26 +1176,30 @@ step by ARKODE (see :c:func:`ARKodeSetPostStepFn`). If the supplied function modifies any of the active state data, then all theoretical guarantees of solution accuracy and stability are lost. - :param t: the current value of the independent variable. - :param y: the current value of the dependent variable vector that resulted from - the successful time step. - :param step: the step index (starting from the first internal step since ARKODE - was (re-)initialized). - :param user_data: the ``user_data`` pointer that was passed to - :c:func:`ARKodeSetUserData`. + **Parameters:** - :return: An :c:func:`ARKPostStepFn` function should return 0 if successful, a - positive value if a recoverable error occurred, or a negative value if an - unrecoverable error occurred. + * **t** -- the current value of the independent variable. + * **y** -- the current value of the dependent variable vector that resulted + from the successful time step. + * **step** -- the step index (starting from the first internal step since + ARKODE was (re-)initialized). + * **user_data** -- the ``user_data`` pointer that was passed to + :c:func:`ARKodeSetUserData`. + + **Returns:** + + An :c:func:`ARKPostStepFn` function should return 0 if successful, a + positive value if a recoverable error occurred, or a negative value if an + unrecoverable error occurred. .. versionadded:: x.y.z -A user-provided :c:type:`ARKPreRhsFn` will be called just prior to any user-supplied -:c:type:`ARKRhsFn` (see :c:func:`ARKodeSetPreRhsFn`). In the case of partitioned -integration methods (e.g., ARKStep, MRIStep), if multiple :c:type:`ARKRhsFn` will be -called with the same :math:`(t,y)` argument, then the :c:type:`ARKPreRhsFn` will be -called only once just prior to the first :c:type:`ARKRhsFn` that will be called with -that :math:`(t,y)` input. +A user-provided :c:type:`ARKPreRhsFn` will be called just prior to any +user-supplied :c:type:`ARKRhsFn` (see :c:func:`ARKodeSetPreRhsFn`). In the case +of partitioned integration methods (e.g., ARKStep, MRIStep), if multiple +:c:type:`ARKRhsFn` will be called with the same :math:`(t,y)` argument, then the +:c:type:`ARKPreRhsFn` will be called only once just prior to the first +:c:type:`ARKRhsFn` that will be called with that :math:`(t,y)` input. .. c:type:: int (*ARKPreRhsFn)(sunrealtype t, N_Vector y, void* user_data) @@ -1202,22 +1210,26 @@ that :math:`(t,y)` input. If the supplied function modifies any of the active state data, then all theoretical guarantees of solution accuracy and stability are lost. - :param t: the current value of the independent variable that will be provided - to the :c:type:`ARKRhsFn`. - :param y: the current value of the dependent variable vector that will be - provided to the :c:type:`ARKRhsFn`. - :param user_data: the ``user_data`` pointer that was passed to - :c:func:`ARKodeSetUserData`. + **Parameters:** - :return: An :c:func:`ARKPreRhsFn` function should return 0 if successful, a - positive value if a recoverable error occurred, or a negative value if an - unrecoverable error occurred. + * **t** -- the current value of the independent variable that will be + provided to the :c:type:`ARKRhsFn`. + * **y** -- the current value of the dependent variable vector that will be + provided to the :c:type:`ARKRhsFn`. + * **user_data** -- the ``user_data`` pointer that was passed to + :c:func:`ARKodeSetUserData`. + + **Returns:** + + An :c:func:`ARKPreRhsFn` function should return 0 if successful, a + positive value if a recoverable error occurred, or a negative value if an + unrecoverable error occurred. .. versionadded:: x.y.z -A user-provided :c:type:`ARKPostProcessFn` will be called either after each internal -stage (see :c:func:`ARKodeSetPostprocessStageFn`) or after each internal step attempt -(see :c:func:`ARKodeSetPostprocessStepFn`). +A user-provided :c:type:`ARKPostProcessFn` will be called either after each +internal stage (see :c:func:`ARKodeSetPostprocessStageFn`) or after each +internal step attempt (see :c:func:`ARKodeSetPostprocessStepFn`). .. c:type:: int (*ARKPostProcessFn)(sunrealtype t, N_Vector y, void* user_data) @@ -1228,15 +1240,19 @@ stage (see :c:func:`ARKodeSetPostprocessStageFn`) or after each internal step at If the supplied function modifies any of the active state data, then all theoretical guarantees of solution accuracy and stability are lost. - :param t: the current value of the independent variable. - :param y: the current value of the dependent variable vector resulting from - the step or stage. - :param user_data: the ``user_data`` pointer that was passed to - :c:func:`ARKodeSetUserData`. + **Parameters:** - :return: An :c:func:`ARKPostProcessFn` function should return 0 if successful, a - positive value if a recoverable error occurred, or a negative value if an - unrecoverable error occurred. + * **t** -- the current value of the independent variable. + * **y** -- the current value of the dependent variable vector resulting from + the step or stage. + * **user_data** -- the ``user_data`` pointer that was passed to + :c:func:`ARKodeSetUserData`. + + **Returns:** + + An :c:func:`ARKPostProcessFn` function should return 0 if successful, a + positive value if a recoverable error occurred, or a negative value if an + unrecoverable error occurred. .. warning:: From 4be9839d41403bada67a7227258e04ac6d20b333 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 15 Mar 2026 23:17:40 -0700 Subject: [PATCH 183/298] add pre-rhs to section title --- doc/arkode/guide/source/Usage/User_callable.rst | 4 ++-- doc/arkode/guide/source/Usage/User_supplied.rst | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/arkode/guide/source/Usage/User_callable.rst b/doc/arkode/guide/source/Usage/User_callable.rst index 7e6a1ca68a..1462a4f6f9 100644 --- a/doc/arkode/guide/source/Usage/User_callable.rst +++ b/doc/arkode/guide/source/Usage/User_callable.rst @@ -3490,8 +3490,8 @@ Disable inactive root warnings :c:func:`ARKodeSetNoInactiveRootWarn` e .. _ARKODE.Usage.ARKodeProcessingInputTable: -Pre-step, Post-step, and Post-processing optional inputs (ADVANCED) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Pre-step, Post-step, Pre-RHS, and Post-processing optional inputs (ADVANCED) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ARKODE provides multiple options for user-supplied callback routines that can be called at various times within the time-stepping process. Each of these diff --git a/doc/arkode/guide/source/Usage/User_supplied.rst b/doc/arkode/guide/source/Usage/User_supplied.rst index 436acaf593..4d76e81d51 100644 --- a/doc/arkode/guide/source/Usage/User_supplied.rst +++ b/doc/arkode/guide/source/Usage/User_supplied.rst @@ -1114,8 +1114,8 @@ Relaxation Jacobian function .. _ARKODE.Usage.ARKodeProcessingFunctions: -Pre-Step, Post-Step, and Post-processing functions (ADVANCED) -------------------------------------------------------------- +Pre-Step, Post-Step, Pre-RHS, and Post-processing functions (ADVANCED) +---------------------------------------------------------------------- The user may supply functions that will be called before each time step attempt, after each successful step, before their :c:type:`ARKRhsFn` problem-defining From 699d393f00cbb5c441fe1ba6f4fc400f83fc82c6 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Wed, 18 Mar 2026 11:15:17 -0400 Subject: [PATCH 184/298] Temporarily unraveled the yn -> ycur copy in arkode.c --- src/arkode/arkode.c | 8 +++++--- src/arkode/arkode_arkstep.c | 5 ++++- src/arkode/arkode_erkstep.c | 5 ++++- src/arkode/arkode_mristep.c | 26 +++++++++++++++++++++++--- src/arkode/arkode_splittingstep.c | 2 ++ 5 files changed, 38 insertions(+), 8 deletions(-) diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 2793ac89f9..fbf70cd66e 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -743,7 +743,7 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, /* fill (tcur,ycur) with current stored solution */ ark_mem->tcur = ark_mem->tn; - N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + /* N_VScale(ONE, ark_mem->yn, ark_mem->ycur); */ /*-------------------------------------------------- Looping point for successful internal steps @@ -914,7 +914,9 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, /* call the user-supplied pre-step function (if it exists) */ if (ark_mem->PreStepFn) { - retval = ark_mem->PreStepFn(ark_mem->tcur, ark_mem->ycur, ark_mem->nst, + /* retval = ark_mem->PreStepFn(ark_mem->tcur, ark_mem->ycur, ark_mem->nst, */ + /* attempts, ark_mem->user_data); */ + retval = ark_mem->PreStepFn(ark_mem->tcur, ark_mem->yn, ark_mem->nst, attempts, ark_mem->user_data); if (retval != 0) { return (ARK_PRESTEPFN_FAIL); } } @@ -1018,7 +1020,7 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, /* reset (tcur,ycur) to last saved state before reattempting step */ ark_mem->tcur = ark_mem->tn; - N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + /* N_VScale(ONE, ark_mem->yn, ark_mem->ycur); */ } /* end looping for step attempts */ diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index 5dba291bbc..b413ac7601 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1775,9 +1775,12 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (do_save) { errcode = + /* SUNAdjointCheckpointScheme_InsertVector(ark_mem->checkpoint_scheme, */ + /* ark_mem->checkpoint_step_idx, 0, */ + /* ark_mem->tcur, ark_mem->ycur); */ SUNAdjointCheckpointScheme_InsertVector(ark_mem->checkpoint_scheme, ark_mem->checkpoint_step_idx, 0, - ark_mem->tcur, ark_mem->ycur); + ark_mem->tcur, ark_mem->yn); if (errcode) { diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index 93db20db1d..cd4e88493d 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -821,9 +821,12 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (do_save) { errcode = + /* SUNAdjointCheckpointScheme_InsertVector(ark_mem->checkpoint_scheme, */ + /* ark_mem->checkpoint_step_idx, 0, */ + /* ark_mem->tcur, ark_mem->ycur); */ SUNAdjointCheckpointScheme_InsertVector(ark_mem->checkpoint_scheme, ark_mem->checkpoint_step_idx, 0, - ark_mem->tcur, ark_mem->ycur); + ark_mem->tcur, ark_mem->yn); if (errcode) { diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index b76b7bfa04..afd1ff635f 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1813,6 +1813,9 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt do_embedding = !ark_mem->fixedstep || (ark_mem->AccumErrorType != ARK_ACCUMERROR_NONE); + /* initialize ycur with saved solution */ + N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + /* if MRI adaptivity is enabled: reset fast accumulated error, and send appropriate control parameter to the fast integrator */ adapt_type = SUNAdaptController_GetType(ark_mem->hadapt_mem->hcontroller); @@ -2369,6 +2372,9 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) ytilde = ark_mem->tempv4; ytemp = ark_mem->tempv2; + /* initialize ycur with saved solution */ + N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + /* if MRI adaptivity is enabled: reset fast accumulated error, and send appropriate control parameter to the fast integrator */ adapt_type = SUNAdaptController_GetType(ark_mem->hadapt_mem->hcontroller); @@ -2408,10 +2414,23 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } } + /* call nonlinear solver setup if it exists */ + if (step_mem->NLS) + { + if ((step_mem->NLS)->ops->setup) + { + N_VConst(ZERO, ark_mem->tempv3); /* set guess to 0 */ + retval = SUNNonlinSolSetup(step_mem->NLS, ark_mem->tempv3, ark_mem); + if (retval < 0) { return (ARK_NLS_SETUP_FAIL); } + if (retval > 0) { return (ARK_NLS_SETUP_RECVR); } + } + } + SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = 0, stage type = %d, tcur = " SUN_FORMAT_G, MRISTAGE_FIRST, ark_mem->tcur); - SUNLogExtraDebugVec(ARK_LOGGER, "slow stage", ark_mem->ycur, "z_0(:) ="); + /* SUNLogExtraDebugVec(ARK_LOGGER, "slow stage", ark_mem->ycur, "z_0(:) ="); */ + SUNLogExtraDebugVec(ARK_LOGGER, "slow stage", ark_mem->yn, "z_0(:) ="); /* Evaluate the slow RHS functions if needed. NOTE: we decide between calling the full RHS function (if ark_mem->fn is non-NULL and MRIStep is not an inner @@ -2486,7 +2505,7 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) embedding = (stage == step_mem->stages); /* Set initial condition for this stage */ - N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + if (stage > 1) N_VScale(ONE, ark_mem->yn, ark_mem->ycur); /* Set current stage abscissa */ cstage = (embedding) ? ONE : step_mem->MRIC->c[stage]; @@ -2914,7 +2933,8 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = 0, stage type = %d, tcur = " SUN_FORMAT_G, MRISTAGE_FIRST, ark_mem->tcur); - SUNLogExtraDebugVec(ARK_LOGGER, "slow stage", ark_mem->ycur, "z_0(:) ="); + /* SUNLogExtraDebugVec(ARK_LOGGER, "slow stage", ark_mem->ycur, "z_0(:) ="); */ + SUNLogExtraDebugVec(ARK_LOGGER, "slow stage", ark_mem->yn, "z_0(:) ="); /* Evaluate the slow RHS function if needed. NOTE: we decide between calling the full RHS function (if ark_mem->fn is non-NULL and MRIStep is not an inner diff --git a/src/arkode/arkode_splittingstep.c b/src/arkode/arkode_splittingstep.c index 789cb59971..66e1b0c8cf 100644 --- a/src/arkode/arkode_splittingstep.c +++ b/src/arkode/arkode_splittingstep.c @@ -309,6 +309,8 @@ static int splittingStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, SplittingStepCoefficients coefficients = step_mem->coefficients; + N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + SUNLogInfo(ARK_LOGGER, "begin-sequential-methods-list", "sequential method = 0"); From 4e250a8273bde41ea8ebb9df40e628f3773ba97d Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 20 Mar 2026 13:56:07 -0400 Subject: [PATCH 185/298] Cleaned up commented code from last commit --- src/arkode/arkode.c | 8 ++------ src/arkode/arkode_arkstep.c | 3 --- src/arkode/arkode_erkstep.c | 3 --- src/arkode/arkode_mristep.c | 7 +------ 4 files changed, 3 insertions(+), 18 deletions(-) diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index fbf70cd66e..2a357e5bea 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -741,9 +741,8 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, } } - /* fill (tcur,ycur) with current stored solution */ + /* fill current independent variable */ ark_mem->tcur = ark_mem->tn; - /* N_VScale(ONE, ark_mem->yn, ark_mem->ycur); */ /*-------------------------------------------------- Looping point for successful internal steps @@ -914,8 +913,6 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, /* call the user-supplied pre-step function (if it exists) */ if (ark_mem->PreStepFn) { - /* retval = ark_mem->PreStepFn(ark_mem->tcur, ark_mem->ycur, ark_mem->nst, */ - /* attempts, ark_mem->user_data); */ retval = ark_mem->PreStepFn(ark_mem->tcur, ark_mem->yn, ark_mem->nst, attempts, ark_mem->user_data); if (retval != 0) { return (ARK_PRESTEPFN_FAIL); } @@ -1018,9 +1015,8 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, ark_mem->h *= ark_mem->eta; ark_mem->next_h = ark_mem->hprime = ark_mem->h; - /* reset (tcur,ycur) to last saved state before reattempting step */ + /* reset tcur to last saved internal time before reattempting step */ ark_mem->tcur = ark_mem->tn; - /* N_VScale(ONE, ark_mem->yn, ark_mem->ycur); */ } /* end looping for step attempts */ diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index b413ac7601..ecf536ebab 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1775,9 +1775,6 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (do_save) { errcode = - /* SUNAdjointCheckpointScheme_InsertVector(ark_mem->checkpoint_scheme, */ - /* ark_mem->checkpoint_step_idx, 0, */ - /* ark_mem->tcur, ark_mem->ycur); */ SUNAdjointCheckpointScheme_InsertVector(ark_mem->checkpoint_scheme, ark_mem->checkpoint_step_idx, 0, ark_mem->tcur, ark_mem->yn); diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index cd4e88493d..bfbefb64d8 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -821,9 +821,6 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (do_save) { errcode = - /* SUNAdjointCheckpointScheme_InsertVector(ark_mem->checkpoint_scheme, */ - /* ark_mem->checkpoint_step_idx, 0, */ - /* ark_mem->tcur, ark_mem->ycur); */ SUNAdjointCheckpointScheme_InsertVector(ark_mem->checkpoint_scheme, ark_mem->checkpoint_step_idx, 0, ark_mem->tcur, ark_mem->yn); diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index afd1ff635f..8293836d58 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -2372,9 +2372,6 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) ytilde = ark_mem->tempv4; ytemp = ark_mem->tempv2; - /* initialize ycur with saved solution */ - N_VScale(ONE, ark_mem->yn, ark_mem->ycur); - /* if MRI adaptivity is enabled: reset fast accumulated error, and send appropriate control parameter to the fast integrator */ adapt_type = SUNAdaptController_GetType(ark_mem->hadapt_mem->hcontroller); @@ -2429,7 +2426,6 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = 0, stage type = %d, tcur = " SUN_FORMAT_G, MRISTAGE_FIRST, ark_mem->tcur); - /* SUNLogExtraDebugVec(ARK_LOGGER, "slow stage", ark_mem->ycur, "z_0(:) ="); */ SUNLogExtraDebugVec(ARK_LOGGER, "slow stage", ark_mem->yn, "z_0(:) ="); /* Evaluate the slow RHS functions if needed. NOTE: we decide between calling the @@ -2505,7 +2501,7 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) embedding = (stage == step_mem->stages); /* Set initial condition for this stage */ - if (stage > 1) N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + N_VScale(ONE, ark_mem->yn, ark_mem->ycur); /* Set current stage abscissa */ cstage = (embedding) ? ONE : step_mem->MRIC->c[stage]; @@ -2933,7 +2929,6 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = 0, stage type = %d, tcur = " SUN_FORMAT_G, MRISTAGE_FIRST, ark_mem->tcur); - /* SUNLogExtraDebugVec(ARK_LOGGER, "slow stage", ark_mem->ycur, "z_0(:) ="); */ SUNLogExtraDebugVec(ARK_LOGGER, "slow stage", ark_mem->yn, "z_0(:) ="); /* Evaluate the slow RHS function if needed. NOTE: we decide between calling the From 6c8b6b3d9640cf58058f5436c79d3f0556923cc9 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 20 Mar 2026 14:27:51 -0400 Subject: [PATCH 186/298] Formatting --- src/arkode/arkode_arkstep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index ecf536ebab..abf0196ffd 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1776,8 +1776,8 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) { errcode = SUNAdjointCheckpointScheme_InsertVector(ark_mem->checkpoint_scheme, - ark_mem->checkpoint_step_idx, 0, - ark_mem->tcur, ark_mem->yn); + ark_mem->checkpoint_step_idx, + 0, ark_mem->tcur, ark_mem->yn); if (errcode) { From 528e33ed7471ac5f29b3a26266509ec9e11cdafa Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 20 Mar 2026 15:11:27 -0400 Subject: [PATCH 187/298] Updated to accommodate removal of yn -> ycur copy in arkode.c --- src/arkode/arkode_lsrkstep.c | 46 ++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 94dfd9ab53..2f7313eef3 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -538,8 +538,7 @@ int lsrkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, should be 0. The variables (ark_mem->tcur, ark_mem->ycur) should - contain the current time and solution at each stage within - the time step. + contain the current time and solution at the end of this time step. The input/output variable nflagPtr is generally used in ARKODE to gauge the convergence of any algebraic solvers. However, since @@ -638,7 +637,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* call the user-supplied pre-rhs function (if supplied) */ if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->yn, ark_mem->user_data); if (retval != 0) { @@ -649,7 +648,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } /* call fe */ - retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->fn, + retval = step_mem->fe(ark_mem->tcur, ark_mem->yn, ark_mem->fn, ark_mem->user_data); step_mem->nfe++; if (retval != ARK_SUCCESS) @@ -888,8 +887,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) should be 0. The variables (ark_mem->tcur, ark_mem->ycur) should - contain the current time and solution at each stage of within - the time step. + contain the current time and solution at the end of this time step. The input/output variable nflagPtr is generally used in ARKODE to gauge the convergence of any algebraic solvers. However, since @@ -991,7 +989,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->yn, ark_mem->user_data); if (retval != 0) { @@ -1000,7 +998,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) return ARK_PRERHSFN_FAIL; } } - retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->fn, + retval = step_mem->fe(ark_mem->tcur, ark_mem->yn, ark_mem->fn, ark_mem->user_data); step_mem->nfe++; if (retval != ARK_SUCCESS) @@ -1217,8 +1215,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) should be 0. The variables (ark_mem->tcur, ark_mem->ycur) should - contain the current time and solution at each stage of within - the time step. + contain the current time and solution at the end of this time step. The input/output variable nflagPtr is used to gauge convergence of any algebraic solvers within the step. As this routine @@ -1282,7 +1279,7 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->yn, ark_mem->user_data); if (retval != 0) { @@ -1292,7 +1289,7 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->fn, + retval = step_mem->fe(ark_mem->tcur, ark_mem->yn, ark_mem->fn, ark_mem->user_data); step_mem->nfe++; if (retval != ARK_SUCCESS) @@ -1474,8 +1471,7 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr should be 0. The variables (ark_mem->tcur, ark_mem->ycur) should - contain the current time and solution at each stage of within - the time step. + contain the current time and solution at the end of this time step. The input/output variable nflagPtr is used to gauge convergence of any algebraic solvers within the step. As this routine @@ -1523,7 +1519,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->yn, ark_mem->user_data); if (retval != 0) { @@ -1533,7 +1529,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->fn, + retval = step_mem->fe(ark_mem->tcur, ark_mem->yn, ark_mem->fn, ark_mem->user_data); step_mem->nfe++; if (retval != ARK_SUCCESS) @@ -1856,8 +1852,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr should be 0. The variables (ark_mem->tcur, ark_mem->ycur) should - contain the current time and solution at each stage of within - the time step. + contain the current time and solution at the end of this time step. The input/output variable nflagPtr is used to gauge convergence of any algebraic solvers within the step. As this routine @@ -1903,7 +1898,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->yn, ark_mem->user_data); if (retval != 0) { @@ -1913,7 +1908,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->fn, + retval = step_mem->fe(ark_mem->tcur, ark_mem->yn, ark_mem->fn, ark_mem->user_data); step_mem->nfe++; if (retval != ARK_SUCCESS) @@ -2137,8 +2132,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr should be 0. The variables (ark_mem->tcur, ark_mem->ycur) should - contain the current time and solution at each stage of within - the time step. + contain the current time and solution at the end of this time step. The input/output variable nflagPtr is used to gauge convergence of any algebraic solvers within the step. As this routine @@ -2183,7 +2177,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->yn, ark_mem->user_data); if (retval != 0) { @@ -2193,7 +2187,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } } - retval = step_mem->fe(ark_mem->tcur, ark_mem->ycur, ark_mem->fn, + retval = step_mem->fe(ark_mem->tcur, ark_mem->yn, ark_mem->fn, ark_mem->user_data); step_mem->nfe++; if (retval != ARK_SUCCESS) @@ -2723,7 +2717,7 @@ int lsrkStep_ComputeNewDomEig(ARKodeMem ark_mem, ARKodeLSRKStepMem step_mem) } else if (step_mem->dom_eig_fn != NULL) { - retval = step_mem->dom_eig_fn(ark_mem->tn, ark_mem->ycur, ark_mem->fn, + retval = step_mem->dom_eig_fn(ark_mem->tn, ark_mem->yn, ark_mem->fn, &step_mem->lambdaR, &step_mem->lambdaI, ark_mem->user_data, ark_mem->tempv1, ark_mem->tempv2, ark_mem->tempv3); @@ -2803,7 +2797,7 @@ int lsrkStep_DQJtimes(void* arkode_mem, N_Vector v, N_Vector Jv) if (retval != ARK_SUCCESS) { return retval; } sunrealtype t = ark_mem->tcur; - N_Vector y = ark_mem->ycur; + N_Vector y = ark_mem->yn; N_Vector work = ark_mem->tempv3; /* Compute RHS function, if necessary. */ From 49875ea9268145bc45b8c9c74ac8fd808ac4dba7 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 20 Mar 2026 15:11:43 -0400 Subject: [PATCH 188/298] Formatting --- src/arkode/arkode_lsrkstep.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 2f7313eef3..fbd45ed7d4 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -637,8 +637,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* call the user-supplied pre-rhs function (if supplied) */ if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->yn, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->yn, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -989,8 +988,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->yn, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->yn, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1279,8 +1277,7 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->yn, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->yn, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1519,8 +1516,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->yn, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->yn, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1898,8 +1894,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->yn, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->yn, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -2177,8 +2172,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->yn, - ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->yn, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", From dbd0e6f411605d46c87c40ed7391298b5ba0d933 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 20 Mar 2026 16:35:45 -0400 Subject: [PATCH 189/298] Reverting most of the changes in this PR --- CHANGELOG.md | 10 +++++----- doc/shared/RecentChanges.rst | 10 +++++----- src/arkode/arkode_arkstep.c | 4 ++-- src/arkode/arkode_erkstep.c | 2 +- src/arkode/arkode_mristep.c | 5 ++--- 5 files changed, 15 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13dc90be1e..3453e2d604 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,11 +6,6 @@ ### New Features and Enhancements -The default number of stages for the SSP Runge-Kutta methods `ARKODE_LSRK_SSP_S_2` -and `ARKODE_LSRK_SSP_S_3` in LSRKStep were changed from 10 and 9, respectively, to -their minimum allowable values of 2 and 4. Users may revert to the previous values -by calling `LSRKStepSetNumSSPStages`. - ARKODE now allows users to supply functions that will be called before each internal time step attempt (`ARKodeSetPreStepFn`), after each successful time step (`ARKodeSetPostStepFn`), before right-hand side routines are called on an @@ -28,6 +23,11 @@ of only calling a function on successful steps, switch to using Removed extraneous copy of output vector when using ARKODE in ``ARK_ONE_STEP`` mode. +The default number of stages for the SSP Runge-Kutta methods `ARKODE_LSRK_SSP_S_2` +and `ARKODE_LSRK_SSP_S_3` in LSRKStep were changed from 10 and 9, respectively, to +their minimum allowable values of 2 and 4. Users may revert to the previous values +by calling `LSRKStepSetNumSSPStages`. + ### Bug Fixes Fixed a CMake bug where the SuperLU_MT interface would not be built and diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index 02f3c0200d..187418c733 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -5,11 +5,6 @@ **New Features and Enhancements** -The default number of stages for the SSP Runge-Kutta methods :c:enumerator:`ARKODE_LSRK_SSP_S_2` -and :c:enumerator:`ARKODE_LSRK_SSP_S_3` in LSRKStep were changed from 10 and 9, respectively, to -their minimum allowable values of 2 and 4. Users may revert to the previous values by calling -:c:func:`LSRKStepSetNumSSPStages`. - ARKODE now allows users to supply functions that will be called before each internal time step attempt (:c:func:`ARKodeSetPreStepFn`), after each successful time step (:c:func:`ARKodeSetPostStepFn`), before right-hand side routines are @@ -27,6 +22,11 @@ successful steps, switch to using :c:func:`ARKodeSetPostStepFn`. Removed extraneous copy of output vector when using ARKODE in ``ARK_ONE_STEP`` mode. +The default number of stages for the SSP Runge-Kutta methods :c:enumerator:`ARKODE_LSRK_SSP_S_2` +and :c:enumerator:`ARKODE_LSRK_SSP_S_3` in LSRKStep were changed from 10 and 9, respectively, to +their minimum allowable values of 2 and 4. Users may revert to the previous values by calling +:c:func:`LSRKStepSetNumSSPStages`. + **Bug Fixes** Fixed a CMake bug where the SuperLU_MT interface would not be built and diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index fc6ca30d8f..abf0196ffd 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1845,7 +1845,7 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) of the just completed step (tn, yn) and potentially reuse the evaluation (FSAL method) or save the value for later use. */ mode = (ark_mem->initsetup) ? ARK_FULLRHS_START : ARK_FULLRHS_END; - retval = ark_mem->step_fullrhs(ark_mem, ark_mem->tn, ark_mem->ycur, + retval = ark_mem->step_fullrhs(ark_mem, ark_mem->tn, ark_mem->yn, ark_mem->fn, mode); if (retval) { @@ -1878,7 +1878,7 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) return (ARK_PRERHSFN_FAIL); } } - retval = step_mem->fi(ark_mem->tn, ark_mem->ycur, step_mem->Fi[0], + retval = step_mem->fi(ark_mem->tn, ark_mem->yn, step_mem->Fi[0], ark_mem->user_data); step_mem->nfi++; diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index 62068b98a4..20a9ee8e6e 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -789,7 +789,7 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (!(ark_mem->fn_is_current)) { mode = (ark_mem->initsetup) ? ARK_FULLRHS_START : ARK_FULLRHS_END; - retval = ark_mem->step_fullrhs(ark_mem, ark_mem->tn, ark_mem->ycur, + retval = ark_mem->step_fullrhs(ark_mem, ark_mem->tn, ark_mem->yn, ark_mem->fn, mode); if (retval) { diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 59467078a5..20f1160590 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1321,15 +1321,14 @@ int mriStep_Init(ARKodeMem ark_mem, sunrealtype tout, int init_type) if (ark_mem->hin == ZERO) { /* tempv1 = fslow(t0, y0) */ - ark_mem->tcur = ark_mem->tn; - if (mriStep_SlowRHS(ark_mem, ark_mem->tcur, ark_mem->yn, ark_mem->tempv1, + if (mriStep_SlowRHS(ark_mem, ark_mem->tn, ark_mem->yn, ark_mem->tempv1, ARK_FULLRHS_START) != ARK_SUCCESS) { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, __FILE__, "error calling slow RHS function(s)"); return (ARK_RHSFUNC_FAIL); } - retval = mriStep_Hin(ark_mem, ark_mem->tcur, tout, ark_mem->tempv1, + retval = mriStep_Hin(ark_mem, ark_mem->tn, tout, ark_mem->tempv1, &(ark_mem->hin)); if (retval != ARK_SUCCESS) { From a8e4e68a857ea186205ecade3b41e53809139e84 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 20 Mar 2026 16:41:55 -0400 Subject: [PATCH 190/298] Unraveled more yn -> ycur changes --- src/arkode/arkode_mristep.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 20f1160590..25bec711bc 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1813,9 +1813,6 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt do_embedding = !ark_mem->fixedstep || (ark_mem->AccumErrorType != ARK_ACCUMERROR_NONE); - /* initialize ycur with saved solution */ - N_VScale(ONE, ark_mem->yn, ark_mem->ycur); - /* if MRI adaptivity is enabled: reset fast accumulated error, and send appropriate control parameter to the fast integrator */ adapt_type = SUNAdaptController_GetType(ark_mem->hadapt_mem->hcontroller); @@ -1846,7 +1843,7 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt if (!ark_mem->fixedstep) { retval = mriStepInnerStepper_Reset(step_mem->stepper, ark_mem->tn, - ark_mem->ycur); + ark_mem->yn); if (retval != ARK_SUCCESS) { arkProcessError(ark_mem, ARK_INNERSTEP_FAIL, __LINE__, __func__, __FILE__, @@ -1870,7 +1867,7 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = 0, stage type = %d, tcur = " SUN_FORMAT_G, MRISTAGE_FIRST, ark_mem->tcur); - SUNLogExtraDebugVec(ARK_LOGGER, "slow stage", ark_mem->ycur, "z_0(:) ="); + SUNLogExtraDebugVec(ARK_LOGGER, "slow stage", ark_mem->yn, "z_0(:) ="); /* Evaluate the slow RHS functions if needed. NOTE: we decide between calling the full RHS function (if ark_mem->fn is non-NULL and MRIStep is not an inner @@ -1881,7 +1878,7 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt nested_mri = step_mem->expforcing || step_mem->impforcing; if (ark_mem->fn == NULL || nested_mri) { - retval = mriStep_UpdateF0(ark_mem, step_mem, ark_mem->tn, ark_mem->ycur, + retval = mriStep_UpdateF0(ark_mem, step_mem, ark_mem->tn, ark_mem->yn, ARK_FULLRHS_START); if (retval) { @@ -1904,7 +1901,7 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } else if (ark_mem->fn != NULL && !ark_mem->fn_is_current) { - retval = mriStep_FullRHS(ark_mem, ark_mem->tn, ark_mem->ycur, ark_mem->fn, + retval = mriStep_FullRHS(ark_mem, ark_mem->tn, ark_mem->yn, ark_mem->fn, ARK_FULLRHS_START); if (retval) { @@ -1923,6 +1920,7 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* The first stage is the previous time-step solution, so its RHS is the [already-computed] slow RHS from the start of the step */ + N_VScale(ONE, ark_mem->yn, ark_mem->ycur); /* Loop over remaining internal stages */ for (is = 1; is < step_mem->stages - 1; is++) @@ -2402,7 +2400,7 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (!ark_mem->fixedstep) { retval = mriStepInnerStepper_Reset(step_mem->stepper, ark_mem->tn, - ark_mem->ycur); + ark_mem->yn); if (retval != ARK_SUCCESS) { arkProcessError(ark_mem, ARK_INNERSTEP_FAIL, __LINE__, __func__, __FILE__, @@ -2437,7 +2435,7 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) nested_mri = step_mem->expforcing || step_mem->impforcing; if (ark_mem->fn == NULL || nested_mri) { - retval = mriStep_UpdateF0(ark_mem, step_mem, ark_mem->tn, ark_mem->ycur, + retval = mriStep_UpdateF0(ark_mem, step_mem, ark_mem->tn, ark_mem->yn, ARK_FULLRHS_START); if (retval) { @@ -2460,7 +2458,7 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } if (ark_mem->fn != NULL && !ark_mem->fn_is_current) { - retval = mriStep_FullRHS(ark_mem, ark_mem->tn, ark_mem->ycur, ark_mem->fn, + retval = mriStep_FullRHS(ark_mem, ark_mem->tn, ark_mem->yn, ark_mem->fn, ARK_FULLRHS_START); if (retval) { @@ -2917,7 +2915,8 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* for adaptive computations, reset the inner integrator to the beginning of this step */ if (!ark_mem->fixedstep) { - retval = mriStepInnerStepper_Reset(step_mem->stepper, t0, ark_mem->ycur); + retval = mriStepInnerStepper_Reset(step_mem->stepper, ark_mem->tn, + ark_mem->yn); if (retval != ARK_SUCCESS) { arkProcessError(ark_mem, ARK_INNERSTEP_FAIL, __LINE__, __func__, __FILE__, @@ -2939,7 +2938,7 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) nested_mri = step_mem->expforcing || step_mem->impforcing; if (ark_mem->fn == NULL || nested_mri) { - retval = mriStep_UpdateF0(ark_mem, step_mem, ark_mem->tn, ark_mem->ycur, + retval = mriStep_UpdateF0(ark_mem, step_mem, ark_mem->tn, ark_mem->yn, ARK_FULLRHS_START); if (retval) { @@ -2950,7 +2949,7 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } else if (ark_mem->fn != NULL && !ark_mem->fn_is_current) { - retval = mriStep_FullRHS(ark_mem, ark_mem->tn, ark_mem->ycur, ark_mem->fn, + retval = mriStep_FullRHS(ark_mem, ark_mem->tn, ark_mem->yn, ark_mem->fn, ARK_FULLRHS_START); if (retval) { From cd0528beb0a7741d78edc1ea31a06a6155efef53 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 20 Mar 2026 17:03:41 -0400 Subject: [PATCH 191/298] Formatting --- .../arkode/CXX_serial/ark_kpr_nestedmri.cpp | 9 +++------ src/arkode/arkode.c | 6 +++--- src/arkode/arkode_io.c | 18 +++++++++--------- src/arkode/arkode_mristep.c | 4 ++-- 4 files changed, 17 insertions(+), 20 deletions(-) diff --git a/examples/arkode/CXX_serial/ark_kpr_nestedmri.cpp b/examples/arkode/CXX_serial/ark_kpr_nestedmri.cpp index ae4146d26b..27cc64edba 100644 --- a/examples/arkode/CXX_serial/ark_kpr_nestedmri.cpp +++ b/examples/arkode/CXX_serial/ark_kpr_nestedmri.cpp @@ -451,8 +451,7 @@ int main(int argc, char* argv[]) if (check_flag(retval, "ARKodeSetMaxNumSteps")) return 1; retval = ARKodeSetUserData(inner_arkode_mem, (void*)&opts); if (check_flag(retval, "ARKodeSetUserData")) return 1; - retval = ARKodeSetOptions(inner_arkode_mem, "arkfast", nullptr, - argc, argv); + retval = ARKodeSetOptions(inner_arkode_mem, "arkfast", nullptr, argc, argv); if (check_flag(retval, "ARKodeSetOptions")) return 1; // Create inner stepper @@ -876,8 +875,7 @@ int main(int argc, char* argv[]) retval = ARKodeSetFixedStep(mid_arkode_mem, opts.hm); if (check_flag(retval, "ARKodeSetFixedStep")) return 1; } - retval = ARKodeSetOptions(mid_arkode_mem, "arkmid", nullptr, - argc, argv); + retval = ARKodeSetOptions(mid_arkode_mem, "arkmid", nullptr, argc, argv); if (check_flag(retval, "ARKodeSetOptions")) return 1; // Create intermediate stepper @@ -937,8 +935,7 @@ int main(int argc, char* argv[]) retval = ARKodeSetFixedStep(arkode_mem, opts.hs); if (check_flag(retval, "ARKodeSetFixedStep")) return 1; } - retval = ARKodeSetOptions(arkode_mem, "arkslow", nullptr, - argc, argv); + retval = ARKodeSetOptions(arkode_mem, "arkslow", nullptr, argc, argv); if (check_flag(retval, "ARKodeSetOptions")) return 1; // diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index e8df24ab8c..00e18bf248 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -137,7 +137,7 @@ int ARKodeResize(void* arkode_mem, N_Vector y0, sunrealtype hscale, ark_mem->hprime = (ark_mem->tstop - ark_mem->tcur) * (ONE - FOUR * ark_mem->uround); ark_mem->eta = ark_mem->hprime / ark_mem->h; - if (ark_mem->skipadapttstop) ark_mem->tstoplimited = SUNTRUE; + if (ark_mem->skipadapttstop) ark_mem->tstoplimited = SUNTRUE; } } } @@ -868,7 +868,7 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, if (ark_mem->hprime != ark_mem->h) { ark_mem->h = ark_mem->h * ark_mem->eta; - if (!ark_mem->skipadapttstop) ark_mem->next_h = ark_mem->h; + if (!ark_mem->skipadapttstop) ark_mem->next_h = ark_mem->h; } if (ark_mem->fixedstep) { @@ -1121,7 +1121,7 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, ark_mem->hprime = (ark_mem->tstop - ark_mem->tcur) * (ONE - FOUR * ark_mem->uround); ark_mem->eta = ark_mem->hprime / ark_mem->h; - if (ark_mem->skipadapttstop) ark_mem->tstoplimited = SUNTRUE; + if (ark_mem->skipadapttstop) ark_mem->tstoplimited = SUNTRUE; } } diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index 4ac0d7b797..be6da105e6 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -79,14 +79,14 @@ int ARKodeSetDefaults(void* arkode_mem) ark_mem->maxnef = MAXNEF; /* max error test fails */ ark_mem->maxncf = MAXNCF; /* max convergence fails */ ark_mem->maxconstrfails = MAXCONSTRFAILS; /* max number of constraint fails */ - ark_mem->hin = ZERO; /* determine initial step on-the-fly */ - ark_mem->hmin = ZERO; /* no minimum step size */ - ark_mem->hmax_inv = ZERO; /* no maximum step size */ - ark_mem->tstopset = SUNFALSE; /* no stop time set */ - ark_mem->tstopinterp = SUNFALSE; /* copy at stop time */ - ark_mem->tstoplimited = SUNFALSE; /* tstop did not limit last step */ - ark_mem->skipadapttstop = SUNFALSE; /* tstop-limited steps can affect adaptivity */ - ark_mem->tstop = ZERO; /* no fixed stop time */ + ark_mem->hin = ZERO; /* determine initial step on-the-fly */ + ark_mem->hmin = ZERO; /* no minimum step size */ + ark_mem->hmax_inv = ZERO; /* no maximum step size */ + ark_mem->tstopset = SUNFALSE; /* no stop time set */ + ark_mem->tstopinterp = SUNFALSE; /* copy at stop time */ + ark_mem->tstoplimited = SUNFALSE; /* tstop did not limit last step */ + ark_mem->skipadapttstop = SUNFALSE; /* tstop-limited steps can affect adaptivity */ + ark_mem->tstop = ZERO; /* no fixed stop time */ ark_mem->hadapt_mem->etamx1 = ETAMX1; /* max change on first step */ ark_mem->hadapt_mem->etamxf = ETAMXF; /* max change on error-failed step */ ark_mem->hadapt_mem->etamin = ETAMIN; /* min bound on time step reduction */ @@ -1288,7 +1288,7 @@ int ARKodeSkipAdaptStopTime(void* arkode_mem, sunbooleantype skip) MSG_ARK_NO_MEM); return (ARK_MEM_NULL); } - ark_mem = (ARKodeMem)arkode_mem; + ark_mem = (ARKodeMem)arkode_mem; ark_mem->skipadapttstop = skip; return (ARK_SUCCESS); diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 161ed4fef9..02ba33b40f 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1335,8 +1335,8 @@ int mriStep_Init(ARKodeMem ark_mem, sunrealtype tout, int init_type) if (ark_mem->hin == ZERO) { /* tempv1 = fslow(t0, y0) */ - if (mriStep_SlowRHS(ark_mem, ark_mem->tn, ark_mem->yn, - ark_mem->tempv1, ARK_FULLRHS_START) != ARK_SUCCESS) + if (mriStep_SlowRHS(ark_mem, ark_mem->tn, ark_mem->yn, ark_mem->tempv1, + ARK_FULLRHS_START) != ARK_SUCCESS) { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, __FILE__, "error calling slow RHS function(s)"); From e0fa4e726af0fa7dcf9dec84090ab096f42fb4cd Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 20 Mar 2026 22:00:29 -0400 Subject: [PATCH 192/298] Added internal arkode flag to signal whether the time-stepping module expects ARKODE to send ycur==yn upon entry to the TakeStep routine -- this is useful for MRKGARK and SplittingStep, that otherwise would have to copy yn into ycur preceding every step attempt. --- doc/shared/sunnonlinsol/SUNNonlinSol_API.rst | 5 +++++ src/arkode/arkode.c | 23 ++++++++++++++++---- src/arkode/arkode_impl.h | 2 ++ src/arkode/arkode_mristep.c | 16 +++++++++----- src/arkode/arkode_splittingstep.c | 5 +++-- 5 files changed, 39 insertions(+), 12 deletions(-) diff --git a/doc/shared/sunnonlinsol/SUNNonlinSol_API.rst b/doc/shared/sunnonlinsol/SUNNonlinSol_API.rst index 07500db65a..db50693d9f 100644 --- a/doc/shared/sunnonlinsol/SUNNonlinSol_API.rst +++ b/doc/shared/sunnonlinsol/SUNNonlinSol_API.rst @@ -689,6 +689,11 @@ A SUNNonlinSol implementation *must* do the following: * Define and implement a user-callable constructor to create a ``SUNNonlinearSolver`` object. +* If the implementation depends on a linear solver, then it must evaluate + the nonlinear system function passed to :c:func:`SUNNonlinSolSetSysFn` + *before* setting up the linear solver (signaled by the `callLSetup` flag + to :c:func:`SUNNonlinSolSolve`). + To aid in the creation of custom ``SUNNonlinearSolver`` modules, the generic ``SUNNonlinearSolver`` module provides the utility functions :c:func:`SUNNonlinSolNewEmpty` and :c:func:`SUNNonlinSolFreeEmpty`. When used diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 2a357e5bea..e5371a9738 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -741,8 +741,9 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, } } - /* fill current independent variable */ + /* fill current independent variable (and optionally ycur with yn) */ ark_mem->tcur = ark_mem->tn; + if (ark_mem->ensure_ycur) N_VScale(ONE, ark_mem->yn, ark_mem->ycur); /*-------------------------------------------------- Looping point for successful internal steps @@ -913,8 +914,16 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, /* call the user-supplied pre-step function (if it exists) */ if (ark_mem->PreStepFn) { - retval = ark_mem->PreStepFn(ark_mem->tcur, ark_mem->yn, ark_mem->nst, - attempts, ark_mem->user_data); + if (ark_mem->ensure_ycur) + { + retval = ark_mem->PreStepFn(ark_mem->tcur, ark_mem->ycur, ark_mem->nst, + attempts, ark_mem->user_data); + } + else + { + retval = ark_mem->PreStepFn(ark_mem->tcur, ark_mem->yn, ark_mem->nst, + attempts, ark_mem->user_data); + } if (retval != 0) { return (ARK_PRESTEPFN_FAIL); } } @@ -1015,8 +1024,10 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, ark_mem->h *= ark_mem->eta; ark_mem->next_h = ark_mem->hprime = ark_mem->h; - /* reset tcur to last saved internal time before reattempting step */ + /* reset tcur to last saved internal time before reattempting step + (and optionally ycur to yn ) */ ark_mem->tcur = ark_mem->tn; + if (ark_mem->ensure_ycur) N_VScale(ONE, ark_mem->yn, ark_mem->ycur); } /* end looping for step attempts */ @@ -1347,6 +1358,7 @@ void ARKodePrintMem(void* arkode_mem, FILE* outfile) fprintf(outfile, "tolsf = " SUN_FORMAT_G "\n", ark_mem->tolsf); fprintf(outfile, "call_fullrhs = %i\n", ark_mem->call_fullrhs); fprintf(outfile, "do_adjoint = %i\n", ark_mem->do_adjoint); + fprintf(outfile, "ensure_ycur = %i\n", ark_mem->ensure_ycur); /* output counters */ fprintf(outfile, "nhnil = %i\n", ark_mem->nhnil); @@ -1657,6 +1669,9 @@ ARKodeMem arkCreate(SUNContext sunctx) ark_mem->AccumErrorType = ARK_ACCUMERROR_NONE; ark_mem->AccumError = ZERO; + /* Default to having stepper initialize ycur during evolution */ + ark_mem->ensure_ycur = SUNFALSE; + /* Set default values for integrator and stepper optional inputs */ iret = ARKodeSetDefaults(ark_mem); if (iret != ARK_SUCCESS) diff --git a/src/arkode/arkode_impl.h b/src/arkode/arkode_impl.h index b977d1ae0c..599ba9e4c0 100644 --- a/src/arkode/arkode_impl.h +++ b/src/arkode/arkode_impl.h @@ -478,6 +478,8 @@ struct ARKodeMemRec N_Vector ycur; /* pointer to user-provided solution memory; used as evolving solution by the time stepper modules */ + sunbooleantype ensure_ycur; /* SUNTRUE if stepper expects ycur=yn on + entry to its takestep routine */ N_Vector yn; /* solution from the last successful step */ N_Vector fn; /* full IVP right-hand side from last step */ sunbooleantype fn_is_current; /* SUNTRUE if fn has been evaluated at yn */ diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 8293836d58..dff999dc3e 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -989,6 +989,13 @@ int mriStep_Init(ARKodeMem ark_mem, sunrealtype tout, int init_type) return (ARK_ILL_INPUT); } + /* MRIGARK methods expect arkode to ensure that ycur==yn upon + entry to TakeStep function */ + if (ark_mem->step == mriStep_TakeStepMRIGARK) + { + ark_mem->ensure_ycur = SUNTRUE; + } + /* Retrieve/store method and embedding orders now that tables are finalized */ step_mem->stages = step_mem->MRIC->stages; step_mem->q = ark_mem->hadapt_mem->q = step_mem->MRIC->q; @@ -1754,9 +1761,9 @@ int mriStep_UpdateF0(ARKodeMem ark_mem, ARKodeMRIStepMem step_mem, This routine serves the primary purpose of the MRIStep module: it performs a single MRI step (with embedding, if possible). - The vector ark_mem->yn holds the previous time-step solution - on input, and the vector ark_mem->ycur should hold the result - of this step on output. + Both the vectors ark_mem->yn and ark_mem->ycur hold the previous + time-step solution on input, and the vector ark_mem->ycur should + hold the result of this step on output. If timestep adaptivity is enabled, this routine also computes the error estimate y-ytilde, where ytilde is the @@ -1813,9 +1820,6 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt do_embedding = !ark_mem->fixedstep || (ark_mem->AccumErrorType != ARK_ACCUMERROR_NONE); - /* initialize ycur with saved solution */ - N_VScale(ONE, ark_mem->yn, ark_mem->ycur); - /* if MRI adaptivity is enabled: reset fast accumulated error, and send appropriate control parameter to the fast integrator */ adapt_type = SUNAdaptController_GetType(ark_mem->hadapt_mem->hcontroller); diff --git a/src/arkode/arkode_splittingstep.c b/src/arkode/arkode_splittingstep.c index 66e1b0c8cf..83c4ead1d2 100644 --- a/src/arkode/arkode_splittingstep.c +++ b/src/arkode/arkode_splittingstep.c @@ -141,6 +141,9 @@ static int splittingStep_Init(ARKodeMem ark_mem, } } + /* inform arkode to ensure that ycur==yn upon entry to TakeStep function */ + ark_mem->ensure_ycur = SUNTRUE; + /* immediately return if resize or reset */ if (init_type == RESIZE_INIT || init_type == RESET_INIT) { @@ -309,8 +312,6 @@ static int splittingStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, SplittingStepCoefficients coefficients = step_mem->coefficients; - N_VScale(ONE, ark_mem->yn, ark_mem->ycur); - SUNLogInfo(ARK_LOGGER, "begin-sequential-methods-list", "sequential method = 0"); From 38414817d227430d22cb7b1ba876e81de5e9b37a Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 20 Mar 2026 22:01:39 -0400 Subject: [PATCH 193/298] Formatting --- src/arkode/arkode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index e5371a9738..d24ae1cc41 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -743,7 +743,7 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, /* fill current independent variable (and optionally ycur with yn) */ ark_mem->tcur = ark_mem->tn; - if (ark_mem->ensure_ycur) N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + if (ark_mem->ensure_ycur) N_VScale(ONE, ark_mem->yn, ark_mem->ycur); /*-------------------------------------------------- Looping point for successful internal steps @@ -1027,7 +1027,7 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, /* reset tcur to last saved internal time before reattempting step (and optionally ycur to yn ) */ ark_mem->tcur = ark_mem->tn; - if (ark_mem->ensure_ycur) N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + if (ark_mem->ensure_ycur) N_VScale(ONE, ark_mem->yn, ark_mem->ycur); } /* end looping for step attempts */ From fe6eeefa0c56df0a79c47925f79bcdc4423d3fe4 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 20 Mar 2026 22:03:26 -0400 Subject: [PATCH 194/298] Formatting --- src/arkode/arkode_mristep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index c8e5754269..00eb88cb8c 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1334,8 +1334,8 @@ int mriStep_Init(ARKodeMem ark_mem, sunrealtype tout, int init_type) if (ark_mem->hin == ZERO) { /* tempv1 = fslow(t0, y0) */ - if (mriStep_SlowRHS(ark_mem, ark_mem->tn, ark_mem->yn, - ark_mem->tempv1, ARK_FULLRHS_START) != ARK_SUCCESS) + if (mriStep_SlowRHS(ark_mem, ark_mem->tn, ark_mem->yn, ark_mem->tempv1, + ARK_FULLRHS_START) != ARK_SUCCESS) { arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, __FILE__, "error calling slow RHS function(s)"); From ac130841e860371091e871991c6944dc34bba422 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 20 Mar 2026 22:11:05 -0400 Subject: [PATCH 195/298] Updated MRIGARK to consistently use ycur at the start of the step --- src/arkode/arkode_mristep.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index dff999dc3e..127e37227e 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1850,7 +1850,7 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt if (!ark_mem->fixedstep) { retval = mriStepInnerStepper_Reset(step_mem->stepper, ark_mem->tn, - ark_mem->yn); + ark_mem->ycur); if (retval != ARK_SUCCESS) { arkProcessError(ark_mem, ARK_INNERSTEP_FAIL, __LINE__, __func__, __FILE__, @@ -1885,7 +1885,7 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt nested_mri = step_mem->expforcing || step_mem->impforcing; if (ark_mem->fn == NULL || nested_mri) { - retval = mriStep_UpdateF0(ark_mem, step_mem, ark_mem->tn, ark_mem->yn, + retval = mriStep_UpdateF0(ark_mem, step_mem, ark_mem->tn, ark_mem->ycur, ARK_FULLRHS_START); if (retval) { @@ -1908,7 +1908,7 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } else if (ark_mem->fn != NULL && !ark_mem->fn_is_current) { - retval = mriStep_FullRHS(ark_mem, ark_mem->tn, ark_mem->yn, ark_mem->fn, + retval = mriStep_FullRHS(ark_mem, ark_mem->tn, ark_mem->ycur, ark_mem->fn, ARK_FULLRHS_START); if (retval) { From b0292eba7a7bff633255b9073901c70216a9107d Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 20 Mar 2026 23:08:13 -0400 Subject: [PATCH 196/298] Updated answers submodule commit --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index 87bfb96190..12bd97cb36 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 87bfb96190b21db911e3f20b8cfd208288a66b8a +Subproject commit 12bd97cb3669a4abbda77ab4bf36f3c24fd6d880 From 89ff94d7e41a719ded1098ef9d75630eb6ad21f8 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Sat, 21 Mar 2026 11:13:10 -0400 Subject: [PATCH 197/298] Updated stageinfo output files due to upstream changes --- .../arkode/CXX_serial/ark_test_stageinfo_lsrkstep_3.out | 6 +++--- .../arkode/CXX_serial/ark_test_stageinfo_lsrkstep_4.out | 6 +++--- .../arkode/CXX_serial/ark_test_stageinfo_lsrkstep_5.out | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_3.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_3.out index 95a545b21a..0466aec437 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_3.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_3.out @@ -13,7 +13,7 @@ Using SSP(9,3) method [Pre-RHS (stage 2 of 4) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] [Post-stage processing (stage 2 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] [Pre-RHS (stage 3 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] - [Post-stage processing (stage 3 of 4) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Postprocess-step at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] [Post-step at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), step = 0, ||y||_2 = 6.1035156250e-12] 6.1035156250e-12 6.1035156250e-12 8.0779356695e-28 [Pre-step at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), step = 1, attempt = 1, ||y||_2 = 6.1035156250e-12] @@ -24,7 +24,7 @@ Using SSP(9,3) method [Pre-RHS (stage 2 of 4) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] [Post-stage processing (stage 2 of 4) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] [Pre-RHS (stage 3 of 4) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] - [Post-stage processing (stage 3 of 4) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Postprocess-step at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] [Post-step at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), step = 1, ||y||_2 = 6.1041259766e-08] 6.1041259766e-08 6.1041259766e-08 0.0000000000e+00 [Pre-step at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), step = 2, attempt = 1, ||y||_2 = 6.1041259766e-08] @@ -35,7 +35,7 @@ Using SSP(9,3) method [Pre-RHS (stage 2 of 4) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] [Post-stage processing (stage 2 of 4) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] [Pre-RHS (stage 3 of 4) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] - [Post-stage processing (stage 3 of 4) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Postprocess-step at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06),||y||_2 = 1.2817443848e-06] [Post-step at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), step = 2, ||y||_2 = 1.2817443848e-06] 1.2817443848e-06 1.2817443848e-06 2.1175823681e-22 --------------------------------------------------------------------- diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_4.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_4.out index 128df59791..fa8c611d02 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_4.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_4.out @@ -13,7 +13,7 @@ Using SSP(4,3) method [Pre-RHS (stage 2 of 4) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] [Post-stage processing (stage 2 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] [Pre-RHS (stage 3 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] - [Post-stage processing (stage 3 of 4) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Postprocess-step at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] [Post-step at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), step = 0, ||y||_2 = 6.1035156250e-12] 6.1035156250e-12 6.1035156250e-12 8.0779356695e-28 [Pre-step at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), step = 1, attempt = 1, ||y||_2 = 6.1035156250e-12] @@ -24,7 +24,7 @@ Using SSP(4,3) method [Pre-RHS (stage 2 of 4) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] [Post-stage processing (stage 2 of 4) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] [Pre-RHS (stage 3 of 4) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] - [Post-stage processing (stage 3 of 4) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Postprocess-step at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] [Post-step at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), step = 1, ||y||_2 = 6.1041259766e-08] 6.1041259766e-08 6.1041259766e-08 0.0000000000e+00 [Pre-step at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), step = 2, attempt = 1, ||y||_2 = 6.1041259766e-08] @@ -35,7 +35,7 @@ Using SSP(4,3) method [Pre-RHS (stage 2 of 4) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] [Post-stage processing (stage 2 of 4) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] [Pre-RHS (stage 3 of 4) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] - [Post-stage processing (stage 3 of 4) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Postprocess-step at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06),||y||_2 = 1.2817443848e-06] [Post-step at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), step = 2, ||y||_2 = 1.2817443848e-06] 1.2817443848e-06 1.2817443848e-06 2.1175823681e-22 --------------------------------------------------------------------- diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_5.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_5.out index 9436550f58..f87131ca2e 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_5.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_5.out @@ -25,7 +25,7 @@ Using SSP(10,4) method [Pre-RHS (stage 8 of 10) at t = 5.09e-12 (tn = 0.00e+00 , tcur = 5.09e-12), ||y||_2 = 5.0862630208e-12] [Post-stage processing (stage 8 of 10) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] [Pre-RHS (stage 9 of 10) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] - [Post-stage processing (stage 9 of 10) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Postprocess-step at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] [Post-step at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), step = 0, ||y||_2 = 6.1035156250e-12] 6.1035156250e-12 6.1035156250e-12 8.0779356695e-28 [Pre-step at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), step = 1, attempt = 1, ||y||_2 = 6.1035156250e-12] @@ -48,7 +48,7 @@ Using SSP(10,4) method [Pre-RHS (stage 8 of 10) at t = 5.09e-08 (tn = 6.10e-12 , tcur = 5.09e-08), ||y||_2 = 5.0868733724e-08] [Post-stage processing (stage 8 of 10) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] [Pre-RHS (stage 9 of 10) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] - [Post-stage processing (stage 9 of 10) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Postprocess-step at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] [Post-step at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), step = 1, ||y||_2 = 6.1041259766e-08] 6.1041259766e-08 6.1041259766e-08 0.0000000000e+00 [Pre-step at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), step = 2, attempt = 1, ||y||_2 = 6.1041259766e-08] @@ -71,7 +71,7 @@ Using SSP(10,4) method [Pre-RHS (stage 8 of 10) at t = 1.08e-06 (tn = 6.10e-08 , tcur = 1.08e-06), ||y||_2 = 1.0782938639e-06] [Post-stage processing (stage 8 of 10) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] [Pre-RHS (stage 9 of 10) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] - [Post-stage processing (stage 9 of 10) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Postprocess-step at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06),||y||_2 = 1.2817443848e-06] [Post-step at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), step = 2, ||y||_2 = 1.2817443848e-06] 1.2817443848e-06 1.2817443848e-06 8.4703294725e-22 --------------------------------------------------------------------- From 3899df2bb1dda0ae58ff3801ed500a6c600c08f7 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Sat, 21 Mar 2026 11:21:32 -0400 Subject: [PATCH 198/298] Updated MRISR and MERK methods to leverage ensure_ycur flag --- src/arkode/arkode_mristep.c | 44 +++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 127e37227e..365821a9fd 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -989,12 +989,8 @@ int mriStep_Init(ARKodeMem ark_mem, sunrealtype tout, int init_type) return (ARK_ILL_INPUT); } - /* MRIGARK methods expect arkode to ensure that ycur==yn upon - entry to TakeStep function */ - if (ark_mem->step == mriStep_TakeStepMRIGARK) - { - ark_mem->ensure_ycur = SUNTRUE; - } + /* Request arkode ensure that ycur==yn upon entry to TakeStep function */ + ark_mem->ensure_ycur = SUNTRUE; /* Retrieve/store method and embedding orders now that tables are finalized */ step_mem->stages = step_mem->MRIC->stages; @@ -2314,9 +2310,9 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt This routine performs a single MRISR step. - The vector ark_mem->yn holds the previous time-step solution - on input, and the vector ark_mem->ycur should hold the result - of this step on output. + Both the vectors ark_mem->yn and ark_mem->ycur hold the previous + time-step solution on input, and the vector ark_mem->ycur should + hold the result of this step on output. If timestep adaptivity is enabled, this routine also computes the error estimate y-ytilde, where ytilde is the @@ -2406,7 +2402,7 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) if (!ark_mem->fixedstep) { retval = mriStepInnerStepper_Reset(step_mem->stepper, ark_mem->tn, - ark_mem->yn); + ark_mem->ycur); if (retval != ARK_SUCCESS) { arkProcessError(ark_mem, ARK_INNERSTEP_FAIL, __LINE__, __func__, __FILE__, @@ -2430,7 +2426,7 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = 0, stage type = %d, tcur = " SUN_FORMAT_G, MRISTAGE_FIRST, ark_mem->tcur); - SUNLogExtraDebugVec(ARK_LOGGER, "slow stage", ark_mem->yn, "z_0(:) ="); + SUNLogExtraDebugVec(ARK_LOGGER, "slow stage", ark_mem->ycur, "z_0(:) ="); /* Evaluate the slow RHS functions if needed. NOTE: we decide between calling the full RHS function (if ark_mem->fn is non-NULL and MRIStep is not an inner @@ -2441,7 +2437,7 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) nested_mri = step_mem->expforcing || step_mem->impforcing; if (ark_mem->fn == NULL || nested_mri) { - retval = mriStep_UpdateF0(ark_mem, step_mem, ark_mem->tn, ark_mem->yn, + retval = mriStep_UpdateF0(ark_mem, step_mem, ark_mem->tn, ark_mem->ycur, ARK_FULLRHS_START); if (retval) { @@ -2464,7 +2460,7 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } if (ark_mem->fn != NULL && !ark_mem->fn_is_current) { - retval = mriStep_FullRHS(ark_mem, ark_mem->tn, ark_mem->yn, ark_mem->fn, + retval = mriStep_FullRHS(ark_mem, ark_mem->tn, ark_mem->ycur, ark_mem->fn, ARK_FULLRHS_START); if (retval) { @@ -2504,8 +2500,8 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) solution = (stage == step_mem->stages - 1); embedding = (stage == step_mem->stages); - /* Set initial condition for this stage */ - N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + /* Set initial condition for this stage (all but first stage) */ + if (stage > 1) N_VScale(ONE, ark_mem->yn, ark_mem->ycur); /* Set current stage abscissa */ cstage = (embedding) ? ONE : step_mem->MRIC->c[stage]; @@ -2826,9 +2822,9 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) This routine performs a single MERK step. - The vector ark_mem->yn holds the previous time-step solution - on input, and the vector ark_mem->ycur should hold the result - of this step on output. + Both the vectors ark_mem->yn and ark_mem->ycur hold the previous + time-step solution on input, and the vector ark_mem->ycur should + hold the result of this step on output. If timestep adaptivity is enabled, this routine also computes the error estimate y-ytilde, where ytilde is the @@ -2921,7 +2917,7 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* for adaptive computations, reset the inner integrator to the beginning of this step */ if (!ark_mem->fixedstep) { - retval = mriStepInnerStepper_Reset(step_mem->stepper, t0, ark_mem->yn); + retval = mriStepInnerStepper_Reset(step_mem->stepper, t0, ark_mem->ycur); if (retval != ARK_SUCCESS) { arkProcessError(ark_mem, ARK_INNERSTEP_FAIL, __LINE__, __func__, __FILE__, @@ -2933,7 +2929,7 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = 0, stage type = %d, tcur = " SUN_FORMAT_G, MRISTAGE_FIRST, ark_mem->tcur); - SUNLogExtraDebugVec(ARK_LOGGER, "slow stage", ark_mem->yn, "z_0(:) ="); + SUNLogExtraDebugVec(ARK_LOGGER, "slow stage", ark_mem->ycur, "z_0(:) ="); /* Evaluate the slow RHS function if needed. NOTE: we decide between calling the full RHS function (if ark_mem->fn is non-NULL and MRIStep is not an inner @@ -2943,7 +2939,7 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) nested_mri = step_mem->expforcing || step_mem->impforcing; if (ark_mem->fn == NULL || nested_mri) { - retval = mriStep_UpdateF0(ark_mem, step_mem, ark_mem->tn, ark_mem->yn, + retval = mriStep_UpdateF0(ark_mem, step_mem, ark_mem->tn, ark_mem->ycur, ARK_FULLRHS_START); if (retval) { @@ -2954,7 +2950,7 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } else if (ark_mem->fn != NULL && !ark_mem->fn_is_current) { - retval = mriStep_FullRHS(ark_mem, ark_mem->tn, ark_mem->yn, ark_mem->fn, + retval = mriStep_FullRHS(ark_mem, ark_mem->tn, ark_mem->ycur, ark_mem->fn, ARK_FULLRHS_START); if (retval) { @@ -3001,8 +2997,8 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) return (retval); } - /* Set initial condition for this stage group */ - N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + /* Set initial condition for this stage group (all but first group) */ + if (ig > 0) N_VScale(ONE, ark_mem->yn, ark_mem->ycur); t0 = ark_mem->tn; /* Evolve fast IVP over each subinterval in stage group */ From 598f55aac12d6214f41dbc1bfb4c3b8ff4346b16 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Sat, 21 Mar 2026 11:22:05 -0400 Subject: [PATCH 199/298] Formatting --- src/arkode/arkode_mristep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 365821a9fd..8609fc16df 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -2501,7 +2501,7 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) embedding = (stage == step_mem->stages); /* Set initial condition for this stage (all but first stage) */ - if (stage > 1) N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + if (stage > 1) N_VScale(ONE, ark_mem->yn, ark_mem->ycur); /* Set current stage abscissa */ cstage = (embedding) ? ONE : step_mem->MRIC->c[stage]; @@ -2998,7 +2998,7 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } /* Set initial condition for this stage group (all but first group) */ - if (ig > 0) N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + if (ig > 0) N_VScale(ONE, ark_mem->yn, ark_mem->ycur); t0 = ark_mem->tn; /* Evolve fast IVP over each subinterval in stage group */ From 28b938e13709601d7c4c46e8f964e84a5b8f04c2 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Sat, 21 Mar 2026 20:42:57 -0400 Subject: [PATCH 200/298] Fixed merge error --- src/arkode/arkode_mristep.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index fa0d573460..75501e7843 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1923,7 +1923,6 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* The first stage is the previous time-step solution, so its RHS is the [already-computed] slow RHS from the start of the step */ - N_VScale(ONE, ark_mem->yn, ark_mem->ycur); /* Loop over remaining internal stages */ for (is = 1; is < step_mem->stages - 1; is++) From e1141fe4be75bd7d760042fa8a7d4e696b56baf7 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Sat, 21 Mar 2026 21:08:13 -0400 Subject: [PATCH 201/298] Manually added Python interface callbacks for new user-supplied functions --- bindings/sundials4py/arkode/arkode.cpp | 12 +++++++++ .../arkode/arkode_usersupplied.hpp | 27 +++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/bindings/sundials4py/arkode/arkode.cpp b/bindings/sundials4py/arkode/arkode.cpp index ba800a351e..9e32755a9a 100644 --- a/bindings/sundials4py/arkode/arkode.cpp +++ b/bindings/sundials4py/arkode/arkode.cpp @@ -137,6 +137,18 @@ void bind_arkode(nb::module_& m) arkode_relaxjacfn_wrapper, nb::arg("arkode_mem"), nb::arg("rfn").none(), nb::arg("rjacfn").none()); + BIND_ARKODE_CALLBACK(ARKodeSetPreStepFn, ARKPreStepFn, + prestepfn, arkode_prestepfn_wrapper, + nb::arg("arkode_mem"), nb::arg("prestep").none()); + + BIND_ARKODE_CALLBACK(ARKodeSetPostStepFn, ARKPostStepFn, + poststepfn, arkode_poststepfn_wrapper, + nb::arg("arkode_mem"), nb::arg("poststep").none()); + + BIND_ARKODE_CALLBACK(ARKodeSetPreRhsFn, ARKPreRhsFn, + prerhsfn, arkode_prerhsfn_wrapper, + nb::arg("arkode_mem"), nb::arg("prerhs").none()); + BIND_ARKODE_CALLBACK(ARKodeSetPostprocessStepFn, ARKPostProcessFn, postprocessstepfn, arkode_postprocessstepfn_wrapper, nb::arg("arkode_mem"), nb::arg("postprocessstep").none()); diff --git a/bindings/sundials4py/arkode/arkode_usersupplied.hpp b/bindings/sundials4py/arkode/arkode_usersupplied.hpp index 320fbda7b6..3ff648aa3d 100644 --- a/bindings/sundials4py/arkode/arkode_usersupplied.hpp +++ b/bindings/sundials4py/arkode/arkode_usersupplied.hpp @@ -45,6 +45,9 @@ struct arkode_user_supplied_fn_table nb::object ewtn; nb::object rwtn; nb::object vecresizefn; + nb::object prerhsfn; + nb::object prestepfn; + nb::object poststepfn; nb::object postprocessstepfn; nb::object postprocessstagefn; nb::object stagepredictfn; @@ -159,6 +162,30 @@ inline int arkode_vecresizefn_wrapper(Args... args) ARKodeMem, 1>(&arkode_user_supplied_fn_table::vecresizefn, args...); } +template +inline int arkode_prerhsfn_wrapper(Args... args) +{ + return sundials4py::user_supplied_fn_caller< + std::remove_pointer_t, arkode_user_supplied_fn_table, + ARKodeMem, 1>(&arkode_user_supplied_fn_table::prerhsfn, args...); +} + +template +inline int arkode_prestepfn_wrapper(Args... args) +{ + return sundials4py::user_supplied_fn_caller< + std::remove_pointer_t, arkode_user_supplied_fn_table, + ARKodeMem, 1>(&arkode_user_supplied_fn_table::prestepfn, args...); +} + +template +inline int arkode_poststepfn_wrapper(Args... args) +{ + return sundials4py::user_supplied_fn_caller< + std::remove_pointer_t, arkode_user_supplied_fn_table, + ARKodeMem, 1>(&arkode_user_supplied_fn_table::poststepfn, args...); +} + template inline int arkode_postprocessstepfn_wrapper(Args... args) { From 833b32f19b636937a91ace1e34ab0ce407a7899d Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Sun, 22 Mar 2026 14:19:39 -0400 Subject: [PATCH 202/298] Formatting --- bindings/sundials4py/arkode/arkode.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/bindings/sundials4py/arkode/arkode.cpp b/bindings/sundials4py/arkode/arkode.cpp index 9e32755a9a..dc3659f032 100644 --- a/bindings/sundials4py/arkode/arkode.cpp +++ b/bindings/sundials4py/arkode/arkode.cpp @@ -137,17 +137,17 @@ void bind_arkode(nb::module_& m) arkode_relaxjacfn_wrapper, nb::arg("arkode_mem"), nb::arg("rfn").none(), nb::arg("rjacfn").none()); - BIND_ARKODE_CALLBACK(ARKodeSetPreStepFn, ARKPreStepFn, - prestepfn, arkode_prestepfn_wrapper, - nb::arg("arkode_mem"), nb::arg("prestep").none()); + BIND_ARKODE_CALLBACK(ARKodeSetPreStepFn, ARKPreStepFn, prestepfn, + arkode_prestepfn_wrapper, nb::arg("arkode_mem"), + nb::arg("prestep").none()); - BIND_ARKODE_CALLBACK(ARKodeSetPostStepFn, ARKPostStepFn, - poststepfn, arkode_poststepfn_wrapper, - nb::arg("arkode_mem"), nb::arg("poststep").none()); + BIND_ARKODE_CALLBACK(ARKodeSetPostStepFn, ARKPostStepFn, poststepfn, + arkode_poststepfn_wrapper, nb::arg("arkode_mem"), + nb::arg("poststep").none()); - BIND_ARKODE_CALLBACK(ARKodeSetPreRhsFn, ARKPreRhsFn, - prerhsfn, arkode_prerhsfn_wrapper, - nb::arg("arkode_mem"), nb::arg("prerhs").none()); + BIND_ARKODE_CALLBACK(ARKodeSetPreRhsFn, ARKPreRhsFn, prerhsfn, + arkode_prerhsfn_wrapper, nb::arg("arkode_mem"), + nb::arg("prerhs").none()); BIND_ARKODE_CALLBACK(ARKodeSetPostprocessStepFn, ARKPostProcessFn, postprocessstepfn, arkode_postprocessstepfn_wrapper, From 6688af651221d5e765ab2475414a919aa5fef8cd Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 22 Mar 2026 14:54:43 -0700 Subject: [PATCH 203/298] fix ERK call order docs, note FASL case behavior --- .../guide/source/Usage/User_callable.rst | 95 +++++++++++-------- 1 file changed, 55 insertions(+), 40 deletions(-) diff --git a/doc/arkode/guide/source/Usage/User_callable.rst b/doc/arkode/guide/source/Usage/User_callable.rst index c3eb695cd6..7c25bba302 100644 --- a/doc/arkode/guide/source/Usage/User_callable.rst +++ b/doc/arkode/guide/source/Usage/User_callable.rst @@ -3513,7 +3513,7 @@ Pre-step, Post-step, Pre-RHS, and Post-processing optional inputs (ADVANCED) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ARKODE provides multiple options for user-supplied callback routines that can be -called at various times within the time-stepping process. Each of these +called at various times within the time-stepping process. Each of these callback functions has a similar structure, wherein the callback function will be provided with the current time, current solution, and the *user_data* structure that was provided to :c:func:`ARKodeSetUserData`; some functions are @@ -3546,79 +3546,93 @@ would proceed as: 0. Initialize ``attempt`` counter to 0 -1. Call ``PreStep`` with :math:`(t_{cur},y_{cur})` +1. Call ``PreStep`` with :math:`(t_{n},y_{n})` 2. Stage 0 - a. Call ``PreRHS`` with :math:`(t_{cur},y_{cur})` + a. If this is not the first step and the method is FSAL (First Same As Last + -- the last stage of the prior step is the current solution and the first + stage is explicit) or the ``RHS`` has already been computed at + :math:`(t_{n},y_{n})`, proceed to stage 1. - b. Evaluate ``RHS`` at :math:`(t_{cur},y_{cur})` + a. Call ``PreRHS`` with :math:`(t_{n},y_{n})` - c. Update :math:`(t_{cur},y_{cur})` with the next stage solution - - d. Call ``PostprocessStage`` with :math:`(t_{cur},y_{cur})` + b. Evaluate ``RHS`` at :math:`(t_{n},y_{n})` 3. Stage 1 - a. Call ``PreRHS`` with :math:`(t_{cur},y_{cur})` + a. Compute the stage solution :math:`(t_{cur},y_{cur})` - b. Evaluate ``RHS`` at :math:`(t_{cur},y_{cur})` + b. Call ``PostprocessStage`` with :math:`(t_{cur},y_{cur})` - c. Update :math:`(t_{cur},y_{cur})` with the next stage solution + c. Call ``PreRHS`` with :math:`(t_{cur},y_{cur})` - d. Call ``PostprocessStage`` with :math:`(t_{cur},y_{cur})` + d. Evaluate ``RHS`` at :math:`(t_{cur},y_{cur})` 4. Stage 2 - a. Call ``PreRHS`` with :math:`(t_{cur},y_{cur})` + a. Compute the stage solution :math:`(t_{cur},y_{cur})` - b. Evaluate ``RHS`` at :math:`(t_{cur},y_{cur})` + b. If the method is FSAL call ``PostprocessStep`` with + :math:`(t_{cur},y_{cur})`, else call ``PostprocessStage`` with + :math:`(t_{cur},y_{cur})` - c. Update :math:`(t_{cur},y_{cur})` with the new time step solution + c. Call ``PreRHS`` with :math:`(t_{cur},y_{cur})` - d. If the method is FSAL (the last stage is the time step solution), - call ``PostprocessStep`` with :math:`(t_{cur},y_{cur})`, else call - ``PostprocessStage`` with :math:`(t_{cur},y_{cur})`. + d. Evaluate ``RHS`` at :math:`(t_{cur},y_{cur})` -5. If the method is not FSAL, update :math:`(t_{cur},y_{cur})` with the - new time step solution and call ``PostprocessStep``. +5. If the method is not FSAL, compute the new time step solution + :math:`(t_{cur},y_{cur})` and call ``PostprocessStep`` with + :math:`(t_{cur},y_{cur})` -6. Check the local error. +6. Check the local error a. If the step is successful then call ``PostStep`` with :math:`(t_{cur},y_{cur})`, determine the next internal step size :math:`h_n`, and update :math:`(t_n,y_n) \gets (t_{cur},y_{cur})` - b. Else rewind :math:`(t_{cur},y_{cur}) \gets (t_n,y_n)`, increment + b. Else rewind :math:`(t_{cur},y_{cur}) \gets (t_n,y_n)`, increment the ``attempt`` counter, determine the next internal step size :math:`h_n`, and return to step 1 Alternately, the flow of a 3-stage method that must perform a solve of some sort for each stage (i.e., a DIRK or ARK method in ARKStep, or a multirate method -with MRIstep) would proceed as follows. Here, we show the implicit-explicit +with MRIstep) would proceed as follows. Here, we show the implicit-explicit approach since that also shows the relationship between both the implicit right-hand side function ``RHS_i`` and the explicit right-hand side function ``RHS_e``: 0. Initialize ``attempt`` counter to 0 -1. Call ``PreStep`` with :math:`(t_{cur},y_{cur})` +1. Call ``PreStep`` with :math:`(t_{n},y_{n})` 2. Stage 0 - a. Solve implicit system, calling ``PreRHS`` and then ``RHS_i`` with - :math:`(t_{cur},y_{cur})` at each solver iteration; at the end of this - iteration :math:`(t_{cur},y_{cur})` holds the updated stage solution + a. If the first stage is explicit: - b. Call ``PostprocessStage`` with :math:`(t_{cur},y_{cur})` + i. If this is not the first step and the method is FSAL or ``RHS_i`` and + ``RHS_e`` have already been computed at :math:`(t_{n},y_{n})`, proceed + to stage 1. - c. Call ``PreRHS`` with :math:`(t_{cur},y_{cur})` + ii. Call ``PreRHS`` with :math:`(t_{n},y_{n})` - d. Evaluate ``RHS_i`` and then ``RHS_e`` at :math:`(t_{cur},y_{cur})` + iii. Evaluate ``RHS_i`` and ``RHS_e`` at :math:`(t_{n},y_{n})` + + b. Else the first stage is implicit: + + i. Solve the implicit system, calling ``PreRHS`` and then ``RHS_i`` with + :math:`(t_{cur},y_{cur})` at each solver iteration; at the end of this + iteration :math:`(t_{cur},y_{cur})` holds the updated stage solution + + ii. Call ``PostprocessStage`` with :math:`(t_{cur},y_{cur})` + + iii. Call ``PreRHS`` with :math:`(t_{cur},y_{cur})` + + iv. Evaluate ``RHS_i`` and then ``RHS_e`` at :math:`(t_{cur},y_{cur})` 3. Stage 1 - a. Solve implicit system, calling ``PreRHS`` and then ``RHS_i`` with + a. Solve the implicit system, calling ``PreRHS`` and then ``RHS_i`` with :math:`(t_{cur},y_{cur})` at each solver iteration; at the end of this iteration :math:`(t_{cur},y_{cur})` holds the updated stage solution @@ -3642,8 +3656,9 @@ right-hand side function ``RHS_i`` and the explicit right-hand side function d. Evaluate ``RHS_i`` and then ``RHS_e`` at :math:`(t_{cur},y_{cur})` -5. If the method is not stiffly accurate, update :math:`(t_{cur},y_{cur})` with - the new time step solution and call ``PostprocessStep``. +5. If the method is not stiffly accurate, compute the new time step solution + :math:`(t_{cur},y_{cur})` and call ``PostprocessStep`` with + :math:`(t_{cur},y_{cur})` 6. Check the local error. @@ -3655,14 +3670,14 @@ right-hand side function ``RHS_i`` and the explicit right-hand side function ``attempt`` counter, determine the next internal step size :math:`h_n`, and return to step 1 -We consider these as "advanced" because of their danger, although the callback -functions are provided with the internally-evolving state, users should **not** -adjust entries of this state vector, since doing so will destroy all theoretical -guarantees of solution accuracy and numerical stability. The only "supported" -approach for user modifications to the state vector is if this occurs between -calls to :c:func:`ARKodeEvolve`, and if the user calls :c:func:`ARKodeReset` -after every modification to the state vector so that ARKODE can reset its saved -solution. +We consider these functions as "advanced" because of their danger, although the +callback functions are provided with the internally-evolving state, users should +**not** adjust entries of this state vector, since doing so will destroy all +theoretical guarantees of solution accuracy and numerical stability. The only +"supported" approach for user modifications to the state vector is if this +occurs between calls to :c:func:`ARKodeEvolve`, and if the user calls +:c:func:`ARKodeReset` after every modification to the state vector so that +ARKODE can reset its saved solution. .. cssclass:: table-bordered From 16d6bf9ba73e3f339cb48a1c66d611f1d88631a5 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 22 Mar 2026 15:02:16 -0700 Subject: [PATCH 204/298] add note to versionadded for postprocess step function --- doc/arkode/guide/source/Usage/User_callable.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc/arkode/guide/source/Usage/User_callable.rst b/doc/arkode/guide/source/Usage/User_callable.rst index 7c25bba302..7db3a6f79a 100644 --- a/doc/arkode/guide/source/Usage/User_callable.rst +++ b/doc/arkode/guide/source/Usage/User_callable.rst @@ -3739,6 +3739,10 @@ Set time step postprocessing function :c:func:`ARKodeSetPostprocess .. versionadded:: x.y.z + This function replaces the undocumented + :c:func:`ARKodeSetPostprocessStepFn` used in earlier versions for + attaching a function to be called after each successful step. + .. c:function:: int ARKodeSetPreRhsFn(void* arkode_mem, ARKPreRhsFn prerhs_fn) @@ -3786,6 +3790,11 @@ Set time step postprocessing function :c:func:`ARKodeSetPostprocess .. versionadded:: x.y.z + This function existed in earlier versions as an undocumented feature and + the attached function was called after each successful step. Starting with + version x.y.z, use :c:func:`ARKodeSetPostStepFn` to attach a function to + be called after each successful step. + .. warning:: This function is currently incompatible with discrete adjoint capabilities @@ -3812,6 +3821,8 @@ Set time step postprocessing function :c:func:`ARKodeSetPostprocess .. versionadded:: x.y.z + This function existed in earlier versions as an undocumented feature. + .. warning:: This function is currently incompatible with discrete adjoint capabilities From 8d74eea5776b15ce4a9fa113cded7f93510f5ee3 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 22 Mar 2026 15:05:54 -0700 Subject: [PATCH 205/298] shorten link text --- doc/arkode/guide/source/Usage/User_supplied.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/arkode/guide/source/Usage/User_supplied.rst b/doc/arkode/guide/source/Usage/User_supplied.rst index 4d76e81d51..7e48c1c26f 100644 --- a/doc/arkode/guide/source/Usage/User_supplied.rst +++ b/doc/arkode/guide/source/Usage/User_supplied.rst @@ -85,8 +85,8 @@ The user-supplied functions for ARKODE consist of: evaluations `, and * functions that can optionally be called :ref:`after each step or stage - computation within supported ARKODE time stepping modules - `. + computation ` within supported ARKODE + time stepping modules. .. _ARKODE.Usage.ODERHS: From a9ab85b6393bc04b999606c416cf5e45b4456115 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 22 Mar 2026 15:09:19 -0700 Subject: [PATCH 206/298] note step index starts at 0 --- doc/arkode/guide/source/Usage/User_supplied.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/arkode/guide/source/Usage/User_supplied.rst b/doc/arkode/guide/source/Usage/User_supplied.rst index 7e48c1c26f..11f6d30363 100644 --- a/doc/arkode/guide/source/Usage/User_supplied.rst +++ b/doc/arkode/guide/source/Usage/User_supplied.rst @@ -1146,7 +1146,7 @@ step attempt by ARKODE (see :c:func:`ARKodeSetPreStepFn`). * **t** -- the current value of the independent variable. * **y** -- the current value of the dependent variable vector that will be used as the initial condition for the upcoming step. - * **step** -- the step index (starting from the first internal step since + * **step** -- the step index (starting at 0 for the first internal step since ARKODE was (re-)initialized). * **attempt** -- a counter indicating which attempt at the step is about to occur -- 0 indicates that the previous step succeeded and this is the first @@ -1181,7 +1181,7 @@ A user-provided :c:type:`ARKPostStepFn` will be called following each * **t** -- the current value of the independent variable. * **y** -- the current value of the dependent variable vector that resulted from the successful time step. - * **step** -- the step index (starting from the first internal step since + * **step** -- the step index (starting at 0 for the first internal step since ARKODE was (re-)initialized). * **user_data** -- the ``user_data`` pointer that was passed to :c:func:`ARKodeSetUserData`. From 3177a6eedd2f74ba90c9f90f762064ca011d0088 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 22 Mar 2026 15:18:50 -0700 Subject: [PATCH 207/298] use double ticks --- doc/arkode/guide/source/Usage/User_supplied.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/arkode/guide/source/Usage/User_supplied.rst b/doc/arkode/guide/source/Usage/User_supplied.rst index 11f6d30363..9c1d80bce3 100644 --- a/doc/arkode/guide/source/Usage/User_supplied.rst +++ b/doc/arkode/guide/source/Usage/User_supplied.rst @@ -1123,8 +1123,8 @@ functions are called, and after each internal step/stage computation. These user-supplied functions vary slightly in type, depending on their use case, as outlined below. Such functions are typically used for applications that compute auxiliary diagnostic data between time steps or stages, and store that data in -their `user_data` pointer or output to screen or disk. Alternately, some may be -used to better prepare auxiliary data for an upcoming time step or +their ``user_data`` pointer or output to screen or disk. Alternately, some may +be used to better prepare auxiliary data for an upcoming time step or :c:type:`ARKRhsFn` evaluation. **These should not be used to modify the active state data; if so then all theoretical guarantees of solution accuracy and stability will be lost.** @@ -1150,9 +1150,9 @@ step attempt by ARKODE (see :c:func:`ARKodeSetPreStepFn`). ARKODE was (re-)initialized). * **attempt** -- a counter indicating which attempt at the step is about to occur -- 0 indicates that the previous step succeeded and this is the first - attempt the step `step`, while a number greater than 0 indicates that the + attempt the step ``step``, while a number greater than 0 indicates that the previous step attempt failed and this is a subsequent try at computing the - step `step`. + step ``step``. * **user_data** -- the ``user_data`` pointer that was passed to :c:func:`ARKodeSetUserData`. From b47a0a4e7b1fa61597681b2e106a60ba600c2e65 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 22 Mar 2026 15:22:38 -0700 Subject: [PATCH 208/298] fix typo --- doc/shared/RecentChanges.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index 2329c068e9..8af3b51063 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -34,7 +34,7 @@ Fixed a bug where passing an empty string to ``SUNLogger_Set{Error,Warning,Info, did not disable the corresponding logging stream `Issue #844 `__. Fixed a bug in logging output from ARKODE, where for some time stepping modules, -the the current "time" output in the logger was incorrect. +the current "time" output in the logger was incorrect. **Deprecation Notices** From ebc8e9a39dccd9e350010c9c9711963fdc6e8287 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 22 Mar 2026 15:27:13 -0700 Subject: [PATCH 209/298] fix typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c27256f13..522180ad84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,7 +35,7 @@ did not disable the corresponding logging stream ([Issue #844](https://github.com/llnl/sundials/issues/844)). Fixed a bug in logging output from ARKODE, where for some time stepping modules, -the the current "time" output in the logger was incorrect. +the current "time" output in the logger was incorrect. ### Deprecation Notices From 59549dc4400cf98ac94d3c068bab9ff750c7dcf0 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 22 Mar 2026 15:32:34 -0700 Subject: [PATCH 210/298] use tn when using yn --- src/arkode/arkode_arkstep.c | 4 ++-- src/arkode/arkode_erkstep.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index abf0196ffd..a95bc289bd 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1762,7 +1762,7 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNErrCode errcode = SUNAdjointCheckpointScheme_NeedsSaving(ark_mem->checkpoint_scheme, ark_mem->checkpoint_step_idx, 0, - ark_mem->tcur, &do_save); + ark_mem->tn, &do_save); if (errcode) { arkProcessError(ark_mem, ARK_ADJ_CHECKPOINT_FAIL, __LINE__, __func__, @@ -1777,7 +1777,7 @@ int arkStep_TakeStep_Z(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) errcode = SUNAdjointCheckpointScheme_InsertVector(ark_mem->checkpoint_scheme, ark_mem->checkpoint_step_idx, - 0, ark_mem->tcur, ark_mem->yn); + 0, ark_mem->tn, ark_mem->yn); if (errcode) { diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index bfbefb64d8..eaf993bb55 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -808,7 +808,7 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNErrCode errcode = SUNAdjointCheckpointScheme_NeedsSaving(ark_mem->checkpoint_scheme, ark_mem->checkpoint_step_idx, 0, - ark_mem->tcur, &do_save); + ark_mem->tn, &do_save); if (errcode) { arkProcessError(ark_mem, ARK_ADJ_CHECKPOINT_FAIL, __LINE__, __func__, @@ -823,7 +823,7 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) errcode = SUNAdjointCheckpointScheme_InsertVector(ark_mem->checkpoint_scheme, ark_mem->checkpoint_step_idx, 0, - ark_mem->tcur, ark_mem->yn); + ark_mem->tn, ark_mem->yn); if (errcode) { From 827607e8ada7e1dbf5f4f482e61a034ca802f588 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 22 Mar 2026 15:46:06 -0700 Subject: [PATCH 211/298] note adjoint checkpoint fix --- CHANGELOG.md | 4 ++++ doc/shared/RecentChanges.rst | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 522180ad84..164ce5dbc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,10 @@ did not disable the corresponding logging stream ([Issue Fixed a bug in logging output from ARKODE, where for some time stepping modules, the current "time" output in the logger was incorrect. +Fixed a bug in the ARKODE discrete adjoint checkpointing where an incorrect +state would be stored on the first step if the output vector passed to +`ARKodeEvolve` did not contain the initial condition on the first call. + ### Deprecation Notices Several CMake options have been deprecated in favor of namespaced versions diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index 8af3b51063..02b7e37ab9 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -36,6 +36,10 @@ did not disable the corresponding logging stream `Issue #844 Date: Sun, 22 Mar 2026 18:50:50 -0700 Subject: [PATCH 212/298] note additional bugs fixed in this PR --- CHANGELOG.md | 8 ++++++++ doc/shared/RecentChanges.rst | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 164ce5dbc4..9b429f03e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,14 @@ Fixed a bug in the ARKODE discrete adjoint checkpointing where an incorrect state would be stored on the first step if the output vector passed to `ARKodeEvolve` did not contain the initial condition on the first call. +Fixed a bug in MRIStep when using a custom inner integrator that relies on the +input state being the initial condition for the fast integration rather than +retaining the result from the last inner integration or most recent reset call +and the output vector passed to `ARKodeEvolve` does not contain the initial +condition on the first call or the last returned solution on subsequent calls. + +Removed an extraneous copy of the output vector in each step with SplittingStep. + ### Deprecation Notices Several CMake options have been deprecated in favor of namespaced versions diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index 02b7e37ab9..d668764628 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -40,6 +40,15 @@ Fixed a bug in the ARKODE discrete adjoint checkpointing where an incorrect state would be stored on the first step if the output vector passed to :c:func:`ARKodeEvolve` did not contain the initial condition on the first call. +Fixed a bug in MRIStep when using a custom inner integrator that relies on the +input state being the initial condition for the fast integration rather than +retaining the result from the last inner integration or most recent reset call +and the output vector passed to :c:func:`ARKodeEvolve` does not contain the +initial condition on the first call or the last returned solution on subsequent +calls. + +Removed an extraneous copy of the output vector in each step with SplittingStep. + **Deprecation Notices** Several CMake options have been deprecated in favor of namespaced versions From e03a3d5ae9c83adbfade958aa5a07f2c0d49c070 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 23 Mar 2026 08:38:55 -0400 Subject: [PATCH 213/298] Accepted suggestions from code review --- CHANGELOG.md | 5 ++++- doc/shared/RecentChanges.rst | 3 +++ src/arkode/arkode_mristep.c | 16 ++++++++-------- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 164ce5dbc4..b4cc810d80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,7 +47,10 @@ Several CMake options have been deprecated in favor of namespaced versions prefixed with `SUNDIALS_` to avoid naming collisions in applications that include SUNDIALS directly within their CMake builds. Additionally, a consistent naming convention (`SUNDIALS_ENABLE`) is now used for all boolean options. The -table below lists the old CMake option names and the new replacements. +Removed an extraneous copy of the output vector in each step with SplittingStep. + +Added a missing call to `SUNNonlinSolSetup` in MRIStep when using an +IMEX-MRI-SR method. | Old Option | New Option | |-----------------------------------------|------------------------------------------------| diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index 02b7e37ab9..e399a0444a 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -47,7 +47,10 @@ prefixed with ``SUNDIALS_`` to avoid naming collisions in applications that include SUNDIALS directly within their CMake builds. Additionally, a consistent naming convention (``SUNDIALS_ENABLE``) is now used for all boolean options. The table below lists the old CMake option names and the new replacements. +Removed an extraneous copy of the output vector in each step with SplittingStep. +Added a missing call to :c:func:`SUNNonlinSolSetup` in MRIStep when using an +IMEX-MRI-SR method. +-------------------------------------------+---------------------------------------------------------+ | Old Option | New Option | +-------------------------------------------+---------------------------------------------------------+ diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 8609fc16df..eda442b384 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1845,7 +1845,7 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* for adaptive computations, reset the inner integrator to the beginning of this step */ if (!ark_mem->fixedstep) { - retval = mriStepInnerStepper_Reset(step_mem->stepper, ark_mem->tn, + retval = mriStepInnerStepper_Reset(step_mem->stepper, ark_mem->tcur, ark_mem->ycur); if (retval != ARK_SUCCESS) { @@ -1881,7 +1881,7 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt nested_mri = step_mem->expforcing || step_mem->impforcing; if (ark_mem->fn == NULL || nested_mri) { - retval = mriStep_UpdateF0(ark_mem, step_mem, ark_mem->tn, ark_mem->ycur, + retval = mriStep_UpdateF0(ark_mem, step_mem, ark_mem->tcur, ark_mem->ycur, ARK_FULLRHS_START); if (retval) { @@ -1904,7 +1904,7 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } else if (ark_mem->fn != NULL && !ark_mem->fn_is_current) { - retval = mriStep_FullRHS(ark_mem, ark_mem->tn, ark_mem->ycur, ark_mem->fn, + retval = mriStep_FullRHS(ark_mem, ark_mem->tcur, ark_mem->ycur, ark_mem->fn, ARK_FULLRHS_START); if (retval) { @@ -2401,7 +2401,7 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* for adaptive computations, reset the inner integrator to the beginning of this step */ if (!ark_mem->fixedstep) { - retval = mriStepInnerStepper_Reset(step_mem->stepper, ark_mem->tn, + retval = mriStepInnerStepper_Reset(step_mem->stepper, ark_mem->tcur, ark_mem->ycur); if (retval != ARK_SUCCESS) { @@ -2437,7 +2437,7 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) nested_mri = step_mem->expforcing || step_mem->impforcing; if (ark_mem->fn == NULL || nested_mri) { - retval = mriStep_UpdateF0(ark_mem, step_mem, ark_mem->tn, ark_mem->ycur, + retval = mriStep_UpdateF0(ark_mem, step_mem, ark_mem->tcur, ark_mem->ycur, ARK_FULLRHS_START); if (retval) { @@ -2460,7 +2460,7 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } if (ark_mem->fn != NULL && !ark_mem->fn_is_current) { - retval = mriStep_FullRHS(ark_mem, ark_mem->tn, ark_mem->ycur, ark_mem->fn, + retval = mriStep_FullRHS(ark_mem, ark_mem->tcur, ark_mem->ycur, ark_mem->fn, ARK_FULLRHS_START); if (retval) { @@ -2939,7 +2939,7 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) nested_mri = step_mem->expforcing || step_mem->impforcing; if (ark_mem->fn == NULL || nested_mri) { - retval = mriStep_UpdateF0(ark_mem, step_mem, ark_mem->tn, ark_mem->ycur, + retval = mriStep_UpdateF0(ark_mem, step_mem, ark_mem->tcur, ark_mem->ycur, ARK_FULLRHS_START); if (retval) { @@ -2950,7 +2950,7 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } else if (ark_mem->fn != NULL && !ark_mem->fn_is_current) { - retval = mriStep_FullRHS(ark_mem, ark_mem->tn, ark_mem->ycur, ark_mem->fn, + retval = mriStep_FullRHS(ark_mem, ark_mem->tcur, ark_mem->ycur, ark_mem->fn, ARK_FULLRHS_START); if (retval) { From b8d75a54753afa1d5a2333f2a6d9933064ecb4af Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 23 Mar 2026 08:46:07 -0400 Subject: [PATCH 214/298] Accepted suggestions from code review --- src/arkode/arkode_lsrkstep.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index fbd45ed7d4..c856bc5062 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -637,7 +637,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* call the user-supplied pre-rhs function (if supplied) */ if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->yn, ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tn, ark_mem->yn, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -647,7 +647,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } /* call fe */ - retval = step_mem->fe(ark_mem->tcur, ark_mem->yn, ark_mem->fn, + retval = step_mem->fe(ark_mem->tn, ark_mem->yn, ark_mem->fn, ark_mem->user_data); step_mem->nfe++; if (retval != ARK_SUCCESS) @@ -988,7 +988,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->yn, ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tn, ark_mem->yn, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -996,7 +996,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) return ARK_PRERHSFN_FAIL; } } - retval = step_mem->fe(ark_mem->tcur, ark_mem->yn, ark_mem->fn, + retval = step_mem->fe(ark_mem->tn, ark_mem->yn, ark_mem->fn, ark_mem->user_data); step_mem->nfe++; if (retval != ARK_SUCCESS) @@ -1277,7 +1277,7 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->yn, ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tn, ark_mem->yn, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1286,7 +1286,7 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - retval = step_mem->fe(ark_mem->tcur, ark_mem->yn, ark_mem->fn, + retval = step_mem->fe(ark_mem->tn, ark_mem->yn, ark_mem->fn, ark_mem->user_data); step_mem->nfe++; if (retval != ARK_SUCCESS) @@ -1516,7 +1516,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->yn, ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tn, ark_mem->yn, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1525,7 +1525,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - retval = step_mem->fe(ark_mem->tcur, ark_mem->yn, ark_mem->fn, + retval = step_mem->fe(ark_mem->tn, ark_mem->yn, ark_mem->fn, ark_mem->user_data); step_mem->nfe++; if (retval != ARK_SUCCESS) @@ -1894,7 +1894,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->yn, ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tn, ark_mem->yn, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -1903,7 +1903,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - retval = step_mem->fe(ark_mem->tcur, ark_mem->yn, ark_mem->fn, + retval = step_mem->fe(ark_mem->tn, ark_mem->yn, ark_mem->fn, ark_mem->user_data); step_mem->nfe++; if (retval != ARK_SUCCESS) @@ -2172,7 +2172,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) { - retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->yn, ark_mem->user_data); + retval = ark_mem->PreRhsFn(ark_mem->tn, ark_mem->yn, ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -2181,7 +2181,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } } - retval = step_mem->fe(ark_mem->tcur, ark_mem->yn, ark_mem->fn, + retval = step_mem->fe(ark_mem->tn, ark_mem->yn, ark_mem->fn, ark_mem->user_data); step_mem->nfe++; if (retval != ARK_SUCCESS) @@ -2790,7 +2790,7 @@ int lsrkStep_DQJtimes(void* arkode_mem, N_Vector v, N_Vector Jv) &step_mem); if (retval != ARK_SUCCESS) { return retval; } - sunrealtype t = ark_mem->tcur; + sunrealtype t = ark_mem->tn; N_Vector y = ark_mem->yn; N_Vector work = ark_mem->tempv3; From fb6b587a33bbebf6fa6ac53232619d0465ec67b8 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 23 Mar 2026 08:46:29 -0400 Subject: [PATCH 215/298] Accepted suggestions from code review --- CHANGELOG.md | 7 +++++++ doc/shared/RecentChanges.rst | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e603cdcf5d..128b464715 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,6 +51,13 @@ state would be stored on the first step if the output vector passed to Fixed a potential bug in LSRKStep's `ARKODE_LSRK_SSP_S_3` method, where a real number was used instead of an integer, potentially resulting in a rounding error. +Fixed a bug in LSRKStep where an incorrect state vector could be passed to a +user-supplied dominant eigenvalue function on the first step unless the output +vector passed to `ARKodeEvolve` contained the initial condition and when an +eigenvalue estimate is requested on the first step in a subsequent call to +`ARKodeEvolve` unless the output vector passed contained the most recently returned +solution. + ### Deprecation Notices Several CMake options have been deprecated in favor of namespaced versions diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index 27d0f2e387..072be80b16 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -50,6 +50,13 @@ state would be stored on the first step if the output vector passed to Fixed a potential bug in LSRKStep's :c:enumerator:`ARKODE_LSRK_SSP_S_3` method, where a real number was used instead of an integer, potentially resulting in a rounding error. +Fixed a bug in LSRKStep where an incorrect state vector could be passed to a +user-supplied dominant eigenvalue function on the first step unless the output +vector passed to :c:func:`ARKodeEvolve` contained the initial condition and when +an eigenvalue estimate is requested on the first step in a subsequent call to +:c:func:`ARKodeEvolve` unless the output vector passed contained the most recently +returned solution. + **Deprecation Notices** Several CMake options have been deprecated in favor of namespaced versions From 6db805281fbd8a6dff15dd1ab63cc343230bb690 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 23 Mar 2026 10:32:21 -0400 Subject: [PATCH 216/298] Applied suggestions from PR review --- CHANGELOG.md | 3 + .../guide/source/Usage/User_callable.rst | 2 +- .../guide/source/Usage/User_supplied.rst | 750 ++++++++++-------- doc/shared/RecentChanges.rst | 3 + 4 files changed, 436 insertions(+), 322 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 39f0447887..88d9c2c2f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,9 @@ currently being processed, and the total number of stages in the method, for use who must compute auxiliary quantities in their IVP right-hand side functions during some stages and not others (e.g., in all but the first or last stage). +Added the functions `ARKodeGetLastTime` and `ARKodeGetLastState` to return the last +successful time and state achieved by ARKODE, respectively. + ### Bug Fixes Fixed a CMake bug where the SuperLU_MT interface would not be built and diff --git a/doc/arkode/guide/source/Usage/User_callable.rst b/doc/arkode/guide/source/Usage/User_callable.rst index 21782a3ed4..a8aff91a31 100644 --- a/doc/arkode/guide/source/Usage/User_callable.rst +++ b/doc/arkode/guide/source/Usage/User_callable.rst @@ -4122,7 +4122,7 @@ Current stage index, and total number of stages :c:func:`ARKodeGetStageIn :retval ARK_SUCCESS: the function exited successfully. :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. - .. note:: + .. danger:: Users should exercise extreme caution when using this function, as altering values of *yn* may lead to undesirable behavior, depending diff --git a/doc/arkode/guide/source/Usage/User_supplied.rst b/doc/arkode/guide/source/Usage/User_supplied.rst index 8bdafd7c0e..13d3d9126f 100644 --- a/doc/arkode/guide/source/Usage/User_supplied.rst +++ b/doc/arkode/guide/source/Usage/User_supplied.rst @@ -103,16 +103,20 @@ ARKODE time-stepping module: These functions compute the ODE right-hand side for a given value of the independent variable :math:`t` and state vector :math:`y`. - :param t: the current value of the independent variable. - :param y: the current value of the dependent variable vector. - :param ydot: the output vector that forms [a portion of] the ODE RHS :math:`f(t,y)`. - :param user_data: the `user_data` pointer that was passed to - :c:func:`ARKodeSetUserData`. + **Parameters:** - :return: An *ARKRhsFn* should return 0 if successful, a positive value if a - recoverable error occurred (in which case ARKODE will attempt to - correct), or a negative value if it failed unrecoverably (in which - case the integration is halted and *ARK_RHSFUNC_FAIL* is returned). + * **t** -- the current value of the independent variable. + * **y** -- the current value of the dependent variable vector. + * **ydot** -- the output vector that forms [a portion of] the ODE RHS :math:`f(t,y)`. + * **user_data** -- the `user_data` pointer that was passed to + :c:func:`ARKodeSetUserData`. + + **Returns:** + + An *ARKRhsFn* should return 0 if successful, a positive value if a + recoverable error occurred (in which case ARKODE will attempt to + correct), or a negative value if it failed unrecoverably (in which + case the integration is halted and *ARK_RHSFUNC_FAIL* is returned). .. note:: @@ -159,13 +163,17 @@ in :numref:`ARKODE.Mathematics.Error.Norm`. This function computes the WRMS error weights for the vector :math:`y`. - :param y: the dependent variable vector at which the weight vector is to be computed. - :param ewt: the output vector containing the error weights. - :param user_data: a pointer to user data, the same as the *user_data* - parameter that was passed to :c:func:`ARKodeSetUserData` function + **Parameters:** + + * **y** -- the dependent variable vector at which the weight vector is to be computed. + * **ewt** -- the output vector containing the error weights. + * **user_data** -- a pointer to user data, the same as the *user_data* + parameter that was passed to :c:func:`ARKodeSetUserData` function + + **Returns:** - :return: An *ARKEwtFn* function must return 0 if it - successfully set the error weights, and -1 otherwise. + An *ARKEwtFn* function must return 0 if it + successfully set the error weights, and -1 otherwise. .. note:: @@ -203,14 +211,18 @@ in :numref:`ARKODE.Mathematics.Error.Norm`. This function computes the WRMS residual weights for the vector :math:`y`. - :param y: the dependent variable vector at which the - weight vector is to be computed. - :param rwt: the output vector containing the residual weights. - :param user_data: a pointer to user data, the same as the *user_data* - parameter that was passed to :c:func:`ARKodeSetUserData`. + **Parameters:** - :return: An *ARKRwtFn* function must return 0 if it - successfully set the residual weights, and -1 otherwise. + * **y** -- the dependent variable vector at which the + weight vector is to be computed. + * **rwt** -- the output vector containing the residual weights. + * **user_data** -- a pointer to user data, the same as the *user_data* + parameter that was passed to :c:func:`ARKodeSetUserData`. + + **Returns:** + + An *ARKRwtFn* function must return 0 if it + successfully set the residual weights, and -1 otherwise. .. note:: @@ -246,23 +258,27 @@ such that the error estimate for the next time step remains below 1. This function implements a time step adaptivity algorithm that chooses :math:`h` to satisfy the error tolerances. - :param y: the current value of the dependent variable vector. - :param t: the current value of the independent variable. - :param h1: the current step size, :math:`t_n - t_{n-1}`. - :param h2: the previous step size, :math:`t_{n-1} - t_{n-2}`. - :param h3: the step size :math:`t_{n-2}-t_{n-3}`. - :param e1: the error estimate from the current step, :math:`n`. - :param e2: the error estimate from the previous step, :math:`n-1`. - :param e3: the error estimate from the step :math:`n-2`. - :param q: the global order of accuracy for the method. - :param p: the global order of accuracy for the embedded method. - :param hnew: the output value of the next step size. - :param user_data: a pointer to user data, the same as the - *h_data* parameter that was passed to :c:func:`ARKStepSetAdaptivityFn` - or :c:func:`ERKStepSetAdaptivityFn`. - - :return: An *ARKAdaptFn* function should return 0 if it - successfully set the next step size, and a non-zero value otherwise. + **Parameters:** + + * **y** -- the current value of the dependent variable vector. + * **t** -- the current value of the independent variable. + * **h1** -- the current step size, :math:`t_n - t_{n-1}`. + * **h2** -- the previous step size, :math:`t_{n-1} - t_{n-2}`. + * **h3** -- the step size :math:`t_{n-2}-t_{n-3}`. + * **e1** -- the error estimate from the current step, :math:`n`. + * **e2** -- the error estimate from the previous step, :math:`n-1`. + * **e3** -- the error estimate from the step :math:`n-2`. + * **q** -- the global order of accuracy for the method. + * **p** -- the global order of accuracy for the embedded method. + * **hnew** -- the output value of the next step size. + * **user_data** -- a pointer to user data, the same as the + *h_data* parameter that was passed to :c:func:`ARKStepSetAdaptivityFn` + or :c:func:`ERKStepSetAdaptivityFn`. + + **Returns:** + + An *ARKAdaptFn* function should return 0 if it + successfully set the next step size, and a non-zero value otherwise. .. deprecated:: 5.7.0 @@ -301,16 +317,20 @@ step, and the accuracy-based time step. This function predicts the maximum stable step size for the explicit portion of the ODE system. - :param y: the current value of the dependent variable vector. - :param t: the current value of the independent variable. - :param hstab: the output value with the absolute value of the - maximum stable step size. - :param user_data: a pointer to user data, the same as the *estab_data* - parameter that was passed to :c:func:`ARKodeSetStabilityFn`. + **Parameters:** + + * **y** -- the current value of the dependent variable vector. + * **t** -- the current value of the independent variable. + * **hstab** -- the output value with the absolute value of the + maximum stable step size. + * **user_data** -- a pointer to user data, the same as the *estab_data* + parameter that was passed to :c:func:`ARKodeSetStabilityFn`. - :return: An *ARKExpStabFn* function should return 0 if it - successfully set the upcoming stable step size, and a non-zero - value otherwise. + **Returns:** + + An *ARKExpStabFn* function should return 0 if it + successfully set the upcoming stable step size, and a non-zero + value otherwise. .. note:: @@ -343,16 +363,20 @@ the default trivial predictor in place. This function updates the prediction for the implicit stage solution. - :param t: the current value of the independent variable containing the - "time" corresponding to the predicted solution. - :param zpred: the ARKODE-predicted stage solution on input, and the - user-modified predicted stage solution on output. - :param user_data: a pointer to user data, the same as the *user_data* - parameter that was passed to :c:func:`ARKodeSetUserData`. + **Parameters:** + + * **t** -- the current value of the independent variable containing the + "time" corresponding to the predicted solution. + * **zpred** -- the ARKODE-predicted stage solution on input, and the + user-modified predicted stage solution on output. + * **user_data** -- a pointer to user data, the same as the *user_data* + parameter that was passed to :c:func:`ARKodeSetUserData`. + + **Returns:** - :return: An *ARKStagePredictFn* function should return 0 if it - successfully set the upcoming stable step size, and a non-zero - value otherwise. + An *ARKStagePredictFn* function should return 0 if it + successfully set the upcoming stable step size, and a non-zero + value otherwise. .. note:: @@ -381,15 +405,19 @@ ODE system, the user must supply a function of type :c:type:`ARKRootFn`. :math:`g(t,y)` such that roots are sought for the components :math:`g_i(t,y)`, :math:`i=0,\ldots,` *nrtfn*-1. - :param t: the current value of the independent variable. - :param y: the current value of the dependent variable vector. - :param gout: the output array, of length *nrtfn*, with components :math:`g_i(t,y)`. - :param user_data: a pointer to user data, the same as the - *user_data* parameter that was passed to the ``SetUserData`` function + **Parameters:** - :return: An *ARKRootFn* function should return 0 if successful - or a non-zero value if an error occurred (in which case the - integration is halted and ARKODE returns *ARK_RTFUNC_FAIL*). + * **t** -- the current value of the independent variable. + * **y** -- the current value of the dependent variable vector. + * **gout** -- the output array, of length *nrtfn*, with components :math:`g_i(t,y)`. + * **user_data** -- a pointer to user data, the same as the + *user_data* parameter that was passed to the ``SetUserData`` function + + **Returns:** + + An *ARKRootFn* function should return 0 if successful + or a non-zero value if an error occurred (in which case the + integration is halted and ARKODE returns *ARK_RTFUNC_FAIL*). .. note:: @@ -414,24 +442,28 @@ function of type :c:type:`ARKLsJacFn` to provide the Jacobian approximation or This function computes the Jacobian matrix :math:`J(t,y) = \dfrac{\partial f^I}{\partial y}(t,y)` (or an approximation to it). - :param t: the current value of the independent variable. - :param y: the current value of the dependent variable vector, namely - the predicted value of :math:`y(t)`. - :param fy: the current value of the vector :math:`f^I(t,y)`. - :param Jac: the output Jacobian matrix. - :param user_data: a pointer to user data, the same as the *user_data* - parameter that was passed to :c:func:`ARKodeSetUserData`. - :param tmp*: pointers to memory allocated to - variables of type ``N_Vector`` which can be used by an - ARKLsJacFn as temporary storage or work space. - - :return: An *ARKLsJacFn* function should return 0 if successful, a positive - value if a recoverable error occurred (in which case ARKODE will - attempt to correct, while ARKLS sets *last_flag* to - *ARKLS_JACFUNC_RECVR*), or a negative value if it failed - unrecoverably (in which case the integration is halted, - :c:func:`ARKodeEvolve` returns *ARK_LSETUP_FAIL* and - ARKLS sets *last_flag* to *ARKLS_JACFUNC_UNRECVR*). + **Parameters:** + + * **t** -- the current value of the independent variable. + * **y** -- the current value of the dependent variable vector, namely + the predicted value of :math:`y(t)`. + * **fy** -- the current value of the vector :math:`f^I(t,y)`. + * **Jac** -- the output Jacobian matrix. + * **user_data** -- a pointer to user data, the same as the *user_data* + parameter that was passed to :c:func:`ARKodeSetUserData`. + * **tmp1, tmp2, tmp3** -- pointers to memory allocated to + variables of type ``N_Vector`` which can be used by an + ARKLsJacFn as temporary storage or work space. + + **Returns:** + + An *ARKLsJacFn* function should return 0 if successful, a positive + value if a recoverable error occurred (in which case ARKODE will + attempt to correct, while ARKLS sets *last_flag* to + *ARKLS_JACFUNC_RECVR*), or a negative value if it failed + unrecoverably (in which case the integration is halted, + :c:func:`ARKodeEvolve` returns *ARK_LSETUP_FAIL* and + ARKLS sets *last_flag* to *ARKLS_JACFUNC_UNRECVR*). .. note:: @@ -499,36 +531,40 @@ function of type :c:type:`ARKLsJacFn` to provide the Jacobian approximation or This function computes the linear system matrix :math:`\mathcal{A}(t,y) = M(t) - \gamma J(t,y)` (or an approximation to it). - :param t: the current value of the independent variable. - :param y: the current value of the dependent variable vector, namely the - predicted value of :math:`y(t)`. - :param fy: the current value of the vector :math:`f^I(t,y)`. - :param A: the output linear system matrix. - :param M: the current mass matrix (this input is ``NULL`` if :math:`M = I`). - :param jok: is an input flag indicating whether the Jacobian-related data - needs to be updated. The *jok* argument provides for the reuse of - Jacobian data. When *jok* = ``SUNFALSE``, the Jacobian-related data - should be recomputed from scratch. When *jok* = ``SUNTRUE`` the Jacobian - data, if saved from the previous call to this function, can be reused - (with the current value of *gamma*). A call with *jok* = ``SUNTRUE`` can - only occur after a call with *jok* = ``SUNFALSE``. - :param jcur: is a pointer to a flag which should be set to ``SUNTRUE`` if - Jacobian data was recomputed, or set to ``SUNFALSE`` if Jacobian data - was not recomputed, but saved data was still reused. - :param gamma: the scalar :math:`\gamma` appearing in the Newton system matrix - :math:`\mathcal{A}=M(t)-\gamma J(t,y)`. - :param user_data: a pointer to user data, the same as the *user_data* - parameter that was passed to :c:func:`ARKodeSetUserData`. - :param tmp*: pointers to memory allocated to variables of - type ``N_Vector`` which can be used by an ARKLsLinSysFn as temporary - storage or work space. - - :return: An *ARKLsLinSysFn* function should return 0 if successful, a positive value - if a recoverable error occurred (in which case ARKODE will attempt to - correct, while ARKLS sets *last_flag* to *ARKLS_JACFUNC_RECVR*), or a - negative value if it failed unrecoverably (in which case the integration is - halted, :c:func:`ARKodeEvolve` returns *ARK_LSETUP_FAIL* and ARKLS sets - *last_flag* to *ARKLS_JACFUNC_UNRECVR*). + **Parameters:** + + * **t** -- the current value of the independent variable. + * **y** -- the current value of the dependent variable vector, namely the + predicted value of :math:`y(t)`. + * **fy** -- the current value of the vector :math:`f^I(t,y)`. + * **A** -- the output linear system matrix. + * **M** -- the current mass matrix (this input is ``NULL`` if :math:`M = I`). + * **jok** -- is an input flag indicating whether the Jacobian-related data + needs to be updated. The *jok* argument provides for the reuse of + Jacobian data. When *jok* = ``SUNFALSE``, the Jacobian-related data + should be recomputed from scratch. When *jok* = ``SUNTRUE`` the Jacobian + data, if saved from the previous call to this function, can be reused + (with the current value of *gamma*). A call with *jok* = ``SUNTRUE`` can + only occur after a call with *jok* = ``SUNFALSE``. + * **jcur** -- is a pointer to a flag which should be set to ``SUNTRUE`` if + Jacobian data was recomputed, or set to ``SUNFALSE`` if Jacobian data + was not recomputed, but saved data was still reused. + * **gamma** -- the scalar :math:`\gamma` appearing in the Newton system matrix + :math:`\mathcal{A}=M(t)-\gamma J(t,y)`. + * **user_data** -- a pointer to user data, the same as the *user_data* + parameter that was passed to :c:func:`ARKodeSetUserData`. + * **tmp1, tmp2, tmp3** -- pointers to memory allocated to variables of + type ``N_Vector`` which can be used by an ARKLsLinSysFn as temporary + storage or work space. + + **Returns:** + + An *ARKLsLinSysFn* function should return 0 if successful, a positive value + if a recoverable error occurred (in which case ARKODE will attempt to + correct, while ARKLS sets *last_flag* to *ARKLS_JACFUNC_RECVR*), or a + negative value if it failed unrecoverably (in which case the integration is + halted, :c:func:`ARKodeEvolve` returns *ARK_LSETUP_FAIL* and ARKLS sets + *last_flag* to *ARKLS_JACFUNC_UNRECVR*). @@ -550,20 +586,24 @@ the default is a difference quotient approximation to these products. This function computes the product :math:`Jv` where :math:`J(t,y) \approx \dfrac{\partial f^I}{\partial y}(t,y)` (or an approximation to it). - :param v: the vector to multiply. - :param Jv: the output vector computed. - :param t: the current value of the independent variable. - :param y: the current value of the dependent variable vector. - :param fy: the current value of the vector :math:`f^I(t,y)`. - :param user_data: a pointer to user data, the same as the *user_data* - parameter that was passed to :c:func:`ARKodeSetUserData`. - :param tmp: pointer to memory allocated to a variable of type - ``N_Vector`` which can be used as temporary storage or work space. - - :return: The value to be returned by the Jacobian-vector product - function should be 0 if successful. Any other return value will - result in an unrecoverable error of the generic Krylov solver, - in which case the integration is halted. + **Parameters:** + + * **v** -- the vector to multiply. + * **Jv** -- the output vector computed. + * **t** -- the current value of the independent variable. + * **y** -- the current value of the dependent variable vector. + * **fy** -- the current value of the vector :math:`f^I(t,y)`. + * **user_data** -- a pointer to user data, the same as the *user_data* + parameter that was passed to :c:func:`ARKodeSetUserData`. + * **tmp** - pointer to memory allocated to a variable of type + ``N_Vector`` which can be used as temporary storage or work space. + + **Returns:** + + The value to be returned by the Jacobian-vector product + function should be 0 if successful. Any other return value will + result in an unrecoverable error of the generic Krylov solver, + in which case the integration is halted. .. note:: @@ -596,16 +636,20 @@ defined as follows: This function preprocesses and/or evaluates any Jacobian-related data needed by the Jacobian-times-vector routine. - :param t: the current value of the independent variable. - :param y: the current value of the dependent variable vector. - :param fy: the current value of the vector :math:`f^I(t,y)`. - :param user_data: a pointer to user data, the same as the *user_data* - parameter that was passed to :c:func:`ARKodeSetUserData`. + **Parameters:** + + * **t** -- the current value of the independent variable. + * **y** -- the current value of the dependent variable vector. + * **fy** -- the current value of the vector :math:`f^I(t,y)`. + * **user_data** -- a pointer to user data, the same as the *user_data* + parameter that was passed to :c:func:`ARKodeSetUserData`. + + **Returns:** - :return: The value to be returned by the Jacobian-vector setup - function should be 0 if successful, positive for a recoverable - error (in which case the step will be retried), or negative for an - unrecoverable error (in which case the integration is halted). + The value to be returned by the Jacobian-vector setup + function should be 0 if successful, positive for a recoverable + error (in which case the step will be retried), or negative for an + unrecoverable error (in which case the integration is halted). .. note:: @@ -649,31 +693,35 @@ preconditioner matrices should approximate :math:`\mathcal{A}`. This function solves the preconditioner system :math:`Pz=r`. - :param t: the current value of the independent variable. - :param y: the current value of the dependent variable vector. - :param fy: the current value of the vector :math:`f^I(t,y)`. - :param r: the right-hand side vector of the linear system. - :param z: the computed output solution vector. - :param gamma: the scalar :math:`\gamma` appearing in the Newton - matrix given by :math:`\mathcal{A}=M(t)-\gamma J(t,y)`. - :param delta: an input tolerance to be used if an iterative method - is employed in the solution. In that case, the residual vector - :math:`Res = r-Pz` of the system should be made to be less than *delta* - in the weighted :math:`l_2` norm, i.e. :math:`\left(\displaystyle \sum_{i=1}^n - \left(Res_i * ewt_i\right)^2 \right)^{1/2} < \delta`, where :math:`\delta =` - `delta`. To obtain the ``N_Vector`` *ewt*, call - :c:func:`ARKodeGetErrWeights`. - :param lr: an input flag indicating whether the preconditioner - solve is to use the left preconditioner (*lr* = 1) or the right - preconditioner (*lr* = 2). - :param user_data: a pointer to user data, the same as the *user_data* - parameter that was passed to :c:func:`ARKodeSetUserData`. - - :return: The value to be returned by the preconditioner solve - function is a flag indicating whether it was successful. This value - should be 0 if successful, positive for a recoverable error (in - which case the step will be retried), or negative for an - unrecoverable error (in which case the integration is halted). + **Parameters:** + + * **t** -- the current value of the independent variable. + * **y** -- the current value of the dependent variable vector. + * **fy** -- the current value of the vector :math:`f^I(t,y)`. + * **r** -- the right-hand side vector of the linear system. + * **z** -- the computed output solution vector. + * **gamma** -- the scalar :math:`\gamma` appearing in the Newton + matrix given by :math:`\mathcal{A}=M(t)-\gamma J(t,y)`. + * **delta** -- an input tolerance to be used if an iterative method + is employed in the solution. In that case, the residual vector + :math:`Res = r-Pz` of the system should be made to be less than *delta* + in the weighted :math:`l_2` norm, i.e. :math:`\left(\displaystyle \sum_{i=1}^n + \left(Res_i * ewt_i\right)^2 \right)^{1/2} < \delta`, where :math:`\delta =` + `delta`. To obtain the ``N_Vector`` *ewt*, call + :c:func:`ARKodeGetErrWeights`. + * **lr** -- an input flag indicating whether the preconditioner + solve is to use the left preconditioner (*lr* = 1) or the right + preconditioner (*lr* = 2). + * **user_data** -- a pointer to user data, the same as the *user_data* + parameter that was passed to :c:func:`ARKodeSetUserData`. + + **Returns:** + + The value to be returned by the preconditioner solve + function is a flag indicating whether it was successful. This value + should be 0 if successful, positive for a recoverable error (in + which case the step will be retried), or negative for an + unrecoverable error (in which case the integration is halted). @@ -693,30 +741,34 @@ user-supplied function of type :c:type:`ARKLsPrecSetupFn`. This function preprocesses and/or evaluates Jacobian-related data needed by the preconditioner. - :param t: the current value of the independent variable. - :param y: the current value of the dependent variable vector. - :param fy: the current value of the vector :math:`f^I(t,y)`. - :param jok: is an input flag indicating whether the Jacobian-related - data needs to be updated. The *jok* argument provides for the - reuse of Jacobian data in the preconditioner solve function. When - *jok* = ``SUNFALSE``, the Jacobian-related data should be recomputed - from scratch. When *jok* = ``SUNTRUE`` the Jacobian data, if saved from the - previous call to this function, can be reused (with the current - value of *gamma*). A call with *jok* = ``SUNTRUE`` can only occur - after a call with *jok* = ``SUNFALSE``. - :param jcurPtr: is a pointer to a flag which should be set to - ``SUNTRUE`` if Jacobian data was recomputed, or set to ``SUNFALSE`` if - Jacobian data was not recomputed, but saved data was still reused. - :param gamma: the scalar :math:`\gamma` appearing in the Newton - matrix given by :math:`\mathcal{A}=M(t)-\gamma J(t,y)`. - :param user_data: a pointer to user data, the same as the *user_data* - parameter that was passed to :c:func:`ARKodeSetUserData`. - - :return: The value to be returned by the preconditioner setup - function is a flag indicating whether it was successful. This value - should be 0 if successful, positive for a recoverable error (in - which case the step will be retried), or negative for an - unrecoverable error (in which case the integration is halted). + **Parameters:** + + * **t** -- the current value of the independent variable. + * **y** -- the current value of the dependent variable vector. + * **fy** -- the current value of the vector :math:`f^I(t,y)`. + * **jok** -- is an input flag indicating whether the Jacobian-related + data needs to be updated. The *jok* argument provides for the + reuse of Jacobian data in the preconditioner solve function. When + *jok* = ``SUNFALSE``, the Jacobian-related data should be recomputed + from scratch. When *jok* = ``SUNTRUE`` the Jacobian data, if saved from the + previous call to this function, can be reused (with the current + value of *gamma*). A call with *jok* = ``SUNTRUE`` can only occur + after a call with *jok* = ``SUNFALSE``. + * **jcurPtr** - is a pointer to a flag which should be set to + ``SUNTRUE`` if Jacobian data was recomputed, or set to ``SUNFALSE`` if + Jacobian data was not recomputed, but saved data was still reused. + * **gamma** -- the scalar :math:`\gamma` appearing in the Newton + matrix given by :math:`\mathcal{A}=M(t)-\gamma J(t,y)`. + * **user_data** -- a pointer to user data, the same as the *user_data* + parameter that was passed to :c:func:`ARKodeSetUserData`. + + **Returns:** + + The value to be returned by the preconditioner setup + function is a flag indicating whether it was successful. This value + should be 0 if successful, positive for a recoverable error (in + which case the step will be retried), or negative for an + unrecoverable error (in which case the integration is halted). .. note:: @@ -768,19 +820,23 @@ the mass matrix approximation. This function computes the mass matrix :math:`M(t)` (or an approximation to it). - :param t: the current value of the independent variable. - :param M: the output mass matrix. - :param user_data: a pointer to user data, the same as the *user_data* - parameter that was passed to :c:func:`ARKodeSetUserData`. - :param tmp1*: pointers to memory allocated to - variables of type ``N_Vector`` which can be used by an - ARKLsMassFn as temporary storage or work space. + **Parameters:** - :return: An *ARKLsMassFn* function should return 0 if successful, or a - negative value if it failed unrecoverably (in which case the - integration is halted, :c:func:`ARKodeEvolve` returns - *ARK_MASSSETUP_FAIL* and ARKLS sets *last_flag* to - *ARKLS_MASSFUNC_UNRECVR*). + * **t** -- the current value of the independent variable. + * **M** -- the output mass matrix. + * **user_data** -- a pointer to user data, the same as the *user_data* + parameter that was passed to :c:func:`ARKodeSetUserData`. + * **tmp1, tmp2, tmp3** -- pointers to memory allocated to + variables of type ``N_Vector`` which can be used by an + ARKLsMassFn as temporary storage or work space. + + **Returns:** + + An *ARKLsMassFn* function should return 0 if successful, or a + negative value if it failed unrecoverably (in which case the + integration is halted, :c:func:`ARKodeEvolve` returns + *ARK_MASSSETUP_FAIL* and ARKLS sets *last_flag* to + *ARKLS_MASSFUNC_UNRECVR*). .. note:: @@ -839,16 +895,20 @@ compute matrix-vector products :math:`M(t)\, v`. This function computes the product :math:`M(t)\, v` (or an approximation to it). - :param v: the vector to multiply. - :param Mv: the output vector computed. - :param t: the current value of the independent variable. - :param mtimes_data: a pointer to user data, the same as the *mtimes_data* - parameter that was passed to :c:func:`ARKodeSetMassTimes`. + **Parameters:** + + * **v** -- the vector to multiply. + * **Mv** -- the output vector computed. + * **t** -- the current value of the independent variable. + * **mtimes_data** -- a pointer to user data, the same as the *mtimes_data* + parameter that was passed to :c:func:`ARKodeSetMassTimes`. - :return: The value to be returned by the mass-matrix-vector product - function should be 0 if successful. Any other return value will - result in an unrecoverable error of the generic Krylov solver, - in which case the integration is halted. + **Returns:** + + The value to be returned by the mass-matrix-vector product + function should be 0 if successful. Any other return value will + result in an unrecoverable error of the generic Krylov solver, + in which case the integration is halted. @@ -870,14 +930,18 @@ be done in a user-supplied function of type This function preprocesses and/or evaluates any mass-matrix-related data needed by the mass-matrix-times-vector routine. - :param t: the current value of the independent variable. - :param mtimes_data: a pointer to user data, the same as the *mtimes_data* - parameter that was passed to :c:func:`ARKodeSetMassTimes`. + **Parameters:** + + * **t** -- the current value of the independent variable. + * **mtimes_data** -- a pointer to user data, the same as the *mtimes_data* + parameter that was passed to :c:func:`ARKodeSetMassTimes`. - :return: The value to be returned by the mass-matrix-vector setup - function should be 0 if successful. Any other return value will - result in an unrecoverable error of the ARKLS mass matrix solver - interface, in which case the integration is halted. + **Returns:** + + The value to be returned by the mass-matrix-vector setup + function should be 0 if successful. Any other return value will + result in an unrecoverable error of the ARKLS mass matrix solver + interface, in which case the integration is halted. @@ -901,27 +965,31 @@ approximate :math:`M(t)`. This function solves the preconditioner system :math:`Pz=r`. - :param t: the current value of the independent variable. - :param r: the right-hand side vector of the linear system. - :param z: the computed output solution vector. - :param delta: an input tolerance to be used if an iterative method - is employed in the solution. In that case, the residual vector - :math:`Res = r-Pz` of the system should be made to be less than *delta* - in the weighted :math:`l_2` norm, i.e. :math:`\left(\displaystyle \sum_{i=1}^n - \left(Res_i * ewt_i\right)^2 \right)^{1/2} < \delta`, where :math:`\delta =` - *delta*. To obtain the ``N_Vector`` *ewt*, call - :c:func:`ARKodeGetErrWeights`. - :param lr: an input flag indicating whether the preconditioner - solve is to use the left preconditioner (*lr* = 1) or the right - preconditioner (*lr* = 2). - :param user_data: a pointer to user data, the same as the *user_data* - parameter that was passed to :c:func:`ARKodeSetUserData`. + **Parameters:** + + * **t** -- the current value of the independent variable. + * **r** -- the right-hand side vector of the linear system. + * **z** -- the computed output solution vector. + * **delta** -- an input tolerance to be used if an iterative method + is employed in the solution. In that case, the residual vector + :math:`Res = r-Pz` of the system should be made to be less than *delta* + in the weighted :math:`l_2` norm, i.e. :math:`\left(\displaystyle \sum_{i=1}^n + \left(Res_i * ewt_i\right)^2 \right)^{1/2} < \delta`, where :math:`\delta =` + *delta*. To obtain the ``N_Vector`` *ewt*, call + :c:func:`ARKodeGetErrWeights`. + * **lr** -- an input flag indicating whether the preconditioner + solve is to use the left preconditioner (*lr* = 1) or the right + preconditioner (*lr* = 2). + * **user_data** -- a pointer to user data, the same as the *user_data* + parameter that was passed to :c:func:`ARKodeSetUserData`. - :return: The value to be returned by the preconditioner solve - function is a flag indicating whether it was successful. This value - should be 0 if successful, positive for a recoverable error (in - which case the step will be retried), or negative for an - unrecoverable error (in which case the integration is halted). + **Returns:** + + The value to be returned by the preconditioner solve + function is a flag indicating whether it was successful. This value + should be 0 if successful, positive for a recoverable error (in + which case the step will be retried), or negative for an + unrecoverable error (in which case the integration is halted). @@ -944,15 +1012,19 @@ occur within a user-supplied function of type This function preprocesses and/or evaluates mass-matrix-related data needed by the preconditioner. - :param t: the current value of the independent variable. - :param user_data: a pointer to user data, the same as the *user_data* - parameter that was passed to :c:func:`ARKodeSetUserData`. + **Parameters:** + + * **t** -- the current value of the independent variable. + * **user_data** -- a pointer to user data, the same as the *user_data* + parameter that was passed to :c:func:`ARKodeSetUserData`. + + **Returns:** - :return: The value to be returned by the mass matrix preconditioner setup - function is a flag indicating whether it was successful. This value - should be 0 if successful, positive for a recoverable error (in - which case the step will be retried), or negative for an - unrecoverable error (in which case the integration is halted). + The value to be returned by the mass matrix preconditioner setup + function is a flag indicating whether it was successful. This value + should be 0 if successful, positive for a recoverable error (in + which case the step will be retried), or negative for an + unrecoverable error (in which case the integration is halted). .. note:: @@ -996,13 +1068,17 @@ following form: This function resizes the vector *y* to match the dimensions of the supplied vector, *ytemplate*. - :param y: the vector to resize. - :param ytemplate: a vector of the desired size. - :param user_data: a pointer to user data, the same as the *resize_data* - parameter that was passed to :c:func:`ARKodeResize`. + **Parameters:** - :return: An *ARKVecResizeFn* function should return 0 if it successfully - resizes the vector *y*, and a non-zero value otherwise. + * **y** -- the vector to resize. + * **ytemplate** -- a vector of the desired size. + * **user_data** -- a pointer to user data, the same as the *resize_data* + parameter that was passed to :c:func:`ARKodeResize`. + + **Returns:** + + An *ARKVecResizeFn* function should return 0 if it successfully + resizes the vector *y*, and a non-zero value otherwise. .. note:: @@ -1026,15 +1102,19 @@ integrator for the inner integration. .. c:type:: int (*MRIStepPreInnerFn)(sunrealtype t, N_Vector* f, int num_vecs, void* user_data) - :param t: the current value of the independent variable. - :param f: an ``N_Vector`` array of outer forcing vectors. - :param num_vecs: the number of vectors in the ``N_Vector`` array. - :param user_data: the `user_data` pointer that was passed to - :c:func:`ARKodeSetUserData`. + **Parameters:** + + * **t** -- the current value of the independent variable. + * **f** -- an ``N_Vector`` array of outer forcing vectors. + * **num_vecs** -- the number of vectors in the ``N_Vector`` array. + * **user_data** -- the `user_data` pointer that was passed to + :c:func:`ARKodeSetUserData`. - :return: An *MRIStepPreInnerFn* function should return 0 if successful, a positive value - if a recoverable error occurred, or a negative value if an unrecoverable - error occurred. + **Returns:** + + An *MRIStepPreInnerFn* function should return 0 if successful, a positive value + if a recoverable error occurred, or a negative value if an unrecoverable + error occurred. .. note:: @@ -1055,14 +1135,18 @@ outer integrator for the outer integration. .. c:type:: int (*MRIStepPostInnerFn)(sunrealtype t, N_Vector y, void* user_data) - :param t: the current value of the independent variable. - :param y: the current value of the dependent variable vector. - :param user_data: the ``user_data`` pointer that was passed to - :c:func:`ARKodeSetUserData`. + **Parameters:** + + * **t** -- the current value of the independent variable. + * **y** -- the current value of the dependent variable vector. + * **user_data** -- the ``user_data`` pointer that was passed to + :c:func:`ARKodeSetUserData`. + + **Returns:** - :return: An :c:func:`MRIStepPostInnerFn` function should return 0 if successful, a - positive value if a recoverable error occurred, or a negative value if an - unrecoverable error occurred. + An :c:func:`MRIStepPostInnerFn` function should return 0 if successful, a + positive value if a recoverable error occurred, or a negative value if an + unrecoverable error occurred. .. note:: @@ -1080,15 +1164,19 @@ Relaxation function When applying relaxation, an :c:func:`ARKRelaxFn` function is required to compute the conservative or dissipative function :math:`\xi(y)`. - :param y: the current value of the dependent variable vector. - :param r: the value of :math:`\xi(y)`. - :param user_data: the ``user_data`` pointer that was passed to - :c:func:`ARKodeSetUserData`. + **Parameters:** - :return: An :c:func:`ARKRelaxFn` function should return 0 if successful, a positive - value if a recoverable error occurred, or a negative value if an - unrecoverable error occurred. If a recoverable error occurs, the step size - will be reduced and the step repeated. + * **y** -- the current value of the dependent variable vector. + * **r** -- the value of :math:`\xi(y)`. + * **user_data** -- the ``user_data`` pointer that was passed to + :c:func:`ARKodeSetUserData`. + + **Returns:** + + An :c:func:`ARKRelaxFn` function should return 0 if successful, a positive + value if a recoverable error occurred, or a negative value if an + unrecoverable error occurred. If a recoverable error occurs, the step size + will be reduced and the step repeated. .. _ARKODE.Usage.RelaxJacFn: @@ -1101,15 +1189,19 @@ Relaxation Jacobian function compute the Jacobian :math:`\xi'(y)` of the :c:func:`ARKRelaxFn` :math:`\xi(y)`. - :param y: the current value of the dependent variable vector. - :param J: the Jacobian vector :math:`\xi'(y)`. - :param user_data: the ``user_data`` pointer that was passed to - :c:func:`ARKodeSetUserData`. + **Parameters:** + + * **y** -- the current value of the dependent variable vector. + * **J** -- the Jacobian vector :math:`\xi'(y)`. + * **user_data** -- the ``user_data`` pointer that was passed to + :c:func:`ARKodeSetUserData`. + + **Returns:** - :return: An :c:func:`ARKRelaxJacFn` function should return 0 if successful, a - positive value if a recoverable error occurred, or a negative value if an - unrecoverable error occurred. If a recoverable error occurs, the step size - will be reduced and the step repeated. + An :c:func:`ARKRelaxJacFn` function should return 0 if successful, a + positive value if a recoverable error occurred, or a negative value if an + unrecoverable error occurred. If a recoverable error occurs, the step size + will be reduced and the step repeated. .. _ARKODE.Usage.ARKodeProcessingFunctions: @@ -1141,22 +1233,26 @@ step attempt by ARKODE (see :c:func:`ARKodeSetPreStepFn`). If the supplied function modifies any of the active state data, then all theoretical guarantees of solution accuracy and stability are lost. - :param t: the current value of the independent variable. - :param y: the current value of the dependent variable vector that will be - used as the initial condition for the upcoming step. - :param step: the step index (starting at 0 for the first internal step since - ARKODE was (re-)initialized). - :param attempt: a counter indicating which attempt at the step is about to - occur -- 0 indicates that the previous step succeeded and this - is the first attempt the step ``step``, while a number greater - than 0 indicates that the previous step attempt failed and this - is a subsequent try at computing the step ``step``. - :param user_data: the ``user_data`` pointer that was passed to - :c:func:`ARKodeSetUserData`. - - :return: An :c:func:`ARKPreStepFn` function should return 0 if successful, a - positive value if a recoverable error occurred, or a negative value - if an unrecoverable error occurred. + **Parameters:** + + * **t** -- the current value of the independent variable. + * **y** -- the current value of the dependent variable vector that will be + used as the initial condition for the upcoming step. + * **step** -- the step index (starting at 0 for the first internal step since + ARKODE was (re-)initialized). + * **attempt** -- a counter indicating which attempt at the step is about to + occur -- 0 indicates that the previous step succeeded and this + is the first attempt the step ``step``, while a number greater + than 0 indicates that the previous step attempt failed and this + is a subsequent try at computing the step ``step``. + * **user_data** -- the ``user_data`` pointer that was passed to + :c:func:`ARKodeSetUserData`. + + **Returns:** + + An :c:func:`ARKPreStepFn` function should return 0 if successful, a + positive value if a recoverable error occurred, or a negative value + if an unrecoverable error occurred. .. versionadded:: x.y.z @@ -1172,17 +1268,21 @@ A user-provided :c:type:`ARKPostStepFn` will be called following each If the supplied function modifies any of the active state data, then all theoretical guarantees of solution accuracy and stability are lost. - :param t: the current value of the independent variable. - :param y: the current value of the dependent variable vector that resulted - from the successful time step. - :param step: the step index (starting at 0 for the first internal step since - ARKODE was (re-)initialized). - :param user_data: the ``user_data`` pointer that was passed to - :c:func:`ARKodeSetUserData`. + **Parameters:** - :return: An :c:func:`ARKPostStepFn` function should return 0 if successful, a - positive value if a recoverable error occurred, or a negative value - if an unrecoverable error occurred. + * **t** -- the current value of the independent variable. + * **y** -- the current value of the dependent variable vector that resulted + from the successful time step. + * **step** -- the step index (starting at 0 for the first internal step since + ARKODE was (re-)initialized). + * **user_data** -- the ``user_data`` pointer that was passed to + :c:func:`ARKodeSetUserData`. + + **Returns:** + + An :c:func:`ARKPostStepFn` function should return 0 if successful, a + positive value if a recoverable error occurred, or a negative value + if an unrecoverable error occurred. .. versionadded:: x.y.z @@ -1202,16 +1302,20 @@ of partitioned integration methods (e.g., ARKStep, MRIStep), if multiple If the supplied function modifies any of the active state data, then all theoretical guarantees of solution accuracy and stability are lost. - :param t: the current value of the independent variable that will be - provided to the :c:type:`ARKRhsFn`. - :param y: the current value of the dependent variable vector that will be - provided to the :c:type:`ARKRhsFn`. - :param user_data: the ``user_data`` pointer that was passed to - :c:func:`ARKodeSetUserData`. + **Parameters:** + + * **t** -- the current value of the independent variable that will be + provided to the :c:type:`ARKRhsFn`. + * **y** -- the current value of the dependent variable vector that will be + provided to the :c:type:`ARKRhsFn`. + * **user_data** -- the ``user_data`` pointer that was passed to + :c:func:`ARKodeSetUserData`. - :return: An :c:func:`ARKPreRhsFn` function should return 0 if successful, a - positive value if a recoverable error occurred, or a negative value if an - unrecoverable error occurred. + **Returns:** + + An :c:func:`ARKPreRhsFn` function should return 0 if successful, a + positive value if a recoverable error occurred, or a negative value if an + unrecoverable error occurred. .. versionadded:: x.y.z @@ -1228,15 +1332,19 @@ internal step attempt (see :c:func:`ARKodeSetPostprocessStepFn`). If the supplied function modifies any of the active state data, then all theoretical guarantees of solution accuracy and stability are lost. - :param t: the current value of the independent variable. - :param y: the current value of the dependent variable vector resulting from - the step or stage. - :param user_data: the ``user_data`` pointer that was passed to - :c:func:`ARKodeSetUserData`. + **Parameters:** + + * **t** -- the current value of the independent variable. + * **y** -- the current value of the dependent variable vector resulting from + the step or stage. + * **user_data** -- the ``user_data`` pointer that was passed to + :c:func:`ARKodeSetUserData`. + + **Returns:** - :return: An :c:func:`ARKPostProcessFn` function should return 0 if successful, a - positive value if a recoverable error occurred, or a negative value if an - unrecoverable error occurred. + An :c:func:`ARKPostProcessFn` function should return 0 if successful, a + positive value if a recoverable error occurred, or a negative value if an + unrecoverable error occurred. .. warning:: diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index cf40e16920..b668e02c60 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -39,6 +39,9 @@ stage currently being processed, and the total number of stages in the method, f users who must compute auxiliary quantities in their IVP right-hand side functions during some stages and not others (e.g., in all but the first or last stage). +Added the functions :c:func:`ARKodeGetLastTime` and :c:func:`ARKodeGetLastState` to +return the last successful time and state achieved by ARKODE, respectively. + **Bug Fixes** Fixed a CMake bug where the SuperLU_MT interface would not be built and From 3aba919625c7a89b1d10cfa055d75a2f0a3b175c Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 23 Mar 2026 10:45:24 -0400 Subject: [PATCH 217/298] ARKodeGetStageIndex returns an error if it is not supported by the time-stepping module --- doc/arkode/guide/source/Usage/User_callable.rst | 10 +++++++++- src/arkode/arkode_io.c | 9 ++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/doc/arkode/guide/source/Usage/User_callable.rst b/doc/arkode/guide/source/Usage/User_callable.rst index a8aff91a31..459ada2406 100644 --- a/doc/arkode/guide/source/Usage/User_callable.rst +++ b/doc/arkode/guide/source/Usage/User_callable.rst @@ -4507,7 +4507,8 @@ Current stage index, and total number of stages :c:func:`ARKodeGetStageIn .. c:function:: int ARKodeGetStageIndex(void* arkode_mem, int* stage, int *max_stages) Returns the index of the current stage (0-based) and the total number of - stages in the method. + stages in the method i.e., for an :math:`s`-stage method `stage` + :math:`\in 0,\dots,s-1` and `max_stages` :math:`= s`. :param arkode_mem: pointer to the ARKODE memory block. :param stage: pointer to storage for the current stage index. @@ -4515,6 +4516,13 @@ Current stage index, and total number of stages :c:func:`ARKodeGetStageIn :retval ARK_SUCCESS: the function exited successfully. :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. + :retval ARK_STEPPER_UNSUPPORTED: stage indexing is not supported by the + current time-stepping module. + + .. note:: + + For temporally adaptive computations in MRIStep, the "embedding" stage is + indicated using `stage` **equal to** `max_stages`. .. versionadded:: x.y.z diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index 7a9f43a0fd..7110bde6ca 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -3229,9 +3229,12 @@ int ARKodeGetStageIndex(void* arkode_mem, int* stage, int* max_stages) } else { - *stage = 0; - *max_stages = 1; - return (ARK_SUCCESS); + *stage = -1; + *max_stages = -1; + arkProcessError(ark_mem, ARK_STEPPER_UNSUPPORTED, __LINE__, __func__, + __FILE__, + "time-stepping module does not support this function"); + return (ARK_STEPPER_UNSUPPORTED); } } From 3ee192b36461e075bc682393632c9332a772e263 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 23 Mar 2026 10:50:38 -0400 Subject: [PATCH 218/298] Updated splittingStep_GetStageIndex to return an error if step_mem->coefficients is NULL --- src/arkode/arkode_splittingstep.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/arkode/arkode_splittingstep.c b/src/arkode/arkode_splittingstep.c index 179140e73e..459292aafb 100644 --- a/src/arkode/arkode_splittingstep.c +++ b/src/arkode/arkode_splittingstep.c @@ -474,8 +474,11 @@ static int splittingStep_GetStageIndex(ARKodeMem ark_mem, int* istage, /* if coefficients structure is not yet available, return defaults */ if (step_mem->coefficients == NULL) { - *istage = 0; - *num_stages = 1; + *istage = -1; + *num_stages = -1; + arkProcessError(ark_mem, ARK_MEM_NULL, __LINE__, __func__, __FILE__, + "coefficient table not allocated"); + return retval; } else { From 14b982088662ee0f8c29105ebe90ca8b746b115e Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 23 Mar 2026 10:55:43 -0400 Subject: [PATCH 219/298] Applied suggestions from PR review --- src/arkode/arkode_lsrkstep.c | 4 +--- src/arkode/arkode_splittingstep.c | 6 +++--- src/arkode/arkode_sprkstep_io.c | 7 +++++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 03b42b77e5..9fba56fc40 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -2265,9 +2265,6 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* Evaluate stages j = 2,...,5 */ for (int j = 2; j <= 5; j++) { - /* Complete previous stage by evaluating RHS and storing in tempv3 */ - ark_mem->tcur = ark_mem->tn + (j - 1) * hsixth; - /* apply user-supplied stage postprocessing function (if supplied) */ if (ark_mem->PostProcessStageFn) { @@ -2283,6 +2280,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* update stage index (0-based) */ step_mem->istage = j - 1; + /* Complete previous stage by evaluating RHS and storing in tempv3 */ /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRhsFn) diff --git a/src/arkode/arkode_splittingstep.c b/src/arkode/arkode_splittingstep.c index 459292aafb..6571774779 100644 --- a/src/arkode/arkode_splittingstep.c +++ b/src/arkode/arkode_splittingstep.c @@ -476,9 +476,9 @@ static int splittingStep_GetStageIndex(ARKodeMem ark_mem, int* istage, { *istage = -1; *num_stages = -1; - arkProcessError(ark_mem, ARK_MEM_NULL, __LINE__, __func__, __FILE__, - "coefficient table not allocated"); - return retval; + arkProcessError(ark_mem, ARK_MEM_NULL, __LINE__, __func__, __FILE__, + "coefficient table not allocated"); + return retval; } else { diff --git a/src/arkode/arkode_sprkstep_io.c b/src/arkode/arkode_sprkstep_io.c index 1d48aaa57d..da45631218 100644 --- a/src/arkode/arkode_sprkstep_io.c +++ b/src/arkode/arkode_sprkstep_io.c @@ -292,8 +292,11 @@ int sprkStep_GetStageIndex(ARKodeMem ark_mem, int* stage, int* max_stages) /* if table is not yet set, return defaults */ if (step_mem->method == NULL) { - *stage = 0; - *max_stages = 1; + *istage = -1; + *num_stages = -1; + arkProcessError(ark_mem, ARK_MEM_NULL, __LINE__, __func__, __FILE__, + "method structure not allocated"); + return retval; } else { From 068a66f4817b2b9ed7cce9460254fde1efd5b09f Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 23 Mar 2026 11:18:59 -0400 Subject: [PATCH 220/298] Applied suggestions from PR review --- src/arkode/arkode_lsrkstep.c | 12 +++--------- src/arkode/arkode_sprkstep_io.c | 4 ++-- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 9fba56fc40..935dae3170 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -718,7 +718,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) step_mem->istage = j - 1; /* Evaluate RHS and store in ycur */ - ark_mem->tcur = ark_mem->tn + ark_mem->h * thjm1; + /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) @@ -1061,7 +1061,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) step_mem->istage = j - 1; /* Evaluate RHS and store in ycur */ - ark_mem->tcur = ark_mem->tn + ark_mem->h * cjm1; + /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) @@ -1351,7 +1351,7 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr step_mem->istage = j - 1; /* Complete previous stage by evaluating RHS and storing it in tempv2 */ - ark_mem->tcur = ark_mem->tn + (j - 1) * hsm1inv; + /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRhsFn) @@ -1598,7 +1598,6 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr step_mem->istage = j - 1; /* Complete previous stage by evaluating RHS and storing it in tempv3 */ - ark_mem->tcur = ark_mem->tn + (j - 1) * hrat; /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRhsFn) @@ -1662,7 +1661,6 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr step_mem->istage = j - 1; /* Complete previous stage by evaluating RHS and storing it in tempv3 */ - ark_mem->tcur = ark_mem->tn + (j - 1) * hrat; /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRhsFn) @@ -1718,7 +1716,6 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Complete the last stage from the second stage group */ step_mem->istage = (in * (in + 1) / 2 - 1); - ark_mem->tcur = ark_mem->tn + hrat * (rn * (rn + ONE) / TWO - ONE); /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRhsFn) @@ -1788,7 +1785,6 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr step_mem->istage = j - 1; /* Complete the previous stage */ - ark_mem->tcur = ark_mem->tn + (j - in - 1) * hrat; /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRhsFn) @@ -2357,7 +2353,6 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt step_mem->istage = j - 1; /* Complete previous stage by evaluating RHS and storing in tempv3 */ - ark_mem->tcur = ark_mem->tn + (j - 4) * hsixth; /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRhsFn) @@ -2421,7 +2416,6 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt step_mem->istage = 9; /* Complete the last stage by evaluating RHS and storing in tempv3 */ - ark_mem->tcur = ark_mem->tn + ark_mem->h; /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRhsFn) diff --git a/src/arkode/arkode_sprkstep_io.c b/src/arkode/arkode_sprkstep_io.c index da45631218..81e6031f9c 100644 --- a/src/arkode/arkode_sprkstep_io.c +++ b/src/arkode/arkode_sprkstep_io.c @@ -292,8 +292,8 @@ int sprkStep_GetStageIndex(ARKodeMem ark_mem, int* stage, int* max_stages) /* if table is not yet set, return defaults */ if (step_mem->method == NULL) { - *istage = -1; - *num_stages = -1; + *stage = -1; + *max_stages = -1; arkProcessError(ark_mem, ARK_MEM_NULL, __LINE__, __func__, __FILE__, "method structure not allocated"); return retval; From 2b72fce720abd35f14d50e6ad5ed2877b0af1bd0 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 23 Mar 2026 11:35:51 -0400 Subject: [PATCH 221/298] More updates from code review; added documentation comment that RKC and RKL will call the RHS at the end of the step with stage==max_stages --- doc/arkode/guide/source/Usage/User_callable.rst | 3 +++ src/arkode/arkode_lsrkstep.c | 11 ++++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/arkode/guide/source/Usage/User_callable.rst b/doc/arkode/guide/source/Usage/User_callable.rst index 459ada2406..a52380034b 100644 --- a/doc/arkode/guide/source/Usage/User_callable.rst +++ b/doc/arkode/guide/source/Usage/User_callable.rst @@ -4524,6 +4524,9 @@ Current stage index, and total number of stages :c:func:`ARKodeGetStageIn For temporally adaptive computations in MRIStep, the "embedding" stage is indicated using `stage` **equal to** `max_stages`. + Also, for RKC and RKL methods in LSRKStep, the right-hand side will be called + at the end of the step, at which point `stage` will also equal `max_stages`. + .. versionadded:: x.y.z diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 935dae3170..572eda0e7e 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -719,7 +719,6 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Evaluate RHS and store in ycur */ - /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) { @@ -790,8 +789,8 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } else if (j == step_mem->req_stages && ark_mem->PostProcessStepFn) { - retval = ark_mem->PostProcessStepFn(ark_mem->tcur + ark_mem->h * thj, - ark_mem->ycur, ark_mem->user_data); + retval = ark_mem->PostProcessStepFn(ark_mem->tcur, ark_mem->ycur, + ark_mem->user_data); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -830,7 +829,6 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* final stage processing */ step_mem->istage = step_mem->req_stages; - ark_mem->tcur = ark_mem->tn + ark_mem->h; /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) @@ -1062,7 +1060,6 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Evaluate RHS and store in ycur */ - /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) { @@ -1163,7 +1160,6 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* final stage processing */ step_mem->istage = step_mem->req_stages; - ark_mem->tcur = ark_mem->tn + ark_mem->h; /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) @@ -1406,7 +1402,6 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Complete the next-to-last stage by evaluating the RHS and storing it in tempv2 */ step_mem->istage = step_mem->req_stages - 1; - ark_mem->tcur = ark_mem->tn + ark_mem->h; if (ark_mem->PreRhsFn) { retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); @@ -1432,6 +1427,8 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); /* Compute the step solution */ + ark_mem->tcur = ark_mem->tn + ark_mem->h; + step_mem->istage = step_mem->req_stages; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, step_mem->req_stages, ark_mem->tcur); cvals[0] = ONE / (sm1inv * rs); From 378d827853ae0568ce52435a2343d82365b5a00b Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 23 Mar 2026 11:49:06 -0400 Subject: [PATCH 222/298] Applied suggestions from PR review --- src/arkode/arkode_lsrkstep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 572eda0e7e..745e488366 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -1348,7 +1348,6 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Complete previous stage by evaluating RHS and storing it in tempv2 */ - /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRhsFn) { @@ -2123,6 +2122,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); /* Compute the time step solution and embedding */ + step_mem->istage = 4; ark_mem->tcur = ark_mem->tn + ark_mem->h; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 4, ark_mem->tcur); From 889d05d4083996a569b7ccf3f019f1a9364e8a34 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 24 Mar 2026 09:09:24 -0400 Subject: [PATCH 223/298] Applied suggestions from PR review --- CHANGELOG.md | 11 +++++++---- doc/shared/RecentChanges.rst | 10 +++++++--- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 76a8643a20..217ce902ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,10 @@ updated state (`ARKodeSetPreRhsFn`), and/or once each internal step/stage is computed (`ARKodeSetPostprocessStepFn`/ `ARKodeSetPostprocessStageFn`). These are considered **advanced** functions, as they should treat the state vector as read-only, otherwise all theoretical guarantees of solution accuracy and -stability will be lost. +stability will be lost. As a result of these new functions, the values of +multiple ARKODE return codes (e.g., ``ARK_INTERP_FAIL``) have been updated; +users who key off of the named constants will not be affected, but users who +rely on the values themselves should update their codes accordingly. Note to users utilizing the previously undocumented `ARKodeSetPostprocessStepFn` function, the supplied function is now called on the newly computed state vector @@ -49,6 +52,9 @@ condition on the first call or the last returned solution on subsequent calls. Removed an extraneous copy of the output vector in each step with SplittingStep. +Added a missing call to `SUNNonlinSolSetup` in MRIStep when using an +IMEX-MRI-SR method. + ### Deprecation Notices Several CMake options have been deprecated in favor of namespaced versions @@ -57,9 +63,6 @@ include SUNDIALS directly within their CMake builds. Additionally, a consistent naming convention (`SUNDIALS_ENABLE`) is now used for all boolean options. The Removed an extraneous copy of the output vector in each step with SplittingStep. -Added a missing call to `SUNNonlinSolSetup` in MRIStep when using an -IMEX-MRI-SR method. - | Old Option | New Option | |-----------------------------------------|------------------------------------------------| | `BUILD_ARKODE` | `SUNDIALS_ENABLE_ARKODE` | diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index e2d72a1c49..7d9754236c 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -15,6 +15,10 @@ internal step/stage is computed (:c:func:`ARKodeSetPostprocessStepFn`/ :c:func:`ARKodeSetPostprocessStageFn`). These are considered **advanced** functions, as they should treat the state vector as read-only, otherwise all theoretical guarantees of solution accuracy and stability will be lost. +As a result of these new functions, the values of multiple ARKODE return +codes (e.g., ``ARK_INTERP_FAIL``) have been updated; users who key off of the +named constants will not be affected, but users who rely on the values +themselves should update their codes accordingly. Note to users utilizing the previously undocumented :c:func:`ARKodeSetPostprocessStepFn` function, the supplied function is now @@ -49,6 +53,9 @@ calls. Removed an extraneous copy of the output vector in each step with SplittingStep. +Added a missing call to :c:func:`SUNNonlinSolSetup` in MRIStep when using an +IMEX-MRI-SR method. + **Deprecation Notices** Several CMake options have been deprecated in favor of namespaced versions @@ -56,10 +63,7 @@ prefixed with ``SUNDIALS_`` to avoid naming collisions in applications that include SUNDIALS directly within their CMake builds. Additionally, a consistent naming convention (``SUNDIALS_ENABLE``) is now used for all boolean options. The table below lists the old CMake option names and the new replacements. -Removed an extraneous copy of the output vector in each step with SplittingStep. -Added a missing call to :c:func:`SUNNonlinSolSetup` in MRIStep when using an -IMEX-MRI-SR method. +-------------------------------------------+---------------------------------------------------------+ | Old Option | New Option | +-------------------------------------------+---------------------------------------------------------+ From 43f53eee49dc05466b02699dbe7d54ef54e995d4 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 24 Mar 2026 09:25:27 -0400 Subject: [PATCH 224/298] Applied suggestions from PR review --- doc/arkode/guide/source/Usage/User_callable.rst | 4 ++-- src/arkode/arkode.c | 4 ++-- src/arkode/arkode_arkstep.c | 7 ++++++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/doc/arkode/guide/source/Usage/User_callable.rst b/doc/arkode/guide/source/Usage/User_callable.rst index 7db3a6f79a..961caa53fe 100644 --- a/doc/arkode/guide/source/Usage/User_callable.rst +++ b/doc/arkode/guide/source/Usage/User_callable.rst @@ -3555,9 +3555,9 @@ would proceed as: stage is explicit) or the ``RHS`` has already been computed at :math:`(t_{n},y_{n})`, proceed to stage 1. - a. Call ``PreRHS`` with :math:`(t_{n},y_{n})` + b. Call ``PreRHS`` with :math:`(t_{n},y_{n})` - b. Evaluate ``RHS`` at :math:`(t_{n},y_{n})` + c. Evaluate ``RHS`` at :math:`(t_{n},y_{n})` 3. Stage 1 diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index d24ae1cc41..a1f14e87bd 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -743,7 +743,7 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, /* fill current independent variable (and optionally ycur with yn) */ ark_mem->tcur = ark_mem->tn; - if (ark_mem->ensure_ycur) N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + if (ark_mem->ensure_ycur) { N_VScale(ONE, ark_mem->yn, ark_mem->ycur); } /*-------------------------------------------------- Looping point for successful internal steps @@ -1027,7 +1027,7 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, /* reset tcur to last saved internal time before reattempting step (and optionally ycur to yn ) */ ark_mem->tcur = ark_mem->tn; - if (ark_mem->ensure_ycur) N_VScale(ONE, ark_mem->yn, ark_mem->ycur); + if (ark_mem->ensure_ycur) { N_VScale(ONE, ark_mem->yn, ark_mem->ycur); } } /* end looping for step attempts */ diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index a95bc289bd..e6ac33e602 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1466,7 +1466,12 @@ int arkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (ark_mem->PreRhsFn) { retval = ark_mem->PreRhsFn(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_PRERHSFN_FAIL); } + if (retval != 0) + { + arkProcessError(ark_mem, ARK_PRERHSFN_FAIL, __LINE__, __func__, + __FILE__, MSG_ARK_PRERHSFN_FAIL, t); + return (ARK_PRERHSFN_FAIL); } + } } /* compute the implicit component */ From 9bbce39fe7534ceb13dae08168570d1da90c1a6e Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 24 Mar 2026 09:32:01 -0400 Subject: [PATCH 225/298] Formatting --- src/arkode/arkode_arkstep.c | 301 ++++++++++++++++++------------------ 1 file changed, 150 insertions(+), 151 deletions(-) diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index e6ac33e602..6b9fb37fa3 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1469,200 +1469,199 @@ int arkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (retval != 0) { arkProcessError(ark_mem, ARK_PRERHSFN_FAIL, __LINE__, __func__, - __FILE__, MSG_ARK_PRERHSFN_FAIL, t); - return (ARK_PRERHSFN_FAIL); } + __FILE__, MSG_ARK_PRERHSFN_FAIL, t); + return (ARK_PRERHSFN_FAIL); } } + } - /* compute the implicit component */ - if (step_mem->implicit) + /* compute the implicit component */ + if (step_mem->implicit) + { + retval = step_mem->fi(t, y, step_mem->Fi[0], ark_mem->user_data); + step_mem->nfi++; + if (retval != 0) { - retval = step_mem->fi(t, y, step_mem->Fi[0], ark_mem->user_data); - step_mem->nfi++; - if (retval != 0) - { - arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, - __FILE__, MSG_ARK_RHSFUNC_FAILED, t); - return (ARK_RHSFUNC_FAIL); - } - - /* compute and store M(t)^{-1} fi */ - if (step_mem->mass_type == MASS_TIMEDEP) - { - retval = step_mem->msolve((void*)ark_mem, step_mem->Fi[0], - step_mem->nlscoef / ark_mem->h); - if (retval) - { - arkProcessError(ark_mem, ARK_MASSSOLVE_FAIL, __LINE__, __func__, - __FILE__, "Mass matrix solver failure"); - return ARK_MASSSOLVE_FAIL; - } - } + arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, + __FILE__, MSG_ARK_RHSFUNC_FAILED, t); + return (ARK_RHSFUNC_FAIL); } - /* compute the explicit component */ - if (step_mem->explicit) + /* compute and store M(t)^{-1} fi */ + if (step_mem->mass_type == MASS_TIMEDEP) { - retval = step_mem->fe(t, y, step_mem->Fe[0], ark_mem->user_data); - step_mem->nfe++; - if (retval != 0) - { - arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, - __FILE__, MSG_ARK_RHSFUNC_FAILED, t); - return (ARK_RHSFUNC_FAIL); - } - - /* compute and store M(t)^{-1} fi */ - if (step_mem->mass_type == MASS_TIMEDEP) + retval = step_mem->msolve((void*)ark_mem, step_mem->Fi[0], + step_mem->nlscoef / ark_mem->h); + if (retval) { - retval = step_mem->msolve((void*)ark_mem, step_mem->Fe[0], - step_mem->nlscoef / ark_mem->h); - if (retval) - { - arkProcessError(ark_mem, ARK_MASSSOLVE_FAIL, __LINE__, __func__, - __FILE__, "Mass matrix solver failure"); - return ARK_MASSSOLVE_FAIL; - } + arkProcessError(ark_mem, ARK_MASSSOLVE_FAIL, __LINE__, __func__, + __FILE__, "Mass matrix solver failure"); + return ARK_MASSSOLVE_FAIL; } } } - else + + /* compute the explicit component */ + if (step_mem->explicit) { - if (step_mem->explicit) + retval = step_mem->fe(t, y, step_mem->Fe[0], ark_mem->user_data); + step_mem->nfe++; + if (retval != 0) { - N_VScale(ONE, step_mem->Fe[step_mem->stages - 1], step_mem->Fe[0]); + arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, + __FILE__, MSG_ARK_RHSFUNC_FAILED, t); + return (ARK_RHSFUNC_FAIL); } - if (step_mem->implicit) + + /* compute and store M(t)^{-1} fi */ + if (step_mem->mass_type == MASS_TIMEDEP) { - N_VScale(ONE, step_mem->Fi[step_mem->stages - 1], step_mem->Fi[0]); + retval = step_mem->msolve((void*)ark_mem, step_mem->Fe[0], + step_mem->nlscoef / ark_mem->h); + if (retval) + { + arkProcessError(ark_mem, ARK_MASSSOLVE_FAIL, __LINE__, __func__, + __FILE__, "Mass matrix solver failure"); + return ARK_MASSSOLVE_FAIL; + } } } } - - /* combine RHS vector(s) into output */ - if (step_mem->explicit && step_mem->implicit) - { - /* ImEx */ - N_VLinearSum(ONE, step_mem->Fi[0], ONE, step_mem->Fe[0], f); - } - else if (step_mem->implicit) - { - /* implicit */ - N_VScale(ONE, step_mem->Fi[0], f); - } else { - /* explicit */ - N_VScale(ONE, step_mem->Fe[0], f); - } - - /* compute M^{-1} f for output but do not store */ - if (step_mem->mass_type == MASS_FIXED) - { - retval = step_mem->msolve((void*)ark_mem, f, - step_mem->nlscoef / ark_mem->h); - if (retval) + if (step_mem->explicit) { - arkProcessError(ark_mem, ARK_MASSSOLVE_FAIL, __LINE__, __func__, - __FILE__, "Mass matrix solver failure"); - return ARK_MASSSOLVE_FAIL; + N_VScale(ONE, step_mem->Fe[step_mem->stages - 1], step_mem->Fe[0]); + } + if (step_mem->implicit) + { + N_VScale(ONE, step_mem->Fi[step_mem->stages - 1], step_mem->Fi[0]); } } + } - /* apply external polynomial (MRI) forcing (M = I required) */ - if (step_mem->expforcing || step_mem->impforcing) + /* combine RHS vector(s) into output */ + if (step_mem->explicit && step_mem->implicit) + { + /* ImEx */ + N_VLinearSum(ONE, step_mem->Fi[0], ONE, step_mem->Fe[0], f); + } + else if (step_mem->implicit) + { + /* implicit */ + N_VScale(ONE, step_mem->Fi[0], f); + } + else + { + /* explicit */ + N_VScale(ONE, step_mem->Fe[0], f); + } + + /* compute M^{-1} f for output but do not store */ + if (step_mem->mass_type == MASS_FIXED) + { + retval = step_mem->msolve((void*)ark_mem, f, step_mem->nlscoef / ark_mem->h); + if (retval) { - cvals[0] = ONE; - Xvecs[0] = f; - nvec = 1; - arkStep_ApplyForcing(step_mem, &t, &stage_coefs, 1, &nvec); - N_VLinearCombination(nvec, cvals, Xvecs, f); + arkProcessError(ark_mem, ARK_MASSSOLVE_FAIL, __LINE__, __func__, __FILE__, + "Mass matrix solver failure"); + return ARK_MASSSOLVE_FAIL; } + } - break; + /* apply external polynomial (MRI) forcing (M = I required) */ + if (step_mem->expforcing || step_mem->impforcing) + { + cvals[0] = ONE; + Xvecs[0] = f; + nvec = 1; + arkStep_ApplyForcing(step_mem, &t, &stage_coefs, 1, &nvec); + N_VLinearCombination(nvec, cvals, Xvecs, f); + } - case ARK_FULLRHS_OTHER: + break; - /* call the user-supplied pre-RHS function (if supplied) */ - if (ark_mem->PreRhsFn) - { - retval = ark_mem->PreRhsFn(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_PRERHSFN_FAIL); } - } +case ARK_FULLRHS_OTHER: - /* compute the implicit component and store in sdata */ - if (step_mem->implicit) + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) + { + retval = ark_mem->PreRhsFn(t, y, ark_mem->user_data); + if (retval != 0) { return (ARK_PRERHSFN_FAIL); } + } + + /* compute the implicit component and store in sdata */ + if (step_mem->implicit) + { + retval = step_mem->fi(t, y, step_mem->sdata, ark_mem->user_data); + step_mem->nfi++; + if (retval != 0) { - retval = step_mem->fi(t, y, step_mem->sdata, ark_mem->user_data); - step_mem->nfi++; - if (retval != 0) - { - arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, __FILE__, - MSG_ARK_RHSFUNC_FAILED, t); - return (ARK_RHSFUNC_FAIL); - } + arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, __FILE__, + MSG_ARK_RHSFUNC_FAILED, t); + return (ARK_RHSFUNC_FAIL); } + } - /* compute the explicit component and store in ark_tempv2 */ - if (step_mem->explicit) + /* compute the explicit component and store in ark_tempv2 */ + if (step_mem->explicit) + { + retval = step_mem->fe(t, y, ark_mem->tempv2, ark_mem->user_data); + step_mem->nfe++; + if (retval != 0) { - retval = step_mem->fe(t, y, ark_mem->tempv2, ark_mem->user_data); - step_mem->nfe++; - if (retval != 0) - { - arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, __FILE__, - MSG_ARK_RHSFUNC_FAILED, t); - return (ARK_RHSFUNC_FAIL); - } + arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, __FILE__, + MSG_ARK_RHSFUNC_FAILED, t); + return (ARK_RHSFUNC_FAIL); } + } - /* combine RHS vector(s) into output */ - if (step_mem->explicit && step_mem->implicit) - { /* ImEx */ - N_VLinearSum(ONE, step_mem->sdata, ONE, ark_mem->tempv2, f); - } - else if (step_mem->implicit) - { /* implicit */ - N_VScale(ONE, step_mem->sdata, f); - } - else - { /* explicit */ - N_VScale(ONE, ark_mem->tempv2, f); - } + /* combine RHS vector(s) into output */ + if (step_mem->explicit && step_mem->implicit) + { /* ImEx */ + N_VLinearSum(ONE, step_mem->sdata, ONE, ark_mem->tempv2, f); + } + else if (step_mem->implicit) + { /* implicit */ + N_VScale(ONE, step_mem->sdata, f); + } + else + { /* explicit */ + N_VScale(ONE, ark_mem->tempv2, f); + } - /* compute M^{-1} f for output but do not store */ - if (step_mem->mass_type != MASS_IDENTITY) + /* compute M^{-1} f for output but do not store */ + if (step_mem->mass_type != MASS_IDENTITY) + { + retval = step_mem->msolve((void*)ark_mem, f, step_mem->nlscoef / ark_mem->h); + if (retval) { - retval = step_mem->msolve((void*)ark_mem, f, - step_mem->nlscoef / ark_mem->h); - if (retval) - { - arkProcessError(ark_mem, ARK_MASSSOLVE_FAIL, __LINE__, __func__, - __FILE__, "Mass matrix solver failure"); - return ARK_MASSSOLVE_FAIL; - } + arkProcessError(ark_mem, ARK_MASSSOLVE_FAIL, __LINE__, __func__, __FILE__, + "Mass matrix solver failure"); + return ARK_MASSSOLVE_FAIL; } + } - /* apply external polynomial (MRI) forcing (M = I required) */ - if (step_mem->expforcing || step_mem->impforcing) - { - cvals[0] = ONE; - Xvecs[0] = f; - nvec = 1; - arkStep_ApplyForcing(step_mem, &t, &stage_coefs, 1, &nvec); - N_VLinearCombination(nvec, cvals, Xvecs, f); - } + /* apply external polynomial (MRI) forcing (M = I required) */ + if (step_mem->expforcing || step_mem->impforcing) + { + cvals[0] = ONE; + Xvecs[0] = f; + nvec = 1; + arkStep_ApplyForcing(step_mem, &t, &stage_coefs, 1, &nvec); + N_VLinearCombination(nvec, cvals, Xvecs, f); + } - break; + break; - default: - /* return with RHS failure if unknown mode is passed */ - arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, __FILE__, - "Unknown full RHS mode"); - return (ARK_RHSFUNC_FAIL); - } +default: + /* return with RHS failure if unknown mode is passed */ + arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, __FILE__, + "Unknown full RHS mode"); + return (ARK_RHSFUNC_FAIL); +} - return (ARK_SUCCESS); +return (ARK_SUCCESS); } /*--------------------------------------------------------------- From a9f77a99c6a0247f5035a122ed0dd34d629afbe7 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 24 Mar 2026 09:45:58 -0400 Subject: [PATCH 226/298] Fixed braces from previous commit --- src/arkode/arkode_arkstep.c | 309 +++++++++++++++++++----------------- 1 file changed, 160 insertions(+), 149 deletions(-) diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index 6b9fb37fa3..5e58200241 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1334,7 +1334,12 @@ int arkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, if (ark_mem->PreRhsFn) { retval = ark_mem->PreRhsFn(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_PRERHSFN_FAIL); } + if (retval != 0) + { + arkProcessError(ark_mem, ARK_PRERHSFN_FAIL, __LINE__, __func__, + __FILE__, MSG_ARK_PRERHSFN_FAIL, t); + return (ARK_PRERHSFN_FAIL); + } } /* compute the implicit component */ @@ -1473,195 +1478,201 @@ int arkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, return (ARK_PRERHSFN_FAIL); } } - } - /* compute the implicit component */ - if (step_mem->implicit) - { - retval = step_mem->fi(t, y, step_mem->Fi[0], ark_mem->user_data); - step_mem->nfi++; - if (retval != 0) + /* compute the implicit component */ + if (step_mem->implicit) { - arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, - __FILE__, MSG_ARK_RHSFUNC_FAILED, t); - return (ARK_RHSFUNC_FAIL); + retval = step_mem->fi(t, y, step_mem->Fi[0], ark_mem->user_data); + step_mem->nfi++; + if (retval != 0) + { + arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, + __FILE__, MSG_ARK_RHSFUNC_FAILED, t); + return (ARK_RHSFUNC_FAIL); + } + + /* compute and store M(t)^{-1} fi */ + if (step_mem->mass_type == MASS_TIMEDEP) + { + retval = step_mem->msolve((void*)ark_mem, step_mem->Fi[0], + step_mem->nlscoef / ark_mem->h); + if (retval) + { + arkProcessError(ark_mem, ARK_MASSSOLVE_FAIL, __LINE__, __func__, + __FILE__, "Mass matrix solver failure"); + return ARK_MASSSOLVE_FAIL; + } + } } - /* compute and store M(t)^{-1} fi */ - if (step_mem->mass_type == MASS_TIMEDEP) + /* compute the explicit component */ + if (step_mem->explicit) { - retval = step_mem->msolve((void*)ark_mem, step_mem->Fi[0], - step_mem->nlscoef / ark_mem->h); - if (retval) + retval = step_mem->fe(t, y, step_mem->Fe[0], ark_mem->user_data); + step_mem->nfe++; + if (retval != 0) { - arkProcessError(ark_mem, ARK_MASSSOLVE_FAIL, __LINE__, __func__, - __FILE__, "Mass matrix solver failure"); - return ARK_MASSSOLVE_FAIL; + arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, + __FILE__, MSG_ARK_RHSFUNC_FAILED, t); + return (ARK_RHSFUNC_FAIL); + } + + /* compute and store M(t)^{-1} fi */ + if (step_mem->mass_type == MASS_TIMEDEP) + { + retval = step_mem->msolve((void*)ark_mem, step_mem->Fe[0], + step_mem->nlscoef / ark_mem->h); + if (retval) + { + arkProcessError(ark_mem, ARK_MASSSOLVE_FAIL, __LINE__, __func__, + __FILE__, "Mass matrix solver failure"); + return ARK_MASSSOLVE_FAIL; + } } } } - - /* compute the explicit component */ - if (step_mem->explicit) + else { - retval = step_mem->fe(t, y, step_mem->Fe[0], ark_mem->user_data); - step_mem->nfe++; - if (retval != 0) + if (step_mem->explicit) { - arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, - __FILE__, MSG_ARK_RHSFUNC_FAILED, t); - return (ARK_RHSFUNC_FAIL); + N_VScale(ONE, step_mem->Fe[step_mem->stages - 1], step_mem->Fe[0]); } - - /* compute and store M(t)^{-1} fi */ - if (step_mem->mass_type == MASS_TIMEDEP) + if (step_mem->implicit) { - retval = step_mem->msolve((void*)ark_mem, step_mem->Fe[0], - step_mem->nlscoef / ark_mem->h); - if (retval) - { - arkProcessError(ark_mem, ARK_MASSSOLVE_FAIL, __LINE__, __func__, - __FILE__, "Mass matrix solver failure"); - return ARK_MASSSOLVE_FAIL; - } + N_VScale(ONE, step_mem->Fi[step_mem->stages - 1], step_mem->Fi[0]); } } } + + /* combine RHS vector(s) into output */ + if (step_mem->explicit && step_mem->implicit) + { + /* ImEx */ + N_VLinearSum(ONE, step_mem->Fi[0], ONE, step_mem->Fe[0], f); + } + else if (step_mem->implicit) + { + /* implicit */ + N_VScale(ONE, step_mem->Fi[0], f); + } else { - if (step_mem->explicit) - { - N_VScale(ONE, step_mem->Fe[step_mem->stages - 1], step_mem->Fe[0]); - } - if (step_mem->implicit) + /* explicit */ + N_VScale(ONE, step_mem->Fe[0], f); + } + + /* compute M^{-1} f for output but do not store */ + if (step_mem->mass_type == MASS_FIXED) + { + retval = step_mem->msolve((void*)ark_mem, f, + step_mem->nlscoef / ark_mem->h); + if (retval) { - N_VScale(ONE, step_mem->Fi[step_mem->stages - 1], step_mem->Fi[0]); + arkProcessError(ark_mem, ARK_MASSSOLVE_FAIL, __LINE__, __func__, + __FILE__, "Mass matrix solver failure"); + return ARK_MASSSOLVE_FAIL; } } - } - - /* combine RHS vector(s) into output */ - if (step_mem->explicit && step_mem->implicit) - { - /* ImEx */ - N_VLinearSum(ONE, step_mem->Fi[0], ONE, step_mem->Fe[0], f); - } - else if (step_mem->implicit) - { - /* implicit */ - N_VScale(ONE, step_mem->Fi[0], f); - } - else - { - /* explicit */ - N_VScale(ONE, step_mem->Fe[0], f); - } - /* compute M^{-1} f for output but do not store */ - if (step_mem->mass_type == MASS_FIXED) - { - retval = step_mem->msolve((void*)ark_mem, f, step_mem->nlscoef / ark_mem->h); - if (retval) + /* apply external polynomial (MRI) forcing (M = I required) */ + if (step_mem->expforcing || step_mem->impforcing) { - arkProcessError(ark_mem, ARK_MASSSOLVE_FAIL, __LINE__, __func__, __FILE__, - "Mass matrix solver failure"); - return ARK_MASSSOLVE_FAIL; + cvals[0] = ONE; + Xvecs[0] = f; + nvec = 1; + arkStep_ApplyForcing(step_mem, &t, &stage_coefs, 1, &nvec); + N_VLinearCombination(nvec, cvals, Xvecs, f); } - } - - /* apply external polynomial (MRI) forcing (M = I required) */ - if (step_mem->expforcing || step_mem->impforcing) - { - cvals[0] = ONE; - Xvecs[0] = f; - nvec = 1; - arkStep_ApplyForcing(step_mem, &t, &stage_coefs, 1, &nvec); - N_VLinearCombination(nvec, cvals, Xvecs, f); - } - break; + break; -case ARK_FULLRHS_OTHER: + case ARK_FULLRHS_OTHER: - /* call the user-supplied pre-RHS function (if supplied) */ - if (ark_mem->PreRhsFn) - { - retval = ark_mem->PreRhsFn(t, y, ark_mem->user_data); - if (retval != 0) { return (ARK_PRERHSFN_FAIL); } - } + /* call the user-supplied pre-RHS function (if supplied) */ + if (ark_mem->PreRhsFn) + { + retval = ark_mem->PreRhsFn(t, y, ark_mem->user_data); + if (retval != 0) + { + arkProcessError(ark_mem, ARK_PRERHSFN_FAIL, __LINE__, __func__, + __FILE__, MSG_ARK_PRERHSFN_FAIL, t); + return (ARK_PRERHSFN_FAIL); + } + } - /* compute the implicit component and store in sdata */ - if (step_mem->implicit) - { - retval = step_mem->fi(t, y, step_mem->sdata, ark_mem->user_data); - step_mem->nfi++; - if (retval != 0) + /* compute the implicit component and store in sdata */ + if (step_mem->implicit) { - arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, __FILE__, - MSG_ARK_RHSFUNC_FAILED, t); - return (ARK_RHSFUNC_FAIL); + retval = step_mem->fi(t, y, step_mem->sdata, ark_mem->user_data); + step_mem->nfi++; + if (retval != 0) + { + arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, __FILE__, + MSG_ARK_RHSFUNC_FAILED, t); + return (ARK_RHSFUNC_FAIL); + } } - } - /* compute the explicit component and store in ark_tempv2 */ - if (step_mem->explicit) - { - retval = step_mem->fe(t, y, ark_mem->tempv2, ark_mem->user_data); - step_mem->nfe++; - if (retval != 0) + /* compute the explicit component and store in ark_tempv2 */ + if (step_mem->explicit) { - arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, __FILE__, - MSG_ARK_RHSFUNC_FAILED, t); - return (ARK_RHSFUNC_FAIL); + retval = step_mem->fe(t, y, ark_mem->tempv2, ark_mem->user_data); + step_mem->nfe++; + if (retval != 0) + { + arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, __FILE__, + MSG_ARK_RHSFUNC_FAILED, t); + return (ARK_RHSFUNC_FAIL); + } } - } - /* combine RHS vector(s) into output */ - if (step_mem->explicit && step_mem->implicit) - { /* ImEx */ - N_VLinearSum(ONE, step_mem->sdata, ONE, ark_mem->tempv2, f); - } - else if (step_mem->implicit) - { /* implicit */ - N_VScale(ONE, step_mem->sdata, f); - } - else - { /* explicit */ - N_VScale(ONE, ark_mem->tempv2, f); - } + /* combine RHS vector(s) into output */ + if (step_mem->explicit && step_mem->implicit) + { /* ImEx */ + N_VLinearSum(ONE, step_mem->sdata, ONE, ark_mem->tempv2, f); + } + else if (step_mem->implicit) + { /* implicit */ + N_VScale(ONE, step_mem->sdata, f); + } + else + { /* explicit */ + N_VScale(ONE, ark_mem->tempv2, f); + } - /* compute M^{-1} f for output but do not store */ - if (step_mem->mass_type != MASS_IDENTITY) - { - retval = step_mem->msolve((void*)ark_mem, f, step_mem->nlscoef / ark_mem->h); - if (retval) + /* compute M^{-1} f for output but do not store */ + if (step_mem->mass_type != MASS_IDENTITY) { - arkProcessError(ark_mem, ARK_MASSSOLVE_FAIL, __LINE__, __func__, __FILE__, - "Mass matrix solver failure"); - return ARK_MASSSOLVE_FAIL; + retval = step_mem->msolve((void*)ark_mem, f, + step_mem->nlscoef / ark_mem->h); + if (retval) + { + arkProcessError(ark_mem, ARK_MASSSOLVE_FAIL, __LINE__, __func__, + __FILE__, "Mass matrix solver failure"); + return ARK_MASSSOLVE_FAIL; + } } - } - /* apply external polynomial (MRI) forcing (M = I required) */ - if (step_mem->expforcing || step_mem->impforcing) - { - cvals[0] = ONE; - Xvecs[0] = f; - nvec = 1; - arkStep_ApplyForcing(step_mem, &t, &stage_coefs, 1, &nvec); - N_VLinearCombination(nvec, cvals, Xvecs, f); - } + /* apply external polynomial (MRI) forcing (M = I required) */ + if (step_mem->expforcing || step_mem->impforcing) + { + cvals[0] = ONE; + Xvecs[0] = f; + nvec = 1; + arkStep_ApplyForcing(step_mem, &t, &stage_coefs, 1, &nvec); + N_VLinearCombination(nvec, cvals, Xvecs, f); + } - break; + break; -default: - /* return with RHS failure if unknown mode is passed */ - arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, __FILE__, - "Unknown full RHS mode"); - return (ARK_RHSFUNC_FAIL); -} + default: + /* return with RHS failure if unknown mode is passed */ + arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, __FILE__, + "Unknown full RHS mode"); + return (ARK_RHSFUNC_FAIL); + } -return (ARK_SUCCESS); + return (ARK_SUCCESS); } /*--------------------------------------------------------------- From 226d603a23da39747b38a8a11c3da950f173c053 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 24 Mar 2026 13:49:51 -0400 Subject: [PATCH 227/298] Formatting --- src/arkode/arkode_lsrkstep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 52f882891d..1beeb9e089 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -1426,7 +1426,7 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); /* Compute the step solution */ - ark_mem->tcur = ark_mem->tn + ark_mem->h; + ark_mem->tcur = ark_mem->tn + ark_mem->h; step_mem->istage = step_mem->req_stages; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, step_mem->req_stages, ark_mem->tcur); @@ -2123,7 +2123,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Compute the time step solution and embedding */ step_mem->istage = 4; - ark_mem->tcur = ark_mem->tn + ark_mem->h; + ark_mem->tcur = ark_mem->tn + ark_mem->h; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 4, ark_mem->tcur); N_VLinearSum(ONE, ark_mem->ycur, hp5, ark_mem->tempv3, ark_mem->ycur); From 802a5d7eb62eadf3e5d29eeef5f2fcda0390d37e Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 26 Mar 2026 08:48:23 -0400 Subject: [PATCH 228/298] Renamed ARKodeAllocateInternalData to ARKodeInit, to match naming convention in CVODE and IDA --- CHANGELOG.md | 4 ++-- doc/arkode/guide/source/Usage/User_callable.rst | 4 ++-- doc/shared/RecentChanges.rst | 4 ++-- include/arkode/arkode.h | 4 +++- src/arkode/arkode_io.c | 4 ++-- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6407db2543..584f26e0e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,8 +33,8 @@ and `ARKODE_LSRK_SSP_S_3` in LSRKStep were changed from 10 and 9, respectively, their minimum allowable values of 2 and 4. Users may revert to the previous values by calling `LSRKStepSetNumSSPStages`. -Added the function `ARKodeAllocateInternalData` to ARKODE to enable -stage-related data allocation before the first call to `ARKodeEvolve` +Added the optional function `ARKodeInit` to ARKODE to enable +data allocation before the first call to `ARKodeEvolve` (but after all other optional input routines have been called), to support users who measure memory usage before beginning a simulation. diff --git a/doc/arkode/guide/source/Usage/User_callable.rst b/doc/arkode/guide/source/Usage/User_callable.rst index be9c33346f..1f56dc247b 100644 --- a/doc/arkode/guide/source/Usage/User_callable.rst +++ b/doc/arkode/guide/source/Usage/User_callable.rst @@ -5431,9 +5431,9 @@ internal data before the first call to :c:func:`ARKodeEvolve`, the user may call the function :c:func:`ARKodeAllocateInternalData`. -.. c:function:: int ARKodeAllocateInternalData(void* arkode_mem) +.. c:function:: int ARKodeInit(void* arkode_mem) - Optionally allocates stage-related internal data for the current ARKODE time-stepper module. + Optionally allocates internal data for the current ARKODE time-stepper module. :param arkode_mem: pointer to the ARKODE memory block. diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index 006c1d2a40..d6f849884e 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -33,8 +33,8 @@ and :c:enumerator:`ARKODE_LSRK_SSP_S_3` in LSRKStep were changed from 10 and 9, their minimum allowable values of 2 and 4. Users may revert to the previous values by calling :c:func:`LSRKStepSetNumSSPStages`. -Added the function :c:func:`ARKodeAllocateInternalData` to ARKODE to enable -stage-related data allocation before the first call to :c:func:`ARKodeEvolve` +Added the optional function :c:func:`ARKodeInit` to ARKODE to enable +data allocation before the first call to :c:func:`ARKodeEvolve` (but after all other optional input routines have been called), to support users who measure memory usage before beginning a simulation. diff --git a/include/arkode/arkode.h b/include/arkode/arkode.h index f36dcef668..e4d302847f 100644 --- a/include/arkode/arkode.h +++ b/include/arkode/arkode.h @@ -253,6 +253,9 @@ SUNDIALS_EXPORT int ARKodeResize(void* arkode_mem, N_Vector ynew, ARKVecResizeFn resize, void* resize_data); SUNDIALS_EXPORT int ARKodeReset(void* arkode_mem, sunrealtype tR, N_Vector yR); +/* Optional data allocation function */ +SUNDIALS_EXPORT int ARKodeInit(void* arkode_mem); + /* Utility to wrap ARKODE as an MRIStepInnerStepper */ SUNDIALS_EXPORT int ARKodeCreateMRIStepInnerStepper(void* arkode_mem, MRIStepInnerStepper* stepper); @@ -295,7 +298,6 @@ SUNDIALS_EXPORT int ARKodeSetPostprocessStepFn(void* arkode_mem, ARKPostProcessFn ProcessStep); SUNDIALS_EXPORT int ARKodeSetPostprocessStageFn(void* arkode_mem, ARKPostProcessFn ProcessStage); -SUNDIALS_EXPORT int ARKodeAllocateInternalData(void* arkode_mem); /* Optional input functions (implicit solver) */ SUNDIALS_EXPORT int ARKodeSetNonlinearSolver(void* arkode_mem, diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index f377e67b8e..23e262ab59 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -2296,14 +2296,14 @@ int ARKodeSetUseCompensatedSums(void* arkode_mem, sunbooleantype onoff) } /*--------------------------------------------------------------- - ARKodeAllocateInternalData: + ARKodeInit: Allocates internal data structures for an ARKODE stepper module before the first call to ARKodeEvolve. **THIS MUST BE CALLED AFTER ALL "SET" ROUTINES.** ---------------------------------------------------------------*/ -int ARKodeAllocateInternalData(void* arkode_mem) +int ARKodeInit(void* arkode_mem) { ARKodeMem ark_mem; int retval; From ffd637d5c3b4c7732a52a3bfd7af0b2331ebdf24 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 26 Mar 2026 08:50:05 -0400 Subject: [PATCH 229/298] Renamed ARKodeAllocateInternalData to ARKodeInit, to match naming convention in CVODE and IDA --- src/arkode/fmod_int32/farkode_mod.c | 24 +++++++-------- src/arkode/fmod_int32/farkode_mod.f90 | 44 +++++++++++++-------------- src/arkode/fmod_int64/farkode_mod.c | 24 +++++++-------- src/arkode/fmod_int64/farkode_mod.f90 | 44 +++++++++++++-------------- 4 files changed, 68 insertions(+), 68 deletions(-) diff --git a/src/arkode/fmod_int32/farkode_mod.c b/src/arkode/fmod_int32/farkode_mod.c index e05e79ddfc..61f530d03a 100644 --- a/src/arkode/fmod_int32/farkode_mod.c +++ b/src/arkode/fmod_int32/farkode_mod.c @@ -356,6 +356,18 @@ SWIGEXPORT int _wrap_FARKodeReset(void *farg1, double const *farg2, N_Vector far } +SWIGEXPORT int _wrap_FARKodeInit(void *farg1) { + int fresult ; + void *arg1 = (void *) 0 ; + int result; + + arg1 = (void *)(farg1); + result = (int)ARKodeInit(arg1); + fresult = (int)(result); + return fresult; +} + + SWIGEXPORT int _wrap_FARKodeCreateMRIStepInnerStepper(void *farg1, void *farg2) { int fresult ; void *arg1 = (void *) 0 ; @@ -720,18 +732,6 @@ SWIGEXPORT int _wrap_FARKodeSetPostprocessStageFn(void *farg1, ARKPostProcessFn } -SWIGEXPORT int _wrap_FARKodeAllocateInternalData(void *farg1) { - int fresult ; - void *arg1 = (void *) 0 ; - int result; - - arg1 = (void *)(farg1); - result = (int)ARKodeAllocateInternalData(arg1); - fresult = (int)(result); - return fresult; -} - - SWIGEXPORT int _wrap_FARKodeSetNonlinearSolver(void *farg1, SUNNonlinearSolver farg2) { int fresult ; void *arg1 = (void *) 0 ; diff --git a/src/arkode/fmod_int32/farkode_mod.f90 b/src/arkode/fmod_int32/farkode_mod.f90 index 65182670eb..e2c524241e 100644 --- a/src/arkode/fmod_int32/farkode_mod.f90 +++ b/src/arkode/fmod_int32/farkode_mod.f90 @@ -127,6 +127,7 @@ module farkode_mod public :: ARK_ACCUMERROR_NONE, ARK_ACCUMERROR_MAX, ARK_ACCUMERROR_SUM, ARK_ACCUMERROR_AVG public :: FARKodeResize public :: FARKodeReset + public :: FARKodeInit public :: FARKodeCreateMRIStepInnerStepper public :: FARKodeSStolerances public :: FARKodeSVtolerances @@ -153,7 +154,6 @@ module farkode_mod public :: FARKodeSetPreRhsFn public :: FARKodeSetPostprocessStepFn public :: FARKodeSetPostprocessStageFn - public :: FARKodeAllocateInternalData public :: FARKodeSetNonlinearSolver public :: FARKodeSetLinear public :: FARKodeSetNonlinear @@ -523,6 +523,14 @@ function swigc_FARKodeReset(farg1, farg2, farg3) & integer(C_INT) :: fresult end function +function swigc_FARKodeInit(farg1) & +bind(C, name="_wrap_FARKodeInit") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +integer(C_INT) :: fresult +end function + function swigc_FARKodeCreateMRIStepInnerStepper(farg1, farg2) & bind(C, name="_wrap_FARKodeCreateMRIStepInnerStepper") & result(fresult) @@ -757,14 +765,6 @@ function swigc_FARKodeSetPostprocessStageFn(farg1, farg2) & integer(C_INT) :: fresult end function -function swigc_FARKodeAllocateInternalData(farg1) & -bind(C, name="_wrap_FARKodeAllocateInternalData") & -result(fresult) -use, intrinsic :: ISO_C_BINDING -type(C_PTR), value :: farg1 -integer(C_INT) :: fresult -end function - function swigc_FARKodeSetNonlinearSolver(farg1, farg2) & bind(C, name="_wrap_FARKodeSetNonlinearSolver") & result(fresult) @@ -2602,6 +2602,19 @@ function FARKodeReset(arkode_mem, tr, yr) & swig_result = fresult end function +function FARKodeInit(arkode_mem) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +integer(C_INT) :: fresult +type(C_PTR) :: farg1 + +farg1 = arkode_mem +fresult = swigc_FARKodeInit(farg1) +swig_result = fresult +end function + function FARKodeCreateMRIStepInnerStepper(arkode_mem, stepper) & result(swig_result) use, intrinsic :: ISO_C_BINDING @@ -3018,19 +3031,6 @@ function FARKodeSetPostprocessStageFn(arkode_mem, processstage) & swig_result = fresult end function -function FARKodeAllocateInternalData(arkode_mem) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -integer(C_INT) :: swig_result -type(C_PTR) :: arkode_mem -integer(C_INT) :: fresult -type(C_PTR) :: farg1 - -farg1 = arkode_mem -fresult = swigc_FARKodeAllocateInternalData(farg1) -swig_result = fresult -end function - function FARKodeSetNonlinearSolver(arkode_mem, nls) & result(swig_result) use, intrinsic :: ISO_C_BINDING diff --git a/src/arkode/fmod_int64/farkode_mod.c b/src/arkode/fmod_int64/farkode_mod.c index 029bc560d0..604781255c 100644 --- a/src/arkode/fmod_int64/farkode_mod.c +++ b/src/arkode/fmod_int64/farkode_mod.c @@ -356,6 +356,18 @@ SWIGEXPORT int _wrap_FARKodeReset(void *farg1, double const *farg2, N_Vector far } +SWIGEXPORT int _wrap_FARKodeInit(void *farg1) { + int fresult ; + void *arg1 = (void *) 0 ; + int result; + + arg1 = (void *)(farg1); + result = (int)ARKodeInit(arg1); + fresult = (int)(result); + return fresult; +} + + SWIGEXPORT int _wrap_FARKodeCreateMRIStepInnerStepper(void *farg1, void *farg2) { int fresult ; void *arg1 = (void *) 0 ; @@ -720,18 +732,6 @@ SWIGEXPORT int _wrap_FARKodeSetPostprocessStageFn(void *farg1, ARKPostProcessFn } -SWIGEXPORT int _wrap_FARKodeAllocateInternalData(void *farg1) { - int fresult ; - void *arg1 = (void *) 0 ; - int result; - - arg1 = (void *)(farg1); - result = (int)ARKodeAllocateInternalData(arg1); - fresult = (int)(result); - return fresult; -} - - SWIGEXPORT int _wrap_FARKodeSetNonlinearSolver(void *farg1, SUNNonlinearSolver farg2) { int fresult ; void *arg1 = (void *) 0 ; diff --git a/src/arkode/fmod_int64/farkode_mod.f90 b/src/arkode/fmod_int64/farkode_mod.f90 index fc397c7f93..11f6080945 100644 --- a/src/arkode/fmod_int64/farkode_mod.f90 +++ b/src/arkode/fmod_int64/farkode_mod.f90 @@ -127,6 +127,7 @@ module farkode_mod public :: ARK_ACCUMERROR_NONE, ARK_ACCUMERROR_MAX, ARK_ACCUMERROR_SUM, ARK_ACCUMERROR_AVG public :: FARKodeResize public :: FARKodeReset + public :: FARKodeInit public :: FARKodeCreateMRIStepInnerStepper public :: FARKodeSStolerances public :: FARKodeSVtolerances @@ -153,7 +154,6 @@ module farkode_mod public :: FARKodeSetPreRhsFn public :: FARKodeSetPostprocessStepFn public :: FARKodeSetPostprocessStageFn - public :: FARKodeAllocateInternalData public :: FARKodeSetNonlinearSolver public :: FARKodeSetLinear public :: FARKodeSetNonlinear @@ -523,6 +523,14 @@ function swigc_FARKodeReset(farg1, farg2, farg3) & integer(C_INT) :: fresult end function +function swigc_FARKodeInit(farg1) & +bind(C, name="_wrap_FARKodeInit") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +integer(C_INT) :: fresult +end function + function swigc_FARKodeCreateMRIStepInnerStepper(farg1, farg2) & bind(C, name="_wrap_FARKodeCreateMRIStepInnerStepper") & result(fresult) @@ -757,14 +765,6 @@ function swigc_FARKodeSetPostprocessStageFn(farg1, farg2) & integer(C_INT) :: fresult end function -function swigc_FARKodeAllocateInternalData(farg1) & -bind(C, name="_wrap_FARKodeAllocateInternalData") & -result(fresult) -use, intrinsic :: ISO_C_BINDING -type(C_PTR), value :: farg1 -integer(C_INT) :: fresult -end function - function swigc_FARKodeSetNonlinearSolver(farg1, farg2) & bind(C, name="_wrap_FARKodeSetNonlinearSolver") & result(fresult) @@ -2602,6 +2602,19 @@ function FARKodeReset(arkode_mem, tr, yr) & swig_result = fresult end function +function FARKodeInit(arkode_mem) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +integer(C_INT) :: fresult +type(C_PTR) :: farg1 + +farg1 = arkode_mem +fresult = swigc_FARKodeInit(farg1) +swig_result = fresult +end function + function FARKodeCreateMRIStepInnerStepper(arkode_mem, stepper) & result(swig_result) use, intrinsic :: ISO_C_BINDING @@ -3018,19 +3031,6 @@ function FARKodeSetPostprocessStageFn(arkode_mem, processstage) & swig_result = fresult end function -function FARKodeAllocateInternalData(arkode_mem) & -result(swig_result) -use, intrinsic :: ISO_C_BINDING -integer(C_INT) :: swig_result -type(C_PTR) :: arkode_mem -integer(C_INT) :: fresult -type(C_PTR) :: farg1 - -farg1 = arkode_mem -fresult = swigc_FARKodeAllocateInternalData(farg1) -swig_result = fresult -end function - function FARKodeSetNonlinearSolver(arkode_mem, nls) & result(swig_result) use, intrinsic :: ISO_C_BINDING From 9782320d100ed9191d2500ebf3988d9ffe498cb0 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 26 Mar 2026 09:00:40 -0400 Subject: [PATCH 230/298] Minor cleanup --- src/arkode/arkode_erkstep.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index 6dc07b4b69..f1217f1b6d 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -295,15 +295,12 @@ void erkStep_Free(ARKodeMem ark_mem) } /* free the RHS vectors */ - if (step_mem->F != NULL) + if (step_mem->F) { - for (j = 0; j < step_mem->stages; j++) - { - arkFreeVec(ark_mem, &step_mem->F[j]); - } - free(step_mem->F); + arkFreeVecArray(step_mem->stages, &(step_mem->F), + ark_mem->lrw1, &(ark_mem->lrw), ark_mem->liw1, + &(ark_mem->liw)); step_mem->F = NULL; - ark_mem->liw -= step_mem->stages; } /* free the reusable arrays for fused vector interface */ @@ -392,7 +389,7 @@ void erkStep_PrintMem(ARKodeMem ark_mem, FILE* outfile) With initialization types FIRST_INIT this routine: - sets/checks the ARK Butcher tables to be used - - allocates any memory that depends on the number of ARK + - allocates any memory that depends on the number of stages, method order, or solver options - sets the call_fullrhs flag @@ -461,7 +458,7 @@ int erkStep_Init(ARKodeMem ark_mem, SUNDIALS_MAYBE_UNUSED sunrealtype tout, return (ARK_ILL_INPUT); } - /* Allocate ARK RHS vector memory, update storage requirements */ + /* Allocate RHS vector memory, update storage requirements */ /* Allocate F[0] ... F[stages-1] if needed */ if (step_mem->F == NULL) { From c5ee9f66a67ffe222ae4183c3dcb821514f2281e Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 26 Mar 2026 09:03:25 -0400 Subject: [PATCH 231/298] Applied suggestions from PR review --- src/arkode/arkode_arkstep.c | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index aa51db375e..24efdc32dc 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1045,28 +1045,22 @@ int arkStep_Init(ARKodeMem ark_mem, SUNDIALS_MAYBE_UNUSED sunrealtype tout, /* Allocate Fe[0] ... Fe[stages-1] if needed */ if (step_mem->explicit) { - if (step_mem->Fe == NULL) + if (!arkAllocVecArray(step_mem->stages, ark_mem->ewt, &(step_mem->Fe), + ark_mem->lrw1, &(ark_mem->lrw), ark_mem->liw1, + &(ark_mem->liw))) { - if (!arkAllocVecArray(step_mem->stages, ark_mem->ewt, &(step_mem->Fe), - ark_mem->lrw1, &(ark_mem->lrw), ark_mem->liw1, - &(ark_mem->liw))) - { - return (ARK_MEM_FAIL); - } + return (ARK_MEM_FAIL); } } /* Allocate Fi[0] ... Fi[stages-1] if needed */ if (step_mem->implicit) { - if (step_mem->Fi == NULL) + if (!arkAllocVecArray(step_mem->stages, ark_mem->ewt, &(step_mem->Fi), + ark_mem->lrw1, &(ark_mem->lrw), ark_mem->liw1, + &(ark_mem->liw))) { - if (!arkAllocVecArray(step_mem->stages, ark_mem->ewt, &(step_mem->Fi), - ark_mem->lrw1, &(ark_mem->lrw), ark_mem->liw1, - &(ark_mem->liw))) - { - return (ARK_MEM_FAIL); - } + return (ARK_MEM_FAIL); } } @@ -1075,14 +1069,11 @@ int arkStep_Init(ARKodeMem ark_mem, SUNDIALS_MAYBE_UNUSED sunrealtype tout, if (ark_mem->relax_enabled && (step_mem->implicit || step_mem->mass_type == MASS_FIXED)) { - if (step_mem->z == NULL) + if (!arkAllocVecArray(step_mem->stages, ark_mem->ewt, &(step_mem->z), + ark_mem->lrw1, &(ark_mem->lrw), ark_mem->liw1, + &(ark_mem->liw))) { - if (!arkAllocVecArray(step_mem->stages, ark_mem->ewt, &(step_mem->z), - ark_mem->lrw1, &(ark_mem->lrw), ark_mem->liw1, - &(ark_mem->liw))) - { - return (ARK_MEM_FAIL); - } + return (ARK_MEM_FAIL); } } From bb735088a052a616c29ddab22355860d73b56f36 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 26 Mar 2026 09:11:16 -0400 Subject: [PATCH 232/298] Applied suggestions from PR review --- src/arkode/arkode_erkstep.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index f1217f1b6d..87aad91ae6 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -460,14 +460,11 @@ int erkStep_Init(ARKodeMem ark_mem, SUNDIALS_MAYBE_UNUSED sunrealtype tout, /* Allocate RHS vector memory, update storage requirements */ /* Allocate F[0] ... F[stages-1] if needed */ - if (step_mem->F == NULL) + if (!arkAllocVecArray(step_mem->stages, ark_mem->ewt, &(step_mem->F), + ark_mem->lrw1, &(ark_mem->lrw), ark_mem->liw1, + &(ark_mem->liw))) { - if (!arkAllocVecArray(step_mem->stages, ark_mem->ewt, &(step_mem->F), - ark_mem->lrw1, &(ark_mem->lrw), ark_mem->liw1, - &(ark_mem->liw))) - { - return (ARK_MEM_FAIL); - } + return (ARK_MEM_FAIL); } /* Allocate reusable arrays for fused vector interface */ From e2a34e01a88c2d14ea32ece68c5a61e011b7e328 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 26 Mar 2026 09:14:53 -0400 Subject: [PATCH 233/298] Forgot to 'save' before commit/push --- src/arkode/arkode.c | 2 +- src/arkode/arkode_mristep.c | 2 +- .../arkode/CXX_serial/ark_test_prealloc_arkstep.cpp | 4 ++-- .../arkode/CXX_serial/ark_test_prealloc_erkstep.cpp | 4 ++-- .../CXX_serial/ark_test_prealloc_forcingstep.cpp | 12 ++++++------ .../arkode/CXX_serial/ark_test_prealloc_lsrkstep.cpp | 4 ++-- .../arkode/CXX_serial/ark_test_prealloc_mristep.cpp | 8 ++++---- .../CXX_serial/ark_test_prealloc_splittingstep.cpp | 12 ++++++------ .../arkode/CXX_serial/ark_test_prealloc_sprkstep.cpp | 4 ++-- 9 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index feef969d23..da4f8d5ad6 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -1754,7 +1754,7 @@ int arkRwtSet(N_Vector y, N_Vector weight, void* data) init_type == FIRST_INIT), or (c) an ARKODE timestepper module re-initialization routine (with init_type == FIRST_INIT). - This should never by the user. + This should never be called by the user. The initialization type indicates if the values of internal counters should be reinitialized (FIRST_INIT) or retained diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 1dd1bccf62..79668e9e5d 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -2938,7 +2938,7 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* for adaptive computations, reset the inner integrator to the beginning of this step */ if (!ark_mem->fixedstep) { - retval = mriStepInnerStepper_Reset(step_mem->stepper, ark_mem->tn, + retval = mriStepInnerStepper_Reset(step_mem->stepper, ark_mem->tcur, ark_mem->ycur); if (retval != ARK_SUCCESS) { diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_arkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_arkstep.cpp index 02c7641e97..b669d62d3d 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_arkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_arkstep.cpp @@ -89,8 +89,8 @@ int main(int argc, char* argv[]) // Data preallocation if (preallocate_data) { - flag = ARKodeAllocateInternalData(arkode_mem); - if (check_flag(flag, "ARKodeAllocateInternalData")) { return 1; } + flag = ARKodeInit(arkode_mem); + if (check_flag(flag, "ARKodeInit")) { return 1; } } // Initial time and fist output time diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_erkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_erkstep.cpp index ffa2cd6187..924823b665 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_erkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_erkstep.cpp @@ -75,8 +75,8 @@ int main(int argc, char* argv[]) // Data preallocation if (preallocate_data) { - flag = ARKodeAllocateInternalData(arkode_mem); - if (check_flag(flag, "ARKodeAllocateInternalData")) { return 1; } + flag = ARKodeInit(arkode_mem); + if (check_flag(flag, "ARKodeInit")) { return 1; } } // Initial time and fist output time diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_forcingstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_forcingstep.cpp index 1c0bfd8cc9..5ae5384f45 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_forcingstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_forcingstep.cpp @@ -100,12 +100,12 @@ int main(int argc, char* argv[]) // Data preallocation (all steppers) if (preallocate_data) { - flag = ARKodeAllocateInternalData(stepper_1); - if (check_flag(flag, "ARKodeAllocateInternalData")) { return 1; } - flag = ARKodeAllocateInternalData(stepper_2); - if (check_flag(flag, "ARKodeAllocateInternalData")) { return 1; } - flag = ARKodeAllocateInternalData(arkode_mem); - if (check_flag(flag, "ARKodeAllocateInternalData")) { return 1; } + flag = ARKodeInit(stepper_1); + if (check_flag(flag, "ARKodeInit")) { return 1; } + flag = ARKodeInit(stepper_2); + if (check_flag(flag, "ARKodeInit")) { return 1; } + flag = ARKodeInit(arkode_mem); + if (check_flag(flag, "ARKodeInit")) { return 1; } } // Initial time and fist output time diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep.cpp index c6a347d302..7381c780a8 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep.cpp @@ -77,8 +77,8 @@ int main(int argc, char* argv[]) // Data preallocation if (preallocate_data) { - flag = ARKodeAllocateInternalData(arkode_mem); - if (check_flag(flag, "ARKodeAllocateInternalData")) { return 1; } + flag = ARKodeInit(arkode_mem); + if (check_flag(flag, "ARKodeInit")) { return 1; } } // Initial time and fist output time diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_mristep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_mristep.cpp index 5403c0706b..5622c7a3b6 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_mristep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_mristep.cpp @@ -114,10 +114,10 @@ int main(int argc, char* argv[]) // Data preallocation (all steppers) if (preallocate_data) { - flag = ARKodeAllocateInternalData(inner_arkode_mem); - if (check_flag(flag, "ARKodeAllocateInternalData")) { return 1; } - flag = ARKodeAllocateInternalData(arkode_mem); - if (check_flag(flag, "ARKodeAllocateInternalData")) { return 1; } + flag = ARKodeInit(inner_arkode_mem); + if (check_flag(flag, "ARKodeInit")) { return 1; } + flag = ARKodeInit(arkode_mem); + if (check_flag(flag, "ARKodeInit")) { return 1; } } // Initial time and fist output time diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_splittingstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_splittingstep.cpp index 0223505b43..d272f040d1 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_splittingstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_splittingstep.cpp @@ -100,12 +100,12 @@ int main(int argc, char* argv[]) // Data preallocation (all steppers) if (preallocate_data) { - flag = ARKodeAllocateInternalData(stepper_1); - if (check_flag(flag, "ARKodeAllocateInternalData")) { return 1; } - flag = ARKodeAllocateInternalData(stepper_2); - if (check_flag(flag, "ARKodeAllocateInternalData")) { return 1; } - flag = ARKodeAllocateInternalData(arkode_mem); - if (check_flag(flag, "ARKodeAllocateInternalData")) { return 1; } + flag = ARKodeInit(stepper_1); + if (check_flag(flag, "ARKodeInit")) { return 1; } + flag = ARKodeInit(stepper_2); + if (check_flag(flag, "ARKodeInit")) { return 1; } + flag = ARKodeInit(arkode_mem); + if (check_flag(flag, "ARKodeInit")) { return 1; } } // Initial time and fist output time diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_sprkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_sprkstep.cpp index 9037fb9776..5de2e79148 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_sprkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_sprkstep.cpp @@ -66,8 +66,8 @@ int main(int argc, char* argv[]) // Data preallocation if (preallocate_data) { - flag = ARKodeAllocateInternalData(arkode_mem); - if (check_flag(flag, "ARKodeAllocateInternalData")) { return 1; } + flag = ARKodeInit(arkode_mem); + if (check_flag(flag, "ARKodeInit")) { return 1; } } // Initial time and fist output time From 4bb003203ae42186b17b8408a78ff973adc84c95 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 26 Mar 2026 09:21:35 -0400 Subject: [PATCH 234/298] Formatting --- src/arkode/arkode_erkstep.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index 87aad91ae6..b662b92e6b 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -297,9 +297,8 @@ void erkStep_Free(ARKodeMem ark_mem) /* free the RHS vectors */ if (step_mem->F) { - arkFreeVecArray(step_mem->stages, &(step_mem->F), - ark_mem->lrw1, &(ark_mem->lrw), ark_mem->liw1, - &(ark_mem->liw)); + arkFreeVecArray(step_mem->stages, &(step_mem->F), ark_mem->lrw1, + &(ark_mem->lrw), ark_mem->liw1, &(ark_mem->liw)); step_mem->F = NULL; } From e88f9413a57139dd22b460584ba81a799828c3d6 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 26 Mar 2026 12:15:40 -0400 Subject: [PATCH 235/298] Created optional time-stepper routine to provide the initial step size (for now, only MRIStep provides this); if this is not provided then ARKODE will estimate the initial step using its standard approach. --- include/arkode/arkode.h | 2 ++ src/arkode/arkode.c | 14 +++++++++ src/arkode/arkode_impl.h | 3 ++ src/arkode/arkode_io.c | 1 + src/arkode/arkode_mristep.c | 50 ++++++++++++++++++++------------ src/arkode/arkode_mristep_impl.h | 1 + 6 files changed, 53 insertions(+), 18 deletions(-) diff --git a/include/arkode/arkode.h b/include/arkode/arkode.h index e4d302847f..d19d783db4 100644 --- a/include/arkode/arkode.h +++ b/include/arkode/arkode.h @@ -160,6 +160,8 @@ extern "C" { #define ARK_DEE_FAIL -59 +#define ARK_STEP_H0_FAIL -60 + #define ARK_UNRECOGNIZED_ERROR -99 /* ------------------------------ diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index da4f8d5ad6..265288bd15 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -1582,6 +1582,7 @@ ARKodeMem arkCreate(SUNContext sunctx) ark_mem->step_setstepdirection = NULL; ark_mem->step_setoptions = NULL; ark_mem->step_getnumlinsolvsetups = NULL; + ark_mem->step_H0 = NULL; ark_mem->step_setadaptcontroller = NULL; ark_mem->step_getestlocalerrors = NULL; ark_mem->step_getcurrentgamma = NULL; @@ -2189,6 +2190,19 @@ int arkInitialSetup(ARKodeMem ark_mem, sunrealtype tout) return ARK_ILL_INPUT; } + /* Call stepper-provided initial step size estimation routine to fill + ark_mem->hin, if applicable. */ + if (ark_mem->h0u == ZERO && ark_mem->hin == ZERO && + !ark_mem->fixedstep && ark_mem->step_H0) + { + if (ark_mem->step_H0(ark_mem, tout, &(ark_mem->hin))) + { + arkProcessError(ark_mem, ARK_STEP_H0_FAIL, __LINE__, __func__, __FILE__, + "Failure in timestepping module h0 calculation"); + return ARK_STEP_H0_FAIL; + } + } + /* If fullrhs will be called (to estimate initial step, explicit steppers, Hermite interpolation module, and possibly (but not always) arkRootCheck1), then ensure that it is provided, and space is allocated for fn. Otherwise, diff --git a/src/arkode/arkode_impl.h b/src/arkode/arkode_impl.h index 2c6636300d..c2ae78b5a3 100644 --- a/src/arkode/arkode_impl.h +++ b/src/arkode/arkode_impl.h @@ -232,6 +232,8 @@ typedef int (*ARKTimestepSetOptions)(ARKodeMem ark_mem, int* argidx, char* argv[ size_t offset, sunbooleantype* arg_used); /* time stepper interface functions -- temporal adaptivity */ +typedef int (*ARKTimestepComputeH0)(ARKodeMem ark_mem, sunrealtype tout, + sunrealtype *hin); typedef int (*ARKTimestepGetEstLocalErrors)(ARKodeMem ark_mem, N_Vector ele); typedef int (*ARKSetAdaptControllerFn)(ARKodeMem ark_mem, SUNAdaptController C); @@ -426,6 +428,7 @@ struct ARKodeMemRec /* Time stepper module -- temporal adaptivity */ sunbooleantype step_supports_adaptive; + ARKTimestepComputeH0 step_H0; ARKSetAdaptControllerFn step_setadaptcontroller; ARKTimestepGetEstLocalErrors step_getestlocalerrors; diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index 23e262ab59..2558ea2fdb 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -3306,6 +3306,7 @@ char* ARKodeGetReturnFlagName(long int flag) case ARK_SUNSTEPPER_ERR: sprintf(name, "ARK_SUNSTEPPER_ERR"); break; case ARK_STEP_DIRECTION_ERR: sprintf(name, "ARK_STEP_DIRECTION_ERR"); break; case ARK_UNRECOGNIZED_ERROR: sprintf(name, "ARK_UNRECOGNIZED_ERROR"); break; + case ARK_STEP_H0_FAIL: sprintf(name, "ARK_STEP_H0_FAIL"); break; default: sprintf(name, "NONE"); } diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 79668e9e5d..464f44d983 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1334,24 +1334,6 @@ int mriStep_Init(ARKodeMem ark_mem, sunrealtype tout, int init_type) __FILE__, "Timestep adaptivity enabled, but non-embedded MRI table specified"); return (ARK_ILL_INPUT); } - if (ark_mem->hin == ZERO) - { - /* tempv1 = fslow(t0, y0) */ - if (mriStep_SlowRHS(ark_mem, ark_mem->tn, ark_mem->yn, ark_mem->tempv1, - ARK_FULLRHS_START) != ARK_SUCCESS) - { - arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, - __FILE__, "error calling slow RHS function(s)"); - return (ARK_RHSFUNC_FAIL); - } - retval = mriStep_Hin(ark_mem, ark_mem->tn, tout, ark_mem->tempv1, - &(ark_mem->hin)); - if (retval != ARK_SUCCESS) - { - retval = arkHandleFailure(ark_mem, retval); - return (retval); - } - } } /* Perform additional setup for (H,tol) controller */ @@ -1380,6 +1362,38 @@ int mriStep_Init(ARKodeMem ark_mem, sunrealtype tout, int init_type) return (ARK_SUCCESS); } +/*------------------------------------------------------------------------------ + mriStep_ComputeH0: + + This utility routine computes the initial slow step size for MRI methods. + + It is assumed that the IVP is defined by multiple RHS functions, + y'(t) = f(t,y) = fs(t,y) + ff(t,y), + where fs corresponds to dynamics that should be evolved directly by MRIStep, + and ff corresponds to dynamics that will be evolved by an inner stepper. + ----------------------------------------------------------------------------*/ +int mriStep_ComputeH0(ARKodeMem ark_mem, sunrealtype tout, sunrealtype *hin) +{ + int retval; + + /* tempv1 = fs(t0, y0) */ + if (mriStep_SlowRHS(ark_mem, ark_mem->tn, ark_mem->yn, ark_mem->tempv1, + ARK_FULLRHS_START) != ARK_SUCCESS) + { + arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, + __FILE__, "error calling slow RHS function(s)"); + return (ARK_RHSFUNC_FAIL); + } + retval = mriStep_Hin(ark_mem, ark_mem->tn, tout, ark_mem->tempv1, hin); + if (retval != ARK_SUCCESS) + { + retval = arkHandleFailure(ark_mem, retval); + return (retval); + } + + return ARK_SUCCESS; +} + /*------------------------------------------------------------------------------ mriStep_FullRHS: diff --git a/src/arkode/arkode_mristep_impl.h b/src/arkode/arkode_mristep_impl.h index 66d76e08db..f1d1f789a2 100644 --- a/src/arkode/arkode_mristep_impl.h +++ b/src/arkode/arkode_mristep_impl.h @@ -279,6 +279,7 @@ void mriStep_Free(ARKodeMem ark_mem); void mriStep_PrintMem(ARKodeMem ark_mem, FILE* outfile); int mriStep_SetInnerForcing(ARKodeMem ark_mem, sunrealtype tshift, sunrealtype tscale, N_Vector* f, int nvecs); +int mriStep_ComputeH0(ARKodeMem ark_mem, sunrealtype tout, sunrealtype *hin); /* Internal utility routines */ int mriStep_AccessARKODEStepMem(void* arkode_mem, const char* fname, From e8e427de3bebc94640b5e3f408cbe0f788aa1baa Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 26 Mar 2026 22:57:38 -0400 Subject: [PATCH 236/298] Formatting --- src/arkode/arkode.c | 4 ++-- src/arkode/arkode_impl.h | 2 +- src/arkode/arkode_mristep.c | 22 +++++++++++----------- src/arkode/arkode_mristep_impl.h | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 265288bd15..f1a140aa27 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -2192,8 +2192,8 @@ int arkInitialSetup(ARKodeMem ark_mem, sunrealtype tout) /* Call stepper-provided initial step size estimation routine to fill ark_mem->hin, if applicable. */ - if (ark_mem->h0u == ZERO && ark_mem->hin == ZERO && - !ark_mem->fixedstep && ark_mem->step_H0) + if (ark_mem->h0u == ZERO && ark_mem->hin == ZERO && !ark_mem->fixedstep && + ark_mem->step_H0) { if (ark_mem->step_H0(ark_mem, tout, &(ark_mem->hin))) { diff --git a/src/arkode/arkode_impl.h b/src/arkode/arkode_impl.h index c2ae78b5a3..0ba473aee8 100644 --- a/src/arkode/arkode_impl.h +++ b/src/arkode/arkode_impl.h @@ -233,7 +233,7 @@ typedef int (*ARKTimestepSetOptions)(ARKodeMem ark_mem, int* argidx, char* argv[ /* time stepper interface functions -- temporal adaptivity */ typedef int (*ARKTimestepComputeH0)(ARKodeMem ark_mem, sunrealtype tout, - sunrealtype *hin); + sunrealtype* hin); typedef int (*ARKTimestepGetEstLocalErrors)(ARKodeMem ark_mem, N_Vector ele); typedef int (*ARKSetAdaptControllerFn)(ARKodeMem ark_mem, SUNAdaptController C); diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 464f44d983..e48b0f17cc 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1372,7 +1372,7 @@ int mriStep_Init(ARKodeMem ark_mem, sunrealtype tout, int init_type) where fs corresponds to dynamics that should be evolved directly by MRIStep, and ff corresponds to dynamics that will be evolved by an inner stepper. ----------------------------------------------------------------------------*/ -int mriStep_ComputeH0(ARKodeMem ark_mem, sunrealtype tout, sunrealtype *hin) +int mriStep_ComputeH0(ARKodeMem ark_mem, sunrealtype tout, sunrealtype* hin) { int retval; @@ -1380,16 +1380,16 @@ int mriStep_ComputeH0(ARKodeMem ark_mem, sunrealtype tout, sunrealtype *hin) if (mriStep_SlowRHS(ark_mem, ark_mem->tn, ark_mem->yn, ark_mem->tempv1, ARK_FULLRHS_START) != ARK_SUCCESS) { - arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, - __FILE__, "error calling slow RHS function(s)"); - return (ARK_RHSFUNC_FAIL); - } - retval = mriStep_Hin(ark_mem, ark_mem->tn, tout, ark_mem->tempv1, hin); - if (retval != ARK_SUCCESS) - { - retval = arkHandleFailure(ark_mem, retval); - return (retval); - } + arkProcessError(ark_mem, ARK_RHSFUNC_FAIL, __LINE__, __func__, __FILE__, + "error calling slow RHS function(s)"); + return (ARK_RHSFUNC_FAIL); + } + retval = mriStep_Hin(ark_mem, ark_mem->tn, tout, ark_mem->tempv1, hin); + if (retval != ARK_SUCCESS) + { + retval = arkHandleFailure(ark_mem, retval); + return (retval); + } return ARK_SUCCESS; } diff --git a/src/arkode/arkode_mristep_impl.h b/src/arkode/arkode_mristep_impl.h index f1d1f789a2..984d65dc44 100644 --- a/src/arkode/arkode_mristep_impl.h +++ b/src/arkode/arkode_mristep_impl.h @@ -279,7 +279,7 @@ void mriStep_Free(ARKodeMem ark_mem); void mriStep_PrintMem(ARKodeMem ark_mem, FILE* outfile); int mriStep_SetInnerForcing(ARKodeMem ark_mem, sunrealtype tshift, sunrealtype tscale, N_Vector* f, int nvecs); -int mriStep_ComputeH0(ARKodeMem ark_mem, sunrealtype tout, sunrealtype *hin); +int mriStep_ComputeH0(ARKodeMem ark_mem, sunrealtype tout, sunrealtype* hin); /* Internal utility routines */ int mriStep_AccessARKODEStepMem(void* arkode_mem, const char* fname, From 945be32267b3d6a19f23abf42c9a3623c0ed048f Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 26 Mar 2026 23:44:23 -0400 Subject: [PATCH 237/298] Swig and Python bindings --- bindings/sundials4py/arkode/arkode_generated.hpp | 7 ++++--- src/arkode/fmod_int32/farkode_mod.f90 | 1 + src/arkode/fmod_int64/farkode_mod.f90 | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bindings/sundials4py/arkode/arkode_generated.hpp b/bindings/sundials4py/arkode/arkode_generated.hpp index 3e91c82c29..eed3f7853b 100644 --- a/bindings/sundials4py/arkode/arkode_generated.hpp +++ b/bindings/sundials4py/arkode/arkode_generated.hpp @@ -83,6 +83,7 @@ m.attr("ARK_ADJ_CHECKPOINT_FAIL") = -56; m.attr("ARK_ADJ_RECOMPUTE_FAIL") = -57; m.attr("ARK_SUNADJSTEPPER_ERR") = -58; m.attr("ARK_DEE_FAIL") = -59; +m.attr("ARK_STEP_H0_FAIL") = -60; m.attr("ARK_UNRECOGNIZED_ERROR") = -99; auto pyEnumARKRelaxSolver = nb::enum_(m, "ARKRelaxSolver", @@ -110,6 +111,9 @@ auto pyEnumARKAccumError = m.def("ARKodeReset", ARKodeReset, nb::arg("arkode_mem"), nb::arg("tR"), nb::arg("yR")); +m.def("ARKodeInit", ARKodeInit, nb::arg("arkode_mem"), + "Optional data allocation function"); + m.def( "ARKodeCreateMRIStepInnerStepper", [](void* arkode_mem) @@ -205,9 +209,6 @@ m.def("ARKodeSetFixedStep", ARKodeSetFixedStep, nb::arg("arkode_mem"), m.def("ARKodeSetStepDirection", ARKodeSetStepDirection, nb::arg("arkode_mem"), nb::arg("stepdir")); -m.def("ARKodeAllocateInternalData", ARKodeAllocateInternalData, - nb::arg("arkode_mem")); - m.def("ARKodeSetNonlinearSolver", ARKodeSetNonlinearSolver, nb::arg("arkode_mem"), nb::arg("NLS")); diff --git a/src/arkode/fmod_int32/farkode_mod.f90 b/src/arkode/fmod_int32/farkode_mod.f90 index e2c524241e..536c45fbc2 100644 --- a/src/arkode/fmod_int32/farkode_mod.f90 +++ b/src/arkode/fmod_int32/farkode_mod.f90 @@ -108,6 +108,7 @@ module farkode_mod integer(C_INT), parameter, public :: ARK_ADJ_RECOMPUTE_FAIL = -57_C_INT integer(C_INT), parameter, public :: ARK_SUNADJSTEPPER_ERR = -58_C_INT integer(C_INT), parameter, public :: ARK_DEE_FAIL = -59_C_INT + integer(C_INT), parameter, public :: ARK_STEP_H0_FAIL = -60_C_INT integer(C_INT), parameter, public :: ARK_UNRECOGNIZED_ERROR = -99_C_INT ! enum ARKRelaxSolver enum, bind(c) diff --git a/src/arkode/fmod_int64/farkode_mod.f90 b/src/arkode/fmod_int64/farkode_mod.f90 index 11f6080945..ba9cd955bf 100644 --- a/src/arkode/fmod_int64/farkode_mod.f90 +++ b/src/arkode/fmod_int64/farkode_mod.f90 @@ -108,6 +108,7 @@ module farkode_mod integer(C_INT), parameter, public :: ARK_ADJ_RECOMPUTE_FAIL = -57_C_INT integer(C_INT), parameter, public :: ARK_SUNADJSTEPPER_ERR = -58_C_INT integer(C_INT), parameter, public :: ARK_DEE_FAIL = -59_C_INT + integer(C_INT), parameter, public :: ARK_STEP_H0_FAIL = -60_C_INT integer(C_INT), parameter, public :: ARK_UNRECOGNIZED_ERROR = -99_C_INT ! enum ARKRelaxSolver enum, bind(c) From 630d84980851d60b59f9889a2af131a43b840d06 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 26 Mar 2026 23:56:10 -0400 Subject: [PATCH 238/298] Removed unused variable --- src/arkode/arkode_erkstep.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index b662b92e6b..6b50189e44 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -272,7 +272,6 @@ int erkStep_Resize(ARKodeMem ark_mem, N_Vector y0, ---------------------------------------------------------------*/ void erkStep_Free(ARKodeMem ark_mem) { - int j; sunindextype Bliw, Blrw; ARKodeERKStepMem step_mem; From 47e60378f50407fc2f0e52cc17bcedca019b6923 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 27 Mar 2026 13:27:59 -0400 Subject: [PATCH 239/298] Added SUNDIALS_MAYBE_UNUSED --- src/arkode/arkode_mristep.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index e48b0f17cc..8f9904eac0 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -933,7 +933,9 @@ int mriStep_GetGammas(ARKodeMem ark_mem, sunrealtype* gamma, sunrealtype* gamrat With other initialization types, this routine does nothing. ---------------------------------------------------------------*/ -int mriStep_Init(ARKodeMem ark_mem, sunrealtype tout, int init_type) +int mriStep_Init(ARKodeMem ark_mem, + SUNDIALS_MAYBE_UNUSED sunrealtype tout, + int init_type) { ARKodeMRIStepMem step_mem; int retval, j; From 06776898b9b9e7c4d3b6c85217934bd75507643b Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 27 Mar 2026 13:38:26 -0400 Subject: [PATCH 240/298] Removed tout from the internal ARKTimestepInitFn type --- src/arkode/arkode.c | 2 +- src/arkode/arkode_arkstep.c | 3 +-- src/arkode/arkode_arkstep_impl.h | 2 +- src/arkode/arkode_erkstep.c | 3 +-- src/arkode/arkode_erkstep_impl.h | 2 +- src/arkode/arkode_forcingstep.c | 3 +-- src/arkode/arkode_impl.h | 3 +-- src/arkode/arkode_io.c | 2 +- src/arkode/arkode_lsrkstep.c | 3 +-- src/arkode/arkode_lsrkstep_impl.h | 2 +- src/arkode/arkode_mristep.c | 4 +--- src/arkode/arkode_mristep_impl.h | 2 +- src/arkode/arkode_splittingstep.c | 4 +--- src/arkode/arkode_sprkstep.c | 3 +-- src/arkode/arkode_sprkstep_impl.h | 2 +- 15 files changed, 15 insertions(+), 25 deletions(-) diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index f1a140aa27..e6f4914d3d 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -2105,7 +2105,7 @@ int arkInitialSetup(ARKodeMem ark_mem, sunrealtype tout) "Time stepper module is missing"); return (ARK_ILL_INPUT); } - retval = ark_mem->step_init(ark_mem, tout, ark_mem->init_type); + retval = ark_mem->step_init(ark_mem, ark_mem->init_type); if (retval != ARK_SUCCESS) { arkProcessError(ark_mem, retval, __LINE__, __func__, __FILE__, diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index 24efdc32dc..2c4ac75951 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -947,8 +947,7 @@ int arkStep_GetGammas(ARKodeMem ark_mem, sunrealtype* gamma, sunrealtype* gamrat on ARKStep solver options) - updates the call_fullrhs flag if necessary ---------------------------------------------------------------*/ -int arkStep_Init(ARKodeMem ark_mem, SUNDIALS_MAYBE_UNUSED sunrealtype tout, - int init_type) +int arkStep_Init(ARKodeMem ark_mem, int init_type) { ARKodeARKStepMem step_mem; int retval; diff --git a/src/arkode/arkode_arkstep_impl.h b/src/arkode/arkode_arkstep_impl.h index 48736e3e1c..9987bcccf6 100644 --- a/src/arkode/arkode_arkstep_impl.h +++ b/src/arkode/arkode_arkstep_impl.h @@ -190,7 +190,7 @@ int arkStep_AttachMasssol(ARKodeMem ark_mem, ARKMassInitFn minit, SUNLinearSolver_Type msolve_type, void* mass_mem); void arkStep_DisableLSetup(ARKodeMem ark_mem); void arkStep_DisableMSetup(ARKodeMem ark_mem); -int arkStep_Init(ARKodeMem ark_mem, sunrealtype tout, int init_type); +int arkStep_Init(ARKodeMem ark_mem, int init_type); void* arkStep_GetLmem(ARKodeMem ark_mem); void* arkStep_GetMassMem(ARKodeMem ark_mem); ARKRhsFn arkStep_GetImplicitRHS(ARKodeMem ark_mem); diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index 6b50189e44..391afbe9c4 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -393,8 +393,7 @@ void erkStep_PrintMem(ARKodeMem ark_mem, FILE* outfile) With other initialization types, this routine does nothing. ---------------------------------------------------------------*/ -int erkStep_Init(ARKodeMem ark_mem, SUNDIALS_MAYBE_UNUSED sunrealtype tout, - int init_type) +int erkStep_Init(ARKodeMem ark_mem, int init_type) { ARKodeERKStepMem step_mem; sunbooleantype reset_efun; diff --git a/src/arkode/arkode_erkstep_impl.h b/src/arkode/arkode_erkstep_impl.h index 804d958169..646532c8b2 100644 --- a/src/arkode/arkode_erkstep_impl.h +++ b/src/arkode/arkode_erkstep_impl.h @@ -84,7 +84,7 @@ typedef struct ARKodeERKStepMemRec ===============================================================*/ /* Interface routines supplied to ARKODE */ -int erkStep_Init(ARKodeMem ark_mem, sunrealtype tout, int init_type); +int erkStep_Init(ARKodeMem ark_mem, int init_type); int erkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, int mode); int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr); diff --git a/src/arkode/arkode_forcingstep.c b/src/arkode/arkode_forcingstep.c index 8eb48242ca..bb8ea8e819 100644 --- a/src/arkode/arkode_forcingstep.c +++ b/src/arkode/arkode_forcingstep.c @@ -65,8 +65,7 @@ static int forcingStep_AccessARKODEStepMem(void* arkode_mem, const char* fname, This routine is called just prior to performing internal time steps (after all user "set" routines have been called) from within arkInitialSetup. ----------------------------------------------------------------------------*/ -static int forcingStep_Init(ARKodeMem ark_mem, - SUNDIALS_MAYBE_UNUSED sunrealtype tout, int init_type) +static int forcingStep_Init(ARKodeMem ark_mem, int init_type) { ARKodeForcingStepMem step_mem = NULL; int retval = forcingStep_AccessStepMem(ark_mem, __func__, &step_mem); diff --git a/src/arkode/arkode_impl.h b/src/arkode/arkode_impl.h index 0ba473aee8..23a89d8e7a 100644 --- a/src/arkode/arkode_impl.h +++ b/src/arkode/arkode_impl.h @@ -205,8 +205,7 @@ typedef int (*ARKMassSolveFn)(ARKodeMem ark_mem, N_Vector b, typedef int (*ARKMassFreeFn)(ARKodeMem ark_mem); /* time stepper interface functions -- general */ -typedef int (*ARKTimestepInitFn)(ARKodeMem ark_mem, sunrealtype tout, - int init_type); +typedef int (*ARKTimestepInitFn)(ARKodeMem ark_mem, int init_type); typedef int (*ARKTimestepFullRHSFn)(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, int mode); typedef int (*ARKTimestepStepFn)(ARKodeMem ark_mem, sunrealtype* dsm, int* nflag); diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index 2558ea2fdb..d629b588cd 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -2324,7 +2324,7 @@ int ARKodeInit(void* arkode_mem) "Time stepper module is missing"); return (ARK_ILL_INPUT); } - retval = ark_mem->step_init(ark_mem, ZERO, ALLOC_INIT); + retval = ark_mem->step_init(ark_mem, ALLOC_INIT); if (retval != ARK_SUCCESS) { arkProcessError(ark_mem, retval, __LINE__, __func__, __FILE__, diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index c856bc5062..e46d8d9953 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -327,8 +327,7 @@ int lsrkStep_ReInit_Commons(void* arkode_mem, ARKRhsFn rhs, sunrealtype t0, With other initialization types, this routine does nothing. ---------------------------------------------------------------*/ -int lsrkStep_Init(ARKodeMem ark_mem, SUNDIALS_MAYBE_UNUSED sunrealtype tout, - int init_type) +int lsrkStep_Init(ARKodeMem ark_mem, int init_type) { ARKodeLSRKStepMem step_mem; int retval; diff --git a/src/arkode/arkode_lsrkstep_impl.h b/src/arkode/arkode_lsrkstep_impl.h index f7113962ac..6b943c128f 100644 --- a/src/arkode/arkode_lsrkstep_impl.h +++ b/src/arkode/arkode_lsrkstep_impl.h @@ -189,7 +189,7 @@ void* lsrkStep_Create_Commons(ARKRhsFn rhs, sunrealtype t0, N_Vector y0, SUNContext sunctx); int lsrkStep_ReInit_Commons(void* arkode_mem, ARKRhsFn rhs, sunrealtype t0, N_Vector y0); -int lsrkStep_Init(ARKodeMem ark_mem, sunrealtype tout, int init_type); +int lsrkStep_Init(ARKodeMem ark_mem, int init_type); int lsrkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, int mode); int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr); diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 8f9904eac0..5ca845cedf 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -933,9 +933,7 @@ int mriStep_GetGammas(ARKodeMem ark_mem, sunrealtype* gamma, sunrealtype* gamrat With other initialization types, this routine does nothing. ---------------------------------------------------------------*/ -int mriStep_Init(ARKodeMem ark_mem, - SUNDIALS_MAYBE_UNUSED sunrealtype tout, - int init_type) +int mriStep_Init(ARKodeMem ark_mem, int init_type) { ARKodeMRIStepMem step_mem; int retval, j; diff --git a/src/arkode/arkode_mristep_impl.h b/src/arkode/arkode_mristep_impl.h index 984d65dc44..073ef39c5d 100644 --- a/src/arkode/arkode_mristep_impl.h +++ b/src/arkode/arkode_mristep_impl.h @@ -224,7 +224,7 @@ int mriStep_AttachLinsol(ARKodeMem ark_mem, ARKLinsolInitFn linit, ARKLinsolFreeFn lfree, SUNLinearSolver_Type lsolve_type, void* lmem); void mriStep_DisableLSetup(ARKodeMem ark_mem); -int mriStep_Init(ARKodeMem ark_mem, sunrealtype tout, int init_type); +int mriStep_Init(ARKodeMem ark_mem, int init_type); void* mriStep_GetLmem(ARKodeMem ark_mem); ARKRhsFn mriStep_GetImplicitRHS(ARKodeMem ark_mem); int mriStep_GetGammas(ARKodeMem ark_mem, sunrealtype* gamma, sunrealtype* gamrat, diff --git a/src/arkode/arkode_splittingstep.c b/src/arkode/arkode_splittingstep.c index 83c4ead1d2..8ef4befa38 100644 --- a/src/arkode/arkode_splittingstep.c +++ b/src/arkode/arkode_splittingstep.c @@ -119,9 +119,7 @@ static int splittingStep_SetCoefficients(ARKodeMem ark_mem, With other initialization types, this routine does nothing. ----------------------------------------------------------------------------*/ -static int splittingStep_Init(ARKodeMem ark_mem, - SUNDIALS_MAYBE_UNUSED sunrealtype tout, - int init_type) +static int splittingStep_Init(ARKodeMem ark_mem, int init_type) { ARKodeSplittingStepMem step_mem = NULL; int retval = splittingStep_AccessStepMem(ark_mem, __func__, &step_mem); diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index 5b171601af..7265d96b72 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -361,8 +361,7 @@ void sprkStep_Free(ARKodeMem ark_mem) With initialization type RESET_INIT, this routine does nothing. ---------------------------------------------------------------*/ -int sprkStep_Init(ARKodeMem ark_mem, SUNDIALS_MAYBE_UNUSED sunrealtype tout, - int init_type) +int sprkStep_Init(ARKodeMem ark_mem, int init_type) { ARKodeSPRKStepMem step_mem = NULL; int retval = 0; diff --git a/src/arkode/arkode_sprkstep_impl.h b/src/arkode/arkode_sprkstep_impl.h index e858659a29..1f59bc7968 100644 --- a/src/arkode/arkode_sprkstep_impl.h +++ b/src/arkode/arkode_sprkstep_impl.h @@ -70,7 +70,7 @@ typedef struct ARKodeSPRKStepMemRec ===============================================================*/ /* Interface routines supplied to ARKODE */ -int sprkStep_Init(ARKodeMem ark_mem, sunrealtype tout, int init_type); +int sprkStep_Init(ARKodeMem ark_mem, int init_type); int sprkStep_FullRHS(ARKodeMem ark_mem, sunrealtype t, N_Vector y, N_Vector f, int mode); int sprkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr); From 2e232ae32564abc84d32d501622f57f31a3ade48 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 27 Mar 2026 14:18:46 -0400 Subject: [PATCH 241/298] Updated answer and .out files after fix to automated slow MRI initial step calculation --- .../arkode/CXX_serial/ark_kpr_nestedmri.out | 52 +++++------ .../F2003_serial/ark_kpr_nestedmri_f2003.out | 88 +++++++++---------- test/answers | 2 +- .../ark_test_prealloc_mristep_1.out | 52 +++++------ 4 files changed, 97 insertions(+), 97 deletions(-) diff --git a/examples/arkode/CXX_serial/ark_kpr_nestedmri.out b/examples/arkode/CXX_serial/ark_kpr_nestedmri.out index 22215381b7..648a96fad9 100644 --- a/examples/arkode/CXX_serial/ark_kpr_nestedmri.out +++ b/examples/arkode/CXX_serial/ark_kpr_nestedmri.out @@ -20,32 +20,32 @@ Adaptive nested multirate nonlinear Kvaerno-Prothero-Robinson test problem: t u v w uerr verr werr ---------------------------------------------------------------------------- 0.000000 1.581139 1.732051 1.732051 0.00e+00 0.00e+00 0.00e+00 - 0.250000 1.575354 1.691373 0.981242 1.66e-06 8.95e-09 3.55e-06 - 0.500000 1.560212 1.084577 1.207273 6.82e-05 1.38e-04 3.80e-03 - 0.750000 1.535821 1.467790 1.255007 1.28e-04 7.91e-05 2.34e-03 - 1.000000 1.503887 1.643393 1.535655 1.19e-05 1.50e-07 8.57e-06 - 1.250000 1.465906 1.089933 1.084638 2.13e-05 4.07e-06 4.27e-04 - 1.500000 1.423230 1.425918 1.339651 2.88e-05 2.08e-06 1.98e-04 - 1.750000 1.378129 1.705806 1.350088 1.26e-05 1.50e-05 6.77e-04 - 2.000000 1.333355 1.542436 0.911207 1.32e-06 4.82e-07 7.82e-04 - 2.250000 1.291538 1.307773 1.107536 2.10e-06 1.93e-07 2.04e-04 - 2.500000 1.255099 1.035658 0.925054 4.43e-05 2.74e-05 1.76e-03 - 2.750000 1.228934 1.090949 1.585342 7.30e-06 5.13e-06 2.16e-04 - 3.000000 1.216069 1.092744 1.119044 3.95e-05 9.34e-07 5.79e-04 - 3.250000 1.215536 1.240139 1.634277 2.40e-04 7.82e-05 7.13e-04 - 3.500000 1.230684 1.411798 1.537523 5.41e-05 1.90e-07 2.36e-04 - 3.750000 1.255244 1.364045 1.405429 1.12e-04 7.09e-05 5.74e-04 - 4.000000 1.287688 0.973252 1.683598 2.91e-04 1.74e-03 1.45e-02 - 4.250000 1.327308 1.671986 0.948516 3.31e-06 4.19e-07 2.30e-05 - 4.500000 1.371496 1.600815 1.478302 4.85e-05 1.47e-06 1.99e-04 - 4.750000 1.417738 1.510886 1.158938 5.22e-04 4.80e-05 5.63e-04 - 5.000000 1.460953 1.470134 1.643591 1.16e-05 9.98e-06 6.83e-04 + 0.250000 1.575488 1.691408 0.974824 1.07e-06 3.35e-06 1.64e-03 + 0.500000 1.560021 1.082827 1.200536 3.89e-06 5.82e-08 4.38e-06 + 0.750000 1.535586 1.465656 1.249481 2.84e-06 3.08e-07 1.29e-04 + 1.000000 1.503452 1.640090 1.522324 4.72e-05 7.33e-06 7.41e-04 + 1.250000 1.465112 1.081586 1.071820 5.67e-05 3.81e-05 1.39e-03 + 1.500000 1.422716 1.419663 1.341169 3.04e-05 5.51e-05 1.46e-03 + 1.750000 1.377280 1.700794 1.344496 2.04e-04 9.51e-05 4.59e-04 + 2.000000 1.332798 1.537273 0.898640 9.68e-06 1.77e-06 1.71e-04 + 2.250000 1.291076 1.301774 1.097570 2.16e-05 1.72e-07 5.20e-04 + 2.500000 1.255431 1.030460 0.948586 2.49e-06 3.70e-06 5.07e-04 + 2.750000 1.229888 1.091033 1.598956 2.01e-05 1.12e-05 2.98e-04 + 3.000000 1.216557 1.096587 1.128121 1.46e-05 4.11e-06 2.45e-04 + 3.250000 1.216056 1.244834 1.639460 1.95e-05 3.11e-07 6.47e-06 + 3.500000 1.230832 1.416352 1.541911 1.72e-05 1.38e-07 2.33e-06 + 3.750000 1.255359 1.368416 1.405133 2.51e-05 3.31e-06 6.26e-04 + 4.000000 1.287946 0.978906 1.689817 6.37e-05 2.01e-05 1.88e-03 + 4.250000 1.328133 1.676523 0.958706 4.29e-05 2.08e-05 1.22e-03 + 4.500000 1.372003 1.605571 1.481984 8.80e-07 3.69e-08 4.35e-08 + 4.750000 1.417588 1.515528 1.161513 1.65e-05 2.22e-05 6.06e-04 + 5.000000 1.461234 1.473916 1.644001 4.45e-05 4.10e-05 1.42e-03 ---------------------------------------------------------------------------- Final Solver Statistics: - Slow steps = 242 (attempts = 312, fails = 70, innerfails = 0) - Intermediate steps = 2982 (attempts = 3169, fails = 187, innerfails = 0) - Fast steps = 84773 (attempts = 119399, fails = 34626) - u error = 0.000111673, v error = 0.000145887, total error = 0.00206261 - Relative accuracy = 256.919 - Total RHS evals: Fse = 1491, Fsi = 0, Fme = 15901, Fmi = 0, Ff = 484178 + Slow steps = 269 (attempts = 345, fails = 76, innerfails = 0) + Intermediate steps = 3096 (attempts = 3260, fails = 164, innerfails = 0) + Fast steps = 80748 (attempts = 112929, fails = 32181) + u error = 8.72633e-05, v error = 0.0001079, total error = 0.00166232 + Relative accuracy = 160.219 + Total RHS evals: Fse = 1651, Fsi = 0, Fme = 16409, Fmi = 0, Ff = 458512 diff --git a/examples/arkode/F2003_serial/ark_kpr_nestedmri_f2003.out b/examples/arkode/F2003_serial/ark_kpr_nestedmri_f2003.out index 9a6dee1c1e..d907502708 100644 --- a/examples/arkode/F2003_serial/ark_kpr_nestedmri_f2003.out +++ b/examples/arkode/F2003_serial/ark_kpr_nestedmri_f2003.out @@ -1,41 +1,41 @@ t u v w u err v err w err ----------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.000000000000000E+00 1.581138830084190E+00 1.732050807568877E+00 1.732050807568877E+00 0.000000000000000E+00 0.000000000000000E+00 0.000000000000000E+00 - 2.500000000000000E-01 1.575354291246483E+00 1.691373126460135E+00 9.812421429231667E-01 8.614969168394548E-04 2.345080409599243E-03 2.419407022538012E-02 - 5.000000000000000E-01 1.560212294026093E+00 1.084576713219838E+00 1.207272508262092E+00 1.450691686633254E-03 9.735026934536206E-03 2.997874834915581E-02 - 7.500000000000000E-01 1.535821076747637E+00 1.467789591527085E+00 1.255006960906892E+00 2.309097989505071E-03 1.257411189143820E-02 3.526051581286360E-02 - 1.000000000000000E+00 1.503887082550468E+00 1.643393179226049E+00 1.535654981910508E+00 2.814995809440779E-03 1.525150440227940E-02 3.101170591704605E-02 - 1.250000000000000E+00 1.465905643537446E+00 1.089933329662596E+00 1.084638429275984E+00 2.992304312449567E-03 2.789958266923698E-02 4.466716150204997E-02 - 1.500000000000000E+00 1.423229745439111E+00 1.425917760680276E+00 1.339651334373588E+00 3.433705005265075E-03 2.577827207164485E-02 4.443172398449646E-02 - 1.750000000000000E+00 1.378128849503047E+00 1.705806280347786E+00 1.350088006444161E+00 4.215887592317724E-03 2.584462291202727E-02 5.098823106377615E-02 - 2.000000000000000E+00 1.333355012586035E+00 1.542435734349903E+00 9.112070209266151E-01 5.273607206037756E-03 3.464627842147050E-02 9.439169201282838E-02 - 2.250000000000000E+00 1.291537836005878E+00 1.307772985752775E+00 1.107535568317707E+00 6.889362045145342E-03 5.013750111947490E-02 9.666829292882495E-02 - 2.500000000000000E+00 1.255098553621510E+00 1.035657788229420E+00 9.250541164345283E-01 9.586463379376520E-03 7.658378239399588E-02 1.565644027369089E-01 - 2.750000000000000E+00 1.228934066560649E+00 1.090949490777971E+00 1.585342217044049E+00 1.116625626963286E-02 9.140812086615169E-02 1.042801863250207E-01 - 3.000000000000000E+00 1.216068981183502E+00 1.092743725552892E+00 1.119044383134361E+00 1.071696253275123E-02 1.079411365878937E-01 1.262647701802380E-01 - 3.250000000000000E+00 1.215535683841296E+00 1.240138856057141E+00 1.634277111133497E+00 1.040687678694474E-02 9.750154196508354E-02 6.240302147277599E-02 - 3.500000000000000E+00 1.230683988799683E+00 1.411798205839374E+00 1.537522817681417E+00 6.963641325548942E-03 8.309509943358773E-02 4.096413595028614E-02 - 3.750000000000000E+00 1.255243587698301E+00 1.364045071871572E+00 1.405428626185899E+00 5.597528910060712E-03 7.816284969822607E-02 3.565721522248300E-02 - 4.000000000000000E+00 1.287688262349332E+00 9.732518195985076E-01 1.683597645865881E+00 5.825629948773337E-03 9.562343869545264E-02 3.551174121668166E-02 - 4.250000000000000E+00 1.327308264061362E+00 1.671985598563317E+00 9.485164357756218E-01 5.716962647833945E-03 5.329655557719581E-02 5.599299185700490E-02 - 4.500000000000000E+00 1.371496246048615E+00 1.600815391511029E+00 1.478302429626823E+00 4.949212472938891E-03 4.982578455617181E-02 2.187914362084453E-02 - 4.750000000000000E+00 1.417737644421425E+00 1.510885615348590E+00 1.158937763182584E+00 3.107553495641957E-03 4.466421552633992E-02 8.800123298265516E-03 - 5.000000000000000E+00 1.460953298338492E+00 1.470134387042476E+00 1.643590770857166E+00 2.546306284485933E-03 3.678699021167353E-02 1.189678851420295E-03 + 2.500000000000000E-01 1.575488099703589E+00 1.691408071908898E+00 9.748237878831466E-01 7.276884597327005E-04 2.310134960835653E-03 3.061242526540020E-02 + 5.000000000000000E-01 1.560020851877072E+00 1.082826622715322E+00 1.200536353412202E+00 1.642133835654480E-03 1.148511743905178E-02 3.671490319904636E-02 + 7.500000000000000E-01 1.535585832662415E+00 1.465656401589849E+00 1.249480978647192E+00 2.544342074726647E-03 1.470730182867408E-02 4.078649807256340E-02 + 1.000000000000000E+00 1.503452096019860E+00 1.640090126930339E+00 1.522323950257723E+00 3.249982340049362E-03 1.855455669798989E-02 4.434273756983043E-02 + 1.250000000000000E+00 1.465111759823188E+00 1.081586298466720E+00 1.071820476875938E+00 3.786188026707826E-03 3.624661386511230E-02 5.748511390209621E-02 + 1.500000000000000E+00 1.422715889421813E+00 1.419662849914407E+00 1.341169082801302E+00 3.947561022562329E-03 3.203318283751422E-02 4.291397555678222E-02 + 1.750000000000000E+00 1.377279656722405E+00 1.700794200939152E+00 1.344495890440867E+00 5.065080372959496E-03 3.085670232066140E-02 5.658034706707049E-02 + 2.000000000000000E+00 1.332797853110247E+00 1.537272721066875E+00 8.986397818013304E-01 5.830766681825361E-03 3.980929170449787E-02 1.069589311381131E-01 + 2.250000000000000E+00 1.291075514971698E+00 1.301773905654803E+00 1.097569723073454E+00 7.351683079324767E-03 5.613658121744680E-02 1.066341381730778E-01 + 2.500000000000000E+00 1.255431340976248E+00 1.030459749076821E+00 9.485863115238685E-01 9.253676024639113E-03 8.178182154659486E-02 1.330322076475686E-01 + 2.750000000000000E+00 1.229887628043804E+00 1.091033469768824E+00 1.598955837439798E+00 1.021269478647691E-02 9.132414187529903E-02 9.066656592927202E-02 + 3.000000000000000E+00 1.216557007406716E+00 1.096587083257220E+00 1.128120604628566E+00 1.022893630953736E-02 1.040977788835651E-01 1.171885486860338E-01 + 3.250000000000000E+00 1.216056359156953E+00 1.244833801812930E+00 1.639460193231149E+00 9.886201471287270E-03 9.280659620929388E-02 5.721993937512360E-02 + 3.500000000000000E+00 1.230832033956452E+00 1.416351850214761E+00 1.541910614060546E+00 6.815596168779692E-03 7.854145505820065E-02 3.657633957115669E-02 + 3.750000000000000E+00 1.255359156981547E+00 1.368415999446642E+00 1.405133208686316E+00 5.481959626814525E-03 7.379192212315555E-02 3.595263272206695E-02 + 4.000000000000000E+00 1.287946342419833E+00 9.789060781538605E-01 1.689817470809373E+00 5.567549878272127E-03 8.996918014009969E-02 2.929191627318994E-02 + 4.250000000000000E+00 1.328132640201319E+00 1.676522964480704E+00 9.587059007582152E-01 4.892586507876828E-03 4.875918965980852E-02 4.580352687441158E-02 + 4.500000000000000E+00 1.372003486823825E+00 1.605570817778762E+00 1.481983814873412E+00 4.441971697729086E-03 4.507035828843975E-02 1.819775837425586E-02 + 4.750000000000000E+00 1.417587542572605E+00 1.515528020486936E+00 1.161512643343792E+00 3.257655344461208E-03 4.002181038799346E-02 6.225243137057745E-03 + 5.000000000000000E+00 1.461234008429432E+00 1.473915515593784E+00 1.644001189284456E+00 2.265596193545827E-03 3.300586166036523E-02 7.792604241307899E-04 ----------------------------------------------------------------------------------------------------------------------------------------------------------------- Slow Integrator Stats Current time = 5 -Steps = 242 -Step attempts = 312 +Steps = 269 +Step attempts = 345 Stability limited steps = 0 -Accuracy limited steps = 312 -Error test fails = 70 +Accuracy limited steps = 345 +Error test fails = 76 NLS step fails = 0 Inequality constraint fails = 0 -Initial step size = 0.025 -Last step size = 0.0258711979041237 -Current step size = 0.0258711979041237 -Explicit slow RHS fn evals = 1491 +Initial step size = 9.11844056568919e-06 +Last step size = 0.0472959798003946 +Current step size = 0.0472959798003946 +Explicit slow RHS fn evals = 1651 Implicit slow RHS fn evals = 0 Inner stepper failures = 0 NLS iters = 0 @@ -45,17 +45,17 @@ LS setups = 0 Intermediate Integrator Stats Current time = 5 -Steps = 2982 -Step attempts = 3169 +Steps = 3096 +Step attempts = 3260 Stability limited steps = 0 -Accuracy limited steps = 3169 -Error test fails = 187 +Accuracy limited steps = 3260 +Error test fails = 164 NLS step fails = 0 Inequality constraint fails = 0 -Initial step size = 0.0005 -Last step size = 0.00517423958082474 -Current step size = 0.00517423958082474 -Explicit slow RHS fn evals = 15901 +Initial step size = 6.25937005783581e-11 +Last step size = 0.00945919596007893 +Current step size = 0.00945919596007893 +Explicit slow RHS fn evals = 16409 Implicit slow RHS fn evals = 0 Inner stepper failures = 0 NLS iters = 0 @@ -65,14 +65,14 @@ LS setups = 0 Fast Integrator Stats Current time = 5 -Steps = 84773 -Step attempts = 119399 +Steps = 80748 +Step attempts = 112929 Stability limited steps = 0 -Accuracy limited steps = 119399 -Error test fails = 34626 +Accuracy limited steps = 112929 +Error test fails = 32181 NLS step fails = 0 Inequality constraint fails = 0 -Initial step size = 3.4322590648825e-09 -Last step size = 0.00046218630415673 -Current step size = 0.00046218630415673 -RHS fn evals = 484178 +Initial step size = 4.29675592429222e-16 +Last step size = 0.00059422770479145 +Current step size = 0.00059422770479145 +RHS fn evals = 458512 diff --git a/test/answers b/test/answers index fe9ce45ea1..30fc67fcd3 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit fe9ce45ea191b584777a35c2ef2a1b6883d5b3a2 +Subproject commit 30fc67fcd31d7db5450a7361e805eb11e6367949 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_mristep_1.out b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_mristep_1.out index f200279336..640b7c65c7 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_mristep_1.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_mristep_1.out @@ -5,31 +5,31 @@ Using dense direct linear solver t u v u err v err ------------------------------------------------------------------------------------------------------------------------------ 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 - 2.216762984896080e-02 1.224694723648756e+00 1.703912733300302e+00 4.921912433175635e-09 7.285889447317118e-09 - 4.430630505163263e-02 1.224544544576523e+00 1.622472682735258e+00 9.612434626049549e-09 3.868790621197604e-09 - 6.647784899368810e-02 1.224293925250561e+00 1.496297529163339e+00 1.416605432957851e-08 9.184720983768102e-09 + 1.029860256095084e-04 1.224744870309107e+00 1.732050195254716e+00 6.661338147750939e-16 3.043898466614792e-11 + 2.208263771663438e-02 1.224695107307122e+00 1.704126308579107e+00 4.748178072944143e-09 6.177791833650303e-09 + 4.421954682859922e-02 1.224545328964241e+00 1.622886627736992e+00 1.025614881910997e-08 7.985006544863893e-08 ------------------------------------------------------------------------------------------------------------------------------ Outer integrator statistics: -Current time = 0.0664778489936881 +Current time = 0.0442195468285992 Steps = 3 -Step attempts = 5 +Step attempts = 3 Stability limited steps = 0 -Accuracy limited steps = 4 -Error test fails = 1 -NLS step fails = 1 +Accuracy limited steps = 3 +Error test fails = 0 +NLS step fails = 0 Inequality constraint fails = 0 -Initial step size = 0.1 -Last step size = 0.0221715439420555 -Current step size = 0.022206678920593 +Initial step size = 0.000102986025609508 +Last step size = 0.0221369091119648 +Current step size = 0.0221726095445298 Explicit slow RHS fn evals = 0 -Implicit slow RHS fn evals = 58 +Implicit slow RHS fn evals = 36 Inner stepper failures = 0 -NLS iters = 42 -NLS fails = 2 -NLS iters per step = 14 -LS setups = 3 -Jac fn evals = 3 +NLS iters = 22 +NLS fails = 0 +NLS iters per step = 7.33333333333333 +LS setups = 2 +Jac fn evals = 2 LS RHS fn evals = 0 Prec setup evals = 0 Prec solves = 0 @@ -38,22 +38,22 @@ LS fails = 0 Jac-times setups = 0 Jac-times evals = 0 LS iters per NLS iter = 0 -Jac evals per NLS iter = 0.0714285714285714 +Jac evals per NLS iter = 0.0909090909090909 Prec evals per NLS iter = 0 Inner integrator statistics: -Current time = 0.0664778489936881 -Steps = 16 -Step attempts = 16 +Current time = 0.0442195468285992 +Steps = 12 +Step attempts = 12 Stability limited steps = 0 -Accuracy limited steps = 16 +Accuracy limited steps = 12 Error test fails = 0 NLS step fails = 0 Inequality constraint fails = 0 -Initial step size = 0.000102986177305221 -Last step size = 0.00739051464735181 -Current step size = 0.00739051464735181 -Explicit RHS fn evals = 82 +Initial step size = 1.17824906651486e-09 +Last step size = 0.00737896970398828 +Current step size = 0.00737896970398828 +Explicit RHS fn evals = 64 Implicit RHS fn evals = 0 NLS iters = 0 NLS fails = 0 From 4514ec7d2841b7bc476e4d8a7563f000480a7d22 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 27 Mar 2026 14:21:42 -0400 Subject: [PATCH 242/298] Updated CHANGELOG and RecentChanges files to note the H0 estimation bugfix --- CHANGELOG.md | 3 +++ doc/shared/RecentChanges.rst | 3 +++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 584f26e0e7..d9934ab1d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -77,6 +77,9 @@ eigenvalue estimate is requested on the first step in a subsequent call to `ARKodeEvolve` unless the output vector passed contained the most recently returned solution. +Fixed a bug in MRIStep for estimating the first "slow" time step in an adaptive +multirate calculation. + ### Deprecation Notices Several CMake options have been deprecated in favor of namespaced versions diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index d6f849884e..98b2f58c89 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -78,6 +78,9 @@ an eigenvalue estimate is requested on the first step in a subsequent call to :c:func:`ARKodeEvolve` unless the output vector passed contained the most recently returned solution. +Fixed a bug in MRIStep for estimating the first "slow" time step in an adaptive +multirate calculation. + **Deprecation Notices** Several CMake options have been deprecated in favor of namespaced versions From f8521fb2018c433821df5a69ff89556d47f7ca41 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Sat, 28 Mar 2026 17:51:37 -0400 Subject: [PATCH 243/298] Moved 'preallocated' flag to ARKODE level; investigating a fix for inner stepper forcing to see what the CI thinks --- src/arkode/arkode.c | 27 +++--- src/arkode/arkode_arkstep.c | 46 ++++----- src/arkode/arkode_arkstep_impl.h | 3 - src/arkode/arkode_erkstep.c | 6 +- src/arkode/arkode_forcingstep.c | 7 +- src/arkode/arkode_impl.h | 17 ++-- src/arkode/arkode_io.c | 15 ++- src/arkode/arkode_mristep.c | 96 ++++++++----------- src/arkode/arkode_mristep_impl.h | 3 - src/arkode/arkode_sprkstep.c | 7 +- .../CXX_serial/ark_test_prealloc_mristep.cpp | 2 +- 11 files changed, 104 insertions(+), 125 deletions(-) diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index e6f4914d3d..c5d571e909 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -2098,19 +2098,22 @@ int arkInitialSetup(ARKodeMem ark_mem, sunrealtype tout) return (ARK_ILL_INPUT); } - /* Set up the time stepper module */ - if (ark_mem->step_init == NULL) + /* Set up the time stepper module if not done so already */ + if (!ark_mem->preallocated) { - arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, __FILE__, - "Time stepper module is missing"); - return (ARK_ILL_INPUT); - } - retval = ark_mem->step_init(ark_mem, ark_mem->init_type); - if (retval != ARK_SUCCESS) - { - arkProcessError(ark_mem, retval, __LINE__, __func__, __FILE__, - "Error in initialization of time stepper module"); - return (retval); + if (ark_mem->step_init == NULL) + { + arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, __FILE__, + "Time stepper module is missing"); + return (ARK_ILL_INPUT); + } + retval = ark_mem->step_init(ark_mem, ark_mem->init_type); + if (retval != ARK_SUCCESS) + { + arkProcessError(ark_mem, retval, __LINE__, __func__, __FILE__, + "Error in initialization of time stepper module"); + return (retval); + } } /* Load initial residual weights */ diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index 2c4ac75951..9cd0bafd84 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -184,9 +184,6 @@ void* ARKStepCreate(ARKRhsFn fe, ARKRhsFn fi, sunrealtype t0, N_Vector y0, return (NULL); } - /* Initialize preallocated flag */ - step_mem->preallocated = SUNFALSE; - /* Copy the input parameters into ARKODE state */ step_mem->fe = fe; step_mem->fi = fi; @@ -923,17 +920,6 @@ int arkStep_GetGammas(ARKodeMem ark_mem, sunrealtype* gamma, sunrealtype* gamrat For all initialization types, this routine sets the relevant TakeStep routine based on the current problem configuration. - With initialization type RESET_INIT, this routine does nothing. - - For other initialization types, this routine: - - sets the relevant TakeStep routine based on the current - problem configuration - - checks for consistency between the system and mass matrix - linear solvers (if applicable) - - initializes and sets up the system and mass matrix linear - solvers (if applicable) - - initializes and sets up the nonlinear solver (if applicable) - With initialization type FIRST_INIT this routine: - sets/checks the ARK Butcher tables to be used - allocates any memory that depends on the number of ARK stages, @@ -946,6 +932,17 @@ int arkStep_GetGammas(ARKodeMem ark_mem, sunrealtype* gamma, sunrealtype* gamrat - allocates the interpolation data structure (if needed based on ARKStep solver options) - updates the call_fullrhs flag if necessary + + With initialization type FIRST_INIT or RESIZE_INIT, this routine: + - sets the relevant TakeStep routine based on the current + problem configuration + - checks for consistency between the system and mass matrix + linear solvers (if applicable) + - initializes and sets up the system and mass matrix linear + solvers (if applicable) + - initializes and sets up the nonlinear solver (if applicable) + + With initialization type RESET_INIT, this routine does nothing. ---------------------------------------------------------------*/ int arkStep_Init(ARKodeMem ark_mem, int init_type) { @@ -961,7 +958,7 @@ int arkStep_Init(ARKodeMem ark_mem, int init_type) if (init_type == RESET_INIT) { return (ARK_SUCCESS); } /* initializations/checks for (re-)initialization call */ - if (init_type == ALLOC_INIT || init_type == FIRST_INIT) + if (init_type == FIRST_INIT) { /* enforce use of arkEwtSmallReal if using a fixed step size for an explicit method, an internal error weight function, not @@ -1097,8 +1094,8 @@ int arkStep_Init(ARKodeMem ark_mem, int init_type) number of stages may not bet set before this point and we assume SetInnerForcing has been called before the first step i.e., methods start with a fast integration */ - if (step_mem->expforcing || step_mem->impforcing) - { + // if (step_mem->expforcing || step_mem->impforcing) + // { if (!(step_mem->stage_times)) { step_mem->stage_times = (sunrealtype*)calloc(step_mem->stages, @@ -1112,7 +1109,7 @@ int arkStep_Init(ARKodeMem ark_mem, int init_type) sizeof(sunrealtype)); ark_mem->lrw += step_mem->stages; } - } + // } /* Override the interpolant degree (if needed), used in arkInitialSetup */ if (step_mem->q > 1 && ark_mem->interp_degree > (step_mem->q - 1)) @@ -1153,7 +1150,7 @@ int arkStep_Init(ARKodeMem ark_mem, int init_type) } /* Perform mass matrix solver initialization and setup (if applicable) */ - if (step_mem->mass_type != MASS_IDENTITY && !step_mem->preallocated) + if (step_mem->mass_type != MASS_IDENTITY) { /* Call minit (if it exists) */ if (step_mem->minit != NULL) @@ -1182,7 +1179,7 @@ int arkStep_Init(ARKodeMem ark_mem, int init_type) } /* Call linit (if it exists) */ - if (step_mem->linit && !step_mem->preallocated) + if (step_mem->linit) { retval = step_mem->linit(ark_mem); if (retval != 0) @@ -1194,7 +1191,7 @@ int arkStep_Init(ARKodeMem ark_mem, int init_type) } /* Initialize the nonlinear solver object (if it exists) */ - if (step_mem->NLS && !step_mem->preallocated) + if (step_mem->NLS) { retval = arkStep_NlsInit(ark_mem); if (retval != ARK_SUCCESS) @@ -1208,13 +1205,6 @@ int arkStep_Init(ARKodeMem ark_mem, int init_type) /* Signal to shared arkode module that full RHS evaluations are required */ ark_mem->call_fullrhs = SUNTRUE; - /* if init_type == ALLOC_INIT then store preallocated flag */ - if (init_type == ALLOC_INIT) { step_mem->preallocated = SUNTRUE; } - - /* if init_type == FIRST_INIT then reset preallocated flag (in case - of an eventual resize or reinit) */ - if (init_type == FIRST_INIT) { step_mem->preallocated = SUNFALSE; } - return (ARK_SUCCESS); } diff --git a/src/arkode/arkode_arkstep_impl.h b/src/arkode/arkode_arkstep_impl.h index 9987bcccf6..6bf4932cd9 100644 --- a/src/arkode/arkode_arkstep_impl.h +++ b/src/arkode/arkode_arkstep_impl.h @@ -79,9 +79,6 @@ typedef struct ARKodeARKStepMemRec sunbooleantype implicit; /* SUNTRUE if fi is enabled */ sunbooleantype deduce_rhs; /* SUNTRUE if fi is deduced after a nonlinear solve */ - sunbooleantype preallocated; /* SUNTRUE if data has been - preallocated in a call to - arkStep_Init with ALLOC_INIT */ /* Adjoint problem specification */ SUNAdjRhsFn adj_fe; diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index 391afbe9c4..82a7408821 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -484,8 +484,8 @@ int erkStep_Init(ARKodeMem ark_mem, int init_type) number of stages may not bet set before this point and we assume SetInnerForcing has been called before the first step i.e., methods start with a fast integration */ - if (step_mem->nforcing > 0) - { + // if (step_mem->nforcing > 0) + // { if (!(step_mem->stage_times)) { step_mem->stage_times = (sunrealtype*)calloc(step_mem->stages, @@ -499,7 +499,7 @@ int erkStep_Init(ARKodeMem ark_mem, int init_type) sizeof(sunrealtype)); ark_mem->lrw += step_mem->stages; } - } + // } /* Override the interpolant degree (if needed), used in arkInitialSetup */ if (step_mem->q > 1 && ark_mem->interp_degree > (step_mem->q - 1)) diff --git a/src/arkode/arkode_forcingstep.c b/src/arkode/arkode_forcingstep.c index bb8ea8e819..26eece8b61 100644 --- a/src/arkode/arkode_forcingstep.c +++ b/src/arkode/arkode_forcingstep.c @@ -89,8 +89,11 @@ static int forcingStep_Init(ARKodeMem ark_mem, int init_type) return ARK_ILL_INPUT; } - /* immediately return if not called in FIRST_INIT mode */ - if (init_type != FIRST_INIT) { return ARK_SUCCESS; } + /* immediately return if resize or reset */ + if (init_type == RESIZE_INIT || init_type == RESET_INIT) + { + return ARK_SUCCESS; + } /* On first initialization, make the SUNStepper consistent with the current * state in case a user provided a different initial condition for the diff --git a/src/arkode/arkode_impl.h b/src/arkode/arkode_impl.h index 23a89d8e7a..3d88733724 100644 --- a/src/arkode/arkode_impl.h +++ b/src/arkode/arkode_impl.h @@ -102,7 +102,6 @@ extern "C" { #define FIRST_INIT 0 /* first step (re-)initialization */ #define RESET_INIT 1 /* reset initialization */ #define RESIZE_INIT 2 /* resize initialization */ -#define ALLOC_INIT 3 /* allocate data (before FIRST_INIT) */ /*--------------------------------------------------------------- Control constants for lower-level time-stepping functions @@ -556,6 +555,9 @@ struct ARKodeMemRec sunbooleantype firststage; /* denotes first stage in simulation */ sunbooleantype initialized; /* denotes arkInitialSetup has been done */ sunbooleantype call_fullrhs; /* denotes the full RHS fn will be called */ + sunbooleantype preallocated; /* SUNTRUE if ARKodeInit has been + called to preallocate data + prior to ARKodeEvolve */ /* Rootfinding Data */ ARKodeRootMem root_mem; /* root-finding structure */ @@ -1031,25 +1033,18 @@ void arkode_user_supplied_fn_table_destroy(void* ptr); This routine is called just prior to performing internal time steps (after all user "set" routines have been called), either - from within arkInitialSetup or ARKodeAllocateInternalData. + from within arkInitialSetup or ARKodeInit. It should perform initializations for a specific ARKODE time stepping module, such as verifying compatibility of user- specified linear and nonlinear solver objects. The input init_type flag indicates the type of call: - * FIRST_INIT -- called during arkInitialSetup for the first - time step of a simulation. + * FIRST_INIT -- called during arkInitialSetup or ARKodeInit for + the first time step of a simulation. * RESIZE_INIT -- called during ARKodeResize to resize internal stepper data structures after a change in problem size. * RESET_INIT -- called during ARKodeReset to reset the current (t,y) state in the stepper. - * ALLOC_INIT -- called during the optional routine - ARKodeAllocateInternalData to allocate and initialize - internal stepper data structures. Note that the routine - will be called again with FIRST_INIT. Thus a time-stepper - can either ignore this flag (and just return), or if it - performs allocations here then it should not re-allocate - the same data when called with FIRST_INIT. This routine should return 0 if it has successfully initialized the ARKODE time stepper module and a negative value otherwise. diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index d629b588cd..c25bb2170a 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -79,6 +79,7 @@ int ARKodeSetDefaults(void* arkode_mem) ark_mem->maxnef = MAXNEF; /* max error test fails */ ark_mem->maxncf = MAXNCF; /* max convergence fails */ ark_mem->maxconstrfails = MAXCONSTRFAILS; /* max number of constraint fails */ + ark_mem->preallocated = SUNFALSE; /* data was not preallocated */ ark_mem->hin = ZERO; /* determine initial step on-the-fly */ ark_mem->hmin = ZERO; /* no minimum step size */ ark_mem->hmax_inv = ZERO; /* no maximum step size */ @@ -2315,7 +2316,16 @@ int ARKodeInit(void* arkode_mem) } ark_mem = (ARKodeMem)arkode_mem; - /* Call step_init routine with "ALLOC_INIT" flag, requesting + /* For now, prohibit the user from calling this after data has + already been initialized */ + if (ark_mem->initialized) + { + arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, __FILE__, + "Time stepper data has already been allocated"); + return (ARK_ILL_INPUT); + } + + /* Call step_init routine with "FIRST_INIT" flag, requesting that the time stepper module allocate any remaining internal data */ if (ark_mem->step_init == NULL) @@ -2324,12 +2334,13 @@ int ARKodeInit(void* arkode_mem) "Time stepper module is missing"); return (ARK_ILL_INPUT); } - retval = ark_mem->step_init(ark_mem, ALLOC_INIT); + retval = ark_mem->step_init(ark_mem, FIRST_INIT); if (retval != ARK_SUCCESS) { arkProcessError(ark_mem, retval, __LINE__, __func__, __FILE__, "Error in initialization of time stepper module"); } + ark_mem->preallocated = SUNTRUE; return (retval); } diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 5ca845cedf..cd1a1f09ac 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -923,8 +923,6 @@ int mriStep_GetGammas(ARKodeMem ark_mem, sunrealtype* gamma, sunrealtype* gamrat - initializes and sets up the nonlinear solver (if applicable) - performs timestep adaptivity checks and initial setup, including setting the initial time step size if needed - - With initialization type FIRST_INIT this routine additionally: - sets the relevant TakeStep routine based on the current problem configuration - sets/checks the coefficient tables to be used @@ -948,8 +946,7 @@ int mriStep_Init(ARKodeMem ark_mem, int init_type) if (init_type == RESET_INIT) { return (ARK_SUCCESS); } /* initializations/checks for (re-)initialization call */ - if (init_type == ALLOC_INIT || - (init_type == FIRST_INIT && !step_mem->preallocated)) + if (init_type == FIRST_INIT) { /* enforce use of arkEwtSmallReal if using a fixed step size for an explicit method, an internal error weight function, and not performing @@ -1275,7 +1272,7 @@ int mriStep_Init(ARKodeMem ark_mem, int init_type) } /* Call linit (if it exists) */ - if (step_mem->linit && !step_mem->preallocated) + if (step_mem->linit) { retval = step_mem->linit(ark_mem); if (retval != 0) @@ -1287,7 +1284,7 @@ int mriStep_Init(ARKodeMem ark_mem, int init_type) } /* Initialize the nonlinear solver object (if it exists) */ - if (step_mem->NLS && !step_mem->preallocated) + if (step_mem->NLS) { retval = mriStep_NlsInit(ark_mem); if (retval != ARK_SUCCESS) @@ -1298,66 +1295,55 @@ int mriStep_Init(ARKodeMem ark_mem, int init_type) } } - /*** Perform timestep adaptivity checks and initial setup (skip on ALLOC_INIT) ***/ - if (init_type != ALLOC_INIT) - { - /* get timestep adaptivity type */ - adapt_type = SUNAdaptController_GetType(ark_mem->hadapt_mem->hcontroller); + /* get timestep adaptivity type */ + adapt_type = SUNAdaptController_GetType(ark_mem->hadapt_mem->hcontroller); - if (ark_mem->fixedstep) + if (ark_mem->fixedstep) + { + /* Fixed step sizes: user must supply the initial step size */ + if (ark_mem->hin == ZERO) { - /* Fixed step sizes: user must supply the initial step size */ - if (ark_mem->hin == ZERO) - { - arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, - __FILE__, "Timestep adaptivity disabled, but missing user-defined fixed stepsize"); - return (ARK_ILL_INPUT); - } + arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, + __FILE__, "Timestep adaptivity disabled, but missing user-defined fixed stepsize"); + return (ARK_ILL_INPUT); } - else + } + else + { + /* ensure that a compatible adaptivity controller is provided */ + if ((adapt_type != SUN_ADAPTCONTROLLER_MRI_H_TOL) && + (adapt_type != SUN_ADAPTCONTROLLER_H)) { - /* ensure that a compatible adaptivity controller is provided */ - if ((adapt_type != SUN_ADAPTCONTROLLER_MRI_H_TOL) && - (adapt_type != SUN_ADAPTCONTROLLER_H)) - { - arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, __FILE__, - "SUNAdaptController type is unsupported by MRIStep"); - return (ARK_ILL_INPUT); - } - - /* Controller provides adaptivity (at least at the slow time scale): - - verify that the MRI method includes an embedding, and - - estimate initial slow step size (store in ark_mem->hin) */ - if (step_mem->MRIC->p <= 0) - { - arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, - __FILE__, "Timestep adaptivity enabled, but non-embedded MRI table specified"); - return (ARK_ILL_INPUT); - } + arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, __FILE__, + "SUNAdaptController type is unsupported by MRIStep"); + return (ARK_ILL_INPUT); } - /* Perform additional setup for (H,tol) controller */ - if (adapt_type == SUN_ADAPTCONTROLLER_MRI_H_TOL) + /* Controller provides adaptivity (at least at the slow time scale): + - verify that the MRI method includes an embedding, and + - estimate initial slow step size (store in ark_mem->hin) */ + if (step_mem->MRIC->p <= 0) { - /* Verify that adaptivity type is supported by inner stepper */ - if (!mriStepInnerStepper_SupportsRTolAdaptivity(step_mem->stepper)) - { - arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, - __FILE__, "MRI H-TOL SUNAdaptController provided, but unsupported by inner stepper"); - return (ARK_ILL_INPUT); - } - - /* initialize fast stepper to use the same relative tolerance as MRIStep */ - step_mem->inner_rtol_factor = ONE; + arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, + __FILE__, "Timestep adaptivity enabled, but non-embedded MRI table specified"); + return (ARK_ILL_INPUT); } } - /* if init_type == ALLOC_INIT then store preallocated flag */ - if (init_type == ALLOC_INIT) { step_mem->preallocated = SUNTRUE; } + /* Perform additional setup for (H,tol) controller */ + if (adapt_type == SUN_ADAPTCONTROLLER_MRI_H_TOL) + { + /* Verify that adaptivity type is supported by inner stepper */ + if (!mriStepInnerStepper_SupportsRTolAdaptivity(step_mem->stepper)) + { + arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, + __FILE__, "MRI H-TOL SUNAdaptController provided, but unsupported by inner stepper"); + return (ARK_ILL_INPUT); + } - /* if init_type == FIRST_INIT then reset preallocated flag (in case - of an eventual resize or reinit) */ - if (init_type == FIRST_INIT) { step_mem->preallocated = SUNFALSE; } + /* initialize fast stepper to use the same relative tolerance as MRIStep */ + step_mem->inner_rtol_factor = ONE; + } return (ARK_SUCCESS); } diff --git a/src/arkode/arkode_mristep_impl.h b/src/arkode/arkode_mristep_impl.h index 073ef39c5d..967d17413d 100644 --- a/src/arkode/arkode_mristep_impl.h +++ b/src/arkode/arkode_mristep_impl.h @@ -75,9 +75,6 @@ typedef struct ARKodeMRIStepMemRec sunbooleantype implicit_rhs; /* SUNTRUE if fsi is provided */ sunbooleantype deduce_rhs; /* SUNTRUE if fi is deduced after a nonlinear solve */ - sunbooleantype preallocated; /* SUNTRUE if data has been - preallocated in a call to - mriStep_Init with ALLOC_INIT */ /* Outer RK method storage and parameters */ N_Vector* Fse; /* explicit RHS at each stage */ diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index 7265d96b72..00991fc9a7 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -373,8 +373,8 @@ int sprkStep_Init(ARKodeMem ark_mem, int init_type) /* immediately return if reset */ if (init_type == RESET_INIT) { return (ARK_SUCCESS); } - /* initializations/checks for (re-)initialization or allocation */ - if (init_type == FIRST_INIT || init_type == ALLOC_INIT) + /* initializations/checks for (re-)initialization call */ + if (init_type == FIRST_INIT) { if (!step_mem->method) { @@ -413,9 +413,6 @@ int sprkStep_Init(ARKodeMem ark_mem, int init_type) break; } } - - /* Immediately return if called for allocation */ - if (init_type == ALLOC_INIT) { return (ARK_SUCCESS); } } /* Override the interpolant degree (if needed), used in arkInitialSetup */ diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_mristep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_mristep.cpp index 5622c7a3b6..6d8ac26f54 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_mristep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_mristep.cpp @@ -126,7 +126,7 @@ int main(int argc, char* argv[]) sunrealtype tret = zero; sunrealtype tout = tret + dtout; - // Output initial contion + // Output initial condition cout << scientific; cout << setprecision(numeric_limits::digits10); cout << " t "; From 25c6e3040ecfdb522b70b89ed918d122d6c682c1 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Sat, 28 Mar 2026 17:59:11 -0400 Subject: [PATCH 244/298] Formatting --- src/arkode/arkode_arkstep.c | 24 ++++++++++++------------ src/arkode/arkode_erkstep.c | 24 ++++++++++++------------ src/arkode/arkode_impl.h | 8 ++++---- src/arkode/arkode_io.c | 2 +- src/arkode/arkode_mristep.c | 4 ++-- 5 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index 9cd0bafd84..269a0273fe 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1096,19 +1096,19 @@ int arkStep_Init(ARKodeMem ark_mem, int init_type) start with a fast integration */ // if (step_mem->expforcing || step_mem->impforcing) // { - if (!(step_mem->stage_times)) - { - step_mem->stage_times = (sunrealtype*)calloc(step_mem->stages, - sizeof(sunrealtype)); - ark_mem->lrw += step_mem->stages; - } + if (!(step_mem->stage_times)) + { + step_mem->stage_times = (sunrealtype*)calloc(step_mem->stages, + sizeof(sunrealtype)); + ark_mem->lrw += step_mem->stages; + } - if (!(step_mem->stage_coefs)) - { - step_mem->stage_coefs = (sunrealtype*)calloc(step_mem->stages, - sizeof(sunrealtype)); - ark_mem->lrw += step_mem->stages; - } + if (!(step_mem->stage_coefs)) + { + step_mem->stage_coefs = (sunrealtype*)calloc(step_mem->stages, + sizeof(sunrealtype)); + ark_mem->lrw += step_mem->stages; + } // } /* Override the interpolant degree (if needed), used in arkInitialSetup */ diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index 82a7408821..10ed516e05 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -486,19 +486,19 @@ int erkStep_Init(ARKodeMem ark_mem, int init_type) start with a fast integration */ // if (step_mem->nforcing > 0) // { - if (!(step_mem->stage_times)) - { - step_mem->stage_times = (sunrealtype*)calloc(step_mem->stages, - sizeof(sunrealtype)); - ark_mem->lrw += step_mem->stages; - } + if (!(step_mem->stage_times)) + { + step_mem->stage_times = (sunrealtype*)calloc(step_mem->stages, + sizeof(sunrealtype)); + ark_mem->lrw += step_mem->stages; + } - if (!(step_mem->stage_coefs)) - { - step_mem->stage_coefs = (sunrealtype*)calloc(step_mem->stages, - sizeof(sunrealtype)); - ark_mem->lrw += step_mem->stages; - } + if (!(step_mem->stage_coefs)) + { + step_mem->stage_coefs = (sunrealtype*)calloc(step_mem->stages, + sizeof(sunrealtype)); + ark_mem->lrw += step_mem->stages; + } // } /* Override the interpolant degree (if needed), used in arkInitialSetup */ diff --git a/src/arkode/arkode_impl.h b/src/arkode/arkode_impl.h index 3d88733724..d0dacf42a8 100644 --- a/src/arkode/arkode_impl.h +++ b/src/arkode/arkode_impl.h @@ -99,9 +99,9 @@ extern "C" { /*--------------------------------------------------------------- Initialization types ---------------------------------------------------------------*/ -#define FIRST_INIT 0 /* first step (re-)initialization */ -#define RESET_INIT 1 /* reset initialization */ -#define RESIZE_INIT 2 /* resize initialization */ +#define FIRST_INIT 0 /* first step (re-)initialization */ +#define RESET_INIT 1 /* reset initialization */ +#define RESIZE_INIT 2 /* resize initialization */ /*--------------------------------------------------------------- Control constants for lower-level time-stepping functions @@ -555,7 +555,7 @@ struct ARKodeMemRec sunbooleantype firststage; /* denotes first stage in simulation */ sunbooleantype initialized; /* denotes arkInitialSetup has been done */ sunbooleantype call_fullrhs; /* denotes the full RHS fn will be called */ - sunbooleantype preallocated; /* SUNTRUE if ARKodeInit has been + sunbooleantype preallocated; /* SUNTRUE if ARKodeInit has been called to preallocate data prior to ARKodeEvolve */ diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index c25bb2170a..1e9bdf31b9 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -79,7 +79,7 @@ int ARKodeSetDefaults(void* arkode_mem) ark_mem->maxnef = MAXNEF; /* max error test fails */ ark_mem->maxncf = MAXNCF; /* max convergence fails */ ark_mem->maxconstrfails = MAXCONSTRFAILS; /* max number of constraint fails */ - ark_mem->preallocated = SUNFALSE; /* data was not preallocated */ + ark_mem->preallocated = SUNFALSE; /* data was not preallocated */ ark_mem->hin = ZERO; /* determine initial step on-the-fly */ ark_mem->hmin = ZERO; /* no minimum step size */ ark_mem->hmax_inv = ZERO; /* no maximum step size */ diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index cd1a1f09ac..e0e629eea0 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1320,8 +1320,8 @@ int mriStep_Init(ARKodeMem ark_mem, int init_type) } /* Controller provides adaptivity (at least at the slow time scale): - - verify that the MRI method includes an embedding, and - - estimate initial slow step size (store in ark_mem->hin) */ + - verify that the MRI method includes an embedding, and + - estimate initial slow step size (store in ark_mem->hin) */ if (step_mem->MRIC->p <= 0) { arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, From e0b9f10d38e07329a864aff8a1d9c92ff7e77c8f Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Sat, 28 Mar 2026 22:05:15 -0400 Subject: [PATCH 245/298] Removed commented-out code --- src/arkode/arkode_arkstep.c | 7 +------ src/arkode/arkode_erkstep.c | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index 269a0273fe..e86f498f6d 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1091,11 +1091,7 @@ int arkStep_Init(ARKodeMem ark_mem, int init_type) } /* Allocate workspace for MRI forcing -- need to allocate here as the - number of stages may not bet set before this point and we assume - SetInnerForcing has been called before the first step i.e., methods - start with a fast integration */ - // if (step_mem->expforcing || step_mem->impforcing) - // { + number of stages may not bet set before this point */ if (!(step_mem->stage_times)) { step_mem->stage_times = (sunrealtype*)calloc(step_mem->stages, @@ -1109,7 +1105,6 @@ int arkStep_Init(ARKodeMem ark_mem, int init_type) sizeof(sunrealtype)); ark_mem->lrw += step_mem->stages; } - // } /* Override the interpolant degree (if needed), used in arkInitialSetup */ if (step_mem->q > 1 && ark_mem->interp_degree > (step_mem->q - 1)) diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index 10ed516e05..739df8bb1c 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -481,11 +481,7 @@ int erkStep_Init(ARKodeMem ark_mem, int init_type) } /* Allocate workspace for MRI forcing -- need to allocate here as the - number of stages may not bet set before this point and we assume - SetInnerForcing has been called before the first step i.e., methods - start with a fast integration */ - // if (step_mem->nforcing > 0) - // { + number of stages may not bet set before this point */ if (!(step_mem->stage_times)) { step_mem->stage_times = (sunrealtype*)calloc(step_mem->stages, @@ -499,7 +495,6 @@ int erkStep_Init(ARKodeMem ark_mem, int init_type) sizeof(sunrealtype)); ark_mem->lrw += step_mem->stages; } - // } /* Override the interpolant degree (if needed), used in arkInitialSetup */ if (step_mem->q > 1 && ark_mem->interp_degree > (step_mem->q - 1)) From ca304ecbc318921323c697f09b06d9dc2bc6ec46 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Sat, 28 Mar 2026 22:12:03 -0400 Subject: [PATCH 246/298] Fixed documentation reference --- doc/arkode/guide/source/Usage/User_callable.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/arkode/guide/source/Usage/User_callable.rst b/doc/arkode/guide/source/Usage/User_callable.rst index 1f56dc247b..da49e84a62 100644 --- a/doc/arkode/guide/source/Usage/User_callable.rst +++ b/doc/arkode/guide/source/Usage/User_callable.rst @@ -5428,7 +5428,7 @@ preallocate this data earlier, for example to measure the memory footprint before beginning a calculation, or to check for allocation errors at an earlier time. To request that that ARKODE preallocate all stage-related internal data before the first call to :c:func:`ARKodeEvolve`, the user -may call the function :c:func:`ARKodeAllocateInternalData`. +may call the function :c:func:`ARKodeInit`. .. c:function:: int ARKodeInit(void* arkode_mem) From f47091cab66ca499e2daa00e31ffefb489b376da Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Sat, 28 Mar 2026 22:28:27 -0400 Subject: [PATCH 247/298] Removed unused variable --- src/arkode/arkode_lsrkstep.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index d99c280bf9..b547b9794b 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -913,7 +913,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) { int retval; - sunrealtype hmax, w1, bjm1, bjm2, mus, bj, ajm1, cjm1, temj, cj, mu, nu; + sunrealtype hmax, w1, bjm1, bjm2, mus, bj, ajm1, temj, cj, mu, nu; const sunrealtype p8 = SUN_RCONST(0.8), p4 = SUN_RCONST(0.4); ARKodeLSRKStepMem step_mem; @@ -1030,7 +1030,6 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) bjm2 = ONE / THREE; bjm1 = bjm2; mus = w1 * bjm1; - cjm1 = mus; /* Evaluate the first stage (store in tmp2) and initialize embedding */ ark_mem->tcur = ark_mem->tn + ark_mem->h * mus; @@ -1147,7 +1146,6 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) N_VScale(ONE, ark_mem->ycur, tmp2); - cjm1 = cj; bjm2 = bjm1; bjm1 = bj; } From 789dc09eaf663e86c57b3030a24bfa48caf073d0 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Sat, 28 Mar 2026 22:38:11 -0400 Subject: [PATCH 248/298] Updated answers submodule commit --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index 30fc67fcd3..04b6db4777 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 30fc67fcd31d7db5450a7361e805eb11e6367949 +Subproject commit 04b6db4777df8d74d5637fb48bccb96f9f6563de From 1400077dcc68788445bbef63b8e08e23c068437f Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 29 Mar 2026 08:32:57 -0700 Subject: [PATCH 249/298] update jenkins .out files --- .../C_parallel/ark_diurnal_kry_bbd_p.out | 104 +-- .../arkode/C_parallel/ark_diurnal_kry_p.out | 53 +- .../arkode/C_parhyp/ark_diurnal_kry_ph.out | 53 +- .../arkode/C_serial/ark_KrylovDemo_prec.out | 652 +++++++++--------- .../arkode/C_serial/ark_KrylovDemo_prec_1.out | 652 +++++++++--------- .../arkode/C_serial/ark_KrylovDemo_prec_2.out | 652 +++++++++--------- 6 files changed, 1084 insertions(+), 1082 deletions(-) diff --git a/examples/arkode/C_parallel/ark_diurnal_kry_bbd_p.out b/examples/arkode/C_parallel/ark_diurnal_kry_bbd_p.out index a73795f274..e4a5b9fa10 100644 --- a/examples/arkode/C_parallel/ark_diurnal_kry_bbd_p.out +++ b/examples/arkode/C_parallel/ark_diurnal_kry_bbd_p.out @@ -8,57 +8,57 @@ Preconditioner type is: jpre = SUN_PREC_LEFT t = 7.20e+03 no. steps = 70 stepsize = 1.17e+02 -At bottom left: c1, c2 = 1.047e+04 2.527e+11 -At top right: c1, c2 = 1.118e+04 2.700e+11 +At bottom left: c1, c2 = 1.047e+04 2.527e+11 +At top right: c1, c2 = 1.118e+04 2.700e+11 t = 1.44e+04 no. steps = 97 stepsize = 5.42e+02 -At bottom left: c1, c2 = 6.659e+06 2.582e+11 -At top right: c1, c2 = 7.301e+06 2.833e+11 +At bottom left: c1, c2 = 6.659e+06 2.582e+11 +At top right: c1, c2 = 7.301e+06 2.833e+11 t = 2.16e+04 no. steps = 115 stepsize = 6.88e+02 -At bottom left: c1, c2 = 2.665e+07 2.993e+11 -At top right: c1, c2 = 2.931e+07 3.313e+11 +At bottom left: c1, c2 = 2.665e+07 2.993e+11 +At top right: c1, c2 = 2.931e+07 3.313e+11 t = 2.88e+04 no. steps = 133 stepsize = 2.55e+02 -At bottom left: c1, c2 = 8.702e+06 3.380e+11 -At top right: c1, c2 = 9.650e+06 3.751e+11 +At bottom left: c1, c2 = 8.702e+06 3.380e+11 +At top right: c1, c2 = 9.650e+06 3.751e+11 t = 3.60e+04 no. steps = 161 stepsize = 7.55e+01 -At bottom left: c1, c2 = 1.404e+04 3.387e+11 -At top right: c1, c2 = 1.561e+04 3.765e+11 +At bottom left: c1, c2 = 1.404e+04 3.387e+11 +At top right: c1, c2 = 1.561e+04 3.765e+11 t = 4.32e+04 no. steps = 201 stepsize = 1.77e+03 -At bottom left: c1, c2 = -1.994e-07 3.382e+11 -At top right: c1, c2 = 4.533e-06 3.804e+11 +At bottom left: c1, c2 = -1.994e-07 3.382e+11 +At top right: c1, c2 = 4.533e-06 3.804e+11 t = 5.04e+04 no. steps = 206 stepsize = 7.73e+02 -At bottom left: c1, c2 = -2.848e-08 3.358e+11 -At top right: c1, c2 = -1.542e-07 3.864e+11 +At bottom left: c1, c2 = -2.848e-08 3.358e+11 +At top right: c1, c2 = -1.542e-07 3.864e+11 t = 5.76e+04 no. steps = 210 stepsize = 1.55e+03 -At bottom left: c1, c2 = -8.395e-07 3.320e+11 -At top right: c1, c2 = -4.284e-07 3.909e+11 +At bottom left: c1, c2 = -8.395e-07 3.320e+11 +At top right: c1, c2 = -4.284e-07 3.909e+11 t = 6.48e+04 no. steps = 215 stepsize = 1.89e+03 -At bottom left: c1, c2 = 1.234e-08 3.313e+11 -At top right: c1, c2 = 9.230e-08 3.963e+11 +At bottom left: c1, c2 = 1.234e-08 3.313e+11 +At top right: c1, c2 = 9.230e-08 3.963e+11 t = 7.20e+04 no. steps = 218 stepsize = 2.21e+03 -At bottom left: c1, c2 = -4.001e-08 3.330e+11 -At top right: c1, c2 = -7.099e-06 4.039e+11 +At bottom left: c1, c2 = -4.001e-08 3.330e+11 +At top right: c1, c2 = -7.099e-06 4.039e+11 t = 7.92e+04 no. steps = 221 stepsize = 2.32e+03 -At bottom left: c1, c2 = 3.713e-08 3.334e+11 -At top right: c1, c2 = -3.992e-07 4.120e+11 +At bottom left: c1, c2 = 3.713e-08 3.334e+11 +At top right: c1, c2 = -3.992e-07 4.120e+11 t = 8.64e+04 no. steps = 224 stepsize = 2.47e+03 -At bottom left: c1, c2 = 3.734e-07 3.352e+11 -At top right: c1, c2 = 3.748e-07 4.163e+11 +At bottom left: c1, c2 = 3.734e-07 3.352e+11 +At top right: c1, c2 = 3.748e-07 4.163e+11 -Final Statistics: +Final Statistics: -lenrw = 4118 leniw = 285 +lenrw = 4130 leniw = 285 lenrwls = 2455 leniwls = 126 nst = 224 nfe = 0 nfe = 3315 nfels = 6886 @@ -77,57 +77,57 @@ In ARKBBDPRE: real/integer local work space sizes = 1300, 192 Preconditioner type is: jpre = SUN_PREC_RIGHT t = 7.20e+03 no. steps = 69 stepsize = 1.17e+02 -At bottom left: c1, c2 = 1.047e+04 2.527e+11 -At top right: c1, c2 = 1.118e+04 2.700e+11 +At bottom left: c1, c2 = 1.047e+04 2.527e+11 +At top right: c1, c2 = 1.118e+04 2.700e+11 t = 1.44e+04 no. steps = 96 stepsize = 5.40e+02 -At bottom left: c1, c2 = 6.659e+06 2.582e+11 -At top right: c1, c2 = 7.301e+06 2.833e+11 +At bottom left: c1, c2 = 6.659e+06 2.582e+11 +At top right: c1, c2 = 7.301e+06 2.833e+11 t = 2.16e+04 no. steps = 114 stepsize = 6.89e+02 -At bottom left: c1, c2 = 2.665e+07 2.993e+11 -At top right: c1, c2 = 2.931e+07 3.313e+11 +At bottom left: c1, c2 = 2.665e+07 2.993e+11 +At top right: c1, c2 = 2.931e+07 3.313e+11 t = 2.88e+04 no. steps = 131 stepsize = 1.93e+02 -At bottom left: c1, c2 = 8.702e+06 3.380e+11 -At top right: c1, c2 = 9.650e+06 3.751e+11 +At bottom left: c1, c2 = 8.702e+06 3.380e+11 +At top right: c1, c2 = 9.650e+06 3.751e+11 t = 3.60e+04 no. steps = 159 stepsize = 7.48e+01 -At bottom left: c1, c2 = 1.404e+04 3.387e+11 -At top right: c1, c2 = 1.561e+04 3.765e+11 +At bottom left: c1, c2 = 1.404e+04 3.387e+11 +At top right: c1, c2 = 1.561e+04 3.765e+11 t = 4.32e+04 no. steps = 199 stepsize = 1.75e+03 -At bottom left: c1, c2 = -1.508e-07 3.382e+11 -At top right: c1, c2 = -1.680e-07 3.804e+11 +At bottom left: c1, c2 = -1.508e-07 3.382e+11 +At top right: c1, c2 = -1.680e-07 3.804e+11 t = 5.04e+04 no. steps = 203 stepsize = 1.28e+03 -At bottom left: c1, c2 = 8.151e-09 3.358e+11 -At top right: c1, c2 = -1.358e-08 3.864e+11 +At bottom left: c1, c2 = 8.151e-09 3.358e+11 +At top right: c1, c2 = -1.358e-08 3.864e+11 t = 5.76e+04 no. steps = 208 stepsize = 9.65e+02 -At bottom left: c1, c2 = 5.968e-08 3.320e+11 -At top right: c1, c2 = 1.041e-08 3.909e+11 +At bottom left: c1, c2 = 5.968e-08 3.320e+11 +At top right: c1, c2 = 1.041e-08 3.909e+11 t = 6.48e+04 no. steps = 213 stepsize = 1.90e+03 -At bottom left: c1, c2 = -4.322e-09 3.313e+11 -At top right: c1, c2 = 4.258e-10 3.963e+11 +At bottom left: c1, c2 = -4.322e-09 3.313e+11 +At top right: c1, c2 = 4.258e-10 3.963e+11 t = 7.20e+04 no. steps = 216 stepsize = 2.21e+03 -At bottom left: c1, c2 = 1.431e-07 3.330e+11 -At top right: c1, c2 = 1.210e-06 4.039e+11 +At bottom left: c1, c2 = 1.431e-07 3.330e+11 +At top right: c1, c2 = 1.210e-06 4.039e+11 t = 7.92e+04 no. steps = 219 stepsize = 2.32e+03 -At bottom left: c1, c2 = 2.679e-08 3.334e+11 -At top right: c1, c2 = 1.594e-07 4.120e+11 +At bottom left: c1, c2 = 2.679e-08 3.334e+11 +At top right: c1, c2 = 1.594e-07 4.120e+11 t = 8.64e+04 no. steps = 222 stepsize = 2.47e+03 -At bottom left: c1, c2 = 6.003e-08 3.352e+11 -At top right: c1, c2 = -1.811e-07 4.163e+11 +At bottom left: c1, c2 = 6.003e-08 3.352e+11 +At top right: c1, c2 = -1.811e-07 4.163e+11 -Final Statistics: +Final Statistics: -lenrw = 4118 leniw = 285 +lenrw = 4130 leniw = 285 lenrwls = 2455 leniwls = 126 nst = 222 nfe = 0 nfe = 3244 nfels = 7604 diff --git a/examples/arkode/C_parallel/ark_diurnal_kry_p.out b/examples/arkode/C_parallel/ark_diurnal_kry_p.out index f1b4e6e840..b0d1cc02b5 100644 --- a/examples/arkode/C_parallel/ark_diurnal_kry_p.out +++ b/examples/arkode/C_parallel/ark_diurnal_kry_p.out @@ -2,57 +2,57 @@ 2-species diurnal advection-diffusion problem t = 7.20e+03 no. steps = 69 stepsize = 1.17e+02 -At bottom left: c1, c2 = 1.047e+04 2.527e+11 -At top right: c1, c2 = 1.118e+04 2.700e+11 +At bottom left: c1, c2 = 1.047e+04 2.527e+11 +At top right: c1, c2 = 1.118e+04 2.700e+11 t = 1.44e+04 no. steps = 96 stepsize = 5.41e+02 -At bottom left: c1, c2 = 6.659e+06 2.582e+11 -At top right: c1, c2 = 7.301e+06 2.833e+11 +At bottom left: c1, c2 = 6.659e+06 2.582e+11 +At top right: c1, c2 = 7.301e+06 2.833e+11 t = 2.16e+04 no. steps = 114 stepsize = 6.85e+02 -At bottom left: c1, c2 = 2.665e+07 2.993e+11 -At top right: c1, c2 = 2.931e+07 3.313e+11 +At bottom left: c1, c2 = 2.665e+07 2.993e+11 +At top right: c1, c2 = 2.931e+07 3.313e+11 t = 2.88e+04 no. steps = 128 stepsize = 2.01e+02 -At bottom left: c1, c2 = 8.702e+06 3.380e+11 -At top right: c1, c2 = 9.650e+06 3.751e+11 +At bottom left: c1, c2 = 8.702e+06 3.380e+11 +At top right: c1, c2 = 9.650e+06 3.751e+11 t = 3.60e+04 no. steps = 156 stepsize = 7.45e+01 -At bottom left: c1, c2 = 1.404e+04 3.387e+11 -At top right: c1, c2 = 1.561e+04 3.765e+11 +At bottom left: c1, c2 = 1.404e+04 3.387e+11 +At top right: c1, c2 = 1.561e+04 3.765e+11 t = 4.32e+04 no. steps = 196 stepsize = 1.75e+03 -At bottom left: c1, c2 = -4.884e-08 3.382e+11 -At top right: c1, c2 = -8.694e-07 3.804e+11 +At bottom left: c1, c2 = -4.884e-08 3.382e+11 +At top right: c1, c2 = -8.694e-07 3.804e+11 t = 5.04e+04 no. steps = 200 stepsize = 1.26e+03 -At bottom left: c1, c2 = -7.230e-09 3.358e+11 -At top right: c1, c2 = 3.094e-08 3.864e+11 +At bottom left: c1, c2 = -7.230e-09 3.358e+11 +At top right: c1, c2 = 3.094e-08 3.864e+11 t = 5.76e+04 no. steps = 205 stepsize = 1.08e+03 -At bottom left: c1, c2 = 4.422e-06 3.320e+11 -At top right: c1, c2 = -2.623e-05 3.909e+11 +At bottom left: c1, c2 = 4.422e-06 3.320e+11 +At top right: c1, c2 = -2.623e-05 3.909e+11 t = 6.48e+04 no. steps = 209 stepsize = 2.05e+03 -At bottom left: c1, c2 = 1.105e-08 3.313e+11 -At top right: c1, c2 = 7.165e-08 3.963e+11 +At bottom left: c1, c2 = 1.105e-08 3.313e+11 +At top right: c1, c2 = 7.165e-08 3.963e+11 t = 7.20e+04 no. steps = 213 stepsize = 2.13e+03 -At bottom left: c1, c2 = -4.810e-06 3.330e+11 -At top right: c1, c2 = -1.198e-04 4.039e+11 +At bottom left: c1, c2 = -4.810e-06 3.330e+11 +At top right: c1, c2 = -1.198e-04 4.039e+11 t = 7.92e+04 no. steps = 216 stepsize = 2.32e+03 -At bottom left: c1, c2 = 7.856e-08 3.334e+11 -At top right: c1, c2 = 6.407e-07 4.120e+11 +At bottom left: c1, c2 = 7.856e-08 3.334e+11 +At top right: c1, c2 = 6.407e-07 4.120e+11 t = 8.64e+04 no. steps = 219 stepsize = 2.47e+03 -At bottom left: c1, c2 = 1.878e-08 3.352e+11 -At top right: c1, c2 = 2.566e-08 4.163e+11 +At bottom left: c1, c2 = 1.878e-08 3.352e+11 +At top right: c1, c2 = 2.566e-08 4.163e+11 -Final Statistics: +Final Statistics: -lenrw = 3518 leniw = 261 +lenrw = 3530 leniw = 261 lenrwls = 2455 leniwls = 126 nst = 219 nfe = 0 nfi = 3215 nfels = 6952 @@ -60,3 +60,4 @@ nni = 2012 nli = 6952 nsetups = 72 netf = 21 npe = 6 nps = 8886 ncfn = 2 ncfl = 621 + diff --git a/examples/arkode/C_parhyp/ark_diurnal_kry_ph.out b/examples/arkode/C_parhyp/ark_diurnal_kry_ph.out index ac94a6d1cf..58134a0c4b 100644 --- a/examples/arkode/C_parhyp/ark_diurnal_kry_ph.out +++ b/examples/arkode/C_parhyp/ark_diurnal_kry_ph.out @@ -2,57 +2,57 @@ 2-species diurnal advection-diffusion problem t = 7.20e+03 no. steps = 69 stepsize = 1.17e+02 -At bottom left: c1, c2 = 1.047e+04 2.527e+11 -At top right: c1, c2 = 1.118e+04 2.700e+11 +At bottom left: c1, c2 = 1.047e+04 2.527e+11 +At top right: c1, c2 = 1.118e+04 2.700e+11 t = 1.44e+04 no. steps = 96 stepsize = 6.06e+02 -At bottom left: c1, c2 = 6.659e+06 2.582e+11 -At top right: c1, c2 = 7.301e+06 2.833e+11 +At bottom left: c1, c2 = 6.659e+06 2.582e+11 +At top right: c1, c2 = 7.301e+06 2.833e+11 t = 2.16e+04 no. steps = 115 stepsize = 7.13e+02 -At bottom left: c1, c2 = 2.665e+07 2.993e+11 -At top right: c1, c2 = 2.931e+07 3.313e+11 +At bottom left: c1, c2 = 2.665e+07 2.993e+11 +At top right: c1, c2 = 2.931e+07 3.313e+11 t = 2.88e+04 no. steps = 128 stepsize = 2.39e+02 -At bottom left: c1, c2 = 8.702e+06 3.380e+11 -At top right: c1, c2 = 9.650e+06 3.751e+11 +At bottom left: c1, c2 = 8.702e+06 3.380e+11 +At top right: c1, c2 = 9.650e+06 3.751e+11 t = 3.60e+04 no. steps = 157 stepsize = 7.95e+01 -At bottom left: c1, c2 = 1.404e+04 3.387e+11 -At top right: c1, c2 = 1.561e+04 3.765e+11 +At bottom left: c1, c2 = 1.404e+04 3.387e+11 +At top right: c1, c2 = 1.561e+04 3.765e+11 t = 4.32e+04 no. steps = 197 stepsize = 1.77e+03 -At bottom left: c1, c2 = -7.216e-06 3.382e+11 -At top right: c1, c2 = 4.224e-05 3.804e+11 +At bottom left: c1, c2 = -7.216e-06 3.382e+11 +At top right: c1, c2 = 4.224e-05 3.804e+11 t = 5.04e+04 no. steps = 202 stepsize = 8.73e+02 -At bottom left: c1, c2 = 4.566e-07 3.358e+11 -At top right: c1, c2 = 2.513e-07 3.864e+11 +At bottom left: c1, c2 = 4.566e-07 3.358e+11 +At top right: c1, c2 = 2.513e-07 3.864e+11 t = 5.76e+04 no. steps = 206 stepsize = 1.72e+03 -At bottom left: c1, c2 = 4.610e-07 3.320e+11 -At top right: c1, c2 = 3.216e-05 3.909e+11 +At bottom left: c1, c2 = 4.610e-07 3.320e+11 +At top right: c1, c2 = 3.216e-05 3.909e+11 t = 6.48e+04 no. steps = 212 stepsize = 1.90e+03 -At bottom left: c1, c2 = 2.291e-06 3.313e+11 -At top right: c1, c2 = -9.987e-06 3.963e+11 +At bottom left: c1, c2 = 2.291e-06 3.313e+11 +At top right: c1, c2 = -9.987e-06 3.963e+11 t = 7.20e+04 no. steps = 215 stepsize = 2.20e+03 -At bottom left: c1, c2 = 2.352e-06 3.330e+11 -At top right: c1, c2 = 4.867e-05 4.039e+11 +At bottom left: c1, c2 = 2.352e-06 3.330e+11 +At top right: c1, c2 = 4.867e-05 4.039e+11 t = 7.92e+04 no. steps = 218 stepsize = 2.31e+03 -At bottom left: c1, c2 = 9.645e-07 3.334e+11 -At top right: c1, c2 = 1.907e-05 4.120e+11 +At bottom left: c1, c2 = 9.645e-07 3.334e+11 +At top right: c1, c2 = 1.907e-05 4.120e+11 t = 8.64e+04 no. steps = 221 stepsize = 2.44e+03 -At bottom left: c1, c2 = 3.465e-06 3.352e+11 -At top right: c1, c2 = 6.627e-06 4.163e+11 +At bottom left: c1, c2 = 3.465e-06 3.352e+11 +At top right: c1, c2 = 6.627e-06 4.163e+11 -Final Statistics: +Final Statistics: -lenrw = 3518 leniw = 261 +lenrw = 3530 leniw = 261 lenrwls = 2455 leniwls = 126 nst = 221 nfe = 0 nfi = 3097 nfels = 6228 @@ -60,3 +60,4 @@ nni = 1889 nli = 6228 nsetups = 69 netf = 20 npe = 4 nps = 8046 ncfn = 0 ncfl = 452 + diff --git a/examples/arkode/C_serial/ark_KrylovDemo_prec.out b/examples/arkode/C_serial/ark_KrylovDemo_prec.out index 1c5be0014a..f501bf8010 100644 --- a/examples/arkode/C_serial/ark_KrylovDemo_prec.out +++ b/examples/arkode/C_serial/ark_KrylovDemo_prec.out @@ -10,9 +10,9 @@ b parameter = 1 Diffusion coefficients: Dprey = 1 Dpred = 0.5 Rate parameter alpha = 1 -Mesh dimensions (mx,my) are 6, 6. Total system size is neq = 216 +Mesh dimensions (mx,my) are 6, 6. Total system size is neq = 216 -Tolerances: reltol = 1e-05, abstol = 1e-05 +Tolerances: reltol = 1e-05, abstol = 1e-05 Preconditioning uses a product of: (1) Gauss-Seidel iterations with itmax = 5 iterations, and @@ -31,52 +31,52 @@ Gram-Schmidt method type is gstype = SUN_MODIFIED_GS c values at t = 0: Species 1 -10 10 10 10 10 10 -10 10.1678 10.3775 10.3775 10.1678 10 -10 10.3775 10.8493 10.8493 10.3775 10 -10 10.3775 10.8493 10.8493 10.3775 10 -10 10.1678 10.3775 10.3775 10.1678 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.1678 10.3775 10.3775 10.1678 10 +10 10.3775 10.8493 10.8493 10.3775 10 +10 10.3775 10.8493 10.8493 10.3775 10 +10 10.1678 10.3775 10.3775 10.1678 10 +10 10 10 10 10 10 Species 2 -10 10 10 10 10 10 -10 10.3355 10.755 10.755 10.3355 10 -10 10.755 11.6987 11.6987 10.755 10 -10 10.755 11.6987 11.6987 10.755 10 -10 10.3355 10.755 10.755 10.3355 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.3355 10.755 10.755 10.3355 10 +10 10.755 11.6987 11.6987 10.755 10 +10 10.755 11.6987 11.6987 10.755 10 +10 10.3355 10.755 10.755 10.3355 10 +10 10 10 10 10 10 Species 3 -10 10 10 10 10 10 -10 10.5033 11.1325 11.1325 10.5033 10 -10 11.1325 12.548 12.548 11.1325 10 -10 11.1325 12.548 12.548 11.1325 10 -10 10.5033 11.1325 11.1325 10.5033 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.5033 11.1325 11.1325 10.5033 10 +10 11.1325 12.548 12.548 11.1325 10 +10 11.1325 12.548 12.548 11.1325 10 +10 10.5033 11.1325 11.1325 10.5033 10 +10 10 10 10 10 10 Species 4 -10 10 10 10 10 10 -10 10.6711 11.5099 11.5099 10.6711 10 -10 11.5099 13.3974 13.3974 11.5099 10 -10 11.5099 13.3974 13.3974 11.5099 10 -10 10.6711 11.5099 11.5099 10.6711 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.6711 11.5099 11.5099 10.6711 10 +10 11.5099 13.3974 13.3974 11.5099 10 +10 11.5099 13.3974 13.3974 11.5099 10 +10 10.6711 11.5099 11.5099 10.6711 10 +10 10 10 10 10 10 Species 5 -10 10 10 10 10 10 -10 10.8389 11.8874 11.8874 10.8389 10 -10 11.8874 14.2467 14.2467 11.8874 10 -10 11.8874 14.2467 14.2467 11.8874 10 -10 10.8389 11.8874 11.8874 10.8389 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.8389 11.8874 11.8874 10.8389 10 +10 11.8874 14.2467 14.2467 11.8874 10 +10 11.8874 14.2467 14.2467 11.8874 10 +10 10.8389 11.8874 11.8874 10.8389 10 +10 10 10 10 10 10 Species 6 -10 10 10 10 10 10 -10 11.0066 12.2649 12.2649 11.0066 10 -10 12.2649 15.0961 15.0961 12.2649 10 -10 12.2649 15.0961 15.0961 12.2649 10 -10 11.0066 12.2649 12.2649 11.0066 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 11.0066 12.2649 12.2649 11.0066 10 +10 12.2649 15.0961 15.0961 12.2649 10 +10 12.2649 15.0961 15.0961 12.2649 10 +10 11.0066 12.2649 12.2649 11.0066 10 +10 10 10 10 10 10 t = 1.00e-08 nst = 3 nfe = 0 nfi = 45 nni = 27 hu = 6.86e-08 @@ -87,52 +87,52 @@ t = 1.00e-06 nst = 4 nfe = 0 nfi = 77 nni = 49 hu = 1.20e-06 c values at t = 1e-06: Species 1 -9.99991 9.99992 9.99993 9.99993 9.99993 9.99992 -9.99992 10.1677 10.3774 10.3774 10.1677 9.99993 -9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 -9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 -9.99992 10.1677 10.3774 10.3774 10.1677 9.99992 -9.99991 9.99992 9.99993 9.99993 9.99992 9.99991 +9.99991 9.99992 9.99993 9.99993 9.99993 9.99992 +9.99992 10.1677 10.3774 10.3774 10.1677 9.99993 +9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 +9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 +9.99992 10.1677 10.3774 10.3774 10.1677 9.99992 +9.99991 9.99992 9.99993 9.99993 9.99992 9.99991 Species 2 -9.99991 9.99993 9.99995 9.99995 9.99993 9.99992 -9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 -9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 -9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 -9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 -9.99991 9.99993 9.99995 9.99995 9.99993 9.99991 +9.99991 9.99993 9.99995 9.99995 9.99993 9.99992 +9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 +9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 +9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 +9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 +9.99991 9.99993 9.99995 9.99995 9.99993 9.99991 Species 3 -9.99991 9.99994 9.99997 9.99997 9.99994 9.99992 -9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 -9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 -9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 -9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 -9.99991 9.99994 9.99997 9.99997 9.99994 9.99991 +9.99991 9.99994 9.99997 9.99997 9.99994 9.99992 +9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 +9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 +9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 +9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 +9.99991 9.99994 9.99997 9.99997 9.99994 9.99991 Species 4 -13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 -13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 -13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 -13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 -13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 -13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 +13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 +13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 +13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 +13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 +13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 +13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 Species 5 -13.4981 13.4981 13.4982 13.4981 13.4981 13.4981 -13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 -13.4982 16.4131 20.2351 20.2351 16.4131 13.4981 -13.4982 16.4131 20.2351 20.2351 16.4131 13.4982 -13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 -13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 +13.4981 13.4981 13.4982 13.4981 13.4981 13.4981 +13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 +13.4982 16.4131 20.2351 20.2351 16.4131 13.4981 +13.4982 16.4131 20.2351 20.2351 16.4131 13.4982 +13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 +13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 Species 6 -13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 -13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 -13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 -13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 -13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 -13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 +13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 +13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 +13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 +13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 +13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 +13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 t = 1.00e-05 nst = 12 nfe = 0 nfi = 197 nni = 129 hu = 1.19e-06 @@ -143,52 +143,52 @@ t = 1.00e-03 nst = 46 nfe = 0 nfi = 820 nni = 582 hu = 8.40e-03 c values at t = 0.001: Species 1 -9.90702 9.91664 9.92836 9.93033 9.92253 9.91674 -9.91472 10.0747 10.2769 10.2785 10.0795 9.92253 -9.92446 10.2748 10.7181 10.7194 10.2785 9.93033 -9.92445 10.2744 10.7173 10.7181 10.2769 9.92836 -9.91469 10.0734 10.2744 10.2748 10.0747 9.91664 -9.90697 9.91469 9.92445 9.92446 9.91472 9.90702 +9.90702 9.91664 9.92836 9.93033 9.92253 9.91674 +9.91472 10.0747 10.2769 10.2785 10.0795 9.92253 +9.92446 10.2748 10.7181 10.7194 10.2785 9.93033 +9.92445 10.2744 10.7173 10.7181 10.2769 9.92836 +9.91469 10.0734 10.2744 10.2748 10.0747 9.91664 +9.90697 9.91469 9.92445 9.92446 9.91472 9.90702 Species 2 -9.90742 9.92474 9.94622 9.94819 9.93064 9.91713 -9.92282 10.2412 10.644 10.6457 10.2461 9.93064 -9.94232 10.6419 11.5267 11.5281 10.6457 9.94819 -9.94231 10.6415 11.5258 11.5267 10.644 9.94622 -9.92279 10.24 10.6415 10.6419 10.2412 9.92474 -9.90737 9.92279 9.94231 9.94232 9.92282 9.90742 +9.90742 9.92474 9.94622 9.94819 9.93064 9.91713 +9.92282 10.2412 10.644 10.6457 10.2461 9.93064 +9.94232 10.6419 11.5267 11.5281 10.6457 9.94819 +9.94231 10.6415 11.5258 11.5267 10.644 9.94622 +9.92279 10.24 10.6415 10.6419 10.2412 9.92474 +9.90737 9.92279 9.94231 9.94232 9.92282 9.90742 Species 3 -9.90781 9.93284 9.96408 9.96605 9.93874 9.91752 -9.93092 10.4078 11.0109 11.0127 10.4127 9.93874 -9.96017 11.0088 12.3339 12.3354 11.0127 9.96605 -9.96016 11.0083 12.333 12.3339 11.0109 9.96408 -9.93089 10.4065 11.0083 11.0088 10.4078 9.93284 -9.90776 9.93089 9.96016 9.96017 9.93092 9.90781 +9.90781 9.93284 9.96408 9.96605 9.93874 9.91752 +9.93092 10.4078 11.0109 11.0127 10.4127 9.93874 +9.96017 11.0088 12.3339 12.3354 11.0127 9.96605 +9.96016 11.0083 12.333 12.3339 11.0109 9.96408 +9.93089 10.4065 11.0083 11.0088 10.4078 9.93284 +9.90776 9.93089 9.96016 9.96017 9.93092 9.90781 Species 4 -297231 297750 298393 298451 297925 297520 -297692 307245 319327 319378 307390 297925 -298276 319264 345799 345840 319378 298451 -298276 319252 345772 345799 319327 298393 -297691 307208 319252 319264 307245 297750 -297229 297691 298276 298276 297692 297231 +297231 297750 298393 298451 297925 297520 +297692 307245 319327 319378 307390 297925 +298276 319264 345799 345840 319378 298451 +298276 319252 345772 345799 319327 298393 +297691 307208 319252 319264 307245 297750 +297229 297691 298276 298276 297692 297231 Species 5 -297231 297750 298393 298451 297925 297520 -297692 307245 319327 319378 307390 297925 -298276 319264 345799 345840 319378 298451 -298276 319252 345772 345799 319327 298393 -297691 307208 319252 319264 307245 297750 -297229 297691 298276 298276 297692 297231 +297231 297750 298393 298451 297925 297520 +297692 307245 319327 319378 307390 297925 +298276 319264 345799 345840 319378 298451 +298276 319252 345772 345799 319327 298393 +297691 307208 319252 319264 307245 297750 +297229 297691 298276 298276 297692 297231 Species 6 -297231 297750 298393 298451 297925 297520 -297692 307245 319327 319378 307390 297925 -298276 319264 345799 345840 319378 298451 -298276 319252 345772 345799 319327 298393 -297691 307208 319252 319264 307245 297750 -297229 297691 298276 298276 297692 297231 +297231 297750 298393 298451 297925 297520 +297692 307245 319327 319378 307390 297925 +298276 319264 345799 345840 319378 298451 +298276 319252 345772 345799 319327 298393 +297691 307208 319252 319264 307245 297750 +297229 297691 298276 298276 297692 297231 t = 1.00e-02 nst = 47 nfe = 0 nfi = 840 nni = 597 hu = 1.32e-02 @@ -199,52 +199,52 @@ t = 1.00e+00 nst = 69 nfe = 0 nfi = 1259 nni = 904 hu = 5.51e-02 c values at t = 1: Species 1 -1.58852 1.59924 1.62152 1.64765 1.67037 1.68149 -1.58533 1.59504 1.61548 1.63952 1.66033 1.67037 -1.57757 1.58548 1.6024 1.62235 1.63952 1.64765 -1.56821 1.57412 1.58706 1.6024 1.61548 1.62152 -1.56049 1.56463 1.57412 1.58548 1.59504 1.59924 -1.55733 1.56049 1.56821 1.57757 1.58533 1.58852 +1.58852 1.59924 1.62152 1.64765 1.67037 1.68149 +1.58533 1.59504 1.61548 1.63952 1.66033 1.67037 +1.57757 1.58548 1.6024 1.62235 1.63952 1.64765 +1.56821 1.57412 1.58706 1.6024 1.61548 1.62152 +1.56049 1.56463 1.57412 1.58548 1.59504 1.59924 +1.55733 1.56049 1.56821 1.57757 1.58533 1.58852 Species 2 -1.59067 1.60141 1.62371 1.64987 1.67262 1.68376 -1.58749 1.5972 1.61767 1.64174 1.66257 1.67262 -1.57972 1.58763 1.60457 1.62455 1.64174 1.64987 -1.57034 1.57627 1.58922 1.60457 1.61767 1.62371 -1.56261 1.56677 1.57627 1.58763 1.5972 1.60141 -1.55945 1.56261 1.57034 1.57972 1.58749 1.59067 +1.59067 1.60141 1.62371 1.64987 1.67262 1.68376 +1.58749 1.5972 1.61767 1.64174 1.66257 1.67262 +1.57972 1.58763 1.60457 1.62455 1.64174 1.64987 +1.57034 1.57627 1.58922 1.60457 1.61767 1.62371 +1.56261 1.56677 1.57627 1.58763 1.5972 1.60141 +1.55945 1.56261 1.57034 1.57972 1.58749 1.59067 Species 3 -1.59271 1.60346 1.62579 1.65198 1.67474 1.6859 -1.58952 1.59925 1.61974 1.64383 1.66469 1.67474 -1.58174 1.58967 1.60662 1.62662 1.64383 1.65198 -1.57236 1.57829 1.59126 1.60662 1.61974 1.62579 -1.56462 1.56878 1.57829 1.58967 1.59925 1.60346 -1.56146 1.56462 1.57236 1.58174 1.58952 1.59271 +1.59271 1.60346 1.62579 1.65198 1.67474 1.6859 +1.58952 1.59925 1.61974 1.64383 1.66469 1.67474 +1.58174 1.58967 1.60662 1.62662 1.64383 1.65198 +1.57236 1.57829 1.59126 1.60662 1.61974 1.62579 +1.56462 1.56878 1.57829 1.58967 1.59925 1.60346 +1.56146 1.56462 1.57236 1.58174 1.58952 1.59271 Species 4 -47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 -47622.9 47914.2 48528 49249.8 49874.6 50175.6 -47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 -47108.7 47286.2 47674.7 48135.1 48528 48709.2 -46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 -46782 46876.8 47108.7 47389.8 47622.9 47718.5 +47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 +47622.9 47914.2 48528 49249.8 49874.6 50175.6 +47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 +47108.7 47286.2 47674.7 48135.1 48528 48709.2 +46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 +46782 46876.8 47108.7 47389.8 47622.9 47718.5 Species 5 -47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 -47622.9 47914.2 48528 49249.8 49874.6 50175.6 -47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 -47108.7 47286.2 47674.7 48135.1 48528 48709.2 -46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 -46782 46876.8 47108.7 47389.8 47622.9 47718.5 +47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 +47622.9 47914.2 48528 49249.8 49874.6 50175.6 +47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 +47108.7 47286.2 47674.7 48135.1 48528 48709.2 +46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 +46782 46876.8 47108.7 47389.8 47622.9 47718.5 Species 6 -47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 -47622.9 47914.2 48528 49249.8 49874.6 50175.6 -47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 -47108.7 47286.2 47674.7 48135.1 48528 48709.2 -46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 -46782 46876.8 47108.7 47389.8 47622.9 47718.5 +47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 +47622.9 47914.2 48528 49249.8 49874.6 50175.6 +47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 +47108.7 47286.2 47674.7 48135.1 48528 48709.2 +46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 +46782 46876.8 47108.7 47389.8 47622.9 47718.5 t = 2.00e+00 nst = 81 nfe = 0 nfi = 1463 nni = 1048 hu = 1.54e-01 @@ -255,52 +255,52 @@ t = 4.00e+00 nst = 95 nfe = 0 nfi = 1708 nni = 1221 hu = 2.69e-01 c values at t = 4: Species 1 -1.19535 1.20368 1.2211 1.24157 1.25935 1.268 -1.1928 1.20035 1.21636 1.23523 1.25154 1.25935 -1.18657 1.19274 1.20602 1.22173 1.23523 1.24157 -1.17904 1.18368 1.19389 1.20602 1.21636 1.2211 -1.17284 1.17613 1.18368 1.19274 1.20035 1.20368 -1.17032 1.17284 1.17904 1.18657 1.1928 1.19535 +1.19535 1.20368 1.2211 1.24157 1.25935 1.268 +1.1928 1.20035 1.21636 1.23523 1.25154 1.25935 +1.18657 1.19274 1.20602 1.22173 1.23523 1.24157 +1.17904 1.18368 1.19389 1.20602 1.21636 1.2211 +1.17284 1.17613 1.18368 1.19274 1.20035 1.20368 +1.17032 1.17284 1.17904 1.18657 1.1928 1.19535 Species 2 -1.19538 1.20371 1.22113 1.24161 1.25938 1.26804 -1.19284 1.20038 1.21639 1.23526 1.25157 1.25938 -1.1866 1.19277 1.20606 1.22177 1.23526 1.24161 -1.17908 1.18371 1.19393 1.20606 1.21639 1.22113 -1.17288 1.17616 1.18371 1.19277 1.20038 1.20371 -1.17035 1.17288 1.17908 1.1866 1.19284 1.19538 +1.19538 1.20371 1.22113 1.24161 1.25938 1.26804 +1.19284 1.20038 1.21639 1.23526 1.25157 1.25938 +1.1866 1.19277 1.20606 1.22177 1.23526 1.24161 +1.17908 1.18371 1.19393 1.20606 1.21639 1.22113 +1.17288 1.17616 1.18371 1.19277 1.20038 1.20371 +1.17035 1.17288 1.17908 1.1866 1.19284 1.19538 Species 3 -1.19542 1.20374 1.22116 1.24164 1.25942 1.26807 -1.19287 1.20042 1.21643 1.2353 1.25161 1.25942 -1.18663 1.1928 1.20609 1.2218 1.2353 1.24164 -1.17911 1.18374 1.19396 1.20609 1.21643 1.22116 -1.17291 1.17619 1.18374 1.1928 1.20042 1.20374 -1.17039 1.17291 1.17911 1.18663 1.19287 1.19542 +1.19542 1.20374 1.22116 1.24164 1.25942 1.26807 +1.19287 1.20042 1.21643 1.2353 1.25161 1.25942 +1.18663 1.1928 1.20609 1.2218 1.2353 1.24164 +1.17911 1.18374 1.19396 1.20609 1.21643 1.22116 +1.17291 1.17619 1.18374 1.1928 1.20042 1.20374 +1.17039 1.17291 1.17911 1.18663 1.19287 1.19542 Species 4 -35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 -35597.2 35782 36180.5 36651.6 37056.3 37246.5 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 +35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35597.2 35782 36180.5 36651.6 37056.3 37246.5 +35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.4 35782 36010.4 36110.2 +35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 Species 5 -35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 -35597.2 35782 36180.5 36651.6 37056.3 37246.5 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 +35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35597.2 35782 36180.5 36651.6 37056.3 37246.5 +35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.4 35782 36010.4 36110.2 +35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 Species 6 -35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 -35597.2 35782 36180.5 36651.6 37056.3 37246.5 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 +35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35597.2 35782 36180.5 36651.6 37056.3 37246.5 +35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.4 35782 36010.4 36110.2 +35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 t = 5.00e+00 nst = 98 nfe = 0 nfi = 1767 nni = 1262 hu = 3.36e-01 @@ -311,52 +311,52 @@ t = 7.00e+00 nst = 100 nfe = 0 nfi = 1798 nni = 1283 hu = 2.99e+00 c values at t = 7: Species 1 -1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 -1.18601 1.19352 1.20945 1.22822 1.24445 1.25222 -1.17981 1.18594 1.19917 1.2148 1.22822 1.23454 -1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 -1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 -1.16363 1.16615 1.17232 1.17981 1.18601 1.18855 +1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 +1.18601 1.19352 1.20945 1.22822 1.24445 1.25222 +1.17981 1.18594 1.19917 1.2148 1.22822 1.23454 +1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 +1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 +1.16363 1.16615 1.17232 1.17981 1.18601 1.18855 Species 2 -1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 -1.18601 1.19352 1.20945 1.22823 1.24445 1.25222 -1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 -1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 -1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 -1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 +1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 +1.18601 1.19352 1.20945 1.22823 1.24445 1.25222 +1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 +1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 +1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 +1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 Species 3 -1.18855 1.19684 1.21416 1.23454 1.25223 1.26083 -1.18601 1.19352 1.20945 1.22823 1.24445 1.25223 -1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 -1.17232 1.17693 1.1871 1.19917 1.20945 1.21416 -1.16615 1.16941 1.17693 1.18594 1.19352 1.19684 -1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 +1.18855 1.19684 1.21416 1.23454 1.25223 1.26083 +1.18601 1.19352 1.20945 1.22823 1.24445 1.25223 +1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 +1.17232 1.17693 1.1871 1.19917 1.20945 1.21416 +1.16615 1.16941 1.17693 1.18594 1.19352 1.19684 +1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 Species 4 -35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 -35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 -35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 -35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 -34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 -34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 +35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 +35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 +35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 +35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 +34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 +34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 Species 5 -35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 -35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 -35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 -35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 -34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 -34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 +35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 +35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 +35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 +35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 +34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 +34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 Species 6 -35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 -35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 -35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 -35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 -34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 -34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 +35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 +35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 +35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 +35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 +34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 +34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 t = 8.00e+00 nst = 100 nfe = 0 nfi = 1798 nni = 1283 hu = 2.99e+00 @@ -367,75 +367,75 @@ t = 1.00e+01 nst = 101 nfe = 0 nfi = 1813 nni = 1293 hu = 6.31e+00 c values at t = 10: Species 1 -1.18839 1.19667 1.214 1.23437 1.25206 1.26066 -1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 -1.17965 1.18578 1.199 1.21463 1.22806 1.23437 -1.17216 1.17677 1.18693 1.199 1.20929 1.214 -1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 -1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 +1.18839 1.19667 1.214 1.23437 1.25206 1.26066 +1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 +1.17965 1.18578 1.199 1.21463 1.22806 1.23437 +1.17216 1.17677 1.18693 1.199 1.20929 1.214 +1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 +1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 Species 2 -1.18839 1.19667 1.214 1.23437 1.25206 1.26066 -1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 -1.17965 1.18578 1.199 1.21463 1.22806 1.23437 -1.17216 1.17677 1.18693 1.199 1.20929 1.214 -1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 -1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 +1.18839 1.19667 1.214 1.23437 1.25206 1.26066 +1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 +1.17965 1.18578 1.199 1.21463 1.22806 1.23437 +1.17216 1.17677 1.18693 1.199 1.20929 1.214 +1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 +1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 Species 3 -1.18839 1.19667 1.214 1.23437 1.25206 1.26066 -1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 -1.17965 1.18578 1.199 1.21463 1.22806 1.23437 -1.17216 1.17677 1.18693 1.199 1.20929 1.214 -1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 -1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 +1.18839 1.19667 1.214 1.23437 1.25206 1.26066 +1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 +1.17965 1.18578 1.199 1.21463 1.22806 1.23437 +1.17216 1.17677 1.18693 1.199 1.20929 1.214 +1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 +1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 Species 4 -35650.8 35899 36418.5 37029.4 37559.6 37817.5 -35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 -35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 -35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 -34978.7 35076.6 35302.1 35572.4 35799.7 35899 -34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 +35650.8 35899 36418.5 37029.4 37559.6 37817.5 +35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 +35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 +35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 +34978.7 35076.6 35302.1 35572.4 35799.7 35899 +34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 Species 5 -35650.8 35899 36418.5 37029.4 37559.6 37817.5 -35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 -35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 -35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 -34978.7 35076.6 35302.1 35572.4 35799.7 35899 -34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 +35650.8 35899 36418.5 37029.4 37559.6 37817.5 +35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 +35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 +35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 +34978.7 35076.6 35302.1 35572.4 35799.7 35899 +34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 Species 6 -35650.8 35899 36418.5 37029.4 37559.6 37817.5 -35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 -35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 -35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 -34978.7 35076.6 35302.1 35572.4 35799.7 35899 -34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 +35650.8 35899 36418.5 37029.4 37559.6 37817.5 +35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 +35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 +35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 +34978.7 35076.6 35302.1 35572.4 35799.7 35899 +34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 142 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 101 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 1813 - Number of f-s (SPGMR) = 4359 - Number of f-s (TOTAL) = 4359 - Number of setups = 72 - Number of nonlinear iterations = 1293 - Number of linear iterations = 4359 - Number of preconditioner evaluations = 72 - Number of preconditioner solves = 5618 - Number of error test failures = 1 - Number of nonlinear conv. failures = 25 - Number of linear convergence failures = 238 - Average Krylov subspace dimension = 3.371 + ARKStep real workspace length = 3802 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 101 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 1813 + Number of f-s (SPGMR) = 4359 + Number of f-s (TOTAL) = 4359 + Number of setups = 72 + Number of nonlinear iterations = 1293 + Number of linear iterations = 4359 + Number of preconditioner evaluations = 72 + Number of preconditioner solves = 5618 + Number of error test failures = 1 + Number of nonlinear conv. failures = 25 + Number of linear convergence failures = 238 + Average Krylov subspace dimension = 3.371 ---------------------------------------------------------------------------- @@ -487,24 +487,24 @@ t = 1.00e+01 nst = 101 nfe = 0 nfi = 1813 nni = 1293 hu = 6.31e+00 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 142 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 101 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 1813 - Number of f-s (SPGMR) = 4359 - Number of f-s (TOTAL) = 4359 - Number of setups = 72 - Number of nonlinear iterations = 1293 - Number of linear iterations = 4359 - Number of preconditioner evaluations = 72 - Number of preconditioner solves = 5618 - Number of error test failures = 1 - Number of nonlinear conv. failures = 25 - Number of linear convergence failures = 238 - Average Krylov subspace dimension = 3.371 + ARKStep real workspace length = 3802 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 101 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 1813 + Number of f-s (SPGMR) = 4359 + Number of f-s (TOTAL) = 4359 + Number of setups = 72 + Number of nonlinear iterations = 1293 + Number of linear iterations = 4359 + Number of preconditioner evaluations = 72 + Number of preconditioner solves = 5618 + Number of error test failures = 1 + Number of nonlinear conv. failures = 25 + Number of linear convergence failures = 238 + Average Krylov subspace dimension = 3.371 ---------------------------------------------------------------------------- @@ -556,24 +556,24 @@ t = 1.00e+01 nst = 234 nfe = 0 nfi = 4045 nni = 2856 hu = 3.93e-01 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 142 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 234 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 4045 - Number of f-s (SPGMR) = 10634 - Number of f-s (TOTAL) = 10634 - Number of setups = 277 - Number of nonlinear iterations = 2856 - Number of linear iterations = 10634 - Number of preconditioner evaluations = 277 - Number of preconditioner solves = 13350 - Number of error test failures = 1 - Number of nonlinear conv. failures = 166 - Number of linear convergence failures = 1036 - Average Krylov subspace dimension = 3.723 + ARKStep real workspace length = 3802 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 234 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 4045 + Number of f-s (SPGMR) = 10634 + Number of f-s (TOTAL) = 10634 + Number of setups = 277 + Number of nonlinear iterations = 2856 + Number of linear iterations = 10634 + Number of preconditioner evaluations = 277 + Number of preconditioner solves = 13350 + Number of error test failures = 1 + Number of nonlinear conv. failures = 166 + Number of linear convergence failures = 1036 + Average Krylov subspace dimension = 3.723 ---------------------------------------------------------------------------- @@ -625,24 +625,24 @@ t = 1.00e+01 nst = 234 nfe = 0 nfi = 4045 nni = 2856 hu = 3.93e-01 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 142 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 234 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 4045 - Number of f-s (SPGMR) = 10633 - Number of f-s (TOTAL) = 10633 - Number of setups = 277 - Number of nonlinear iterations = 2856 - Number of linear iterations = 10633 - Number of preconditioner evaluations = 277 - Number of preconditioner solves = 13349 - Number of error test failures = 1 - Number of nonlinear conv. failures = 166 - Number of linear convergence failures = 1036 - Average Krylov subspace dimension = 3.723 + ARKStep real workspace length = 3802 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 234 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 4045 + Number of f-s (SPGMR) = 10633 + Number of f-s (TOTAL) = 10633 + Number of setups = 277 + Number of nonlinear iterations = 2856 + Number of linear iterations = 10633 + Number of preconditioner evaluations = 277 + Number of preconditioner solves = 13349 + Number of error test failures = 1 + Number of nonlinear conv. failures = 166 + Number of linear convergence failures = 1036 + Average Krylov subspace dimension = 3.723 ---------------------------------------------------------------------------- diff --git a/examples/arkode/C_serial/ark_KrylovDemo_prec_1.out b/examples/arkode/C_serial/ark_KrylovDemo_prec_1.out index 1c5be0014a..f501bf8010 100644 --- a/examples/arkode/C_serial/ark_KrylovDemo_prec_1.out +++ b/examples/arkode/C_serial/ark_KrylovDemo_prec_1.out @@ -10,9 +10,9 @@ b parameter = 1 Diffusion coefficients: Dprey = 1 Dpred = 0.5 Rate parameter alpha = 1 -Mesh dimensions (mx,my) are 6, 6. Total system size is neq = 216 +Mesh dimensions (mx,my) are 6, 6. Total system size is neq = 216 -Tolerances: reltol = 1e-05, abstol = 1e-05 +Tolerances: reltol = 1e-05, abstol = 1e-05 Preconditioning uses a product of: (1) Gauss-Seidel iterations with itmax = 5 iterations, and @@ -31,52 +31,52 @@ Gram-Schmidt method type is gstype = SUN_MODIFIED_GS c values at t = 0: Species 1 -10 10 10 10 10 10 -10 10.1678 10.3775 10.3775 10.1678 10 -10 10.3775 10.8493 10.8493 10.3775 10 -10 10.3775 10.8493 10.8493 10.3775 10 -10 10.1678 10.3775 10.3775 10.1678 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.1678 10.3775 10.3775 10.1678 10 +10 10.3775 10.8493 10.8493 10.3775 10 +10 10.3775 10.8493 10.8493 10.3775 10 +10 10.1678 10.3775 10.3775 10.1678 10 +10 10 10 10 10 10 Species 2 -10 10 10 10 10 10 -10 10.3355 10.755 10.755 10.3355 10 -10 10.755 11.6987 11.6987 10.755 10 -10 10.755 11.6987 11.6987 10.755 10 -10 10.3355 10.755 10.755 10.3355 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.3355 10.755 10.755 10.3355 10 +10 10.755 11.6987 11.6987 10.755 10 +10 10.755 11.6987 11.6987 10.755 10 +10 10.3355 10.755 10.755 10.3355 10 +10 10 10 10 10 10 Species 3 -10 10 10 10 10 10 -10 10.5033 11.1325 11.1325 10.5033 10 -10 11.1325 12.548 12.548 11.1325 10 -10 11.1325 12.548 12.548 11.1325 10 -10 10.5033 11.1325 11.1325 10.5033 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.5033 11.1325 11.1325 10.5033 10 +10 11.1325 12.548 12.548 11.1325 10 +10 11.1325 12.548 12.548 11.1325 10 +10 10.5033 11.1325 11.1325 10.5033 10 +10 10 10 10 10 10 Species 4 -10 10 10 10 10 10 -10 10.6711 11.5099 11.5099 10.6711 10 -10 11.5099 13.3974 13.3974 11.5099 10 -10 11.5099 13.3974 13.3974 11.5099 10 -10 10.6711 11.5099 11.5099 10.6711 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.6711 11.5099 11.5099 10.6711 10 +10 11.5099 13.3974 13.3974 11.5099 10 +10 11.5099 13.3974 13.3974 11.5099 10 +10 10.6711 11.5099 11.5099 10.6711 10 +10 10 10 10 10 10 Species 5 -10 10 10 10 10 10 -10 10.8389 11.8874 11.8874 10.8389 10 -10 11.8874 14.2467 14.2467 11.8874 10 -10 11.8874 14.2467 14.2467 11.8874 10 -10 10.8389 11.8874 11.8874 10.8389 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.8389 11.8874 11.8874 10.8389 10 +10 11.8874 14.2467 14.2467 11.8874 10 +10 11.8874 14.2467 14.2467 11.8874 10 +10 10.8389 11.8874 11.8874 10.8389 10 +10 10 10 10 10 10 Species 6 -10 10 10 10 10 10 -10 11.0066 12.2649 12.2649 11.0066 10 -10 12.2649 15.0961 15.0961 12.2649 10 -10 12.2649 15.0961 15.0961 12.2649 10 -10 11.0066 12.2649 12.2649 11.0066 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 11.0066 12.2649 12.2649 11.0066 10 +10 12.2649 15.0961 15.0961 12.2649 10 +10 12.2649 15.0961 15.0961 12.2649 10 +10 11.0066 12.2649 12.2649 11.0066 10 +10 10 10 10 10 10 t = 1.00e-08 nst = 3 nfe = 0 nfi = 45 nni = 27 hu = 6.86e-08 @@ -87,52 +87,52 @@ t = 1.00e-06 nst = 4 nfe = 0 nfi = 77 nni = 49 hu = 1.20e-06 c values at t = 1e-06: Species 1 -9.99991 9.99992 9.99993 9.99993 9.99993 9.99992 -9.99992 10.1677 10.3774 10.3774 10.1677 9.99993 -9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 -9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 -9.99992 10.1677 10.3774 10.3774 10.1677 9.99992 -9.99991 9.99992 9.99993 9.99993 9.99992 9.99991 +9.99991 9.99992 9.99993 9.99993 9.99993 9.99992 +9.99992 10.1677 10.3774 10.3774 10.1677 9.99993 +9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 +9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 +9.99992 10.1677 10.3774 10.3774 10.1677 9.99992 +9.99991 9.99992 9.99993 9.99993 9.99992 9.99991 Species 2 -9.99991 9.99993 9.99995 9.99995 9.99993 9.99992 -9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 -9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 -9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 -9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 -9.99991 9.99993 9.99995 9.99995 9.99993 9.99991 +9.99991 9.99993 9.99995 9.99995 9.99993 9.99992 +9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 +9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 +9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 +9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 +9.99991 9.99993 9.99995 9.99995 9.99993 9.99991 Species 3 -9.99991 9.99994 9.99997 9.99997 9.99994 9.99992 -9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 -9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 -9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 -9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 -9.99991 9.99994 9.99997 9.99997 9.99994 9.99991 +9.99991 9.99994 9.99997 9.99997 9.99994 9.99992 +9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 +9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 +9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 +9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 +9.99991 9.99994 9.99997 9.99997 9.99994 9.99991 Species 4 -13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 -13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 -13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 -13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 -13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 -13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 +13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 +13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 +13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 +13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 +13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 +13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 Species 5 -13.4981 13.4981 13.4982 13.4981 13.4981 13.4981 -13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 -13.4982 16.4131 20.2351 20.2351 16.4131 13.4981 -13.4982 16.4131 20.2351 20.2351 16.4131 13.4982 -13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 -13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 +13.4981 13.4981 13.4982 13.4981 13.4981 13.4981 +13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 +13.4982 16.4131 20.2351 20.2351 16.4131 13.4981 +13.4982 16.4131 20.2351 20.2351 16.4131 13.4982 +13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 +13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 Species 6 -13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 -13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 -13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 -13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 -13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 -13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 +13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 +13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 +13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 +13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 +13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 +13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 t = 1.00e-05 nst = 12 nfe = 0 nfi = 197 nni = 129 hu = 1.19e-06 @@ -143,52 +143,52 @@ t = 1.00e-03 nst = 46 nfe = 0 nfi = 820 nni = 582 hu = 8.40e-03 c values at t = 0.001: Species 1 -9.90702 9.91664 9.92836 9.93033 9.92253 9.91674 -9.91472 10.0747 10.2769 10.2785 10.0795 9.92253 -9.92446 10.2748 10.7181 10.7194 10.2785 9.93033 -9.92445 10.2744 10.7173 10.7181 10.2769 9.92836 -9.91469 10.0734 10.2744 10.2748 10.0747 9.91664 -9.90697 9.91469 9.92445 9.92446 9.91472 9.90702 +9.90702 9.91664 9.92836 9.93033 9.92253 9.91674 +9.91472 10.0747 10.2769 10.2785 10.0795 9.92253 +9.92446 10.2748 10.7181 10.7194 10.2785 9.93033 +9.92445 10.2744 10.7173 10.7181 10.2769 9.92836 +9.91469 10.0734 10.2744 10.2748 10.0747 9.91664 +9.90697 9.91469 9.92445 9.92446 9.91472 9.90702 Species 2 -9.90742 9.92474 9.94622 9.94819 9.93064 9.91713 -9.92282 10.2412 10.644 10.6457 10.2461 9.93064 -9.94232 10.6419 11.5267 11.5281 10.6457 9.94819 -9.94231 10.6415 11.5258 11.5267 10.644 9.94622 -9.92279 10.24 10.6415 10.6419 10.2412 9.92474 -9.90737 9.92279 9.94231 9.94232 9.92282 9.90742 +9.90742 9.92474 9.94622 9.94819 9.93064 9.91713 +9.92282 10.2412 10.644 10.6457 10.2461 9.93064 +9.94232 10.6419 11.5267 11.5281 10.6457 9.94819 +9.94231 10.6415 11.5258 11.5267 10.644 9.94622 +9.92279 10.24 10.6415 10.6419 10.2412 9.92474 +9.90737 9.92279 9.94231 9.94232 9.92282 9.90742 Species 3 -9.90781 9.93284 9.96408 9.96605 9.93874 9.91752 -9.93092 10.4078 11.0109 11.0127 10.4127 9.93874 -9.96017 11.0088 12.3339 12.3354 11.0127 9.96605 -9.96016 11.0083 12.333 12.3339 11.0109 9.96408 -9.93089 10.4065 11.0083 11.0088 10.4078 9.93284 -9.90776 9.93089 9.96016 9.96017 9.93092 9.90781 +9.90781 9.93284 9.96408 9.96605 9.93874 9.91752 +9.93092 10.4078 11.0109 11.0127 10.4127 9.93874 +9.96017 11.0088 12.3339 12.3354 11.0127 9.96605 +9.96016 11.0083 12.333 12.3339 11.0109 9.96408 +9.93089 10.4065 11.0083 11.0088 10.4078 9.93284 +9.90776 9.93089 9.96016 9.96017 9.93092 9.90781 Species 4 -297231 297750 298393 298451 297925 297520 -297692 307245 319327 319378 307390 297925 -298276 319264 345799 345840 319378 298451 -298276 319252 345772 345799 319327 298393 -297691 307208 319252 319264 307245 297750 -297229 297691 298276 298276 297692 297231 +297231 297750 298393 298451 297925 297520 +297692 307245 319327 319378 307390 297925 +298276 319264 345799 345840 319378 298451 +298276 319252 345772 345799 319327 298393 +297691 307208 319252 319264 307245 297750 +297229 297691 298276 298276 297692 297231 Species 5 -297231 297750 298393 298451 297925 297520 -297692 307245 319327 319378 307390 297925 -298276 319264 345799 345840 319378 298451 -298276 319252 345772 345799 319327 298393 -297691 307208 319252 319264 307245 297750 -297229 297691 298276 298276 297692 297231 +297231 297750 298393 298451 297925 297520 +297692 307245 319327 319378 307390 297925 +298276 319264 345799 345840 319378 298451 +298276 319252 345772 345799 319327 298393 +297691 307208 319252 319264 307245 297750 +297229 297691 298276 298276 297692 297231 Species 6 -297231 297750 298393 298451 297925 297520 -297692 307245 319327 319378 307390 297925 -298276 319264 345799 345840 319378 298451 -298276 319252 345772 345799 319327 298393 -297691 307208 319252 319264 307245 297750 -297229 297691 298276 298276 297692 297231 +297231 297750 298393 298451 297925 297520 +297692 307245 319327 319378 307390 297925 +298276 319264 345799 345840 319378 298451 +298276 319252 345772 345799 319327 298393 +297691 307208 319252 319264 307245 297750 +297229 297691 298276 298276 297692 297231 t = 1.00e-02 nst = 47 nfe = 0 nfi = 840 nni = 597 hu = 1.32e-02 @@ -199,52 +199,52 @@ t = 1.00e+00 nst = 69 nfe = 0 nfi = 1259 nni = 904 hu = 5.51e-02 c values at t = 1: Species 1 -1.58852 1.59924 1.62152 1.64765 1.67037 1.68149 -1.58533 1.59504 1.61548 1.63952 1.66033 1.67037 -1.57757 1.58548 1.6024 1.62235 1.63952 1.64765 -1.56821 1.57412 1.58706 1.6024 1.61548 1.62152 -1.56049 1.56463 1.57412 1.58548 1.59504 1.59924 -1.55733 1.56049 1.56821 1.57757 1.58533 1.58852 +1.58852 1.59924 1.62152 1.64765 1.67037 1.68149 +1.58533 1.59504 1.61548 1.63952 1.66033 1.67037 +1.57757 1.58548 1.6024 1.62235 1.63952 1.64765 +1.56821 1.57412 1.58706 1.6024 1.61548 1.62152 +1.56049 1.56463 1.57412 1.58548 1.59504 1.59924 +1.55733 1.56049 1.56821 1.57757 1.58533 1.58852 Species 2 -1.59067 1.60141 1.62371 1.64987 1.67262 1.68376 -1.58749 1.5972 1.61767 1.64174 1.66257 1.67262 -1.57972 1.58763 1.60457 1.62455 1.64174 1.64987 -1.57034 1.57627 1.58922 1.60457 1.61767 1.62371 -1.56261 1.56677 1.57627 1.58763 1.5972 1.60141 -1.55945 1.56261 1.57034 1.57972 1.58749 1.59067 +1.59067 1.60141 1.62371 1.64987 1.67262 1.68376 +1.58749 1.5972 1.61767 1.64174 1.66257 1.67262 +1.57972 1.58763 1.60457 1.62455 1.64174 1.64987 +1.57034 1.57627 1.58922 1.60457 1.61767 1.62371 +1.56261 1.56677 1.57627 1.58763 1.5972 1.60141 +1.55945 1.56261 1.57034 1.57972 1.58749 1.59067 Species 3 -1.59271 1.60346 1.62579 1.65198 1.67474 1.6859 -1.58952 1.59925 1.61974 1.64383 1.66469 1.67474 -1.58174 1.58967 1.60662 1.62662 1.64383 1.65198 -1.57236 1.57829 1.59126 1.60662 1.61974 1.62579 -1.56462 1.56878 1.57829 1.58967 1.59925 1.60346 -1.56146 1.56462 1.57236 1.58174 1.58952 1.59271 +1.59271 1.60346 1.62579 1.65198 1.67474 1.6859 +1.58952 1.59925 1.61974 1.64383 1.66469 1.67474 +1.58174 1.58967 1.60662 1.62662 1.64383 1.65198 +1.57236 1.57829 1.59126 1.60662 1.61974 1.62579 +1.56462 1.56878 1.57829 1.58967 1.59925 1.60346 +1.56146 1.56462 1.57236 1.58174 1.58952 1.59271 Species 4 -47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 -47622.9 47914.2 48528 49249.8 49874.6 50175.6 -47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 -47108.7 47286.2 47674.7 48135.1 48528 48709.2 -46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 -46782 46876.8 47108.7 47389.8 47622.9 47718.5 +47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 +47622.9 47914.2 48528 49249.8 49874.6 50175.6 +47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 +47108.7 47286.2 47674.7 48135.1 48528 48709.2 +46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 +46782 46876.8 47108.7 47389.8 47622.9 47718.5 Species 5 -47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 -47622.9 47914.2 48528 49249.8 49874.6 50175.6 -47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 -47108.7 47286.2 47674.7 48135.1 48528 48709.2 -46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 -46782 46876.8 47108.7 47389.8 47622.9 47718.5 +47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 +47622.9 47914.2 48528 49249.8 49874.6 50175.6 +47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 +47108.7 47286.2 47674.7 48135.1 48528 48709.2 +46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 +46782 46876.8 47108.7 47389.8 47622.9 47718.5 Species 6 -47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 -47622.9 47914.2 48528 49249.8 49874.6 50175.6 -47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 -47108.7 47286.2 47674.7 48135.1 48528 48709.2 -46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 -46782 46876.8 47108.7 47389.8 47622.9 47718.5 +47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 +47622.9 47914.2 48528 49249.8 49874.6 50175.6 +47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 +47108.7 47286.2 47674.7 48135.1 48528 48709.2 +46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 +46782 46876.8 47108.7 47389.8 47622.9 47718.5 t = 2.00e+00 nst = 81 nfe = 0 nfi = 1463 nni = 1048 hu = 1.54e-01 @@ -255,52 +255,52 @@ t = 4.00e+00 nst = 95 nfe = 0 nfi = 1708 nni = 1221 hu = 2.69e-01 c values at t = 4: Species 1 -1.19535 1.20368 1.2211 1.24157 1.25935 1.268 -1.1928 1.20035 1.21636 1.23523 1.25154 1.25935 -1.18657 1.19274 1.20602 1.22173 1.23523 1.24157 -1.17904 1.18368 1.19389 1.20602 1.21636 1.2211 -1.17284 1.17613 1.18368 1.19274 1.20035 1.20368 -1.17032 1.17284 1.17904 1.18657 1.1928 1.19535 +1.19535 1.20368 1.2211 1.24157 1.25935 1.268 +1.1928 1.20035 1.21636 1.23523 1.25154 1.25935 +1.18657 1.19274 1.20602 1.22173 1.23523 1.24157 +1.17904 1.18368 1.19389 1.20602 1.21636 1.2211 +1.17284 1.17613 1.18368 1.19274 1.20035 1.20368 +1.17032 1.17284 1.17904 1.18657 1.1928 1.19535 Species 2 -1.19538 1.20371 1.22113 1.24161 1.25938 1.26804 -1.19284 1.20038 1.21639 1.23526 1.25157 1.25938 -1.1866 1.19277 1.20606 1.22177 1.23526 1.24161 -1.17908 1.18371 1.19393 1.20606 1.21639 1.22113 -1.17288 1.17616 1.18371 1.19277 1.20038 1.20371 -1.17035 1.17288 1.17908 1.1866 1.19284 1.19538 +1.19538 1.20371 1.22113 1.24161 1.25938 1.26804 +1.19284 1.20038 1.21639 1.23526 1.25157 1.25938 +1.1866 1.19277 1.20606 1.22177 1.23526 1.24161 +1.17908 1.18371 1.19393 1.20606 1.21639 1.22113 +1.17288 1.17616 1.18371 1.19277 1.20038 1.20371 +1.17035 1.17288 1.17908 1.1866 1.19284 1.19538 Species 3 -1.19542 1.20374 1.22116 1.24164 1.25942 1.26807 -1.19287 1.20042 1.21643 1.2353 1.25161 1.25942 -1.18663 1.1928 1.20609 1.2218 1.2353 1.24164 -1.17911 1.18374 1.19396 1.20609 1.21643 1.22116 -1.17291 1.17619 1.18374 1.1928 1.20042 1.20374 -1.17039 1.17291 1.17911 1.18663 1.19287 1.19542 +1.19542 1.20374 1.22116 1.24164 1.25942 1.26807 +1.19287 1.20042 1.21643 1.2353 1.25161 1.25942 +1.18663 1.1928 1.20609 1.2218 1.2353 1.24164 +1.17911 1.18374 1.19396 1.20609 1.21643 1.22116 +1.17291 1.17619 1.18374 1.1928 1.20042 1.20374 +1.17039 1.17291 1.17911 1.18663 1.19287 1.19542 Species 4 -35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 -35597.2 35782 36180.5 36651.6 37056.3 37246.5 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 +35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35597.2 35782 36180.5 36651.6 37056.3 37246.5 +35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.4 35782 36010.4 36110.2 +35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 Species 5 -35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 -35597.2 35782 36180.5 36651.6 37056.3 37246.5 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 +35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35597.2 35782 36180.5 36651.6 37056.3 37246.5 +35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.4 35782 36010.4 36110.2 +35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 Species 6 -35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 -35597.2 35782 36180.5 36651.6 37056.3 37246.5 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 +35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35597.2 35782 36180.5 36651.6 37056.3 37246.5 +35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.4 35782 36010.4 36110.2 +35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 t = 5.00e+00 nst = 98 nfe = 0 nfi = 1767 nni = 1262 hu = 3.36e-01 @@ -311,52 +311,52 @@ t = 7.00e+00 nst = 100 nfe = 0 nfi = 1798 nni = 1283 hu = 2.99e+00 c values at t = 7: Species 1 -1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 -1.18601 1.19352 1.20945 1.22822 1.24445 1.25222 -1.17981 1.18594 1.19917 1.2148 1.22822 1.23454 -1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 -1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 -1.16363 1.16615 1.17232 1.17981 1.18601 1.18855 +1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 +1.18601 1.19352 1.20945 1.22822 1.24445 1.25222 +1.17981 1.18594 1.19917 1.2148 1.22822 1.23454 +1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 +1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 +1.16363 1.16615 1.17232 1.17981 1.18601 1.18855 Species 2 -1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 -1.18601 1.19352 1.20945 1.22823 1.24445 1.25222 -1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 -1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 -1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 -1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 +1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 +1.18601 1.19352 1.20945 1.22823 1.24445 1.25222 +1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 +1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 +1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 +1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 Species 3 -1.18855 1.19684 1.21416 1.23454 1.25223 1.26083 -1.18601 1.19352 1.20945 1.22823 1.24445 1.25223 -1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 -1.17232 1.17693 1.1871 1.19917 1.20945 1.21416 -1.16615 1.16941 1.17693 1.18594 1.19352 1.19684 -1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 +1.18855 1.19684 1.21416 1.23454 1.25223 1.26083 +1.18601 1.19352 1.20945 1.22823 1.24445 1.25223 +1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 +1.17232 1.17693 1.1871 1.19917 1.20945 1.21416 +1.16615 1.16941 1.17693 1.18594 1.19352 1.19684 +1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 Species 4 -35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 -35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 -35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 -35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 -34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 -34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 +35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 +35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 +35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 +35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 +34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 +34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 Species 5 -35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 -35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 -35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 -35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 -34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 -34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 +35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 +35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 +35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 +35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 +34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 +34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 Species 6 -35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 -35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 -35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 -35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 -34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 -34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 +35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 +35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 +35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 +35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 +34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 +34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 t = 8.00e+00 nst = 100 nfe = 0 nfi = 1798 nni = 1283 hu = 2.99e+00 @@ -367,75 +367,75 @@ t = 1.00e+01 nst = 101 nfe = 0 nfi = 1813 nni = 1293 hu = 6.31e+00 c values at t = 10: Species 1 -1.18839 1.19667 1.214 1.23437 1.25206 1.26066 -1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 -1.17965 1.18578 1.199 1.21463 1.22806 1.23437 -1.17216 1.17677 1.18693 1.199 1.20929 1.214 -1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 -1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 +1.18839 1.19667 1.214 1.23437 1.25206 1.26066 +1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 +1.17965 1.18578 1.199 1.21463 1.22806 1.23437 +1.17216 1.17677 1.18693 1.199 1.20929 1.214 +1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 +1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 Species 2 -1.18839 1.19667 1.214 1.23437 1.25206 1.26066 -1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 -1.17965 1.18578 1.199 1.21463 1.22806 1.23437 -1.17216 1.17677 1.18693 1.199 1.20929 1.214 -1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 -1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 +1.18839 1.19667 1.214 1.23437 1.25206 1.26066 +1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 +1.17965 1.18578 1.199 1.21463 1.22806 1.23437 +1.17216 1.17677 1.18693 1.199 1.20929 1.214 +1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 +1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 Species 3 -1.18839 1.19667 1.214 1.23437 1.25206 1.26066 -1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 -1.17965 1.18578 1.199 1.21463 1.22806 1.23437 -1.17216 1.17677 1.18693 1.199 1.20929 1.214 -1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 -1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 +1.18839 1.19667 1.214 1.23437 1.25206 1.26066 +1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 +1.17965 1.18578 1.199 1.21463 1.22806 1.23437 +1.17216 1.17677 1.18693 1.199 1.20929 1.214 +1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 +1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 Species 4 -35650.8 35899 36418.5 37029.4 37559.6 37817.5 -35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 -35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 -35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 -34978.7 35076.6 35302.1 35572.4 35799.7 35899 -34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 +35650.8 35899 36418.5 37029.4 37559.6 37817.5 +35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 +35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 +35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 +34978.7 35076.6 35302.1 35572.4 35799.7 35899 +34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 Species 5 -35650.8 35899 36418.5 37029.4 37559.6 37817.5 -35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 -35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 -35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 -34978.7 35076.6 35302.1 35572.4 35799.7 35899 -34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 +35650.8 35899 36418.5 37029.4 37559.6 37817.5 +35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 +35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 +35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 +34978.7 35076.6 35302.1 35572.4 35799.7 35899 +34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 Species 6 -35650.8 35899 36418.5 37029.4 37559.6 37817.5 -35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 -35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 -35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 -34978.7 35076.6 35302.1 35572.4 35799.7 35899 -34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 +35650.8 35899 36418.5 37029.4 37559.6 37817.5 +35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 +35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 +35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 +34978.7 35076.6 35302.1 35572.4 35799.7 35899 +34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 142 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 101 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 1813 - Number of f-s (SPGMR) = 4359 - Number of f-s (TOTAL) = 4359 - Number of setups = 72 - Number of nonlinear iterations = 1293 - Number of linear iterations = 4359 - Number of preconditioner evaluations = 72 - Number of preconditioner solves = 5618 - Number of error test failures = 1 - Number of nonlinear conv. failures = 25 - Number of linear convergence failures = 238 - Average Krylov subspace dimension = 3.371 + ARKStep real workspace length = 3802 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 101 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 1813 + Number of f-s (SPGMR) = 4359 + Number of f-s (TOTAL) = 4359 + Number of setups = 72 + Number of nonlinear iterations = 1293 + Number of linear iterations = 4359 + Number of preconditioner evaluations = 72 + Number of preconditioner solves = 5618 + Number of error test failures = 1 + Number of nonlinear conv. failures = 25 + Number of linear convergence failures = 238 + Average Krylov subspace dimension = 3.371 ---------------------------------------------------------------------------- @@ -487,24 +487,24 @@ t = 1.00e+01 nst = 101 nfe = 0 nfi = 1813 nni = 1293 hu = 6.31e+00 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 142 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 101 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 1813 - Number of f-s (SPGMR) = 4359 - Number of f-s (TOTAL) = 4359 - Number of setups = 72 - Number of nonlinear iterations = 1293 - Number of linear iterations = 4359 - Number of preconditioner evaluations = 72 - Number of preconditioner solves = 5618 - Number of error test failures = 1 - Number of nonlinear conv. failures = 25 - Number of linear convergence failures = 238 - Average Krylov subspace dimension = 3.371 + ARKStep real workspace length = 3802 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 101 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 1813 + Number of f-s (SPGMR) = 4359 + Number of f-s (TOTAL) = 4359 + Number of setups = 72 + Number of nonlinear iterations = 1293 + Number of linear iterations = 4359 + Number of preconditioner evaluations = 72 + Number of preconditioner solves = 5618 + Number of error test failures = 1 + Number of nonlinear conv. failures = 25 + Number of linear convergence failures = 238 + Average Krylov subspace dimension = 3.371 ---------------------------------------------------------------------------- @@ -556,24 +556,24 @@ t = 1.00e+01 nst = 234 nfe = 0 nfi = 4045 nni = 2856 hu = 3.93e-01 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 142 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 234 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 4045 - Number of f-s (SPGMR) = 10634 - Number of f-s (TOTAL) = 10634 - Number of setups = 277 - Number of nonlinear iterations = 2856 - Number of linear iterations = 10634 - Number of preconditioner evaluations = 277 - Number of preconditioner solves = 13350 - Number of error test failures = 1 - Number of nonlinear conv. failures = 166 - Number of linear convergence failures = 1036 - Average Krylov subspace dimension = 3.723 + ARKStep real workspace length = 3802 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 234 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 4045 + Number of f-s (SPGMR) = 10634 + Number of f-s (TOTAL) = 10634 + Number of setups = 277 + Number of nonlinear iterations = 2856 + Number of linear iterations = 10634 + Number of preconditioner evaluations = 277 + Number of preconditioner solves = 13350 + Number of error test failures = 1 + Number of nonlinear conv. failures = 166 + Number of linear convergence failures = 1036 + Average Krylov subspace dimension = 3.723 ---------------------------------------------------------------------------- @@ -625,24 +625,24 @@ t = 1.00e+01 nst = 234 nfe = 0 nfi = 4045 nni = 2856 hu = 3.93e-01 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 142 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 234 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 4045 - Number of f-s (SPGMR) = 10633 - Number of f-s (TOTAL) = 10633 - Number of setups = 277 - Number of nonlinear iterations = 2856 - Number of linear iterations = 10633 - Number of preconditioner evaluations = 277 - Number of preconditioner solves = 13349 - Number of error test failures = 1 - Number of nonlinear conv. failures = 166 - Number of linear convergence failures = 1036 - Average Krylov subspace dimension = 3.723 + ARKStep real workspace length = 3802 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 234 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 4045 + Number of f-s (SPGMR) = 10633 + Number of f-s (TOTAL) = 10633 + Number of setups = 277 + Number of nonlinear iterations = 2856 + Number of linear iterations = 10633 + Number of preconditioner evaluations = 277 + Number of preconditioner solves = 13349 + Number of error test failures = 1 + Number of nonlinear conv. failures = 166 + Number of linear convergence failures = 1036 + Average Krylov subspace dimension = 3.723 ---------------------------------------------------------------------------- diff --git a/examples/arkode/C_serial/ark_KrylovDemo_prec_2.out b/examples/arkode/C_serial/ark_KrylovDemo_prec_2.out index 1c5be0014a..f501bf8010 100644 --- a/examples/arkode/C_serial/ark_KrylovDemo_prec_2.out +++ b/examples/arkode/C_serial/ark_KrylovDemo_prec_2.out @@ -10,9 +10,9 @@ b parameter = 1 Diffusion coefficients: Dprey = 1 Dpred = 0.5 Rate parameter alpha = 1 -Mesh dimensions (mx,my) are 6, 6. Total system size is neq = 216 +Mesh dimensions (mx,my) are 6, 6. Total system size is neq = 216 -Tolerances: reltol = 1e-05, abstol = 1e-05 +Tolerances: reltol = 1e-05, abstol = 1e-05 Preconditioning uses a product of: (1) Gauss-Seidel iterations with itmax = 5 iterations, and @@ -31,52 +31,52 @@ Gram-Schmidt method type is gstype = SUN_MODIFIED_GS c values at t = 0: Species 1 -10 10 10 10 10 10 -10 10.1678 10.3775 10.3775 10.1678 10 -10 10.3775 10.8493 10.8493 10.3775 10 -10 10.3775 10.8493 10.8493 10.3775 10 -10 10.1678 10.3775 10.3775 10.1678 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.1678 10.3775 10.3775 10.1678 10 +10 10.3775 10.8493 10.8493 10.3775 10 +10 10.3775 10.8493 10.8493 10.3775 10 +10 10.1678 10.3775 10.3775 10.1678 10 +10 10 10 10 10 10 Species 2 -10 10 10 10 10 10 -10 10.3355 10.755 10.755 10.3355 10 -10 10.755 11.6987 11.6987 10.755 10 -10 10.755 11.6987 11.6987 10.755 10 -10 10.3355 10.755 10.755 10.3355 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.3355 10.755 10.755 10.3355 10 +10 10.755 11.6987 11.6987 10.755 10 +10 10.755 11.6987 11.6987 10.755 10 +10 10.3355 10.755 10.755 10.3355 10 +10 10 10 10 10 10 Species 3 -10 10 10 10 10 10 -10 10.5033 11.1325 11.1325 10.5033 10 -10 11.1325 12.548 12.548 11.1325 10 -10 11.1325 12.548 12.548 11.1325 10 -10 10.5033 11.1325 11.1325 10.5033 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.5033 11.1325 11.1325 10.5033 10 +10 11.1325 12.548 12.548 11.1325 10 +10 11.1325 12.548 12.548 11.1325 10 +10 10.5033 11.1325 11.1325 10.5033 10 +10 10 10 10 10 10 Species 4 -10 10 10 10 10 10 -10 10.6711 11.5099 11.5099 10.6711 10 -10 11.5099 13.3974 13.3974 11.5099 10 -10 11.5099 13.3974 13.3974 11.5099 10 -10 10.6711 11.5099 11.5099 10.6711 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.6711 11.5099 11.5099 10.6711 10 +10 11.5099 13.3974 13.3974 11.5099 10 +10 11.5099 13.3974 13.3974 11.5099 10 +10 10.6711 11.5099 11.5099 10.6711 10 +10 10 10 10 10 10 Species 5 -10 10 10 10 10 10 -10 10.8389 11.8874 11.8874 10.8389 10 -10 11.8874 14.2467 14.2467 11.8874 10 -10 11.8874 14.2467 14.2467 11.8874 10 -10 10.8389 11.8874 11.8874 10.8389 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 10.8389 11.8874 11.8874 10.8389 10 +10 11.8874 14.2467 14.2467 11.8874 10 +10 11.8874 14.2467 14.2467 11.8874 10 +10 10.8389 11.8874 11.8874 10.8389 10 +10 10 10 10 10 10 Species 6 -10 10 10 10 10 10 -10 11.0066 12.2649 12.2649 11.0066 10 -10 12.2649 15.0961 15.0961 12.2649 10 -10 12.2649 15.0961 15.0961 12.2649 10 -10 11.0066 12.2649 12.2649 11.0066 10 -10 10 10 10 10 10 +10 10 10 10 10 10 +10 11.0066 12.2649 12.2649 11.0066 10 +10 12.2649 15.0961 15.0961 12.2649 10 +10 12.2649 15.0961 15.0961 12.2649 10 +10 11.0066 12.2649 12.2649 11.0066 10 +10 10 10 10 10 10 t = 1.00e-08 nst = 3 nfe = 0 nfi = 45 nni = 27 hu = 6.86e-08 @@ -87,52 +87,52 @@ t = 1.00e-06 nst = 4 nfe = 0 nfi = 77 nni = 49 hu = 1.20e-06 c values at t = 1e-06: Species 1 -9.99991 9.99992 9.99993 9.99993 9.99993 9.99992 -9.99992 10.1677 10.3774 10.3774 10.1677 9.99993 -9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 -9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 -9.99992 10.1677 10.3774 10.3774 10.1677 9.99992 -9.99991 9.99992 9.99993 9.99993 9.99992 9.99991 +9.99991 9.99992 9.99993 9.99993 9.99993 9.99992 +9.99992 10.1677 10.3774 10.3774 10.1677 9.99993 +9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 +9.99993 10.3774 10.8492 10.8492 10.3774 9.99993 +9.99992 10.1677 10.3774 10.3774 10.1677 9.99992 +9.99991 9.99992 9.99993 9.99993 9.99992 9.99991 Species 2 -9.99991 9.99993 9.99995 9.99995 9.99993 9.99992 -9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 -9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 -9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 -9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 -9.99991 9.99993 9.99995 9.99995 9.99993 9.99991 +9.99991 9.99993 9.99995 9.99995 9.99993 9.99992 +9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 +9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 +9.99995 10.7549 11.6985 11.6985 10.7549 9.99995 +9.99993 10.3355 10.7549 10.7549 10.3355 9.99993 +9.99991 9.99993 9.99995 9.99995 9.99993 9.99991 Species 3 -9.99991 9.99994 9.99997 9.99997 9.99994 9.99992 -9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 -9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 -9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 -9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 -9.99991 9.99994 9.99997 9.99997 9.99994 9.99991 +9.99991 9.99994 9.99997 9.99997 9.99994 9.99992 +9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 +9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 +9.99997 11.1323 12.5478 12.5478 11.1323 9.99997 +9.99994 10.5032 11.1323 11.1323 10.5032 9.99994 +9.99991 9.99994 9.99997 9.99997 9.99994 9.99991 Species 4 -13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 -13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 -13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 -13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 -13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 -13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 +13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 +13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 +13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 +13.4981 15.8919 19.0288 19.0288 15.8919 13.4981 +13.4981 14.5496 15.8919 15.8919 14.5496 13.4981 +13.4981 13.4981 13.4981 13.4981 13.4981 13.4981 Species 5 -13.4981 13.4981 13.4982 13.4981 13.4981 13.4981 -13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 -13.4982 16.4131 20.2351 20.2351 16.4131 13.4981 -13.4982 16.4131 20.2351 20.2351 16.4131 13.4982 -13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 -13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 +13.4981 13.4981 13.4982 13.4981 13.4981 13.4981 +13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 +13.4982 16.4131 20.2351 20.2351 16.4131 13.4981 +13.4982 16.4131 20.2351 20.2351 16.4131 13.4982 +13.4981 14.7783 16.4131 16.4131 14.7783 13.4981 +13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 Species 6 -13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 -13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 -13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 -13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 -13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 -13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 +13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 +13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 +13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 +13.4982 16.9343 21.4414 21.4414 16.9343 13.4982 +13.4981 15.0071 16.9343 16.9343 15.0071 13.4981 +13.4981 13.4981 13.4982 13.4982 13.4981 13.4981 t = 1.00e-05 nst = 12 nfe = 0 nfi = 197 nni = 129 hu = 1.19e-06 @@ -143,52 +143,52 @@ t = 1.00e-03 nst = 46 nfe = 0 nfi = 820 nni = 582 hu = 8.40e-03 c values at t = 0.001: Species 1 -9.90702 9.91664 9.92836 9.93033 9.92253 9.91674 -9.91472 10.0747 10.2769 10.2785 10.0795 9.92253 -9.92446 10.2748 10.7181 10.7194 10.2785 9.93033 -9.92445 10.2744 10.7173 10.7181 10.2769 9.92836 -9.91469 10.0734 10.2744 10.2748 10.0747 9.91664 -9.90697 9.91469 9.92445 9.92446 9.91472 9.90702 +9.90702 9.91664 9.92836 9.93033 9.92253 9.91674 +9.91472 10.0747 10.2769 10.2785 10.0795 9.92253 +9.92446 10.2748 10.7181 10.7194 10.2785 9.93033 +9.92445 10.2744 10.7173 10.7181 10.2769 9.92836 +9.91469 10.0734 10.2744 10.2748 10.0747 9.91664 +9.90697 9.91469 9.92445 9.92446 9.91472 9.90702 Species 2 -9.90742 9.92474 9.94622 9.94819 9.93064 9.91713 -9.92282 10.2412 10.644 10.6457 10.2461 9.93064 -9.94232 10.6419 11.5267 11.5281 10.6457 9.94819 -9.94231 10.6415 11.5258 11.5267 10.644 9.94622 -9.92279 10.24 10.6415 10.6419 10.2412 9.92474 -9.90737 9.92279 9.94231 9.94232 9.92282 9.90742 +9.90742 9.92474 9.94622 9.94819 9.93064 9.91713 +9.92282 10.2412 10.644 10.6457 10.2461 9.93064 +9.94232 10.6419 11.5267 11.5281 10.6457 9.94819 +9.94231 10.6415 11.5258 11.5267 10.644 9.94622 +9.92279 10.24 10.6415 10.6419 10.2412 9.92474 +9.90737 9.92279 9.94231 9.94232 9.92282 9.90742 Species 3 -9.90781 9.93284 9.96408 9.96605 9.93874 9.91752 -9.93092 10.4078 11.0109 11.0127 10.4127 9.93874 -9.96017 11.0088 12.3339 12.3354 11.0127 9.96605 -9.96016 11.0083 12.333 12.3339 11.0109 9.96408 -9.93089 10.4065 11.0083 11.0088 10.4078 9.93284 -9.90776 9.93089 9.96016 9.96017 9.93092 9.90781 +9.90781 9.93284 9.96408 9.96605 9.93874 9.91752 +9.93092 10.4078 11.0109 11.0127 10.4127 9.93874 +9.96017 11.0088 12.3339 12.3354 11.0127 9.96605 +9.96016 11.0083 12.333 12.3339 11.0109 9.96408 +9.93089 10.4065 11.0083 11.0088 10.4078 9.93284 +9.90776 9.93089 9.96016 9.96017 9.93092 9.90781 Species 4 -297231 297750 298393 298451 297925 297520 -297692 307245 319327 319378 307390 297925 -298276 319264 345799 345840 319378 298451 -298276 319252 345772 345799 319327 298393 -297691 307208 319252 319264 307245 297750 -297229 297691 298276 298276 297692 297231 +297231 297750 298393 298451 297925 297520 +297692 307245 319327 319378 307390 297925 +298276 319264 345799 345840 319378 298451 +298276 319252 345772 345799 319327 298393 +297691 307208 319252 319264 307245 297750 +297229 297691 298276 298276 297692 297231 Species 5 -297231 297750 298393 298451 297925 297520 -297692 307245 319327 319378 307390 297925 -298276 319264 345799 345840 319378 298451 -298276 319252 345772 345799 319327 298393 -297691 307208 319252 319264 307245 297750 -297229 297691 298276 298276 297692 297231 +297231 297750 298393 298451 297925 297520 +297692 307245 319327 319378 307390 297925 +298276 319264 345799 345840 319378 298451 +298276 319252 345772 345799 319327 298393 +297691 307208 319252 319264 307245 297750 +297229 297691 298276 298276 297692 297231 Species 6 -297231 297750 298393 298451 297925 297520 -297692 307245 319327 319378 307390 297925 -298276 319264 345799 345840 319378 298451 -298276 319252 345772 345799 319327 298393 -297691 307208 319252 319264 307245 297750 -297229 297691 298276 298276 297692 297231 +297231 297750 298393 298451 297925 297520 +297692 307245 319327 319378 307390 297925 +298276 319264 345799 345840 319378 298451 +298276 319252 345772 345799 319327 298393 +297691 307208 319252 319264 307245 297750 +297229 297691 298276 298276 297692 297231 t = 1.00e-02 nst = 47 nfe = 0 nfi = 840 nni = 597 hu = 1.32e-02 @@ -199,52 +199,52 @@ t = 1.00e+00 nst = 69 nfe = 0 nfi = 1259 nni = 904 hu = 5.51e-02 c values at t = 1: Species 1 -1.58852 1.59924 1.62152 1.64765 1.67037 1.68149 -1.58533 1.59504 1.61548 1.63952 1.66033 1.67037 -1.57757 1.58548 1.6024 1.62235 1.63952 1.64765 -1.56821 1.57412 1.58706 1.6024 1.61548 1.62152 -1.56049 1.56463 1.57412 1.58548 1.59504 1.59924 -1.55733 1.56049 1.56821 1.57757 1.58533 1.58852 +1.58852 1.59924 1.62152 1.64765 1.67037 1.68149 +1.58533 1.59504 1.61548 1.63952 1.66033 1.67037 +1.57757 1.58548 1.6024 1.62235 1.63952 1.64765 +1.56821 1.57412 1.58706 1.6024 1.61548 1.62152 +1.56049 1.56463 1.57412 1.58548 1.59504 1.59924 +1.55733 1.56049 1.56821 1.57757 1.58533 1.58852 Species 2 -1.59067 1.60141 1.62371 1.64987 1.67262 1.68376 -1.58749 1.5972 1.61767 1.64174 1.66257 1.67262 -1.57972 1.58763 1.60457 1.62455 1.64174 1.64987 -1.57034 1.57627 1.58922 1.60457 1.61767 1.62371 -1.56261 1.56677 1.57627 1.58763 1.5972 1.60141 -1.55945 1.56261 1.57034 1.57972 1.58749 1.59067 +1.59067 1.60141 1.62371 1.64987 1.67262 1.68376 +1.58749 1.5972 1.61767 1.64174 1.66257 1.67262 +1.57972 1.58763 1.60457 1.62455 1.64174 1.64987 +1.57034 1.57627 1.58922 1.60457 1.61767 1.62371 +1.56261 1.56677 1.57627 1.58763 1.5972 1.60141 +1.55945 1.56261 1.57034 1.57972 1.58749 1.59067 Species 3 -1.59271 1.60346 1.62579 1.65198 1.67474 1.6859 -1.58952 1.59925 1.61974 1.64383 1.66469 1.67474 -1.58174 1.58967 1.60662 1.62662 1.64383 1.65198 -1.57236 1.57829 1.59126 1.60662 1.61974 1.62579 -1.56462 1.56878 1.57829 1.58967 1.59925 1.60346 -1.56146 1.56462 1.57236 1.58174 1.58952 1.59271 +1.59271 1.60346 1.62579 1.65198 1.67474 1.6859 +1.58952 1.59925 1.61974 1.64383 1.66469 1.67474 +1.58174 1.58967 1.60662 1.62662 1.64383 1.65198 +1.57236 1.57829 1.59126 1.60662 1.61974 1.62579 +1.56462 1.56878 1.57829 1.58967 1.59925 1.60346 +1.56146 1.56462 1.57236 1.58174 1.58952 1.59271 Species 4 -47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 -47622.9 47914.2 48528 49249.8 49874.6 50175.6 -47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 -47108.7 47286.2 47674.7 48135.1 48528 48709.2 -46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 -46782 46876.8 47108.7 47389.8 47622.9 47718.5 +47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 +47622.9 47914.2 48528 49249.8 49874.6 50175.6 +47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 +47108.7 47286.2 47674.7 48135.1 48528 48709.2 +46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 +46782 46876.8 47108.7 47389.8 47622.9 47718.5 Species 5 -47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 -47622.9 47914.2 48528 49249.8 49874.6 50175.6 -47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 -47108.7 47286.2 47674.7 48135.1 48528 48709.2 -46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 -46782 46876.8 47108.7 47389.8 47622.9 47718.5 +47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 +47622.9 47914.2 48528 49249.8 49874.6 50175.6 +47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 +47108.7 47286.2 47674.7 48135.1 48528 48709.2 +46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 +46782 46876.8 47108.7 47389.8 47622.9 47718.5 Species 6 -47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 -47622.9 47914.2 48528 49249.8 49874.6 50175.6 -47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 -47108.7 47286.2 47674.7 48135.1 48528 48709.2 -46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 -46782 46876.8 47108.7 47389.8 47622.9 47718.5 +47718.5 48040.4 48709.2 49493.7 50175.6 50509.6 +47622.9 47914.2 48528 49249.8 49874.6 50175.6 +47389.8 47627.1 48135.1 48734.3 49249.8 49493.7 +47108.7 47286.2 47674.7 48135.1 48528 48709.2 +46876.8 47001.3 47286.2 47627.1 47914.2 48040.4 +46782 46876.8 47108.7 47389.8 47622.9 47718.5 t = 2.00e+00 nst = 81 nfe = 0 nfi = 1463 nni = 1048 hu = 1.54e-01 @@ -255,52 +255,52 @@ t = 4.00e+00 nst = 95 nfe = 0 nfi = 1708 nni = 1221 hu = 2.69e-01 c values at t = 4: Species 1 -1.19535 1.20368 1.2211 1.24157 1.25935 1.268 -1.1928 1.20035 1.21636 1.23523 1.25154 1.25935 -1.18657 1.19274 1.20602 1.22173 1.23523 1.24157 -1.17904 1.18368 1.19389 1.20602 1.21636 1.2211 -1.17284 1.17613 1.18368 1.19274 1.20035 1.20368 -1.17032 1.17284 1.17904 1.18657 1.1928 1.19535 +1.19535 1.20368 1.2211 1.24157 1.25935 1.268 +1.1928 1.20035 1.21636 1.23523 1.25154 1.25935 +1.18657 1.19274 1.20602 1.22173 1.23523 1.24157 +1.17904 1.18368 1.19389 1.20602 1.21636 1.2211 +1.17284 1.17613 1.18368 1.19274 1.20035 1.20368 +1.17032 1.17284 1.17904 1.18657 1.1928 1.19535 Species 2 -1.19538 1.20371 1.22113 1.24161 1.25938 1.26804 -1.19284 1.20038 1.21639 1.23526 1.25157 1.25938 -1.1866 1.19277 1.20606 1.22177 1.23526 1.24161 -1.17908 1.18371 1.19393 1.20606 1.21639 1.22113 -1.17288 1.17616 1.18371 1.19277 1.20038 1.20371 -1.17035 1.17288 1.17908 1.1866 1.19284 1.19538 +1.19538 1.20371 1.22113 1.24161 1.25938 1.26804 +1.19284 1.20038 1.21639 1.23526 1.25157 1.25938 +1.1866 1.19277 1.20606 1.22177 1.23526 1.24161 +1.17908 1.18371 1.19393 1.20606 1.21639 1.22113 +1.17288 1.17616 1.18371 1.19277 1.20038 1.20371 +1.17035 1.17288 1.17908 1.1866 1.19284 1.19538 Species 3 -1.19542 1.20374 1.22116 1.24164 1.25942 1.26807 -1.19287 1.20042 1.21643 1.2353 1.25161 1.25942 -1.18663 1.1928 1.20609 1.2218 1.2353 1.24164 -1.17911 1.18374 1.19396 1.20609 1.21643 1.22116 -1.17291 1.17619 1.18374 1.1928 1.20042 1.20374 -1.17039 1.17291 1.17911 1.18663 1.19287 1.19542 +1.19542 1.20374 1.22116 1.24164 1.25942 1.26807 +1.19287 1.20042 1.21643 1.2353 1.25161 1.25942 +1.18663 1.1928 1.20609 1.2218 1.2353 1.24164 +1.17911 1.18374 1.19396 1.20609 1.21643 1.22116 +1.17291 1.17619 1.18374 1.1928 1.20042 1.20374 +1.17039 1.17291 1.17911 1.18663 1.19287 1.19542 Species 4 -35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 -35597.2 35782 36180.5 36651.6 37056.3 37246.5 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 +35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35597.2 35782 36180.5 36651.6 37056.3 37246.5 +35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.4 35782 36010.4 36110.2 +35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 Species 5 -35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 -35597.2 35782 36180.5 36651.6 37056.3 37246.5 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 +35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35597.2 35782 36180.5 36651.6 37056.3 37246.5 +35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.4 35782 36010.4 36110.2 +35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 Species 6 -35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 -35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 -35597.2 35782 36180.5 36651.6 37056.3 37246.5 -35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 -35185.4 35283.8 35510.4 35782 36010.4 36110.2 -35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 +35860.6 36110.2 36632.4 37246.5 37779.5 38038.7 +35784.2 36010.4 36490.4 37056.3 37545.3 37779.5 +35597.2 35782 36180.5 36651.6 37056.3 37246.5 +35371.4 35510.4 35816.7 36180.5 36490.4 36632.4 +35185.4 35283.8 35510.4 35782 36010.4 36110.2 +35109.7 35185.4 35371.4 35597.2 35784.2 35860.6 t = 5.00e+00 nst = 98 nfe = 0 nfi = 1767 nni = 1262 hu = 3.36e-01 @@ -311,52 +311,52 @@ t = 7.00e+00 nst = 100 nfe = 0 nfi = 1798 nni = 1283 hu = 2.99e+00 c values at t = 7: Species 1 -1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 -1.18601 1.19352 1.20945 1.22822 1.24445 1.25222 -1.17981 1.18594 1.19917 1.2148 1.22822 1.23454 -1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 -1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 -1.16363 1.16615 1.17232 1.17981 1.18601 1.18855 +1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 +1.18601 1.19352 1.20945 1.22822 1.24445 1.25222 +1.17981 1.18594 1.19917 1.2148 1.22822 1.23454 +1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 +1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 +1.16363 1.16615 1.17232 1.17981 1.18601 1.18855 Species 2 -1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 -1.18601 1.19352 1.20945 1.22823 1.24445 1.25222 -1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 -1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 -1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 -1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 +1.18855 1.19683 1.21416 1.23454 1.25222 1.26083 +1.18601 1.19352 1.20945 1.22823 1.24445 1.25222 +1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 +1.17232 1.17693 1.18709 1.19917 1.20945 1.21416 +1.16615 1.16941 1.17693 1.18594 1.19352 1.19683 +1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 Species 3 -1.18855 1.19684 1.21416 1.23454 1.25223 1.26083 -1.18601 1.19352 1.20945 1.22823 1.24445 1.25223 -1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 -1.17232 1.17693 1.1871 1.19917 1.20945 1.21416 -1.16615 1.16941 1.17693 1.18594 1.19352 1.19684 -1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 +1.18855 1.19684 1.21416 1.23454 1.25223 1.26083 +1.18601 1.19352 1.20945 1.22823 1.24445 1.25223 +1.17981 1.18594 1.19917 1.2148 1.22823 1.23454 +1.17232 1.17693 1.1871 1.19917 1.20945 1.21416 +1.16615 1.16941 1.17693 1.18594 1.19352 1.19684 +1.16364 1.16615 1.17232 1.17981 1.18601 1.18855 Species 4 -35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 -35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 -35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 -35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 -34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 -34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 +35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 +35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 +35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 +35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 +34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 +34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 Species 5 -35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 -35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 -35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 -35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 -34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 -34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 +35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 +35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 +35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 +35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 +34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 +34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 Species 6 -35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 -35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 -35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 -35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 -34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 -34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 +35655.6 35903.8 36423.4 37034.4 37564.7 37822.6 +35579.5 35804.5 36282.2 36845.2 37331.8 37564.7 +35393.4 35577.2 35973.8 36442.5 36845.2 37034.4 +35168.6 35306.9 35611.7 35973.8 36282.2 36423.4 +34983.5 35081.4 35306.9 35577.2 35804.5 35903.8 +34908.2 34983.5 35168.6 35393.4 35579.5 35655.6 t = 8.00e+00 nst = 100 nfe = 0 nfi = 1798 nni = 1283 hu = 2.99e+00 @@ -367,75 +367,75 @@ t = 1.00e+01 nst = 101 nfe = 0 nfi = 1813 nni = 1293 hu = 6.31e+00 c values at t = 10: Species 1 -1.18839 1.19667 1.214 1.23437 1.25206 1.26066 -1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 -1.17965 1.18578 1.199 1.21463 1.22806 1.23437 -1.17216 1.17677 1.18693 1.199 1.20929 1.214 -1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 -1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 +1.18839 1.19667 1.214 1.23437 1.25206 1.26066 +1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 +1.17965 1.18578 1.199 1.21463 1.22806 1.23437 +1.17216 1.17677 1.18693 1.199 1.20929 1.214 +1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 +1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 Species 2 -1.18839 1.19667 1.214 1.23437 1.25206 1.26066 -1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 -1.17965 1.18578 1.199 1.21463 1.22806 1.23437 -1.17216 1.17677 1.18693 1.199 1.20929 1.214 -1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 -1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 +1.18839 1.19667 1.214 1.23437 1.25206 1.26066 +1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 +1.17965 1.18578 1.199 1.21463 1.22806 1.23437 +1.17216 1.17677 1.18693 1.199 1.20929 1.214 +1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 +1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 Species 3 -1.18839 1.19667 1.214 1.23437 1.25206 1.26066 -1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 -1.17965 1.18578 1.199 1.21463 1.22806 1.23437 -1.17216 1.17677 1.18693 1.199 1.20929 1.214 -1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 -1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 +1.18839 1.19667 1.214 1.23437 1.25206 1.26066 +1.18585 1.19336 1.20929 1.22806 1.24428 1.25206 +1.17965 1.18578 1.199 1.21463 1.22806 1.23437 +1.17216 1.17677 1.18693 1.199 1.20929 1.214 +1.16599 1.16925 1.17677 1.18578 1.19336 1.19667 +1.16348 1.16599 1.17216 1.17965 1.18585 1.18839 Species 4 -35650.8 35899 36418.5 37029.4 37559.6 37817.5 -35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 -35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 -35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 -34978.7 35076.6 35302.1 35572.4 35799.7 35899 -34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 +35650.8 35899 36418.5 37029.4 37559.6 37817.5 +35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 +35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 +35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 +34978.7 35076.6 35302.1 35572.4 35799.7 35899 +34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 Species 5 -35650.8 35899 36418.5 37029.4 37559.6 37817.5 -35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 -35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 -35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 -34978.7 35076.6 35302.1 35572.4 35799.7 35899 -34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 +35650.8 35899 36418.5 37029.4 37559.6 37817.5 +35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 +35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 +35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 +34978.7 35076.6 35302.1 35572.4 35799.7 35899 +34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 Species 6 -35650.8 35899 36418.5 37029.4 37559.6 37817.5 -35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 -35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 -35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 -34978.7 35076.6 35302.1 35572.4 35799.7 35899 -34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 +35650.8 35899 36418.5 37029.4 37559.6 37817.5 +35574.7 35799.7 36277.2 36840.2 37326.7 37559.6 +35388.6 35572.4 35968.9 36437.6 36840.2 37029.4 +35163.8 35302.1 35606.9 35968.9 36277.2 36418.5 +34978.7 35076.6 35302.1 35572.4 35799.7 35899 +34903.4 34978.7 35163.8 35388.6 35574.7 35650.8 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 142 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 101 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 1813 - Number of f-s (SPGMR) = 4359 - Number of f-s (TOTAL) = 4359 - Number of setups = 72 - Number of nonlinear iterations = 1293 - Number of linear iterations = 4359 - Number of preconditioner evaluations = 72 - Number of preconditioner solves = 5618 - Number of error test failures = 1 - Number of nonlinear conv. failures = 25 - Number of linear convergence failures = 238 - Average Krylov subspace dimension = 3.371 + ARKStep real workspace length = 3802 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 101 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 1813 + Number of f-s (SPGMR) = 4359 + Number of f-s (TOTAL) = 4359 + Number of setups = 72 + Number of nonlinear iterations = 1293 + Number of linear iterations = 4359 + Number of preconditioner evaluations = 72 + Number of preconditioner solves = 5618 + Number of error test failures = 1 + Number of nonlinear conv. failures = 25 + Number of linear convergence failures = 238 + Average Krylov subspace dimension = 3.371 ---------------------------------------------------------------------------- @@ -487,24 +487,24 @@ t = 1.00e+01 nst = 101 nfe = 0 nfi = 1813 nni = 1293 hu = 6.31e+00 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 142 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 101 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 1813 - Number of f-s (SPGMR) = 4359 - Number of f-s (TOTAL) = 4359 - Number of setups = 72 - Number of nonlinear iterations = 1293 - Number of linear iterations = 4359 - Number of preconditioner evaluations = 72 - Number of preconditioner solves = 5618 - Number of error test failures = 1 - Number of nonlinear conv. failures = 25 - Number of linear convergence failures = 238 - Average Krylov subspace dimension = 3.371 + ARKStep real workspace length = 3802 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 101 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 1813 + Number of f-s (SPGMR) = 4359 + Number of f-s (TOTAL) = 4359 + Number of setups = 72 + Number of nonlinear iterations = 1293 + Number of linear iterations = 4359 + Number of preconditioner evaluations = 72 + Number of preconditioner solves = 5618 + Number of error test failures = 1 + Number of nonlinear conv. failures = 25 + Number of linear convergence failures = 238 + Average Krylov subspace dimension = 3.371 ---------------------------------------------------------------------------- @@ -556,24 +556,24 @@ t = 1.00e+01 nst = 234 nfe = 0 nfi = 4045 nni = 2856 hu = 3.93e-01 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 142 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 234 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 4045 - Number of f-s (SPGMR) = 10634 - Number of f-s (TOTAL) = 10634 - Number of setups = 277 - Number of nonlinear iterations = 2856 - Number of linear iterations = 10634 - Number of preconditioner evaluations = 277 - Number of preconditioner solves = 13350 - Number of error test failures = 1 - Number of nonlinear conv. failures = 166 - Number of linear convergence failures = 1036 - Average Krylov subspace dimension = 3.723 + ARKStep real workspace length = 3802 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 234 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 4045 + Number of f-s (SPGMR) = 10634 + Number of f-s (TOTAL) = 10634 + Number of setups = 277 + Number of nonlinear iterations = 2856 + Number of linear iterations = 10634 + Number of preconditioner evaluations = 277 + Number of preconditioner solves = 13350 + Number of error test failures = 1 + Number of nonlinear conv. failures = 166 + Number of linear convergence failures = 1036 + Average Krylov subspace dimension = 3.723 ---------------------------------------------------------------------------- @@ -625,24 +625,24 @@ t = 1.00e+01 nst = 234 nfe = 0 nfi = 4045 nni = 2856 hu = 3.93e-01 Final statistics for this run: - ARKStep real workspace length = 3790 - ARKStep integer workspace length = 142 - ARKLS real workspace length = 2647 - ARKLS integer workspace length = 42 - Number of steps = 234 - Number of f-s (explicit) = 0 - Number of f-s (implicit) = 4045 - Number of f-s (SPGMR) = 10633 - Number of f-s (TOTAL) = 10633 - Number of setups = 277 - Number of nonlinear iterations = 2856 - Number of linear iterations = 10633 - Number of preconditioner evaluations = 277 - Number of preconditioner solves = 13349 - Number of error test failures = 1 - Number of nonlinear conv. failures = 166 - Number of linear convergence failures = 1036 - Average Krylov subspace dimension = 3.723 + ARKStep real workspace length = 3802 + ARKStep integer workspace length = 142 + ARKLS real workspace length = 2647 + ARKLS integer workspace length = 42 + Number of steps = 234 + Number of f-s (explicit) = 0 + Number of f-s (implicit) = 4045 + Number of f-s (SPGMR) = 10633 + Number of f-s (TOTAL) = 10633 + Number of setups = 277 + Number of nonlinear iterations = 2856 + Number of linear iterations = 10633 + Number of preconditioner evaluations = 277 + Number of preconditioner solves = 13349 + Number of error test failures = 1 + Number of nonlinear conv. failures = 166 + Number of linear convergence failures = 1036 + Average Krylov subspace dimension = 3.723 ---------------------------------------------------------------------------- From 512e7f72413226f47699ffa3aa18d19807bbd82e Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 29 Mar 2026 11:07:59 -0700 Subject: [PATCH 250/298] update jenkins int64 .out files --- .../F2003_parallel/ark_diag_kry_bbd_f2003.out | 21 +++++++++++-------- .../F2003_serial/ark_diurnal_kry_bp_f2003.out | 9 ++++---- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/examples/arkode/F2003_parallel/ark_diag_kry_bbd_f2003.out b/examples/arkode/F2003_parallel/ark_diag_kry_bbd_f2003.out index e2a7727241..19002c2c93 100644 --- a/examples/arkode/F2003_parallel/ark_diag_kry_bbd_f2003.out +++ b/examples/arkode/F2003_parallel/ark_diag_kry_bbd_f2003.out @@ -1,4 +1,4 @@ - + Diagonal test problem: neq = 40 nlocal = 10 @@ -9,7 +9,7 @@ ydot_i = -alpha*i * y_i (i = 1,...,neq) Method is DIRK/NEWTON/SPGMR Precond is band-block-diagonal, using ARKBBDPRE - + Preconditioning on left: t steps steps att. fe fi ------------------------------------------------- @@ -25,7 +25,7 @@ 1.000000 77 77 0 974 ------------------------------------------------- Max. absolute error is 4.66E-09 - + Final Solver Statistics: Internal solver steps = 77 (attempted = 77) Total explicit RHS evals = 0 @@ -38,13 +38,13 @@ Max. absolute error is 4.66E-09 Total Convergence Failures - Nonlinear = 0 - Linear = 0 Total number of error test failures = 0 - Main solver real/int workspace sizes = 918 285 + Main solver real/int workspace sizes = 930 285 Linear solver real/int workspace sizes = 535 126 BBD preconditioner real/int workspace sizes = 160 72 Total number of g evals = 4 - - - + + + Preconditioning on right: t steps steps att. fe fi ------------------------------------------------- @@ -60,7 +60,7 @@ Max. absolute error is 4.66E-09 1.000000 77 77 0 974 ------------------------------------------------- Max. absolute error is 4.66E-09 - + Final Solver Statistics: Internal solver steps = 77 (attempted = 77) Total explicit RHS evals = 0 @@ -73,7 +73,10 @@ Max. absolute error is 4.66E-09 Total Convergence Failures - Nonlinear = 0 - Linear = 0 Total number of error test failures = 0 - Main solver real/int workspace sizes = 918 285 + Main solver real/int workspace sizes = 930 285 Linear solver real/int workspace sizes = 535 126 BBD preconditioner real/int workspace sizes = 160 72 Total number of g evals = 4 + + + diff --git a/examples/arkode/F2003_serial/ark_diurnal_kry_bp_f2003.out b/examples/arkode/F2003_serial/ark_diurnal_kry_bp_f2003.out index 8d4289e8cd..1341e07b24 100644 --- a/examples/arkode/F2003_serial/ark_diurnal_kry_bp_f2003.out +++ b/examples/arkode/F2003_serial/ark_diurnal_kry_bp_f2003.out @@ -1,6 +1,6 @@ - + Finished initialization, starting time steps - + t c1 (bottom left middle top right) | lnst lnst_att lh t c2 (bottom left middle top right) | lnst lnst_att lh ---------------------------------------------------------------------------------------- @@ -29,7 +29,7 @@ 8.640000E+04 9.130832E-03 -2.882353E-03 1.078363E-02 198 213 2.374350E+03 5.092611E+11 5.754304E+11 5.984451E+11 ---------------------------------------------------------------------------------------- - + General Solver Stats: Total internal steps taken = 198 Total internal steps attempts = 213 @@ -43,7 +43,8 @@ Avg Krylov subspace dim = 3.004963E+00 Num nonlinear solver fails = 0 Num linear solver fails = 333 - main solver real/int workspace sizes = 3918 144 + main solver real/int workspace sizes = 3930 144 linear solver real/int workspace sizes = 2455 42 ARKBandPre real/int workspace sizes = 2800 622 ARKBandPre number of f evaluations = 20 + From 983c226a0f969cf55603db40199528e286b176e3 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 30 Mar 2026 08:36:28 -0400 Subject: [PATCH 251/298] Updated mathematical description of RKL and RKC to use 1-based stage indexing (to match other steppers) --- doc/arkode/guide/source/Mathematics.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/arkode/guide/source/Mathematics.rst b/doc/arkode/guide/source/Mathematics.rst index 4e55925264..1a85a2d1a6 100644 --- a/doc/arkode/guide/source/Mathematics.rst +++ b/doc/arkode/guide/source/Mathematics.rst @@ -527,9 +527,9 @@ LSRKStep currently supports two families of second-order, explicit, and temporal Runge--Kutta--Chebyshev (RKC), :cite:p:`VSH:04` and Runge--Kutta--Legendre (RKL), :cite:p:`MBA:14`. These methods have the form .. math:: - z_0 &= y_n,\\ - z_1 &= z_0 + h_n \tilde{\mu}_1 f(t_n,z_0),\\ - z_j &= (1-\mu_j-\nu_j)z_0 + \mu_j z_{j-1} + \nu_jz_{j-2} + h_n \tilde{\gamma}_j f(t_n,z_0) + h_n \tilde{\mu}_j f(t_n + c_{j-1}h, z_{j-1}) \\ + z_1 &= y_n,\\ + z_2 &= z_1 + h_n \tilde{\mu}_2 f(t_n,z_1),\\ + z_j &= (1-\mu_j-\nu_j)z_1 + \mu_j z_{j-1} + \nu_jz_{j-2} + h_n \tilde{\gamma}_j f(t_n,z_1) + h_n \tilde{\mu}_j f(t_n + c_{j-1}h, z_{j-1}) \\ y_{n+1} &= z_s. :label: ARKODE_RKC_RKL From 44af67c2e8ac918d3d26575a93227cd3758af2b4 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 30 Mar 2026 08:51:28 -0400 Subject: [PATCH 252/298] Applied changes from PR review --- src/arkode/arkode_erkstep.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index d666cc9db6..de7f4acabd 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -830,8 +830,9 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) the first stage RHS is just the full RHS from the start of the step */ for (is = 1; is < step_mem->stages; is++) { - /* Set current stage time(s) */ + /* Set current stage time and index */ ark_mem->tcur = ark_mem->tn + step_mem->B->c[is] * ark_mem->h; + step_mem->istage = is; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, is, ark_mem->tcur); @@ -895,9 +896,6 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } } - /* update current stage index */ - step_mem->istage = is; - /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) { From acbb61da6941ca2efba2ac8d4dc8ab67ffb6f853 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 30 Mar 2026 09:00:37 -0400 Subject: [PATCH 253/298] Applied changes from PR review --- src/arkode/arkode_mristep.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 40acc2dc8d..f847bab318 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1952,9 +1952,11 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* Loop over remaining internal stages */ for (is = 1; is < step_mem->stages - 1; is++) { - /* Set relevant stage times (including desired stage time for implicit solves) */ + /* Set relevant stage times (including desired stage time for implicit solves) + and stage index */ t0 = ark_mem->tn + step_mem->MRIC->c[is - 1] * ark_mem->h; tf = ark_mem->tcur = ark_mem->tn + step_mem->MRIC->c[is] * ark_mem->h; + step_mem->istage = is; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, stage type = %d, tcur = " SUN_FORMAT_G, is, @@ -2017,9 +2019,6 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } } - /* Update current stage index */ - step_mem->istage = is; - /* conditionally reset the inner integrator with the modified stage solution */ if (step_mem->stagetypes[is] != MRISTAGE_STIFF_ACC) { @@ -2148,9 +2147,6 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* perform embedded stage (if needed) */ if (do_embedding) { - /* Set current stage index */ - step_mem->istage = is = step_mem->stages; - /* Temporarily swap ark_mem->ycur and ark_mem->tempv4 pointers, copying data so that both hold the current ark_mem->ycur value. This ensures that during this embedding "stage": @@ -2162,9 +2158,11 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt ark_mem->tempv4 = tmp; /* Reset ark_mem->tcur as the time value corresponding with the end of the step */ - /* Set relevant stage times (including desired stage time for implicit solves) */ + /* Set relevant stage times (including desired stage time for implicit solves), + and set the current stage index */ t0 = ark_mem->tn + step_mem->MRIC->c[is - 2] * ark_mem->h; tf = ark_mem->tcur = ark_mem->tn + ark_mem->h; + step_mem->istage = is = step_mem->stages; SUNLogInfo(ARK_LOGGER, "begin-compute-embedding", "stage = %i, stage type = %d, tcur = " SUN_FORMAT_G, is, @@ -2232,12 +2230,11 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* Compute final stage (for evolved solution), along with error estimate */ { - /* Set current stage index */ - step_mem->istage = is = step_mem->stages - 1; - - /* Set relevant stage times (including desired stage time for implicit solves) */ + /* Set relevant stage times (including desired stage time for implicit solves), + and set the current stage index */ t0 = ark_mem->tn + step_mem->MRIC->c[is - 1] * ark_mem->h; tf = ark_mem->tcur = ark_mem->tn + ark_mem->h; + step_mem->istage = is = step_mem->stages - 1; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, stage type = %d, tcur = " SUN_FORMAT_G, is, From e461660b58c671a7fce105bba99834d4c893b5ea Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 30 Mar 2026 10:43:42 -0400 Subject: [PATCH 254/298] Finished updates to stage indexing; updated lsrkStep_GetStageIndex max_stages to be consistent with other methods; updated comments --- .../guide/source/Usage/User_callable.rst | 6 +- src/arkode/arkode_lsrkstep.c | 65 ++++++------------- src/arkode/arkode_lsrkstep_io.c | 2 +- src/arkode/arkode_mristep.c | 14 ++-- 4 files changed, 31 insertions(+), 56 deletions(-) diff --git a/doc/arkode/guide/source/Usage/User_callable.rst b/doc/arkode/guide/source/Usage/User_callable.rst index 22546b0b4d..206da27281 100644 --- a/doc/arkode/guide/source/Usage/User_callable.rst +++ b/doc/arkode/guide/source/Usage/User_callable.rst @@ -4524,8 +4524,10 @@ Current stage index, and total number of stages :c:func:`ARKodeGetStageIn For temporally adaptive computations in MRIStep, the "embedding" stage is indicated using `stage` **equal to** `max_stages`. - Also, for RKC and RKL methods in LSRKStep, the right-hand side will be called - at the end of the step, at which point `stage` will also equal `max_stages`. + For the methods in LSRKStep, `s` corresponds with the number of stages that + involve updates to the solution, which is thus one larger than what `s` denotes + for explicit Runge--Kutta methods. Thus when using LSRKStep, `stage` will + range from 0 to `s` (inclusive), and `max_stages` will be `s+1`. .. versionadded:: x.y.z diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index b547b9794b..db863a426e 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -683,6 +683,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Evaluate the first stage (store in tmp2) and initialize embedding */ ark_mem->tcur = ark_mem->tn + ark_mem->h * mus; + step_mem->istage = 1; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 1, ark_mem->tcur); N_VLinearSum(ONE, ark_mem->yn, ark_mem->h * mus, ark_mem->fn, tmp2); @@ -713,9 +714,6 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Evaluate stages j = 2,...,step_mem->req_stages */ for (int j = 2; j <= step_mem->req_stages; j++) { - /* set stage index (0-based) */ - step_mem->istage = j - 1; - /* Evaluate RHS and store in ycur */ /* call the user-supplied pre-RHS function (if supplied) */ @@ -754,6 +752,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) mus = mu * w1 / w0; thj = mu * thjm1 + nu * thjm2 + mus * (ONE - ajm1); ark_mem->tcur = ark_mem->tn + ark_mem->h * thj; + step_mem->istage = j; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, j, ark_mem->tcur); cvals[0] = mus * ark_mem->h; @@ -827,7 +826,6 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "begin-compute-embedding", ""); /* final stage processing */ - step_mem->istage = step_mem->req_stages; /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) @@ -1033,6 +1031,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Evaluate the first stage (store in tmp2) and initialize embedding */ ark_mem->tcur = ark_mem->tn + ark_mem->h * mus; + step_mem->istage = 1; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 1, ark_mem->tcur); N_VLinearSum(ONE, ark_mem->yn, ark_mem->h * mus, ark_mem->fn, tmp2); @@ -1053,9 +1052,6 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Evaluate stages j = 2,...,step_mem->req_stages */ for (int j = 2; j <= step_mem->req_stages; j++) { - /* set stage index (0-based) */ - step_mem->istage = j - 1; - /* Evaluate RHS and store in ycur */ /* call the user-supplied pre-RHS function (if supplied) */ @@ -1092,6 +1088,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) mus = w1 * mu; cj = temj * w1 / FOUR; ark_mem->tcur = ark_mem->tn + ark_mem->h * cj; + step_mem->istage = j; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, j, ark_mem->tcur); cvals[0] = mus * ark_mem->h; @@ -1156,7 +1153,6 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "begin-compute-embedding", ""); /* final stage processing */ - step_mem->istage = step_mem->req_stages; /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) @@ -1316,6 +1312,7 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Begin the second stage, and accumulate embedding into tempv1 */ ark_mem->tcur = ark_mem->tn + hsm1inv; + step_mem->istage = 1; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 1, ark_mem->tcur); N_VLinearSum(ONE, ark_mem->yn, hsm1inv, ark_mem->fn, ark_mem->ycur); @@ -1340,9 +1337,6 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Evaluate stages j = 2,...,step_mem->req_stages - 1 */ for (int j = 2; j < step_mem->req_stages; j++) { - /* set stage index (0-based) */ - step_mem->istage = j - 1; - /* Complete previous stage by evaluating RHS and storing it in tempv2 */ /* apply user-supplied stage preprocessing function (if supplied) */ @@ -1373,6 +1367,7 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); /* Begin the j-th stage by updating the state and embedding */ + step_mem->istage = j; ark_mem->tcur = ark_mem->tn + j * hsm1inv; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, j, ark_mem->tcur); @@ -1397,7 +1392,6 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } /* Complete the next-to-last stage by evaluating the RHS and storing it in tempv2 */ - step_mem->istage = step_mem->req_stages - 1; if (ark_mem->PreRhsFn) { retval = ark_mem->PreRhsFn(ark_mem->tcur, ark_mem->ycur, ark_mem->user_data); @@ -1563,6 +1557,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Begin the second stage, and accumulate embedding into tempv1 */ ark_mem->tcur = ark_mem->tn + hrat; + step_mem->istage = 1; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 1, ark_mem->tcur); N_VLinearSum(ONE, ark_mem->yn, hrat, ark_mem->fn, ark_mem->ycur); @@ -1587,9 +1582,6 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Evaluate first stage group */ for (int j = 2; j <= ((in - 1) * (in - 2) / 2); j++) { - /* set stage index (0-based) */ - step_mem->istage = j - 1; - /* Complete previous stage by evaluating RHS and storing it in tempv3 */ /* apply user-supplied stage preprocessing function (if supplied) */ @@ -1621,6 +1613,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Begin the j-th stage by updating the state and embedding */ ark_mem->tcur = ark_mem->tn + j * hrat; + step_mem->istage = j; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, j, ark_mem->tcur); N_VLinearSum(ONE, ark_mem->ycur, hrat, ark_mem->tempv3, ark_mem->ycur); @@ -1650,9 +1643,6 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Evaluate second stage group */ for (int j = ((in - 1) * (in - 2) / 2 + 1); j <= (in * (in + 1) / 2 - 1); j++) { - /* set stage index (0-based) */ - step_mem->istage = j - 1; - /* Complete previous stage by evaluating RHS and storing it in tempv3 */ /* apply user-supplied stage preprocessing function (if supplied) */ @@ -1684,6 +1674,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Begin the j-th stage by updating the state and embedding */ ark_mem->tcur = ark_mem->tn + j * hrat; + step_mem->istage = j; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, j, ark_mem->tcur); N_VLinearSum(ONE, ark_mem->ycur, hrat, ark_mem->tempv3, ark_mem->ycur); @@ -1707,9 +1698,6 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - /* Complete the last stage from the second stage group */ - step_mem->istage = (in * (in + 1) / 2 - 1); - /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRhsFn) { @@ -1738,6 +1726,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Begin the next stage before final stage group */ ark_mem->tcur = ark_mem->tn + (in * (in - 1) / 2) * hrat; + step_mem->istage = in * (in + 1) / 2; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, (in * (in + 1) / 2), ark_mem->tcur); cvals[0] = (rn - ONE) / (TWO * rn - ONE); @@ -1774,9 +1763,6 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Evaluate final stage group */ for (int j = (in * (in + 1) / 2 + 1); j <= step_mem->req_stages; j++) { - /* set stage index (0-based) */ - step_mem->istage = j - 1; - /* Complete the previous stage */ /* apply user-supplied stage preprocessing function (if supplied) */ @@ -1808,6 +1794,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Begin the j-th stage by updating the state and embedding */ ark_mem->tcur = ark_mem->tn + (j - in) * hrat; + step_mem->istage = j; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, j, ark_mem->tcur); N_VLinearSum(ONE, ark_mem->ycur, hrat, ark_mem->tempv3, ark_mem->ycur); @@ -1950,6 +1937,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Perform the second stage, and accumulate embedding into tempv1 */ ark_mem->tcur = ark_mem->tn + hp5; + step_mem->istage = 1; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 1, ark_mem->tcur); N_VLinearSum(ONE, ark_mem->yn, hp5, ark_mem->fn, ark_mem->ycur); @@ -1971,9 +1959,6 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - /* update stage index */ - step_mem->istage = 1; - /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) { @@ -2002,6 +1987,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Perform the third stage */ ark_mem->tcur = ark_mem->tn + ark_mem->h; + step_mem->istage = 2; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 2, ark_mem->tcur); N_VLinearSum(ONE, ark_mem->ycur, hp5, ark_mem->tempv3, ark_mem->ycur); @@ -2023,9 +2009,6 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - /* update stage index */ - step_mem->istage = 2; - /* Evaluate stage RHS */ /* apply user-supplied stage preprocessing function (if supplied) */ @@ -2055,6 +2038,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Perform the fourth stage */ ark_mem->tcur = ark_mem->tn + hp5; + step_mem->istage = 3; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 3, ark_mem->tcur); cvals[0] = ONE / THREE; @@ -2088,9 +2072,6 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr } } - /* update stage index */ - step_mem->istage = 3; - /* Evaluate stage RHS */ /* apply user-supplied stage preprocessing function (if supplied) */ @@ -2119,8 +2100,8 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); /* Compute the time step solution and embedding */ - step_mem->istage = 4; ark_mem->tcur = ark_mem->tn + ark_mem->h; + step_mem->istage = 4; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 4, ark_mem->tcur); N_VLinearSum(ONE, ark_mem->ycur, hp5, ark_mem->tempv3, ark_mem->ycur); @@ -2244,6 +2225,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* Begin the second stage, and accumulate embedding into tempv1 */ ark_mem->tcur = ark_mem->tn + hsixth; + step_mem->istage = 1; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 1, ark_mem->tcur); N_VLinearSum(ONE, ark_mem->yn, hsixth, ark_mem->fn, ark_mem->ycur); @@ -2268,8 +2250,6 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } } - /* update stage index (0-based) */ - step_mem->istage = j - 1; /* Complete previous stage by evaluating RHS and storing in tempv3 */ /* apply user-supplied stage preprocessing function (if supplied) */ @@ -2302,6 +2282,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* Begin the j-th stage by updating the state and embedding */ if (j == 5) { ark_mem->tcur = ark_mem->tn + 2 * hsixth; } else { ark_mem->tcur = ark_mem->tn + j * hsixth; } + step_mem->istage = j; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, j, ark_mem->tcur); N_VLinearSum(ONE, ark_mem->ycur, hsixth, ark_mem->tempv3, ark_mem->ycur); @@ -2343,9 +2324,6 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* Evaluate stages j = 6,...,9 */ for (int j = 6; j <= 9; j++) { - /* set stage index (0-based) */ - step_mem->istage = j - 1; - /* Complete previous stage by evaluating RHS and storing in tempv3 */ /* apply user-supplied stage preprocessing function (if supplied) */ @@ -2377,8 +2355,9 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* Begin the j-th stage by updating the state and embedding */ ark_mem->tcur = ark_mem->tn + (j - 3) * hsixth; + step_mem->istage = j; SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "stage = %i, tcur = " SUN_FORMAT_G, j + 1, ark_mem->tcur); + "stage = %i, tcur = " SUN_FORMAT_G, j, ark_mem->tcur); N_VLinearSum(ONE, ark_mem->ycur, hsixth, ark_mem->tempv3, ark_mem->ycur); if (j == 7 && !ark_mem->fixedstep) @@ -2406,9 +2385,6 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } } - /* set stage index (0-based) */ - step_mem->istage = 9; - /* Complete the last stage by evaluating RHS and storing in tempv3 */ /* apply user-supplied stage preprocessing function (if supplied) */ @@ -2427,7 +2403,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt ark_mem->user_data); step_mem->nfe++; - SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->tempv3, "F_9(:) =", 9); + SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->tempv3, "F_9(:) ="); SUNLogInfoIf(retval != 0, ARK_LOGGER, "end-stages-list", "status = failed rhs eval, retval = %i", retval); @@ -2435,6 +2411,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt if (retval > 0) { return RHSFUNC_RECVR; } /* Compute the final time step solution */ + step_mem->istage = 10; cvals[0] = SUN_RCONST(0.6); Xvecs[0] = ark_mem->ycur; cvals[1] = ONE; diff --git a/src/arkode/arkode_lsrkstep_io.c b/src/arkode/arkode_lsrkstep_io.c index f9ebd232a6..a92cd4930a 100644 --- a/src/arkode/arkode_lsrkstep_io.c +++ b/src/arkode/arkode_lsrkstep_io.c @@ -787,7 +787,7 @@ int lsrkStep_GetStageIndex(ARKodeMem ark_mem, int* stage, int* max_stages) if (retval != ARK_SUCCESS) { return (retval); } *stage = step_mem->istage; - *max_stages = step_mem->req_stages; + *max_stages = step_mem->req_stages + 1; return (ARK_SUCCESS); } diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index f847bab318..2e4035783b 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -2526,7 +2526,8 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Loop over stages */ for (stage = 1; stage < max_stages; stage++) { - /* Set current stage index */ + /* Set current stage time and index */ + ark_mem->tcur = ark_mem->tn + cstage * ark_mem->h; step_mem->istage = stage; /* Determine if this is an "embedding" or "solution" stage */ @@ -2541,11 +2542,11 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, stage type = %d, tcur = " SUN_FORMAT_G, stage, - MRISTAGE_ERK_FAST, ark_mem->tn + cstage * ark_mem->h); + MRISTAGE_ERK_FAST, ark_mem->tcur); /* Compute forcing function for inner solver */ retval = mriStep_ComputeInnerForcing(ark_mem, step_mem, stage, ark_mem->tn, - ark_mem->tn + cstage * ark_mem->h); + ark_mem->tcur); if (retval != ARK_SUCCESS) { SUNLogInfo(ARK_LOGGER, "end-stages-list", @@ -2572,8 +2573,7 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Evolve fast IVP for this stage, potentially get inner dsm on all non-embedding stages */ retval = mriStep_StageERKFast(ark_mem, step_mem, ark_mem->tn, - ark_mem->tn + cstage * ark_mem->h, - ark_mem->ycur, ytemp, + ark_mem->tcur, ark_mem->ycur, ytemp, need_inner_dsm && !embedding); if (retval != ARK_SUCCESS) { @@ -2583,10 +2583,6 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) return retval; } - /* set current stage time for implicit correction, postprocessing - and RHS calls */ - ark_mem->tcur = ark_mem->tn + cstage * ark_mem->h; - /* perform MRISR slow/implicit correction */ impl_corr = SUNFALSE; if (step_mem->implicit_rhs) From 02bc6020c6133c79d023941fa48ee6c2a5b7a4ac Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 30 Mar 2026 10:50:52 -0400 Subject: [PATCH 255/298] Formatting --- doc/arkode/guide/source/Usage/User_callable.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/arkode/guide/source/Usage/User_callable.rst b/doc/arkode/guide/source/Usage/User_callable.rst index 206da27281..35996af91b 100644 --- a/doc/arkode/guide/source/Usage/User_callable.rst +++ b/doc/arkode/guide/source/Usage/User_callable.rst @@ -4524,9 +4524,10 @@ Current stage index, and total number of stages :c:func:`ARKodeGetStageIn For temporally adaptive computations in MRIStep, the "embedding" stage is indicated using `stage` **equal to** `max_stages`. - For the methods in LSRKStep, `s` corresponds with the number of stages that - involve updates to the solution, which is thus one larger than what `s` denotes - for explicit Runge--Kutta methods. Thus when using LSRKStep, `stage` will + For the methods in LSRKStep the number of "stages" in each method, `s`, + corresponds with the number of solution updates, and thus this is one + larger than what `s` denotes for explicit Runge--Kutta methods. Thus + when calling `ARKodeGetStageIndex` while using LSRKStep, `stage` will range from 0 to `s` (inclusive), and `max_stages` will be `s+1`. .. versionadded:: x.y.z From e2425639e4d65939a07c40670a232d645ebe1ca3 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 30 Mar 2026 10:56:35 -0400 Subject: [PATCH 256/298] Formatting --- src/arkode/arkode_erkstep.c | 2 +- src/arkode/arkode_lsrkstep.c | 78 ++++++++++++++++++------------------ src/arkode/arkode_mristep.c | 8 ++-- 3 files changed, 44 insertions(+), 44 deletions(-) diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index de7f4acabd..095a4262c4 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -831,7 +831,7 @@ int erkStep_TakeStep(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) for (is = 1; is < step_mem->stages; is++) { /* Set current stage time and index */ - ark_mem->tcur = ark_mem->tn + step_mem->B->c[is] * ark_mem->h; + ark_mem->tcur = ark_mem->tn + step_mem->B->c[is] * ark_mem->h; step_mem->istage = is; SUNLogInfo(ARK_LOGGER, "begin-stages-list", diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index db863a426e..e79de3f433 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -682,7 +682,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) mus = w1 * bjm1; /* Evaluate the first stage (store in tmp2) and initialize embedding */ - ark_mem->tcur = ark_mem->tn + ark_mem->h * mus; + ark_mem->tcur = ark_mem->tn + ark_mem->h * mus; step_mem->istage = 1; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 1, ark_mem->tcur); @@ -742,16 +742,16 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); /* Compute new stage value and store in ycur */ - zj = TWO * w0 * zjm1 - zjm2; - dzj = TWO * w0 * dzjm1 - dzjm2 + TWO * zjm1; - d2zj = TWO * w0 * d2zjm1 - d2zjm2 + FOUR * dzjm1; - bj = d2zj / SUNSQR(dzj); - ajm1 = ONE - zjm1 * bjm1; - mu = TWO * w0 * bj / bjm1; - nu = -bj / bjm2; - mus = mu * w1 / w0; - thj = mu * thjm1 + nu * thjm2 + mus * (ONE - ajm1); - ark_mem->tcur = ark_mem->tn + ark_mem->h * thj; + zj = TWO * w0 * zjm1 - zjm2; + dzj = TWO * w0 * dzjm1 - dzjm2 + TWO * zjm1; + d2zj = TWO * w0 * d2zjm1 - d2zjm2 + FOUR * dzjm1; + bj = d2zj / SUNSQR(dzj); + ajm1 = ONE - zjm1 * bjm1; + mu = TWO * w0 * bj / bjm1; + nu = -bj / bjm2; + mus = mu * w1 / w0; + thj = mu * thjm1 + nu * thjm2 + mus * (ONE - ajm1); + ark_mem->tcur = ark_mem->tn + ark_mem->h * thj; step_mem->istage = j; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, j, ark_mem->tcur); @@ -1030,7 +1030,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) mus = w1 * bjm1; /* Evaluate the first stage (store in tmp2) and initialize embedding */ - ark_mem->tcur = ark_mem->tn + ark_mem->h * mus; + ark_mem->tcur = ark_mem->tn + ark_mem->h * mus; step_mem->istage = 1; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 1, ark_mem->tcur); @@ -1080,14 +1080,14 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); /* Compute new stage value and store in ycur */ - temj = (j + TWO) * (j - ONE); - bj = temj / (TWO * j * (j + ONE)); - ajm1 = ONE - bjm1; - mu = (TWO * j - ONE) / j * (bj / bjm1); - nu = -(j - ONE) / j * (bj / bjm2); - mus = w1 * mu; - cj = temj * w1 / FOUR; - ark_mem->tcur = ark_mem->tn + ark_mem->h * cj; + temj = (j + TWO) * (j - ONE); + bj = temj / (TWO * j * (j + ONE)); + ajm1 = ONE - bjm1; + mu = (TWO * j - ONE) / j * (bj / bjm1); + nu = -(j - ONE) / j * (bj / bjm2); + mus = w1 * mu; + cj = temj * w1 / FOUR; + ark_mem->tcur = ark_mem->tn + ark_mem->h * cj; step_mem->istage = j; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, j, ark_mem->tcur); @@ -1311,7 +1311,7 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); /* Begin the second stage, and accumulate embedding into tempv1 */ - ark_mem->tcur = ark_mem->tn + hsm1inv; + ark_mem->tcur = ark_mem->tn + hsm1inv; step_mem->istage = 1; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 1, ark_mem->tcur); @@ -1368,7 +1368,7 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Begin the j-th stage by updating the state and embedding */ step_mem->istage = j; - ark_mem->tcur = ark_mem->tn + j * hsm1inv; + ark_mem->tcur = ark_mem->tn + j * hsm1inv; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, j, ark_mem->tcur); N_VLinearSum(ONE, ark_mem->ycur, hsm1inv, ark_mem->tempv2, ark_mem->ycur); @@ -1556,7 +1556,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); /* Begin the second stage, and accumulate embedding into tempv1 */ - ark_mem->tcur = ark_mem->tn + hrat; + ark_mem->tcur = ark_mem->tn + hrat; step_mem->istage = 1; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 1, ark_mem->tcur); @@ -1612,7 +1612,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); /* Begin the j-th stage by updating the state and embedding */ - ark_mem->tcur = ark_mem->tn + j * hrat; + ark_mem->tcur = ark_mem->tn + j * hrat; step_mem->istage = j; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, j, ark_mem->tcur); @@ -1673,7 +1673,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); /* Begin the j-th stage by updating the state and embedding */ - ark_mem->tcur = ark_mem->tn + j * hrat; + ark_mem->tcur = ark_mem->tn + j * hrat; step_mem->istage = j; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, j, ark_mem->tcur); @@ -1725,7 +1725,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); /* Begin the next stage before final stage group */ - ark_mem->tcur = ark_mem->tn + (in * (in - 1) / 2) * hrat; + ark_mem->tcur = ark_mem->tn + (in * (in - 1) / 2) * hrat; step_mem->istage = in * (in + 1) / 2; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, (in * (in + 1) / 2), ark_mem->tcur); @@ -1793,7 +1793,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); /* Begin the j-th stage by updating the state and embedding */ - ark_mem->tcur = ark_mem->tn + (j - in) * hrat; + ark_mem->tcur = ark_mem->tn + (j - in) * hrat; step_mem->istage = j; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, j, ark_mem->tcur); @@ -1936,7 +1936,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); /* Perform the second stage, and accumulate embedding into tempv1 */ - ark_mem->tcur = ark_mem->tn + hp5; + ark_mem->tcur = ark_mem->tn + hp5; step_mem->istage = 1; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 1, ark_mem->tcur); @@ -1986,7 +1986,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); /* Perform the third stage */ - ark_mem->tcur = ark_mem->tn + ark_mem->h; + ark_mem->tcur = ark_mem->tn + ark_mem->h; step_mem->istage = 2; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 2, ark_mem->tcur); @@ -2037,7 +2037,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); /* Perform the fourth stage */ - ark_mem->tcur = ark_mem->tn + hp5; + ark_mem->tcur = ark_mem->tn + hp5; step_mem->istage = 3; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 3, ark_mem->tcur); @@ -2224,7 +2224,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt N_VScale(ONE, ark_mem->yn, ark_mem->tempv2); /* Begin the second stage, and accumulate embedding into tempv1 */ - ark_mem->tcur = ark_mem->tn + hsixth; + ark_mem->tcur = ark_mem->tn + hsixth; step_mem->istage = 1; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 1, ark_mem->tcur); @@ -2354,7 +2354,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); /* Begin the j-th stage by updating the state and embedding */ - ark_mem->tcur = ark_mem->tn + (j - 3) * hsixth; + ark_mem->tcur = ark_mem->tn + (j - 3) * hsixth; step_mem->istage = j; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, j, ark_mem->tcur); @@ -2412,13 +2412,13 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* Compute the final time step solution */ step_mem->istage = 10; - cvals[0] = SUN_RCONST(0.6); - Xvecs[0] = ark_mem->ycur; - cvals[1] = ONE; - Xvecs[1] = ark_mem->tempv2; - cvals[2] = SUN_RCONST(0.1) * ark_mem->h; - Xvecs[2] = ark_mem->tempv3; - retval = N_VLinearCombination(3, cvals, Xvecs, ark_mem->ycur); + cvals[0] = SUN_RCONST(0.6); + Xvecs[0] = ark_mem->ycur; + cvals[1] = ONE; + Xvecs[1] = ark_mem->tempv2; + cvals[2] = SUN_RCONST(0.1) * ark_mem->h; + Xvecs[2] = ark_mem->tempv3; + retval = N_VLinearCombination(3, cvals, Xvecs, ark_mem->ycur); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-stages-list", diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 2e4035783b..d1671fc8a5 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1956,7 +1956,7 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt and stage index */ t0 = ark_mem->tn + step_mem->MRIC->c[is - 1] * ark_mem->h; tf = ark_mem->tcur = ark_mem->tn + step_mem->MRIC->c[is] * ark_mem->h; - step_mem->istage = is; + step_mem->istage = is; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, stage type = %d, tcur = " SUN_FORMAT_G, is, @@ -2527,7 +2527,7 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) for (stage = 1; stage < max_stages; stage++) { /* Set current stage time and index */ - ark_mem->tcur = ark_mem->tn + cstage * ark_mem->h; + ark_mem->tcur = ark_mem->tn + cstage * ark_mem->h; step_mem->istage = stage; /* Determine if this is an "embedding" or "solution" stage */ @@ -2572,8 +2572,8 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Evolve fast IVP for this stage, potentially get inner dsm on all non-embedding stages */ - retval = mriStep_StageERKFast(ark_mem, step_mem, ark_mem->tn, - ark_mem->tcur, ark_mem->ycur, ytemp, + retval = mriStep_StageERKFast(ark_mem, step_mem, ark_mem->tn, ark_mem->tcur, + ark_mem->ycur, ytemp, need_inner_dsm && !embedding); if (retval != ARK_SUCCESS) { From 73612871f8924a908cff6f7e1269e11131463496 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 30 Mar 2026 13:21:46 -0400 Subject: [PATCH 257/298] minor reversions to upstream --- src/arkode/arkode_lsrkstep.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index e79de3f433..19ecfc2b83 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -826,6 +826,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "begin-compute-embedding", ""); /* final stage processing */ + ark_mem->tcur = ark_mem->tn + ark_mem->h; /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) @@ -1150,9 +1151,10 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); SUNLogExtraDebugVec(ARK_LOGGER, "updated solution", ark_mem->ycur, "ycur(:) ="); - SUNLogInfo(ARK_LOGGER, "begin-compute-embedding", ""); /* final stage processing */ + SUNLogInfo(ARK_LOGGER, "begin-compute-embedding", ""); + ark_mem->tcur = ark_mem->tn + ark_mem->h; /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) From 264d10f131f452b2cf3fc05ed6cd7a411d73aaa6 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 30 Mar 2026 13:29:21 -0400 Subject: [PATCH 258/298] Fixed location for setting tcur --- src/arkode/arkode_mristep.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index d1671fc8a5..cd4fef4894 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -2526,10 +2526,6 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Loop over stages */ for (stage = 1; stage < max_stages; stage++) { - /* Set current stage time and index */ - ark_mem->tcur = ark_mem->tn + cstage * ark_mem->h; - step_mem->istage = stage; - /* Determine if this is an "embedding" or "solution" stage */ solution = (stage == step_mem->stages - 1); embedding = (stage == step_mem->stages); @@ -2540,6 +2536,10 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Set current stage abscissa */ cstage = (embedding) ? ONE : step_mem->MRIC->c[stage]; + /* Set current stage time and index */ + ark_mem->tcur = ark_mem->tn + cstage * ark_mem->h; + step_mem->istage = stage; + SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, stage type = %d, tcur = " SUN_FORMAT_G, stage, MRISTAGE_ERK_FAST, ark_mem->tcur); From 619d3ca687de8530f2669657b6778af4583aa07c Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 30 Mar 2026 15:12:21 -0400 Subject: [PATCH 259/298] additional bugfix related to PR revisions --- src/arkode/arkode_mristep.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index cd4fef4894..b2a17671db 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -2147,6 +2147,8 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* perform embedded stage (if needed) */ if (do_embedding) { + step_mem->istage = is = step_mem->stages; + /* Temporarily swap ark_mem->ycur and ark_mem->tempv4 pointers, copying data so that both hold the current ark_mem->ycur value. This ensures that during this embedding "stage": @@ -2158,11 +2160,9 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt ark_mem->tempv4 = tmp; /* Reset ark_mem->tcur as the time value corresponding with the end of the step */ - /* Set relevant stage times (including desired stage time for implicit solves), - and set the current stage index */ + /* Set relevant stage times (including desired stage time for implicit solves) */ t0 = ark_mem->tn + step_mem->MRIC->c[is - 2] * ark_mem->h; tf = ark_mem->tcur = ark_mem->tn + ark_mem->h; - step_mem->istage = is = step_mem->stages; SUNLogInfo(ARK_LOGGER, "begin-compute-embedding", "stage = %i, stage type = %d, tcur = " SUN_FORMAT_G, is, @@ -2230,11 +2230,11 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* Compute final stage (for evolved solution), along with error estimate */ { - /* Set relevant stage times (including desired stage time for implicit solves), - and set the current stage index */ + step_mem->istage = is = step_mem->stages - 1; + + /* Set relevant stage times (including desired stage time for implicit solves) */ t0 = ark_mem->tn + step_mem->MRIC->c[is - 1] * ark_mem->h; tf = ark_mem->tcur = ark_mem->tn + ark_mem->h; - step_mem->istage = is = step_mem->stages - 1; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, stage type = %d, tcur = " SUN_FORMAT_G, is, From 3ee39a183fa5b448f639ce3d861a2072a9d26aeb Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 30 Mar 2026 17:46:56 -0400 Subject: [PATCH 260/298] Updated stageinfo output files based on PR updates --- test/answers | 2 +- .../CXX_serial/ark_test_stageinfo_erkstep.out | 24 ++-- .../ark_test_stageinfo_lsrkstep_0.out | 30 ++--- .../ark_test_stageinfo_lsrkstep_1.out | 24 ++-- .../ark_test_stageinfo_lsrkstep_2.out | 22 ++-- .../ark_test_stageinfo_lsrkstep_3.out | 46 +++---- .../ark_test_stageinfo_lsrkstep_4.out | 46 +++---- .../ark_test_stageinfo_lsrkstep_5.out | 118 +++++++++--------- .../ark_test_stageinfo_mristep_0.out | 12 +- .../ark_test_stageinfo_mristep_1.out | 18 +-- .../ark_test_stageinfo_mristep_2.out | 18 +-- 11 files changed, 180 insertions(+), 180 deletions(-) diff --git a/test/answers b/test/answers index d283b52229..50741850f7 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit d283b52229f2756a41b6de9ae73bc475bcb4ac59 +Subproject commit 50741850f7c0e611c3a210b7cb7f271f99174bd9 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.out index f07040bd8b..147b7999e2 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_erkstep.out @@ -6,42 +6,42 @@ Start ERKStep StageInfo test [Pre-RHS (stage 0 of 5) at t = 4.71e-08 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] [Pre-RHS (stage 0 of 5) at t = 2.06e-04 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] [Pre-step at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), step = 0, attempt = 1, ||y||_2 = 2.1213203436e+00] - [Post-stage processing (stage 0 of 5) at t = 4.12e-05 (tn = 0.00e+00 , tcur = 4.12e-05), ||y||_2 = 2.1213203436e+00] + [Post-stage processing (stage 1 of 5) at t = 4.12e-05 (tn = 0.00e+00 , tcur = 4.12e-05), ||y||_2 = 2.1213203436e+00] [Pre-RHS (stage 1 of 5) at t = 4.12e-05 (tn = 0.00e+00 , tcur = 4.12e-05), ||y||_2 = 2.1213203436e+00] - [Post-stage processing (stage 1 of 5) at t = 6.18e-05 (tn = 0.00e+00 , tcur = 6.18e-05), ||y||_2 = 2.1213200432e+00] + [Post-stage processing (stage 2 of 5) at t = 6.18e-05 (tn = 0.00e+00 , tcur = 6.18e-05), ||y||_2 = 2.1213200432e+00] [Pre-RHS (stage 2 of 5) at t = 6.18e-05 (tn = 0.00e+00 , tcur = 6.18e-05), ||y||_2 = 2.1213200432e+00] - [Post-stage processing (stage 2 of 5) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213199340e+00] + [Post-stage processing (stage 3 of 5) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213199340e+00] [Pre-RHS (stage 3 of 5) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213199340e+00] [Postprocess-step at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04),||y||_2 = 2.1213198430e+00] [Pre-RHS (stage 4 of 5) at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), ||y||_2 = 2.1213198430e+00] [Post-step at t = 1.03e-04 (tn = 0.00e+00 , tcur = 1.03e-04), step = 0, ||y||_2 = 2.1213198430e+00] 1.0298602561e-04 1.2247448703e+00 1.7320501952e+00 2.2204460493e-16 0.0000000000e+00 [Pre-step at t = 1.03e-04 (tn = 1.03e-04 , tcur = 1.03e-04), step = 1, attempt = 1, ||y||_2 = 2.1213198430e+00] - [Post-stage processing (stage 0 of 5) at t = 6.56e-03 (tn = 1.03e-04 , tcur = 6.56e-03), ||y||_2 = 2.1212571010e+00] + [Post-stage processing (stage 1 of 5) at t = 6.56e-03 (tn = 1.03e-04 , tcur = 6.56e-03), ||y||_2 = 2.1212571010e+00] [Pre-RHS (stage 1 of 5) at t = 6.56e-03 (tn = 1.03e-04 , tcur = 6.56e-03), ||y||_2 = 2.1212571010e+00] - [Post-stage processing (stage 1 of 5) at t = 9.78e-03 (tn = 1.03e-04 , tcur = 9.78e-03), ||y||_2 = 2.1138657565e+00] + [Post-stage processing (stage 2 of 5) at t = 9.78e-03 (tn = 1.03e-04 , tcur = 9.78e-03), ||y||_2 = 2.1138657565e+00] [Pre-RHS (stage 2 of 5) at t = 9.78e-03 (tn = 1.03e-04 , tcur = 9.78e-03), ||y||_2 = 2.1138657565e+00] - [Post-stage processing (stage 2 of 5) at t = 1.62e-02 (tn = 1.03e-04 , tcur = 1.62e-02), ||y||_2 = 2.1111621630e+00] + [Post-stage processing (stage 3 of 5) at t = 1.62e-02 (tn = 1.03e-04 , tcur = 1.62e-02), ||y||_2 = 2.1111621630e+00] [Pre-RHS (stage 3 of 5) at t = 1.62e-02 (tn = 1.03e-04 , tcur = 1.62e-02), ||y||_2 = 2.1111621630e+00] [Postprocess-step at t = 1.62e-02 (tn = 1.03e-04 , tcur = 1.62e-02),||y||_2 = 2.1089486502e+00] [Pre-RHS (stage 4 of 5) at t = 1.62e-02 (tn = 1.03e-04 , tcur = 1.62e-02), ||y||_2 = 2.1089486502e+00] [Pre-step at t = 1.03e-04 (tn = 1.03e-04 , tcur = 1.03e-04), step = 1, attempt = 2, ||y||_2 = 2.1213198430e+00] - [Post-stage processing (stage 0 of 5) at t = 6.49e-03 (tn = 1.03e-04 , tcur = 6.49e-03), ||y||_2 = 2.1212577772e+00] + [Post-stage processing (stage 1 of 5) at t = 6.49e-03 (tn = 1.03e-04 , tcur = 6.49e-03), ||y||_2 = 2.1212577772e+00] [Pre-RHS (stage 1 of 5) at t = 6.49e-03 (tn = 1.03e-04 , tcur = 6.49e-03), ||y||_2 = 2.1212577772e+00] - [Post-stage processing (stage 1 of 5) at t = 9.68e-03 (tn = 1.03e-04 , tcur = 9.68e-03), ||y||_2 = 2.1140241446e+00] + [Post-stage processing (stage 2 of 5) at t = 9.68e-03 (tn = 1.03e-04 , tcur = 9.68e-03), ||y||_2 = 2.1140241446e+00] [Pre-RHS (stage 2 of 5) at t = 9.68e-03 (tn = 1.03e-04 , tcur = 9.68e-03), ||y||_2 = 2.1140241446e+00] - [Post-stage processing (stage 2 of 5) at t = 1.61e-02 (tn = 1.03e-04 , tcur = 1.61e-02), ||y||_2 = 2.1113775352e+00] + [Post-stage processing (stage 3 of 5) at t = 1.61e-02 (tn = 1.03e-04 , tcur = 1.61e-02), ||y||_2 = 2.1113775352e+00] [Pre-RHS (stage 3 of 5) at t = 1.61e-02 (tn = 1.03e-04 , tcur = 1.61e-02), ||y||_2 = 2.1113775352e+00] [Postprocess-step at t = 1.61e-02 (tn = 1.03e-04 , tcur = 1.61e-02),||y||_2 = 2.1092106860e+00] [Pre-RHS (stage 4 of 5) at t = 1.61e-02 (tn = 1.03e-04 , tcur = 1.61e-02), ||y||_2 = 2.1092106860e+00] [Post-step at t = 1.61e-02 (tn = 1.03e-04 , tcur = 1.61e-02), step = 1, ||y||_2 = 2.1092106860e+00] 1.6063645340e-02 1.2247184913e+00 1.7172170321e+00 4.4212199679e-08 2.9106373312e-08 [Pre-step at t = 1.61e-02 (tn = 1.61e-02 , tcur = 1.61e-02), step = 2, attempt = 1, ||y||_2 = 2.1092106860e+00] - [Post-stage processing (stage 0 of 5) at t = 2.24e-02 (tn = 1.61e-02 , tcur = 2.24e-02), ||y||_2 = 2.0996520676e+00] + [Post-stage processing (stage 1 of 5) at t = 2.24e-02 (tn = 1.61e-02 , tcur = 2.24e-02), ||y||_2 = 2.0996520676e+00] [Pre-RHS (stage 1 of 5) at t = 2.24e-02 (tn = 1.61e-02 , tcur = 2.24e-02), ||y||_2 = 2.0996520676e+00] - [Post-stage processing (stage 1 of 5) at t = 2.56e-02 (tn = 1.61e-02 , tcur = 2.56e-02), ||y||_2 = 2.0880076268e+00] + [Post-stage processing (stage 2 of 5) at t = 2.56e-02 (tn = 1.61e-02 , tcur = 2.56e-02), ||y||_2 = 2.0880076268e+00] [Pre-RHS (stage 2 of 5) at t = 2.56e-02 (tn = 1.61e-02 , tcur = 2.56e-02), ||y||_2 = 2.0880076268e+00] - [Post-stage processing (stage 2 of 5) at t = 3.20e-02 (tn = 1.61e-02 , tcur = 3.20e-02), ||y||_2 = 2.0760211062e+00] + [Post-stage processing (stage 3 of 5) at t = 3.20e-02 (tn = 1.61e-02 , tcur = 3.20e-02), ||y||_2 = 2.0760211062e+00] [Pre-RHS (stage 3 of 5) at t = 3.20e-02 (tn = 1.61e-02 , tcur = 3.20e-02), ||y||_2 = 2.0760211062e+00] [Postprocess-step at t = 3.20e-02 (tn = 1.61e-02 , tcur = 3.20e-02),||y||_2 = 2.0740200715e+00] [Pre-RHS (stage 4 of 5) at t = 3.20e-02 (tn = 1.61e-02 , tcur = 3.20e-02), ||y||_2 = 2.0740200715e+00] diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_0.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_0.out index c664c7cc22..76f3a068c4 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_0.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_0.out @@ -3,28 +3,28 @@ Using RKC method t y y err --------------------------------------------------------------------- 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-RHS (stage 0 of 0) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] - [Pre-RHS (stage 0 of 0) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] - [Pre-RHS (stage 0 of 0) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] + [Pre-RHS (stage 0 of 1) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] + [Pre-RHS (stage 0 of 1) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] + [Pre-RHS (stage 0 of 1) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] [Pre-step at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), step = 0, attempt = 1, ||y||_2 = 0.0000000000e+00] - [Post-stage processing (stage 0 of 2) at t = 1.47e-12 (tn = 0.00e+00 , tcur = 1.47e-12), ||y||_2 = 1.4693648727e-12] - [Pre-RHS (stage 1 of 2) at t = 1.47e-12 (tn = 0.00e+00 , tcur = 1.47e-12), ||y||_2 = 1.4693648727e-12] - [Postprocess-step at t = 1.22e-11 (tn = 0.00e+00 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] - [Pre-RHS (stage 2 of 2) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Post-stage processing (stage 1 of 3) at t = 1.47e-12 (tn = 0.00e+00 , tcur = 1.47e-12), ||y||_2 = 1.4693648727e-12] + [Pre-RHS (stage 1 of 3) at t = 1.47e-12 (tn = 0.00e+00 , tcur = 1.47e-12), ||y||_2 = 1.4693648727e-12] + [Postprocess-step at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] + [Pre-RHS (stage 2 of 3) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] [Post-step at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), step = 0, ||y||_2 = 6.1035156250e-12] 6.1035156250e-12 6.1035156250e-12 1.2116903504e-26 [Pre-step at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), step = 1, attempt = 1, ||y||_2 = 6.1035156250e-12] - [Post-stage processing (stage 0 of 2) at t = 1.47e-08 (tn = 6.10e-12 , tcur = 1.47e-08), ||y||_2 = 1.4699752242e-08] - [Pre-RHS (stage 1 of 2) at t = 1.47e-08 (tn = 6.10e-12 , tcur = 1.47e-08), ||y||_2 = 1.4699752242e-08] - [Postprocess-step at t = 1.22e-07 (tn = 6.10e-12 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] - [Pre-RHS (stage 2 of 2) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Post-stage processing (stage 1 of 3) at t = 1.47e-08 (tn = 6.10e-12 , tcur = 1.47e-08), ||y||_2 = 1.4699752242e-08] + [Pre-RHS (stage 1 of 3) at t = 1.47e-08 (tn = 6.10e-12 , tcur = 1.47e-08), ||y||_2 = 1.4699752242e-08] + [Postprocess-step at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] + [Pre-RHS (stage 2 of 3) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] [Post-step at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), step = 1, ||y||_2 = 6.1041259766e-08] 6.1041259766e-08 6.1041259766e-08 5.2939559203e-23 [Pre-step at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), step = 2, attempt = 1, ||y||_2 = 6.1041259766e-08] - [Post-stage processing (stage 0 of 2) at t = 3.55e-07 (tn = 6.10e-08 , tcur = 3.55e-07), ||y||_2 = 3.5491423430e-07] - [Pre-RHS (stage 1 of 2) at t = 3.55e-07 (tn = 6.10e-08 , tcur = 3.55e-07), ||y||_2 = 3.5491423430e-07] - [Postprocess-step at t = 2.50e-06 (tn = 6.10e-08 , tcur = 1.28e-06),||y||_2 = 1.2817443848e-06] - [Pre-RHS (stage 2 of 2) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Post-stage processing (stage 1 of 3) at t = 3.55e-07 (tn = 6.10e-08 , tcur = 3.55e-07), ||y||_2 = 3.5491423430e-07] + [Pre-RHS (stage 1 of 3) at t = 3.55e-07 (tn = 6.10e-08 , tcur = 3.55e-07), ||y||_2 = 3.5491423430e-07] + [Postprocess-step at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06),||y||_2 = 1.2817443848e-06] + [Pre-RHS (stage 2 of 3) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] [Post-step at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), step = 2, ||y||_2 = 1.2817443848e-06] 1.2817443848e-06 1.2817443848e-06 3.8518823276e-19 --------------------------------------------------------------------- diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_1.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_1.out index 9874a7359c..907103d9e6 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_1.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_1.out @@ -3,28 +3,28 @@ Using RKL method t y y err --------------------------------------------------------------------- 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-RHS (stage 0 of 0) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] - [Pre-RHS (stage 0 of 0) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] - [Pre-RHS (stage 0 of 0) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] + [Pre-RHS (stage 0 of 1) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] + [Pre-RHS (stage 0 of 1) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] + [Pre-RHS (stage 0 of 1) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] [Pre-step at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), step = 0, attempt = 1, ||y||_2 = 0.0000000000e+00] - [Post-stage processing (stage 0 of 2) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] - [Pre-RHS (stage 1 of 2) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] + [Post-stage processing (stage 1 of 3) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] + [Pre-RHS (stage 1 of 3) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] [Postprocess-step at t = 1.22e-11 (tn = 0.00e+00 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] - [Pre-RHS (stage 2 of 2) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Pre-RHS (stage 2 of 3) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] [Post-step at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), step = 0, ||y||_2 = 6.1035156250e-12] 6.1035156250e-12 6.1035156250e-12 0.0000000000e+00 [Pre-step at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), step = 1, attempt = 1, ||y||_2 = 6.1035156250e-12] - [Post-stage processing (stage 0 of 2) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] - [Pre-RHS (stage 1 of 2) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] + [Post-stage processing (stage 1 of 3) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] + [Pre-RHS (stage 1 of 3) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] [Postprocess-step at t = 1.22e-07 (tn = 6.10e-12 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] - [Pre-RHS (stage 2 of 2) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Pre-RHS (stage 2 of 3) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] [Post-step at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), step = 1, ||y||_2 = 6.1041259766e-08] 6.1041259766e-08 6.1041259766e-08 3.9704669403e-23 [Pre-step at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), step = 2, attempt = 1, ||y||_2 = 6.1041259766e-08] - [Post-stage processing (stage 0 of 2) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] - [Pre-RHS (stage 1 of 2) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] + [Post-stage processing (stage 1 of 3) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] + [Pre-RHS (stage 1 of 3) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] [Postprocess-step at t = 2.50e-06 (tn = 6.10e-08 , tcur = 1.28e-06),||y||_2 = 1.2817443848e-06] - [Pre-RHS (stage 2 of 2) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Pre-RHS (stage 2 of 3) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] [Post-step at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), step = 2, ||y||_2 = 1.2817443848e-06] 1.2817443848e-06 1.2817443848e-06 3.0323779512e-19 --------------------------------------------------------------------- diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_2.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_2.out index 5b7eb5e241..7b3b0a1402 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_2.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_2.out @@ -3,26 +3,26 @@ Using SSP(s,2) method t y y err --------------------------------------------------------------------- 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-RHS (stage 0 of 2) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] - [Pre-RHS (stage 0 of 2) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] - [Pre-RHS (stage 0 of 2) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] + [Pre-RHS (stage 0 of 3) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] + [Pre-RHS (stage 0 of 3) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] + [Pre-RHS (stage 0 of 3) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] [Pre-step at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), step = 0, attempt = 1, ||y||_2 = 0.0000000000e+00] - [Post-stage processing (stage 0 of 2) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] - [Pre-RHS (stage 1 of 2) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Post-stage processing (stage 1 of 3) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Pre-RHS (stage 1 of 3) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] [Postprocess-step at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] [Post-step at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), step = 0, ||y||_2 = 6.1035156250e-12] 6.1035156250e-12 6.1035156250e-12 0.0000000000e+00 [Pre-step at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), step = 1, attempt = 1, ||y||_2 = 6.1035156250e-12] - [Pre-RHS (stage 0 of 2) at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] - [Post-stage processing (stage 0 of 2) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] - [Pre-RHS (stage 1 of 2) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Pre-RHS (stage 0 of 3) at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Post-stage processing (stage 1 of 3) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Pre-RHS (stage 1 of 3) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] [Postprocess-step at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] [Post-step at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), step = 1, ||y||_2 = 6.1041259766e-08] 6.1041259766e-08 6.1041259766e-08 3.9704669403e-23 [Pre-step at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), step = 2, attempt = 1, ||y||_2 = 6.1041259766e-08] - [Pre-RHS (stage 0 of 2) at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] - [Post-stage processing (stage 0 of 2) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] - [Pre-RHS (stage 1 of 2) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Pre-RHS (stage 0 of 3) at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Post-stage processing (stage 1 of 3) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Pre-RHS (stage 1 of 3) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] [Postprocess-step at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06),||y||_2 = 1.2817443848e-06] [Post-step at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), step = 2, ||y||_2 = 1.2817443848e-06] 1.2817443848e-06 1.2817443848e-06 3.0387306983e-19 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_3.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_3.out index 0466aec437..982340b34e 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_3.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_3.out @@ -3,38 +3,38 @@ Using SSP(9,3) method t y y err --------------------------------------------------------------------- 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-RHS (stage 0 of 4) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] - [Pre-RHS (stage 0 of 4) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] - [Pre-RHS (stage 0 of 4) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] + [Pre-RHS (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] + [Pre-RHS (stage 0 of 5) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] + [Pre-RHS (stage 0 of 5) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] [Pre-step at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), step = 0, attempt = 1, ||y||_2 = 0.0000000000e+00] - [Post-stage processing (stage 0 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] - [Pre-RHS (stage 1 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] - [Post-stage processing (stage 1 of 4) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] - [Pre-RHS (stage 2 of 4) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] - [Post-stage processing (stage 2 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] - [Pre-RHS (stage 3 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Post-stage processing (stage 1 of 5) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Pre-RHS (stage 1 of 5) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Post-stage processing (stage 2 of 5) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Pre-RHS (stage 2 of 5) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Post-stage processing (stage 3 of 5) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Pre-RHS (stage 3 of 5) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] [Postprocess-step at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] [Post-step at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), step = 0, ||y||_2 = 6.1035156250e-12] 6.1035156250e-12 6.1035156250e-12 8.0779356695e-28 [Pre-step at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), step = 1, attempt = 1, ||y||_2 = 6.1035156250e-12] - [Pre-RHS (stage 0 of 4) at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] - [Post-stage processing (stage 0 of 4) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] - [Pre-RHS (stage 1 of 4) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] - [Post-stage processing (stage 1 of 4) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] - [Pre-RHS (stage 2 of 4) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] - [Post-stage processing (stage 2 of 4) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] - [Pre-RHS (stage 3 of 4) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Pre-RHS (stage 0 of 5) at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Post-stage processing (stage 1 of 5) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Pre-RHS (stage 1 of 5) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Post-stage processing (stage 2 of 5) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Pre-RHS (stage 2 of 5) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Post-stage processing (stage 3 of 5) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Pre-RHS (stage 3 of 5) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] [Postprocess-step at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] [Post-step at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), step = 1, ||y||_2 = 6.1041259766e-08] 6.1041259766e-08 6.1041259766e-08 0.0000000000e+00 [Pre-step at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), step = 2, attempt = 1, ||y||_2 = 6.1041259766e-08] - [Pre-RHS (stage 0 of 4) at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] - [Post-stage processing (stage 0 of 4) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] - [Pre-RHS (stage 1 of 4) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] - [Post-stage processing (stage 1 of 4) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] - [Pre-RHS (stage 2 of 4) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] - [Post-stage processing (stage 2 of 4) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] - [Pre-RHS (stage 3 of 4) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Pre-RHS (stage 0 of 5) at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Post-stage processing (stage 1 of 5) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Pre-RHS (stage 1 of 5) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Post-stage processing (stage 2 of 5) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Pre-RHS (stage 2 of 5) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Post-stage processing (stage 3 of 5) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Pre-RHS (stage 3 of 5) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] [Postprocess-step at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06),||y||_2 = 1.2817443848e-06] [Post-step at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), step = 2, ||y||_2 = 1.2817443848e-06] 1.2817443848e-06 1.2817443848e-06 2.1175823681e-22 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_4.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_4.out index fa8c611d02..646a390c03 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_4.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_4.out @@ -3,38 +3,38 @@ Using SSP(4,3) method t y y err --------------------------------------------------------------------- 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-RHS (stage 0 of 4) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] - [Pre-RHS (stage 0 of 4) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] - [Pre-RHS (stage 0 of 4) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] + [Pre-RHS (stage 0 of 5) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] + [Pre-RHS (stage 0 of 5) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] + [Pre-RHS (stage 0 of 5) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] [Pre-step at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), step = 0, attempt = 1, ||y||_2 = 0.0000000000e+00] - [Post-stage processing (stage 0 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] - [Pre-RHS (stage 1 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] - [Post-stage processing (stage 1 of 4) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] - [Pre-RHS (stage 2 of 4) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] - [Post-stage processing (stage 2 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] - [Pre-RHS (stage 3 of 4) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Post-stage processing (stage 1 of 5) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Pre-RHS (stage 1 of 5) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Post-stage processing (stage 2 of 5) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Pre-RHS (stage 2 of 5) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Post-stage processing (stage 3 of 5) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Pre-RHS (stage 3 of 5) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] [Postprocess-step at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] [Post-step at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), step = 0, ||y||_2 = 6.1035156250e-12] 6.1035156250e-12 6.1035156250e-12 8.0779356695e-28 [Pre-step at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), step = 1, attempt = 1, ||y||_2 = 6.1035156250e-12] - [Pre-RHS (stage 0 of 4) at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] - [Post-stage processing (stage 0 of 4) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] - [Pre-RHS (stage 1 of 4) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] - [Post-stage processing (stage 1 of 4) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] - [Pre-RHS (stage 2 of 4) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] - [Post-stage processing (stage 2 of 4) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] - [Pre-RHS (stage 3 of 4) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Pre-RHS (stage 0 of 5) at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Post-stage processing (stage 1 of 5) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Pre-RHS (stage 1 of 5) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Post-stage processing (stage 2 of 5) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Pre-RHS (stage 2 of 5) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Post-stage processing (stage 3 of 5) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Pre-RHS (stage 3 of 5) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] [Postprocess-step at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] [Post-step at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), step = 1, ||y||_2 = 6.1041259766e-08] 6.1041259766e-08 6.1041259766e-08 0.0000000000e+00 [Pre-step at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), step = 2, attempt = 1, ||y||_2 = 6.1041259766e-08] - [Pre-RHS (stage 0 of 4) at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] - [Post-stage processing (stage 0 of 4) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] - [Pre-RHS (stage 1 of 4) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] - [Post-stage processing (stage 1 of 4) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] - [Pre-RHS (stage 2 of 4) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] - [Post-stage processing (stage 2 of 4) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] - [Pre-RHS (stage 3 of 4) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Pre-RHS (stage 0 of 5) at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Post-stage processing (stage 1 of 5) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Pre-RHS (stage 1 of 5) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Post-stage processing (stage 2 of 5) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Pre-RHS (stage 2 of 5) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Post-stage processing (stage 3 of 5) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Pre-RHS (stage 3 of 5) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] [Postprocess-step at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06),||y||_2 = 1.2817443848e-06] [Post-step at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), step = 2, ||y||_2 = 1.2817443848e-06] 1.2817443848e-06 1.2817443848e-06 2.1175823681e-22 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_5.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_5.out index f87131ca2e..27077bd96d 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_5.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_lsrkstep_5.out @@ -3,74 +3,74 @@ Using SSP(10,4) method t y y err --------------------------------------------------------------------- 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 - [Pre-RHS (stage 0 of 10) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] - [Pre-RHS (stage 0 of 10) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] - [Pre-RHS (stage 0 of 10) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] + [Pre-RHS (stage 0 of 11) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 0.0000000000e+00] + [Pre-RHS (stage 0 of 11) at t = 1.49e-12 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.4901161194e-12] + [Pre-RHS (stage 0 of 11) at t = 1.22e-11 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 1.2207031250e-11] [Pre-step at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), step = 0, attempt = 1, ||y||_2 = 0.0000000000e+00] - [Post-stage processing (stage 0 of 10) at t = 1.02e-12 (tn = 0.00e+00 , tcur = 1.02e-12), ||y||_2 = 1.0172526042e-12] - [Pre-RHS (stage 1 of 10) at t = 1.02e-12 (tn = 0.00e+00 , tcur = 1.02e-12), ||y||_2 = 1.0172526042e-12] - [Post-stage processing (stage 1 of 10) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] - [Pre-RHS (stage 2 of 10) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] - [Post-stage processing (stage 2 of 10) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] - [Pre-RHS (stage 3 of 10) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] - [Post-stage processing (stage 3 of 10) at t = 4.07e-12 (tn = 0.00e+00 , tcur = 4.07e-12), ||y||_2 = 4.0690104167e-12] - [Pre-RHS (stage 4 of 10) at t = 4.07e-12 (tn = 0.00e+00 , tcur = 4.07e-12), ||y||_2 = 4.0690104167e-12] - [Post-stage processing (stage 4 of 10) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] - [Pre-RHS (stage 5 of 10) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] - [Post-stage processing (stage 5 of 10) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] - [Pre-RHS (stage 6 of 10) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] - [Post-stage processing (stage 6 of 10) at t = 4.07e-12 (tn = 0.00e+00 , tcur = 4.07e-12), ||y||_2 = 4.0690104167e-12] - [Pre-RHS (stage 7 of 10) at t = 4.07e-12 (tn = 0.00e+00 , tcur = 4.07e-12), ||y||_2 = 4.0690104167e-12] - [Post-stage processing (stage 7 of 10) at t = 5.09e-12 (tn = 0.00e+00 , tcur = 5.09e-12), ||y||_2 = 5.0862630208e-12] - [Pre-RHS (stage 8 of 10) at t = 5.09e-12 (tn = 0.00e+00 , tcur = 5.09e-12), ||y||_2 = 5.0862630208e-12] - [Post-stage processing (stage 8 of 10) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] - [Pre-RHS (stage 9 of 10) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Post-stage processing (stage 1 of 11) at t = 1.02e-12 (tn = 0.00e+00 , tcur = 1.02e-12), ||y||_2 = 1.0172526042e-12] + [Pre-RHS (stage 1 of 11) at t = 1.02e-12 (tn = 0.00e+00 , tcur = 1.02e-12), ||y||_2 = 1.0172526042e-12] + [Post-stage processing (stage 2 of 11) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] + [Pre-RHS (stage 2 of 11) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] + [Post-stage processing (stage 3 of 11) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Pre-RHS (stage 3 of 11) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Post-stage processing (stage 4 of 11) at t = 4.07e-12 (tn = 0.00e+00 , tcur = 4.07e-12), ||y||_2 = 4.0690104167e-12] + [Pre-RHS (stage 4 of 11) at t = 4.07e-12 (tn = 0.00e+00 , tcur = 4.07e-12), ||y||_2 = 4.0690104167e-12] + [Post-stage processing (stage 5 of 11) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] + [Pre-RHS (stage 5 of 11) at t = 2.03e-12 (tn = 0.00e+00 , tcur = 2.03e-12), ||y||_2 = 2.0345052083e-12] + [Post-stage processing (stage 6 of 11) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Pre-RHS (stage 6 of 11) at t = 3.05e-12 (tn = 0.00e+00 , tcur = 3.05e-12), ||y||_2 = 3.0517578125e-12] + [Post-stage processing (stage 7 of 11) at t = 4.07e-12 (tn = 0.00e+00 , tcur = 4.07e-12), ||y||_2 = 4.0690104167e-12] + [Pre-RHS (stage 7 of 11) at t = 4.07e-12 (tn = 0.00e+00 , tcur = 4.07e-12), ||y||_2 = 4.0690104167e-12] + [Post-stage processing (stage 8 of 11) at t = 5.09e-12 (tn = 0.00e+00 , tcur = 5.09e-12), ||y||_2 = 5.0862630208e-12] + [Pre-RHS (stage 8 of 11) at t = 5.09e-12 (tn = 0.00e+00 , tcur = 5.09e-12), ||y||_2 = 5.0862630208e-12] + [Post-stage processing (stage 9 of 11) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Pre-RHS (stage 9 of 11) at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] [Postprocess-step at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12),||y||_2 = 6.1035156250e-12] [Post-step at t = 6.10e-12 (tn = 0.00e+00 , tcur = 6.10e-12), step = 0, ||y||_2 = 6.1035156250e-12] 6.1035156250e-12 6.1035156250e-12 8.0779356695e-28 [Pre-step at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), step = 1, attempt = 1, ||y||_2 = 6.1035156250e-12] - [Pre-RHS (stage 0 of 10) at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] - [Post-stage processing (stage 0 of 10) at t = 1.02e-08 (tn = 6.10e-12 , tcur = 1.02e-08), ||y||_2 = 1.0178629557e-08] - [Pre-RHS (stage 1 of 10) at t = 1.02e-08 (tn = 6.10e-12 , tcur = 1.02e-08), ||y||_2 = 1.0178629557e-08] - [Post-stage processing (stage 1 of 10) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] - [Pre-RHS (stage 2 of 10) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] - [Post-stage processing (stage 2 of 10) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] - [Pre-RHS (stage 3 of 10) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] - [Post-stage processing (stage 3 of 10) at t = 4.07e-08 (tn = 6.10e-12 , tcur = 4.07e-08), ||y||_2 = 4.0696207682e-08] - [Pre-RHS (stage 4 of 10) at t = 4.07e-08 (tn = 6.10e-12 , tcur = 4.07e-08), ||y||_2 = 4.0696207682e-08] - [Post-stage processing (stage 4 of 10) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] - [Pre-RHS (stage 5 of 10) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] - [Post-stage processing (stage 5 of 10) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] - [Pre-RHS (stage 6 of 10) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] - [Post-stage processing (stage 6 of 10) at t = 4.07e-08 (tn = 6.10e-12 , tcur = 4.07e-08), ||y||_2 = 4.0696207682e-08] - [Pre-RHS (stage 7 of 10) at t = 4.07e-08 (tn = 6.10e-12 , tcur = 4.07e-08), ||y||_2 = 4.0696207682e-08] - [Post-stage processing (stage 7 of 10) at t = 5.09e-08 (tn = 6.10e-12 , tcur = 5.09e-08), ||y||_2 = 5.0868733724e-08] - [Pre-RHS (stage 8 of 10) at t = 5.09e-08 (tn = 6.10e-12 , tcur = 5.09e-08), ||y||_2 = 5.0868733724e-08] - [Post-stage processing (stage 8 of 10) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] - [Pre-RHS (stage 9 of 10) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Pre-RHS (stage 0 of 11) at t = 6.10e-12 (tn = 6.10e-12 , tcur = 6.10e-12), ||y||_2 = 6.1035156250e-12] + [Post-stage processing (stage 1 of 11) at t = 1.02e-08 (tn = 6.10e-12 , tcur = 1.02e-08), ||y||_2 = 1.0178629557e-08] + [Pre-RHS (stage 1 of 11) at t = 1.02e-08 (tn = 6.10e-12 , tcur = 1.02e-08), ||y||_2 = 1.0178629557e-08] + [Post-stage processing (stage 2 of 11) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] + [Pre-RHS (stage 2 of 11) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] + [Post-stage processing (stage 3 of 11) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Pre-RHS (stage 3 of 11) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Post-stage processing (stage 4 of 11) at t = 4.07e-08 (tn = 6.10e-12 , tcur = 4.07e-08), ||y||_2 = 4.0696207682e-08] + [Pre-RHS (stage 4 of 11) at t = 4.07e-08 (tn = 6.10e-12 , tcur = 4.07e-08), ||y||_2 = 4.0696207682e-08] + [Post-stage processing (stage 5 of 11) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] + [Pre-RHS (stage 5 of 11) at t = 2.04e-08 (tn = 6.10e-12 , tcur = 2.04e-08), ||y||_2 = 2.0351155599e-08] + [Post-stage processing (stage 6 of 11) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Pre-RHS (stage 6 of 11) at t = 3.05e-08 (tn = 6.10e-12 , tcur = 3.05e-08), ||y||_2 = 3.0523681641e-08] + [Post-stage processing (stage 7 of 11) at t = 4.07e-08 (tn = 6.10e-12 , tcur = 4.07e-08), ||y||_2 = 4.0696207682e-08] + [Pre-RHS (stage 7 of 11) at t = 4.07e-08 (tn = 6.10e-12 , tcur = 4.07e-08), ||y||_2 = 4.0696207682e-08] + [Post-stage processing (stage 8 of 11) at t = 5.09e-08 (tn = 6.10e-12 , tcur = 5.09e-08), ||y||_2 = 5.0868733724e-08] + [Pre-RHS (stage 8 of 11) at t = 5.09e-08 (tn = 6.10e-12 , tcur = 5.09e-08), ||y||_2 = 5.0868733724e-08] + [Post-stage processing (stage 9 of 11) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Pre-RHS (stage 9 of 11) at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] [Postprocess-step at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08),||y||_2 = 6.1041259766e-08] [Post-step at t = 6.10e-08 (tn = 6.10e-12 , tcur = 6.10e-08), step = 1, ||y||_2 = 6.1041259766e-08] 6.1041259766e-08 6.1041259766e-08 0.0000000000e+00 [Pre-step at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), step = 2, attempt = 1, ||y||_2 = 6.1041259766e-08] - [Pre-RHS (stage 0 of 10) at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] - [Post-stage processing (stage 0 of 10) at t = 2.64e-07 (tn = 6.10e-08 , tcur = 2.64e-07), ||y||_2 = 2.6449178060e-07] - [Pre-RHS (stage 1 of 10) at t = 2.64e-07 (tn = 6.10e-08 , tcur = 2.64e-07), ||y||_2 = 2.6449178060e-07] - [Post-stage processing (stage 1 of 10) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] - [Pre-RHS (stage 2 of 10) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] - [Post-stage processing (stage 2 of 10) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] - [Pre-RHS (stage 3 of 10) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] - [Post-stage processing (stage 3 of 10) at t = 8.75e-07 (tn = 6.10e-08 , tcur = 8.75e-07), ||y||_2 = 8.7484334310e-07] - [Pre-RHS (stage 4 of 10) at t = 8.75e-07 (tn = 6.10e-08 , tcur = 8.75e-07), ||y||_2 = 8.7484334310e-07] - [Post-stage processing (stage 4 of 10) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] - [Pre-RHS (stage 5 of 10) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] - [Post-stage processing (stage 5 of 10) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] - [Pre-RHS (stage 6 of 10) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] - [Post-stage processing (stage 6 of 10) at t = 8.75e-07 (tn = 6.10e-08 , tcur = 8.75e-07), ||y||_2 = 8.7484334310e-07] - [Pre-RHS (stage 7 of 10) at t = 8.75e-07 (tn = 6.10e-08 , tcur = 8.75e-07), ||y||_2 = 8.7484334310e-07] - [Post-stage processing (stage 7 of 10) at t = 1.08e-06 (tn = 6.10e-08 , tcur = 1.08e-06), ||y||_2 = 1.0782938639e-06] - [Pre-RHS (stage 8 of 10) at t = 1.08e-06 (tn = 6.10e-08 , tcur = 1.08e-06), ||y||_2 = 1.0782938639e-06] - [Post-stage processing (stage 8 of 10) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] - [Pre-RHS (stage 9 of 10) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Pre-RHS (stage 0 of 11) at t = 6.10e-08 (tn = 6.10e-08 , tcur = 6.10e-08), ||y||_2 = 6.1041259766e-08] + [Post-stage processing (stage 1 of 11) at t = 2.64e-07 (tn = 6.10e-08 , tcur = 2.64e-07), ||y||_2 = 2.6449178060e-07] + [Pre-RHS (stage 1 of 11) at t = 2.64e-07 (tn = 6.10e-08 , tcur = 2.64e-07), ||y||_2 = 2.6449178060e-07] + [Post-stage processing (stage 2 of 11) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] + [Pre-RHS (stage 2 of 11) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] + [Post-stage processing (stage 3 of 11) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Pre-RHS (stage 3 of 11) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Post-stage processing (stage 4 of 11) at t = 8.75e-07 (tn = 6.10e-08 , tcur = 8.75e-07), ||y||_2 = 8.7484334310e-07] + [Pre-RHS (stage 4 of 11) at t = 8.75e-07 (tn = 6.10e-08 , tcur = 8.75e-07), ||y||_2 = 8.7484334310e-07] + [Post-stage processing (stage 5 of 11) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] + [Pre-RHS (stage 5 of 11) at t = 4.68e-07 (tn = 6.10e-08 , tcur = 4.68e-07), ||y||_2 = 4.6794230143e-07] + [Post-stage processing (stage 6 of 11) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Pre-RHS (stage 6 of 11) at t = 6.71e-07 (tn = 6.10e-08 , tcur = 6.71e-07), ||y||_2 = 6.7139282227e-07] + [Post-stage processing (stage 7 of 11) at t = 8.75e-07 (tn = 6.10e-08 , tcur = 8.75e-07), ||y||_2 = 8.7484334310e-07] + [Pre-RHS (stage 7 of 11) at t = 8.75e-07 (tn = 6.10e-08 , tcur = 8.75e-07), ||y||_2 = 8.7484334310e-07] + [Post-stage processing (stage 8 of 11) at t = 1.08e-06 (tn = 6.10e-08 , tcur = 1.08e-06), ||y||_2 = 1.0782938639e-06] + [Pre-RHS (stage 8 of 11) at t = 1.08e-06 (tn = 6.10e-08 , tcur = 1.08e-06), ||y||_2 = 1.0782938639e-06] + [Post-stage processing (stage 9 of 11) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] + [Pre-RHS (stage 9 of 11) at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), ||y||_2 = 1.2817443848e-06] [Postprocess-step at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06),||y||_2 = 1.2817443848e-06] [Post-step at t = 1.28e-06 (tn = 6.10e-08 , tcur = 1.28e-06), step = 2, ||y||_2 = 1.2817443848e-06] 1.2817443848e-06 1.2817443848e-06 8.4703294725e-22 diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_0.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_0.out index 1a8dba4f46..f7b7607e9e 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_0.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_0.out @@ -5,27 +5,27 @@ Using Ex-MRI-GARK method 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 [Pre-step at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), step = 0, attempt = 1, ||y||_2 = 2.1213203436e+00] [Pre-RHS (stage 0 of 4) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] - [Post-stage processing (stage 0 of 4) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213151057e+00] + [Post-stage processing (stage 1 of 4) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213151057e+00] [Pre-RHS (stage 1 of 4) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213151057e+00] - [Post-stage processing (stage 1 of 4) at t = 7.50e-04 (tn = 0.00e+00 , tcur = 7.50e-04), ||y||_2 = 2.1212937905e+00] + [Post-stage processing (stage 2 of 4) at t = 7.50e-04 (tn = 0.00e+00 , tcur = 7.50e-04), ||y||_2 = 2.1212937905e+00] [Pre-RHS (stage 2 of 4) at t = 7.50e-04 (tn = 0.00e+00 , tcur = 7.50e-04), ||y||_2 = 2.1212937905e+00] [Postprocess-step at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03),||y||_2 = 2.1212731452e+00] [Post-step at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), step = 0, ||y||_2 = 2.1212731452e+00] 1.0000000000e-03 1.2247447693e+00 1.7319930735e+00 2.2426505097e-14 1.9984014443e-15 [Pre-step at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), step = 1, attempt = 1, ||y||_2 = 2.1212731452e+00] [Pre-RHS (stage 0 of 4) at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] - [Post-stage processing (stage 0 of 4) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212364434e+00] + [Post-stage processing (stage 1 of 4) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212364434e+00] [Pre-RHS (stage 1 of 4) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212364434e+00] - [Post-stage processing (stage 1 of 4) at t = 1.75e-03 (tn = 1.00e-03 , tcur = 1.75e-03), ||y||_2 = 2.1211758016e+00] + [Post-stage processing (stage 2 of 4) at t = 1.75e-03 (tn = 1.00e-03 , tcur = 1.75e-03), ||y||_2 = 2.1211758016e+00] [Pre-RHS (stage 2 of 4) at t = 1.75e-03 (tn = 1.00e-03 , tcur = 1.75e-03), ||y||_2 = 2.1211758016e+00] [Postprocess-step at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03),||y||_2 = 2.1211315628e+00] [Post-step at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), step = 1, ||y||_2 = 2.1211315628e+00] 2.0000000000e-03 1.2247444631e+00 1.7318198829e+00 4.4853010195e-14 3.7747582837e-15 [Pre-step at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), step = 2, attempt = 1, ||y||_2 = 2.1211315628e+00] [Pre-RHS (stage 0 of 4) at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] - [Post-stage processing (stage 0 of 4) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1210634067e+00] + [Post-stage processing (stage 1 of 4) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1210634067e+00] [Pre-RHS (stage 1 of 4) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1210634067e+00] - [Post-stage processing (stage 1 of 4) at t = 2.75e-03 (tn = 2.00e-03 , tcur = 2.75e-03), ||y||_2 = 2.1209634544e+00] + [Post-stage processing (stage 2 of 4) at t = 2.75e-03 (tn = 2.00e-03 , tcur = 2.75e-03), ||y||_2 = 2.1209634544e+00] [Pre-RHS (stage 2 of 4) at t = 2.75e-03 (tn = 2.00e-03 , tcur = 2.75e-03), ||y||_2 = 2.1209634544e+00] [Postprocess-step at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03),||y||_2 = 2.1208956339e+00] [Post-step at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), step = 2, ||y||_2 = 2.1208956339e+00] diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_1.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_1.out index c744a9ffdd..924b3490c6 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_1.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_1.out @@ -7,21 +7,21 @@ Using GMRES iterative linear solver 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 [Pre-step at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), step = 0, attempt = 1, ||y||_2 = 2.1213203436e+00] [Pre-RHS (stage 0 of 8) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] - [Post-stage processing (stage 0 of 8) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213151057e+00] + [Post-stage processing (stage 1 of 8) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213151057e+00] [Pre-RHS (stage 2 of 8) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213203436e+00] [Pre-RHS (stage 2 of 8) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213183373e+00] [Pre-RHS (stage 2 of 8) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213213312e+00] [Pre-RHS (stage 2 of 8) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213150886e+00] [Post-stage processing (stage 2 of 8) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213150886e+00] [Pre-RHS (stage 2 of 8) at t = 3.33e-04 (tn = 0.00e+00 , tcur = 3.33e-04), ||y||_2 = 2.1213150886e+00] - [Post-stage processing (stage 2 of 8) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1212993503e+00] + [Post-stage processing (stage 3 of 8) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1212993503e+00] [Pre-RHS (stage 4 of 8) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1213203436e+00] [Pre-RHS (stage 4 of 8) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1213183389e+00] [Pre-RHS (stage 4 of 8) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1213213345e+00] [Pre-RHS (stage 4 of 8) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1212993415e+00] [Post-stage processing (stage 4 of 8) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1212993415e+00] [Pre-RHS (stage 4 of 8) at t = 6.67e-04 (tn = 0.00e+00 , tcur = 6.67e-04), ||y||_2 = 2.1212993415e+00] - [Post-stage processing (stage 4 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731966e+00] + [Post-stage processing (stage 5 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731966e+00] [Pre-RHS (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213203436e+00] [Pre-RHS (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213183413e+00] [Pre-RHS (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213213393e+00] @@ -31,21 +31,21 @@ Using GMRES iterative linear solver 1.0000000000e-03 1.2247447693e+00 1.7319930735e+00 2.6090241079e-13 1.1546319456e-14 [Pre-step at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), step = 1, attempt = 1, ||y||_2 = 2.1212731452e+00] [Pre-RHS (stage 0 of 8) at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] - [Post-stage processing (stage 0 of 8) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212364434e+00] + [Post-stage processing (stage 1 of 8) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212364434e+00] [Pre-RHS (stage 2 of 8) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212731452e+00] [Pre-RHS (stage 2 of 8) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212711424e+00] [Pre-RHS (stage 2 of 8) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212741398e+00] [Pre-RHS (stage 2 of 8) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212364263e+00] [Post-stage processing (stage 2 of 8) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212364263e+00] [Pre-RHS (stage 2 of 8) at t = 1.33e-03 (tn = 1.00e-03 , tcur = 1.33e-03), ||y||_2 = 2.1212364263e+00] - [Post-stage processing (stage 2 of 8) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1211892263e+00] + [Post-stage processing (stage 3 of 8) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1211892263e+00] [Pre-RHS (stage 4 of 8) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1212731452e+00] [Pre-RHS (stage 4 of 8) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1212711424e+00] [Pre-RHS (stage 4 of 8) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1212741398e+00] [Pre-RHS (stage 4 of 8) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1211892175e+00] [Post-stage processing (stage 4 of 8) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1211892175e+00] [Pre-RHS (stage 4 of 8) at t = 1.67e-03 (tn = 1.00e-03 , tcur = 1.67e-03), ||y||_2 = 2.1211892175e+00] - [Post-stage processing (stage 4 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211316142e+00] + [Post-stage processing (stage 5 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211316142e+00] [Pre-RHS (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212731452e+00] [Pre-RHS (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212711430e+00] [Pre-RHS (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212741409e+00] @@ -55,21 +55,21 @@ Using GMRES iterative linear solver 2.0000000000e-03 1.2247444631e+00 1.7318198829e+00 2.9067859231e-12 2.3980817332e-14 [Pre-step at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), step = 2, attempt = 1, ||y||_2 = 2.1211315628e+00] [Pre-RHS (stage 0 of 8) at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] - [Post-stage processing (stage 0 of 8) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1210634067e+00] + [Post-stage processing (stage 1 of 8) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1210634067e+00] [Pre-RHS (stage 2 of 8) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1211315628e+00] [Pre-RHS (stage 2 of 8) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1211295605e+00] [Pre-RHS (stage 2 of 8) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1211325579e+00] [Pre-RHS (stage 2 of 8) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1210633896e+00] [Post-stage processing (stage 2 of 8) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1210633896e+00] [Pre-RHS (stage 2 of 8) at t = 2.33e-03 (tn = 2.00e-03 , tcur = 2.33e-03), ||y||_2 = 2.1210633896e+00] - [Post-stage processing (stage 2 of 8) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1209847405e+00] + [Post-stage processing (stage 3 of 8) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1209847405e+00] [Pre-RHS (stage 4 of 8) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1211315628e+00] [Pre-RHS (stage 4 of 8) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1211295605e+00] [Pre-RHS (stage 4 of 8) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1211325579e+00] [Pre-RHS (stage 4 of 8) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1209847317e+00] [Post-stage processing (stage 4 of 8) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1209847317e+00] [Pre-RHS (stage 4 of 8) at t = 2.67e-03 (tn = 2.00e-03 , tcur = 2.67e-03), ||y||_2 = 2.1209847317e+00] - [Post-stage processing (stage 4 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956853e+00] + [Post-stage processing (stage 5 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208956853e+00] [Pre-RHS (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211315628e+00] [Pre-RHS (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211295608e+00] [Pre-RHS (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211325586e+00] diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_2.out b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_2.out index 425ec5812a..fdb69fe8c9 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_2.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_stageinfo_mristep_2.out @@ -7,21 +7,21 @@ Using GMRES iterative linear solver 0.000000000000000e+00 1.224744871391589e+00 1.732050807568877e+00 0.000000000000000e+00 0.000000000000000e+00 [Pre-step at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), step = 0, attempt = 1, ||y||_2 = 2.1213203436e+00] [Pre-RHS (stage 0 of 8) at t = 0.00e+00 (tn = 0.00e+00 , tcur = 0.00e+00), ||y||_2 = 2.1213203436e+00] - [Post-stage processing (stage 0 of 8) at t = 4.36e-04 (tn = 0.00e+00 , tcur = 4.36e-04), ||y||_2 = 2.1213113879e+00] + [Post-stage processing (stage 1 of 8) at t = 4.36e-04 (tn = 0.00e+00 , tcur = 4.36e-04), ||y||_2 = 2.1213113879e+00] [Pre-RHS (stage 2 of 8) at t = 4.36e-04 (tn = 0.00e+00 , tcur = 4.36e-04), ||y||_2 = 2.1213203436e+00] [Pre-RHS (stage 2 of 8) at t = 4.36e-04 (tn = 0.00e+00 , tcur = 4.36e-04), ||y||_2 = 2.1213183438e+00] [Pre-RHS (stage 2 of 8) at t = 4.36e-04 (tn = 0.00e+00 , tcur = 4.36e-04), ||y||_2 = 2.1213213443e+00] [Pre-RHS (stage 2 of 8) at t = 4.36e-04 (tn = 0.00e+00 , tcur = 4.36e-04), ||y||_2 = 2.1213113879e+00] [Post-stage processing (stage 2 of 8) at t = 4.36e-04 (tn = 0.00e+00 , tcur = 4.36e-04), ||y||_2 = 2.1213113879e+00] [Pre-RHS (stage 2 of 8) at t = 4.36e-04 (tn = 0.00e+00 , tcur = 4.36e-04), ||y||_2 = 2.1213113879e+00] - [Post-stage processing (stage 2 of 8) at t = 7.18e-04 (tn = 0.00e+00 , tcur = 7.18e-04), ||y||_2 = 2.1212960228e+00] + [Post-stage processing (stage 3 of 8) at t = 7.18e-04 (tn = 0.00e+00 , tcur = 7.18e-04), ||y||_2 = 2.1212960228e+00] [Pre-RHS (stage 4 of 8) at t = 7.18e-04 (tn = 0.00e+00 , tcur = 7.18e-04), ||y||_2 = 2.1213203436e+00] [Pre-RHS (stage 4 of 8) at t = 7.18e-04 (tn = 0.00e+00 , tcur = 7.18e-04), ||y||_2 = 2.1213183421e+00] [Pre-RHS (stage 4 of 8) at t = 7.18e-04 (tn = 0.00e+00 , tcur = 7.18e-04), ||y||_2 = 2.1213213409e+00] [Pre-RHS (stage 4 of 8) at t = 7.18e-04 (tn = 0.00e+00 , tcur = 7.18e-04), ||y||_2 = 2.1212960259e+00] [Post-stage processing (stage 4 of 8) at t = 7.18e-04 (tn = 0.00e+00 , tcur = 7.18e-04), ||y||_2 = 2.1212960259e+00] [Pre-RHS (stage 4 of 8) at t = 7.18e-04 (tn = 0.00e+00 , tcur = 7.18e-04), ||y||_2 = 2.1212960259e+00] - [Post-stage processing (stage 4 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731087e+00] + [Post-stage processing (stage 5 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1212731087e+00] [Pre-RHS (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213203436e+00] [Pre-RHS (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213183406e+00] [Pre-RHS (stage 6 of 8) at t = 1.00e-03 (tn = 0.00e+00 , tcur = 1.00e-03), ||y||_2 = 2.1213213379e+00] @@ -33,21 +33,21 @@ Using GMRES iterative linear solver 1.0000000000e-03 1.2247447693e+00 1.7319930735e+00 2.6378899065e-13 8.2156503822e-15 [Pre-step at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), step = 1, attempt = 1, ||y||_2 = 2.1212731452e+00] [Pre-RHS (stage 0 of 8) at t = 1.00e-03 (tn = 1.00e-03 , tcur = 1.00e-03), ||y||_2 = 2.1212731452e+00] - [Post-stage processing (stage 0 of 8) at t = 1.44e-03 (tn = 1.00e-03 , tcur = 1.44e-03), ||y||_2 = 2.1212230476e+00] + [Post-stage processing (stage 1 of 8) at t = 1.44e-03 (tn = 1.00e-03 , tcur = 1.44e-03), ||y||_2 = 2.1212230476e+00] [Pre-RHS (stage 2 of 8) at t = 1.44e-03 (tn = 1.00e-03 , tcur = 1.44e-03), ||y||_2 = 2.1212731452e+00] [Pre-RHS (stage 2 of 8) at t = 1.44e-03 (tn = 1.00e-03 , tcur = 1.44e-03), ||y||_2 = 2.1212711435e+00] [Pre-RHS (stage 2 of 8) at t = 1.44e-03 (tn = 1.00e-03 , tcur = 1.44e-03), ||y||_2 = 2.1212741418e+00] [Pre-RHS (stage 2 of 8) at t = 1.44e-03 (tn = 1.00e-03 , tcur = 1.44e-03), ||y||_2 = 2.1212230476e+00] [Post-stage processing (stage 2 of 8) at t = 1.44e-03 (tn = 1.00e-03 , tcur = 1.44e-03), ||y||_2 = 2.1212230476e+00] [Pre-RHS (stage 2 of 8) at t = 1.44e-03 (tn = 1.00e-03 , tcur = 1.44e-03), ||y||_2 = 2.1212230476e+00] - [Post-stage processing (stage 2 of 8) at t = 1.72e-03 (tn = 1.00e-03 , tcur = 1.72e-03), ||y||_2 = 2.1211810603e+00] + [Post-stage processing (stage 3 of 8) at t = 1.72e-03 (tn = 1.00e-03 , tcur = 1.72e-03), ||y||_2 = 2.1211810603e+00] [Pre-RHS (stage 4 of 8) at t = 1.72e-03 (tn = 1.00e-03 , tcur = 1.72e-03), ||y||_2 = 2.1212731452e+00] [Pre-RHS (stage 4 of 8) at t = 1.72e-03 (tn = 1.00e-03 , tcur = 1.72e-03), ||y||_2 = 2.1212711432e+00] [Pre-RHS (stage 4 of 8) at t = 1.72e-03 (tn = 1.00e-03 , tcur = 1.72e-03), ||y||_2 = 2.1212741414e+00] [Pre-RHS (stage 4 of 8) at t = 1.72e-03 (tn = 1.00e-03 , tcur = 1.72e-03), ||y||_2 = 2.1211810634e+00] [Post-stage processing (stage 4 of 8) at t = 1.72e-03 (tn = 1.00e-03 , tcur = 1.72e-03), ||y||_2 = 2.1211810634e+00] [Pre-RHS (stage 4 of 8) at t = 1.72e-03 (tn = 1.00e-03 , tcur = 1.72e-03), ||y||_2 = 2.1211810634e+00] - [Post-stage processing (stage 4 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315263e+00] + [Post-stage processing (stage 5 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315263e+00] [Pre-RHS (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212731452e+00] [Pre-RHS (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212711428e+00] [Pre-RHS (stage 6 of 8) at t = 2.00e-03 (tn = 1.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1212741405e+00] @@ -59,21 +59,21 @@ Using GMRES iterative linear solver 2.0000000000e-03 1.2247444631e+00 1.7318198829e+00 3.1354918661e-12 1.3988810110e-14 [Pre-step at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), step = 2, attempt = 1, ||y||_2 = 2.1211315628e+00] [Pre-RHS (stage 0 of 8) at t = 2.00e-03 (tn = 2.00e-03 , tcur = 2.00e-03), ||y||_2 = 2.1211315628e+00] - [Post-stage processing (stage 0 of 8) at t = 2.44e-03 (tn = 2.00e-03 , tcur = 2.44e-03), ||y||_2 = 2.1210403366e+00] + [Post-stage processing (stage 1 of 8) at t = 2.44e-03 (tn = 2.00e-03 , tcur = 2.44e-03), ||y||_2 = 2.1210403366e+00] [Pre-RHS (stage 2 of 8) at t = 2.44e-03 (tn = 2.00e-03 , tcur = 2.44e-03), ||y||_2 = 2.1211315628e+00] [Pre-RHS (stage 2 of 8) at t = 2.44e-03 (tn = 2.00e-03 , tcur = 2.44e-03), ||y||_2 = 2.1211295611e+00] [Pre-RHS (stage 2 of 8) at t = 2.44e-03 (tn = 2.00e-03 , tcur = 2.44e-03), ||y||_2 = 2.1211325591e+00] [Pre-RHS (stage 2 of 8) at t = 2.44e-03 (tn = 2.00e-03 , tcur = 2.44e-03), ||y||_2 = 2.1210403366e+00] [Post-stage processing (stage 2 of 8) at t = 2.44e-03 (tn = 2.00e-03 , tcur = 2.44e-03), ||y||_2 = 2.1210403366e+00] [Pre-RHS (stage 2 of 8) at t = 2.44e-03 (tn = 2.00e-03 , tcur = 2.44e-03), ||y||_2 = 2.1210403366e+00] - [Post-stage processing (stage 2 of 8) at t = 2.72e-03 (tn = 2.00e-03 , tcur = 2.72e-03), ||y||_2 = 2.1209717381e+00] + [Post-stage processing (stage 3 of 8) at t = 2.72e-03 (tn = 2.00e-03 , tcur = 2.72e-03), ||y||_2 = 2.1209717381e+00] [Pre-RHS (stage 4 of 8) at t = 2.72e-03 (tn = 2.00e-03 , tcur = 2.72e-03), ||y||_2 = 2.1211315628e+00] [Pre-RHS (stage 4 of 8) at t = 2.72e-03 (tn = 2.00e-03 , tcur = 2.72e-03), ||y||_2 = 2.1211295610e+00] [Pre-RHS (stage 4 of 8) at t = 2.72e-03 (tn = 2.00e-03 , tcur = 2.72e-03), ||y||_2 = 2.1211325588e+00] [Pre-RHS (stage 4 of 8) at t = 2.72e-03 (tn = 2.00e-03 , tcur = 2.72e-03), ||y||_2 = 2.1209717412e+00] [Post-stage processing (stage 4 of 8) at t = 2.72e-03 (tn = 2.00e-03 , tcur = 2.72e-03), ||y||_2 = 2.1209717412e+00] [Pre-RHS (stage 4 of 8) at t = 2.72e-03 (tn = 2.00e-03 , tcur = 2.72e-03), ||y||_2 = 2.1209717412e+00] - [Post-stage processing (stage 4 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208955974e+00] + [Post-stage processing (stage 5 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1208955974e+00] [Pre-RHS (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211315628e+00] [Pre-RHS (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211295607e+00] [Pre-RHS (stage 6 of 8) at t = 3.00e-03 (tn = 2.00e-03 , tcur = 3.00e-03), ||y||_2 = 2.1211325583e+00] From 9c8502f1c21fd0dc3cc6eed6e1a39bb6f83179d9 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 30 Mar 2026 17:47:31 -0400 Subject: [PATCH 261/298] Updated logging output files based on PR updates --- .../test_logging_arkode_lsrkstep_lvl3_5.out | 24 +++++++-------- .../test_logging_arkode_lsrkstep_lvl4_5.out | 30 +++++++++---------- .../test_logging_arkode_lsrkstep_lvl5_5.out | 24 +++++++-------- 3 files changed, 39 insertions(+), 39 deletions(-) diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_5.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_5.out index 7b7c12a589..d7a2a62914 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_5.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_5.out @@ -17,13 +17,13 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 2.03450520833333e-12 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 7, tcur = 3.0517578125e-12 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 3.0517578125e-12 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 8, tcur = 4.06901041666667e-12 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 7, tcur = 4.06901041666667e-12 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 9, tcur = 5.08626302083333e-12 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 8, tcur = 5.08626302083333e-12 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 10, tcur = 6.103515625e-12 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 9, tcur = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 8.07793566946316e-18 6.103515625000001e-12 6.103515625000001e-12 8.077935669463161e-28 @@ -42,13 +42,13 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 2.03511555989583e-08 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 7, tcur = 3.0523681640625e-08 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 3.0523681640625e-08 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 8, tcur = 4.06962076822917e-08 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 7, tcur = 4.06962076822917e-08 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 9, tcur = 5.08687337239583e-08 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 8, tcur = 5.08687337239583e-08 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 10, tcur = 6.1041259765625e-08 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 9, tcur = 6.1041259765625e-08 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 1.32348889930549e-13 6.104125976562500e-08 6.104125976562493e-08 0.000000000000000e+00 @@ -67,13 +67,13 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 4.67942301432292e-07 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 7, tcur = 6.71392822265625e-07 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 6.71392822265625e-07 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 8, tcur = 8.74843343098958e-07 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 7, tcur = 8.74843343098958e-07 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 9, tcur = 1.07829386393229e-06 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 8, tcur = 1.07829386393229e-06 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 10, tcur = 1.28174438476563e-06 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 9, tcur = 1.28174438476563e-06 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 1.05814527885951e-11 1.281744384765625e-06 1.281744384764922e-06 8.470329472543003e-22 diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_5.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_5.out index 2e34e62157..92e655632a 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_5.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_5.out @@ -13,17 +13,17 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 4, tcur = 4.06901041666667e-12 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 5, tcur = 5.08626302083333e-12 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 5, tcur = 2.03450520833333e-12 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 2.03450520833333e-12 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 7, tcur = 3.0517578125e-12 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 3.0517578125e-12 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 8, tcur = 4.06901041666667e-12 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 7, tcur = 4.06901041666667e-12 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 9, tcur = 5.08626302083333e-12 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 8, tcur = 5.08626302083333e-12 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 10, tcur = 6.103515625e-12 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 9, tcur = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 1.14486680447989e-07 [DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 6.103515625e-08 @@ -41,17 +41,17 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 4, tcur = 4.06962076822917e-08 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 5, tcur = 5.08687337239583e-08 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 5, tcur = 2.03511555989583e-08 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 2.03511555989583e-08 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 7, tcur = 3.0523681640625e-08 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 3.0523681640625e-08 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 8, tcur = 4.06962076822917e-08 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 7, tcur = 4.06962076822917e-08 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 9, tcur = 5.08687337239583e-08 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 8, tcur = 5.08687337239583e-08 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 10, tcur = 6.1041259765625e-08 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 9, tcur = 6.1041259765625e-08 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.000101192886669469 [DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 1.220703125e-06 @@ -69,17 +69,17 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 4, tcur = 8.74843343098958e-07 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 5, tcur = 1.07829386393229e-06 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 5, tcur = 4.67942301432292e-07 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 4.67942301432292e-07 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 7, tcur = 6.71392822265625e-07 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 6.71392822265625e-07 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 8, tcur = 8.74843343098958e-07 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 7, tcur = 8.74843343098958e-07 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 9, tcur = 1.07829386393229e-06 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 8, tcur = 1.07829386393229e-06 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 10, tcur = 1.28174438476563e-06 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 9, tcur = 1.28174438476563e-06 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.000676820854209895 [DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 2.44140625e-05 diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_5.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_5.out index 4104961898..e993088b4c 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_5.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_5.out @@ -31,19 +31,19 @@ Start LSRKStep Logging test [DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_5(:) = 1.000000000000000e+00 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 7, tcur = 3.0517578125e-12 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 3.0517578125e-12 [DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_6(:) = 1.000000000000000e+00 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 8, tcur = 4.06901041666667e-12 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 7, tcur = 4.06901041666667e-12 [DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_7(:) = 1.000000000000000e+00 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 9, tcur = 5.08626302083333e-12 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 8, tcur = 5.08626302083333e-12 [DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_8(:) = 1.000000000000000e+00 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 10, tcur = 6.103515625e-12 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 9, tcur = 6.103515625e-12 [DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_9(:) = 1.000000000000000e+00 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success @@ -85,19 +85,19 @@ Start LSRKStep Logging test [DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_5(:) = 9.999999999999996e-01 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 7, tcur = 3.0523681640625e-08 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 3.0523681640625e-08 [DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_6(:) = 9.999999999999991e-01 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 8, tcur = 4.06962076822917e-08 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 7, tcur = 4.06962076822917e-08 [DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_7(:) = 9.999999999999984e-01 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 9, tcur = 5.08687337239583e-08 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 8, tcur = 5.08687337239583e-08 [DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_8(:) = 9.999999999999973e-01 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 10, tcur = 6.1041259765625e-08 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 9, tcur = 6.1041259765625e-08 [DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_9(:) = 9.999999999999962e-01 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success @@ -139,19 +139,19 @@ Start LSRKStep Logging test [DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_5(:) = 9.999999999997812e-01 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 7, tcur = 6.71392822265625e-07 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 6.71392822265625e-07 [DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_6(:) = 9.999999999995494e-01 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 8, tcur = 8.74843343098958e-07 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 7, tcur = 8.74843343098958e-07 [DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_7(:) = 9.999999999992346e-01 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 9, tcur = 1.07829386393229e-06 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 8, tcur = 1.07829386393229e-06 [DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_8(:) = 9.999999999988374e-01 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 10, tcur = 1.28174438476563e-06 +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 9, tcur = 1.28174438476563e-06 [DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_9(:) = 9.999999999983571e-01 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success From 00d2618543a38d659e4a3f0052fd035f323132d8 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 31 Mar 2026 08:08:58 -0400 Subject: [PATCH 262/298] One more logging output file --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index 50741850f7..8d5b2beb79 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 50741850f7c0e611c3a210b7cb7f271f99174bd9 +Subproject commit 8d5b2beb797c1da59dea6a2fb765dd9a3cb69d10 From 0aaef024932bcf562680126c9531791e8f46a30d Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Wed, 1 Apr 2026 22:20:26 -0400 Subject: [PATCH 263/298] Applied suggestions from PR review --- doc/arkode/guide/source/Constants.rst | 2 ++ src/arkode/arkode_arkstep.c | 2 +- src/arkode/arkode_erkstep.c | 2 +- src/arkode/arkode_mristep.c | 2 +- test/unit_tests/arkode/CXX_serial/ark_test_prealloc_arkstep.cpp | 2 +- test/unit_tests/arkode/CXX_serial/ark_test_prealloc_erkstep.cpp | 2 +- .../arkode/CXX_serial/ark_test_prealloc_forcingstep.cpp | 2 +- .../unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep.cpp | 2 +- test/unit_tests/arkode/CXX_serial/ark_test_prealloc_mristep.cpp | 2 +- .../arkode/CXX_serial/ark_test_prealloc_splittingstep.cpp | 2 +- 10 files changed, 11 insertions(+), 9 deletions(-) diff --git a/doc/arkode/guide/source/Constants.rst b/doc/arkode/guide/source/Constants.rst index 61c4856dd9..4a60a097c0 100644 --- a/doc/arkode/guide/source/Constants.rst +++ b/doc/arkode/guide/source/Constants.rst @@ -428,6 +428,8 @@ contains the ARKODE output constants. +-------------------------------------+------+------------------------------------------------------------+ | :index:`ARK_DEE_FAIL` | -59 | An error occurred in the SUNDomEigEstimator module. | +-------------------------------------+------+------------------------------------------------------------+ + | :index:`ARK_STEP_H0_FAIL` | -60 | Time stepping module was unable to set the initial step. | + +-------------------------------------+------+------------------------------------------------------------+ | :index:`ARK_UNRECOGNIZED_ERROR` | -99 | An unknown error was encountered. | +-------------------------------------+------+------------------------------------------------------------+ | **ARKLS linear solver module output constants** | diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index e86f498f6d..bb35ede3f3 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1091,7 +1091,7 @@ int arkStep_Init(ARKodeMem ark_mem, int init_type) } /* Allocate workspace for MRI forcing -- need to allocate here as the - number of stages may not bet set before this point */ + number of stages may not be set before this point */ if (!(step_mem->stage_times)) { step_mem->stage_times = (sunrealtype*)calloc(step_mem->stages, diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index 739df8bb1c..22ea63b0a2 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -481,7 +481,7 @@ int erkStep_Init(ARKodeMem ark_mem, int init_type) } /* Allocate workspace for MRI forcing -- need to allocate here as the - number of stages may not bet set before this point */ + number of stages may not be set before this point */ if (!(step_mem->stage_times)) { step_mem->stage_times = (sunrealtype*)calloc(step_mem->stages, diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index e0e629eea0..60c5b7666e 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1891,7 +1891,7 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = 0, stage type = %d, tcur = " SUN_FORMAT_G, MRISTAGE_FIRST, ark_mem->tcur); - SUNLogExtraDebugVec(ARK_LOGGER, "slow stage", ark_mem->yn, "z_0(:) ="); + SUNLogExtraDebugVec(ARK_LOGGER, "slow stage", ark_mem->ycur, "z_0(:) ="); /* Evaluate the slow RHS functions if needed. NOTE: we decide between calling the full RHS function (if ark_mem->fn is non-NULL and MRIStep is not an inner diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_arkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_arkstep.cpp index b669d62d3d..54f6666a47 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_arkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_arkstep.cpp @@ -3,7 +3,7 @@ * based on test_logging_arkode_arkstep.cpp by David J. Gardner @ LLNL * ----------------------------------------------------------------------------- * SUNDIALS Copyright Start - * Copyright (c) 2025, Lawrence Livermore National Security, + * Copyright (c) 2025-2026, Lawrence Livermore National Security, * University of Maryland Baltimore County, and the SUNDIALS contributors. * Copyright (c) 2013-2025, Lawrence Livermore National Security * and Southern Methodist University. diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_erkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_erkstep.cpp index 924823b665..e48741387c 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_erkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_erkstep.cpp @@ -3,7 +3,7 @@ * based on test_logging_arkode_erkstep.cpp by David J. Gardner @ LLNL * ----------------------------------------------------------------------------- * SUNDIALS Copyright Start - * Copyright (c) 2025, Lawrence Livermore National Security, + * Copyright (c) 2025-2026, Lawrence Livermore National Security, * University of Maryland Baltimore County, and the SUNDIALS contributors. * Copyright (c) 2013-2025, Lawrence Livermore National Security * and Southern Methodist University. diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_forcingstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_forcingstep.cpp index 5ae5384f45..78326a2f3a 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_forcingstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_forcingstep.cpp @@ -3,7 +3,7 @@ * based on test_logging_arkode_forcingstep.cpp by David J. Gardner @ LLNL * ----------------------------------------------------------------------------- * SUNDIALS Copyright Start - * Copyright (c) 2025, Lawrence Livermore National Security, + * Copyright (c) 2025-2026, Lawrence Livermore National Security, * University of Maryland Baltimore County, and the SUNDIALS contributors. * Copyright (c) 2013-2025, Lawrence Livermore National Security * and Southern Methodist University. diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep.cpp index 7381c780a8..191586f128 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_lsrkstep.cpp @@ -3,7 +3,7 @@ * based on test_logging_arkode_lsrkstep.cpp by David J. Gardner @ LLNL * ----------------------------------------------------------------------------- * SUNDIALS Copyright Start - * Copyright (c) 2025, Lawrence Livermore National Security, + * Copyright (c) 2025-2026, Lawrence Livermore National Security, * University of Maryland Baltimore County, and the SUNDIALS contributors. * Copyright (c) 2013-2025, Lawrence Livermore National Security * and Southern Methodist University. diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_mristep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_mristep.cpp index 6d8ac26f54..42ea3c8dd4 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_mristep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_mristep.cpp @@ -3,7 +3,7 @@ * based on test_logging_arkode_mristep.cpp by David J. Gardner @ LLNL * ----------------------------------------------------------------------------- * SUNDIALS Copyright Start - * Copyright (c) 2025, Lawrence Livermore National Security, + * Copyright (c) 2025-2026, Lawrence Livermore National Security, * University of Maryland Baltimore County, and the SUNDIALS contributors. * Copyright (c) 2013-2025, Lawrence Livermore National Security * and Southern Methodist University. diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_splittingstep.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_splittingstep.cpp index d272f040d1..b54e60a3e5 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_splittingstep.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_prealloc_splittingstep.cpp @@ -3,7 +3,7 @@ * based on test_logging_arkode_splittingstep.cpp by David J. Gardner @ LLNL * ----------------------------------------------------------------------------- * SUNDIALS Copyright Start - * Copyright (c) 2025, Lawrence Livermore National Security, + * Copyright (c) 2025-2026, Lawrence Livermore National Security, * University of Maryland Baltimore County, and the SUNDIALS contributors. * Copyright (c) 2013-2025, Lawrence Livermore National Security * and Southern Methodist University. From 3d329f73ee67d64943ec4e31d2888bdcf2eb3429 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 2 Apr 2026 10:06:29 -0400 Subject: [PATCH 264/298] Applied suggestions from PR review --- doc/arkode/guide/source/Mathematics.rst | 4 +- src/arkode/arkode_io.c | 5 +- src/arkode/arkode_lsrkstep.c | 65 +++++++++++++------------ src/arkode/arkode_mristep.c | 18 ++++--- src/arkode/arkode_mristep_impl.h | 3 +- src/arkode/arkode_mristep_io.c | 5 +- 6 files changed, 54 insertions(+), 46 deletions(-) diff --git a/doc/arkode/guide/source/Mathematics.rst b/doc/arkode/guide/source/Mathematics.rst index 1a85a2d1a6..5c27451e32 100644 --- a/doc/arkode/guide/source/Mathematics.rst +++ b/doc/arkode/guide/source/Mathematics.rst @@ -529,8 +529,8 @@ Runge--Kutta--Chebyshev (RKC), :cite:p:`VSH:04` and Runge--Kutta--Legendre (RKL) .. math:: z_1 &= y_n,\\ z_2 &= z_1 + h_n \tilde{\mu}_2 f(t_n,z_1),\\ - z_j &= (1-\mu_j-\nu_j)z_1 + \mu_j z_{j-1} + \nu_jz_{j-2} + h_n \tilde{\gamma}_j f(t_n,z_1) + h_n \tilde{\mu}_j f(t_n + c_{j-1}h, z_{j-1}) \\ - y_{n+1} &= z_s. + z_j &= (1-\mu_j-\nu_j)z_1 + \mu_j z_{j-1} + \nu_jz_{j-2} + h_n \tilde{\gamma}_j f(t_n,z_1) + h_n \tilde{\mu}_j f(t_n + c_{j-1}h, z_{j-1}), \quad j = 3,\ldots,s+1 \\ + y_{n+1} &= z_{s+1}. :label: ARKODE_RKC_RKL The corresponding coefficients can be found in :cite:p:`VSH:04` and :cite:p:`MBA:14`, respectively. diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index 24e6b5a183..2a179b0b95 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -3218,9 +3218,8 @@ int ARKodeGetUserData(void* arkode_mem, void** user_data) ARKodeGetStageIndex: Returns the index of the current stage and the total number of - stages. If this is not supplied by the time-stepping module - then it returns (0,1), indicating that it is currently in the - first of only a single stage. + stages. If this is not supplied by the time-stepping module + then an error is returned and the values are set to (-1, -1). ---------------------------------------------------------------*/ int ARKodeGetStageIndex(void* arkode_mem, int* stage, int* max_stages) { diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 19ecfc2b83..0ca467aaa0 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -681,7 +681,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) bjm2 = bjm1; mus = w1 * bjm1; - /* Evaluate the first stage (store in tmp2) and initialize embedding */ + /* Begin stage 1 (store in tmp2) and initialize embedding */ ark_mem->tcur = ark_mem->tn + ark_mem->h * mus; step_mem->istage = 1; SUNLogInfo(ARK_LOGGER, "begin-stages-list", @@ -714,7 +714,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Evaluate stages j = 2,...,step_mem->req_stages */ for (int j = 2; j <= step_mem->req_stages; j++) { - /* Evaluate RHS and store in ycur */ + /* Complete the previous stage (evaluate the RHS and store it in ycur) */ /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) @@ -741,7 +741,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - /* Compute new stage value and store in ycur */ + /* Begin stage j (store in ycur) */ zj = TWO * w0 * zjm1 - zjm2; dzj = TWO * w0 * dzjm1 - dzjm2 + TWO * zjm1; d2zj = TWO * w0 * d2zjm1 - d2zjm2 + FOUR * dzjm1; @@ -1030,7 +1030,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) bjm1 = bjm2; mus = w1 * bjm1; - /* Evaluate the first stage (store in tmp2) and initialize embedding */ + /* Begin stage 1 (store in tmp2) and initialize embedding */ ark_mem->tcur = ark_mem->tn + ark_mem->h * mus; step_mem->istage = 1; SUNLogInfo(ARK_LOGGER, "begin-stages-list", @@ -1053,7 +1053,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Evaluate stages j = 2,...,step_mem->req_stages */ for (int j = 2; j <= step_mem->req_stages; j++) { - /* Evaluate RHS and store in ycur */ + /* Complete the previous stage (evaluate the RHS and store it in ycur) */ /* call the user-supplied pre-RHS function (if supplied) */ if (ark_mem->PreRhsFn) @@ -1080,7 +1080,7 @@ int lsrkStep_TakeStepRKL(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - /* Compute new stage value and store in ycur */ + /* Begin stage j (store in ycur) */ temj = (j + TWO) * (j - ONE); bj = temj / (TWO * j * (j + ONE)); ajm1 = ONE - bjm1; @@ -1276,7 +1276,7 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr hbt3 = hrsinv * (ONE - rsinv); } - /* Begin first stage */ + /* Begin stage 0 */ SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 0, ark_mem->tcur); SUNLogExtraDebugVec(ARK_LOGGER, "stage", ark_mem->yn, "z_0(:) ="); @@ -1312,7 +1312,7 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->fn, "F_0(:) ="); SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - /* Begin the second stage, and accumulate embedding into tempv1 */ + /* Begin stage 1 and accumulate embedding into tempv1 */ ark_mem->tcur = ark_mem->tn + hsm1inv; step_mem->istage = 1; SUNLogInfo(ARK_LOGGER, "begin-stages-list", @@ -1339,7 +1339,7 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Evaluate stages j = 2,...,step_mem->req_stages - 1 */ for (int j = 2; j < step_mem->req_stages; j++) { - /* Complete previous stage by evaluating RHS and storing it in tempv2 */ + /* Complete the previous stage (evaluate the RHS and store it in tempv2) */ /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRhsFn) @@ -1368,7 +1368,7 @@ int lsrkStep_TakeStepSSPs2(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - /* Begin the j-th stage by updating the state and embedding */ + /* Begin stage j (update the state and embedding) */ step_mem->istage = j; ark_mem->tcur = ark_mem->tn + j * hsm1inv; SUNLogInfo(ARK_LOGGER, "begin-stages-list", @@ -1520,7 +1520,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr const sunrealtype hrsinv = ark_mem->h / rs; const int in = (int)SUNRround(rn); - /* Begin the first stage */ + /* Begin stage 0 */ SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 0, ark_mem->tcur); SUNLogExtraDebugVec(ARK_LOGGER, "stage", ark_mem->yn, "z_0(:) ="); @@ -1557,7 +1557,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->fn, "F_0(:) ="); SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - /* Begin the second stage, and accumulate embedding into tempv1 */ + /* Begin stage 1 and accumulate embedding into tempv1 */ ark_mem->tcur = ark_mem->tn + hrat; step_mem->istage = 1; SUNLogInfo(ARK_LOGGER, "begin-stages-list", @@ -1584,7 +1584,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Evaluate first stage group */ for (int j = 2; j <= ((in - 1) * (in - 2) / 2); j++) { - /* Complete previous stage by evaluating RHS and storing it in tempv3 */ + /* Complete the previous stage (evaluate the RHS and store it in tempv3) */ /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRhsFn) @@ -1613,7 +1613,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - /* Begin the j-th stage by updating the state and embedding */ + /* Begin stage j (update the state and embedding) */ ark_mem->tcur = ark_mem->tn + j * hrat; step_mem->istage = j; SUNLogInfo(ARK_LOGGER, "begin-stages-list", @@ -1645,7 +1645,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Evaluate second stage group */ for (int j = ((in - 1) * (in - 2) / 2 + 1); j <= (in * (in + 1) / 2 - 1); j++) { - /* Complete previous stage by evaluating RHS and storing it in tempv3 */ + /* Complete the previous stage (evaluate the RHS and store it in tempv3) */ /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRhsFn) @@ -1674,7 +1674,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - /* Begin the j-th stage by updating the state and embedding */ + /* Begin stage j (update the state and embedding) */ ark_mem->tcur = ark_mem->tn + j * hrat; step_mem->istage = j; SUNLogInfo(ARK_LOGGER, "begin-stages-list", @@ -1765,7 +1765,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr /* Evaluate final stage group */ for (int j = (in * (in + 1) / 2 + 1); j <= step_mem->req_stages; j++) { - /* Complete the previous stage */ + /* Complete the previous stage (evaluate the RHS and store it in tempv3) */ /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRhsFn) @@ -1794,7 +1794,7 @@ int lsrkStep_TakeStepSSPs3(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - /* Begin the j-th stage by updating the state and embedding */ + /* Begin stage j (update the state and embedding) */ ark_mem->tcur = ark_mem->tn + (j - in) * hrat; step_mem->istage = j; SUNLogInfo(ARK_LOGGER, "begin-stages-list", @@ -1900,7 +1900,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr const sunrealtype hp5 = ark_mem->h * SUN_RCONST(0.5); const sunrealtype hrsinv = ark_mem->h / rs; - /* Begin the first stage */ + /* Begin stage 0 */ SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 0, ark_mem->tcur); SUNLogExtraDebugVec(ARK_LOGGER, "stage", ark_mem->yn, "z_0(:) ="); @@ -1937,7 +1937,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogExtraDebugVec(ARK_LOGGER, "stage RHS", ark_mem->fn, "F_0(:) ="); SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - /* Perform the second stage, and accumulate embedding into tempv1 */ + /* Begin stage 1 and accumulate embedding into tempv1 */ ark_mem->tcur = ark_mem->tn + hp5; step_mem->istage = 1; SUNLogInfo(ARK_LOGGER, "begin-stages-list", @@ -1987,7 +1987,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - /* Perform the third stage */ + /* Begin stage 2 */ ark_mem->tcur = ark_mem->tn + ark_mem->h; step_mem->istage = 2; SUNLogInfo(ARK_LOGGER, "begin-stages-list", @@ -2038,7 +2038,7 @@ int lsrkStep_TakeStepSSP43(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - /* Perform the fourth stage */ + /* Begin stage 3 */ ark_mem->tcur = ark_mem->tn + hp5; step_mem->istage = 3; SUNLogInfo(ARK_LOGGER, "begin-stages-list", @@ -2185,7 +2185,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt const sunrealtype hsixth = ark_mem->h / SIX; const sunrealtype hfifth = ark_mem->h / FIVE; - /* Begin the first stage */ + /* Begin stage 0 */ SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 0, ark_mem->tcur); SUNLogExtraDebugVec(ARK_LOGGER, "stage", ark_mem->yn, "z_0(:) ="); @@ -2225,7 +2225,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* Copy yn into tempv2 for use in later stages */ N_VScale(ONE, ark_mem->yn, ark_mem->tempv2); - /* Begin the second stage, and accumulate embedding into tempv1 */ + /* Begin stage 1 and accumulate embedding into tempv1 */ ark_mem->tcur = ark_mem->tn + hsixth; step_mem->istage = 1; SUNLogInfo(ARK_LOGGER, "begin-stages-list", @@ -2239,6 +2239,9 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* Evaluate stages j = 2,...,5 */ for (int j = 2; j <= 5; j++) { + /* Complete the previous stage (postprocesses the stage, evaluate the RHS, and + store it in tempv3) */ + /* apply user-supplied stage postprocessing function (if supplied) */ if (ark_mem->PostProcessStageFn) { @@ -2252,8 +2255,6 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } } - /* Complete previous stage by evaluating RHS and storing in tempv3 */ - /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRhsFn) { @@ -2281,7 +2282,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - /* Begin the j-th stage by updating the state and embedding */ + /* Begin stage j (update the state and embedding) */ if (j == 5) { ark_mem->tcur = ark_mem->tn + 2 * hsixth; } else { ark_mem->tcur = ark_mem->tn + j * hsixth; } step_mem->istage = j; @@ -2326,7 +2327,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* Evaluate stages j = 6,...,9 */ for (int j = 6; j <= 9; j++) { - /* Complete previous stage by evaluating RHS and storing in tempv3 */ + /* Complete the previous stage (evaluate the RHS and store in tempv3) */ /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRhsFn) @@ -2355,7 +2356,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - /* Begin the j-th stage by updating the state and embedding */ + /* Begin stage j (update the state and embedding) */ ark_mem->tcur = ark_mem->tn + (j - 3) * hsixth; step_mem->istage = j; SUNLogInfo(ARK_LOGGER, "begin-stages-list", @@ -2387,7 +2388,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt } } - /* Complete the last stage by evaluating RHS and storing in tempv3 */ + /* Complete the previous stage (evaluate the RHS and store it in tempv3) */ /* apply user-supplied stage preprocessing function (if supplied) */ if (ark_mem->PreRhsFn) @@ -2412,6 +2413,10 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt if (retval < 0) { return ARK_RHSFUNC_FAIL; } if (retval > 0) { return RHSFUNC_RECVR; } + SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); + SUNLogInfo(ARK_LOGGER, "begin-stages-list", + "stage = %i, tcur = " SUN_FORMAT_G, 10, ark_mem->tcur); + /* Compute the final time step solution */ step_mem->istage = 10; cvals[0] = SUN_RCONST(0.6); diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 61c654a402..a194051164 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -710,6 +710,7 @@ void mriStep_PrintMem(ARKodeMem ark_mem, FILE* outfile) fprintf(outfile, "MRIStep: q = %i\n", step_mem->q); fprintf(outfile, "MRIStep: p = %i\n", step_mem->p); fprintf(outfile, "MRIStep: istage = %i\n", step_mem->istage); + fprintf(outfile, "MRIStep: cur_stage = %i\n", step_mem->cur_stage); fprintf(outfile, "MRIStep: stages = %i\n", step_mem->stages); fprintf(outfile, "MRIStep: maxcor = %i\n", step_mem->maxcor); fprintf(outfile, "MRIStep: msbp = %i\n", step_mem->msbp); @@ -1839,7 +1840,7 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt (ark_mem->AccumErrorType != ARK_ACCUMERROR_NONE); /* initialize the current stage index */ - step_mem->istage = 0; + step_mem->istage = step_mem->cur_stage = 0; /* if MRI adaptivity is enabled: reset fast accumulated error, and send appropriate control parameter to the fast integrator */ @@ -1956,7 +1957,7 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt and stage index */ t0 = ark_mem->tn + step_mem->MRIC->c[is - 1] * ark_mem->h; tf = ark_mem->tcur = ark_mem->tn + step_mem->MRIC->c[is] * ark_mem->h; - step_mem->istage = is; + step_mem->istage = step_mem->cur_stage = is; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, stage type = %d, tcur = " SUN_FORMAT_G, is, @@ -2147,7 +2148,7 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* perform embedded stage (if needed) */ if (do_embedding) { - step_mem->istage = is = step_mem->stages; + step_mem->istage = step_mem->cur_stage = is = step_mem->stages; /* Temporarily swap ark_mem->ycur and ark_mem->tempv4 pointers, copying data so that both hold the current ark_mem->ycur value. This ensures @@ -2230,7 +2231,7 @@ int mriStep_TakeStepMRIGARK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* Compute final stage (for evolved solution), along with error estimate */ { - step_mem->istage = is = step_mem->stages - 1; + step_mem->istage = step_mem->cur_stage = is = step_mem->stages - 1; /* Set relevant stage times (including desired stage time for implicit solves) */ t0 = ark_mem->tn + step_mem->MRIC->c[is - 1] * ark_mem->h; @@ -2400,7 +2401,7 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) ytemp = ark_mem->tempv2; /* initialize the current stage index */ - step_mem->istage = 0; + step_mem->istage = step_mem->cur_stage = 0; /* if MRI adaptivity is enabled: reset fast accumulated error, and send appropriate control parameter to the fast integrator */ @@ -2538,7 +2539,7 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* Set current stage time and index */ ark_mem->tcur = ark_mem->tn + cstage * ark_mem->h; - step_mem->istage = stage; + step_mem->istage = step_mem->cur_stage = stage; SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, stage type = %d, tcur = " SUN_FORMAT_G, stage, @@ -2918,7 +2919,7 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) t0 = ark_mem->tn; /* initialize the current stage index */ - step_mem->istage = 0; + step_mem->istage = step_mem->cur_stage = 0; /* if MRI adaptivity is enabled: reset fast accumulated error, and send appropriate control parameter to the fast integrator */ @@ -3039,7 +3040,8 @@ int mriStep_TakeStepMERK(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) { /* Get stage index from group; skip to the next group if we've reached the end of this one */ - step_mem->istage = stage = step_mem->MRIC->group[ig][is]; + step_mem->istage = step_mem->cur_stage = stage = + step_mem->MRIC->group[ig][is]; if (stage < 0) { break; } nextstage = -1; if (stage < step_mem->stages) diff --git a/src/arkode/arkode_mristep_impl.h b/src/arkode/arkode_mristep_impl.h index 225aeb703b..b57aa4ada6 100644 --- a/src/arkode/arkode_mristep_impl.h +++ b/src/arkode/arkode_mristep_impl.h @@ -75,6 +75,7 @@ typedef struct ARKodeMRIStepMemRec sunbooleantype implicit_rhs; /* SUNTRUE if fsi is provided */ sunbooleantype deduce_rhs; /* SUNTRUE if fi is deduced after a nonlinear solve */ + int cur_stage; /* current stage index */ /* Outer RK method storage and parameters */ N_Vector* Fse; /* explicit RHS at each stage */ @@ -97,7 +98,7 @@ typedef struct ARKodeMRIStepMemRec N_Vector sdata; /* old stage data in residual */ N_Vector zpred; /* predicted stage solution */ N_Vector zcor; /* stage correction */ - int istage; /* current stage index */ + int istage; /* stage index used in nonlinear solve */ SUNNonlinearSolver NLS; /* generic SUNNonlinearSolver object */ sunbooleantype ownNLS; /* flag indicating ownership of NLS */ ARKRhsFn nls_fsi; /* fsi(t,y) used in the nonlinear solver */ diff --git a/src/arkode/arkode_mristep_io.c b/src/arkode/arkode_mristep_io.c index c18a48eeb6..768b4ccf88 100644 --- a/src/arkode/arkode_mristep_io.c +++ b/src/arkode/arkode_mristep_io.c @@ -377,7 +377,8 @@ int mriStep_SetDefaults(ARKodeMem ark_mem) step_mem->dgmax = DGMAX; /* max gamma change to recompute J or P */ step_mem->msbp = MSBP; /* max steps between updating J or P */ step_mem->stages = 0; /* no stages */ - step_mem->istage = 0; /* current stage index */ + step_mem->istage = 0; /* implicit solver stage index */ + step_mem->cur_stage = 0; /* current stage index */ step_mem->jcur = SUNFALSE; step_mem->convfail = ARK_NO_FAILURES; step_mem->stage_predict = NULL; /* no user-supplied stage predictor */ @@ -842,7 +843,7 @@ int mriStep_GetStageIndex(ARKodeMem ark_mem, int* stage, int* max_stages) retval = mriStep_AccessStepMem(ark_mem, __func__, &step_mem); if (retval != ARK_SUCCESS) { return (retval); } - *stage = step_mem->istage; + *stage = step_mem->cur_stage; *max_stages = step_mem->stages; return (ARK_SUCCESS); From a559042c9962ff55f9a2b7ff0675ef80274ec843 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 2 Apr 2026 10:09:41 -0400 Subject: [PATCH 265/298] One more suggestion from PR review, and formatting --- src/arkode/arkode_lsrkstep.c | 2 +- src/arkode/arkode_mristep.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 0ca467aaa0..c4ef396c5f 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -2415,7 +2415,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "stage = %i, tcur = " SUN_FORMAT_G, 10, ark_mem->tcur); + "stage = %i, tcur = " SUN_FORMAT_G, 10, ark_mem->tcur); /* Compute the final time step solution */ step_mem->istage = 10; diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index a194051164..b2190e10ec 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -2594,8 +2594,8 @@ int mriStep_TakeStepMRISR(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) /* perform implicit solve for correction */ if (impl_corr) { - /* store current stage index (for an "embedded" stage, subtract 1) */ - step_mem->istage = (stage == step_mem->stages) ? stage - 1 : stage; + /* update stage index for prediction and nonlinear solver if this is an "embedded" stage */ + if (embedding) { step_mem->istage = stage - 1; } /* Call predictor for current stage solution (result placed in zpred) */ retval = mriStep_Predict(ark_mem, step_mem->istage, step_mem->zpred); From e4a52e0f336548accc17504cea91ff6f197d3709 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 2 Apr 2026 10:15:21 -0400 Subject: [PATCH 266/298] One final revision based on the last PR review --- src/arkode/arkode_lsrkstep.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index c4ef396c5f..caa3c756e2 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -2301,8 +2301,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - /* Begin the sixth stage */ - ark_mem->tcur = ark_mem->tn + TWO * hsixth; + /* Finish stage 5 by preparing for the final stage group */ SUNLogInfo(ARK_LOGGER, "begin-stages-list", "stage = %i, tcur = " SUN_FORMAT_G, 6, ark_mem->tcur); N_VLinearSum(SUN_RCONST(1.0) / SUN_RCONST(25.0), ark_mem->tempv2, From daf1b815237654862ef935c13519797cb50dbf10 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 2 Apr 2026 10:57:05 -0400 Subject: [PATCH 267/298] Updating logging output due to PR revision --- test/answers | 2 +- .../logging/test_logging_arkode_lsrkstep_lvl3_5.out | 6 ++++++ .../logging/test_logging_arkode_lsrkstep_lvl4_5.out | 6 ++++++ .../logging/test_logging_arkode_lsrkstep_lvl5_5.out | 6 ++++++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/test/answers b/test/answers index 8d5b2beb79..b5f916b223 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 8d5b2beb797c1da59dea6a2fb765dd9a3cb69d10 +Subproject commit b5f916b2238453295bc907da956fdb9cd9be5af3 diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_5.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_5.out index d7a2a62914..2ae0bd0635 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_5.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_5.out @@ -25,6 +25,8 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 9, tcur = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 10, tcur = 6.103515625e-12 +[INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 8.07793566946316e-18 6.103515625000001e-12 6.103515625000001e-12 8.077935669463161e-28 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 2, tn = 6.103515625e-12, h = 6.103515625e-08 @@ -50,6 +52,8 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 9, tcur = 6.1041259765625e-08 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 10, tcur = 6.1041259765625e-08 +[INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 1.32348889930549e-13 6.104125976562500e-08 6.104125976562493e-08 0.000000000000000e+00 [INFO][rank 0][ARKodeEvolve][begin-step-attempt] step = 3, tn = 6.1041259765625e-08, h = 1.220703125e-06 @@ -75,6 +79,8 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 9, tcur = 1.28174438476563e-06 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 10, tcur = 1.28174438476563e-06 +[INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][ARKodeEvolve][end-step-attempt] status = success, dsm = 1.05814527885951e-11 1.281744384765625e-06 1.281744384764922e-06 8.470329472543003e-22 --------------------------------------------------------------------- diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_5.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_5.out index 92e655632a..cf20b58e58 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_5.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_5.out @@ -25,6 +25,8 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 9, tcur = 6.103515625e-12 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 10, tcur = 6.103515625e-12 +[INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 1.14486680447989e-07 [DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 6.103515625e-08 [DEBUG][rank 0][arkAdapt][new-step-eta] eta = 10000 @@ -53,6 +55,8 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 9, tcur = 6.1041259765625e-08 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 10, tcur = 6.1041259765625e-08 +[INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.000101192886669469 [DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 1.220703125e-06 [DEBUG][rank 0][arkAdapt][new-step-eta] eta = 20 @@ -81,6 +85,8 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 9, tcur = 1.28174438476563e-06 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 10, tcur = 1.28174438476563e-06 +[INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [DEBUG][rank 0][arkAdapt][new-step-before-bounds] h_acc = 0.000676820854209895 [DEBUG][rank 0][arkAdapt][new-step-after-max-min-bounds] h_acc = 2.44140625e-05 [DEBUG][rank 0][arkAdapt][new-step-eta] eta = 20 diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_5.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_5.out index e993088b4c..1c879140c6 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_5.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_5.out @@ -47,6 +47,8 @@ Start LSRKStep Logging test [DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_9(:) = 1.000000000000000e+00 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 10, tcur = 6.103515625e-12 +[INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [DEBUG][rank 0][lsrkStep_TakeStepSSP104][updated solution] ycur(:) = 6.103515625000001e-12 [DEBUG][rank 0][lsrkStep_TakeStepSSP104][embedded solution] y_embedded(:) = @@ -101,6 +103,8 @@ Start LSRKStep Logging test [DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_9(:) = 9.999999999999962e-01 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 10, tcur = 6.1041259765625e-08 +[INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [DEBUG][rank 0][lsrkStep_TakeStepSSP104][updated solution] ycur(:) = 6.104125976562493e-08 [DEBUG][rank 0][lsrkStep_TakeStepSSP104][embedded solution] y_embedded(:) = @@ -155,6 +159,8 @@ Start LSRKStep Logging test [DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_9(:) = 9.999999999983571e-01 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success +[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 10, tcur = 1.28174438476563e-06 +[INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [DEBUG][rank 0][lsrkStep_TakeStepSSP104][updated solution] ycur(:) = 1.281744384764922e-06 [DEBUG][rank 0][lsrkStep_TakeStepSSP104][embedded solution] y_embedded(:) = From 8a1ff29f9d52174adb62507dfed4a7f99f00ca06 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 2 Apr 2026 14:14:34 -0400 Subject: [PATCH 268/298] Applied suggestions from PR review --- src/arkode/arkode_lsrkstep.c | 4 ---- src/arkode/arkode_mristep_impl.h | 25 ++++++++++++++----------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index caa3c756e2..52c9d92d89 100644 --- a/src/arkode/arkode_lsrkstep.c +++ b/src/arkode/arkode_lsrkstep.c @@ -2299,11 +2299,7 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt /* no need to call RHS preprocessing here, since the stage does not require a RHS function evaluation */ - SUNLogInfo(ARK_LOGGER, "end-stages-list", "status = success"); - /* Finish stage 5 by preparing for the final stage group */ - SUNLogInfo(ARK_LOGGER, "begin-stages-list", - "stage = %i, tcur = " SUN_FORMAT_G, 6, ark_mem->tcur); N_VLinearSum(SUN_RCONST(1.0) / SUN_RCONST(25.0), ark_mem->tempv2, SUN_RCONST(9.0) / SUN_RCONST(25.0), ark_mem->ycur, ark_mem->tempv2); diff --git a/src/arkode/arkode_mristep_impl.h b/src/arkode/arkode_mristep_impl.h index b57aa4ada6..8628ada633 100644 --- a/src/arkode/arkode_mristep_impl.h +++ b/src/arkode/arkode_mristep_impl.h @@ -75,7 +75,6 @@ typedef struct ARKodeMRIStepMemRec sunbooleantype implicit_rhs; /* SUNTRUE if fsi is provided */ sunbooleantype deduce_rhs; /* SUNTRUE if fi is deduced after a nonlinear solve */ - int cur_stage; /* current stage index */ /* Outer RK method storage and parameters */ N_Vector* Fse; /* explicit RHS at each stage */ @@ -98,7 +97,6 @@ typedef struct ARKodeMRIStepMemRec N_Vector sdata; /* old stage data in residual */ N_Vector zpred; /* predicted stage solution */ N_Vector zcor; /* stage correction */ - int istage; /* stage index used in nonlinear solve */ SUNNonlinearSolver NLS; /* generic SUNNonlinearSolver object */ sunbooleantype ownNLS; /* flag indicating ownership of NLS */ ARKRhsFn nls_fsi; /* fsi(t,y) used in the nonlinear solver */ @@ -114,16 +112,21 @@ typedef struct ARKodeMRIStepMemRec sunrealtype eRNrm; /* estimated residual norm, used in nonlin and linear solver convergence tests */ sunrealtype nlscoef; /* coefficient in nonlin. convergence test */ - - int msbp; /* positive => max # steps between lsetup - negative => call at each Newton iter */ - long int nstlp; /* step number of last setup call */ - - int maxcor; /* max num iterations for solving the - nonlinear equation */ - int convfail; /* NLS fail flag (for interface routines) */ - sunbooleantype jcur; /* is Jacobian info for lin solver current? */ + int msbp; /* positive => max # steps between lsetup + negative => call at each Newton iter */ + long int nstlp; /* step number of last setup call */ + int maxcor; /* max num iterations for solving the + nonlinear equation */ + int convfail; /* NLS fail flag (for interface routines) */ + sunbooleantype jcur; /* is Jacobian info for lin solver current? */ ARKStagePredictFn stage_predict; /* User-supplied stage predictor */ + int istage; /* stage index used in nonlinear solve */ + + /* Informational output for mriStep_GetStageIndex -- note that this + may differ from istage, since that is used internally by the + nonlinear solver, and it is manually modified during embedding + stages to match the last internal stage index. */ + int cur_stage; /* Linear Solver Data */ ARKLinsolInitFn linit; From 468e83bb3c98d24cd8986b1c469dc2eda546ba72 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 2 Apr 2026 14:43:14 -0400 Subject: [PATCH 269/298] Updating logging output due to PR revision --- test/answers | 2 +- .../logging/test_logging_arkode_lsrkstep_lvl3_5.out | 6 ------ .../logging/test_logging_arkode_lsrkstep_lvl4_5.out | 6 ------ .../logging/test_logging_arkode_lsrkstep_lvl5_5.out | 6 ------ 4 files changed, 1 insertion(+), 19 deletions(-) diff --git a/test/answers b/test/answers index b5f916b223..df547e0653 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit b5f916b2238453295bc907da956fdb9cd9be5af3 +Subproject commit df547e0653323c668f205a3d92a25332002a19fd diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_5.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_5.out index 2ae0bd0635..90d1350838 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_5.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl3_5.out @@ -15,8 +15,6 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 5, tcur = 2.03450520833333e-12 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 2.03450520833333e-12 -[INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 3.0517578125e-12 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 7, tcur = 4.06901041666667e-12 @@ -42,8 +40,6 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 5, tcur = 2.03511555989583e-08 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 2.03511555989583e-08 -[INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 3.0523681640625e-08 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 7, tcur = 4.06962076822917e-08 @@ -69,8 +65,6 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 5, tcur = 4.67942301432292e-07 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 4.67942301432292e-07 -[INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 6.71392822265625e-07 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 7, tcur = 8.74843343098958e-07 diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_5.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_5.out index cf20b58e58..3822a80c9a 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_5.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl4_5.out @@ -15,8 +15,6 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 5, tcur = 2.03450520833333e-12 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 2.03450520833333e-12 -[INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 3.0517578125e-12 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 7, tcur = 4.06901041666667e-12 @@ -45,8 +43,6 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 5, tcur = 2.03511555989583e-08 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 2.03511555989583e-08 -[INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 3.0523681640625e-08 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 7, tcur = 4.06962076822917e-08 @@ -75,8 +71,6 @@ Start LSRKStep Logging test [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 5, tcur = 4.67942301432292e-07 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 4.67942301432292e-07 -[INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 6.71392822265625e-07 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 7, tcur = 8.74843343098958e-07 diff --git a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_5.out b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_5.out index 1c879140c6..6f8170c90d 100644 --- a/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_5.out +++ b/test/unit_tests/logging/test_logging_arkode_lsrkstep_lvl5_5.out @@ -26,8 +26,6 @@ Start LSRKStep Logging test 1.000000000000000e+00 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 5, tcur = 2.03450520833333e-12 -[INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 2.03450520833333e-12 [DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_5(:) = 1.000000000000000e+00 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success @@ -82,8 +80,6 @@ Start LSRKStep Logging test 9.999999999999984e-01 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 5, tcur = 2.03511555989583e-08 -[INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 2.03511555989583e-08 [DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_5(:) = 9.999999999999996e-01 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success @@ -138,8 +134,6 @@ Start LSRKStep Logging test 9.999999999992345e-01 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success [INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 5, tcur = 4.67942301432292e-07 -[INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success -[INFO][rank 0][lsrkStep_TakeStepSSP104][begin-stages-list] stage = 6, tcur = 4.67942301432292e-07 [DEBUG][rank 0][lsrkStep_TakeStepSSP104][stage RHS] F_5(:) = 9.999999999997812e-01 [INFO][rank 0][lsrkStep_TakeStepSSP104][end-stages-list] status = success From 9234c328ceccd7e12874037595a5ed1ac945cb52 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 2 Apr 2026 16:09:53 -0400 Subject: [PATCH 270/298] Minor change to initiate CI tests (I'd forgotten to push a change to the answers repo) --- CHANGELOG.md | 4 ++-- doc/shared/RecentChanges.rst | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42839b0ee7..d822a60ac3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,8 +40,8 @@ users who measure memory usage before beginning a simulation. Added the function `ARKodeGetStageIndex` that returns the index of the stage currently being processed, and the total number of stages in the method, for users -who must compute auxiliary quantities in their IVP right-hand side functions during -some stages and not others (e.g., in all but the first or last stage). +who wish to compute auxiliary quantities in their IVP right-hand side functions +during some stages and not others (e.g., in all but the first or last stage). Added the functions `ARKodeGetLastTime` and `ARKodeGetLastState` to return the last successful time and state achieved by ARKODE, respectively. diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index 969318a393..c3a55a853c 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -40,7 +40,7 @@ users who measure memory usage before beginning a simulation. Added the function :c:func:`ARKodeGetStageIndex` that returns the index of the stage currently being processed, and the total number of stages in the method, for -users who must compute auxiliary quantities in their IVP right-hand side functions +users who wish to compute auxiliary quantities in their IVP right-hand side functions during some stages and not others (e.g., in all but the first or last stage). Added the functions :c:func:`ARKodeGetLastTime` and :c:func:`ARKodeGetLastState` to From d31720d6d5db20d95165916b4f45df7018600e02 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 16 Apr 2026 14:30:08 -0400 Subject: [PATCH 271/298] Formatting --- src/arkode/arkode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index a5d1847744..d56231257f 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -137,7 +137,7 @@ int ARKodeResize(void* arkode_mem, N_Vector y0, sunrealtype hscale, ark_mem->hprime = (ark_mem->tstop - ark_mem->tcur) * (ONE - FOUR * ark_mem->uround); ark_mem->eta = ark_mem->hprime / ark_mem->h; - if (ark_mem->skipadapttstop) ark_mem->tstoplimited = SUNTRUE; + if (ark_mem->skipadapttstop) { ark_mem->tstoplimited = SUNTRUE; } } } } From 87f4ec71fd7cf57123cca5b7782745e56ab281fa Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 16 Apr 2026 14:33:36 -0400 Subject: [PATCH 272/298] Formatting --- src/arkode/arkode_io.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index 03a9095608..bf887ad897 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -80,14 +80,14 @@ int ARKodeSetDefaults(void* arkode_mem) ark_mem->maxncf = MAXNCF; /* max convergence fails */ ark_mem->maxconstrfails = MAXCONSTRFAILS; /* max number of constraint fails */ ark_mem->preallocated = SUNFALSE; /* data was not preallocated */ - ark_mem->hin = ZERO; /* determine initial step on-the-fly */ - ark_mem->hmin = ZERO; /* no minimum step size */ - ark_mem->hmax_inv = ZERO; /* no maximum step size */ - ark_mem->tstopset = SUNFALSE; /* no stop time set */ - ark_mem->tstopinterp = SUNFALSE; /* copy at stop time */ - ark_mem->tstoplimited = SUNFALSE; /* tstop did not limit last step */ - ark_mem->skipadapttstop = SUNFALSE; /* tstop-limited steps can affect adaptivity */ - ark_mem->tstop = ZERO; /* no fixed stop time */ + ark_mem->hin = ZERO; /* determine initial step on-the-fly */ + ark_mem->hmin = ZERO; /* no minimum step size */ + ark_mem->hmax_inv = ZERO; /* no maximum step size */ + ark_mem->tstopset = SUNFALSE; /* no stop time set */ + ark_mem->tstopinterp = SUNFALSE; /* copy at stop time */ + ark_mem->tstoplimited = SUNFALSE; /* tstop did not limit last step */ + ark_mem->skipadapttstop = SUNFALSE; /* tstop-limited steps can affect adaptivity */ + ark_mem->tstop = ZERO; /* no fixed stop time */ ark_mem->hadapt_mem->etamx1 = ETAMX1; /* max change on first step */ ark_mem->hadapt_mem->etamxf = ETAMXF; /* max change on error-failed step */ ark_mem->hadapt_mem->etamin = ETAMIN; /* min bound on time step reduction */ From 02c0c01ae0f6f6279d1fe5f2d1a183ec2ea285fb Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 16 Apr 2026 16:21:12 -0400 Subject: [PATCH 273/298] Added CVodeSkipAdaptStopTime to CVODE --- doc/cvode/guide/source/Usage/index.rst | 25 +++++++++++++++++++++ examples/cvode/CXX_serial/cv_kpr.cpp | 6 +++++ examples/cvode/CXX_serial/cv_kpr.hpp | 5 +++++ include/cvode/cvode.h | 2 ++ src/cvode/cvode.c | 31 ++++++++++++++++++++++++++ src/cvode/cvode_cli.c | 1 + src/cvode/cvode_impl.h | 4 ++++ src/cvode/cvode_io.c | 22 ++++++++++++++++++ 8 files changed, 96 insertions(+) diff --git a/doc/cvode/guide/source/Usage/index.rst b/doc/cvode/guide/source/Usage/index.rst index 2929ab59c4..95bf791f8b 100644 --- a/doc/cvode/guide/source/Usage/index.rst +++ b/doc/cvode/guide/source/Usage/index.rst @@ -864,6 +864,9 @@ Main solver optional input functions +-------------------------------+---------------------------------------------+----------------+ | Disable the stop time | :c:func:`CVodeClearStopTime` | N/A | +-------------------------------+---------------------------------------------+----------------+ + | Disregard stop time limited | :c:func:`CVodeSkipAdaptStopTime` | ``SUNFALSE`` | + | steps in adaptivity | | | + +-------------------------------+---------------------------------------------+----------------+ | Maximum no. of error test | :c:func:`CVodeSetMaxErrTestFails` | 7 | | failures | | | +-------------------------------+---------------------------------------------+----------------+ @@ -1207,6 +1210,28 @@ Main solver optional input functions .. versionadded:: 6.5.1 +.. c:function:: int CVodeSkipAdaptStopTime(void* cvode_mem, sunbooleantype skip) + + Specifies whether stop-time-limited steps should be disregarded + when adapting step sizes and method order. + + **Arguments:** + * ``cvode_mem`` -- pointer to the CVODE memory block. + * ``skip`` -- flag indicating to disregard (1) or retain (0) stop time limited steps from the temporal adaptivity algorithm. + + **Return value:** + * ``CV_SUCCESS`` if successful + * ``CV_MEM_NULL`` if the CVODE memory is ``NULL`` + + **Notes:** + The default behavior is to use all successful time steps + (including stop-time-limited steps) when performing adaptivity. + + This routine will be called by :c:func:`CVodeSetOptions` + when using the key "cvid.skip_adapt_stop_time". + + .. versionadded:: x.y.z + .. c:function:: int CVodeSetMaxErrTestFails(void* cvode_mem, int maxnef) The function ``CVodeSetMaxErrTestFails`` specifies the maximum number of error test failures permitted in attempting one step. diff --git a/examples/cvode/CXX_serial/cv_kpr.cpp b/examples/cvode/CXX_serial/cv_kpr.cpp index ff0aad9f79..b8ada93a92 100644 --- a/examples/cvode/CXX_serial/cv_kpr.cpp +++ b/examples/cvode/CXX_serial/cv_kpr.cpp @@ -140,6 +140,12 @@ int main(int argc, char* argv[]) // Advance in time for (int i = 0; i < opts.nout; i++) { + if (opts.use_tstop) + { + flag = CVodeSetStopTime(cvode_mem, tout); + if (check_flag(flag, "CVodeSetStopTime")) { return 1; } + } + flag = CVode(cvode_mem, tout, y, &tret, CV_NORMAL); if (check_flag(flag, "CVode")) { return 1; } diff --git a/examples/cvode/CXX_serial/cv_kpr.hpp b/examples/cvode/CXX_serial/cv_kpr.hpp index ef5dd77d84..272e70c11d 100644 --- a/examples/cvode/CXX_serial/cv_kpr.hpp +++ b/examples/cvode/CXX_serial/cv_kpr.hpp @@ -54,6 +54,9 @@ struct Options // Finite difference Jacobian bool fd_jac = false; + // Enforce stop time exactly (instead of interpolating) + bool use_tstop = false; + // Output options sunrealtype dtout = ONE; // output interval int nout = 10; // number of outputs @@ -99,6 +102,7 @@ static void InputHelp() std::cout << " --fdjac : finite-difference Jacobian\n"; std::cout << " --dtout : output interval\n"; std::cout << " --nout : number of outputs\n"; + std::cout << " --tstop : enforce stop time exactly\n"; } static int ReadInputs(std::vector& args, Options& opts, @@ -116,6 +120,7 @@ static int ReadInputs(std::vector& args, Options& opts, find_arg(args, "--fdjac", opts.fd_jac); find_arg(args, "--dtout", opts.dtout); find_arg(args, "--nout", opts.nout); + find_arg(args, "--tstop", opts.use_tstop); return 0; } diff --git a/include/cvode/cvode.h b/include/cvode/cvode.h index e08f462e0a..624bfcf7c5 100644 --- a/include/cvode/cvode.h +++ b/include/cvode/cvode.h @@ -155,6 +155,8 @@ SUNDIALS_EXPORT int CVodeSetStopTime(void* cvode_mem, sunrealtype tstop); SUNDIALS_EXPORT int CVodeSetInterpolateStopTime(void* cvode_mem, sunbooleantype interp); SUNDIALS_EXPORT int CVodeClearStopTime(void* cvode_mem); +SUNDIALS_EXPORT int CVodeSkipAdaptStopTime(void* cvode_mem, + sunbooleantype skipadapttstop); SUNDIALS_EXPORT int CVodeSetUseIntegratorFusedKernels(void* cvode_mem, sunbooleantype onoff); SUNDIALS_EXPORT int CVodeSetUserData(void* cvode_mem, void* user_data); diff --git a/src/cvode/cvode.c b/src/cvode/cvode.c index 7c07dd65ac..bb867238c7 100644 --- a/src/cvode/cvode.c +++ b/src/cvode/cvode.c @@ -306,6 +306,8 @@ void* CVodeCreate(int lmm, SUNContext sunctx) cv_mem->cv_small_nef = SMALL_NEF_DEFAULT; cv_mem->cv_tstopset = SUNFALSE; cv_mem->cv_tstopinterp = SUNFALSE; + cv_mem->cv_tstoplimited = SUNFALSE; + cv_mem->cv_skipadapttstop = SUNFALSE; cv_mem->cv_maxnef = MXNEF; cv_mem->cv_maxncf = MXNCF; cv_mem->cv_nlscoef = CORTES; @@ -1209,10 +1211,17 @@ int CVode(void* cvode_mem, sunrealtype tout, N_Vector yout, sunrealtype* tret, /* Check for approach to tstop */ + cv_mem->cv_tstoplimited = SUNFALSE; if (cv_mem->cv_tstopset) { if ((cv_mem->cv_tn + cv_mem->cv_h - cv_mem->cv_tstop) * cv_mem->cv_h > ZERO) { + if (cv_mem->cv_skipadapttstop) + { + cv_mem->cv_tstoplimited = SUNTRUE; + cv_mem->cv_hsave = cv_mem->cv_h; + cv_mem->cv_qsave = cv_mem->cv_q; + } cv_mem->cv_h = (cv_mem->cv_tstop - cv_mem->cv_tn) * (ONE - FOUR * cv_mem->cv_uround); } @@ -1367,6 +1376,7 @@ int CVode(void* cvode_mem, sunrealtype tout, N_Vector yout, sunrealtype* tret, } /* end of root stop check */ /* Test for tn at tstop or near tstop */ + cv_mem->cv_tstoplimited = SUNFALSE; if (cv_mem->cv_tstopset) { /* Test for tn at tstop */ @@ -1399,6 +1409,12 @@ int CVode(void* cvode_mem, sunrealtype tout, N_Vector yout, sunrealtype* tret, cv_mem->cv_h > ZERO) { + if (cv_mem->cv_skipadapttstop) + { + cv_mem->cv_tstoplimited = SUNTRUE; + cv_mem->cv_hsave = cv_mem->cv_hprime; + cv_mem->cv_qsave = cv_mem->cv_q; + } cv_mem->cv_hprime = (cv_mem->cv_tstop - cv_mem->cv_tn) * (ONE - FOUR * cv_mem->cv_uround); cv_mem->cv_eta = cv_mem->cv_hprime / cv_mem->cv_h; @@ -1593,6 +1609,7 @@ int CVode(void* cvode_mem, sunrealtype tout, N_Vector yout, sunrealtype* tret, } /* Check if tn is at tstop or near tstop */ + cv_mem->cv_tstoplimited = SUNFALSE; if (cv_mem->cv_tstopset) { troundoff = FUZZ_FACTOR * cv_mem->cv_uround * @@ -1621,6 +1638,12 @@ int CVode(void* cvode_mem, sunrealtype tout, N_Vector yout, sunrealtype* tret, cv_mem->cv_h > ZERO) { + if (cv_mem->cv_skipadapttstop) + { + cv_mem->cv_tstoplimited = SUNTRUE; + cv_mem->cv_hsave = cv_mem->cv_hprime; + cv_mem->cv_qsave = cv_mem->cv_q; + } cv_mem->cv_hprime = (cv_mem->cv_tstop - cv_mem->cv_tn) * (ONE - FOUR * cv_mem->cv_uround); cv_mem->cv_eta = cv_mem->cv_hprime / cv_mem->cv_h; @@ -3627,6 +3650,14 @@ static void cvPrepareNextStep(CVodeMem cv_mem, sunrealtype dsm) cv_mem->cv_hprime = cv_mem->cv_h; cv_mem->cv_eta = ONE; } + else if (cv_mem->cv_skipadapttstop && cv_mem->cv_tstoplimited) + { + /* If the current step was limited by tstop, set the upcoming step size + and order to match the values just prior to the tstop-limited step */ + cv_mem->cv_qprime = cv_mem->cv_qsave; + cv_mem->cv_hprime = cv_mem->cv_hsave; + cv_mem->cv_eta = cv_mem->cv_hsave / cv_mem->cv_h; + } else { /* etaq is the ratio of new to old h at the current order */ diff --git a/src/cvode/cvode_cli.c b/src/cvode/cvode_cli.c index cf42ef4080..53dcdf8a48 100644 --- a/src/cvode/cvode_cli.c +++ b/src/cvode/cvode_cli.c @@ -81,6 +81,7 @@ static int cvSetFromCommandLine(void* cvode_mem, const char* cvid, int argc, {"max_order", CVodeSetMaxOrd}, {"stab_lim_det", CVodeSetStabLimDet}, {"interpolate_stop_time", CVodeSetInterpolateStopTime}, + {"skip_adapt_stop_time", CVodeSkipAdaptStopTime}, {"use_integrator_fused_kernels", CVodeSetUseIntegratorFusedKernels}, {"num_fails_eta_max_err_fail", CVodeSetNumFailsEtaMaxErrFail}, {"linear_solution_scaling", CVodeSetLinearSolutionScaling}, diff --git a/src/cvode/cvode_impl.h b/src/cvode/cvode_impl.h index 73cf16b9b8..1f8ef6b657 100644 --- a/src/cvode/cvode_impl.h +++ b/src/cvode/cvode_impl.h @@ -250,6 +250,10 @@ typedef struct CVodeMemRec sunbooleantype cv_tstopset; sunbooleantype cv_tstopinterp; + sunbooleantype cv_tstoplimited; + sunbooleantype cv_skipadapttstop; + int cv_qsave; + sunrealtype cv_hsave; sunrealtype cv_tstop; /*--------- diff --git a/src/cvode/cvode_io.c b/src/cvode/cvode_io.c index 7a99daeb79..bd30e96bef 100644 --- a/src/cvode/cvode_io.c +++ b/src/cvode/cvode_io.c @@ -736,6 +736,28 @@ int CVodeClearStopTime(void* cvode_mem) return (CV_SUCCESS); } +/* + * CVodeSkipAdaptStopTime + * + * Specififies whether stop-time-limited steps should be disregarded + * when performing step size and order adaptivity. + */ + +int CVodeSkipAdaptStopTime(void* cvode_mem, sunbooleantype skip) +{ + CVodeMem cv_mem; + + if (cvode_mem == NULL) + { + cvProcessError(NULL, CV_MEM_NULL, __LINE__, __func__, __FILE__, MSGCV_NO_MEM); + return (CV_MEM_NULL); + } + cv_mem = (CVodeMem)cvode_mem; + cv_mem->cv_skipadapttstop = skip; + + return (CV_SUCCESS); +} + /* * CVodeSetMaxErrTestFails * From 0cf0b72977a841b57f0837aa8b2585e8d4995205 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 16 Apr 2026 16:21:41 -0400 Subject: [PATCH 274/298] Added CVodeSkipAdaptStopTime to CVODES --- doc/cvodes/guide/source/Usage/SIM.rst | 25 +++++++++++++++++++++ include/cvodes/cvodes.h | 2 ++ src/cvodes/cvodes.c | 31 +++++++++++++++++++++++++++ src/cvodes/cvodes_cli.c | 1 + src/cvodes/cvodes_impl.h | 4 ++++ src/cvodes/cvodes_io.c | 22 +++++++++++++++++++ 6 files changed, 85 insertions(+) diff --git a/doc/cvodes/guide/source/Usage/SIM.rst b/doc/cvodes/guide/source/Usage/SIM.rst index 5ee88ad335..d71366789a 100644 --- a/doc/cvodes/guide/source/Usage/SIM.rst +++ b/doc/cvodes/guide/source/Usage/SIM.rst @@ -873,6 +873,9 @@ Main solver optional input functions +-------------------------------+---------------------------------------------+----------------+ | Disable the stop time | :c:func:`CVodeClearStopTime` | N/A | +-------------------------------+---------------------------------------------+----------------+ + | Disregard stop time limited | :c:func:`CVodeSkipAdaptStopTime` | ``SUNFALSE`` | + | steps in adaptivity | | | + +-------------------------------+---------------------------------------------+----------------+ | Maximum no. of error test | :c:func:`CVodeSetMaxErrTestFails` | 7 | | failures | | | +-------------------------------+---------------------------------------------+----------------+ @@ -1213,6 +1216,28 @@ Main solver optional input functions .. versionadded:: 6.5.1 +.. c:function:: int CVodeSkipAdaptStopTime(void* cvode_mem, sunbooleantype skip) + + Specifies whether stop-time-limited steps should be disregarded + when adapting step sizes and method order. + + **Arguments:** + * ``cvode_mem`` -- pointer to the CVODE memory block. + * ``skip`` -- flag indicating to disregard (1) or retain (0) stop time limited steps from the temporal adaptivity algorithm. + + **Return value:** + * ``CV_SUCCESS`` if successful + * ``CV_MEM_NULL`` if the CVODE memory is ``NULL`` + + **Notes:** + The default behavior is to use all successful time steps + (including stop-time-limited steps) when performing adaptivity. + + This routine will be called by :c:func:`CVodeSetOptions` + when using the key "cvid.skip_adapt_stop_time". + + .. versionadded:: x.y.z + .. c:function:: int CVodeSetMaxErrTestFails(void* cvode_mem, int maxnef) The function ``CVodeSetMaxErrTestFails`` specifies the maximum number of error test failures permitted in attempting one step. diff --git a/include/cvodes/cvodes.h b/include/cvodes/cvodes.h index f5e7621a85..92d05ff6f5 100644 --- a/include/cvodes/cvodes.h +++ b/include/cvodes/cvodes.h @@ -224,6 +224,8 @@ SUNDIALS_EXPORT int CVodeSetStopTime(void* cvode_mem, sunrealtype tstop); SUNDIALS_EXPORT int CVodeSetInterpolateStopTime(void* cvode_mem, sunbooleantype interp); SUNDIALS_EXPORT int CVodeClearStopTime(void* cvode_mem); +SUNDIALS_EXPORT int CVodeSkipAdaptStopTime(void* cvode_mem, + sunbooleantype skipadapttstop); SUNDIALS_EXPORT int CVodeSetUserData(void* cvode_mem, void* user_data); /* Optional step adaptivity input functions */ diff --git a/src/cvodes/cvodes.c b/src/cvodes/cvodes.c index 1f188d72d7..0636cb14dc 100644 --- a/src/cvodes/cvodes.c +++ b/src/cvodes/cvodes.c @@ -544,6 +544,8 @@ void* CVodeCreate(int lmm, SUNContext sunctx) cv_mem->cv_small_nef = SMALL_NEF_DEFAULT; cv_mem->cv_tstopset = SUNFALSE; cv_mem->cv_tstopinterp = SUNFALSE; + cv_mem->cv_tstoplimited = SUNFALSE; + cv_mem->cv_skipadapttstop = SUNFALSE; cv_mem->cv_maxnef = MXNEF; cv_mem->cv_maxncf = MXNCF; cv_mem->cv_nlscoef = CORTES; @@ -3143,10 +3145,17 @@ int CVode(void* cvode_mem, sunrealtype tout, N_Vector yout, sunrealtype* tret, /* Check for approach to tstop */ + cv_mem->cv_tstoplimited = SUNFALSE; if (cv_mem->cv_tstopset) { if ((cv_mem->cv_tn + cv_mem->cv_h - cv_mem->cv_tstop) * cv_mem->cv_h > ZERO) { + if (cv_mem->cv_skipadapttstop) + { + cv_mem->cv_tstoplimited = SUNTRUE; + cv_mem->cv_hsave = cv_mem->cv_h; + cv_mem->cv_qsave = cv_mem->cv_q; + } cv_mem->cv_h = (cv_mem->cv_tstop - cv_mem->cv_tn) * (ONE - FOUR * cv_mem->cv_uround); } @@ -3343,6 +3352,7 @@ int CVode(void* cvode_mem, sunrealtype tout, N_Vector yout, sunrealtype* tret, } /* end of root stop check */ /* Test for tn at tstop or near tstop */ + cv_mem->cv_tstoplimited = SUNFALSE; if (cv_mem->cv_tstopset) { /* Test for tn at tstop */ @@ -3375,6 +3385,12 @@ int CVode(void* cvode_mem, sunrealtype tout, N_Vector yout, sunrealtype* tret, cv_mem->cv_h > ZERO) { + if (cv_mem->cv_skipadapttstop) + { + cv_mem->cv_tstoplimited = SUNTRUE; + cv_mem->cv_hsave = cv_mem->cv_hprime; + cv_mem->cv_qsave = cv_mem->cv_q; + } cv_mem->cv_hprime = (cv_mem->cv_tstop - cv_mem->cv_tn) * (ONE - FOUR * cv_mem->cv_uround); cv_mem->cv_eta = cv_mem->cv_hprime / cv_mem->cv_h; @@ -3622,6 +3638,7 @@ int CVode(void* cvode_mem, sunrealtype tout, N_Vector yout, sunrealtype* tret, } /* Check if tn is at tstop or near tstop */ + cv_mem->cv_tstoplimited = SUNFALSE; if (cv_mem->cv_tstopset) { troundoff = FUZZ_FACTOR * cv_mem->cv_uround * @@ -3650,6 +3667,12 @@ int CVode(void* cvode_mem, sunrealtype tout, N_Vector yout, sunrealtype* tret, cv_mem->cv_h > ZERO) { + if (cv_mem->cv_skipadapttstop) + { + cv_mem->cv_tstoplimited = SUNTRUE; + cv_mem->cv_hsave = cv_mem->cv_hprime; + cv_mem->cv_qsave = cv_mem->cv_q; + } cv_mem->cv_hprime = (cv_mem->cv_tstop - cv_mem->cv_tn) * (ONE - FOUR * cv_mem->cv_uround); cv_mem->cv_eta = cv_mem->cv_hprime / cv_mem->cv_h; @@ -7928,6 +7951,14 @@ static void cvPrepareNextStep(CVodeMem cv_mem, sunrealtype dsm) cv_mem->cv_hprime = cv_mem->cv_h; cv_mem->cv_eta = ONE; } + else if (cv_mem->cv_skipadapttstop && cv_mem->cv_tstoplimited) + { + /* If the current step was limited by tstop, set the upcoming step size + and order to match the values just prior to the tstop-limited step */ + cv_mem->cv_qprime = cv_mem->cv_qsave; + cv_mem->cv_hprime = cv_mem->cv_hsave; + cv_mem->cv_eta = cv_mem->cv_hsave / cv_mem->cv_h; + } else { /* etaq is the ratio of new to old h at the current order */ diff --git a/src/cvodes/cvodes_cli.c b/src/cvodes/cvodes_cli.c index 9524ea6869..2051cec61b 100644 --- a/src/cvodes/cvodes_cli.c +++ b/src/cvodes/cvodes_cli.c @@ -81,6 +81,7 @@ static int cvSetFromCommandLine(void* cvode_mem, const char* cvid, int argc, {"max_order", CVodeSetMaxOrd}, {"stab_lim_det", CVodeSetStabLimDet}, {"interpolate_stop_time", CVodeSetInterpolateStopTime}, + {"skip_adapt_stop_time", CVodeSkipAdaptStopTime}, {"num_fails_eta_max_err_fail", CVodeSetNumFailsEtaMaxErrFail}, {"quad_err_con", CVodeSetQuadErrCon}, {"sens_err_con", CVodeSetSensErrCon}, diff --git a/src/cvodes/cvodes_impl.h b/src/cvodes/cvodes_impl.h index 5f26db2302..6baeba67d9 100644 --- a/src/cvodes/cvodes_impl.h +++ b/src/cvodes/cvodes_impl.h @@ -380,6 +380,10 @@ typedef struct CVodeMemRec sunbooleantype cv_tstopset; sunbooleantype cv_tstopinterp; + sunbooleantype cv_tstoplimited; + sunbooleantype cv_skipadapttstop; + int cv_qsave; + sunrealtype cv_hsave; sunrealtype cv_tstop; /*--------- diff --git a/src/cvodes/cvodes_io.c b/src/cvodes/cvodes_io.c index dd3792b77a..428f65d7f5 100644 --- a/src/cvodes/cvodes_io.c +++ b/src/cvodes/cvodes_io.c @@ -738,6 +738,28 @@ int CVodeClearStopTime(void* cvode_mem) return (CV_SUCCESS); } +/* + * CVodeSkipAdaptStopTime + * + * Specififies whether stop-time-limited steps should be disregarded + * when performing step size and order adaptivity. + */ + +int CVodeSkipAdaptStopTime(void* cvode_mem, sunbooleantype skip) +{ + CVodeMem cv_mem; + + if (cvode_mem == NULL) + { + cvProcessError(NULL, CV_MEM_NULL, __LINE__, __func__, __FILE__, MSGCV_NO_MEM); + return (CV_MEM_NULL); + } + cv_mem = (CVodeMem)cvode_mem; + cv_mem->cv_skipadapttstop = skip; + + return (CV_SUCCESS); +} + /* * CVodeSetMaxErrTestFails * From b5cc38a7445c5633e3e9611c11a2d436f6e3ab78 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 16 Apr 2026 16:22:14 -0400 Subject: [PATCH 275/298] Added IDASkipAdaptStopTime to IDA --- doc/ida/guide/source/Usage/index.rst | 24 +++++++ include/ida/ida.h | 2 + src/ida/ida.c | 98 ++++++++++++++++++++-------- src/ida/ida_cli.c | 3 +- src/ida/ida_impl.h | 4 ++ src/ida/ida_io.c | 17 +++++ 6 files changed, 118 insertions(+), 30 deletions(-) diff --git a/doc/ida/guide/source/Usage/index.rst b/doc/ida/guide/source/Usage/index.rst index 2f3b992c04..002b90be9e 100644 --- a/doc/ida/guide/source/Usage/index.rst +++ b/doc/ida/guide/source/Usage/index.rst @@ -931,6 +931,8 @@ Main solver optional input functions +--------------------------------------------------------------------+---------------------------------------+----------------+ | Disable the stop time | :c:func:`IDAClearStopTime` | N/A | +--------------------------------------------------------------------+---------------------------------------+----------------+ + | Disregard stop time limited steps in adaptivity | :c:func:`IDASkipAdaptStopTime` | ``SUNFALSE`` | + +--------------------------------------------------------------------+---------------------------------------+----------------+ | Maximum no. of error test failures | :c:func:`IDASetMaxErrTestFails` | 10 | +--------------------------------------------------------------------+---------------------------------------+----------------+ | Suppress alg. vars. from error test | :c:func:`IDASetSuppressAlg` | ``SUNFALSE`` | @@ -1189,6 +1191,28 @@ Main solver optional input functions .. versionadded:: 6.5.1 +.. c:function:: int IDASkipAdaptStopTime(void* ida_mem, sunbooleantype skip) + + Specifies whether stop-time-limited steps should be disregarded + when adapting step sizes and method order. + + **Arguments:** + * ``ida_mem`` -- pointer to the IDA memory block. + * ``skip`` -- flag indicating to disregard (1) or retain (0) stop time limited steps from the temporal adaptivity algorithm. + + **Return value:** + * ``IDA_SUCCESS`` if successful + * ``IDA_MEM_NULL`` if the IDA memory is ``NULL`` + + **Notes:** + The default behavior is to use all successful time steps + (including stop-time-limited steps) when performing adaptivity. + + This routine will be called by :c:func:`IDASetOptions` + when using the key "idaid.skip_adapt_stop_time". + + .. versionadded:: x.y.z + .. c:function:: int IDASetMaxErrTestFails(void * ida_mem, int maxnef) The function ``IDASetMaxErrTestFails`` specifies the maximum number of error diff --git a/include/ida/ida.h b/include/ida/ida.h index ab5a4bcff8..c217189a59 100644 --- a/include/ida/ida.h +++ b/include/ida/ida.h @@ -146,6 +146,8 @@ SUNDIALS_EXPORT int IDASetMaxStep(void* ida_mem, sunrealtype hmax); SUNDIALS_EXPORT int IDASetMinStep(void* ida_mem, sunrealtype hmin); SUNDIALS_EXPORT int IDASetStopTime(void* ida_mem, sunrealtype tstop); SUNDIALS_EXPORT int IDAClearStopTime(void* ida_mem); +SUNDIALS_EXPORT int IDASkipAdaptStopTime(void* ida_mem, + sunbooleantype skipadapttstop); SUNDIALS_EXPORT int IDASetMaxErrTestFails(void* ida_mem, int maxnef); SUNDIALS_EXPORT int IDASetSuppressAlg(void* ida_mem, sunbooleantype suppressalg); SUNDIALS_EXPORT int IDASetId(void* ida_mem, N_Vector id); diff --git a/src/ida/ida.c b/src/ida/ida.c index bed14c9140..83ad81ca9c 100644 --- a/src/ida/ida.c +++ b/src/ida/ida.c @@ -307,32 +307,34 @@ void* IDACreate(SUNContext sunctx) IDA_mem->ida_uround = SUN_UNIT_ROUNDOFF; /* Set default values for integrator optional inputs */ - IDA_mem->ida_res = NULL; - IDA_mem->ida_user_data = NULL; - IDA_mem->ida_itol = IDA_NN; - IDA_mem->ida_atolmin0 = SUNTRUE; - IDA_mem->ida_user_efun = SUNFALSE; - IDA_mem->ida_efun = NULL; - IDA_mem->ida_edata = NULL; - IDA_mem->ida_maxord = MAXORD_DEFAULT; - IDA_mem->ida_mxstep = MXSTEP_DEFAULT; - IDA_mem->ida_hmax_inv = HMAX_INV_DEFAULT; - IDA_mem->ida_hmin = HMIN_DEFAULT; - IDA_mem->ida_eta_max_fx = ETA_MAX_FX_DEFAULT; - IDA_mem->ida_eta_min_fx = ETA_MIN_FX_DEFAULT; - IDA_mem->ida_eta_max = ETA_MAX_DEFAULT; - IDA_mem->ida_eta_low = ETA_LOW_DEFAULT; - IDA_mem->ida_eta_min = ETA_MIN_DEFAULT; - IDA_mem->ida_eta_min_ef = ETA_MIN_EF_DEFAULT; - IDA_mem->ida_eta_cf = ETA_CF_DEFAULT; - IDA_mem->ida_hin = ZERO; - IDA_mem->ida_epcon = EPCON; - IDA_mem->ida_maxnef = MXNEF; - IDA_mem->ida_maxncf = MXNCF; - IDA_mem->ida_suppressalg = SUNFALSE; - IDA_mem->ida_id = NULL; - IDA_mem->ida_tstopset = SUNFALSE; - IDA_mem->ida_dcj = DCJ_DEFAULT; + IDA_mem->ida_res = NULL; + IDA_mem->ida_user_data = NULL; + IDA_mem->ida_itol = IDA_NN; + IDA_mem->ida_atolmin0 = SUNTRUE; + IDA_mem->ida_user_efun = SUNFALSE; + IDA_mem->ida_efun = NULL; + IDA_mem->ida_edata = NULL; + IDA_mem->ida_maxord = MAXORD_DEFAULT; + IDA_mem->ida_mxstep = MXSTEP_DEFAULT; + IDA_mem->ida_hmax_inv = HMAX_INV_DEFAULT; + IDA_mem->ida_hmin = HMIN_DEFAULT; + IDA_mem->ida_eta_max_fx = ETA_MAX_FX_DEFAULT; + IDA_mem->ida_eta_min_fx = ETA_MIN_FX_DEFAULT; + IDA_mem->ida_eta_max = ETA_MAX_DEFAULT; + IDA_mem->ida_eta_low = ETA_LOW_DEFAULT; + IDA_mem->ida_eta_min = ETA_MIN_DEFAULT; + IDA_mem->ida_eta_min_ef = ETA_MIN_EF_DEFAULT; + IDA_mem->ida_eta_cf = ETA_CF_DEFAULT; + IDA_mem->ida_hin = ZERO; + IDA_mem->ida_epcon = EPCON; + IDA_mem->ida_maxnef = MXNEF; + IDA_mem->ida_maxncf = MXNCF; + IDA_mem->ida_suppressalg = SUNFALSE; + IDA_mem->ida_id = NULL; + IDA_mem->ida_tstopset = SUNFALSE; + IDA_mem->ida_tstoplimited = SUNFALSE; + IDA_mem->ida_skipadapttstop = SUNFALSE; + IDA_mem->ida_dcj = DCJ_DEFAULT; /* Initialize inequality constraint variables */ IDA_mem->ida_constraints = NULL; @@ -1204,6 +1206,7 @@ int IDASolve(void* ida_mem, sunrealtype tout, sunrealtype* tret, N_Vector yret, /* Check for approach to tstop */ + IDA_mem->ida_tstoplimited = SUNFALSE; if (IDA_mem->ida_tstopset) { if ((IDA_mem->ida_tstop - IDA_mem->ida_tn) * IDA_mem->ida_hh <= ZERO) @@ -1217,6 +1220,12 @@ int IDASolve(void* ida_mem, sunrealtype tout, sunrealtype* tret, N_Vector yret, IDA_mem->ida_hh > ZERO) { + if (IDA_mem->ida_skipadapttstop) + { + IDA_mem->ida_tstoplimited = SUNTRUE; + IDA_mem->ida_hsave = IDA_mem->ida_hh; + IDA_mem->ida_ksave = IDA_mem->ida_kk; + } IDA_mem->ida_hh = (IDA_mem->ida_tstop - IDA_mem->ida_tn) * (ONE - FOUR * IDA_mem->ida_uround); } @@ -2182,6 +2191,7 @@ static int IDAStopTest1(IDAMem IDA_mem, sunrealtype tout, sunrealtype* tret, int ier; sunrealtype troundoff; + IDA_mem->ida_tstoplimited = SUNFALSE; if (IDA_mem->ida_tstopset) { /* Test for tn past tstop */ @@ -2219,6 +2229,12 @@ static int IDAStopTest1(IDAMem IDA_mem, sunrealtype tout, sunrealtype* tret, IDA_mem->ida_hh > ZERO) { + if (IDA_mem->ida_skipadapttstop) + { + IDA_mem->ida_tstoplimited = SUNTRUE; + IDA_mem->ida_hsave = IDA_mem->ida_hh; + IDA_mem->ida_ksave = IDA_mem->ida_kk; + } IDA_mem->ida_hh = (IDA_mem->ida_tstop - IDA_mem->ida_tn) * (ONE - FOUR * IDA_mem->ida_uround); } @@ -2292,6 +2308,7 @@ static int IDAStopTest2(IDAMem IDA_mem, sunrealtype tout, sunrealtype* tret, /* int ier; */ sunrealtype troundoff; + IDA_mem->ida_tstoplimited = SUNFALSE; if (IDA_mem->ida_tstopset) { troundoff = HUNDRED * IDA_mem->ida_uround * @@ -2315,6 +2332,12 @@ static int IDAStopTest2(IDAMem IDA_mem, sunrealtype tout, sunrealtype* tret, IDA_mem->ida_hh > ZERO) { + if (IDA_mem->ida_skipadapttstop) + { + IDA_mem->ida_tstoplimited = SUNTRUE; + IDA_mem->ida_hsave = IDA_mem->ida_hh; + IDA_mem->ida_ksave = IDA_mem->ida_kk; + } IDA_mem->ida_hh = (IDA_mem->ida_tstop - IDA_mem->ida_tn) * (ONE - FOUR * IDA_mem->ida_uround); } @@ -3270,7 +3293,11 @@ static void IDACompleteStep(IDAMem IDA_mem, sunrealtype err_k, sunrealtype err_k stepsize and order are set by the usual local error algorithm. Note that, after the first step, the order is not increased, as not all - of the necessary information is available yet. */ + of the necessary information is available yet. + + Also, if the current step size was reduced due to reaching a requested stop + time, reset the next step order to equal the order before the stop-time-reduced + step. */ if (IDA_mem->ida_phase == 0) { @@ -3288,7 +3315,12 @@ static void IDACompleteStep(IDAMem IDA_mem, sunrealtype err_k, sunrealtype err_k /* Set action = LOWER/MAINTAIN/RAISE to specify order decision */ - if (IDA_mem->ida_knew == IDA_mem->ida_kk - 1) + if (IDA_mem->ida_skipadapttstop && IDA_mem->ida_tstoplimited) + { + /* Returning order to the value used prior to the stop-time-reduced step. */ + action = MAINTAIN; + } + else if (IDA_mem->ida_knew == IDA_mem->ida_kk - 1) { /* Already decided to reduce the order */ action = LOWER; @@ -3355,6 +3387,9 @@ static void IDACompleteStep(IDAMem IDA_mem, sunrealtype err_k, sunrealtype err_k else { err_knew = err_k; } /* Compute tmp = tentative ratio hnew/hh from error norm estimate. + 0. If the current step size was reduced due to reaching a requested + stop time, set eta to return the step size to the size just preceding + the stop-time-reduced step. 1. If eta >= eta_max_fx (default = 2), increase hh to at most eta_max (default = 2) i.e., double the step size 2. If eta <= eta_min_fx (default = 1), reduce hh to between eta_min @@ -3364,7 +3399,12 @@ static void IDACompleteStep(IDAMem IDA_mem, sunrealtype err_k, sunrealtype err_k IDA_mem->ida_eta = ONE; tmp = SUNRpowerR(TWO * err_knew + PT0001, -ONE / (IDA_mem->ida_kk + 1)); - if (tmp >= IDA_mem->ida_eta_max_fx) + if (IDA_mem->ida_skipadapttstop && IDA_mem->ida_tstoplimited) + { + /* Returning step size to the value used prior to the stop-time-reduced step. */ + IDA_mem->ida_eta = IDA_mem->ida_hsave / IDA_mem->ida_hh; + } + else if (tmp >= IDA_mem->ida_eta_max_fx) { /* Enforce max growth factor bound and max step size */ IDA_mem->ida_eta = SUNMIN(tmp, IDA_mem->ida_eta_max); diff --git a/src/ida/ida_cli.c b/src/ida/ida_cli.c index 06f4b8a74f..5603721248 100644 --- a/src/ida/ida_cli.c +++ b/src/ida/ida_cli.c @@ -84,7 +84,8 @@ static int idaSetFromCommandLine(void* ida_mem, const char* idaid, int argc, {"max_conv_fails", IDASetMaxConvFails}, {"max_nonlin_iters", IDASetMaxNonlinIters}, {"linear_solution_scaling", IDASetLinearSolutionScaling}, - {"max_num_constraint_fails", IDASetMaxNumConstraintFails}}; + {"max_num_constraint_fails", IDASetMaxNumConstraintFails}, + {"skip_adapt_stop_time", IDASkipAdaptStopTime}}; static const int num_int_keys = sizeof(int_pairs) / sizeof(*int_pairs); static const struct sunKeyLongPair long_pairs[] = { diff --git a/src/ida/ida_impl.h b/src/ida/ida_impl.h index 3215f345ad..07426fb2dd 100644 --- a/src/ida/ida_impl.h +++ b/src/ida/ida_impl.h @@ -171,6 +171,10 @@ typedef struct IDAMemRec /* Tstop information */ sunbooleantype ida_tstopset; + sunbooleantype ida_tstoplimited; + sunbooleantype ida_skipadapttstop; + int ida_ksave; + sunrealtype ida_hsave; sunrealtype ida_tstop; /* Step Data */ diff --git a/src/ida/ida_io.c b/src/ida/ida_io.c index 4c8f357365..6f40a10358 100644 --- a/src/ida/ida_io.c +++ b/src/ida/ida_io.c @@ -413,6 +413,23 @@ int IDAClearStopTime(void* ida_mem) /*-----------------------------------------------------------------*/ +int IDASkipAdaptStopTime(void* ida_mem, sunbooleantype skip) +{ + IDAMem IDA_mem; + + if (ida_mem == NULL) + { + IDAProcessError(NULL, IDA_MEM_NULL, __LINE__, __func__, __FILE__, MSG_NO_MEM); + return (IDA_MEM_NULL); + } + IDA_mem = (IDAMem)ida_mem; + IDA_mem->ida_skipadapttstop = skip; + + return (IDA_SUCCESS); +} + +/*-----------------------------------------------------------------*/ + int IDASetNonlinConvCoef(void* ida_mem, sunrealtype epcon) { IDAMem IDA_mem; From b2dd3aa169b9103d4a55a7b3f80f4048ebbf69a9 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 16 Apr 2026 16:22:36 -0400 Subject: [PATCH 276/298] Added IDASkipAdaptStopTime to IDAS --- CHANGELOG.md | 5 +- doc/idas/guide/source/Usage/SIM.rst | 24 +++++++ doc/shared/RecentChanges.rst | 5 +- include/idas/idas.h | 2 + src/idas/idas.c | 98 ++++++++++++++++++++--------- src/idas/idas_cli.c | 3 +- src/idas/idas_impl.h | 4 ++ src/idas/idas_io.c | 17 +++++ 8 files changed, 126 insertions(+), 32 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35ea0cc2e5..c19634c293 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,10 @@ Updated `examples/cvode/petsc/cv_petsc_ex7.c` to support PETSc 3.25.0. Added the function `ARKodeSkipAdaptStopTime` to specify that stop-time-limited steps should be disregarded when selecting step sizes -for time step adaptivity. +for time step adaptivity. Added the functions `CVodeSkipAdaptStopTime` +and `IDASkipAdaptStopTime` to specify that stop-time-limited steps should +be disregarded when adapting the step size and method order for CVODE(S) +and IDA(S), respectively. ### Bug Fixes diff --git a/doc/idas/guide/source/Usage/SIM.rst b/doc/idas/guide/source/Usage/SIM.rst index 1630210b12..1fbb8f898c 100644 --- a/doc/idas/guide/source/Usage/SIM.rst +++ b/doc/idas/guide/source/Usage/SIM.rst @@ -936,6 +936,8 @@ Main solver optional input functions +--------------------------------------------------------------------+---------------------------------------+----------------+ | Disable the stop time | :c:func:`IDAClearStopTime` | N/A | +--------------------------------------------------------------------+---------------------------------------+----------------+ + | Disregard stop time limited steps in adaptivity | :c:func:`IDASkipAdaptStopTime` | ``SUNFALSE`` | + +--------------------------------------------------------------------+---------------------------------------+----------------+ | Maximum no. of error test failures | :c:func:`IDASetMaxErrTestFails` | 10 | +--------------------------------------------------------------------+---------------------------------------+----------------+ | Suppress alg. vars. from error test | :c:func:`IDASetSuppressAlg` | ``SUNFALSE`` | @@ -1194,6 +1196,28 @@ Main solver optional input functions .. versionadded:: 6.5.1 +.. c:function:: int IDASkipAdaptStopTime(void* ida_mem, sunbooleantype skip) + + Specifies whether stop-time-limited steps should be disregarded + when adapting step sizes and method order. + + **Arguments:** + * ``ida_mem`` -- pointer to the IDA memory block. + * ``skip`` -- flag indicating to disregard (1) or retain (0) stop time limited steps from the temporal adaptivity algorithm. + + **Return value:** + * ``IDA_SUCCESS`` if successful + * ``IDA_MEM_NULL`` if the IDA memory is ``NULL`` + + **Notes:** + The default behavior is to use all successful time steps + (including stop-time-limited steps) when performing adaptivity. + + This routine will be called by :c:func:`IDASetOptions` + when using the key "idaid.skip_adapt_stop_time". + + .. versionadded:: x.y.z + .. c:function:: int IDASetMaxErrTestFails(void * ida_mem, int maxnef) The function :c:func:`IDASetMaxErrTestFails` specifies the maximum number of error diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index d9fe9551fc..b9069e3490 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -9,7 +9,10 @@ Updated ``examples/cvode/petsc/cv_petsc_ex7.c`` to support PETSc 3.25.0. Added the function :c:func:`ARKodeSkipAdaptStopTime` to specify that stop-time-limited steps should be disregarded when selecting step sizes -for time step adaptivity. +for time step adaptivity. Added the functions +:c:func:`CVodeSkipAdaptStopTime` and :c:func:`IDASkipAdaptStopTime` +to specify that stop-time-limited steps should be disregarded when +adapting the step size and method order for CVODE(S) and IDA(S), respectively. **Bug Fixes** diff --git a/include/idas/idas.h b/include/idas/idas.h index 310777d624..7768465550 100644 --- a/include/idas/idas.h +++ b/include/idas/idas.h @@ -210,6 +210,8 @@ SUNDIALS_EXPORT int IDASetMaxStep(void* ida_mem, sunrealtype hmax); SUNDIALS_EXPORT int IDASetMinStep(void* ida_mem, sunrealtype hmin); SUNDIALS_EXPORT int IDASetStopTime(void* ida_mem, sunrealtype tstop); SUNDIALS_EXPORT int IDAClearStopTime(void* ida_mem); +SUNDIALS_EXPORT int IDASkipAdaptStopTime(void* ida_mem, + sunbooleantype skipadapttstop); SUNDIALS_EXPORT int IDASetMaxErrTestFails(void* ida_mem, int maxnef); SUNDIALS_EXPORT int IDASetSuppressAlg(void* ida_mem, sunbooleantype suppressalg); SUNDIALS_EXPORT int IDASetId(void* ida_mem, N_Vector id); diff --git a/src/idas/idas.c b/src/idas/idas.c index 429262f3e9..b259aba9c1 100644 --- a/src/idas/idas.c +++ b/src/idas/idas.c @@ -437,32 +437,34 @@ void* IDACreate(SUNContext sunctx) IDA_mem->ida_uround = SUN_UNIT_ROUNDOFF; /* Set default values for integrator optional inputs */ - IDA_mem->ida_res = NULL; - IDA_mem->ida_user_data = NULL; - IDA_mem->ida_itol = IDA_NN; - IDA_mem->ida_atolmin0 = SUNTRUE; - IDA_mem->ida_user_efun = SUNFALSE; - IDA_mem->ida_efun = NULL; - IDA_mem->ida_edata = NULL; - IDA_mem->ida_maxord = MAXORD_DEFAULT; - IDA_mem->ida_mxstep = MXSTEP_DEFAULT; - IDA_mem->ida_hmax_inv = HMAX_INV_DEFAULT; - IDA_mem->ida_hmin = HMIN_DEFAULT; - IDA_mem->ida_eta_max_fx = ETA_MAX_FX_DEFAULT; - IDA_mem->ida_eta_min_fx = ETA_MIN_FX_DEFAULT; - IDA_mem->ida_eta_max = ETA_MAX_DEFAULT; - IDA_mem->ida_eta_low = ETA_LOW_DEFAULT; - IDA_mem->ida_eta_min = ETA_MIN_DEFAULT; - IDA_mem->ida_eta_min_ef = ETA_MIN_EF_DEFAULT; - IDA_mem->ida_eta_cf = ETA_CF_DEFAULT; - IDA_mem->ida_hin = ZERO; - IDA_mem->ida_epcon = EPCON; - IDA_mem->ida_maxnef = MXNEF; - IDA_mem->ida_maxncf = MXNCF; - IDA_mem->ida_suppressalg = SUNFALSE; - IDA_mem->ida_id = NULL; - IDA_mem->ida_tstopset = SUNFALSE; - IDA_mem->ida_dcj = DCJ_DEFAULT; + IDA_mem->ida_res = NULL; + IDA_mem->ida_user_data = NULL; + IDA_mem->ida_itol = IDA_NN; + IDA_mem->ida_atolmin0 = SUNTRUE; + IDA_mem->ida_user_efun = SUNFALSE; + IDA_mem->ida_efun = NULL; + IDA_mem->ida_edata = NULL; + IDA_mem->ida_maxord = MAXORD_DEFAULT; + IDA_mem->ida_mxstep = MXSTEP_DEFAULT; + IDA_mem->ida_hmax_inv = HMAX_INV_DEFAULT; + IDA_mem->ida_hmin = HMIN_DEFAULT; + IDA_mem->ida_eta_max_fx = ETA_MAX_FX_DEFAULT; + IDA_mem->ida_eta_min_fx = ETA_MIN_FX_DEFAULT; + IDA_mem->ida_eta_max = ETA_MAX_DEFAULT; + IDA_mem->ida_eta_low = ETA_LOW_DEFAULT; + IDA_mem->ida_eta_min = ETA_MIN_DEFAULT; + IDA_mem->ida_eta_min_ef = ETA_MIN_EF_DEFAULT; + IDA_mem->ida_eta_cf = ETA_CF_DEFAULT; + IDA_mem->ida_hin = ZERO; + IDA_mem->ida_epcon = EPCON; + IDA_mem->ida_maxnef = MXNEF; + IDA_mem->ida_maxncf = MXNCF; + IDA_mem->ida_suppressalg = SUNFALSE; + IDA_mem->ida_id = NULL; + IDA_mem->ida_tstopset = SUNFALSE; + IDA_mem->ida_tstoplimited = SUNFALSE; + IDA_mem->ida_skipadapttstop = SUNFALSE; + IDA_mem->ida_dcj = DCJ_DEFAULT; /* Initialize inequality constraint variables */ IDA_mem->ida_constraints = NULL; @@ -2692,6 +2694,7 @@ int IDASolve(void* ida_mem, sunrealtype tout, sunrealtype* tret, N_Vector yret, /* Check for approach to tstop */ + IDA_mem->ida_tstoplimited = SUNFALSE; if (IDA_mem->ida_tstopset) { if ((IDA_mem->ida_tstop - IDA_mem->ida_tn) * IDA_mem->ida_hh <= ZERO) @@ -2705,6 +2708,12 @@ int IDASolve(void* ida_mem, sunrealtype tout, sunrealtype* tret, N_Vector yret, IDA_mem->ida_hh > ZERO) { + if (IDA_mem->ida_skipadapttstop) + { + IDA_mem->ida_tstoplimited = SUNTRUE; + IDA_mem->ida_hsave = IDA_mem->ida_hh; + IDA_mem->ida_ksave = IDA_mem->ida_kk; + } IDA_mem->ida_hh = (IDA_mem->ida_tstop - IDA_mem->ida_tn) * (ONE - FOUR * IDA_mem->ida_uround); } @@ -5557,6 +5566,7 @@ static int IDAStopTest1(IDAMem IDA_mem, sunrealtype tout, sunrealtype* tret, int ier; sunrealtype troundoff; + IDA_mem->ida_tstoplimited = SUNFALSE; if (IDA_mem->ida_tstopset) { /* Test for tn past tstop */ @@ -5594,6 +5604,12 @@ static int IDAStopTest1(IDAMem IDA_mem, sunrealtype tout, sunrealtype* tret, IDA_mem->ida_hh > ZERO) { + if (IDA_mem->ida_skipadapttstop) + { + IDA_mem->ida_tstoplimited = SUNTRUE; + IDA_mem->ida_hsave = IDA_mem->ida_hh; + IDA_mem->ida_ksave = IDA_mem->ida_kk; + } IDA_mem->ida_hh = (IDA_mem->ida_tstop - IDA_mem->ida_tn) * (ONE - FOUR * IDA_mem->ida_uround); } @@ -5667,6 +5683,7 @@ static int IDAStopTest2(IDAMem IDA_mem, sunrealtype tout, sunrealtype* tret, /* int ier; */ sunrealtype troundoff; + IDA_mem->ida_tstoplimited = SUNFALSE; if (IDA_mem->ida_tstopset) { troundoff = HUNDRED * IDA_mem->ida_uround * @@ -5690,6 +5707,12 @@ static int IDAStopTest2(IDAMem IDA_mem, sunrealtype tout, sunrealtype* tret, IDA_mem->ida_hh > ZERO) { + if (IDA_mem->ida_skipadapttstop) + { + IDA_mem->ida_tstoplimited = SUNTRUE; + IDA_mem->ida_hsave = IDA_mem->ida_hh; + IDA_mem->ida_ksave = IDA_mem->ida_kk; + } IDA_mem->ida_hh = (IDA_mem->ida_tstop - IDA_mem->ida_tn) * (ONE - FOUR * IDA_mem->ida_uround); } @@ -7499,7 +7522,11 @@ static void IDACompleteStep(IDAMem IDA_mem, sunrealtype err_k, sunrealtype err_k stepsize and order are set by the usual local error algorithm. Note that, after the first step, the order is not increased, as not all - of the necessary information is available yet. */ + of the necessary information is available yet. + + Also, if the current step size was reduced due to reaching a requested stop + time, reset the next step order to equal the order before the stop-time-reduced + step. */ if (IDA_mem->ida_phase == 0) { @@ -7517,7 +7544,12 @@ static void IDACompleteStep(IDAMem IDA_mem, sunrealtype err_k, sunrealtype err_k /* Set action = LOWER/MAINTAIN/RAISE to specify order decision */ - if (IDA_mem->ida_knew == IDA_mem->ida_kk - 1) + if (IDA_mem->ida_skipadapttstop && IDA_mem->ida_tstoplimited) + { + /* Returning order to the value used prior to the stop-time-reduced step. */ + action = MAINTAIN; + } + else if (IDA_mem->ida_knew == IDA_mem->ida_kk - 1) { /* Already decided to reduce the order */ action = LOWER; @@ -7617,6 +7649,9 @@ static void IDACompleteStep(IDAMem IDA_mem, sunrealtype err_k, sunrealtype err_k else { err_knew = err_k; } /* Compute tmp = tentative ratio hnew/hh from error norm estimate. + 0. If the current step size was reduced due to reaching a requested + stop time, set eta to return the step size to the size just preceding + the stop-time-reduced step. 1. If eta >= eta_max_fx (default = 2), increase hh to at most eta_max (default = 2) i.e., double the step size 2. If eta <= eta_min_fx (default = 1), reduce hh to between eta_min @@ -7626,7 +7661,12 @@ static void IDACompleteStep(IDAMem IDA_mem, sunrealtype err_k, sunrealtype err_k IDA_mem->ida_eta = ONE; tmp = SUNRpowerR(TWO * err_knew + PT0001, -ONE / (IDA_mem->ida_kk + 1)); - if (tmp >= IDA_mem->ida_eta_max_fx) + if (IDA_mem->ida_skipadapttstop && IDA_mem->ida_tstoplimited) + { + /* Returning step size to the value used prior to the stop-time-reduced step. */ + IDA_mem->ida_eta = IDA_mem->ida_hsave / IDA_mem->ida_hh; + } + else if (tmp >= IDA_mem->ida_eta_max_fx) { /* Enforce max growth factor bound and max step size */ IDA_mem->ida_eta = SUNMIN(tmp, IDA_mem->ida_eta_max); diff --git a/src/idas/idas_cli.c b/src/idas/idas_cli.c index ddee644944..48ac5f41a9 100644 --- a/src/idas/idas_cli.c +++ b/src/idas/idas_cli.c @@ -88,7 +88,8 @@ static int idaSetFromCommandLine(void* ida_mem, const char* idaid, int argc, {"sens_max_nonlin_iters", IDASetSensMaxNonlinIters}, {"quad_sens_err_con", IDASetQuadSensErrCon}, {"linear_solution_scaling", IDASetLinearSolutionScaling}, - {"max_num_constraint_fails", IDASetMaxNumConstraintFails}}; + {"max_num_constraint_fails", IDASetMaxNumConstraintFails}, + {"skip_adapt_stop_time", IDASkipAdaptStopTime}}; static const int num_int_keys = sizeof(int_pairs) / sizeof(*int_pairs); static const struct sunKeyLongPair long_pairs[] = { diff --git a/src/idas/idas_impl.h b/src/idas/idas_impl.h index 2853c5cb02..d12290e79a 100644 --- a/src/idas/idas_impl.h +++ b/src/idas/idas_impl.h @@ -295,6 +295,10 @@ typedef struct IDAMemRec /* Tstop information */ sunbooleantype ida_tstopset; + sunbooleantype ida_tstoplimited; + sunbooleantype ida_skipadapttstop; + int ida_ksave; + sunrealtype ida_hsave; sunrealtype ida_tstop; /* Step Data */ diff --git a/src/idas/idas_io.c b/src/idas/idas_io.c index dce0a076f0..5b2981dd42 100644 --- a/src/idas/idas_io.c +++ b/src/idas/idas_io.c @@ -412,6 +412,23 @@ int IDAClearStopTime(void* ida_mem) /*-----------------------------------------------------------------*/ +int IDASkipAdaptStopTime(void* ida_mem, sunbooleantype skip) +{ + IDAMem IDA_mem; + + if (ida_mem == NULL) + { + IDAProcessError(NULL, IDA_MEM_NULL, __LINE__, __func__, __FILE__, MSG_NO_MEM); + return (IDA_MEM_NULL); + } + IDA_mem = (IDAMem)ida_mem; + IDA_mem->ida_skipadapttstop = skip; + + return (IDA_SUCCESS); +} + +/*-----------------------------------------------------------------*/ + int IDASetNonlinConvCoef(void* ida_mem, sunrealtype epcon) { IDAMem IDA_mem; From 1de734b0228892aa7ebcfbdbc298655ab24e246e Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 16 Apr 2026 21:57:02 -0400 Subject: [PATCH 277/298] Swig --- src/arkode/fmod_int32/farkode_mod.c | 14 ++++++++++++++ src/arkode/fmod_int32/farkode_mod.f90 | 26 ++++++++++++++++++++++++++ src/arkode/fmod_int64/farkode_mod.c | 14 ++++++++++++++ src/arkode/fmod_int64/farkode_mod.f90 | 26 ++++++++++++++++++++++++++ src/cvode/fmod_int32/fcvode_mod.c | 14 ++++++++++++++ src/cvode/fmod_int32/fcvode_mod.f90 | 26 ++++++++++++++++++++++++++ src/cvode/fmod_int64/fcvode_mod.c | 14 ++++++++++++++ src/cvode/fmod_int64/fcvode_mod.f90 | 26 ++++++++++++++++++++++++++ src/cvodes/fmod_int32/fcvodes_mod.c | 14 ++++++++++++++ src/cvodes/fmod_int32/fcvodes_mod.f90 | 26 ++++++++++++++++++++++++++ src/cvodes/fmod_int64/fcvodes_mod.c | 14 ++++++++++++++ src/cvodes/fmod_int64/fcvodes_mod.f90 | 26 ++++++++++++++++++++++++++ src/ida/fmod_int32/fida_mod.c | 14 ++++++++++++++ src/ida/fmod_int32/fida_mod.f90 | 26 ++++++++++++++++++++++++++ src/ida/fmod_int64/fida_mod.c | 14 ++++++++++++++ src/ida/fmod_int64/fida_mod.f90 | 26 ++++++++++++++++++++++++++ src/idas/fmod_int32/fidas_mod.c | 14 ++++++++++++++ src/idas/fmod_int32/fidas_mod.f90 | 26 ++++++++++++++++++++++++++ src/idas/fmod_int64/fidas_mod.c | 14 ++++++++++++++ src/idas/fmod_int64/fidas_mod.f90 | 26 ++++++++++++++++++++++++++ 20 files changed, 400 insertions(+) diff --git a/src/arkode/fmod_int32/farkode_mod.c b/src/arkode/fmod_int32/farkode_mod.c index 16c35a0e87..916426739f 100644 --- a/src/arkode/fmod_int32/farkode_mod.c +++ b/src/arkode/fmod_int32/farkode_mod.c @@ -620,6 +620,20 @@ SWIGEXPORT int _wrap_FARKodeClearStopTime(void *farg1) { } +SWIGEXPORT int _wrap_FARKodeSkipAdaptStopTime(void *farg1, int const *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + int arg2 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (int)(*farg2); + result = (int)ARKodeSkipAdaptStopTime(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + SWIGEXPORT int _wrap_FARKodeSetFixedStep(void *farg1, double const *farg2) { int fresult ; void *arg1 = (void *) 0 ; diff --git a/src/arkode/fmod_int32/farkode_mod.f90 b/src/arkode/fmod_int32/farkode_mod.f90 index 6869accd7a..462eeb08f5 100644 --- a/src/arkode/fmod_int32/farkode_mod.f90 +++ b/src/arkode/fmod_int32/farkode_mod.f90 @@ -147,6 +147,7 @@ module farkode_mod public :: FARKodeSetInterpolateStopTime public :: FARKodeSetStopTime public :: FARKodeClearStopTime + public :: FARKodeSkipAdaptStopTime public :: FARKodeSetFixedStep public :: FARKodeSetStepDirection public :: FARKodeSetUserData @@ -697,6 +698,15 @@ function swigc_FARKodeClearStopTime(farg1) & integer(C_INT) :: fresult end function +function swigc_FARKodeSkipAdaptStopTime(farg1, farg2) & +bind(C, name="_wrap_FARKodeSkipAdaptStopTime") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +integer(C_INT), intent(in) :: farg2 +integer(C_INT) :: fresult +end function + function swigc_FARKodeSetFixedStep(farg1, farg2) & bind(C, name="_wrap_FARKodeSetFixedStep") & result(fresult) @@ -2935,6 +2945,22 @@ function FARKodeClearStopTime(arkode_mem) & swig_result = fresult end function +function FARKodeSkipAdaptStopTime(arkode_mem, skipadapttstop) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +integer(C_INT), intent(in) :: skipadapttstop +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +integer(C_INT) :: farg2 + +farg1 = arkode_mem +farg2 = skipadapttstop +fresult = swigc_FARKodeSkipAdaptStopTime(farg1, farg2) +swig_result = fresult +end function + function FARKodeSetFixedStep(arkode_mem, hfixed) & result(swig_result) use, intrinsic :: ISO_C_BINDING diff --git a/src/arkode/fmod_int64/farkode_mod.c b/src/arkode/fmod_int64/farkode_mod.c index 904917178c..9e1bb6e0dc 100644 --- a/src/arkode/fmod_int64/farkode_mod.c +++ b/src/arkode/fmod_int64/farkode_mod.c @@ -620,6 +620,20 @@ SWIGEXPORT int _wrap_FARKodeClearStopTime(void *farg1) { } +SWIGEXPORT int _wrap_FARKodeSkipAdaptStopTime(void *farg1, int const *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + int arg2 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (int)(*farg2); + result = (int)ARKodeSkipAdaptStopTime(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + SWIGEXPORT int _wrap_FARKodeSetFixedStep(void *farg1, double const *farg2) { int fresult ; void *arg1 = (void *) 0 ; diff --git a/src/arkode/fmod_int64/farkode_mod.f90 b/src/arkode/fmod_int64/farkode_mod.f90 index 0eb2e94994..1dc2368461 100644 --- a/src/arkode/fmod_int64/farkode_mod.f90 +++ b/src/arkode/fmod_int64/farkode_mod.f90 @@ -147,6 +147,7 @@ module farkode_mod public :: FARKodeSetInterpolateStopTime public :: FARKodeSetStopTime public :: FARKodeClearStopTime + public :: FARKodeSkipAdaptStopTime public :: FARKodeSetFixedStep public :: FARKodeSetStepDirection public :: FARKodeSetUserData @@ -697,6 +698,15 @@ function swigc_FARKodeClearStopTime(farg1) & integer(C_INT) :: fresult end function +function swigc_FARKodeSkipAdaptStopTime(farg1, farg2) & +bind(C, name="_wrap_FARKodeSkipAdaptStopTime") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +integer(C_INT), intent(in) :: farg2 +integer(C_INT) :: fresult +end function + function swigc_FARKodeSetFixedStep(farg1, farg2) & bind(C, name="_wrap_FARKodeSetFixedStep") & result(fresult) @@ -2935,6 +2945,22 @@ function FARKodeClearStopTime(arkode_mem) & swig_result = fresult end function +function FARKodeSkipAdaptStopTime(arkode_mem, skipadapttstop) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: arkode_mem +integer(C_INT), intent(in) :: skipadapttstop +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +integer(C_INT) :: farg2 + +farg1 = arkode_mem +farg2 = skipadapttstop +fresult = swigc_FARKodeSkipAdaptStopTime(farg1, farg2) +swig_result = fresult +end function + function FARKodeSetFixedStep(arkode_mem, hfixed) & result(swig_result) use, intrinsic :: ISO_C_BINDING diff --git a/src/cvode/fmod_int32/fcvode_mod.c b/src/cvode/fmod_int32/fcvode_mod.c index 572c165c62..91ab09e508 100644 --- a/src/cvode/fmod_int32/fcvode_mod.c +++ b/src/cvode/fmod_int32/fcvode_mod.c @@ -663,6 +663,20 @@ SWIGEXPORT int _wrap_FCVodeClearStopTime(void *farg1) { } +SWIGEXPORT int _wrap_FCVodeSkipAdaptStopTime(void *farg1, int const *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + int arg2 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (int)(*farg2); + result = (int)CVodeSkipAdaptStopTime(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + SWIGEXPORT int _wrap_FCVodeSetUseIntegratorFusedKernels(void *farg1, int const *farg2) { int fresult ; void *arg1 = (void *) 0 ; diff --git a/src/cvode/fmod_int32/fcvode_mod.f90 b/src/cvode/fmod_int32/fcvode_mod.f90 index fd03a4021d..36574792a5 100644 --- a/src/cvode/fmod_int32/fcvode_mod.f90 +++ b/src/cvode/fmod_int32/fcvode_mod.f90 @@ -95,6 +95,7 @@ module fcvode_mod public :: FCVodeSetStopTime public :: FCVodeSetInterpolateStopTime public :: FCVodeClearStopTime + public :: FCVodeSkipAdaptStopTime public :: FCVodeSetUseIntegratorFusedKernels public :: FCVodeSetUserData public :: FCVodeSetEtaFixedStepBounds @@ -484,6 +485,15 @@ function swigc_FCVodeClearStopTime(farg1) & integer(C_INT) :: fresult end function +function swigc_FCVodeSkipAdaptStopTime(farg1, farg2) & +bind(C, name="_wrap_FCVodeSkipAdaptStopTime") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +integer(C_INT), intent(in) :: farg2 +integer(C_INT) :: fresult +end function + function swigc_FCVodeSetUseIntegratorFusedKernels(farg1, farg2) & bind(C, name="_wrap_FCVodeSetUseIntegratorFusedKernels") & result(fresult) @@ -1884,6 +1894,22 @@ function FCVodeClearStopTime(cvode_mem) & swig_result = fresult end function +function FCVodeSkipAdaptStopTime(cvode_mem, skipadapttstop) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: cvode_mem +integer(C_INT), intent(in) :: skipadapttstop +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +integer(C_INT) :: farg2 + +farg1 = cvode_mem +farg2 = skipadapttstop +fresult = swigc_FCVodeSkipAdaptStopTime(farg1, farg2) +swig_result = fresult +end function + function FCVodeSetUseIntegratorFusedKernels(cvode_mem, onoff) & result(swig_result) use, intrinsic :: ISO_C_BINDING diff --git a/src/cvode/fmod_int64/fcvode_mod.c b/src/cvode/fmod_int64/fcvode_mod.c index 790f1aa937..c3d54c7f7f 100644 --- a/src/cvode/fmod_int64/fcvode_mod.c +++ b/src/cvode/fmod_int64/fcvode_mod.c @@ -663,6 +663,20 @@ SWIGEXPORT int _wrap_FCVodeClearStopTime(void *farg1) { } +SWIGEXPORT int _wrap_FCVodeSkipAdaptStopTime(void *farg1, int const *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + int arg2 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (int)(*farg2); + result = (int)CVodeSkipAdaptStopTime(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + SWIGEXPORT int _wrap_FCVodeSetUseIntegratorFusedKernels(void *farg1, int const *farg2) { int fresult ; void *arg1 = (void *) 0 ; diff --git a/src/cvode/fmod_int64/fcvode_mod.f90 b/src/cvode/fmod_int64/fcvode_mod.f90 index e9cc5a6e03..55d34e7147 100644 --- a/src/cvode/fmod_int64/fcvode_mod.f90 +++ b/src/cvode/fmod_int64/fcvode_mod.f90 @@ -95,6 +95,7 @@ module fcvode_mod public :: FCVodeSetStopTime public :: FCVodeSetInterpolateStopTime public :: FCVodeClearStopTime + public :: FCVodeSkipAdaptStopTime public :: FCVodeSetUseIntegratorFusedKernels public :: FCVodeSetUserData public :: FCVodeSetEtaFixedStepBounds @@ -484,6 +485,15 @@ function swigc_FCVodeClearStopTime(farg1) & integer(C_INT) :: fresult end function +function swigc_FCVodeSkipAdaptStopTime(farg1, farg2) & +bind(C, name="_wrap_FCVodeSkipAdaptStopTime") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +integer(C_INT), intent(in) :: farg2 +integer(C_INT) :: fresult +end function + function swigc_FCVodeSetUseIntegratorFusedKernels(farg1, farg2) & bind(C, name="_wrap_FCVodeSetUseIntegratorFusedKernels") & result(fresult) @@ -1884,6 +1894,22 @@ function FCVodeClearStopTime(cvode_mem) & swig_result = fresult end function +function FCVodeSkipAdaptStopTime(cvode_mem, skipadapttstop) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: cvode_mem +integer(C_INT), intent(in) :: skipadapttstop +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +integer(C_INT) :: farg2 + +farg1 = cvode_mem +farg2 = skipadapttstop +fresult = swigc_FCVodeSkipAdaptStopTime(farg1, farg2) +swig_result = fresult +end function + function FCVodeSetUseIntegratorFusedKernels(cvode_mem, onoff) & result(swig_result) use, intrinsic :: ISO_C_BINDING diff --git a/src/cvodes/fmod_int32/fcvodes_mod.c b/src/cvodes/fmod_int32/fcvodes_mod.c index 0974c4ebeb..60ed1a1043 100644 --- a/src/cvodes/fmod_int32/fcvodes_mod.c +++ b/src/cvodes/fmod_int32/fcvodes_mod.c @@ -737,6 +737,20 @@ SWIGEXPORT int _wrap_FCVodeClearStopTime(void *farg1) { } +SWIGEXPORT int _wrap_FCVodeSkipAdaptStopTime(void *farg1, int const *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + int arg2 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (int)(*farg2); + result = (int)CVodeSkipAdaptStopTime(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + SWIGEXPORT int _wrap_FCVodeSetUserData(void *farg1, void *farg2) { int fresult ; void *arg1 = (void *) 0 ; diff --git a/src/cvodes/fmod_int32/fcvodes_mod.f90 b/src/cvodes/fmod_int32/fcvodes_mod.f90 index 90e4ff52a7..d0c4f96b78 100644 --- a/src/cvodes/fmod_int32/fcvodes_mod.f90 +++ b/src/cvodes/fmod_int32/fcvodes_mod.f90 @@ -126,6 +126,7 @@ module fcvodes_mod public :: FCVodeSetStopTime public :: FCVodeSetInterpolateStopTime public :: FCVodeClearStopTime + public :: FCVodeSkipAdaptStopTime public :: FCVodeSetUserData public :: FCVodeSetEtaFixedStepBounds public :: FCVodeSetEtaMaxFirstStep @@ -660,6 +661,15 @@ function swigc_FCVodeClearStopTime(farg1) & integer(C_INT) :: fresult end function +function swigc_FCVodeSkipAdaptStopTime(farg1, farg2) & +bind(C, name="_wrap_FCVodeSkipAdaptStopTime") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +integer(C_INT), intent(in) :: farg2 +integer(C_INT) :: fresult +end function + function swigc_FCVodeSetUserData(farg1, farg2) & bind(C, name="_wrap_FCVodeSetUserData") & result(fresult) @@ -3302,6 +3312,22 @@ function FCVodeClearStopTime(cvode_mem) & swig_result = fresult end function +function FCVodeSkipAdaptStopTime(cvode_mem, skipadapttstop) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: cvode_mem +integer(C_INT), intent(in) :: skipadapttstop +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +integer(C_INT) :: farg2 + +farg1 = cvode_mem +farg2 = skipadapttstop +fresult = swigc_FCVodeSkipAdaptStopTime(farg1, farg2) +swig_result = fresult +end function + function FCVodeSetUserData(cvode_mem, user_data) & result(swig_result) use, intrinsic :: ISO_C_BINDING diff --git a/src/cvodes/fmod_int64/fcvodes_mod.c b/src/cvodes/fmod_int64/fcvodes_mod.c index 54a1a268f6..db85a4d738 100644 --- a/src/cvodes/fmod_int64/fcvodes_mod.c +++ b/src/cvodes/fmod_int64/fcvodes_mod.c @@ -737,6 +737,20 @@ SWIGEXPORT int _wrap_FCVodeClearStopTime(void *farg1) { } +SWIGEXPORT int _wrap_FCVodeSkipAdaptStopTime(void *farg1, int const *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + int arg2 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (int)(*farg2); + result = (int)CVodeSkipAdaptStopTime(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + SWIGEXPORT int _wrap_FCVodeSetUserData(void *farg1, void *farg2) { int fresult ; void *arg1 = (void *) 0 ; diff --git a/src/cvodes/fmod_int64/fcvodes_mod.f90 b/src/cvodes/fmod_int64/fcvodes_mod.f90 index 2396671fb1..2d3b6261c0 100644 --- a/src/cvodes/fmod_int64/fcvodes_mod.f90 +++ b/src/cvodes/fmod_int64/fcvodes_mod.f90 @@ -126,6 +126,7 @@ module fcvodes_mod public :: FCVodeSetStopTime public :: FCVodeSetInterpolateStopTime public :: FCVodeClearStopTime + public :: FCVodeSkipAdaptStopTime public :: FCVodeSetUserData public :: FCVodeSetEtaFixedStepBounds public :: FCVodeSetEtaMaxFirstStep @@ -660,6 +661,15 @@ function swigc_FCVodeClearStopTime(farg1) & integer(C_INT) :: fresult end function +function swigc_FCVodeSkipAdaptStopTime(farg1, farg2) & +bind(C, name="_wrap_FCVodeSkipAdaptStopTime") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +integer(C_INT), intent(in) :: farg2 +integer(C_INT) :: fresult +end function + function swigc_FCVodeSetUserData(farg1, farg2) & bind(C, name="_wrap_FCVodeSetUserData") & result(fresult) @@ -3302,6 +3312,22 @@ function FCVodeClearStopTime(cvode_mem) & swig_result = fresult end function +function FCVodeSkipAdaptStopTime(cvode_mem, skipadapttstop) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: cvode_mem +integer(C_INT), intent(in) :: skipadapttstop +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +integer(C_INT) :: farg2 + +farg1 = cvode_mem +farg2 = skipadapttstop +fresult = swigc_FCVodeSkipAdaptStopTime(farg1, farg2) +swig_result = fresult +end function + function FCVodeSetUserData(cvode_mem, user_data) & result(swig_result) use, intrinsic :: ISO_C_BINDING diff --git a/src/ida/fmod_int32/fida_mod.c b/src/ida/fmod_int32/fida_mod.c index 06f332f7db..40a2c086b7 100644 --- a/src/ida/fmod_int32/fida_mod.c +++ b/src/ida/fmod_int32/fida_mod.c @@ -572,6 +572,20 @@ SWIGEXPORT int _wrap_FIDAClearStopTime(void *farg1) { } +SWIGEXPORT int _wrap_FIDASkipAdaptStopTime(void *farg1, int const *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + int arg2 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (int)(*farg2); + result = (int)IDASkipAdaptStopTime(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + SWIGEXPORT int _wrap_FIDASetMaxErrTestFails(void *farg1, int const *farg2) { int fresult ; void *arg1 = (void *) 0 ; diff --git a/src/ida/fmod_int32/fida_mod.f90 b/src/ida/fmod_int32/fida_mod.f90 index 5731f02b26..e46f921fe8 100644 --- a/src/ida/fmod_int32/fida_mod.f90 +++ b/src/ida/fmod_int32/fida_mod.f90 @@ -88,6 +88,7 @@ module fida_mod public :: FIDASetMinStep public :: FIDASetStopTime public :: FIDAClearStopTime + public :: FIDASkipAdaptStopTime public :: FIDASetMaxErrTestFails public :: FIDASetSuppressAlg public :: FIDASetId @@ -402,6 +403,15 @@ function swigc_FIDAClearStopTime(farg1) & integer(C_INT) :: fresult end function +function swigc_FIDASkipAdaptStopTime(farg1, farg2) & +bind(C, name="_wrap_FIDASkipAdaptStopTime") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +integer(C_INT), intent(in) :: farg2 +integer(C_INT) :: fresult +end function + function swigc_FIDASetMaxErrTestFails(farg1, farg2) & bind(C, name="_wrap_FIDASetMaxErrTestFails") & result(fresult) @@ -1594,6 +1604,22 @@ function FIDAClearStopTime(ida_mem) & swig_result = fresult end function +function FIDASkipAdaptStopTime(ida_mem, skipadapttstop) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: ida_mem +integer(C_INT), intent(in) :: skipadapttstop +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +integer(C_INT) :: farg2 + +farg1 = ida_mem +farg2 = skipadapttstop +fresult = swigc_FIDASkipAdaptStopTime(farg1, farg2) +swig_result = fresult +end function + function FIDASetMaxErrTestFails(ida_mem, maxnef) & result(swig_result) use, intrinsic :: ISO_C_BINDING diff --git a/src/ida/fmod_int64/fida_mod.c b/src/ida/fmod_int64/fida_mod.c index 1c3dc00058..cd1461897f 100644 --- a/src/ida/fmod_int64/fida_mod.c +++ b/src/ida/fmod_int64/fida_mod.c @@ -572,6 +572,20 @@ SWIGEXPORT int _wrap_FIDAClearStopTime(void *farg1) { } +SWIGEXPORT int _wrap_FIDASkipAdaptStopTime(void *farg1, int const *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + int arg2 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (int)(*farg2); + result = (int)IDASkipAdaptStopTime(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + SWIGEXPORT int _wrap_FIDASetMaxErrTestFails(void *farg1, int const *farg2) { int fresult ; void *arg1 = (void *) 0 ; diff --git a/src/ida/fmod_int64/fida_mod.f90 b/src/ida/fmod_int64/fida_mod.f90 index 8a25821956..44761a711f 100644 --- a/src/ida/fmod_int64/fida_mod.f90 +++ b/src/ida/fmod_int64/fida_mod.f90 @@ -88,6 +88,7 @@ module fida_mod public :: FIDASetMinStep public :: FIDASetStopTime public :: FIDAClearStopTime + public :: FIDASkipAdaptStopTime public :: FIDASetMaxErrTestFails public :: FIDASetSuppressAlg public :: FIDASetId @@ -402,6 +403,15 @@ function swigc_FIDAClearStopTime(farg1) & integer(C_INT) :: fresult end function +function swigc_FIDASkipAdaptStopTime(farg1, farg2) & +bind(C, name="_wrap_FIDASkipAdaptStopTime") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +integer(C_INT), intent(in) :: farg2 +integer(C_INT) :: fresult +end function + function swigc_FIDASetMaxErrTestFails(farg1, farg2) & bind(C, name="_wrap_FIDASetMaxErrTestFails") & result(fresult) @@ -1594,6 +1604,22 @@ function FIDAClearStopTime(ida_mem) & swig_result = fresult end function +function FIDASkipAdaptStopTime(ida_mem, skipadapttstop) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: ida_mem +integer(C_INT), intent(in) :: skipadapttstop +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +integer(C_INT) :: farg2 + +farg1 = ida_mem +farg2 = skipadapttstop +fresult = swigc_FIDASkipAdaptStopTime(farg1, farg2) +swig_result = fresult +end function + function FIDASetMaxErrTestFails(ida_mem, maxnef) & result(swig_result) use, intrinsic :: ISO_C_BINDING diff --git a/src/idas/fmod_int32/fidas_mod.c b/src/idas/fmod_int32/fidas_mod.c index d2dc442bab..f6af554629 100644 --- a/src/idas/fmod_int32/fidas_mod.c +++ b/src/idas/fmod_int32/fidas_mod.c @@ -647,6 +647,20 @@ SWIGEXPORT int _wrap_FIDAClearStopTime(void *farg1) { } +SWIGEXPORT int _wrap_FIDASkipAdaptStopTime(void *farg1, int const *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + int arg2 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (int)(*farg2); + result = (int)IDASkipAdaptStopTime(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + SWIGEXPORT int _wrap_FIDASetMaxErrTestFails(void *farg1, int const *farg2) { int fresult ; void *arg1 = (void *) 0 ; diff --git a/src/idas/fmod_int32/fidas_mod.f90 b/src/idas/fmod_int32/fidas_mod.f90 index 4b6f5c20c1..a5941db94d 100644 --- a/src/idas/fmod_int32/fidas_mod.f90 +++ b/src/idas/fmod_int32/fidas_mod.f90 @@ -113,6 +113,7 @@ module fidas_mod public :: FIDASetMinStep public :: FIDASetStopTime public :: FIDAClearStopTime + public :: FIDASkipAdaptStopTime public :: FIDASetMaxErrTestFails public :: FIDASetSuppressAlg public :: FIDASetId @@ -575,6 +576,15 @@ function swigc_FIDAClearStopTime(farg1) & integer(C_INT) :: fresult end function +function swigc_FIDASkipAdaptStopTime(farg1, farg2) & +bind(C, name="_wrap_FIDASkipAdaptStopTime") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +integer(C_INT), intent(in) :: farg2 +integer(C_INT) :: fresult +end function + function swigc_FIDASetMaxErrTestFails(farg1, farg2) & bind(C, name="_wrap_FIDASetMaxErrTestFails") & result(fresult) @@ -3054,6 +3064,22 @@ function FIDAClearStopTime(ida_mem) & swig_result = fresult end function +function FIDASkipAdaptStopTime(ida_mem, skipadapttstop) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: ida_mem +integer(C_INT), intent(in) :: skipadapttstop +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +integer(C_INT) :: farg2 + +farg1 = ida_mem +farg2 = skipadapttstop +fresult = swigc_FIDASkipAdaptStopTime(farg1, farg2) +swig_result = fresult +end function + function FIDASetMaxErrTestFails(ida_mem, maxnef) & result(swig_result) use, intrinsic :: ISO_C_BINDING diff --git a/src/idas/fmod_int64/fidas_mod.c b/src/idas/fmod_int64/fidas_mod.c index 6becf9f0c2..4e15d5e299 100644 --- a/src/idas/fmod_int64/fidas_mod.c +++ b/src/idas/fmod_int64/fidas_mod.c @@ -647,6 +647,20 @@ SWIGEXPORT int _wrap_FIDAClearStopTime(void *farg1) { } +SWIGEXPORT int _wrap_FIDASkipAdaptStopTime(void *farg1, int const *farg2) { + int fresult ; + void *arg1 = (void *) 0 ; + int arg2 ; + int result; + + arg1 = (void *)(farg1); + arg2 = (int)(*farg2); + result = (int)IDASkipAdaptStopTime(arg1,arg2); + fresult = (int)(result); + return fresult; +} + + SWIGEXPORT int _wrap_FIDASetMaxErrTestFails(void *farg1, int const *farg2) { int fresult ; void *arg1 = (void *) 0 ; diff --git a/src/idas/fmod_int64/fidas_mod.f90 b/src/idas/fmod_int64/fidas_mod.f90 index ac98811f2b..3b5ac17cf9 100644 --- a/src/idas/fmod_int64/fidas_mod.f90 +++ b/src/idas/fmod_int64/fidas_mod.f90 @@ -113,6 +113,7 @@ module fidas_mod public :: FIDASetMinStep public :: FIDASetStopTime public :: FIDAClearStopTime + public :: FIDASkipAdaptStopTime public :: FIDASetMaxErrTestFails public :: FIDASetSuppressAlg public :: FIDASetId @@ -575,6 +576,15 @@ function swigc_FIDAClearStopTime(farg1) & integer(C_INT) :: fresult end function +function swigc_FIDASkipAdaptStopTime(farg1, farg2) & +bind(C, name="_wrap_FIDASkipAdaptStopTime") & +result(fresult) +use, intrinsic :: ISO_C_BINDING +type(C_PTR), value :: farg1 +integer(C_INT), intent(in) :: farg2 +integer(C_INT) :: fresult +end function + function swigc_FIDASetMaxErrTestFails(farg1, farg2) & bind(C, name="_wrap_FIDASetMaxErrTestFails") & result(fresult) @@ -3054,6 +3064,22 @@ function FIDAClearStopTime(ida_mem) & swig_result = fresult end function +function FIDASkipAdaptStopTime(ida_mem, skipadapttstop) & +result(swig_result) +use, intrinsic :: ISO_C_BINDING +integer(C_INT) :: swig_result +type(C_PTR) :: ida_mem +integer(C_INT), intent(in) :: skipadapttstop +integer(C_INT) :: fresult +type(C_PTR) :: farg1 +integer(C_INT) :: farg2 + +farg1 = ida_mem +farg2 = skipadapttstop +fresult = swigc_FIDASkipAdaptStopTime(farg1, farg2) +swig_result = fresult +end function + function FIDASetMaxErrTestFails(ida_mem, maxnef) & result(swig_result) use, intrinsic :: ISO_C_BINDING From 5bfe31b6d155c9ffd773ee05f305c5bc1ebc5a81 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Thu, 16 Apr 2026 22:21:54 -0400 Subject: [PATCH 278/298] Fixed submodule commit to match develop branch --- bindings/sundials4py/sundials4py-generate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/sundials4py/sundials4py-generate b/bindings/sundials4py/sundials4py-generate index e0aca449e3..a194554942 160000 --- a/bindings/sundials4py/sundials4py-generate +++ b/bindings/sundials4py/sundials4py-generate @@ -1 +1 @@ -Subproject commit e0aca449e3dbb9d3b09b40724e4cc57e8dd1ded1 +Subproject commit a194554942201da5f736d44a7b44d1af1cf05445 From 1dac3be1b3bab9174e7a69ed3106bac19165acc8 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 17 Apr 2026 08:35:26 -0400 Subject: [PATCH 279/298] Formatting --- src/cvode/cvode_io.c | 2 +- src/cvodes/cvodes_io.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cvode/cvode_io.c b/src/cvode/cvode_io.c index bd30e96bef..ebde9e47bb 100644 --- a/src/cvode/cvode_io.c +++ b/src/cvode/cvode_io.c @@ -739,7 +739,7 @@ int CVodeClearStopTime(void* cvode_mem) /* * CVodeSkipAdaptStopTime * - * Specififies whether stop-time-limited steps should be disregarded + * Specifies whether stop-time-limited steps should be disregarded * when performing step size and order adaptivity. */ diff --git a/src/cvodes/cvodes_io.c b/src/cvodes/cvodes_io.c index 428f65d7f5..76a9962708 100644 --- a/src/cvodes/cvodes_io.c +++ b/src/cvodes/cvodes_io.c @@ -741,7 +741,7 @@ int CVodeClearStopTime(void* cvode_mem) /* * CVodeSkipAdaptStopTime * - * Specififies whether stop-time-limited steps should be disregarded + * Specifies whether stop-time-limited steps should be disregarded * when performing step size and order adaptivity. */ From 0b441f0b1d8927655dc34137d6509da075fd8c0f Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Fri, 17 Apr 2026 08:47:45 -0400 Subject: [PATCH 280/298] Python interfaces --- bindings/sundials4py/arkode/arkode_generated.hpp | 3 +++ bindings/sundials4py/cvodes/cvodes_generated.hpp | 3 +++ bindings/sundials4py/idas/idas_generated.hpp | 3 +++ 3 files changed, 9 insertions(+) diff --git a/bindings/sundials4py/arkode/arkode_generated.hpp b/bindings/sundials4py/arkode/arkode_generated.hpp index 26cb224ad6..4c457cf204 100644 --- a/bindings/sundials4py/arkode/arkode_generated.hpp +++ b/bindings/sundials4py/arkode/arkode_generated.hpp @@ -203,6 +203,9 @@ m.def("ARKodeSetStopTime", ARKodeSetStopTime, nb::arg("arkode_mem"), m.def("ARKodeClearStopTime", ARKodeClearStopTime, nb::arg("arkode_mem")); +m.def("ARKodeSkipAdaptStopTime", ARKodeSkipAdaptStopTime, nb::arg("arkode_mem"), + nb::arg("skipadapttstop")); + m.def("ARKodeSetFixedStep", ARKodeSetFixedStep, nb::arg("arkode_mem"), nb::arg("hfixed")); diff --git a/bindings/sundials4py/cvodes/cvodes_generated.hpp b/bindings/sundials4py/cvodes/cvodes_generated.hpp index dbbde6f0ad..540de53e48 100644 --- a/bindings/sundials4py/cvodes/cvodes_generated.hpp +++ b/bindings/sundials4py/cvodes/cvodes_generated.hpp @@ -166,6 +166,9 @@ m.def("CVodeSetInterpolateStopTime", CVodeSetInterpolateStopTime, m.def("CVodeClearStopTime", CVodeClearStopTime, nb::arg("cvode_mem")); +m.def("CVodeSkipAdaptStopTime", CVodeSkipAdaptStopTime, nb::arg("cvode_mem"), + nb::arg("skipadapttstop")); + m.def("CVodeSetEtaFixedStepBounds", CVodeSetEtaFixedStepBounds, nb::arg("cvode_mem"), nb::arg("eta_min_fx"), nb::arg("eta_max_fx")); diff --git a/bindings/sundials4py/idas/idas_generated.hpp b/bindings/sundials4py/idas/idas_generated.hpp index 02902af5a2..317e2f559e 100644 --- a/bindings/sundials4py/idas/idas_generated.hpp +++ b/bindings/sundials4py/idas/idas_generated.hpp @@ -117,6 +117,9 @@ m.def("IDASetStopTime", IDASetStopTime, nb::arg("ida_mem"), nb::arg("tstop")); m.def("IDAClearStopTime", IDAClearStopTime, nb::arg("ida_mem")); +m.def("IDASkipAdaptStopTime", IDASkipAdaptStopTime, nb::arg("ida_mem"), + nb::arg("skipadapttstop")); + m.def("IDASetMaxErrTestFails", IDASetMaxErrTestFails, nb::arg("ida_mem"), nb::arg("maxnef")); From 272660eabb53366bf464bfe5608facaca18f32b7 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 20 Apr 2026 08:44:11 -0400 Subject: [PATCH 281/298] Minor updates to .out files due to new line in ARKodeWriteParameters --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index 49ef12abaf..fa163ce09e 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 49ef12abaf84ae79a8d6f6c1abea53a06e0e9771 +Subproject commit fa163ce09e5dd6544ac1e7c081f564a3a8311d8f From d4a1aaca4a6812fc6c73ca74da5b9d55fa4bc32f Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 20 Apr 2026 10:25:56 -0400 Subject: [PATCH 282/298] Added missing .out file --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index fa163ce09e..9fceaacd0b 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit fa163ce09e5dd6544ac1e7c081f564a3a8311d8f +Subproject commit 9fceaacd0bdcb1dd1c23d71463373a6d3187dab6 From acd161cb104aa2fdde0392d4a4842a85011e817f Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 20 Apr 2026 10:46:58 -0400 Subject: [PATCH 283/298] Updated two .out files to include additional line printed in ARKodeWriteParameters --- examples/arkode/C_serial/ark_analytic.out | 1 + ...de.table_names_ARKODE_ESDIRK547L2SA_7_4_5_ARKODE_ERK_NONE.out | 1 + 2 files changed, 2 insertions(+) diff --git a/examples/arkode/C_serial/ark_analytic.out b/examples/arkode/C_serial/ark_analytic.out index f822f3862f..7e9c0055ff 100644 --- a/examples/arkode/C_serial/ark_analytic.out +++ b/examples/arkode/C_serial/ark_analytic.out @@ -29,6 +29,7 @@ Soderlind SUNAdaptController module: previous-previous step = 1 firststeps = 0 historysize = 0 + Skip tstop-limited steps from affecting temporal adaptivity = 0 Maximum number of error test failures = 7 Maximum number of convergence test failures = 10 ARKStep time step module parameters: diff --git a/examples/arkode/C_serial/ark_analytic_arkode.scalar_tolerances_1e-6_1e-8_arkode.table_names_ARKODE_ESDIRK547L2SA_7_4_5_ARKODE_ERK_NONE.out b/examples/arkode/C_serial/ark_analytic_arkode.scalar_tolerances_1e-6_1e-8_arkode.table_names_ARKODE_ESDIRK547L2SA_7_4_5_ARKODE_ERK_NONE.out index 78af88676a..136fe90a32 100644 --- a/examples/arkode/C_serial/ark_analytic_arkode.scalar_tolerances_1e-6_1e-8_arkode.table_names_ARKODE_ESDIRK547L2SA_7_4_5_ARKODE_ERK_NONE.out +++ b/examples/arkode/C_serial/ark_analytic_arkode.scalar_tolerances_1e-6_1e-8_arkode.table_names_ARKODE_ESDIRK547L2SA_7_4_5_ARKODE_ERK_NONE.out @@ -29,6 +29,7 @@ Soderlind SUNAdaptController module: previous-previous step = 1 firststeps = 0 historysize = 0 + Skip tstop-limited steps from affecting temporal adaptivity = 0 Maximum number of error test failures = 7 Maximum number of convergence test failures = 10 ARKStep time step module parameters: From 98a0afb4230416beb38be4c654432c04f7c4fd90 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Mon, 20 Apr 2026 18:08:35 -0400 Subject: [PATCH 284/298] Updated .out file in answers repository due to added line in ARKodeWriteParameters --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index 9fceaacd0b..9dde9a1354 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 9fceaacd0bdcb1dd1c23d71463373a6d3187dab6 +Subproject commit 9dde9a135477860c2f7c8a98d0f77b1a983434d5 From 2aa460067081899df1557d075f0165d9640e5a57 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 21 Apr 2026 12:36:03 -0400 Subject: [PATCH 285/298] Added missing .out file in examples folder --- ...p_time_1_arkmod.skip_adapt_stop_time_1.out | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 examples/arkode/CXX_serial/ark_kpr_nestedmri_arkfast.skip_adapt_stop_time_1_arkmod.skip_adapt_stop_time_1.out diff --git a/examples/arkode/CXX_serial/ark_kpr_nestedmri_arkfast.skip_adapt_stop_time_1_arkmod.skip_adapt_stop_time_1.out b/examples/arkode/CXX_serial/ark_kpr_nestedmri_arkfast.skip_adapt_stop_time_1_arkmod.skip_adapt_stop_time_1.out new file mode 100644 index 0000000000..1d1d669c09 --- /dev/null +++ b/examples/arkode/CXX_serial/ark_kpr_nestedmri_arkfast.skip_adapt_stop_time_1_arkmod.skip_adapt_stop_time_1.out @@ -0,0 +1,51 @@ + +Adaptive nested multirate nonlinear Kvaerno-Prothero-Robinson test problem: + time domain: (0,5] + G = -10 + e = 0.5 + al = -1 + be = 1 + om = 50 + + Slow integrator: ARKODE_MRI_GARK_ERK45a (explicit) + + Intermediate integrator: ARKODE_MRI_GARK_ERK45a (explicit) + MRI-HTOL controller (using I for H) based on order of MRI embedding + rtol = 0.0001, atol = 1e-11 + fast error accumulation strategy = 0 + + Fast order 4 + I controller for fast time scale, based on order of RK embedding + fast_rtol = 0.0001, atol = 1e-11 + t u v w uerr verr werr + ---------------------------------------------------------------------------- + 0.000000 1.581139 1.732051 1.732051 0.00e+00 0.00e+00 0.00e+00 + 0.250000 1.575568 1.691653 0.982638 8.18e-06 4.44e-07 9.29e-05 + 0.500000 1.560231 1.085823 1.209956 1.49e-05 8.07e-06 4.30e-04 + 0.750000 1.536102 1.469088 1.256444 3.00e-05 3.10e-05 2.84e-03 + 1.000000 1.504205 1.644139 1.534738 5.98e-05 8.65e-06 4.35e-04 + 1.250000 1.465597 1.089258 1.075900 2.87e-05 3.16e-06 1.15e-04 + 1.500000 1.422645 1.424070 1.332193 2.34e-06 7.84e-09 3.97e-08 + 1.750000 1.377092 1.701792 1.324408 4.49e-06 2.63e-05 3.93e-04 + 2.000000 1.332370 1.534071 0.886999 1.10e-10 3.34e-13 6.01e-12 + 2.250000 1.290314 1.296504 1.093453 5.11e-06 1.44e-05 3.29e-03 + 2.500000 1.254200 1.020992 0.935999 1.43e-08 5.85e-10 1.37e-07 + 2.750000 1.229247 1.082903 1.598229 8.41e-06 2.44e-06 5.59e-04 + 3.000000 1.216144 1.091610 1.130624 2.39e-05 4.74e-06 1.40e-03 + 3.250000 1.216297 1.240783 1.639081 3.44e-06 8.55e-07 6.50e-06 + 3.500000 1.230701 1.413878 1.540425 6.51e-05 1.73e-04 2.06e-03 + 3.750000 1.254951 1.365115 1.401758 2.29e-05 7.27e-06 2.13e-04 + 4.000000 1.287747 0.974938 1.690643 3.14e-06 1.77e-05 2.69e-03 + 4.250000 1.328130 1.675308 0.966312 2.42e-06 7.03e-09 1.21e-05 + 4.500000 1.371964 1.605167 1.479730 5.60e-07 4.61e-08 2.75e-08 + 4.750000 1.417588 1.514725 1.160359 8.37e-06 3.40e-07 4.86e-06 + 5.000000 1.461167 1.473354 1.644126 6.42e-07 1.35e-06 9.85e-05 + ---------------------------------------------------------------------------- + +Final Solver Statistics: + Slow steps = 239 (attempts = 309, fails = 70, innerfails = 0) + Intermediate steps = 2820 (attempts = 2955, fails = 135, innerfails = 0) + Fast steps = 87774 (attempts = 122683, fails = 34909) + u error = 9.45885e-05, v error = 0.000106298, total error = 0.00175566 + Relative accuracy = 94.0089 + Total RHS evals: Fse = 1477, Fsi = 0, Fme = 14883, Fmi = 0, Ff = 496888 From 5649187592b341471e2895d5778901a67b62de8e Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Wed, 22 Apr 2026 11:43:41 -0400 Subject: [PATCH 286/298] Updated on final .out file with new line from ARKodeWriteParameters --- examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.out | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.out b/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.out index 57327baef1..0ac4f6818f 100644 --- a/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.out +++ b/examples/arkode/F2003_serial/ark_bruss1D_FEM_klu_f2003.out @@ -26,6 +26,7 @@ Soderlind SUNAdaptController module: previous-previous step = 1 firststeps = 0 historysize = 0 + Skip tstop-limited steps from affecting temporal adaptivity = 0 Maximum number of error test failures = 7 Maximum number of convergence test failures = 10 ARKStep time step module parameters: From b42a18d5c7d52325ec8e140690e1b48847c8646c Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 24 May 2026 17:39:59 -0700 Subject: [PATCH 287/298] fix change log merge --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58546af4a9..1a7d5e06ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -146,7 +146,7 @@ Several CMake options have been deprecated in favor of namespaced versions prefixed with `SUNDIALS_` to avoid naming collisions in applications that include SUNDIALS directly within their CMake builds. Additionally, a consistent naming convention (`SUNDIALS_ENABLE`) is now used for all boolean options. The -Removed an extraneous copy of the output vector in each step with SplittingStep. +table below lists the old CMake option names and the new replacements. | Old Option | New Option | |-----------------------------------------|------------------------------------------------| From a9b7940bc20e52b5716260533aacecc7dbd52d5c Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 26 May 2026 16:09:09 -0400 Subject: [PATCH 288/298] Renamed XSkipAdaptStopTime to XSetSkipAdaptStopTime --- doc/arkode/guide/source/Usage/User_callable.rst | 4 ++-- doc/cvode/guide/source/Usage/index.rst | 4 ++-- doc/cvodes/guide/source/Usage/SIM.rst | 4 ++-- doc/ida/guide/source/Usage/index.rst | 4 ++-- doc/idas/guide/source/Usage/SIM.rst | 4 ++-- include/arkode/arkode.h | 4 ++-- include/cvode/cvode.h | 4 ++-- include/cvodes/cvodes.h | 4 ++-- include/ida/ida.h | 4 ++-- include/idas/idas.h | 4 ++-- src/arkode/arkode_io.c | 4 ++-- src/cvode/cvode_io.c | 4 ++-- src/cvodes/cvodes_io.c | 4 ++-- src/ida/ida_io.c | 2 +- src/idas/idas_io.c | 2 +- 15 files changed, 28 insertions(+), 28 deletions(-) diff --git a/doc/arkode/guide/source/Usage/User_callable.rst b/doc/arkode/guide/source/Usage/User_callable.rst index 56526630ff..1743a14266 100644 --- a/doc/arkode/guide/source/Usage/User_callable.rst +++ b/doc/arkode/guide/source/Usage/User_callable.rst @@ -905,7 +905,7 @@ Minimum absolute step size :c:func:`ARKodeSetMinStep` Set a value for :math:`t_{stop}` :c:func:`ARKodeSetStopTime` undefined Interpolate at :math:`t_{stop}` :c:func:`ARKodeSetInterpolateStopTime` ``SUNFALSE`` Disable the stop time :c:func:`ARKodeClearStopTime` N/A -Disregard stop time limited steps in adaptivity :c:func:`ARKodeSkipAdaptStopTime` ``SUNFALSE`` +Disregard stop time limited steps in adaptivity :c:func:`ARKodeSetSkipAdaptStopTime` ``SUNFALSE`` Supply a pointer for user data :c:func:`ARKodeSetUserData` ``NULL`` Maximum no. of ARKODE error test failures :c:func:`ARKodeSetMaxErrTestFails` 7 Set inequality constraints on solution :c:func:`ARKodeSetConstraints` ``NULL`` @@ -1467,7 +1467,7 @@ Use compensated summation for accumulating time :c:func:`ARKodeSetUseCompensa .. versionadded:: 6.1.0 -.. c:function:: int ARKodeSkipAdaptStopTime(void* arkode_mem, sunbooleantype skip) +.. c:function:: int ARKodeSetSkipAdaptStopTime(void* arkode_mem, sunbooleantype skip) Specifies whether stop-time-limited steps should be disregarded when selecting step sizes for time step adaptivity. diff --git a/doc/cvode/guide/source/Usage/index.rst b/doc/cvode/guide/source/Usage/index.rst index 45a1abce4b..5a441f7b37 100644 --- a/doc/cvode/guide/source/Usage/index.rst +++ b/doc/cvode/guide/source/Usage/index.rst @@ -864,7 +864,7 @@ Main solver optional input functions +-------------------------------+---------------------------------------------+----------------+ | Disable the stop time | :c:func:`CVodeClearStopTime` | N/A | +-------------------------------+---------------------------------------------+----------------+ - | Disregard stop time limited | :c:func:`CVodeSkipAdaptStopTime` | ``SUNFALSE`` | + | Disregard stop time limited | :c:func:`CVodeSetSkipAdaptStopTime` | ``SUNFALSE`` | | steps in adaptivity | | | +-------------------------------+---------------------------------------------+----------------+ | Maximum no. of error test | :c:func:`CVodeSetMaxErrTestFails` | 7 | @@ -1210,7 +1210,7 @@ Main solver optional input functions .. versionadded:: 6.5.1 -.. c:function:: int CVodeSkipAdaptStopTime(void* cvode_mem, sunbooleantype skip) +.. c:function:: int CVodeSetSkipAdaptStopTime(void* cvode_mem, sunbooleantype skip) Specifies whether stop-time-limited steps should be disregarded when adapting step sizes and method order. diff --git a/doc/cvodes/guide/source/Usage/SIM.rst b/doc/cvodes/guide/source/Usage/SIM.rst index 1c12ce0c5e..39e92ed196 100644 --- a/doc/cvodes/guide/source/Usage/SIM.rst +++ b/doc/cvodes/guide/source/Usage/SIM.rst @@ -873,7 +873,7 @@ Main solver optional input functions +-------------------------------+---------------------------------------------+----------------+ | Disable the stop time | :c:func:`CVodeClearStopTime` | N/A | +-------------------------------+---------------------------------------------+----------------+ - | Disregard stop time limited | :c:func:`CVodeSkipAdaptStopTime` | ``SUNFALSE`` | + | Disregard stop time limited | :c:func:`CVodeSetSkipAdaptStopTime` | ``SUNFALSE`` | | steps in adaptivity | | | +-------------------------------+---------------------------------------------+----------------+ | Maximum no. of error test | :c:func:`CVodeSetMaxErrTestFails` | 7 | @@ -1216,7 +1216,7 @@ Main solver optional input functions .. versionadded:: 6.5.1 -.. c:function:: int CVodeSkipAdaptStopTime(void* cvode_mem, sunbooleantype skip) +.. c:function:: int CVodeSetSkipAdaptStopTime(void* cvode_mem, sunbooleantype skip) Specifies whether stop-time-limited steps should be disregarded when adapting step sizes and method order. diff --git a/doc/ida/guide/source/Usage/index.rst b/doc/ida/guide/source/Usage/index.rst index 8907e14dff..41aaabea72 100644 --- a/doc/ida/guide/source/Usage/index.rst +++ b/doc/ida/guide/source/Usage/index.rst @@ -931,7 +931,7 @@ Main solver optional input functions +--------------------------------------------------------------------+---------------------------------------+----------------+ | Disable the stop time | :c:func:`IDAClearStopTime` | N/A | +--------------------------------------------------------------------+---------------------------------------+----------------+ - | Disregard stop time limited steps in adaptivity | :c:func:`IDASkipAdaptStopTime` | ``SUNFALSE`` | + | Disregard stop time limited steps in adaptivity | :c:func:`IDASetSkipAdaptStopTime` | ``SUNFALSE`` | +--------------------------------------------------------------------+---------------------------------------+----------------+ | Maximum no. of error test failures | :c:func:`IDASetMaxErrTestFails` | 10 | +--------------------------------------------------------------------+---------------------------------------+----------------+ @@ -1191,7 +1191,7 @@ Main solver optional input functions .. versionadded:: 6.5.1 -.. c:function:: int IDASkipAdaptStopTime(void* ida_mem, sunbooleantype skip) +.. c:function:: int IDASetSkipAdaptStopTime(void* ida_mem, sunbooleantype skip) Specifies whether stop-time-limited steps should be disregarded when adapting step sizes and method order. diff --git a/doc/idas/guide/source/Usage/SIM.rst b/doc/idas/guide/source/Usage/SIM.rst index 6bad4abda9..1fbed906b1 100644 --- a/doc/idas/guide/source/Usage/SIM.rst +++ b/doc/idas/guide/source/Usage/SIM.rst @@ -936,7 +936,7 @@ Main solver optional input functions +--------------------------------------------------------------------+---------------------------------------+----------------+ | Disable the stop time | :c:func:`IDAClearStopTime` | N/A | +--------------------------------------------------------------------+---------------------------------------+----------------+ - | Disregard stop time limited steps in adaptivity | :c:func:`IDASkipAdaptStopTime` | ``SUNFALSE`` | + | Disregard stop time limited steps in adaptivity | :c:func:`IDASetSkipAdaptStopTime` | ``SUNFALSE`` | +--------------------------------------------------------------------+---------------------------------------+----------------+ | Maximum no. of error test failures | :c:func:`IDASetMaxErrTestFails` | 10 | +--------------------------------------------------------------------+---------------------------------------+----------------+ @@ -1196,7 +1196,7 @@ Main solver optional input functions .. versionadded:: 6.5.1 -.. c:function:: int IDASkipAdaptStopTime(void* ida_mem, sunbooleantype skip) +.. c:function:: int IDASetSkipAdaptStopTime(void* ida_mem, sunbooleantype skip) Specifies whether stop-time-limited steps should be disregarded when adapting step sizes and method order. diff --git a/include/arkode/arkode.h b/include/arkode/arkode.h index 5adf808d3c..e314ffee48 100644 --- a/include/arkode/arkode.h +++ b/include/arkode/arkode.h @@ -289,8 +289,8 @@ SUNDIALS_EXPORT int ARKodeSetInterpolateStopTime(void* arkode_mem, sunbooleantype interp); SUNDIALS_EXPORT int ARKodeSetStopTime(void* arkode_mem, sunrealtype tstop); SUNDIALS_EXPORT int ARKodeClearStopTime(void* arkode_mem); -SUNDIALS_EXPORT int ARKodeSkipAdaptStopTime(void* arkode_mem, - sunbooleantype skipadapttstop); +SUNDIALS_EXPORT int ARKodeSetSkipAdaptStopTime(void* arkode_mem, + sunbooleantype skipadapttstop); SUNDIALS_EXPORT int ARKodeSetFixedStep(void* arkode_mem, sunrealtype hfixed); SUNDIALS_EXPORT int ARKodeSetStepDirection(void* arkode_mem, sunrealtype stepdir); SUNDIALS_EXPORT int ARKodeSetUserData(void* arkode_mem, void* user_data); diff --git a/include/cvode/cvode.h b/include/cvode/cvode.h index 624bfcf7c5..71516c45a5 100644 --- a/include/cvode/cvode.h +++ b/include/cvode/cvode.h @@ -155,8 +155,8 @@ SUNDIALS_EXPORT int CVodeSetStopTime(void* cvode_mem, sunrealtype tstop); SUNDIALS_EXPORT int CVodeSetInterpolateStopTime(void* cvode_mem, sunbooleantype interp); SUNDIALS_EXPORT int CVodeClearStopTime(void* cvode_mem); -SUNDIALS_EXPORT int CVodeSkipAdaptStopTime(void* cvode_mem, - sunbooleantype skipadapttstop); +SUNDIALS_EXPORT int CVodeSetSkipAdaptStopTime(void* cvode_mem, + sunbooleantype skipadapttstop); SUNDIALS_EXPORT int CVodeSetUseIntegratorFusedKernels(void* cvode_mem, sunbooleantype onoff); SUNDIALS_EXPORT int CVodeSetUserData(void* cvode_mem, void* user_data); diff --git a/include/cvodes/cvodes.h b/include/cvodes/cvodes.h index 92d05ff6f5..6373d61dc4 100644 --- a/include/cvodes/cvodes.h +++ b/include/cvodes/cvodes.h @@ -224,8 +224,8 @@ SUNDIALS_EXPORT int CVodeSetStopTime(void* cvode_mem, sunrealtype tstop); SUNDIALS_EXPORT int CVodeSetInterpolateStopTime(void* cvode_mem, sunbooleantype interp); SUNDIALS_EXPORT int CVodeClearStopTime(void* cvode_mem); -SUNDIALS_EXPORT int CVodeSkipAdaptStopTime(void* cvode_mem, - sunbooleantype skipadapttstop); +SUNDIALS_EXPORT int CVodeSetSkipAdaptStopTime(void* cvode_mem, + sunbooleantype skipadapttstop); SUNDIALS_EXPORT int CVodeSetUserData(void* cvode_mem, void* user_data); /* Optional step adaptivity input functions */ diff --git a/include/ida/ida.h b/include/ida/ida.h index c217189a59..0583c3b119 100644 --- a/include/ida/ida.h +++ b/include/ida/ida.h @@ -146,8 +146,8 @@ SUNDIALS_EXPORT int IDASetMaxStep(void* ida_mem, sunrealtype hmax); SUNDIALS_EXPORT int IDASetMinStep(void* ida_mem, sunrealtype hmin); SUNDIALS_EXPORT int IDASetStopTime(void* ida_mem, sunrealtype tstop); SUNDIALS_EXPORT int IDAClearStopTime(void* ida_mem); -SUNDIALS_EXPORT int IDASkipAdaptStopTime(void* ida_mem, - sunbooleantype skipadapttstop); +SUNDIALS_EXPORT int IDASetSkipAdaptStopTime(void* ida_mem, + sunbooleantype skipadapttstop); SUNDIALS_EXPORT int IDASetMaxErrTestFails(void* ida_mem, int maxnef); SUNDIALS_EXPORT int IDASetSuppressAlg(void* ida_mem, sunbooleantype suppressalg); SUNDIALS_EXPORT int IDASetId(void* ida_mem, N_Vector id); diff --git a/include/idas/idas.h b/include/idas/idas.h index 7768465550..c3c6776376 100644 --- a/include/idas/idas.h +++ b/include/idas/idas.h @@ -210,8 +210,8 @@ SUNDIALS_EXPORT int IDASetMaxStep(void* ida_mem, sunrealtype hmax); SUNDIALS_EXPORT int IDASetMinStep(void* ida_mem, sunrealtype hmin); SUNDIALS_EXPORT int IDASetStopTime(void* ida_mem, sunrealtype tstop); SUNDIALS_EXPORT int IDAClearStopTime(void* ida_mem); -SUNDIALS_EXPORT int IDASkipAdaptStopTime(void* ida_mem, - sunbooleantype skipadapttstop); +SUNDIALS_EXPORT int IDASetSkipAdaptStopTime(void* ida_mem, + sunbooleantype skipadapttstop); SUNDIALS_EXPORT int IDASetMaxErrTestFails(void* ida_mem, int maxnef); SUNDIALS_EXPORT int IDASetSuppressAlg(void* ida_mem, sunbooleantype suppressalg); SUNDIALS_EXPORT int IDASetId(void* ida_mem, N_Vector id); diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index bf887ad897..fa1b35ad2b 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -1275,12 +1275,12 @@ int ARKodeClearStopTime(void* arkode_mem) } /*--------------------------------------------------------------- - ARKodeSkipAdaptStopTime: + ARKodeSetSkipAdaptStopTime: Specifies whether stop-time-limited steps should be disregarded when selecting step sizes for time step adaptivity. ---------------------------------------------------------------*/ -int ARKodeSkipAdaptStopTime(void* arkode_mem, sunbooleantype skip) +int ARKodeSetSkipAdaptStopTime(void* arkode_mem, sunbooleantype skip) { ARKodeMem ark_mem; if (arkode_mem == NULL) diff --git a/src/cvode/cvode_io.c b/src/cvode/cvode_io.c index ebde9e47bb..4083a9751a 100644 --- a/src/cvode/cvode_io.c +++ b/src/cvode/cvode_io.c @@ -737,13 +737,13 @@ int CVodeClearStopTime(void* cvode_mem) } /* - * CVodeSkipAdaptStopTime + * CVodeSetSkipAdaptStopTime * * Specifies whether stop-time-limited steps should be disregarded * when performing step size and order adaptivity. */ -int CVodeSkipAdaptStopTime(void* cvode_mem, sunbooleantype skip) +int CVodeSetSkipAdaptStopTime(void* cvode_mem, sunbooleantype skip) { CVodeMem cv_mem; diff --git a/src/cvodes/cvodes_io.c b/src/cvodes/cvodes_io.c index 76a9962708..ff7a8645eb 100644 --- a/src/cvodes/cvodes_io.c +++ b/src/cvodes/cvodes_io.c @@ -739,13 +739,13 @@ int CVodeClearStopTime(void* cvode_mem) } /* - * CVodeSkipAdaptStopTime + * CVodeSetSkipAdaptStopTime * * Specifies whether stop-time-limited steps should be disregarded * when performing step size and order adaptivity. */ -int CVodeSkipAdaptStopTime(void* cvode_mem, sunbooleantype skip) +int CVodeSetSkipAdaptStopTime(void* cvode_mem, sunbooleantype skip) { CVodeMem cv_mem; diff --git a/src/ida/ida_io.c b/src/ida/ida_io.c index 6f40a10358..a7ff51af23 100644 --- a/src/ida/ida_io.c +++ b/src/ida/ida_io.c @@ -413,7 +413,7 @@ int IDAClearStopTime(void* ida_mem) /*-----------------------------------------------------------------*/ -int IDASkipAdaptStopTime(void* ida_mem, sunbooleantype skip) +int IDASetSkipAdaptStopTime(void* ida_mem, sunbooleantype skip) { IDAMem IDA_mem; diff --git a/src/idas/idas_io.c b/src/idas/idas_io.c index 5b2981dd42..2de25b1b9b 100644 --- a/src/idas/idas_io.c +++ b/src/idas/idas_io.c @@ -412,7 +412,7 @@ int IDAClearStopTime(void* ida_mem) /*-----------------------------------------------------------------*/ -int IDASkipAdaptStopTime(void* ida_mem, sunbooleantype skip) +int IDASetSkipAdaptStopTime(void* ida_mem, sunbooleantype skip) { IDAMem IDA_mem; From f5babcd240a47be9e4a8a3cafe7089624d6444f3 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 26 May 2026 19:26:37 -0400 Subject: [PATCH 289/298] Minor updates from code review --- CHANGELOG.md | 10 ++++------ doc/shared/RecentChanges.rst | 10 ++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8dc62fe365..c660206860 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,12 +11,10 @@ functions to queue and flush log messages. Updated `examples/cvode/petsc/cv_petsc_ex7.c` to support PETSc 3.25.0. -Added the function `ARKodeSkipAdaptStopTime` to specify that -stop-time-limited steps should be disregarded when selecting step sizes -for time step adaptivity. Added the functions `CVodeSkipAdaptStopTime` -and `IDASkipAdaptStopTime` to specify that stop-time-limited steps should -be disregarded when adapting the step size and method order for CVODE(S) -and IDA(S), respectively. +Added the functions `ARKodeSkipAdaptStopTime`, +`CVodeSkipAdaptStopTime`, and `IDASkipAdaptStopTime` to +specify that stop-time-limited steps should be disregarded when selecting step sizes +for time step adaptivity. ### Bug Fixes diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index e021b9b58b..09739e3e55 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -10,12 +10,10 @@ user-defined functions to queue and flush log messages. Updated ``examples/cvode/petsc/cv_petsc_ex7.c`` to support PETSc 3.25.0. -Added the function :c:func:`ARKodeSkipAdaptStopTime` to specify that -stop-time-limited steps should be disregarded when selecting step sizes -for time step adaptivity. Added the functions -:c:func:`CVodeSkipAdaptStopTime` and :c:func:`IDASkipAdaptStopTime` -to specify that stop-time-limited steps should be disregarded when -adapting the step size and method order for CVODE(S) and IDA(S), respectively. +Added the functions :c:func:`ARKodeSkipAdaptStopTime`, +:c:func:`CVodeSkipAdaptStopTime`, and :c:func:`IDASkipAdaptStopTime` to +specify that stop-time-limited steps should be disregarded when selecting step sizes +for time step adaptivity. **Bug Fixes** From 856b24b89b241fc9dd096de052986c3bf52a3056 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 26 May 2026 19:26:53 -0400 Subject: [PATCH 290/298] Compilation fix --- src/arkode/arkode_cli.c | 2 +- src/cvode/cvode_cli.c | 2 +- src/cvodes/cvodes_cli.c | 2 +- src/ida/ida_cli.c | 2 +- src/idas/idas_cli.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/arkode/arkode_cli.c b/src/arkode/arkode_cli.c index ad49060e41..4311ccd8fb 100644 --- a/src/arkode/arkode_cli.c +++ b/src/arkode/arkode_cli.c @@ -84,7 +84,7 @@ static int arkSetFromCommandLine(void* arkode_mem, const char* arkid, int argc, {"max_nonlin_iters", ARKodeSetMaxNonlinIters}, {"max_hnil_warns", ARKodeSetMaxHnilWarns}, {"interpolate_stop_time", ARKodeSetInterpolateStopTime}, - {"skip_adapt_stop_time", ARKodeSkipAdaptStopTime}, + {"skip_adapt_stop_time", ARKodeSetSkipAdaptStopTime}, {"max_num_constr_fails", ARKodeSetMaxNumConstrFails}, {"adaptivity_adjustment", ARKodeSetAdaptivityAdjustment}, {"small_num_efails", ARKodeSetSmallNumEFails}, diff --git a/src/cvode/cvode_cli.c b/src/cvode/cvode_cli.c index 53dcdf8a48..d2aa0e2ee6 100644 --- a/src/cvode/cvode_cli.c +++ b/src/cvode/cvode_cli.c @@ -81,7 +81,7 @@ static int cvSetFromCommandLine(void* cvode_mem, const char* cvid, int argc, {"max_order", CVodeSetMaxOrd}, {"stab_lim_det", CVodeSetStabLimDet}, {"interpolate_stop_time", CVodeSetInterpolateStopTime}, - {"skip_adapt_stop_time", CVodeSkipAdaptStopTime}, + {"skip_adapt_stop_time", CVodeSetSkipAdaptStopTime}, {"use_integrator_fused_kernels", CVodeSetUseIntegratorFusedKernels}, {"num_fails_eta_max_err_fail", CVodeSetNumFailsEtaMaxErrFail}, {"linear_solution_scaling", CVodeSetLinearSolutionScaling}, diff --git a/src/cvodes/cvodes_cli.c b/src/cvodes/cvodes_cli.c index 2051cec61b..a98f526cba 100644 --- a/src/cvodes/cvodes_cli.c +++ b/src/cvodes/cvodes_cli.c @@ -81,7 +81,7 @@ static int cvSetFromCommandLine(void* cvode_mem, const char* cvid, int argc, {"max_order", CVodeSetMaxOrd}, {"stab_lim_det", CVodeSetStabLimDet}, {"interpolate_stop_time", CVodeSetInterpolateStopTime}, - {"skip_adapt_stop_time", CVodeSkipAdaptStopTime}, + {"skip_adapt_stop_time", CVodeSetSkipAdaptStopTime}, {"num_fails_eta_max_err_fail", CVodeSetNumFailsEtaMaxErrFail}, {"quad_err_con", CVodeSetQuadErrCon}, {"sens_err_con", CVodeSetSensErrCon}, diff --git a/src/ida/ida_cli.c b/src/ida/ida_cli.c index 5603721248..cb27ea46af 100644 --- a/src/ida/ida_cli.c +++ b/src/ida/ida_cli.c @@ -85,7 +85,7 @@ static int idaSetFromCommandLine(void* ida_mem, const char* idaid, int argc, {"max_nonlin_iters", IDASetMaxNonlinIters}, {"linear_solution_scaling", IDASetLinearSolutionScaling}, {"max_num_constraint_fails", IDASetMaxNumConstraintFails}, - {"skip_adapt_stop_time", IDASkipAdaptStopTime}}; + {"skip_adapt_stop_time", IDASetSkipAdaptStopTime}}; static const int num_int_keys = sizeof(int_pairs) / sizeof(*int_pairs); static const struct sunKeyLongPair long_pairs[] = { diff --git a/src/idas/idas_cli.c b/src/idas/idas_cli.c index 48ac5f41a9..6ebcf773a7 100644 --- a/src/idas/idas_cli.c +++ b/src/idas/idas_cli.c @@ -89,7 +89,7 @@ static int idaSetFromCommandLine(void* ida_mem, const char* idaid, int argc, {"quad_sens_err_con", IDASetQuadSensErrCon}, {"linear_solution_scaling", IDASetLinearSolutionScaling}, {"max_num_constraint_fails", IDASetMaxNumConstraintFails}, - {"skip_adapt_stop_time", IDASkipAdaptStopTime}}; + {"skip_adapt_stop_time", IDASetSkipAdaptStopTime}}; static const int num_int_keys = sizeof(int_pairs) / sizeof(*int_pairs); static const struct sunKeyLongPair long_pairs[] = { From e225d370bdf6b25be598b29f57042bd65c0f34a6 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 26 May 2026 19:27:24 -0400 Subject: [PATCH 291/298] Added unit tests to verify SetSkipAdaptStopTime functionality --- .../unit_tests/arkode/C_serial/CMakeLists.txt | 3 ++- .../arkode/C_serial/ark_test_tstop.c | 26 ++++++++++++++++++ test/unit_tests/cvode/C_serial/CMakeLists.txt | 2 +- .../unit_tests/cvode/C_serial/cv_test_tstop.c | 26 ++++++++++++++++++ .../unit_tests/cvodes/C_serial/CMakeLists.txt | 2 +- .../cvodes/C_serial/cvs_test_tstop.c | 26 ++++++++++++++++++ test/unit_tests/ida/C_serial/CMakeLists.txt | 2 +- test/unit_tests/ida/C_serial/ida_test_tstop.c | 27 +++++++++++++++++++ test/unit_tests/idas/C_serial/CMakeLists.txt | 2 +- .../idas/C_serial/idas_test_tstop.c | 26 ++++++++++++++++++ 10 files changed, 137 insertions(+), 5 deletions(-) diff --git a/test/unit_tests/arkode/C_serial/CMakeLists.txt b/test/unit_tests/arkode/C_serial/CMakeLists.txt index 8587943ca8..21d941a3cd 100644 --- a/test/unit_tests/arkode/C_serial/CMakeLists.txt +++ b/test/unit_tests/arkode/C_serial/CMakeLists.txt @@ -38,7 +38,8 @@ set(ARKODE_unit_tests "ark_test_mass\;" "ark_test_reset\;" "ark_test_splittingstep_coefficients\;" - "ark_test_tstop\;") + "ark_test_tstop\;" + "ark_test_tstop\;1") # Add the build and install targets for each test foreach(test_tuple ${ARKODE_unit_tests}) diff --git a/test/unit_tests/arkode/C_serial/ark_test_tstop.c b/test/unit_tests/arkode/C_serial/ark_test_tstop.c index 46e96c26ea..2269a2b66f 100644 --- a/test/unit_tests/arkode/C_serial/ark_test_tstop.c +++ b/test/unit_tests/arkode/C_serial/ark_test_tstop.c @@ -69,6 +69,12 @@ int main(int argc, char* argv[]) sunrealtype dt_tstop = SUN_RCONST(0.30); sunrealtype tret = ZERO; sunrealtype tcur = ZERO; + sunrealtype dt_cur = ZERO; + sunrealtype dt_last = ZERO; + + /* if an argument supplied, call SetSkipAdaptStopTime with that value */ + sunbooleantype skip_adapt_stop_time_threshold = SUNFALSE; + if (argc > 1) { skip_adapt_stop_time_threshold = SUNTRUE; } /* -------------- * Create context @@ -117,6 +123,12 @@ int main(int argc, char* argv[]) flag = ARKodeSetStopTime(arkode_mem, tstop); if (flag) { return 1; } + if (skip_adapt_stop_time_threshold) + { + flag = ARKodeSetSkipAdaptStopTime(arkode_mem, 1); + if (flag) { return 1; } + } + /* --------------- * Advance in time * --------------- */ @@ -159,6 +171,20 @@ int main(int argc, char* argv[]) break; } + if (skip_adapt_stop_time_threshold) + { + flag = ARKodeGetCurrentStep(arkode_mem, &dt_cur); + if (flag) { return 1; } + flag = ARKodeGetLastStep(arkode_mem, &dt_last); + if (flag) { return 1; } + if (dt_cur <= dt_last) + { + printf("ERROR: Expected dt_cur > dt_last (%" GSYM " <= %" GSYM ")\n", dt_cur, dt_last); + flag = 1; + break; + } + } + /* Update stop time */ tstop += dt_tstop; flag = ARKodeSetStopTime(arkode_mem, tstop); diff --git a/test/unit_tests/cvode/C_serial/CMakeLists.txt b/test/unit_tests/cvode/C_serial/CMakeLists.txt index b2314c281b..aef34b70cf 100644 --- a/test/unit_tests/cvode/C_serial/CMakeLists.txt +++ b/test/unit_tests/cvode/C_serial/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # List of test tuples of the form "name\;args" -set(unit_tests "cv_test_getuserdata\;" "cv_test_tstop\;") +set(unit_tests "cv_test_getuserdata\;" "cv_test_tstop\;" "cv_test_tstop\;1") # Add the build and install targets for each test foreach(test_tuple ${unit_tests}) diff --git a/test/unit_tests/cvode/C_serial/cv_test_tstop.c b/test/unit_tests/cvode/C_serial/cv_test_tstop.c index bdedc555c9..549f97422e 100644 --- a/test/unit_tests/cvode/C_serial/cv_test_tstop.c +++ b/test/unit_tests/cvode/C_serial/cv_test_tstop.c @@ -69,6 +69,12 @@ int main(int argc, char* argv[]) sunrealtype dt_tstop = SUN_RCONST(0.30); sunrealtype tret = ZERO; sunrealtype tcur = ZERO; + sunrealtype dt_cur = ZERO; + sunrealtype dt_last = ZERO; + + /* if an argument supplied, call SetSkipAdaptStopTime with that value */ + sunbooleantype skip_adapt_stop_time_threshold = SUNFALSE; + if (argc > 1) { skip_adapt_stop_time_threshold = SUNTRUE; } /* -------------- * Create context @@ -120,6 +126,12 @@ int main(int argc, char* argv[]) flag = CVodeSetStopTime(cvode_mem, tstop); if (flag) { return 1; } + if (skip_adapt_stop_time_threshold) + { + flag = CVodeSetSkipAdaptStopTime(cvode_mem, 1); + if (flag) { return 1; } + } + /* --------------- * Advance in time * --------------- */ @@ -162,6 +174,20 @@ int main(int argc, char* argv[]) break; } + if (skip_adapt_stop_time_threshold) + { + flag = CVodeGetCurrentStep(cvode_mem, &dt_cur); + if (flag) { return 1; } + flag = CVodeGetLastStep(cvode_mem, &dt_last); + if (flag) { return 1; } + if (dt_cur <= dt_last) + { + printf("ERROR: Expected dt_cur > dt_last (%" GSYM " <= %" GSYM ")\n", dt_cur, dt_last); + flag = 1; + break; + } + } + /* Update stop time */ tstop += dt_tstop; flag = CVodeSetStopTime(cvode_mem, tstop); diff --git a/test/unit_tests/cvodes/C_serial/CMakeLists.txt b/test/unit_tests/cvodes/C_serial/CMakeLists.txt index b817fcffd3..f6e77a27b9 100644 --- a/test/unit_tests/cvodes/C_serial/CMakeLists.txt +++ b/test/unit_tests/cvodes/C_serial/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # List of test tuples of the form "name\;args" -set(unit_tests "cvs_test_getuserdata\;" "cvs_test_tstop\;") +set(unit_tests "cvs_test_getuserdata\;" "cvs_test_tstop\;" "cvs_test_tstop\;1") # Add the build and install targets for each test foreach(test_tuple ${unit_tests}) diff --git a/test/unit_tests/cvodes/C_serial/cvs_test_tstop.c b/test/unit_tests/cvodes/C_serial/cvs_test_tstop.c index c68f43b1ad..aed7273ef4 100644 --- a/test/unit_tests/cvodes/C_serial/cvs_test_tstop.c +++ b/test/unit_tests/cvodes/C_serial/cvs_test_tstop.c @@ -69,6 +69,12 @@ int main(int argc, char* argv[]) sunrealtype dt_tstop = SUN_RCONST(0.30); sunrealtype tret = ZERO; sunrealtype tcur = ZERO; + sunrealtype dt_cur = ZERO; + sunrealtype dt_last = ZERO; + + /* if an argument supplied, call SetSkipAdaptStopTime with that value */ + sunbooleantype skip_adapt_stop_time_threshold = SUNFALSE; + if (argc > 1) { skip_adapt_stop_time_threshold = SUNTRUE; } /* -------------- * Create context @@ -120,6 +126,12 @@ int main(int argc, char* argv[]) flag = CVodeSetStopTime(cvode_mem, tstop); if (flag) { return 1; } + if (skip_adapt_stop_time_threshold) + { + flag = CVodeSetSkipAdaptStopTime(cvode_mem, 1); + if (flag) { return 1; } + } + /* --------------- * Advance in time * --------------- */ @@ -162,6 +174,20 @@ int main(int argc, char* argv[]) break; } + if (skip_adapt_stop_time_threshold) + { + flag = CVodeGetCurrentStep(cvode_mem, &dt_cur); + if (flag) { return 1; } + flag = CVodeGetLastStep(cvode_mem, &dt_last); + if (flag) { return 1; } + if (dt_cur <= dt_last) + { + printf("ERROR: Expected dt_cur > dt_last (%" GSYM " <= %" GSYM ")\n", dt_cur, dt_last); + flag = 1; + break; + } + } + /* Update stop time */ tstop += dt_tstop; flag = CVodeSetStopTime(cvode_mem, tstop); diff --git a/test/unit_tests/ida/C_serial/CMakeLists.txt b/test/unit_tests/ida/C_serial/CMakeLists.txt index 46deec5135..abe314a673 100644 --- a/test/unit_tests/ida/C_serial/CMakeLists.txt +++ b/test/unit_tests/ida/C_serial/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # List of test tuples of the form "name\;args" -set(unit_tests "ida_test_getuserdata\;" "ida_test_tstop\;") +set(unit_tests "ida_test_getuserdata\;" "ida_test_tstop\;" "ida_test_tstop\;1") # Add the build and install targets for each test foreach(test_tuple ${unit_tests}) diff --git a/test/unit_tests/ida/C_serial/ida_test_tstop.c b/test/unit_tests/ida/C_serial/ida_test_tstop.c index 02fd5c49e2..3f35cc7778 100644 --- a/test/unit_tests/ida/C_serial/ida_test_tstop.c +++ b/test/unit_tests/ida/C_serial/ida_test_tstop.c @@ -72,6 +72,13 @@ int main(int argc, char* argv[]) sunrealtype dt_tstop = SUN_RCONST(0.30); sunrealtype tret = ZERO; sunrealtype tcur = ZERO; + sunrealtype dt_cur = ZERO; + sunrealtype dt_last = ZERO; + + /* if an argument supplied, call SetSkipAdaptStopTime with that value */ + sunbooleantype skip_adapt_stop_time_threshold = SUNFALSE; + if (argc > 1) { skip_adapt_stop_time_threshold = SUNTRUE; } + /* -------------- * Create context @@ -127,6 +134,12 @@ int main(int argc, char* argv[]) flag = IDASetStopTime(ida_mem, tstop); if (flag) { return 1; } + if (skip_adapt_stop_time_threshold) + { + flag = IDASetSkipAdaptStopTime(ida_mem, 1); + if (flag) { return 1; } + } + /* --------------- * Advance in time * --------------- */ @@ -169,6 +182,20 @@ int main(int argc, char* argv[]) break; } + if (skip_adapt_stop_time_threshold) + { + flag = IDAGetCurrentStep(ida_mem, &dt_cur); + if (flag) { return 1; } + flag = IDAGetLastStep(ida_mem, &dt_last); + if (flag) { return 1; } + if (dt_cur <= dt_last) + { + printf("ERROR: Expected dt_cur > dt_last (%" GSYM " <= %" GSYM ")\n", dt_cur, dt_last); + flag = 1; + break; + } + } + /* Update stop time */ tstop += dt_tstop; flag = IDASetStopTime(ida_mem, tstop); diff --git a/test/unit_tests/idas/C_serial/CMakeLists.txt b/test/unit_tests/idas/C_serial/CMakeLists.txt index 13fe2bc23d..494b7de7c6 100644 --- a/test/unit_tests/idas/C_serial/CMakeLists.txt +++ b/test/unit_tests/idas/C_serial/CMakeLists.txt @@ -18,7 +18,7 @@ # --------------------------------------------------------------- # List of test tuples of the form "name\;args" -set(unit_tests "idas_test_getuserdata\;" "idas_test_tstop\;") +set(unit_tests "idas_test_getuserdata\;" "idas_test_tstop\;" "idas_test_tstop\;1") # Add the build and install targets for each test foreach(test_tuple ${unit_tests}) diff --git a/test/unit_tests/idas/C_serial/idas_test_tstop.c b/test/unit_tests/idas/C_serial/idas_test_tstop.c index 0c6302ee68..a2c2265c92 100644 --- a/test/unit_tests/idas/C_serial/idas_test_tstop.c +++ b/test/unit_tests/idas/C_serial/idas_test_tstop.c @@ -72,6 +72,12 @@ int main(int argc, char* argv[]) sunrealtype dt_tstop = SUN_RCONST(0.30); sunrealtype tret = ZERO; sunrealtype tcur = ZERO; + sunrealtype dt_cur = ZERO; + sunrealtype dt_last = ZERO; + + /* if an argument supplied, call SetSkipAdaptStopTime with that value */ + sunbooleantype skip_adapt_stop_time_threshold = SUNFALSE; + if (argc > 1) { skip_adapt_stop_time_threshold = SUNTRUE; } /* -------------- * Create context @@ -127,6 +133,12 @@ int main(int argc, char* argv[]) flag = IDASetStopTime(ida_mem, tstop); if (flag) { return 1; } + if (skip_adapt_stop_time_threshold) + { + flag = IDASetSkipAdaptStopTime(ida_mem, 1); + if (flag) { return 1; } + } + /* --------------- * Advance in time * --------------- */ @@ -169,6 +181,20 @@ int main(int argc, char* argv[]) break; } + if (skip_adapt_stop_time_threshold) + { + flag = IDAGetCurrentStep(ida_mem, &dt_cur); + if (flag) { return 1; } + flag = IDAGetLastStep(ida_mem, &dt_last); + if (flag) { return 1; } + if (dt_cur <= dt_last) + { + printf("ERROR: Expected dt_cur > dt_last (%" GSYM " <= %" GSYM ")\n", dt_cur, dt_last); + flag = 1; + break; + } + } + /* Update stop time */ tstop += dt_tstop; flag = IDASetStopTime(ida_mem, tstop); From 4ac6457851467b26ebcf68374751c4fc40e14a0e Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Tue, 26 May 2026 19:34:09 -0400 Subject: [PATCH 292/298] Pulled action to set tstoplimited outside of if statement, so that it is always a valid flag --- src/arkode/arkode.c | 4 ++-- src/cvode/cvode.c | 6 +++--- src/cvodes/cvodes.c | 18 +++++++++--------- src/ida/ida.c | 6 +++--- src/idas/idas.c | 18 +++++++++--------- 5 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 6b559f1c09..9f99161052 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -137,7 +137,7 @@ int ARKodeResize(void* arkode_mem, N_Vector y0, sunrealtype hscale, ark_mem->hprime = (ark_mem->tstop - ark_mem->tcur) * (ONE - FOUR * ark_mem->uround); ark_mem->eta = ark_mem->hprime / ark_mem->h; - if (ark_mem->skipadapttstop) { ark_mem->tstoplimited = SUNTRUE; } + ark_mem->tstoplimited = SUNTRUE; } } } @@ -1132,7 +1132,7 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, ark_mem->hprime = (ark_mem->tstop - ark_mem->tcur) * (ONE - FOUR * ark_mem->uround); ark_mem->eta = ark_mem->hprime / ark_mem->h; - if (ark_mem->skipadapttstop) ark_mem->tstoplimited = SUNTRUE; + ark_mem->tstoplimited = SUNTRUE; } } diff --git a/src/cvode/cvode.c b/src/cvode/cvode.c index 8fea5d9674..8761f4aafd 100644 --- a/src/cvode/cvode.c +++ b/src/cvode/cvode.c @@ -1216,9 +1216,9 @@ int CVode(void* cvode_mem, sunrealtype tout, N_Vector yout, sunrealtype* tret, { if ((cv_mem->cv_tn + cv_mem->cv_h - cv_mem->cv_tstop) * cv_mem->cv_h > ZERO) { + cv_mem->cv_tstoplimited = SUNTRUE; if (cv_mem->cv_skipadapttstop) { - cv_mem->cv_tstoplimited = SUNTRUE; cv_mem->cv_hsave = cv_mem->cv_h; cv_mem->cv_qsave = cv_mem->cv_q; } @@ -1409,9 +1409,9 @@ int CVode(void* cvode_mem, sunrealtype tout, N_Vector yout, sunrealtype* tret, cv_mem->cv_h > ZERO) { + cv_mem->cv_tstoplimited = SUNTRUE; if (cv_mem->cv_skipadapttstop) { - cv_mem->cv_tstoplimited = SUNTRUE; cv_mem->cv_hsave = cv_mem->cv_hprime; cv_mem->cv_qsave = cv_mem->cv_q; } @@ -1638,9 +1638,9 @@ int CVode(void* cvode_mem, sunrealtype tout, N_Vector yout, sunrealtype* tret, cv_mem->cv_h > ZERO) { + cv_mem->cv_tstoplimited = SUNTRUE; if (cv_mem->cv_skipadapttstop) { - cv_mem->cv_tstoplimited = SUNTRUE; cv_mem->cv_hsave = cv_mem->cv_hprime; cv_mem->cv_qsave = cv_mem->cv_q; } diff --git a/src/cvodes/cvodes.c b/src/cvodes/cvodes.c index eaabfe648d..9bf6ff0c20 100644 --- a/src/cvodes/cvodes.c +++ b/src/cvodes/cvodes.c @@ -3150,11 +3150,11 @@ int CVode(void* cvode_mem, sunrealtype tout, N_Vector yout, sunrealtype* tret, { if ((cv_mem->cv_tn + cv_mem->cv_h - cv_mem->cv_tstop) * cv_mem->cv_h > ZERO) { + cv_mem->cv_tstoplimited = SUNTRUE; if (cv_mem->cv_skipadapttstop) { - cv_mem->cv_tstoplimited = SUNTRUE; - cv_mem->cv_hsave = cv_mem->cv_h; - cv_mem->cv_qsave = cv_mem->cv_q; + cv_mem->cv_hsave = cv_mem->cv_h; + cv_mem->cv_qsave = cv_mem->cv_q; } cv_mem->cv_h = (cv_mem->cv_tstop - cv_mem->cv_tn) * (ONE - FOUR * cv_mem->cv_uround); @@ -3385,11 +3385,11 @@ int CVode(void* cvode_mem, sunrealtype tout, N_Vector yout, sunrealtype* tret, cv_mem->cv_h > ZERO) { + cv_mem->cv_tstoplimited = SUNTRUE; if (cv_mem->cv_skipadapttstop) { - cv_mem->cv_tstoplimited = SUNTRUE; - cv_mem->cv_hsave = cv_mem->cv_hprime; - cv_mem->cv_qsave = cv_mem->cv_q; + cv_mem->cv_hsave = cv_mem->cv_hprime; + cv_mem->cv_qsave = cv_mem->cv_q; } cv_mem->cv_hprime = (cv_mem->cv_tstop - cv_mem->cv_tn) * (ONE - FOUR * cv_mem->cv_uround); @@ -3667,11 +3667,11 @@ int CVode(void* cvode_mem, sunrealtype tout, N_Vector yout, sunrealtype* tret, cv_mem->cv_h > ZERO) { + cv_mem->cv_tstoplimited = SUNTRUE; if (cv_mem->cv_skipadapttstop) { - cv_mem->cv_tstoplimited = SUNTRUE; - cv_mem->cv_hsave = cv_mem->cv_hprime; - cv_mem->cv_qsave = cv_mem->cv_q; + cv_mem->cv_hsave = cv_mem->cv_hprime; + cv_mem->cv_qsave = cv_mem->cv_q; } cv_mem->cv_hprime = (cv_mem->cv_tstop - cv_mem->cv_tn) * (ONE - FOUR * cv_mem->cv_uround); diff --git a/src/ida/ida.c b/src/ida/ida.c index 02439baa0e..42584a805a 100644 --- a/src/ida/ida.c +++ b/src/ida/ida.c @@ -1220,9 +1220,9 @@ int IDASolve(void* ida_mem, sunrealtype tout, sunrealtype* tret, N_Vector yret, IDA_mem->ida_hh > ZERO) { + IDA_mem->ida_tstoplimited = SUNTRUE; if (IDA_mem->ida_skipadapttstop) { - IDA_mem->ida_tstoplimited = SUNTRUE; IDA_mem->ida_hsave = IDA_mem->ida_hh; IDA_mem->ida_ksave = IDA_mem->ida_kk; } @@ -2229,9 +2229,9 @@ static int IDAStopTest1(IDAMem IDA_mem, sunrealtype tout, sunrealtype* tret, IDA_mem->ida_hh > ZERO) { + IDA_mem->ida_tstoplimited = SUNTRUE; if (IDA_mem->ida_skipadapttstop) { - IDA_mem->ida_tstoplimited = SUNTRUE; IDA_mem->ida_hsave = IDA_mem->ida_hh; IDA_mem->ida_ksave = IDA_mem->ida_kk; } @@ -2332,9 +2332,9 @@ static int IDAStopTest2(IDAMem IDA_mem, sunrealtype tout, sunrealtype* tret, IDA_mem->ida_hh > ZERO) { + IDA_mem->ida_tstoplimited = SUNTRUE; if (IDA_mem->ida_skipadapttstop) { - IDA_mem->ida_tstoplimited = SUNTRUE; IDA_mem->ida_hsave = IDA_mem->ida_hh; IDA_mem->ida_ksave = IDA_mem->ida_kk; } diff --git a/src/idas/idas.c b/src/idas/idas.c index f2065b2a03..5b08b7b476 100644 --- a/src/idas/idas.c +++ b/src/idas/idas.c @@ -2716,11 +2716,11 @@ int IDASolve(void* ida_mem, sunrealtype tout, sunrealtype* tret, N_Vector yret, IDA_mem->ida_hh > ZERO) { + IDA_mem->ida_tstoplimited = SUNTRUE; if (IDA_mem->ida_skipadapttstop) { - IDA_mem->ida_tstoplimited = SUNTRUE; - IDA_mem->ida_hsave = IDA_mem->ida_hh; - IDA_mem->ida_ksave = IDA_mem->ida_kk; + IDA_mem->ida_hsave = IDA_mem->ida_hh; + IDA_mem->ida_ksave = IDA_mem->ida_kk; } IDA_mem->ida_hh = (IDA_mem->ida_tstop - IDA_mem->ida_tn) * (ONE - FOUR * IDA_mem->ida_uround); @@ -5637,11 +5637,11 @@ static int IDAStopTest1(IDAMem IDA_mem, sunrealtype tout, sunrealtype* tret, IDA_mem->ida_hh > ZERO) { + IDA_mem->ida_tstoplimited = SUNTRUE; if (IDA_mem->ida_skipadapttstop) { - IDA_mem->ida_tstoplimited = SUNTRUE; - IDA_mem->ida_hsave = IDA_mem->ida_hh; - IDA_mem->ida_ksave = IDA_mem->ida_kk; + IDA_mem->ida_hsave = IDA_mem->ida_hh; + IDA_mem->ida_ksave = IDA_mem->ida_kk; } IDA_mem->ida_hh = (IDA_mem->ida_tstop - IDA_mem->ida_tn) * (ONE - FOUR * IDA_mem->ida_uround); @@ -5740,11 +5740,11 @@ static int IDAStopTest2(IDAMem IDA_mem, sunrealtype tout, sunrealtype* tret, IDA_mem->ida_hh > ZERO) { + IDA_mem->ida_tstoplimited = SUNTRUE; if (IDA_mem->ida_skipadapttstop) { - IDA_mem->ida_tstoplimited = SUNTRUE; - IDA_mem->ida_hsave = IDA_mem->ida_hh; - IDA_mem->ida_ksave = IDA_mem->ida_kk; + IDA_mem->ida_hsave = IDA_mem->ida_hh; + IDA_mem->ida_ksave = IDA_mem->ida_kk; } IDA_mem->ida_hh = (IDA_mem->ida_tstop - IDA_mem->ida_tn) * (ONE - FOUR * IDA_mem->ida_uround); From ad14121a20a16d0eabcfeaa40d1ff13f4948927e Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Wed, 27 May 2026 11:44:25 -0400 Subject: [PATCH 293/298] Snake case --- .../sundials4py/arkode/arkode_generated.hpp | 2 +- .../sundials4py/cvodes/cvodes_generated.hpp | 2 +- bindings/sundials4py/idas/idas_generated.hpp | 2 +- include/arkode/arkode.h | 2 +- include/cvode/cvode.h | 2 +- include/cvodes/cvodes.h | 2 +- include/ida/ida.h | 2 +- include/idas/idas.h | 2 +- src/arkode/arkode.c | 18 ++++++------- src/arkode/arkode_impl.h | 4 +-- src/arkode/arkode_io.c | 8 +++--- src/arkode/fmod_int32/farkode_mod.f90 | 6 ++--- src/arkode/fmod_int64/farkode_mod.f90 | 6 ++--- src/cvode/cvode.c | 24 ++++++++--------- src/cvode/cvode_impl.h | 4 +-- src/cvode/cvode_io.c | 2 +- src/cvode/fmod_int32/fcvode_mod.f90 | 6 ++--- src/cvode/fmod_int64/fcvode_mod.f90 | 6 ++--- src/cvodes/cvodes.c | 24 ++++++++--------- src/cvodes/cvodes_impl.h | 4 +-- src/cvodes/cvodes_io.c | 2 +- src/cvodes/fmod_int32/fcvodes_mod.f90 | 6 ++--- src/cvodes/fmod_int64/fcvodes_mod.f90 | 6 ++--- src/ida/fmod_int32/fida_mod.f90 | 6 ++--- src/ida/fmod_int64/fida_mod.f90 | 6 ++--- src/ida/ida.c | 26 +++++++++---------- src/ida/ida_impl.h | 4 +-- src/ida/ida_io.c | 2 +- src/idas/fmod_int32/fidas_mod.f90 | 6 ++--- src/idas/fmod_int64/fidas_mod.f90 | 6 ++--- src/idas/idas.c | 26 +++++++++---------- src/idas/idas_impl.h | 4 +-- src/idas/idas_io.c | 2 +- 33 files changed, 115 insertions(+), 115 deletions(-) diff --git a/bindings/sundials4py/arkode/arkode_generated.hpp b/bindings/sundials4py/arkode/arkode_generated.hpp index 4c457cf204..256d3b2ded 100644 --- a/bindings/sundials4py/arkode/arkode_generated.hpp +++ b/bindings/sundials4py/arkode/arkode_generated.hpp @@ -204,7 +204,7 @@ m.def("ARKodeSetStopTime", ARKodeSetStopTime, nb::arg("arkode_mem"), m.def("ARKodeClearStopTime", ARKodeClearStopTime, nb::arg("arkode_mem")); m.def("ARKodeSkipAdaptStopTime", ARKodeSkipAdaptStopTime, nb::arg("arkode_mem"), - nb::arg("skipadapttstop")); + nb::arg("skip_adapt_tstop")); m.def("ARKodeSetFixedStep", ARKodeSetFixedStep, nb::arg("arkode_mem"), nb::arg("hfixed")); diff --git a/bindings/sundials4py/cvodes/cvodes_generated.hpp b/bindings/sundials4py/cvodes/cvodes_generated.hpp index 540de53e48..5364fa312f 100644 --- a/bindings/sundials4py/cvodes/cvodes_generated.hpp +++ b/bindings/sundials4py/cvodes/cvodes_generated.hpp @@ -167,7 +167,7 @@ m.def("CVodeSetInterpolateStopTime", CVodeSetInterpolateStopTime, m.def("CVodeClearStopTime", CVodeClearStopTime, nb::arg("cvode_mem")); m.def("CVodeSkipAdaptStopTime", CVodeSkipAdaptStopTime, nb::arg("cvode_mem"), - nb::arg("skipadapttstop")); + nb::arg("skip_adapt_tstop")); m.def("CVodeSetEtaFixedStepBounds", CVodeSetEtaFixedStepBounds, nb::arg("cvode_mem"), nb::arg("eta_min_fx"), nb::arg("eta_max_fx")); diff --git a/bindings/sundials4py/idas/idas_generated.hpp b/bindings/sundials4py/idas/idas_generated.hpp index 317e2f559e..77cffc7b49 100644 --- a/bindings/sundials4py/idas/idas_generated.hpp +++ b/bindings/sundials4py/idas/idas_generated.hpp @@ -118,7 +118,7 @@ m.def("IDASetStopTime", IDASetStopTime, nb::arg("ida_mem"), nb::arg("tstop")); m.def("IDAClearStopTime", IDAClearStopTime, nb::arg("ida_mem")); m.def("IDASkipAdaptStopTime", IDASkipAdaptStopTime, nb::arg("ida_mem"), - nb::arg("skipadapttstop")); + nb::arg("skip_adapt_tstop")); m.def("IDASetMaxErrTestFails", IDASetMaxErrTestFails, nb::arg("ida_mem"), nb::arg("maxnef")); diff --git a/include/arkode/arkode.h b/include/arkode/arkode.h index e314ffee48..156bfa81c7 100644 --- a/include/arkode/arkode.h +++ b/include/arkode/arkode.h @@ -290,7 +290,7 @@ SUNDIALS_EXPORT int ARKodeSetInterpolateStopTime(void* arkode_mem, SUNDIALS_EXPORT int ARKodeSetStopTime(void* arkode_mem, sunrealtype tstop); SUNDIALS_EXPORT int ARKodeClearStopTime(void* arkode_mem); SUNDIALS_EXPORT int ARKodeSetSkipAdaptStopTime(void* arkode_mem, - sunbooleantype skipadapttstop); + sunbooleantype skip_adapt_tstop); SUNDIALS_EXPORT int ARKodeSetFixedStep(void* arkode_mem, sunrealtype hfixed); SUNDIALS_EXPORT int ARKodeSetStepDirection(void* arkode_mem, sunrealtype stepdir); SUNDIALS_EXPORT int ARKodeSetUserData(void* arkode_mem, void* user_data); diff --git a/include/cvode/cvode.h b/include/cvode/cvode.h index 71516c45a5..c8b127c629 100644 --- a/include/cvode/cvode.h +++ b/include/cvode/cvode.h @@ -156,7 +156,7 @@ SUNDIALS_EXPORT int CVodeSetInterpolateStopTime(void* cvode_mem, sunbooleantype interp); SUNDIALS_EXPORT int CVodeClearStopTime(void* cvode_mem); SUNDIALS_EXPORT int CVodeSetSkipAdaptStopTime(void* cvode_mem, - sunbooleantype skipadapttstop); + sunbooleantype skip_adapt_tstop); SUNDIALS_EXPORT int CVodeSetUseIntegratorFusedKernels(void* cvode_mem, sunbooleantype onoff); SUNDIALS_EXPORT int CVodeSetUserData(void* cvode_mem, void* user_data); diff --git a/include/cvodes/cvodes.h b/include/cvodes/cvodes.h index 6373d61dc4..49a67bf6a2 100644 --- a/include/cvodes/cvodes.h +++ b/include/cvodes/cvodes.h @@ -225,7 +225,7 @@ SUNDIALS_EXPORT int CVodeSetInterpolateStopTime(void* cvode_mem, sunbooleantype interp); SUNDIALS_EXPORT int CVodeClearStopTime(void* cvode_mem); SUNDIALS_EXPORT int CVodeSetSkipAdaptStopTime(void* cvode_mem, - sunbooleantype skipadapttstop); + sunbooleantype skip_adapt_tstop); SUNDIALS_EXPORT int CVodeSetUserData(void* cvode_mem, void* user_data); /* Optional step adaptivity input functions */ diff --git a/include/ida/ida.h b/include/ida/ida.h index 0583c3b119..ac6898dbe9 100644 --- a/include/ida/ida.h +++ b/include/ida/ida.h @@ -147,7 +147,7 @@ SUNDIALS_EXPORT int IDASetMinStep(void* ida_mem, sunrealtype hmin); SUNDIALS_EXPORT int IDASetStopTime(void* ida_mem, sunrealtype tstop); SUNDIALS_EXPORT int IDAClearStopTime(void* ida_mem); SUNDIALS_EXPORT int IDASetSkipAdaptStopTime(void* ida_mem, - sunbooleantype skipadapttstop); + sunbooleantype skip_adapt_tstop); SUNDIALS_EXPORT int IDASetMaxErrTestFails(void* ida_mem, int maxnef); SUNDIALS_EXPORT int IDASetSuppressAlg(void* ida_mem, sunbooleantype suppressalg); SUNDIALS_EXPORT int IDASetId(void* ida_mem, N_Vector id); diff --git a/include/idas/idas.h b/include/idas/idas.h index c3c6776376..dad3f48035 100644 --- a/include/idas/idas.h +++ b/include/idas/idas.h @@ -211,7 +211,7 @@ SUNDIALS_EXPORT int IDASetMinStep(void* ida_mem, sunrealtype hmin); SUNDIALS_EXPORT int IDASetStopTime(void* ida_mem, sunrealtype tstop); SUNDIALS_EXPORT int IDAClearStopTime(void* ida_mem); SUNDIALS_EXPORT int IDASetSkipAdaptStopTime(void* ida_mem, - sunbooleantype skipadapttstop); + sunbooleantype skip_adapt_tstop); SUNDIALS_EXPORT int IDASetMaxErrTestFails(void* ida_mem, int maxnef); SUNDIALS_EXPORT int IDASetSuppressAlg(void* ida_mem, sunbooleantype suppressalg); SUNDIALS_EXPORT int IDASetId(void* ida_mem, N_Vector id); diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 9f99161052..2f0a2d67d6 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -128,7 +128,7 @@ int ARKodeResize(void* arkode_mem, N_Vector y0, sunrealtype hscale, ark_mem->hprime *= hscale; /* If next step would overtake tstop, adjust stepsize */ - ark_mem->tstoplimited = SUNFALSE; + ark_mem->tstop_limited = SUNFALSE; if (ark_mem->tstopset) { if ((ark_mem->tcur + ark_mem->hprime - ark_mem->tstop) * ark_mem->hprime > @@ -137,7 +137,7 @@ int ARKodeResize(void* arkode_mem, N_Vector y0, sunrealtype hscale, ark_mem->hprime = (ark_mem->tstop - ark_mem->tcur) * (ONE - FOUR * ark_mem->uround); ark_mem->eta = ark_mem->hprime / ark_mem->h; - ark_mem->tstoplimited = SUNTRUE; + ark_mem->tstop_limited = SUNTRUE; } } } @@ -869,7 +869,7 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, if (ark_mem->hprime != ark_mem->h) { ark_mem->h = ark_mem->h * ark_mem->eta; - if (!ark_mem->skipadapttstop) ark_mem->next_h = ark_mem->h; + if (!ark_mem->skip_adapt_tstop) ark_mem->next_h = ark_mem->h; } if (ark_mem->fixedstep) { @@ -1095,7 +1095,7 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, } /* Check if tn is at tstop or near tstop */ - ark_mem->tstoplimited = SUNFALSE; + ark_mem->tstop_limited = SUNFALSE; if (ark_mem->tstopset) { troundoff = FUZZ_FACTOR * ark_mem->uround * @@ -1132,7 +1132,7 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, ark_mem->hprime = (ark_mem->tstop - ark_mem->tcur) * (ONE - FOUR * ark_mem->uround); ark_mem->eta = ark_mem->hprime / ark_mem->h; - ark_mem->tstoplimited = SUNTRUE; + ark_mem->tstop_limited = SUNTRUE; } } @@ -1348,8 +1348,8 @@ void ARKodePrintMem(void* arkode_mem, FILE* outfile) fprintf(outfile, "user_efun = %i\n", ark_mem->user_efun); fprintf(outfile, "tstopset = %i\n", ark_mem->tstopset); fprintf(outfile, "tstopinterp = %i\n", ark_mem->tstopinterp); - fprintf(outfile, "tstoplimited = %i\n", ark_mem->tstoplimited); - fprintf(outfile, "skipadapttstop = %i\n", ark_mem->skipadapttstop); + fprintf(outfile, "tstop_limited = %i\n", ark_mem->tstop_limited); + fprintf(outfile, "skip_adapt_tstop = %i\n", ark_mem->skip_adapt_tstop); fprintf(outfile, "tstop = " SUN_FORMAT_G "\n", ark_mem->tstop); fprintf(outfile, "VabstolMallocDone = %i\n", ark_mem->VabstolMallocDone); fprintf(outfile, "MallocDone = %i\n", ark_mem->MallocDone); @@ -2821,7 +2821,7 @@ int arkCompleteStep(ARKodeMem ark_mem, sunrealtype dsm) /* Notify time step controller object of successful step (skip this if the previous step was stop-time-limited) */ - if (ark_mem->hadapt_mem->hcontroller && !ark_mem->tstoplimited) + if (ark_mem->hadapt_mem->hcontroller && !ark_mem->tstop_limited) { retval = SUNAdaptController_UpdateH(ark_mem->hadapt_mem->hcontroller, ark_mem->h, dsm); @@ -3461,7 +3461,7 @@ int arkCheckTemporalError(ARKodeMem ark_mem, int* nflagPtr, int* nefPtr, /* If a stop-time-limited step will succeed, set eta so that the step size reverts to the last "full size" successful step for the next attempt */ - if (ark_mem->tstoplimited && dsm <= ONE) + if (ark_mem->tstop_limited && dsm <= ONE) { ark_mem->eta = ark_mem->hold / ark_mem->h; return (ARK_SUCCESS); diff --git a/src/arkode/arkode_impl.h b/src/arkode/arkode_impl.h index e785d593af..5c66178422 100644 --- a/src/arkode/arkode_impl.h +++ b/src/arkode/arkode_impl.h @@ -502,8 +502,8 @@ struct ARKodeMemRec /* Tstop information */ sunbooleantype tstopset; sunbooleantype tstopinterp; - sunbooleantype tstoplimited; - sunbooleantype skipadapttstop; + sunbooleantype tstop_limited; + sunbooleantype skip_adapt_tstop; sunrealtype tstop; /* Time step data */ diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index fa1b35ad2b..f7f755596a 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -85,8 +85,8 @@ int ARKodeSetDefaults(void* arkode_mem) ark_mem->hmax_inv = ZERO; /* no maximum step size */ ark_mem->tstopset = SUNFALSE; /* no stop time set */ ark_mem->tstopinterp = SUNFALSE; /* copy at stop time */ - ark_mem->tstoplimited = SUNFALSE; /* tstop did not limit last step */ - ark_mem->skipadapttstop = SUNFALSE; /* tstop-limited steps can affect adaptivity */ + ark_mem->tstop_limited = SUNFALSE; /* tstop did not limit last step */ + ark_mem->skip_adapt_tstop = SUNFALSE; /* tstop-limited steps can affect adaptivity */ ark_mem->tstop = ZERO; /* no fixed stop time */ ark_mem->hadapt_mem->etamx1 = ETAMX1; /* max change on first step */ ark_mem->hadapt_mem->etamxf = ETAMXF; /* max change on error-failed step */ @@ -1290,7 +1290,7 @@ int ARKodeSetSkipAdaptStopTime(void* arkode_mem, sunbooleantype skip) return (ARK_MEM_NULL); } ark_mem = (ARKodeMem)arkode_mem; - ark_mem->skipadapttstop = skip; + ark_mem->skip_adapt_tstop = skip; return (ARK_SUCCESS); } @@ -3518,7 +3518,7 @@ int ARKodeWriteParameters(void* arkode_mem, FILE* fp) (void)SUNAdaptController_Write(ark_mem->hadapt_mem->hcontroller, fp); } fprintf(fp, " Skip tstop-limited steps from affecting temporal adaptivity = %i\n", - ark_mem->skipadapttstop); + ark_mem->skip_adapt_tstop); fprintf(fp, " Maximum number of error test failures = %i\n", ark_mem->maxnef); fprintf(fp, " Maximum number of convergence test failures = %i\n", diff --git a/src/arkode/fmod_int32/farkode_mod.f90 b/src/arkode/fmod_int32/farkode_mod.f90 index 462eeb08f5..365591dc4d 100644 --- a/src/arkode/fmod_int32/farkode_mod.f90 +++ b/src/arkode/fmod_int32/farkode_mod.f90 @@ -2945,18 +2945,18 @@ function FARKodeClearStopTime(arkode_mem) & swig_result = fresult end function -function FARKodeSkipAdaptStopTime(arkode_mem, skipadapttstop) & +function FARKodeSkipAdaptStopTime(arkode_mem, skip_adapt_tstop) & result(swig_result) use, intrinsic :: ISO_C_BINDING integer(C_INT) :: swig_result type(C_PTR) :: arkode_mem -integer(C_INT), intent(in) :: skipadapttstop +integer(C_INT), intent(in) :: skip_adapt_tstop integer(C_INT) :: fresult type(C_PTR) :: farg1 integer(C_INT) :: farg2 farg1 = arkode_mem -farg2 = skipadapttstop +farg2 = skip_adapt_tstop fresult = swigc_FARKodeSkipAdaptStopTime(farg1, farg2) swig_result = fresult end function diff --git a/src/arkode/fmod_int64/farkode_mod.f90 b/src/arkode/fmod_int64/farkode_mod.f90 index 1dc2368461..ff2a759ca3 100644 --- a/src/arkode/fmod_int64/farkode_mod.f90 +++ b/src/arkode/fmod_int64/farkode_mod.f90 @@ -2945,18 +2945,18 @@ function FARKodeClearStopTime(arkode_mem) & swig_result = fresult end function -function FARKodeSkipAdaptStopTime(arkode_mem, skipadapttstop) & +function FARKodeSkipAdaptStopTime(arkode_mem, skip_adapt_tstop) & result(swig_result) use, intrinsic :: ISO_C_BINDING integer(C_INT) :: swig_result type(C_PTR) :: arkode_mem -integer(C_INT), intent(in) :: skipadapttstop +integer(C_INT), intent(in) :: skip_adapt_tstop integer(C_INT) :: fresult type(C_PTR) :: farg1 integer(C_INT) :: farg2 farg1 = arkode_mem -farg2 = skipadapttstop +farg2 = skip_adapt_tstop fresult = swigc_FARKodeSkipAdaptStopTime(farg1, farg2) swig_result = fresult end function diff --git a/src/cvode/cvode.c b/src/cvode/cvode.c index 8761f4aafd..b2de0dda20 100644 --- a/src/cvode/cvode.c +++ b/src/cvode/cvode.c @@ -306,8 +306,8 @@ void* CVodeCreate(int lmm, SUNContext sunctx) cv_mem->cv_small_nef = SMALL_NEF_DEFAULT; cv_mem->cv_tstopset = SUNFALSE; cv_mem->cv_tstopinterp = SUNFALSE; - cv_mem->cv_tstoplimited = SUNFALSE; - cv_mem->cv_skipadapttstop = SUNFALSE; + cv_mem->cv_tstop_limited = SUNFALSE; + cv_mem->cv_skip_adapt_tstop = SUNFALSE; cv_mem->cv_maxnef = MXNEF; cv_mem->cv_maxncf = MXNCF; cv_mem->cv_nlscoef = CORTES; @@ -1211,13 +1211,13 @@ int CVode(void* cvode_mem, sunrealtype tout, N_Vector yout, sunrealtype* tret, /* Check for approach to tstop */ - cv_mem->cv_tstoplimited = SUNFALSE; + cv_mem->cv_tstop_limited = SUNFALSE; if (cv_mem->cv_tstopset) { if ((cv_mem->cv_tn + cv_mem->cv_h - cv_mem->cv_tstop) * cv_mem->cv_h > ZERO) { - cv_mem->cv_tstoplimited = SUNTRUE; - if (cv_mem->cv_skipadapttstop) + cv_mem->cv_tstop_limited = SUNTRUE; + if (cv_mem->cv_skip_adapt_tstop) { cv_mem->cv_hsave = cv_mem->cv_h; cv_mem->cv_qsave = cv_mem->cv_q; @@ -1376,7 +1376,7 @@ int CVode(void* cvode_mem, sunrealtype tout, N_Vector yout, sunrealtype* tret, } /* end of root stop check */ /* Test for tn at tstop or near tstop */ - cv_mem->cv_tstoplimited = SUNFALSE; + cv_mem->cv_tstop_limited = SUNFALSE; if (cv_mem->cv_tstopset) { /* Test for tn at tstop */ @@ -1409,8 +1409,8 @@ int CVode(void* cvode_mem, sunrealtype tout, N_Vector yout, sunrealtype* tret, cv_mem->cv_h > ZERO) { - cv_mem->cv_tstoplimited = SUNTRUE; - if (cv_mem->cv_skipadapttstop) + cv_mem->cv_tstop_limited = SUNTRUE; + if (cv_mem->cv_skip_adapt_tstop) { cv_mem->cv_hsave = cv_mem->cv_hprime; cv_mem->cv_qsave = cv_mem->cv_q; @@ -1609,7 +1609,7 @@ int CVode(void* cvode_mem, sunrealtype tout, N_Vector yout, sunrealtype* tret, } /* Check if tn is at tstop or near tstop */ - cv_mem->cv_tstoplimited = SUNFALSE; + cv_mem->cv_tstop_limited = SUNFALSE; if (cv_mem->cv_tstopset) { troundoff = FUZZ_FACTOR * cv_mem->cv_uround * @@ -1638,8 +1638,8 @@ int CVode(void* cvode_mem, sunrealtype tout, N_Vector yout, sunrealtype* tret, cv_mem->cv_h > ZERO) { - cv_mem->cv_tstoplimited = SUNTRUE; - if (cv_mem->cv_skipadapttstop) + cv_mem->cv_tstop_limited = SUNTRUE; + if (cv_mem->cv_skip_adapt_tstop) { cv_mem->cv_hsave = cv_mem->cv_hprime; cv_mem->cv_qsave = cv_mem->cv_q; @@ -3648,7 +3648,7 @@ static void cvPrepareNextStep(CVodeMem cv_mem, sunrealtype dsm) cv_mem->cv_hprime = cv_mem->cv_h; cv_mem->cv_eta = ONE; } - else if (cv_mem->cv_skipadapttstop && cv_mem->cv_tstoplimited) + else if (cv_mem->cv_skip_adapt_tstop && cv_mem->cv_tstop_limited) { /* If the current step was limited by tstop, set the upcoming step size and order to match the values just prior to the tstop-limited step */ diff --git a/src/cvode/cvode_impl.h b/src/cvode/cvode_impl.h index 1f8ef6b657..d81590b3e6 100644 --- a/src/cvode/cvode_impl.h +++ b/src/cvode/cvode_impl.h @@ -250,8 +250,8 @@ typedef struct CVodeMemRec sunbooleantype cv_tstopset; sunbooleantype cv_tstopinterp; - sunbooleantype cv_tstoplimited; - sunbooleantype cv_skipadapttstop; + sunbooleantype cv_tstop_limited; + sunbooleantype cv_skip_adapt_tstop; int cv_qsave; sunrealtype cv_hsave; sunrealtype cv_tstop; diff --git a/src/cvode/cvode_io.c b/src/cvode/cvode_io.c index 4083a9751a..31f9330124 100644 --- a/src/cvode/cvode_io.c +++ b/src/cvode/cvode_io.c @@ -753,7 +753,7 @@ int CVodeSetSkipAdaptStopTime(void* cvode_mem, sunbooleantype skip) return (CV_MEM_NULL); } cv_mem = (CVodeMem)cvode_mem; - cv_mem->cv_skipadapttstop = skip; + cv_mem->cv_skip_adapt_tstop = skip; return (CV_SUCCESS); } diff --git a/src/cvode/fmod_int32/fcvode_mod.f90 b/src/cvode/fmod_int32/fcvode_mod.f90 index 36574792a5..046990e550 100644 --- a/src/cvode/fmod_int32/fcvode_mod.f90 +++ b/src/cvode/fmod_int32/fcvode_mod.f90 @@ -1894,18 +1894,18 @@ function FCVodeClearStopTime(cvode_mem) & swig_result = fresult end function -function FCVodeSkipAdaptStopTime(cvode_mem, skipadapttstop) & +function FCVodeSkipAdaptStopTime(cvode_mem, skip_adapt_tstop) & result(swig_result) use, intrinsic :: ISO_C_BINDING integer(C_INT) :: swig_result type(C_PTR) :: cvode_mem -integer(C_INT), intent(in) :: skipadapttstop +integer(C_INT), intent(in) :: skip_adapt_tstop integer(C_INT) :: fresult type(C_PTR) :: farg1 integer(C_INT) :: farg2 farg1 = cvode_mem -farg2 = skipadapttstop +farg2 = skip_adapt_tstop fresult = swigc_FCVodeSkipAdaptStopTime(farg1, farg2) swig_result = fresult end function diff --git a/src/cvode/fmod_int64/fcvode_mod.f90 b/src/cvode/fmod_int64/fcvode_mod.f90 index 55d34e7147..ca745b7bfe 100644 --- a/src/cvode/fmod_int64/fcvode_mod.f90 +++ b/src/cvode/fmod_int64/fcvode_mod.f90 @@ -1894,18 +1894,18 @@ function FCVodeClearStopTime(cvode_mem) & swig_result = fresult end function -function FCVodeSkipAdaptStopTime(cvode_mem, skipadapttstop) & +function FCVodeSkipAdaptStopTime(cvode_mem, skip_adapt_tstop) & result(swig_result) use, intrinsic :: ISO_C_BINDING integer(C_INT) :: swig_result type(C_PTR) :: cvode_mem -integer(C_INT), intent(in) :: skipadapttstop +integer(C_INT), intent(in) :: skip_adapt_tstop integer(C_INT) :: fresult type(C_PTR) :: farg1 integer(C_INT) :: farg2 farg1 = cvode_mem -farg2 = skipadapttstop +farg2 = skip_adapt_tstop fresult = swigc_FCVodeSkipAdaptStopTime(farg1, farg2) swig_result = fresult end function diff --git a/src/cvodes/cvodes.c b/src/cvodes/cvodes.c index 9bf6ff0c20..075afeb648 100644 --- a/src/cvodes/cvodes.c +++ b/src/cvodes/cvodes.c @@ -544,8 +544,8 @@ void* CVodeCreate(int lmm, SUNContext sunctx) cv_mem->cv_small_nef = SMALL_NEF_DEFAULT; cv_mem->cv_tstopset = SUNFALSE; cv_mem->cv_tstopinterp = SUNFALSE; - cv_mem->cv_tstoplimited = SUNFALSE; - cv_mem->cv_skipadapttstop = SUNFALSE; + cv_mem->cv_tstop_limited = SUNFALSE; + cv_mem->cv_skip_adapt_tstop = SUNFALSE; cv_mem->cv_maxnef = MXNEF; cv_mem->cv_maxncf = MXNCF; cv_mem->cv_nlscoef = CORTES; @@ -3145,13 +3145,13 @@ int CVode(void* cvode_mem, sunrealtype tout, N_Vector yout, sunrealtype* tret, /* Check for approach to tstop */ - cv_mem->cv_tstoplimited = SUNFALSE; + cv_mem->cv_tstop_limited = SUNFALSE; if (cv_mem->cv_tstopset) { if ((cv_mem->cv_tn + cv_mem->cv_h - cv_mem->cv_tstop) * cv_mem->cv_h > ZERO) { - cv_mem->cv_tstoplimited = SUNTRUE; - if (cv_mem->cv_skipadapttstop) + cv_mem->cv_tstop_limited = SUNTRUE; + if (cv_mem->cv_skip_adapt_tstop) { cv_mem->cv_hsave = cv_mem->cv_h; cv_mem->cv_qsave = cv_mem->cv_q; @@ -3352,7 +3352,7 @@ int CVode(void* cvode_mem, sunrealtype tout, N_Vector yout, sunrealtype* tret, } /* end of root stop check */ /* Test for tn at tstop or near tstop */ - cv_mem->cv_tstoplimited = SUNFALSE; + cv_mem->cv_tstop_limited = SUNFALSE; if (cv_mem->cv_tstopset) { /* Test for tn at tstop */ @@ -3385,8 +3385,8 @@ int CVode(void* cvode_mem, sunrealtype tout, N_Vector yout, sunrealtype* tret, cv_mem->cv_h > ZERO) { - cv_mem->cv_tstoplimited = SUNTRUE; - if (cv_mem->cv_skipadapttstop) + cv_mem->cv_tstop_limited = SUNTRUE; + if (cv_mem->cv_skip_adapt_tstop) { cv_mem->cv_hsave = cv_mem->cv_hprime; cv_mem->cv_qsave = cv_mem->cv_q; @@ -3638,7 +3638,7 @@ int CVode(void* cvode_mem, sunrealtype tout, N_Vector yout, sunrealtype* tret, } /* Check if tn is at tstop or near tstop */ - cv_mem->cv_tstoplimited = SUNFALSE; + cv_mem->cv_tstop_limited = SUNFALSE; if (cv_mem->cv_tstopset) { troundoff = FUZZ_FACTOR * cv_mem->cv_uround * @@ -3667,8 +3667,8 @@ int CVode(void* cvode_mem, sunrealtype tout, N_Vector yout, sunrealtype* tret, cv_mem->cv_h > ZERO) { - cv_mem->cv_tstoplimited = SUNTRUE; - if (cv_mem->cv_skipadapttstop) + cv_mem->cv_tstop_limited = SUNTRUE; + if (cv_mem->cv_skip_adapt_tstop) { cv_mem->cv_hsave = cv_mem->cv_hprime; cv_mem->cv_qsave = cv_mem->cv_q; @@ -7947,7 +7947,7 @@ static void cvPrepareNextStep(CVodeMem cv_mem, sunrealtype dsm) cv_mem->cv_hprime = cv_mem->cv_h; cv_mem->cv_eta = ONE; } - else if (cv_mem->cv_skipadapttstop && cv_mem->cv_tstoplimited) + else if (cv_mem->cv_skip_adapt_tstop && cv_mem->cv_tstop_limited) { /* If the current step was limited by tstop, set the upcoming step size and order to match the values just prior to the tstop-limited step */ diff --git a/src/cvodes/cvodes_impl.h b/src/cvodes/cvodes_impl.h index 6baeba67d9..c09fabd0ca 100644 --- a/src/cvodes/cvodes_impl.h +++ b/src/cvodes/cvodes_impl.h @@ -380,8 +380,8 @@ typedef struct CVodeMemRec sunbooleantype cv_tstopset; sunbooleantype cv_tstopinterp; - sunbooleantype cv_tstoplimited; - sunbooleantype cv_skipadapttstop; + sunbooleantype cv_tstop_limited; + sunbooleantype cv_skip_adapt_tstop; int cv_qsave; sunrealtype cv_hsave; sunrealtype cv_tstop; diff --git a/src/cvodes/cvodes_io.c b/src/cvodes/cvodes_io.c index ff7a8645eb..e1224d78ad 100644 --- a/src/cvodes/cvodes_io.c +++ b/src/cvodes/cvodes_io.c @@ -755,7 +755,7 @@ int CVodeSetSkipAdaptStopTime(void* cvode_mem, sunbooleantype skip) return (CV_MEM_NULL); } cv_mem = (CVodeMem)cvode_mem; - cv_mem->cv_skipadapttstop = skip; + cv_mem->cv_skip_adapt_tstop = skip; return (CV_SUCCESS); } diff --git a/src/cvodes/fmod_int32/fcvodes_mod.f90 b/src/cvodes/fmod_int32/fcvodes_mod.f90 index d0c4f96b78..fb45d0daec 100644 --- a/src/cvodes/fmod_int32/fcvodes_mod.f90 +++ b/src/cvodes/fmod_int32/fcvodes_mod.f90 @@ -3312,18 +3312,18 @@ function FCVodeClearStopTime(cvode_mem) & swig_result = fresult end function -function FCVodeSkipAdaptStopTime(cvode_mem, skipadapttstop) & +function FCVodeSkipAdaptStopTime(cvode_mem, skip_adapt_tstop) & result(swig_result) use, intrinsic :: ISO_C_BINDING integer(C_INT) :: swig_result type(C_PTR) :: cvode_mem -integer(C_INT), intent(in) :: skipadapttstop +integer(C_INT), intent(in) :: skip_adapt_tstop integer(C_INT) :: fresult type(C_PTR) :: farg1 integer(C_INT) :: farg2 farg1 = cvode_mem -farg2 = skipadapttstop +farg2 = skip_adapt_tstop fresult = swigc_FCVodeSkipAdaptStopTime(farg1, farg2) swig_result = fresult end function diff --git a/src/cvodes/fmod_int64/fcvodes_mod.f90 b/src/cvodes/fmod_int64/fcvodes_mod.f90 index 2d3b6261c0..6f883b1607 100644 --- a/src/cvodes/fmod_int64/fcvodes_mod.f90 +++ b/src/cvodes/fmod_int64/fcvodes_mod.f90 @@ -3312,18 +3312,18 @@ function FCVodeClearStopTime(cvode_mem) & swig_result = fresult end function -function FCVodeSkipAdaptStopTime(cvode_mem, skipadapttstop) & +function FCVodeSkipAdaptStopTime(cvode_mem, skip_adapt_tstop) & result(swig_result) use, intrinsic :: ISO_C_BINDING integer(C_INT) :: swig_result type(C_PTR) :: cvode_mem -integer(C_INT), intent(in) :: skipadapttstop +integer(C_INT), intent(in) :: skip_adapt_tstop integer(C_INT) :: fresult type(C_PTR) :: farg1 integer(C_INT) :: farg2 farg1 = cvode_mem -farg2 = skipadapttstop +farg2 = skip_adapt_tstop fresult = swigc_FCVodeSkipAdaptStopTime(farg1, farg2) swig_result = fresult end function diff --git a/src/ida/fmod_int32/fida_mod.f90 b/src/ida/fmod_int32/fida_mod.f90 index e46f921fe8..1572a7a977 100644 --- a/src/ida/fmod_int32/fida_mod.f90 +++ b/src/ida/fmod_int32/fida_mod.f90 @@ -1604,18 +1604,18 @@ function FIDAClearStopTime(ida_mem) & swig_result = fresult end function -function FIDASkipAdaptStopTime(ida_mem, skipadapttstop) & +function FIDASkipAdaptStopTime(ida_mem, skip_adapt_tstop) & result(swig_result) use, intrinsic :: ISO_C_BINDING integer(C_INT) :: swig_result type(C_PTR) :: ida_mem -integer(C_INT), intent(in) :: skipadapttstop +integer(C_INT), intent(in) :: skip_adapt_tstop integer(C_INT) :: fresult type(C_PTR) :: farg1 integer(C_INT) :: farg2 farg1 = ida_mem -farg2 = skipadapttstop +farg2 = skip_adapt_tstop fresult = swigc_FIDASkipAdaptStopTime(farg1, farg2) swig_result = fresult end function diff --git a/src/ida/fmod_int64/fida_mod.f90 b/src/ida/fmod_int64/fida_mod.f90 index 44761a711f..fa629a8a63 100644 --- a/src/ida/fmod_int64/fida_mod.f90 +++ b/src/ida/fmod_int64/fida_mod.f90 @@ -1604,18 +1604,18 @@ function FIDAClearStopTime(ida_mem) & swig_result = fresult end function -function FIDASkipAdaptStopTime(ida_mem, skipadapttstop) & +function FIDASkipAdaptStopTime(ida_mem, skip_adapt_tstop) & result(swig_result) use, intrinsic :: ISO_C_BINDING integer(C_INT) :: swig_result type(C_PTR) :: ida_mem -integer(C_INT), intent(in) :: skipadapttstop +integer(C_INT), intent(in) :: skip_adapt_tstop integer(C_INT) :: fresult type(C_PTR) :: farg1 integer(C_INT) :: farg2 farg1 = ida_mem -farg2 = skipadapttstop +farg2 = skip_adapt_tstop fresult = swigc_FIDASkipAdaptStopTime(farg1, farg2) swig_result = fresult end function diff --git a/src/ida/ida.c b/src/ida/ida.c index 42584a805a..5018497513 100644 --- a/src/ida/ida.c +++ b/src/ida/ida.c @@ -332,8 +332,8 @@ void* IDACreate(SUNContext sunctx) IDA_mem->ida_suppressalg = SUNFALSE; IDA_mem->ida_id = NULL; IDA_mem->ida_tstopset = SUNFALSE; - IDA_mem->ida_tstoplimited = SUNFALSE; - IDA_mem->ida_skipadapttstop = SUNFALSE; + IDA_mem->ida_tstop_limited = SUNFALSE; + IDA_mem->ida_skip_adapt_tstop = SUNFALSE; IDA_mem->ida_dcj = DCJ_DEFAULT; /* Initialize inequality constraint variables */ @@ -1206,7 +1206,7 @@ int IDASolve(void* ida_mem, sunrealtype tout, sunrealtype* tret, N_Vector yret, /* Check for approach to tstop */ - IDA_mem->ida_tstoplimited = SUNFALSE; + IDA_mem->ida_tstop_limited = SUNFALSE; if (IDA_mem->ida_tstopset) { if ((IDA_mem->ida_tstop - IDA_mem->ida_tn) * IDA_mem->ida_hh <= ZERO) @@ -1220,8 +1220,8 @@ int IDASolve(void* ida_mem, sunrealtype tout, sunrealtype* tret, N_Vector yret, IDA_mem->ida_hh > ZERO) { - IDA_mem->ida_tstoplimited = SUNTRUE; - if (IDA_mem->ida_skipadapttstop) + IDA_mem->ida_tstop_limited = SUNTRUE; + if (IDA_mem->ida_skip_adapt_tstop) { IDA_mem->ida_hsave = IDA_mem->ida_hh; IDA_mem->ida_ksave = IDA_mem->ida_kk; @@ -2191,7 +2191,7 @@ static int IDAStopTest1(IDAMem IDA_mem, sunrealtype tout, sunrealtype* tret, int ier; sunrealtype troundoff; - IDA_mem->ida_tstoplimited = SUNFALSE; + IDA_mem->ida_tstop_limited = SUNFALSE; if (IDA_mem->ida_tstopset) { /* Test for tn past tstop */ @@ -2229,8 +2229,8 @@ static int IDAStopTest1(IDAMem IDA_mem, sunrealtype tout, sunrealtype* tret, IDA_mem->ida_hh > ZERO) { - IDA_mem->ida_tstoplimited = SUNTRUE; - if (IDA_mem->ida_skipadapttstop) + IDA_mem->ida_tstop_limited = SUNTRUE; + if (IDA_mem->ida_skip_adapt_tstop) { IDA_mem->ida_hsave = IDA_mem->ida_hh; IDA_mem->ida_ksave = IDA_mem->ida_kk; @@ -2308,7 +2308,7 @@ static int IDAStopTest2(IDAMem IDA_mem, sunrealtype tout, sunrealtype* tret, /* int ier; */ sunrealtype troundoff; - IDA_mem->ida_tstoplimited = SUNFALSE; + IDA_mem->ida_tstop_limited = SUNFALSE; if (IDA_mem->ida_tstopset) { troundoff = HUNDRED * IDA_mem->ida_uround * @@ -2332,8 +2332,8 @@ static int IDAStopTest2(IDAMem IDA_mem, sunrealtype tout, sunrealtype* tret, IDA_mem->ida_hh > ZERO) { - IDA_mem->ida_tstoplimited = SUNTRUE; - if (IDA_mem->ida_skipadapttstop) + IDA_mem->ida_tstop_limited = SUNTRUE; + if (IDA_mem->ida_skip_adapt_tstop) { IDA_mem->ida_hsave = IDA_mem->ida_hh; IDA_mem->ida_ksave = IDA_mem->ida_kk; @@ -3302,7 +3302,7 @@ static void IDACompleteStep(IDAMem IDA_mem, sunrealtype err_k, sunrealtype err_k /* Set action = LOWER/MAINTAIN/RAISE to specify order decision */ - if (IDA_mem->ida_skipadapttstop && IDA_mem->ida_tstoplimited) + if (IDA_mem->ida_skip_adapt_tstop && IDA_mem->ida_tstop_limited) { /* Returning order to the value used prior to the stop-time-reduced step. */ action = MAINTAIN; @@ -3386,7 +3386,7 @@ static void IDACompleteStep(IDAMem IDA_mem, sunrealtype err_k, sunrealtype err_k IDA_mem->ida_eta = ONE; tmp = SUNRpowerR(TWO * err_knew + PT0001, -ONE / (IDA_mem->ida_kk + 1)); - if (IDA_mem->ida_skipadapttstop && IDA_mem->ida_tstoplimited) + if (IDA_mem->ida_skip_adapt_tstop && IDA_mem->ida_tstop_limited) { /* Returning step size to the value used prior to the stop-time-reduced step. */ IDA_mem->ida_eta = IDA_mem->ida_hsave / IDA_mem->ida_hh; diff --git a/src/ida/ida_impl.h b/src/ida/ida_impl.h index 07426fb2dd..5b6be20eee 100644 --- a/src/ida/ida_impl.h +++ b/src/ida/ida_impl.h @@ -171,8 +171,8 @@ typedef struct IDAMemRec /* Tstop information */ sunbooleantype ida_tstopset; - sunbooleantype ida_tstoplimited; - sunbooleantype ida_skipadapttstop; + sunbooleantype ida_tstop_limited; + sunbooleantype ida_skip_adapt_tstop; int ida_ksave; sunrealtype ida_hsave; sunrealtype ida_tstop; diff --git a/src/ida/ida_io.c b/src/ida/ida_io.c index a7ff51af23..b9eca581a5 100644 --- a/src/ida/ida_io.c +++ b/src/ida/ida_io.c @@ -423,7 +423,7 @@ int IDASetSkipAdaptStopTime(void* ida_mem, sunbooleantype skip) return (IDA_MEM_NULL); } IDA_mem = (IDAMem)ida_mem; - IDA_mem->ida_skipadapttstop = skip; + IDA_mem->ida_skip_adapt_tstop = skip; return (IDA_SUCCESS); } diff --git a/src/idas/fmod_int32/fidas_mod.f90 b/src/idas/fmod_int32/fidas_mod.f90 index a5941db94d..2caee458c3 100644 --- a/src/idas/fmod_int32/fidas_mod.f90 +++ b/src/idas/fmod_int32/fidas_mod.f90 @@ -3064,18 +3064,18 @@ function FIDAClearStopTime(ida_mem) & swig_result = fresult end function -function FIDASkipAdaptStopTime(ida_mem, skipadapttstop) & +function FIDASkipAdaptStopTime(ida_mem, skip_adapt_tstop) & result(swig_result) use, intrinsic :: ISO_C_BINDING integer(C_INT) :: swig_result type(C_PTR) :: ida_mem -integer(C_INT), intent(in) :: skipadapttstop +integer(C_INT), intent(in) :: skip_adapt_tstop integer(C_INT) :: fresult type(C_PTR) :: farg1 integer(C_INT) :: farg2 farg1 = ida_mem -farg2 = skipadapttstop +farg2 = skip_adapt_tstop fresult = swigc_FIDASkipAdaptStopTime(farg1, farg2) swig_result = fresult end function diff --git a/src/idas/fmod_int64/fidas_mod.f90 b/src/idas/fmod_int64/fidas_mod.f90 index 3b5ac17cf9..1cbd7a399e 100644 --- a/src/idas/fmod_int64/fidas_mod.f90 +++ b/src/idas/fmod_int64/fidas_mod.f90 @@ -3064,18 +3064,18 @@ function FIDAClearStopTime(ida_mem) & swig_result = fresult end function -function FIDASkipAdaptStopTime(ida_mem, skipadapttstop) & +function FIDASkipAdaptStopTime(ida_mem, skip_adapt_tstop) & result(swig_result) use, intrinsic :: ISO_C_BINDING integer(C_INT) :: swig_result type(C_PTR) :: ida_mem -integer(C_INT), intent(in) :: skipadapttstop +integer(C_INT), intent(in) :: skip_adapt_tstop integer(C_INT) :: fresult type(C_PTR) :: farg1 integer(C_INT) :: farg2 farg1 = ida_mem -farg2 = skipadapttstop +farg2 = skip_adapt_tstop fresult = swigc_FIDASkipAdaptStopTime(farg1, farg2) swig_result = fresult end function diff --git a/src/idas/idas.c b/src/idas/idas.c index 5b08b7b476..80788fc274 100644 --- a/src/idas/idas.c +++ b/src/idas/idas.c @@ -463,8 +463,8 @@ void* IDACreate(SUNContext sunctx) IDA_mem->ida_suppressalg = SUNFALSE; IDA_mem->ida_id = NULL; IDA_mem->ida_tstopset = SUNFALSE; - IDA_mem->ida_tstoplimited = SUNFALSE; - IDA_mem->ida_skipadapttstop = SUNFALSE; + IDA_mem->ida_tstop_limited = SUNFALSE; + IDA_mem->ida_skip_adapt_tstop = SUNFALSE; IDA_mem->ida_dcj = DCJ_DEFAULT; /* Initialize inequality constraint variables */ @@ -2702,7 +2702,7 @@ int IDASolve(void* ida_mem, sunrealtype tout, sunrealtype* tret, N_Vector yret, /* Check for approach to tstop */ - IDA_mem->ida_tstoplimited = SUNFALSE; + IDA_mem->ida_tstop_limited = SUNFALSE; if (IDA_mem->ida_tstopset) { if ((IDA_mem->ida_tstop - IDA_mem->ida_tn) * IDA_mem->ida_hh <= ZERO) @@ -2716,8 +2716,8 @@ int IDASolve(void* ida_mem, sunrealtype tout, sunrealtype* tret, N_Vector yret, IDA_mem->ida_hh > ZERO) { - IDA_mem->ida_tstoplimited = SUNTRUE; - if (IDA_mem->ida_skipadapttstop) + IDA_mem->ida_tstop_limited = SUNTRUE; + if (IDA_mem->ida_skip_adapt_tstop) { IDA_mem->ida_hsave = IDA_mem->ida_hh; IDA_mem->ida_ksave = IDA_mem->ida_kk; @@ -5599,7 +5599,7 @@ static int IDAStopTest1(IDAMem IDA_mem, sunrealtype tout, sunrealtype* tret, int ier; sunrealtype troundoff; - IDA_mem->ida_tstoplimited = SUNFALSE; + IDA_mem->ida_tstop_limited = SUNFALSE; if (IDA_mem->ida_tstopset) { /* Test for tn past tstop */ @@ -5637,8 +5637,8 @@ static int IDAStopTest1(IDAMem IDA_mem, sunrealtype tout, sunrealtype* tret, IDA_mem->ida_hh > ZERO) { - IDA_mem->ida_tstoplimited = SUNTRUE; - if (IDA_mem->ida_skipadapttstop) + IDA_mem->ida_tstop_limited = SUNTRUE; + if (IDA_mem->ida_skip_adapt_tstop) { IDA_mem->ida_hsave = IDA_mem->ida_hh; IDA_mem->ida_ksave = IDA_mem->ida_kk; @@ -5716,7 +5716,7 @@ static int IDAStopTest2(IDAMem IDA_mem, sunrealtype tout, sunrealtype* tret, /* int ier; */ sunrealtype troundoff; - IDA_mem->ida_tstoplimited = SUNFALSE; + IDA_mem->ida_tstop_limited = SUNFALSE; if (IDA_mem->ida_tstopset) { troundoff = HUNDRED * IDA_mem->ida_uround * @@ -5740,8 +5740,8 @@ static int IDAStopTest2(IDAMem IDA_mem, sunrealtype tout, sunrealtype* tret, IDA_mem->ida_hh > ZERO) { - IDA_mem->ida_tstoplimited = SUNTRUE; - if (IDA_mem->ida_skipadapttstop) + IDA_mem->ida_tstop_limited = SUNTRUE; + if (IDA_mem->ida_skip_adapt_tstop) { IDA_mem->ida_hsave = IDA_mem->ida_hh; IDA_mem->ida_ksave = IDA_mem->ida_kk; @@ -7564,7 +7564,7 @@ static void IDACompleteStep(IDAMem IDA_mem, sunrealtype err_k, sunrealtype err_k /* Set action = LOWER/MAINTAIN/RAISE to specify order decision */ - if (IDA_mem->ida_skipadapttstop && IDA_mem->ida_tstoplimited) + if (IDA_mem->ida_skip_adapt_tstop && IDA_mem->ida_tstop_limited) { /* Returning order to the value used prior to the stop-time-reduced step. */ action = MAINTAIN; @@ -7681,7 +7681,7 @@ static void IDACompleteStep(IDAMem IDA_mem, sunrealtype err_k, sunrealtype err_k IDA_mem->ida_eta = ONE; tmp = SUNRpowerR(TWO * err_knew + PT0001, -ONE / (IDA_mem->ida_kk + 1)); - if (IDA_mem->ida_skipadapttstop && IDA_mem->ida_tstoplimited) + if (IDA_mem->ida_skip_adapt_tstop && IDA_mem->ida_tstop_limited) { /* Returning step size to the value used prior to the stop-time-reduced step. */ IDA_mem->ida_eta = IDA_mem->ida_hsave / IDA_mem->ida_hh; diff --git a/src/idas/idas_impl.h b/src/idas/idas_impl.h index d12290e79a..2dfcda109a 100644 --- a/src/idas/idas_impl.h +++ b/src/idas/idas_impl.h @@ -295,8 +295,8 @@ typedef struct IDAMemRec /* Tstop information */ sunbooleantype ida_tstopset; - sunbooleantype ida_tstoplimited; - sunbooleantype ida_skipadapttstop; + sunbooleantype ida_tstop_limited; + sunbooleantype ida_skip_adapt_tstop; int ida_ksave; sunrealtype ida_hsave; sunrealtype ida_tstop; diff --git a/src/idas/idas_io.c b/src/idas/idas_io.c index 2de25b1b9b..0f6a84d77c 100644 --- a/src/idas/idas_io.c +++ b/src/idas/idas_io.c @@ -422,7 +422,7 @@ int IDASetSkipAdaptStopTime(void* ida_mem, sunbooleantype skip) return (IDA_MEM_NULL); } IDA_mem = (IDAMem)ida_mem; - IDA_mem->ida_skipadapttstop = skip; + IDA_mem->ida_skip_adapt_tstop = skip; return (IDA_SUCCESS); } From 173b3a6628bfa19faf41f9c2c20e7cb205b90dd8 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Wed, 27 May 2026 12:48:31 -0400 Subject: [PATCH 294/298] Formatting --- src/arkode/arkode.c | 12 ++-- src/arkode/arkode_io.c | 7 +- src/cvode/cvode.c | 16 ++--- src/cvode/cvode_io.c | 2 +- src/cvodes/cvodes.c | 4 +- src/cvodes/cvodes_io.c | 2 +- src/ida/ida.c | 66 +++++++++---------- src/ida/ida_io.c | 2 +- src/idas/idas.c | 54 +++++++-------- src/idas/idas_io.c | 2 +- .../arkode/C_serial/ark_test_tstop.c | 3 +- .../unit_tests/cvode/C_serial/cv_test_tstop.c | 3 +- .../cvodes/C_serial/cvs_test_tstop.c | 3 +- test/unit_tests/ida/C_serial/ida_test_tstop.c | 4 +- test/unit_tests/idas/C_serial/CMakeLists.txt | 3 +- .../idas/C_serial/idas_test_tstop.c | 3 +- 16 files changed, 98 insertions(+), 88 deletions(-) diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 2f0a2d67d6..28e1fa9355 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -136,7 +136,7 @@ int ARKodeResize(void* arkode_mem, N_Vector y0, sunrealtype hscale, { ark_mem->hprime = (ark_mem->tstop - ark_mem->tcur) * (ONE - FOUR * ark_mem->uround); - ark_mem->eta = ark_mem->hprime / ark_mem->h; + ark_mem->eta = ark_mem->hprime / ark_mem->h; ark_mem->tstop_limited = SUNTRUE; } } @@ -878,12 +878,14 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, /* patch for 'fixedstep' + 'tstop' use case: limit fixed step size if step would overtake tstop */ + ark_mem->tstop_limited = SUNFALSE; if (ark_mem->tstopset) { if ((ark_mem->tcur + ark_mem->h - ark_mem->tstop) * ark_mem->h > ZERO) { ark_mem->h = (ark_mem->tstop - ark_mem->tcur) * (ONE - FOUR * ark_mem->uround); + ark_mem->tstop_limited = SUNTRUE; } } } @@ -1023,6 +1025,7 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, } /* update h, hprime and next_h for next iteration */ + ark_mem->tstop_limited = SUNFALSE; ark_mem->h *= ark_mem->eta; ark_mem->next_h = ark_mem->hprime = ark_mem->h; @@ -1131,7 +1134,7 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, { ark_mem->hprime = (ark_mem->tstop - ark_mem->tcur) * (ONE - FOUR * ark_mem->uround); - ark_mem->eta = ark_mem->hprime / ark_mem->h; + ark_mem->eta = ark_mem->hprime / ark_mem->h; ark_mem->tstop_limited = SUNTRUE; } } @@ -2484,6 +2487,7 @@ int arkStopTests(ARKodeMem ark_mem, sunrealtype tout, N_Vector yout, ark_mem->hprime = (ark_mem->tstop - ark_mem->tcur) * (ONE - FOUR * ark_mem->uround); ark_mem->eta = ark_mem->hprime / ark_mem->h; + ark_mem->tstop_limited = SUNTRUE; } } @@ -2821,7 +2825,7 @@ int arkCompleteStep(ARKodeMem ark_mem, sunrealtype dsm) /* Notify time step controller object of successful step (skip this if the previous step was stop-time-limited) */ - if (ark_mem->hadapt_mem->hcontroller && !ark_mem->tstop_limited) + if (ark_mem->hadapt_mem->hcontroller && !(ark_mem->skip_adapt_tstop && ark_mem->tstop_limited)) { retval = SUNAdaptController_UpdateH(ark_mem->hadapt_mem->hcontroller, ark_mem->h, dsm); @@ -3461,7 +3465,7 @@ int arkCheckTemporalError(ARKodeMem ark_mem, int* nflagPtr, int* nefPtr, /* If a stop-time-limited step will succeed, set eta so that the step size reverts to the last "full size" successful step for the next attempt */ - if (ark_mem->tstop_limited && dsm <= ONE) + if (ark_mem->skip_adapt_tstop && ark_mem->tstop_limited && dsm <= ONE) { ark_mem->eta = ark_mem->hold / ark_mem->h; return (ARK_SUCCESS); diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index f7f755596a..88caf598e8 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -85,8 +85,9 @@ int ARKodeSetDefaults(void* arkode_mem) ark_mem->hmax_inv = ZERO; /* no maximum step size */ ark_mem->tstopset = SUNFALSE; /* no stop time set */ ark_mem->tstopinterp = SUNFALSE; /* copy at stop time */ - ark_mem->tstop_limited = SUNFALSE; /* tstop did not limit last step */ - ark_mem->skip_adapt_tstop = SUNFALSE; /* tstop-limited steps can affect adaptivity */ + ark_mem->tstop_limited = SUNFALSE; /* tstop did not limit last step */ + ark_mem->skip_adapt_tstop = + SUNFALSE; /* tstop-limited steps can affect adaptivity */ ark_mem->tstop = ZERO; /* no fixed stop time */ ark_mem->hadapt_mem->etamx1 = ETAMX1; /* max change on first step */ ark_mem->hadapt_mem->etamxf = ETAMXF; /* max change on error-failed step */ @@ -1289,7 +1290,7 @@ int ARKodeSetSkipAdaptStopTime(void* arkode_mem, sunbooleantype skip) MSG_ARK_NO_MEM); return (ARK_MEM_NULL); } - ark_mem = (ARKodeMem)arkode_mem; + ark_mem = (ARKodeMem)arkode_mem; ark_mem->skip_adapt_tstop = skip; return (ARK_SUCCESS); diff --git a/src/cvode/cvode.c b/src/cvode/cvode.c index b2de0dda20..6eb198422d 100644 --- a/src/cvode/cvode.c +++ b/src/cvode/cvode.c @@ -306,8 +306,8 @@ void* CVodeCreate(int lmm, SUNContext sunctx) cv_mem->cv_small_nef = SMALL_NEF_DEFAULT; cv_mem->cv_tstopset = SUNFALSE; cv_mem->cv_tstopinterp = SUNFALSE; - cv_mem->cv_tstop_limited = SUNFALSE; - cv_mem->cv_skip_adapt_tstop = SUNFALSE; + cv_mem->cv_tstop_limited = SUNFALSE; + cv_mem->cv_skip_adapt_tstop = SUNFALSE; cv_mem->cv_maxnef = MXNEF; cv_mem->cv_maxncf = MXNCF; cv_mem->cv_nlscoef = CORTES; @@ -1219,8 +1219,8 @@ int CVode(void* cvode_mem, sunrealtype tout, N_Vector yout, sunrealtype* tret, cv_mem->cv_tstop_limited = SUNTRUE; if (cv_mem->cv_skip_adapt_tstop) { - cv_mem->cv_hsave = cv_mem->cv_h; - cv_mem->cv_qsave = cv_mem->cv_q; + cv_mem->cv_hsave = cv_mem->cv_h; + cv_mem->cv_qsave = cv_mem->cv_q; } cv_mem->cv_h = (cv_mem->cv_tstop - cv_mem->cv_tn) * (ONE - FOUR * cv_mem->cv_uround); @@ -1412,8 +1412,8 @@ int CVode(void* cvode_mem, sunrealtype tout, N_Vector yout, sunrealtype* tret, cv_mem->cv_tstop_limited = SUNTRUE; if (cv_mem->cv_skip_adapt_tstop) { - cv_mem->cv_hsave = cv_mem->cv_hprime; - cv_mem->cv_qsave = cv_mem->cv_q; + cv_mem->cv_hsave = cv_mem->cv_hprime; + cv_mem->cv_qsave = cv_mem->cv_q; } cv_mem->cv_hprime = (cv_mem->cv_tstop - cv_mem->cv_tn) * (ONE - FOUR * cv_mem->cv_uround); @@ -1641,8 +1641,8 @@ int CVode(void* cvode_mem, sunrealtype tout, N_Vector yout, sunrealtype* tret, cv_mem->cv_tstop_limited = SUNTRUE; if (cv_mem->cv_skip_adapt_tstop) { - cv_mem->cv_hsave = cv_mem->cv_hprime; - cv_mem->cv_qsave = cv_mem->cv_q; + cv_mem->cv_hsave = cv_mem->cv_hprime; + cv_mem->cv_qsave = cv_mem->cv_q; } cv_mem->cv_hprime = (cv_mem->cv_tstop - cv_mem->cv_tn) * (ONE - FOUR * cv_mem->cv_uround); diff --git a/src/cvode/cvode_io.c b/src/cvode/cvode_io.c index 31f9330124..347d539a14 100644 --- a/src/cvode/cvode_io.c +++ b/src/cvode/cvode_io.c @@ -752,7 +752,7 @@ int CVodeSetSkipAdaptStopTime(void* cvode_mem, sunbooleantype skip) cvProcessError(NULL, CV_MEM_NULL, __LINE__, __func__, __FILE__, MSGCV_NO_MEM); return (CV_MEM_NULL); } - cv_mem = (CVodeMem)cvode_mem; + cv_mem = (CVodeMem)cvode_mem; cv_mem->cv_skip_adapt_tstop = skip; return (CV_SUCCESS); diff --git a/src/cvodes/cvodes.c b/src/cvodes/cvodes.c index 075afeb648..468c69dc81 100644 --- a/src/cvodes/cvodes.c +++ b/src/cvodes/cvodes.c @@ -544,8 +544,8 @@ void* CVodeCreate(int lmm, SUNContext sunctx) cv_mem->cv_small_nef = SMALL_NEF_DEFAULT; cv_mem->cv_tstopset = SUNFALSE; cv_mem->cv_tstopinterp = SUNFALSE; - cv_mem->cv_tstop_limited = SUNFALSE; - cv_mem->cv_skip_adapt_tstop = SUNFALSE; + cv_mem->cv_tstop_limited = SUNFALSE; + cv_mem->cv_skip_adapt_tstop = SUNFALSE; cv_mem->cv_maxnef = MXNEF; cv_mem->cv_maxncf = MXNCF; cv_mem->cv_nlscoef = CORTES; diff --git a/src/cvodes/cvodes_io.c b/src/cvodes/cvodes_io.c index e1224d78ad..d4c124688b 100644 --- a/src/cvodes/cvodes_io.c +++ b/src/cvodes/cvodes_io.c @@ -754,7 +754,7 @@ int CVodeSetSkipAdaptStopTime(void* cvode_mem, sunbooleantype skip) cvProcessError(NULL, CV_MEM_NULL, __LINE__, __func__, __FILE__, MSGCV_NO_MEM); return (CV_MEM_NULL); } - cv_mem = (CVodeMem)cvode_mem; + cv_mem = (CVodeMem)cvode_mem; cv_mem->cv_skip_adapt_tstop = skip; return (CV_SUCCESS); diff --git a/src/ida/ida.c b/src/ida/ida.c index 5018497513..48529d24fa 100644 --- a/src/ida/ida.c +++ b/src/ida/ida.c @@ -307,34 +307,34 @@ void* IDACreate(SUNContext sunctx) IDA_mem->ida_uround = SUN_UNIT_ROUNDOFF; /* Set default values for integrator optional inputs */ - IDA_mem->ida_res = NULL; - IDA_mem->ida_user_data = NULL; - IDA_mem->ida_itol = IDA_NN; - IDA_mem->ida_atolmin0 = SUNTRUE; - IDA_mem->ida_user_efun = SUNFALSE; - IDA_mem->ida_efun = NULL; - IDA_mem->ida_edata = NULL; - IDA_mem->ida_maxord = MAXORD_DEFAULT; - IDA_mem->ida_mxstep = MXSTEP_DEFAULT; - IDA_mem->ida_hmax_inv = HMAX_INV_DEFAULT; - IDA_mem->ida_hmin = HMIN_DEFAULT; - IDA_mem->ida_eta_max_fx = ETA_MAX_FX_DEFAULT; - IDA_mem->ida_eta_min_fx = ETA_MIN_FX_DEFAULT; - IDA_mem->ida_eta_max = ETA_MAX_DEFAULT; - IDA_mem->ida_eta_low = ETA_LOW_DEFAULT; - IDA_mem->ida_eta_min = ETA_MIN_DEFAULT; - IDA_mem->ida_eta_min_ef = ETA_MIN_EF_DEFAULT; - IDA_mem->ida_eta_cf = ETA_CF_DEFAULT; - IDA_mem->ida_hin = ZERO; - IDA_mem->ida_epcon = EPCON; - IDA_mem->ida_maxnef = MXNEF; - IDA_mem->ida_maxncf = MXNCF; - IDA_mem->ida_suppressalg = SUNFALSE; - IDA_mem->ida_id = NULL; - IDA_mem->ida_tstopset = SUNFALSE; - IDA_mem->ida_tstop_limited = SUNFALSE; + IDA_mem->ida_res = NULL; + IDA_mem->ida_user_data = NULL; + IDA_mem->ida_itol = IDA_NN; + IDA_mem->ida_atolmin0 = SUNTRUE; + IDA_mem->ida_user_efun = SUNFALSE; + IDA_mem->ida_efun = NULL; + IDA_mem->ida_edata = NULL; + IDA_mem->ida_maxord = MAXORD_DEFAULT; + IDA_mem->ida_mxstep = MXSTEP_DEFAULT; + IDA_mem->ida_hmax_inv = HMAX_INV_DEFAULT; + IDA_mem->ida_hmin = HMIN_DEFAULT; + IDA_mem->ida_eta_max_fx = ETA_MAX_FX_DEFAULT; + IDA_mem->ida_eta_min_fx = ETA_MIN_FX_DEFAULT; + IDA_mem->ida_eta_max = ETA_MAX_DEFAULT; + IDA_mem->ida_eta_low = ETA_LOW_DEFAULT; + IDA_mem->ida_eta_min = ETA_MIN_DEFAULT; + IDA_mem->ida_eta_min_ef = ETA_MIN_EF_DEFAULT; + IDA_mem->ida_eta_cf = ETA_CF_DEFAULT; + IDA_mem->ida_hin = ZERO; + IDA_mem->ida_epcon = EPCON; + IDA_mem->ida_maxnef = MXNEF; + IDA_mem->ida_maxncf = MXNCF; + IDA_mem->ida_suppressalg = SUNFALSE; + IDA_mem->ida_id = NULL; + IDA_mem->ida_tstopset = SUNFALSE; + IDA_mem->ida_tstop_limited = SUNFALSE; IDA_mem->ida_skip_adapt_tstop = SUNFALSE; - IDA_mem->ida_dcj = DCJ_DEFAULT; + IDA_mem->ida_dcj = DCJ_DEFAULT; /* Initialize inequality constraint variables */ IDA_mem->ida_constraints = NULL; @@ -1223,8 +1223,8 @@ int IDASolve(void* ida_mem, sunrealtype tout, sunrealtype* tret, N_Vector yret, IDA_mem->ida_tstop_limited = SUNTRUE; if (IDA_mem->ida_skip_adapt_tstop) { - IDA_mem->ida_hsave = IDA_mem->ida_hh; - IDA_mem->ida_ksave = IDA_mem->ida_kk; + IDA_mem->ida_hsave = IDA_mem->ida_hh; + IDA_mem->ida_ksave = IDA_mem->ida_kk; } IDA_mem->ida_hh = (IDA_mem->ida_tstop - IDA_mem->ida_tn) * (ONE - FOUR * IDA_mem->ida_uround); @@ -2232,8 +2232,8 @@ static int IDAStopTest1(IDAMem IDA_mem, sunrealtype tout, sunrealtype* tret, IDA_mem->ida_tstop_limited = SUNTRUE; if (IDA_mem->ida_skip_adapt_tstop) { - IDA_mem->ida_hsave = IDA_mem->ida_hh; - IDA_mem->ida_ksave = IDA_mem->ida_kk; + IDA_mem->ida_hsave = IDA_mem->ida_hh; + IDA_mem->ida_ksave = IDA_mem->ida_kk; } IDA_mem->ida_hh = (IDA_mem->ida_tstop - IDA_mem->ida_tn) * (ONE - FOUR * IDA_mem->ida_uround); @@ -2335,8 +2335,8 @@ static int IDAStopTest2(IDAMem IDA_mem, sunrealtype tout, sunrealtype* tret, IDA_mem->ida_tstop_limited = SUNTRUE; if (IDA_mem->ida_skip_adapt_tstop) { - IDA_mem->ida_hsave = IDA_mem->ida_hh; - IDA_mem->ida_ksave = IDA_mem->ida_kk; + IDA_mem->ida_hsave = IDA_mem->ida_hh; + IDA_mem->ida_ksave = IDA_mem->ida_kk; } IDA_mem->ida_hh = (IDA_mem->ida_tstop - IDA_mem->ida_tn) * (ONE - FOUR * IDA_mem->ida_uround); diff --git a/src/ida/ida_io.c b/src/ida/ida_io.c index b9eca581a5..72b5468ed6 100644 --- a/src/ida/ida_io.c +++ b/src/ida/ida_io.c @@ -422,7 +422,7 @@ int IDASetSkipAdaptStopTime(void* ida_mem, sunbooleantype skip) IDAProcessError(NULL, IDA_MEM_NULL, __LINE__, __func__, __FILE__, MSG_NO_MEM); return (IDA_MEM_NULL); } - IDA_mem = (IDAMem)ida_mem; + IDA_mem = (IDAMem)ida_mem; IDA_mem->ida_skip_adapt_tstop = skip; return (IDA_SUCCESS); diff --git a/src/idas/idas.c b/src/idas/idas.c index 80788fc274..333a582f4b 100644 --- a/src/idas/idas.c +++ b/src/idas/idas.c @@ -438,34 +438,34 @@ void* IDACreate(SUNContext sunctx) IDA_mem->ida_uround = SUN_UNIT_ROUNDOFF; /* Set default values for integrator optional inputs */ - IDA_mem->ida_res = NULL; - IDA_mem->ida_user_data = NULL; - IDA_mem->ida_itol = IDA_NN; - IDA_mem->ida_atolmin0 = SUNTRUE; - IDA_mem->ida_user_efun = SUNFALSE; - IDA_mem->ida_efun = NULL; - IDA_mem->ida_edata = NULL; - IDA_mem->ida_maxord = MAXORD_DEFAULT; - IDA_mem->ida_mxstep = MXSTEP_DEFAULT; - IDA_mem->ida_hmax_inv = HMAX_INV_DEFAULT; - IDA_mem->ida_hmin = HMIN_DEFAULT; - IDA_mem->ida_eta_max_fx = ETA_MAX_FX_DEFAULT; - IDA_mem->ida_eta_min_fx = ETA_MIN_FX_DEFAULT; - IDA_mem->ida_eta_max = ETA_MAX_DEFAULT; - IDA_mem->ida_eta_low = ETA_LOW_DEFAULT; - IDA_mem->ida_eta_min = ETA_MIN_DEFAULT; - IDA_mem->ida_eta_min_ef = ETA_MIN_EF_DEFAULT; - IDA_mem->ida_eta_cf = ETA_CF_DEFAULT; - IDA_mem->ida_hin = ZERO; - IDA_mem->ida_epcon = EPCON; - IDA_mem->ida_maxnef = MXNEF; - IDA_mem->ida_maxncf = MXNCF; - IDA_mem->ida_suppressalg = SUNFALSE; - IDA_mem->ida_id = NULL; - IDA_mem->ida_tstopset = SUNFALSE; - IDA_mem->ida_tstop_limited = SUNFALSE; + IDA_mem->ida_res = NULL; + IDA_mem->ida_user_data = NULL; + IDA_mem->ida_itol = IDA_NN; + IDA_mem->ida_atolmin0 = SUNTRUE; + IDA_mem->ida_user_efun = SUNFALSE; + IDA_mem->ida_efun = NULL; + IDA_mem->ida_edata = NULL; + IDA_mem->ida_maxord = MAXORD_DEFAULT; + IDA_mem->ida_mxstep = MXSTEP_DEFAULT; + IDA_mem->ida_hmax_inv = HMAX_INV_DEFAULT; + IDA_mem->ida_hmin = HMIN_DEFAULT; + IDA_mem->ida_eta_max_fx = ETA_MAX_FX_DEFAULT; + IDA_mem->ida_eta_min_fx = ETA_MIN_FX_DEFAULT; + IDA_mem->ida_eta_max = ETA_MAX_DEFAULT; + IDA_mem->ida_eta_low = ETA_LOW_DEFAULT; + IDA_mem->ida_eta_min = ETA_MIN_DEFAULT; + IDA_mem->ida_eta_min_ef = ETA_MIN_EF_DEFAULT; + IDA_mem->ida_eta_cf = ETA_CF_DEFAULT; + IDA_mem->ida_hin = ZERO; + IDA_mem->ida_epcon = EPCON; + IDA_mem->ida_maxnef = MXNEF; + IDA_mem->ida_maxncf = MXNCF; + IDA_mem->ida_suppressalg = SUNFALSE; + IDA_mem->ida_id = NULL; + IDA_mem->ida_tstopset = SUNFALSE; + IDA_mem->ida_tstop_limited = SUNFALSE; IDA_mem->ida_skip_adapt_tstop = SUNFALSE; - IDA_mem->ida_dcj = DCJ_DEFAULT; + IDA_mem->ida_dcj = DCJ_DEFAULT; /* Initialize inequality constraint variables */ IDA_mem->ida_constraints = NULL; diff --git a/src/idas/idas_io.c b/src/idas/idas_io.c index 0f6a84d77c..953513e1ba 100644 --- a/src/idas/idas_io.c +++ b/src/idas/idas_io.c @@ -421,7 +421,7 @@ int IDASetSkipAdaptStopTime(void* ida_mem, sunbooleantype skip) IDAProcessError(NULL, IDA_MEM_NULL, __LINE__, __func__, __FILE__, MSG_NO_MEM); return (IDA_MEM_NULL); } - IDA_mem = (IDAMem)ida_mem; + IDA_mem = (IDAMem)ida_mem; IDA_mem->ida_skip_adapt_tstop = skip; return (IDA_SUCCESS); diff --git a/test/unit_tests/arkode/C_serial/ark_test_tstop.c b/test/unit_tests/arkode/C_serial/ark_test_tstop.c index 2269a2b66f..2ad05568a3 100644 --- a/test/unit_tests/arkode/C_serial/ark_test_tstop.c +++ b/test/unit_tests/arkode/C_serial/ark_test_tstop.c @@ -179,7 +179,8 @@ int main(int argc, char* argv[]) if (flag) { return 1; } if (dt_cur <= dt_last) { - printf("ERROR: Expected dt_cur > dt_last (%" GSYM " <= %" GSYM ")\n", dt_cur, dt_last); + printf("ERROR: Expected dt_cur > dt_last (%" GSYM " <= %" GSYM ")\n", + dt_cur, dt_last); flag = 1; break; } diff --git a/test/unit_tests/cvode/C_serial/cv_test_tstop.c b/test/unit_tests/cvode/C_serial/cv_test_tstop.c index 549f97422e..58382e34b9 100644 --- a/test/unit_tests/cvode/C_serial/cv_test_tstop.c +++ b/test/unit_tests/cvode/C_serial/cv_test_tstop.c @@ -182,7 +182,8 @@ int main(int argc, char* argv[]) if (flag) { return 1; } if (dt_cur <= dt_last) { - printf("ERROR: Expected dt_cur > dt_last (%" GSYM " <= %" GSYM ")\n", dt_cur, dt_last); + printf("ERROR: Expected dt_cur > dt_last (%" GSYM " <= %" GSYM ")\n", + dt_cur, dt_last); flag = 1; break; } diff --git a/test/unit_tests/cvodes/C_serial/cvs_test_tstop.c b/test/unit_tests/cvodes/C_serial/cvs_test_tstop.c index aed7273ef4..6fb9ea33d2 100644 --- a/test/unit_tests/cvodes/C_serial/cvs_test_tstop.c +++ b/test/unit_tests/cvodes/C_serial/cvs_test_tstop.c @@ -182,7 +182,8 @@ int main(int argc, char* argv[]) if (flag) { return 1; } if (dt_cur <= dt_last) { - printf("ERROR: Expected dt_cur > dt_last (%" GSYM " <= %" GSYM ")\n", dt_cur, dt_last); + printf("ERROR: Expected dt_cur > dt_last (%" GSYM " <= %" GSYM ")\n", + dt_cur, dt_last); flag = 1; break; } diff --git a/test/unit_tests/ida/C_serial/ida_test_tstop.c b/test/unit_tests/ida/C_serial/ida_test_tstop.c index 3f35cc7778..b799892b19 100644 --- a/test/unit_tests/ida/C_serial/ida_test_tstop.c +++ b/test/unit_tests/ida/C_serial/ida_test_tstop.c @@ -79,7 +79,6 @@ int main(int argc, char* argv[]) sunbooleantype skip_adapt_stop_time_threshold = SUNFALSE; if (argc > 1) { skip_adapt_stop_time_threshold = SUNTRUE; } - /* -------------- * Create context * -------------- */ @@ -190,7 +189,8 @@ int main(int argc, char* argv[]) if (flag) { return 1; } if (dt_cur <= dt_last) { - printf("ERROR: Expected dt_cur > dt_last (%" GSYM " <= %" GSYM ")\n", dt_cur, dt_last); + printf("ERROR: Expected dt_cur > dt_last (%" GSYM " <= %" GSYM ")\n", + dt_cur, dt_last); flag = 1; break; } diff --git a/test/unit_tests/idas/C_serial/CMakeLists.txt b/test/unit_tests/idas/C_serial/CMakeLists.txt index 494b7de7c6..96714fc610 100644 --- a/test/unit_tests/idas/C_serial/CMakeLists.txt +++ b/test/unit_tests/idas/C_serial/CMakeLists.txt @@ -18,7 +18,8 @@ # --------------------------------------------------------------- # List of test tuples of the form "name\;args" -set(unit_tests "idas_test_getuserdata\;" "idas_test_tstop\;" "idas_test_tstop\;1") +set(unit_tests "idas_test_getuserdata\;" "idas_test_tstop\;" + "idas_test_tstop\;1") # Add the build and install targets for each test foreach(test_tuple ${unit_tests}) diff --git a/test/unit_tests/idas/C_serial/idas_test_tstop.c b/test/unit_tests/idas/C_serial/idas_test_tstop.c index a2c2265c92..1c50a6fb54 100644 --- a/test/unit_tests/idas/C_serial/idas_test_tstop.c +++ b/test/unit_tests/idas/C_serial/idas_test_tstop.c @@ -189,7 +189,8 @@ int main(int argc, char* argv[]) if (flag) { return 1; } if (dt_cur <= dt_last) { - printf("ERROR: Expected dt_cur > dt_last (%" GSYM " <= %" GSYM ")\n", dt_cur, dt_last); + printf("ERROR: Expected dt_cur > dt_last (%" GSYM " <= %" GSYM ")\n", + dt_cur, dt_last); flag = 1; break; } From c9b2188eb96ff9ed48b8dfd9931645da31ac881d Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Wed, 27 May 2026 14:31:22 -0400 Subject: [PATCH 295/298] Formatting --- src/arkode/arkode.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 28e1fa9355..0b4fe86a41 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -2486,7 +2486,7 @@ int arkStopTests(ARKodeMem ark_mem, sunrealtype tout, N_Vector yout, { ark_mem->hprime = (ark_mem->tstop - ark_mem->tcur) * (ONE - FOUR * ark_mem->uround); - ark_mem->eta = ark_mem->hprime / ark_mem->h; + ark_mem->eta = ark_mem->hprime / ark_mem->h; ark_mem->tstop_limited = SUNTRUE; } } @@ -2825,7 +2825,8 @@ int arkCompleteStep(ARKodeMem ark_mem, sunrealtype dsm) /* Notify time step controller object of successful step (skip this if the previous step was stop-time-limited) */ - if (ark_mem->hadapt_mem->hcontroller && !(ark_mem->skip_adapt_tstop && ark_mem->tstop_limited)) + if (ark_mem->hadapt_mem->hcontroller && + !(ark_mem->skip_adapt_tstop && ark_mem->tstop_limited)) { retval = SUNAdaptController_UpdateH(ark_mem->hadapt_mem->hcontroller, ark_mem->h, dsm); From e5b9705507cf8a13da4c794834508e13110e04df Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Wed, 27 May 2026 14:35:07 -0400 Subject: [PATCH 296/298] Applied recommendation from PR review --- src/arkode/arkode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 0b4fe86a41..53a590264a 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -869,7 +869,7 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, if (ark_mem->hprime != ark_mem->h) { ark_mem->h = ark_mem->h * ark_mem->eta; - if (!ark_mem->skip_adapt_tstop) ark_mem->next_h = ark_mem->h; + ark_mem->next_h = ark_mem->h; } if (ark_mem->fixedstep) { From 4400b8e090c5b324e174ee8c6187f45fb1060245 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Wed, 27 May 2026 14:57:32 -0400 Subject: [PATCH 297/298] Added threshold value for skipping stop time adaptivity; still need to implement thresholding within solvers --- .../guide/source/Usage/User_callable.rst | 84 +++++++----- doc/cvode/guide/source/Usage/index.rst | 128 ++++++++++-------- doc/cvodes/guide/source/Usage/SIM.rst | 122 +++++++++-------- doc/ida/guide/source/Usage/index.rst | 94 +++++++------ doc/idas/guide/source/Usage/SIM.rst | 94 +++++++------ include/arkode/arkode.h | 4 +- include/cvode/cvode.h | 4 +- include/cvodes/cvodes.h | 4 +- include/ida/ida.h | 4 +- include/idas/idas.h | 4 +- src/arkode/arkode.c | 2 + src/arkode/arkode_cli.c | 4 +- src/arkode/arkode_impl.h | 1 + src/arkode/arkode_io.c | 14 +- src/cvode/cvode.c | 1 + src/cvode/cvode_cli.c | 4 +- src/cvode/cvode_impl.h | 1 + src/cvode/cvode_io.c | 9 +- src/cvodes/cvodes.c | 1 + src/cvodes/cvodes_cli.c | 4 +- src/cvodes/cvodes_impl.h | 1 + src/cvodes/cvodes_io.c | 9 +- src/ida/ida.c | 1 + src/ida/ida_cli.c | 6 +- src/ida/ida_impl.h | 1 + src/ida/ida_io.c | 5 +- src/idas/idas.c | 1 + src/idas/idas_cli.c | 6 +- src/idas/idas_impl.h | 1 + src/idas/idas_io.c | 5 +- .../arkode/C_serial/ark_test_tstop.c | 10 +- .../unit_tests/cvode/C_serial/cv_test_tstop.c | 10 +- .../cvodes/C_serial/cvs_test_tstop.c | 10 +- test/unit_tests/ida/C_serial/ida_test_tstop.c | 10 +- .../idas/C_serial/idas_test_tstop.c | 10 +- 35 files changed, 378 insertions(+), 291 deletions(-) diff --git a/doc/arkode/guide/source/Usage/User_callable.rst b/doc/arkode/guide/source/Usage/User_callable.rst index 1743a14266..9460ecf8d7 100644 --- a/doc/arkode/guide/source/Usage/User_callable.rst +++ b/doc/arkode/guide/source/Usage/User_callable.rst @@ -887,33 +887,33 @@ Optional inputs for ARKODE .. cssclass:: table-bordered -================================================= ========================================== ======================= -Optional input Function name Default -================================================= ========================================== ======================= -Set ARKODE options from the command line or file :c:func:`ARKodeSetOptions` internal -Return ARKODE parameters to their defaults :c:func:`ARKodeSetDefaults` internal -Set integrator method order :c:func:`ARKodeSetOrder` stepper-specific -Set dense output interpolation type :c:func:`ARKodeSetInterpolantType` stepper-specific -Set dense output polynomial degree :c:func:`ARKodeSetInterpolantDegree` method-dependent -Disable time step adaptivity (fixed-step mode) :c:func:`ARKodeSetFixedStep` disabled -Set forward or backward integration direction :c:func:`ARKodeSetStepDirection` 0.0 -Supply an initial step size to attempt :c:func:`ARKodeSetInitStep` estimated -Maximum no. of warnings for :math:`t_n+h = t_n` :c:func:`ARKodeSetMaxHnilWarns` 10 -Maximum no. of internal steps before *tout* :c:func:`ARKodeSetMaxNumSteps` 500 -Maximum absolute step size :c:func:`ARKodeSetMaxStep` :math:`\infty` -Minimum absolute step size :c:func:`ARKodeSetMinStep` 0.0 -Set a value for :math:`t_{stop}` :c:func:`ARKodeSetStopTime` undefined -Interpolate at :math:`t_{stop}` :c:func:`ARKodeSetInterpolateStopTime` ``SUNFALSE`` -Disable the stop time :c:func:`ARKodeClearStopTime` N/A -Disregard stop time limited steps in adaptivity :c:func:`ARKodeSetSkipAdaptStopTime` ``SUNFALSE`` -Supply a pointer for user data :c:func:`ARKodeSetUserData` ``NULL`` -Maximum no. of ARKODE error test failures :c:func:`ARKodeSetMaxErrTestFails` 7 -Set inequality constraints on solution :c:func:`ARKodeSetConstraints` ``NULL`` -Set max number of constraint failures :c:func:`ARKodeSetMaxNumConstrFails` 10 -Set the checkpointing scheme to use (for adjoint) :c:func:`ARKodeSetAdjointCheckpointScheme` ``NULL`` -Set the checkpointing step index (for adjoint) :c:func:`ARKodeSetAdjointCheckpointIndex` 0 -Use compensated summation for accumulating time :c:func:`ARKodeSetUseCompensatedSums` ``SUNFALSE`` -================================================= ========================================== ======================= +================================================= ============================================= ======================= +Optional input Function name Default +================================================= ============================================= ======================= +Set ARKODE options from the command line or file :c:func:`ARKodeSetOptions` internal +Return ARKODE parameters to their defaults :c:func:`ARKodeSetDefaults` internal +Set integrator method order :c:func:`ARKodeSetOrder` stepper-specific +Set dense output interpolation type :c:func:`ARKodeSetInterpolantType` stepper-specific +Set dense output polynomial degree :c:func:`ARKodeSetInterpolantDegree` method-dependent +Disable time step adaptivity (fixed-step mode) :c:func:`ARKodeSetFixedStep` disabled +Set forward or backward integration direction :c:func:`ARKodeSetStepDirection` 0.0 +Supply an initial step size to attempt :c:func:`ARKodeSetInitStep` estimated +Maximum no. of warnings for :math:`t_n+h = t_n` :c:func:`ARKodeSetMaxHnilWarns` 10 +Maximum no. of internal steps before *tout* :c:func:`ARKodeSetMaxNumSteps` 500 +Maximum absolute step size :c:func:`ARKodeSetMaxStep` :math:`\infty` +Minimum absolute step size :c:func:`ARKodeSetMinStep` 0.0 +Set a value for :math:`t_{stop}` :c:func:`ARKodeSetStopTime` undefined +Interpolate at :math:`t_{stop}` :c:func:`ARKodeSetInterpolateStopTime` ``SUNFALSE`` +Disable the stop time :c:func:`ARKodeClearStopTime` N/A +Disregard stop time limited steps in adaptivity :c:func:`ARKodeSetSkipAdaptStopTimeThreshold` 0.0 +Supply a pointer for user data :c:func:`ARKodeSetUserData` ``NULL`` +Maximum no. of ARKODE error test failures :c:func:`ARKodeSetMaxErrTestFails` 7 +Set inequality constraints on solution :c:func:`ARKodeSetConstraints` ``NULL`` +Set max number of constraint failures :c:func:`ARKodeSetMaxNumConstrFails` 10 +Set the checkpointing scheme to use (for adjoint) :c:func:`ARKodeSetAdjointCheckpointScheme` ``NULL`` +Set the checkpointing step index (for adjoint) :c:func:`ARKodeSetAdjointCheckpointIndex` 0 +Use compensated summation for accumulating time :c:func:`ARKodeSetUseCompensatedSums` ``SUNFALSE`` +================================================= ============================================= ======================= .. c:function:: int ARKodeSetOptions(void* arkode_mem, const char* arkid, const char* file_name, int argc, char* argv[]) @@ -1467,26 +1467,38 @@ Use compensated summation for accumulating time :c:func:`ARKodeSetUseCompensa .. versionadded:: 6.1.0 -.. c:function:: int ARKodeSetSkipAdaptStopTime(void* arkode_mem, sunbooleantype skip) +.. c:function:: int ARKodeSetSkipAdaptStopTimeThreshold(void* arkode_mem, sunrealtype skip_threshold) - Specifies whether stop-time-limited steps should be disregarded - when selecting step sizes for time step adaptivity. + Specifies a threshold for disregarding stop-time-limited steps when selecting step + sizes for time step adaptivity. :param arkode_mem: pointer to the ARKODE memory block. - :param skip: flag indicating to disregard (1) or retain (0) stop time - limited steps from the temporal adaptivity algorithm. + :param skip_threshold: threshold for disregarding stop-time-limited steps. :retval ARK_SUCCESS: the function exited successfully. :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. .. note:: - The default behavior is to use all successful time steps - (including stop-time-limited steps) when determining an - adapted time step size. + If we denote the desired upcoming time step as :math:`h_{next}`, but this is + shortened to :math:`h_{tstop}` to satisfy a user-requested stop time, then if + the ratio :math:`h_{tstop}/h_{next} < \text{skip_threshold}` the step is + considered to be "stop-time-limited," and it will be disregarded when + selecting the next internal time step size. + + The default value of `skip_threshold` is 0, indicating that all successful + time steps (including stop-time-limited steps) when determining an adapted + time step size. + + Alternately, a value of 1 indicates that any stop-time-reduced + time step will be disregarded when performing time step adaptivity. We have + found this threshold to be useful when using explicit time integrators on + applications where the step sizes are limited by stability, and thus the time + adaptivity controller is used to automatically identify the largest stable + time step size. This routine will be called by :c:func:`ARKodeSetOptions` - when using the key "arkid.skip_adapt_stop_time". + when using the key "arkid.skip_adapt_stop_time_threshold". .. versionadded:: x.y.z diff --git a/doc/cvode/guide/source/Usage/index.rst b/doc/cvode/guide/source/Usage/index.rst index 5a441f7b37..9ceb2edb9a 100644 --- a/doc/cvode/guide/source/Usage/index.rst +++ b/doc/cvode/guide/source/Usage/index.rst @@ -829,56 +829,56 @@ Main solver optional input functions .. table:: Optional inputs for CVODE - +-------------------------------+---------------------------------------------+----------------+ - | **Optional input** | **Function name** | **Default** | - +===============================+=============================================+================+ - | Set CVODE options from the | :c:func:`CVodeSetOptions` | | - | command line or a file | | | - +-------------------------------+---------------------------------------------+----------------+ - | User data | :c:func:`CVodeSetUserData` | ``NULL`` | - +-------------------------------+---------------------------------------------+----------------+ - | Maximum order for BDF method | :c:func:`CVodeSetMaxOrd` | 5 | - +-------------------------------+---------------------------------------------+----------------+ - | Maximum order for Adams | :c:func:`CVodeSetMaxOrd` | 12 | - | method | | | - +-------------------------------+---------------------------------------------+----------------+ - | Maximum no. of internal steps | :c:func:`CVodeSetMaxNumSteps` | 500 | - | before :math:`t_{out}` | | | - +-------------------------------+---------------------------------------------+----------------+ - | Maximum no. of warnings for | :c:func:`CVodeSetMaxHnilWarns` | 10 | - | :math:`t_n+h=t_n` | | | - +-------------------------------+---------------------------------------------+----------------+ - | Flag to activate stability | :c:func:`CVodeSetStabLimDet` | ``SUNFALSE`` | - | limit detection | | | - +-------------------------------+---------------------------------------------+----------------+ - | Initial step size | :c:func:`CVodeSetInitStep` | estimated | - +-------------------------------+---------------------------------------------+----------------+ - | Minimum absolute step size | :c:func:`CVodeSetMinStep` | 0.0 | - +-------------------------------+---------------------------------------------+----------------+ - | Maximum absolute step size | :c:func:`CVodeSetMaxStep` | :math:`\infty` | - +-------------------------------+---------------------------------------------+----------------+ - | Value of :math:`t_{stop}` | :c:func:`CVodeSetStopTime` | undefined | - +-------------------------------+---------------------------------------------+----------------+ - | Interpolate at | :c:func:`CVodeSetInterpolateStopTime` | ``SUNFALSE`` | - | :math:`t_{stop}` | | | - +-------------------------------+---------------------------------------------+----------------+ - | Disable the stop time | :c:func:`CVodeClearStopTime` | N/A | - +-------------------------------+---------------------------------------------+----------------+ - | Disregard stop time limited | :c:func:`CVodeSetSkipAdaptStopTime` | ``SUNFALSE`` | - | steps in adaptivity | | | - +-------------------------------+---------------------------------------------+----------------+ - | Maximum no. of error test | :c:func:`CVodeSetMaxErrTestFails` | 7 | - | failures | | | - +-------------------------------+---------------------------------------------+----------------+ - | Inequality constraints on | :c:func:`CVodeSetConstraints` | disabled | - | solution | | | - +-------------------------------+---------------------------------------------+----------------+ - | Maximum number of inequality | :c:func:`CVodeSetMaxNumConstraintFails` | 10 | - | constraint fails in a step | | | - +-------------------------------+---------------------------------------------+----------------+ - | Flag to activate specialized | :c:func:`CVodeSetUseIntegratorFusedKernels` | ``SUNFALSE`` | - | fused kernels | | | - +-------------------------------+---------------------------------------------+----------------+ + +-------------------------------+----------------------------------------------+----------------+ + | **Optional input** | **Function name** | **Default** | + +===============================+==============================================+================+ + | Set CVODE options from the | :c:func:`CVodeSetOptions` | | + | command line or a file | | | + +-------------------------------+----------------------------------------------+----------------+ + | User data | :c:func:`CVodeSetUserData` | ``NULL`` | + +-------------------------------+----------------------------------------------+----------------+ + | Maximum order for BDF method | :c:func:`CVodeSetMaxOrd` | 5 | + +-------------------------------+----------------------------------------------+----------------+ + | Maximum order for Adams | :c:func:`CVodeSetMaxOrd` | 12 | + | method | | | + +-------------------------------+----------------------------------------------+----------------+ + | Maximum no. of internal steps | :c:func:`CVodeSetMaxNumSteps` | 500 | + | before :math:`t_{out}` | | | + +-------------------------------+----------------------------------------------+----------------+ + | Maximum no. of warnings for | :c:func:`CVodeSetMaxHnilWarns` | 10 | + | :math:`t_n+h=t_n` | | | + +-------------------------------+----------------------------------------------+----------------+ + | Flag to activate stability | :c:func:`CVodeSetStabLimDet` | ``SUNFALSE`` | + | limit detection | | | + +-------------------------------+----------------------------------------------+----------------+ + | Initial step size | :c:func:`CVodeSetInitStep` | estimated | + +-------------------------------+----------------------------------------------+----------------+ + | Minimum absolute step size | :c:func:`CVodeSetMinStep` | 0.0 | + +-------------------------------+----------------------------------------------+----------------+ + | Maximum absolute step size | :c:func:`CVodeSetMaxStep` | :math:`\infty` | + +-------------------------------+----------------------------------------------+----------------+ + | Value of :math:`t_{stop}` | :c:func:`CVodeSetStopTime` | undefined | + +-------------------------------+----------------------------------------------+----------------+ + | Interpolate at | :c:func:`CVodeSetInterpolateStopTime` | ``SUNFALSE`` | + | :math:`t_{stop}` | | | + +-------------------------------+----------------------------------------------+----------------+ + | Disable the stop time | :c:func:`CVodeClearStopTime` | N/A | + +-------------------------------+----------------------------------------------+----------------+ + | Disregard stop time limited | :c:func:`CVodeSetSkipAdaptStopTimeThreshold` | 0.0 | + | steps in adaptivity | | | + +-------------------------------+----------------------------------------------+----------------+ + | Maximum no. of error test | :c:func:`CVodeSetMaxErrTestFails` | 7 | + | failures | | | + +-------------------------------+----------------------------------------------+----------------+ + | Inequality constraints on | :c:func:`CVodeSetConstraints` | disabled | + | solution | | | + +-------------------------------+----------------------------------------------+----------------+ + | Maximum number of inequality | :c:func:`CVodeSetMaxNumConstraintFails` | 10 | + | constraint fails in a step | | | + +-------------------------------+----------------------------------------------+----------------+ + | Flag to activate specialized | :c:func:`CVodeSetUseIntegratorFusedKernels` | ``SUNFALSE`` | + | fused kernels | | | + +-------------------------------+----------------------------------------------+----------------+ .. c:function:: int CVodeSetOptions(void* cvode_mem, const char* cvid, const char* file_name, int argc, char* argv[]) @@ -1210,25 +1210,39 @@ Main solver optional input functions .. versionadded:: 6.5.1 -.. c:function:: int CVodeSetSkipAdaptStopTime(void* cvode_mem, sunbooleantype skip) +.. c:function:: int CVodeSetSkipAdaptStopTimeThreshold(void* cvode_mem, sunrealtype skip_threshold) - Specifies whether stop-time-limited steps should be disregarded - when adapting step sizes and method order. + Specifies a threshold for disregarding stop-time-limited steps when selecting step + sizes for time step adaptivity. **Arguments:** * ``cvode_mem`` -- pointer to the CVODE memory block. - * ``skip`` -- flag indicating to disregard (1) or retain (0) stop time limited steps from the temporal adaptivity algorithm. + * ``skip_threshold`` -- threshold for disregarding stop-time-limited steps. **Return value:** * ``CV_SUCCESS`` if successful * ``CV_MEM_NULL`` if the CVODE memory is ``NULL`` **Notes:** - The default behavior is to use all successful time steps - (including stop-time-limited steps) when performing adaptivity. + If we denote the desired upcoming time step as :math:`h_{next}`, but this is + shortened to :math:`h_{tstop}` to satisfy a user-requested stop time, then if + the ratio :math:`h_{tstop}/h_{next} < \text{skip_threshold}` the step is + considered to be "stop-time-limited," and it will be disregarded when + selecting the next internal time step size. + + The default value of `skip_threshold` is 0, indicating that all successful + time steps (including stop-time-limited steps) when determining an adapted + time step size. + + Alternately, a value of 1 indicates that any stop-time-reduced + time step will be disregarded when performing time step adaptivity. We have + found this threshold to be useful when using explicit time integrators on + applications where the step sizes are limited by stability, and thus the time + adaptivity controller is used to automatically identify the largest stable + time step size. This routine will be called by :c:func:`CVodeSetOptions` - when using the key "cvid.skip_adapt_stop_time". + when using the key "cvid.skip_adapt_stop_time_threshold". .. versionadded:: x.y.z diff --git a/doc/cvodes/guide/source/Usage/SIM.rst b/doc/cvodes/guide/source/Usage/SIM.rst index 39e92ed196..d327f03307 100644 --- a/doc/cvodes/guide/source/Usage/SIM.rst +++ b/doc/cvodes/guide/source/Usage/SIM.rst @@ -838,53 +838,53 @@ Main solver optional input functions .. table:: Optional inputs for CVODES - +-------------------------------+---------------------------------------------+----------------+ - | **Optional input** | **Function name** | **Default** | - +===============================+=============================================+================+ - | Set CVODES options from the | :c:func:`CVodeSetOptions` | | - | command line or a file | | | - +-------------------------------+---------------------------------------------+----------------+ - | User data | :c:func:`CVodeSetUserData` | ``NULL`` | - +-------------------------------+---------------------------------------------+----------------+ - | Maximum order for BDF method | :c:func:`CVodeSetMaxOrd` | 5 | - +-------------------------------+---------------------------------------------+----------------+ - | Maximum order for Adams | :c:func:`CVodeSetMaxOrd` | 12 | - | method | | | - +-------------------------------+---------------------------------------------+----------------+ - | Maximum no. of internal steps | :c:func:`CVodeSetMaxNumSteps` | 500 | - | before :math:`t_{out}` | | | - +-------------------------------+---------------------------------------------+----------------+ - | Maximum no. of warnings for | :c:func:`CVodeSetMaxHnilWarns` | 10 | - | :math:`t_n+h=t_n` | | | - +-------------------------------+---------------------------------------------+----------------+ - | Flag to activate stability | :c:func:`CVodeSetStabLimDet` | ``SUNFALSE`` | - | limit detection | | | - +-------------------------------+---------------------------------------------+----------------+ - | Initial step size | :c:func:`CVodeSetInitStep` | estimated | - +-------------------------------+---------------------------------------------+----------------+ - | Minimum absolute step size | :c:func:`CVodeSetMinStep` | 0.0 | - +-------------------------------+---------------------------------------------+----------------+ - | Maximum absolute step size | :c:func:`CVodeSetMaxStep` | :math:`\infty` | - +-------------------------------+---------------------------------------------+----------------+ - | Value of :math:`t_{stop}` | :c:func:`CVodeSetStopTime` | undefined | - +-------------------------------+---------------------------------------------+----------------+ - | Interpolate at | :c:func:`CVodeSetInterpolateStopTime` | ``SUNFALSE`` | - | :math:`t_{stop}` | | | - +-------------------------------+---------------------------------------------+----------------+ - | Disable the stop time | :c:func:`CVodeClearStopTime` | N/A | - +-------------------------------+---------------------------------------------+----------------+ - | Disregard stop time limited | :c:func:`CVodeSetSkipAdaptStopTime` | ``SUNFALSE`` | - | steps in adaptivity | | | - +-------------------------------+---------------------------------------------+----------------+ - | Maximum no. of error test | :c:func:`CVodeSetMaxErrTestFails` | 7 | - | failures | | | - +-------------------------------+---------------------------------------------+----------------+ - | Inequality constraints on | :c:func:`CVodeSetConstraints` | disabled | - | solution | | | - +-------------------------------+---------------------------------------------+----------------+ - | Maximum number of inequality | :c:func:`CVodeSetMaxNumConstraintFails` | 10 | - | constraint fails in a step | | | - +-------------------------------+---------------------------------------------+----------------+ + +-------------------------------+----------------------------------------------+----------------+ + | **Optional input** | **Function name** | **Default** | + +===============================+==============================================+================+ + | Set CVODES options from the | :c:func:`CVodeSetOptions` | | + | command line or a file | | | + +-------------------------------+----------------------------------------------+----------------+ + | User data | :c:func:`CVodeSetUserData` | ``NULL`` | + +-------------------------------+----------------------------------------------+----------------+ + | Maximum order for BDF method | :c:func:`CVodeSetMaxOrd` | 5 | + +-------------------------------+----------------------------------------------+----------------+ + | Maximum order for Adams | :c:func:`CVodeSetMaxOrd` | 12 | + | method | | | + +-------------------------------+----------------------------------------------+----------------+ + | Maximum no. of internal steps | :c:func:`CVodeSetMaxNumSteps` | 500 | + | before :math:`t_{out}` | | | + +-------------------------------+----------------------------------------------+----------------+ + | Maximum no. of warnings for | :c:func:`CVodeSetMaxHnilWarns` | 10 | + | :math:`t_n+h=t_n` | | | + +-------------------------------+----------------------------------------------+----------------+ + | Flag to activate stability | :c:func:`CVodeSetStabLimDet` | ``SUNFALSE`` | + | limit detection | | | + +-------------------------------+----------------------------------------------+----------------+ + | Initial step size | :c:func:`CVodeSetInitStep` | estimated | + +-------------------------------+----------------------------------------------+----------------+ + | Minimum absolute step size | :c:func:`CVodeSetMinStep` | 0.0 | + +-------------------------------+----------------------------------------------+----------------+ + | Maximum absolute step size | :c:func:`CVodeSetMaxStep` | :math:`\infty` | + +-------------------------------+----------------------------------------------+----------------+ + | Value of :math:`t_{stop}` | :c:func:`CVodeSetStopTime` | undefined | + +-------------------------------+----------------------------------------------+----------------+ + | Interpolate at | :c:func:`CVodeSetInterpolateStopTime` | ``SUNFALSE`` | + | :math:`t_{stop}` | | | + +-------------------------------+----------------------------------------------+----------------+ + | Disable the stop time | :c:func:`CVodeClearStopTime` | N/A | + +-------------------------------+----------------------------------------------+----------------+ + | Disregard stop time limited | :c:func:`CVodeSetSkipAdaptStopTimeThreshold` | ``SUNFALSE`` | + | steps in adaptivity | | | + +-------------------------------+----------------------------------------------+----------------+ + | Maximum no. of error test | :c:func:`CVodeSetMaxErrTestFails` | 7 | + | failures | | | + +-------------------------------+----------------------------------------------+----------------+ + | Inequality constraints on | :c:func:`CVodeSetConstraints` | disabled | + | solution | | | + +-------------------------------+----------------------------------------------+----------------+ + | Maximum number of inequality | :c:func:`CVodeSetMaxNumConstraintFails` | 10 | + | constraint fails in a step | | | + +-------------------------------+----------------------------------------------+----------------+ .. c:function:: int CVodeSetOptions(void* cvode_mem, const char* cvid, const char* file_name, int argc, char* argv[]) @@ -1216,25 +1216,39 @@ Main solver optional input functions .. versionadded:: 6.5.1 -.. c:function:: int CVodeSetSkipAdaptStopTime(void* cvode_mem, sunbooleantype skip) +.. c:function:: int CVodeSetSkipAdaptStopTimeThreshold(void* cvode_mem, sunrealtype skip_threshold) - Specifies whether stop-time-limited steps should be disregarded - when adapting step sizes and method order. + Specifies a threshold for disregarding stop-time-limited steps when selecting step + sizes for time step adaptivity. **Arguments:** * ``cvode_mem`` -- pointer to the CVODE memory block. - * ``skip`` -- flag indicating to disregard (1) or retain (0) stop time limited steps from the temporal adaptivity algorithm. + * ``skip_threshold`` -- threshold for disregarding stop-time-limited steps. **Return value:** * ``CV_SUCCESS`` if successful * ``CV_MEM_NULL`` if the CVODE memory is ``NULL`` **Notes:** - The default behavior is to use all successful time steps - (including stop-time-limited steps) when performing adaptivity. + If we denote the desired upcoming time step as :math:`h_{next}`, but this is + shortened to :math:`h_{tstop}` to satisfy a user-requested stop time, then if + the ratio :math:`h_{tstop}/h_{next} < \text{skip_threshold}` the step is + considered to be "stop-time-limited," and it will be disregarded when + selecting the next internal time step size. + + The default value of `skip_threshold` is 0, indicating that all successful + time steps (including stop-time-limited steps) when determining an adapted + time step size. + + Alternately, a value of 1 indicates that any stop-time-reduced + time step will be disregarded when performing time step adaptivity. We have + found this threshold to be useful when using explicit time integrators on + applications where the step sizes are limited by stability, and thus the time + adaptivity controller is used to automatically identify the largest stable + time step size. This routine will be called by :c:func:`CVodeSetOptions` - when using the key "cvid.skip_adapt_stop_time". + when using the key "cvid.skip_adapt_stop_time_threshold". .. versionadded:: x.y.z diff --git a/doc/ida/guide/source/Usage/index.rst b/doc/ida/guide/source/Usage/index.rst index 41aaabea72..350eedd44c 100644 --- a/doc/ida/guide/source/Usage/index.rst +++ b/doc/ida/guide/source/Usage/index.rst @@ -910,39 +910,39 @@ Main solver optional input functions .. table:: Optional inputs for IDA - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | **Optional input** | **Function name** | **Default** | - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | Set IDA options from the command line or file | :c:func:`IDASetOptions` | | - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | User data | :c:func:`IDASetUserData` | NULL | - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | Maximum order for BDF method | :c:func:`IDASetMaxOrd` | 5 | - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | Maximum no. of internal steps before :math:`t_{{\scriptsize out}}` | :c:func:`IDASetMaxNumSteps` | 500 | - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | Initial step size | :c:func:`IDASetInitStep` | estimated | - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | Minimum absolute step size :math:`h_{\text{min}}` | :c:func:`IDASetMinStep` | 0 | - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | Maximum absolute step size :math:`h_{\text{max}}` | :c:func:`IDASetMaxStep` | :math:`\infty` | - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | Value of :math:`t_{stop}` | :c:func:`IDASetStopTime` | undefined | - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | Disable the stop time | :c:func:`IDAClearStopTime` | N/A | - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | Disregard stop time limited steps in adaptivity | :c:func:`IDASetSkipAdaptStopTime` | ``SUNFALSE`` | - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | Maximum no. of error test failures | :c:func:`IDASetMaxErrTestFails` | 10 | - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | Suppress alg. vars. from error test | :c:func:`IDASetSuppressAlg` | ``SUNFALSE`` | - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | Variable types (differential/algebraic) | :c:func:`IDASetId` | NULL | - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | Inequality constraints on solution | :c:func:`IDASetConstraints` | disabled | - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | Maximum number of inequality constraint failures | :c:func:`IDASetMaxNumConstraintFails` | 10 | - +--------------------------------------------------------------------+---------------------------------------+----------------+ + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | **Optional input** | **Function name** | **Default** | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | Set IDA options from the command line or file | :c:func:`IDASetOptions` | | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | User data | :c:func:`IDASetUserData` | NULL | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | Maximum order for BDF method | :c:func:`IDASetMaxOrd` | 5 | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | Maximum no. of internal steps before :math:`t_{{\scriptsize out}}` | :c:func:`IDASetMaxNumSteps` | 500 | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | Initial step size | :c:func:`IDASetInitStep` | estimated | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | Minimum absolute step size :math:`h_{\text{min}}` | :c:func:`IDASetMinStep` | 0 | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | Maximum absolute step size :math:`h_{\text{max}}` | :c:func:`IDASetMaxStep` | :math:`\infty` | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | Value of :math:`t_{stop}` | :c:func:`IDASetStopTime` | undefined | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | Disable the stop time | :c:func:`IDAClearStopTime` | N/A | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | Disregard stop time limited steps in adaptivity | :c:func:`IDASetSkipAdaptStopTimeThreshold` | 0.0 | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | Maximum no. of error test failures | :c:func:`IDASetMaxErrTestFails` | 10 | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | Suppress alg. vars. from error test | :c:func:`IDASetSuppressAlg` | ``SUNFALSE`` | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | Variable types (differential/algebraic) | :c:func:`IDASetId` | NULL | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | Inequality constraints on solution | :c:func:`IDASetConstraints` | disabled | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | Maximum number of inequality constraint failures | :c:func:`IDASetMaxNumConstraintFails` | 10 | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ .. c:function:: int IDASetOptions(void* ida_mem, const char* idaid, const char* file_name, int argc, char* argv[]) @@ -1191,25 +1191,39 @@ Main solver optional input functions .. versionadded:: 6.5.1 -.. c:function:: int IDASetSkipAdaptStopTime(void* ida_mem, sunbooleantype skip) +.. c:function:: int IDASetSkipAdaptStopTimeThreshold(void* ida_mem, sunrealtype skip_threshold) - Specifies whether stop-time-limited steps should be disregarded - when adapting step sizes and method order. + Specifies a threshold for disregarding stop-time-limited steps when selecting step + sizes for time step adaptivity. **Arguments:** * ``ida_mem`` -- pointer to the IDA memory block. - * ``skip`` -- flag indicating to disregard (1) or retain (0) stop time limited steps from the temporal adaptivity algorithm. + * ``skip_threshold`` -- threshold for disregarding stop-time-limited steps. **Return value:** * ``IDA_SUCCESS`` if successful * ``IDA_MEM_NULL`` if the IDA memory is ``NULL`` **Notes:** - The default behavior is to use all successful time steps - (including stop-time-limited steps) when performing adaptivity. + If we denote the desired upcoming time step as :math:`h_{next}`, but this is + shortened to :math:`h_{tstop}` to satisfy a user-requested stop time, then if + the ratio :math:`h_{tstop}/h_{next} < \text{skip_threshold}` the step is + considered to be "stop-time-limited," and it will be disregarded when + selecting the next internal time step size. + + The default value of `skip_threshold` is 0, indicating that all successful + time steps (including stop-time-limited steps) when determining an adapted + time step size. + + Alternately, a value of 1 indicates that any stop-time-reduced + time step will be disregarded when performing time step adaptivity. We have + found this threshold to be useful when using explicit time integrators on + applications where the step sizes are limited by stability, and thus the time + adaptivity controller is used to automatically identify the largest stable + time step size. This routine will be called by :c:func:`IDASetOptions` - when using the key "idaid.skip_adapt_stop_time". + when using the key "idaid.skip_adapt_stop_time_threshold". .. versionadded:: x.y.z diff --git a/doc/idas/guide/source/Usage/SIM.rst b/doc/idas/guide/source/Usage/SIM.rst index 1fbed906b1..9c4a37255f 100644 --- a/doc/idas/guide/source/Usage/SIM.rst +++ b/doc/idas/guide/source/Usage/SIM.rst @@ -915,39 +915,39 @@ Main solver optional input functions .. table:: Optional inputs for IDAS - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | **Optional input** | **Function name** | **Default** | - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | Set IDAS options from the command line or file | :c:func:`IDASetOptions` | | - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | User data | :c:func:`IDASetUserData` | NULL | - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | Maximum order for BDF method | :c:func:`IDASetMaxOrd` | 5 | - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | Maximum no. of internal steps before :math:`t_{{\scriptsize out}}` | :c:func:`IDASetMaxNumSteps` | 500 | - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | Initial step size | :c:func:`IDASetInitStep` | estimated | - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | Minimum absolute step size :math:`h_{\text{min}}` | :c:func:`IDASetMinStep` | 0 | - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | Maximum absolute step size :math:`h_{\text{max}}` | :c:func:`IDASetMaxStep` | :math:`\infty` | - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | Value of :math:`t_{stop}` | :c:func:`IDASetStopTime` | undefined | - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | Disable the stop time | :c:func:`IDAClearStopTime` | N/A | - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | Disregard stop time limited steps in adaptivity | :c:func:`IDASetSkipAdaptStopTime` | ``SUNFALSE`` | - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | Maximum no. of error test failures | :c:func:`IDASetMaxErrTestFails` | 10 | - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | Suppress alg. vars. from error test | :c:func:`IDASetSuppressAlg` | ``SUNFALSE`` | - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | Variable types (differential/algebraic) | :c:func:`IDASetId` | NULL | - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | Inequality constraints on solution | :c:func:`IDASetConstraints` | disabled | - +--------------------------------------------------------------------+---------------------------------------+----------------+ - | Maximum number of inequality constraint failures | :c:func:`IDASetMaxNumConstraintFails` | 10 | - +--------------------------------------------------------------------+---------------------------------------+----------------+ + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | **Optional input** | **Function name** | **Default** | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | Set IDAS options from the command line or file | :c:func:`IDASetOptions` | | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | User data | :c:func:`IDASetUserData` | NULL | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | Maximum order for BDF method | :c:func:`IDASetMaxOrd` | 5 | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | Maximum no. of internal steps before :math:`t_{{\scriptsize out}}` | :c:func:`IDASetMaxNumSteps` | 500 | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | Initial step size | :c:func:`IDASetInitStep` | estimated | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | Minimum absolute step size :math:`h_{\text{min}}` | :c:func:`IDASetMinStep` | 0 | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | Maximum absolute step size :math:`h_{\text{max}}` | :c:func:`IDASetMaxStep` | :math:`\infty` | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | Value of :math:`t_{stop}` | :c:func:`IDASetStopTime` | undefined | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | Disable the stop time | :c:func:`IDAClearStopTime` | N/A | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | Disregard stop time limited steps in adaptivity | :c:func:`IDASetSkipAdaptStopTimeThreshold` | 0.0 | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | Maximum no. of error test failures | :c:func:`IDASetMaxErrTestFails` | 10 | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | Suppress alg. vars. from error test | :c:func:`IDASetSuppressAlg` | ``SUNFALSE`` | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | Variable types (differential/algebraic) | :c:func:`IDASetId` | NULL | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | Inequality constraints on solution | :c:func:`IDASetConstraints` | disabled | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ + | Maximum number of inequality constraint failures | :c:func:`IDASetMaxNumConstraintFails` | 10 | + +--------------------------------------------------------------------+--------------------------------------------+----------------+ .. c:function:: int IDASetOptions(void* ida_mem, const char* idaid, const char* file_name, int argc, char* argv[]) @@ -1196,25 +1196,39 @@ Main solver optional input functions .. versionadded:: 6.5.1 -.. c:function:: int IDASetSkipAdaptStopTime(void* ida_mem, sunbooleantype skip) +.. c:function:: int IDASetSkipAdaptStopTimeThreshold(void* ida_mem, sunrealtype skip_threshold) - Specifies whether stop-time-limited steps should be disregarded - when adapting step sizes and method order. + Specifies a threshold for disregarding stop-time-limited steps when selecting step + sizes for time step adaptivity. **Arguments:** * ``ida_mem`` -- pointer to the IDA memory block. - * ``skip`` -- flag indicating to disregard (1) or retain (0) stop time limited steps from the temporal adaptivity algorithm. + * ``skip_threshold`` -- threshold for disregarding stop-time-limited steps. **Return value:** * ``IDA_SUCCESS`` if successful * ``IDA_MEM_NULL`` if the IDA memory is ``NULL`` **Notes:** - The default behavior is to use all successful time steps - (including stop-time-limited steps) when performing adaptivity. + If we denote the desired upcoming time step as :math:`h_{next}`, but this is + shortened to :math:`h_{tstop}` to satisfy a user-requested stop time, then if + the ratio :math:`h_{tstop}/h_{next} < \text{skip_threshold}` the step is + considered to be "stop-time-limited," and it will be disregarded when + selecting the next internal time step size. + + The default value of `skip_threshold` is 0, indicating that all successful + time steps (including stop-time-limited steps) when determining an adapted + time step size. + + Alternately, a value of 1 indicates that any stop-time-reduced + time step will be disregarded when performing time step adaptivity. We have + found this threshold to be useful when using explicit time integrators on + applications where the step sizes are limited by stability, and thus the time + adaptivity controller is used to automatically identify the largest stable + time step size. This routine will be called by :c:func:`IDASetOptions` - when using the key "idaid.skip_adapt_stop_time". + when using the key "idaid.skip_adapt_stop_time_threshold". .. versionadded:: x.y.z diff --git a/include/arkode/arkode.h b/include/arkode/arkode.h index 156bfa81c7..970580c085 100644 --- a/include/arkode/arkode.h +++ b/include/arkode/arkode.h @@ -289,8 +289,8 @@ SUNDIALS_EXPORT int ARKodeSetInterpolateStopTime(void* arkode_mem, sunbooleantype interp); SUNDIALS_EXPORT int ARKodeSetStopTime(void* arkode_mem, sunrealtype tstop); SUNDIALS_EXPORT int ARKodeClearStopTime(void* arkode_mem); -SUNDIALS_EXPORT int ARKodeSetSkipAdaptStopTime(void* arkode_mem, - sunbooleantype skip_adapt_tstop); +SUNDIALS_EXPORT int ARKodeSetSkipAdaptStopTimeThreshold(void* arkode_mem, + sunrealtype skip_threshold); SUNDIALS_EXPORT int ARKodeSetFixedStep(void* arkode_mem, sunrealtype hfixed); SUNDIALS_EXPORT int ARKodeSetStepDirection(void* arkode_mem, sunrealtype stepdir); SUNDIALS_EXPORT int ARKodeSetUserData(void* arkode_mem, void* user_data); diff --git a/include/cvode/cvode.h b/include/cvode/cvode.h index c8b127c629..9f4346e30d 100644 --- a/include/cvode/cvode.h +++ b/include/cvode/cvode.h @@ -155,8 +155,8 @@ SUNDIALS_EXPORT int CVodeSetStopTime(void* cvode_mem, sunrealtype tstop); SUNDIALS_EXPORT int CVodeSetInterpolateStopTime(void* cvode_mem, sunbooleantype interp); SUNDIALS_EXPORT int CVodeClearStopTime(void* cvode_mem); -SUNDIALS_EXPORT int CVodeSetSkipAdaptStopTime(void* cvode_mem, - sunbooleantype skip_adapt_tstop); +SUNDIALS_EXPORT int CVodeSetSkipAdaptStopTimeThreshold(void* cvode_mem, + sunrealtype skip_threshold); SUNDIALS_EXPORT int CVodeSetUseIntegratorFusedKernels(void* cvode_mem, sunbooleantype onoff); SUNDIALS_EXPORT int CVodeSetUserData(void* cvode_mem, void* user_data); diff --git a/include/cvodes/cvodes.h b/include/cvodes/cvodes.h index 49a67bf6a2..82324e9cf2 100644 --- a/include/cvodes/cvodes.h +++ b/include/cvodes/cvodes.h @@ -224,8 +224,8 @@ SUNDIALS_EXPORT int CVodeSetStopTime(void* cvode_mem, sunrealtype tstop); SUNDIALS_EXPORT int CVodeSetInterpolateStopTime(void* cvode_mem, sunbooleantype interp); SUNDIALS_EXPORT int CVodeClearStopTime(void* cvode_mem); -SUNDIALS_EXPORT int CVodeSetSkipAdaptStopTime(void* cvode_mem, - sunbooleantype skip_adapt_tstop); +SUNDIALS_EXPORT int CVodeSetSkipAdaptStopTimeThreshold(void* cvode_mem, + sunrealtype skip_threshold); SUNDIALS_EXPORT int CVodeSetUserData(void* cvode_mem, void* user_data); /* Optional step adaptivity input functions */ diff --git a/include/ida/ida.h b/include/ida/ida.h index ac6898dbe9..1060b5ac3a 100644 --- a/include/ida/ida.h +++ b/include/ida/ida.h @@ -146,8 +146,8 @@ SUNDIALS_EXPORT int IDASetMaxStep(void* ida_mem, sunrealtype hmax); SUNDIALS_EXPORT int IDASetMinStep(void* ida_mem, sunrealtype hmin); SUNDIALS_EXPORT int IDASetStopTime(void* ida_mem, sunrealtype tstop); SUNDIALS_EXPORT int IDAClearStopTime(void* ida_mem); -SUNDIALS_EXPORT int IDASetSkipAdaptStopTime(void* ida_mem, - sunbooleantype skip_adapt_tstop); +SUNDIALS_EXPORT int IDASetSkipAdaptStopTimeThreshold(void* ida_mem, + sunrealtype skip_threshold); SUNDIALS_EXPORT int IDASetMaxErrTestFails(void* ida_mem, int maxnef); SUNDIALS_EXPORT int IDASetSuppressAlg(void* ida_mem, sunbooleantype suppressalg); SUNDIALS_EXPORT int IDASetId(void* ida_mem, N_Vector id); diff --git a/include/idas/idas.h b/include/idas/idas.h index dad3f48035..fb1928ce7d 100644 --- a/include/idas/idas.h +++ b/include/idas/idas.h @@ -210,8 +210,8 @@ SUNDIALS_EXPORT int IDASetMaxStep(void* ida_mem, sunrealtype hmax); SUNDIALS_EXPORT int IDASetMinStep(void* ida_mem, sunrealtype hmin); SUNDIALS_EXPORT int IDASetStopTime(void* ida_mem, sunrealtype tstop); SUNDIALS_EXPORT int IDAClearStopTime(void* ida_mem); -SUNDIALS_EXPORT int IDASetSkipAdaptStopTime(void* ida_mem, - sunbooleantype skip_adapt_tstop); +SUNDIALS_EXPORT int IDASetSkipAdaptStopTimeThreshold(void* ida_mem, + sunrealtype skip_threshold); SUNDIALS_EXPORT int IDASetMaxErrTestFails(void* ida_mem, int maxnef); SUNDIALS_EXPORT int IDASetSuppressAlg(void* ida_mem, sunbooleantype suppressalg); SUNDIALS_EXPORT int IDASetId(void* ida_mem, N_Vector id); diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 53a590264a..cd68fc725a 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -1353,6 +1353,8 @@ void ARKodePrintMem(void* arkode_mem, FILE* outfile) fprintf(outfile, "tstopinterp = %i\n", ark_mem->tstopinterp); fprintf(outfile, "tstop_limited = %i\n", ark_mem->tstop_limited); fprintf(outfile, "skip_adapt_tstop = %i\n", ark_mem->skip_adapt_tstop); + fprintf(outfile, "skip_adapt_tstop_threshold = " SUN_FORMAT_G "\n", + ark_mem->skip_adapt_tstop_threshold); fprintf(outfile, "tstop = " SUN_FORMAT_G "\n", ark_mem->tstop); fprintf(outfile, "VabstolMallocDone = %i\n", ark_mem->VabstolMallocDone); fprintf(outfile, "MallocDone = %i\n", ark_mem->MallocDone); diff --git a/src/arkode/arkode_cli.c b/src/arkode/arkode_cli.c index 4311ccd8fb..56d8042727 100644 --- a/src/arkode/arkode_cli.c +++ b/src/arkode/arkode_cli.c @@ -84,7 +84,6 @@ static int arkSetFromCommandLine(void* arkode_mem, const char* arkid, int argc, {"max_nonlin_iters", ARKodeSetMaxNonlinIters}, {"max_hnil_warns", ARKodeSetMaxHnilWarns}, {"interpolate_stop_time", ARKodeSetInterpolateStopTime}, - {"skip_adapt_stop_time", ARKodeSetSkipAdaptStopTime}, {"max_num_constr_fails", ARKodeSetMaxNumConstrFails}, {"adaptivity_adjustment", ARKodeSetAdaptivityAdjustment}, {"small_num_efails", ARKodeSetSmallNumEFails}, @@ -122,7 +121,8 @@ static int arkSetFromCommandLine(void* arkode_mem, const char* arkid, int argc, {"eps_lin", ARKodeSetEpsLin}, {"mass_eps_lin", ARKodeSetMassEpsLin}, {"ls_norm_factor", ARKodeSetLSNormFactor}, - {"mass_ls_norm_factor", ARKodeSetMassLSNormFactor}}; + {"mass_ls_norm_factor", ARKodeSetMassLSNormFactor}, + {"skip_adapt_stop_time_threshold", ARKodeSetSkipAdaptStopTimeThreshold}}; static const int num_real_keys = sizeof(real_pairs) / sizeof(*real_pairs); static const struct sunKeyTwoRealPair tworeal_pairs[] = diff --git a/src/arkode/arkode_impl.h b/src/arkode/arkode_impl.h index 5c66178422..8f5a5a4bcf 100644 --- a/src/arkode/arkode_impl.h +++ b/src/arkode/arkode_impl.h @@ -504,6 +504,7 @@ struct ARKodeMemRec sunbooleantype tstopinterp; sunbooleantype tstop_limited; sunbooleantype skip_adapt_tstop; + sunrealtype skip_adapt_tstop_threshold; sunrealtype tstop; /* Time step data */ diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index 88caf598e8..7f15bb3e98 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -88,12 +88,14 @@ int ARKodeSetDefaults(void* arkode_mem) ark_mem->tstop_limited = SUNFALSE; /* tstop did not limit last step */ ark_mem->skip_adapt_tstop = SUNFALSE; /* tstop-limited steps can affect adaptivity */ + ark_mem->skip_adapt_tstop_threshold = ONE; /* default threshold for skipping adaptivity */ ark_mem->tstop = ZERO; /* no fixed stop time */ ark_mem->hadapt_mem->etamx1 = ETAMX1; /* max change on first step */ ark_mem->hadapt_mem->etamxf = ETAMXF; /* max change on error-failed step */ ark_mem->hadapt_mem->etamin = ETAMIN; /* min bound on time step reduction */ ark_mem->hadapt_mem->small_nef = - SMALL_NEF; /* num error fails before ETAMXF enforced */ + SMALL_NEF; /* num error fails before ETAMXF enforced */ ark_mem->skip_adapt_tstop = SUNFALSE; /* perform adaptivity as normal */ + ark_mem->skip_adapt_tstop_threshold = ZERO; /* default threshold for skipping adaptivity */ ark_mem->hadapt_mem->etacf = ETACF; /* max change on convergence failure */ ark_mem->hadapt_mem->cfl = CFLFAC; /* explicit stability factor */ ark_mem->hadapt_mem->safety = SAFETY; /* step adaptivity safety factor */ @@ -1276,12 +1278,13 @@ int ARKodeClearStopTime(void* arkode_mem) } /*--------------------------------------------------------------- - ARKodeSetSkipAdaptStopTime: + ARKodeSetSkipAdaptStopTimeThreshold: - Specifies whether stop-time-limited steps should be disregarded + Specifies the threshold for skipping stop-time-limited steps when selecting step sizes for time step adaptivity. ---------------------------------------------------------------*/ -int ARKodeSetSkipAdaptStopTime(void* arkode_mem, sunbooleantype skip) +int ARKodeSetSkipAdaptStopTimeThreshold(void* arkode_mem, + sunrealtype skip_threshold) { ARKodeMem ark_mem; if (arkode_mem == NULL) @@ -1291,7 +1294,8 @@ int ARKodeSetSkipAdaptStopTime(void* arkode_mem, sunbooleantype skip) return (ARK_MEM_NULL); } ark_mem = (ARKodeMem)arkode_mem; - ark_mem->skip_adapt_tstop = skip; + ark_mem->skip_adapt_tstop = SUNTRUE; + ark_mem->skip_adapt_tstop_threshold = skip_threshold; return (ARK_SUCCESS); } diff --git a/src/cvode/cvode.c b/src/cvode/cvode.c index 6eb198422d..b4275f8ffa 100644 --- a/src/cvode/cvode.c +++ b/src/cvode/cvode.c @@ -308,6 +308,7 @@ void* CVodeCreate(int lmm, SUNContext sunctx) cv_mem->cv_tstopinterp = SUNFALSE; cv_mem->cv_tstop_limited = SUNFALSE; cv_mem->cv_skip_adapt_tstop = SUNFALSE; + cv_mem->cv_skip_adapt_tstop_threshold = ZERO; cv_mem->cv_maxnef = MXNEF; cv_mem->cv_maxncf = MXNCF; cv_mem->cv_nlscoef = CORTES; diff --git a/src/cvode/cvode_cli.c b/src/cvode/cvode_cli.c index d2aa0e2ee6..89b23683e9 100644 --- a/src/cvode/cvode_cli.c +++ b/src/cvode/cvode_cli.c @@ -81,7 +81,6 @@ static int cvSetFromCommandLine(void* cvode_mem, const char* cvid, int argc, {"max_order", CVodeSetMaxOrd}, {"stab_lim_det", CVodeSetStabLimDet}, {"interpolate_stop_time", CVodeSetInterpolateStopTime}, - {"skip_adapt_stop_time", CVodeSetSkipAdaptStopTime}, {"use_integrator_fused_kernels", CVodeSetUseIntegratorFusedKernels}, {"num_fails_eta_max_err_fail", CVodeSetNumFailsEtaMaxErrFail}, {"linear_solution_scaling", CVodeSetLinearSolutionScaling}, @@ -117,7 +116,8 @@ static int cvSetFromCommandLine(void* cvode_mem, const char* cvid, int argc, {"eps_lin", CVodeSetEpsLin}, {"ls_norm_factor", CVodeSetLSNormFactor}, {"eps_proj", CVodeSetEpsProj}, - {"proj_fail_eta", CVodeSetProjFailEta}}; + {"proj_fail_eta", CVodeSetProjFailEta}, + {"skip_adapt_stop_time_threshold", CVodeSetSkipAdaptStopTimeThreshold}}; static const int num_real_keys = sizeof(real_pairs) / sizeof(*real_pairs); static const struct sunKeyTwoRealPair tworeal_pairs[] = diff --git a/src/cvode/cvode_impl.h b/src/cvode/cvode_impl.h index d81590b3e6..38f9d58883 100644 --- a/src/cvode/cvode_impl.h +++ b/src/cvode/cvode_impl.h @@ -252,6 +252,7 @@ typedef struct CVodeMemRec sunbooleantype cv_tstopinterp; sunbooleantype cv_tstop_limited; sunbooleantype cv_skip_adapt_tstop; + sunrealtype cv_skip_adapt_tstop_threshold; int cv_qsave; sunrealtype cv_hsave; sunrealtype cv_tstop; diff --git a/src/cvode/cvode_io.c b/src/cvode/cvode_io.c index 347d539a14..467cdb93b7 100644 --- a/src/cvode/cvode_io.c +++ b/src/cvode/cvode_io.c @@ -737,13 +737,13 @@ int CVodeClearStopTime(void* cvode_mem) } /* - * CVodeSetSkipAdaptStopTime + * CVodeSetSkipAdaptStopTimeThreshold * - * Specifies whether stop-time-limited steps should be disregarded + * Specifies the threshold for skipping stop-time-limited steps * when performing step size and order adaptivity. */ -int CVodeSetSkipAdaptStopTime(void* cvode_mem, sunbooleantype skip) +int CVodeSetSkipAdaptStopTimeThreshold(void* cvode_mem, sunrealtype skip_threshold) { CVodeMem cv_mem; @@ -753,7 +753,8 @@ int CVodeSetSkipAdaptStopTime(void* cvode_mem, sunbooleantype skip) return (CV_MEM_NULL); } cv_mem = (CVodeMem)cvode_mem; - cv_mem->cv_skip_adapt_tstop = skip; + cv_mem->cv_skip_adapt_tstop = SUNTRUE; + cv_mem->cv_skip_adapt_tstop_threshold = skip_threshold; return (CV_SUCCESS); } diff --git a/src/cvodes/cvodes.c b/src/cvodes/cvodes.c index 468c69dc81..c6a5e45fc5 100644 --- a/src/cvodes/cvodes.c +++ b/src/cvodes/cvodes.c @@ -546,6 +546,7 @@ void* CVodeCreate(int lmm, SUNContext sunctx) cv_mem->cv_tstopinterp = SUNFALSE; cv_mem->cv_tstop_limited = SUNFALSE; cv_mem->cv_skip_adapt_tstop = SUNFALSE; + cv_mem->cv_skip_adapt_tstop_threshold = ZERO; cv_mem->cv_maxnef = MXNEF; cv_mem->cv_maxncf = MXNCF; cv_mem->cv_nlscoef = CORTES; diff --git a/src/cvodes/cvodes_cli.c b/src/cvodes/cvodes_cli.c index a98f526cba..fe068e617a 100644 --- a/src/cvodes/cvodes_cli.c +++ b/src/cvodes/cvodes_cli.c @@ -81,7 +81,6 @@ static int cvSetFromCommandLine(void* cvode_mem, const char* cvid, int argc, {"max_order", CVodeSetMaxOrd}, {"stab_lim_det", CVodeSetStabLimDet}, {"interpolate_stop_time", CVodeSetInterpolateStopTime}, - {"skip_adapt_stop_time", CVodeSetSkipAdaptStopTime}, {"num_fails_eta_max_err_fail", CVodeSetNumFailsEtaMaxErrFail}, {"quad_err_con", CVodeSetQuadErrCon}, {"sens_err_con", CVodeSetSensErrCon}, @@ -120,7 +119,8 @@ static int cvSetFromCommandLine(void* cvode_mem, const char* cvid, int argc, {"eps_lin", CVodeSetEpsLin}, {"ls_norm_factor", CVodeSetLSNormFactor}, {"eps_proj", CVodeSetEpsProj}, - {"proj_fail_eta", CVodeSetProjFailEta}}; + {"proj_fail_eta", CVodeSetProjFailEta}, + {"skip_adapt_stop_time_threshold", CVodeSetSkipAdaptStopTimeThreshold}}; static const int num_real_keys = sizeof(real_pairs) / sizeof(*real_pairs); static const struct sunKeyTwoRealPair tworeal_pairs[] = diff --git a/src/cvodes/cvodes_impl.h b/src/cvodes/cvodes_impl.h index c09fabd0ca..5d4c377744 100644 --- a/src/cvodes/cvodes_impl.h +++ b/src/cvodes/cvodes_impl.h @@ -382,6 +382,7 @@ typedef struct CVodeMemRec sunbooleantype cv_tstopinterp; sunbooleantype cv_tstop_limited; sunbooleantype cv_skip_adapt_tstop; + sunrealtype cv_skip_adapt_tstop_threshold; int cv_qsave; sunrealtype cv_hsave; sunrealtype cv_tstop; diff --git a/src/cvodes/cvodes_io.c b/src/cvodes/cvodes_io.c index d4c124688b..ae46d95556 100644 --- a/src/cvodes/cvodes_io.c +++ b/src/cvodes/cvodes_io.c @@ -739,13 +739,13 @@ int CVodeClearStopTime(void* cvode_mem) } /* - * CVodeSetSkipAdaptStopTime + * CVodeSetSkipAdaptStopTimeThreshold * - * Specifies whether stop-time-limited steps should be disregarded + * Specifies the threshold for skipping stop-time-limited steps * when performing step size and order adaptivity. */ -int CVodeSetSkipAdaptStopTime(void* cvode_mem, sunbooleantype skip) +int CVodeSetSkipAdaptStopTimeThreshold(void* cvode_mem, sunrealtype skip_threshold) { CVodeMem cv_mem; @@ -755,7 +755,8 @@ int CVodeSetSkipAdaptStopTime(void* cvode_mem, sunbooleantype skip) return (CV_MEM_NULL); } cv_mem = (CVodeMem)cvode_mem; - cv_mem->cv_skip_adapt_tstop = skip; + cv_mem->cv_skip_adapt_tstop = SUNTRUE; + cv_mem->cv_skip_adapt_tstop_threshold = skip_threshold; return (CV_SUCCESS); } diff --git a/src/ida/ida.c b/src/ida/ida.c index 48529d24fa..4ae0342962 100644 --- a/src/ida/ida.c +++ b/src/ida/ida.c @@ -334,6 +334,7 @@ void* IDACreate(SUNContext sunctx) IDA_mem->ida_tstopset = SUNFALSE; IDA_mem->ida_tstop_limited = SUNFALSE; IDA_mem->ida_skip_adapt_tstop = SUNFALSE; + IDA_mem->ida_skip_adapt_tstop_threshold = ZERO; IDA_mem->ida_dcj = DCJ_DEFAULT; /* Initialize inequality constraint variables */ diff --git a/src/ida/ida_cli.c b/src/ida/ida_cli.c index cb27ea46af..0ab2d60a27 100644 --- a/src/ida/ida_cli.c +++ b/src/ida/ida_cli.c @@ -84,8 +84,7 @@ static int idaSetFromCommandLine(void* ida_mem, const char* idaid, int argc, {"max_conv_fails", IDASetMaxConvFails}, {"max_nonlin_iters", IDASetMaxNonlinIters}, {"linear_solution_scaling", IDASetLinearSolutionScaling}, - {"max_num_constraint_fails", IDASetMaxNumConstraintFails}, - {"skip_adapt_stop_time", IDASetSkipAdaptStopTime}}; + {"max_num_constraint_fails", IDASetMaxNumConstraintFails}}; static const int num_int_keys = sizeof(int_pairs) / sizeof(*int_pairs); static const struct sunKeyLongPair long_pairs[] = { @@ -108,7 +107,8 @@ static int idaSetFromCommandLine(void* ida_mem, const char* idaid, int argc, {"nonlin_conv_coef", IDASetNonlinConvCoef}, {"eps_lin", IDASetEpsLin}, {"ls_norm_factor", IDASetLSNormFactor}, - {"increment_factor", IDASetIncrementFactor}}; + {"increment_factor", IDASetIncrementFactor}, + {"skip_adapt_stop_time_threshold", IDASetSkipAdaptStopTimeThreshold}}; static const int num_real_keys = sizeof(real_pairs) / sizeof(*real_pairs); static const struct sunKeyTwoRealPair tworeal_pairs[] = diff --git a/src/ida/ida_impl.h b/src/ida/ida_impl.h index 5b6be20eee..83fb9ad033 100644 --- a/src/ida/ida_impl.h +++ b/src/ida/ida_impl.h @@ -173,6 +173,7 @@ typedef struct IDAMemRec sunbooleantype ida_tstopset; sunbooleantype ida_tstop_limited; sunbooleantype ida_skip_adapt_tstop; + sunrealtype ida_skip_adapt_tstop_threshold; int ida_ksave; sunrealtype ida_hsave; sunrealtype ida_tstop; diff --git a/src/ida/ida_io.c b/src/ida/ida_io.c index 72b5468ed6..71da8e7901 100644 --- a/src/ida/ida_io.c +++ b/src/ida/ida_io.c @@ -413,7 +413,7 @@ int IDAClearStopTime(void* ida_mem) /*-----------------------------------------------------------------*/ -int IDASetSkipAdaptStopTime(void* ida_mem, sunbooleantype skip) +int IDASetSkipAdaptStopTimeThreshold(void* ida_mem, sunrealtype skip_threshold) { IDAMem IDA_mem; @@ -423,7 +423,8 @@ int IDASetSkipAdaptStopTime(void* ida_mem, sunbooleantype skip) return (IDA_MEM_NULL); } IDA_mem = (IDAMem)ida_mem; - IDA_mem->ida_skip_adapt_tstop = skip; + IDA_mem->ida_skip_adapt_tstop = SUNTRUE; + IDA_mem->ida_skip_adapt_tstop_threshold = skip_threshold; return (IDA_SUCCESS); } diff --git a/src/idas/idas.c b/src/idas/idas.c index 333a582f4b..9b3ddb2aed 100644 --- a/src/idas/idas.c +++ b/src/idas/idas.c @@ -465,6 +465,7 @@ void* IDACreate(SUNContext sunctx) IDA_mem->ida_tstopset = SUNFALSE; IDA_mem->ida_tstop_limited = SUNFALSE; IDA_mem->ida_skip_adapt_tstop = SUNFALSE; + IDA_mem->ida_skip_adapt_tstop_threshold = ZERO; IDA_mem->ida_dcj = DCJ_DEFAULT; /* Initialize inequality constraint variables */ diff --git a/src/idas/idas_cli.c b/src/idas/idas_cli.c index 6ebcf773a7..47264846b3 100644 --- a/src/idas/idas_cli.c +++ b/src/idas/idas_cli.c @@ -88,8 +88,7 @@ static int idaSetFromCommandLine(void* ida_mem, const char* idaid, int argc, {"sens_max_nonlin_iters", IDASetSensMaxNonlinIters}, {"quad_sens_err_con", IDASetQuadSensErrCon}, {"linear_solution_scaling", IDASetLinearSolutionScaling}, - {"max_num_constraint_fails", IDASetMaxNumConstraintFails}, - {"skip_adapt_stop_time", IDASetSkipAdaptStopTime}}; + {"max_num_constraint_fails", IDASetMaxNumConstraintFails}}; static const int num_int_keys = sizeof(int_pairs) / sizeof(*int_pairs); static const struct sunKeyLongPair long_pairs[] = { @@ -112,7 +111,8 @@ static int idaSetFromCommandLine(void* ida_mem, const char* idaid, int argc, {"nonlin_conv_coef", IDASetNonlinConvCoef}, {"eps_lin", IDASetEpsLin}, {"ls_norm_factor", IDASetLSNormFactor}, - {"increment_factor", IDASetIncrementFactor}}; + {"increment_factor", IDASetIncrementFactor}, + {"skip_adapt_stop_time_threshold", IDASetSkipAdaptStopTimeThreshold}}; static const int num_real_keys = sizeof(real_pairs) / sizeof(*real_pairs); static const struct sunKeyTwoRealPair tworeal_pairs[] = diff --git a/src/idas/idas_impl.h b/src/idas/idas_impl.h index 2dfcda109a..9cbbc8eed2 100644 --- a/src/idas/idas_impl.h +++ b/src/idas/idas_impl.h @@ -297,6 +297,7 @@ typedef struct IDAMemRec sunbooleantype ida_tstopset; sunbooleantype ida_tstop_limited; sunbooleantype ida_skip_adapt_tstop; + sunrealtype ida_skip_adapt_tstop_threshold; int ida_ksave; sunrealtype ida_hsave; sunrealtype ida_tstop; diff --git a/src/idas/idas_io.c b/src/idas/idas_io.c index 953513e1ba..ab665ba666 100644 --- a/src/idas/idas_io.c +++ b/src/idas/idas_io.c @@ -412,7 +412,7 @@ int IDAClearStopTime(void* ida_mem) /*-----------------------------------------------------------------*/ -int IDASetSkipAdaptStopTime(void* ida_mem, sunbooleantype skip) +int IDASetSkipAdaptStopTimeThreshold(void* ida_mem, sunrealtype skip_threshold) { IDAMem IDA_mem; @@ -422,7 +422,8 @@ int IDASetSkipAdaptStopTime(void* ida_mem, sunbooleantype skip) return (IDA_MEM_NULL); } IDA_mem = (IDAMem)ida_mem; - IDA_mem->ida_skip_adapt_tstop = skip; + IDA_mem->ida_skip_adapt_tstop = SUNTRUE; + IDA_mem->ida_skip_adapt_tstop_threshold = skip_threshold; return (IDA_SUCCESS); } diff --git a/test/unit_tests/arkode/C_serial/ark_test_tstop.c b/test/unit_tests/arkode/C_serial/ark_test_tstop.c index 2ad05568a3..f6c15df7a7 100644 --- a/test/unit_tests/arkode/C_serial/ark_test_tstop.c +++ b/test/unit_tests/arkode/C_serial/ark_test_tstop.c @@ -73,8 +73,8 @@ int main(int argc, char* argv[]) sunrealtype dt_last = ZERO; /* if an argument supplied, call SetSkipAdaptStopTime with that value */ - sunbooleantype skip_adapt_stop_time_threshold = SUNFALSE; - if (argc > 1) { skip_adapt_stop_time_threshold = SUNTRUE; } + sunbooleantype skip_adapt_stop_time = SUNFALSE; + if (argc > 1) { skip_adapt_stop_time = SUNTRUE; } /* -------------- * Create context @@ -123,9 +123,9 @@ int main(int argc, char* argv[]) flag = ARKodeSetStopTime(arkode_mem, tstop); if (flag) { return 1; } - if (skip_adapt_stop_time_threshold) + if (skip_adapt_stop_time) { - flag = ARKodeSetSkipAdaptStopTime(arkode_mem, 1); + flag = ARKodeSetSkipAdaptStopTimeThreshold(arkode_mem, 1.0); if (flag) { return 1; } } @@ -171,7 +171,7 @@ int main(int argc, char* argv[]) break; } - if (skip_adapt_stop_time_threshold) + if (skip_adapt_stop_time) { flag = ARKodeGetCurrentStep(arkode_mem, &dt_cur); if (flag) { return 1; } diff --git a/test/unit_tests/cvode/C_serial/cv_test_tstop.c b/test/unit_tests/cvode/C_serial/cv_test_tstop.c index 58382e34b9..b16c4fbbaf 100644 --- a/test/unit_tests/cvode/C_serial/cv_test_tstop.c +++ b/test/unit_tests/cvode/C_serial/cv_test_tstop.c @@ -73,8 +73,8 @@ int main(int argc, char* argv[]) sunrealtype dt_last = ZERO; /* if an argument supplied, call SetSkipAdaptStopTime with that value */ - sunbooleantype skip_adapt_stop_time_threshold = SUNFALSE; - if (argc > 1) { skip_adapt_stop_time_threshold = SUNTRUE; } + sunbooleantype skip_adapt_stop_time = SUNFALSE; + if (argc > 1) { skip_adapt_stop_time = SUNTRUE; } /* -------------- * Create context @@ -126,9 +126,9 @@ int main(int argc, char* argv[]) flag = CVodeSetStopTime(cvode_mem, tstop); if (flag) { return 1; } - if (skip_adapt_stop_time_threshold) + if (skip_adapt_stop_time) { - flag = CVodeSetSkipAdaptStopTime(cvode_mem, 1); + flag = CVodeSetSkipAdaptStopTimeThreshold(cvode_mem, 1.0); if (flag) { return 1; } } @@ -174,7 +174,7 @@ int main(int argc, char* argv[]) break; } - if (skip_adapt_stop_time_threshold) + if (skip_adapt_stop_time) { flag = CVodeGetCurrentStep(cvode_mem, &dt_cur); if (flag) { return 1; } diff --git a/test/unit_tests/cvodes/C_serial/cvs_test_tstop.c b/test/unit_tests/cvodes/C_serial/cvs_test_tstop.c index 6fb9ea33d2..04ecc0b8d5 100644 --- a/test/unit_tests/cvodes/C_serial/cvs_test_tstop.c +++ b/test/unit_tests/cvodes/C_serial/cvs_test_tstop.c @@ -73,8 +73,8 @@ int main(int argc, char* argv[]) sunrealtype dt_last = ZERO; /* if an argument supplied, call SetSkipAdaptStopTime with that value */ - sunbooleantype skip_adapt_stop_time_threshold = SUNFALSE; - if (argc > 1) { skip_adapt_stop_time_threshold = SUNTRUE; } + sunbooleantype skip_adapt_stop_time = SUNFALSE; + if (argc > 1) { skip_adapt_stop_time = SUNTRUE; } /* -------------- * Create context @@ -126,9 +126,9 @@ int main(int argc, char* argv[]) flag = CVodeSetStopTime(cvode_mem, tstop); if (flag) { return 1; } - if (skip_adapt_stop_time_threshold) + if (skip_adapt_stop_time) { - flag = CVodeSetSkipAdaptStopTime(cvode_mem, 1); + flag = CVodeSetSkipAdaptStopTimeThreshold(cvode_mem, 1.0); if (flag) { return 1; } } @@ -174,7 +174,7 @@ int main(int argc, char* argv[]) break; } - if (skip_adapt_stop_time_threshold) + if (skip_adapt_stop_time) { flag = CVodeGetCurrentStep(cvode_mem, &dt_cur); if (flag) { return 1; } diff --git a/test/unit_tests/ida/C_serial/ida_test_tstop.c b/test/unit_tests/ida/C_serial/ida_test_tstop.c index b799892b19..5823838a14 100644 --- a/test/unit_tests/ida/C_serial/ida_test_tstop.c +++ b/test/unit_tests/ida/C_serial/ida_test_tstop.c @@ -76,8 +76,8 @@ int main(int argc, char* argv[]) sunrealtype dt_last = ZERO; /* if an argument supplied, call SetSkipAdaptStopTime with that value */ - sunbooleantype skip_adapt_stop_time_threshold = SUNFALSE; - if (argc > 1) { skip_adapt_stop_time_threshold = SUNTRUE; } + sunbooleantype skip_adapt_stop_time = SUNFALSE; + if (argc > 1) { skip_adapt_stop_time = SUNTRUE; } /* -------------- * Create context @@ -133,9 +133,9 @@ int main(int argc, char* argv[]) flag = IDASetStopTime(ida_mem, tstop); if (flag) { return 1; } - if (skip_adapt_stop_time_threshold) + if (skip_adapt_stop_time) { - flag = IDASetSkipAdaptStopTime(ida_mem, 1); + flag = IDASetSkipAdaptStopTimeThreshold(ida_mem, 1.0); if (flag) { return 1; } } @@ -181,7 +181,7 @@ int main(int argc, char* argv[]) break; } - if (skip_adapt_stop_time_threshold) + if (skip_adapt_stop_time) { flag = IDAGetCurrentStep(ida_mem, &dt_cur); if (flag) { return 1; } diff --git a/test/unit_tests/idas/C_serial/idas_test_tstop.c b/test/unit_tests/idas/C_serial/idas_test_tstop.c index 1c50a6fb54..bba804fba3 100644 --- a/test/unit_tests/idas/C_serial/idas_test_tstop.c +++ b/test/unit_tests/idas/C_serial/idas_test_tstop.c @@ -76,8 +76,8 @@ int main(int argc, char* argv[]) sunrealtype dt_last = ZERO; /* if an argument supplied, call SetSkipAdaptStopTime with that value */ - sunbooleantype skip_adapt_stop_time_threshold = SUNFALSE; - if (argc > 1) { skip_adapt_stop_time_threshold = SUNTRUE; } + sunbooleantype skip_adapt_stop_time = SUNFALSE; + if (argc > 1) { skip_adapt_stop_time = SUNTRUE; } /* -------------- * Create context @@ -133,9 +133,9 @@ int main(int argc, char* argv[]) flag = IDASetStopTime(ida_mem, tstop); if (flag) { return 1; } - if (skip_adapt_stop_time_threshold) + if (skip_adapt_stop_time) { - flag = IDASetSkipAdaptStopTime(ida_mem, 1); + flag = IDASetSkipAdaptStopTimeThreshold(ida_mem, 1.0); if (flag) { return 1; } } @@ -181,7 +181,7 @@ int main(int argc, char* argv[]) break; } - if (skip_adapt_stop_time_threshold) + if (skip_adapt_stop_time) { flag = IDAGetCurrentStep(ida_mem, &dt_cur); if (flag) { return 1; } From fe5af9a589e905904b4be5ba758d5b94ea8b0e39 Mon Sep 17 00:00:00 2001 From: "Daniel R. Reynolds" Date: Wed, 27 May 2026 16:51:58 -0400 Subject: [PATCH 298/298] Temporarily added back in conditional setting of ark_mem->next_h (around arkode.c:872) since the new unit tests rely on that for testing; will remove this (and adjust conditional to pass unit tests) when other changes are complete --- src/arkode/arkode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index cd68fc725a..a1d4adefc2 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -869,7 +869,7 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, if (ark_mem->hprime != ark_mem->h) { ark_mem->h = ark_mem->h * ark_mem->eta; - ark_mem->next_h = ark_mem->h; + if (!ark_mem->skip_adapt_tstop) ark_mem->next_h = ark_mem->h; } if (ark_mem->fixedstep) {