Skip to content

Commit

Permalink
Minor bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
drreynolds committed Jul 12, 2023
1 parent 0e5d57a commit ff1647c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/arkode/arkode_mri_tables.def
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ ARK_MRI_TABLE(ARKODE_MRI_GARK_ERK45a, { /* A. Sandu, SINUM 57:2300-2327, 2019 */

ARK_MRI_TABLE(ARKODE_MRI_GARK_IRK21a, { /* A. Sandu, SINUM 57:2300-2327, 2019 */
MRIStepCoupling C;
ARKodeButcherTable B = ARKodeButcherTable_Alloc(3, SUNFALSE);
ARKodeButcherTable B = ARKodeButcherTable_Alloc(3, SUNTRUE);

B->q=2;
B->p=1;
Expand Down
18 changes: 13 additions & 5 deletions src/arkode/arkode_mristep.c
Original file line number Diff line number Diff line change
Expand Up @@ -1232,10 +1232,14 @@ int mriStep_Init(void* arkode_mem, int init_type)
return (ARK_ILL_INPUT);
}
} else if (adapt_type == SUNDIALS_CONTROL_MRI_TOL) {
/* TO-DO: Verify that
- ensure that the MRI method includes embedding coefficients. */
/* Verify that the MRI method includes an embedding. */
if (step_mem->MRIC->p == 0) {
arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::MRIStep", "mriStep_Init",
"Timestep adaptivity enabled, but non-embedded MRI table specified");
return (ARK_ILL_INPUT);
}

/* verify that adaptivity type is supported by inner stepper */
/* Verify that adaptivity type is supported by inner stepper */
if (!mriStepInnerStepper_SupportsRTolAdaptivity(step_mem->stepper)) {
arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::MRIStep", "mriStep_Init",
"MRI-TOL SUNController provided, but unsupported by inner stepper");
Expand Down Expand Up @@ -1264,8 +1268,12 @@ int mriStep_Init(void* arkode_mem, int init_type)
/* initialize fast stepper to use the same relative tolerance as MRIStep */
step_mem->inner_control = ONE;
} else {
/* TO-DO: Verify that
- ensure that the MRI method includes embedding coefficients. */
/* Verify that the MRI method includes an embedding. */
if (step_mem->MRIC->p == 0) {
arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::MRIStep", "mriStep_Init",
"Timestep adaptivity enabled, but non-embedded MRI table specified");
return (ARK_ILL_INPUT);
}

/* verify that adaptivity type is supported by inner stepper */
if (!mriStepInnerStepper_SupportsStepAdaptivity(step_mem->stepper)) {
Expand Down

0 comments on commit ff1647c

Please sign in to comment.