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/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/src/arkode/arkode_lsrkstep.c b/src/arkode/arkode_lsrkstep.c index 239ac52729..3ac9e7708b 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 @@ -625,14 +629,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) { @@ -643,7 +647,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) @@ -662,33 +666,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 +697,7 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr) } } + /* Initialize constants for stage loop */ thjm2 = ZERO; thjm1 = mus; zjm1 = w0; @@ -709,20 +710,14 @@ 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; + /* 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) { - 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,12 +726,11 @@ 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); + 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); @@ -746,15 +740,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 +766,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 +777,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 +790,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 +813,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 +851,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 +863,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 +880,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 @@ -994,14 +975,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 +991,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 +1010,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 +1040,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 +1057,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 +1070,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 +1095,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 +1106,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 +1124,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; @@ -1150,12 +1132,15 @@ 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->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 +1149,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,9 +1171,8 @@ 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; - - retval = N_VLinearCombination(4, cvals, Xvecs, ark_mem->tempv1); + Xvecs[3] = ark_mem->tempv3; + retval = N_VLinearCombination(4, cvals, Xvecs, ark_mem->tempv1); if (retval != 0) { SUNLogInfo(ARK_LOGGER, "end-compute-embedding", @@ -1216,6 +1199,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 +1230,42 @@ 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 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); } + /* 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 +1275,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 +1289,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 +1316,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 +1332,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 +1345,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 +1370,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 +1383,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 +1396,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 +1420,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 +1444,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 +1475,15 @@ 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 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 +1495,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 +1505,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 +1520,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 +1544,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 + (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", @@ -1561,9 +1563,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 +1576,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 +1602,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 +1624,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 +1637,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", @@ -1659,13 +1663,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 +1679,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 +1692,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 +1728,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 - in - 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 +1747,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 +1760,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 +1788,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 +1798,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 +1817,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 +1848,13 @@ 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 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 +1866,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 +1876,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 +1886,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 +1918,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 +1928,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 +1941,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 +1965,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 +1980,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 +1992,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 +2028,13 @@ 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 * 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 +2043,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 +2055,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 +2068,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 +2089,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 +2113,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 +2120,14 @@ int lsrkStep_TakeStepSSP104(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPt sunrealtype* cvals = step_mem->cvals; N_Vector* Xvecs = step_mem->Xvecs; + /* 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 +2139,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 +2149,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 +2164,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->tcur); + 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 +2188,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 +2207,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 +2220,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, @@ -2212,8 +2235,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", @@ -2227,9 +2250,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 +2264,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 +2274,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 +2293,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 +2305,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 +2326,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 +2337,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 +2353,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 +2364,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 +2611,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); @@ -2725,8 +2754,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. */ @@ -2736,13 +2765,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) { diff --git a/src/arkode/arkode_lsrkstep_io.c b/src/arkode/arkode_lsrkstep_io.c index 93bb0a808d..a6cf3c61cf 100644 --- a/src/arkode/arkode_lsrkstep_io.c +++ b/src/arkode/arkode_lsrkstep_io.c @@ -115,15 +115,15 @@ 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; 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 = 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; @@ -466,6 +466,7 @@ int LSRKStepSetNumSSPStages(void* arkode_mem, int num_of_stages) return ARK_ILL_INPUT; } if (num_of_stages == 4) { ark_mem->step = lsrkStep_TakeStepSSP43; } + else { ark_mem->step = lsrkStep_TakeStepSSPs3; } break; case ARKODE_LSRK_SSP_10_4: diff --git a/test/answers b/test/answers index c03db04235..177e59425f 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit c03db042354d87f66c1bd760ce94d7646e00a1f7 +Subproject commit 177e59425fe3c29bf664b6107042574deaf5db2e 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) { 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 57fb9d2e51..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.28174438476562e-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 72083f2b79..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][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][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 -[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][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 = 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_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 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..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.28174438476562e-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 99ff95da38..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 = 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 = 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 +[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.00221586141183015 -[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 +[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_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 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..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.28174438476562e-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 9ea9460217..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.104125976562494e-08 + 3.683908522410607e-11 [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-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 - 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.00221586141183015 -[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 +[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 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