Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ in any order.

### Bug Fixes

Fixed a bug in how MRIStep interacts with an MRIHTol SUNAdaptController object
(the previous version essentially just reverted to a decoupled multirate
controller).

The shared library version numbers for the oneMKL dense linear solver and
matrix as well as the PETSc SNES nonlinear solver have been corrected.

Expand Down
4 changes: 4 additions & 0 deletions doc/shared/RecentChanges.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ method after :c:func:`KINInit`. Additionally, :c:func:`KINSetMAA` and

**Bug Fixes**

Fixed a bug in how MRIStep interacts with an MRIHTol SUNAdaptController object
(the previous version essentially just reverted to a decoupled multirate
controller).

The shared library version numbers for the oneMKL dense linear solver and
matrix as well as the PETSc SNES nonlinear solver have been corrected.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ also provides the following additional user-callable routines:
:param C: the SUNAdaptController_MRIHTol object.
:param inner_max_relch: the parameter :math:`relch_{\text{max}}` (must be :math:`\ge 1`).
:param inner_min_tolfac: the parameter :math:`\text{tolfac}_{min}` (must be :math:`> 0`).
:param inner_max_tolfac: the parameter :math:`\text{tolfac}_{max}` (must be :math:`> 0` and :math:`\le 1`).
:param inner_max_tolfac: the parameter :math:`\text{tolfac}_{max}` (must be :math:`> 0`).

:returns: :c:type:`SUNErrCode` indicating success or failure.

Expand Down
5 changes: 5 additions & 0 deletions src/arkode/arkode_mristep.c
Original file line number Diff line number Diff line change
Expand Up @@ -3571,6 +3571,11 @@ int mriStep_StageERKFast(ARKodeMem ark_mem, ARKodeMRIStepMem step_mem,
__FILE__, "Unable to get accumulated error from the inner stepper");
return (ARK_INNERSTEP_FAIL);
}

/* scale the error estimate by 1/rtol to account for different inner/outer tolerances */
step_mem->inner_dsm /= ark_mem->reltol;
SUNLogInfo(ARK_LOGGER, "end-fast-steps", "inner_dsm = %e",
step_mem->inner_dsm);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,7 @@ SUNErrCode SUNAdaptController_SetParams_MRIHTol(SUNAdaptController C,
MRIHTOL_INNER_MIN_TOLFAC(C) = INNER_MIN_TOLFAC;
}
else { MRIHTOL_INNER_MIN_TOLFAC(C) = inner_min_tolfac; }
if ((inner_max_tolfac <= SUN_RCONST(0.0)) ||
(inner_max_tolfac > SUN_RCONST(1.0)))
if (inner_max_tolfac <= SUN_RCONST(0.0))
{
MRIHTOL_INNER_MAX_TOLFAC(C) = INNER_MAX_TOLFAC;
}
Expand Down
Loading