From 9f55d67353c36712bb3e7a21d2e86d0b3901782a Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sat, 11 May 2024 23:02:42 -0700 Subject: [PATCH 01/18] update recent changes --- CHANGELOG.md | 75 +++++++++++++++++++++++++----------- doc/shared/RecentChanges.rst | 71 +++++++++++++++++++++++----------- 2 files changed, 101 insertions(+), 45 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c27937e5a4..1615a5424c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,17 +2,20 @@ ## Changes to SUNDIALS in release X.Y.Z -Created shared user interface for ARKODE user-callable routines, to allow more -uniform control over time-stepping algorithms, improved extensibility, and -simplified code maintenance. Marked the corresponding stepper-specific -user-callable routines as deprecated; these will be removed in a future major -release. +### Major Features -Added "Resize" capability, as well as missing `SetRootDirection` and -`SetNoInactiveRootWarn` functions, to ARKODE's SPRKStep time-stepping module. +Created shared user interface functions for ARKODE to allow more uniform control +over time-stepping algorithms, improved extensibility, and simplified code +maintenance. The corresponding stepper-specific user-callable functions are now +deprecated and will be removed in a future major release. -Deprecated `ARKStepSetOptimalParams` function; added instructions to user guide -for users who wish to retain the current functionality. +Added CMake infrastructure that enables externally maintained addons/plugins to +be *optionally* built with SUNDIALS. See the [Contributing +Guide](./CONTRIBUTING.md) for more details. + +### New Features and Enhancements + +Added support for Kokkos Kernels v4. Added the following Runge-Kutta Butcher tables * `ARKODE_FORWARD_EULER_1_1` @@ -32,35 +35,61 @@ Added the following MRI coupling tables * `ARKODE_IMEX_MRI_GARK_TRAPEZOIDAL` * `ARKODE_IMEX_MRI_GARK_MIDPOINT` +Users may now disable interpolated output in ARKODE by passing `ARK_INTERP_NONE` +to the `ARKodeSetInterpolantType`. When interpolation is disabled, rootfinding +is not supported, implicit methods must use the trivial predictor (the default +option), and interpolation at stop times cannot be used (interpolating at stop +times is disabled by default). With interpolation disabled, calling +`ARKodeEvolve` in `ARK_NORMAL` mode will return at or past the requested output +time (setting a stop time may still be used to halt the integrator at a specific +time). Disabling interpolation will reduce the memory footprint of an integrator +by two or more state vectors (depending on the interpolant type and degree) +which can be beneficial when interpolation is not needed e.g., when integrating +to a final time without output in between or using an explicit fast time scale +integrator with an MRI method. + +Added "Resize" capability to ARKODE's SPRKStep time-stepping module. + +### Bug Fixes + Updated the CMake variable `HIP_PLATFORM` default to `amd` as the previous default, `hcc`, is no longer recognized in ROCm 5.7.0 or newer. The new default is also valid in older version of ROCm (at least back to version 4.3.1). -Fixed a bug in the HIP execution policies where `WARP_SIZE` would not be set -with ROCm 6.0.0 or newer. - Changed the CMake version compatibility mode for SUNDIALS to `AnyNewerVersion` instead of `SameMajorVersion`. This fixes the issue seen [here](https://github.com/AMReX-Codes/amrex/pull/3835). -Fixed a bug in some Fortran examples where `c_null_ptr` was passed as an argument -to a function pointer instead of `c_null_funptr`. This caused compilation issues -with the Cray Fortran compiler. +Fixed a CMake bug that caused an MPI linking error for our C++ examples in some +instances. Fixes [GitHub Issue +#464](https://github.com/LLNL/sundials/issues/464). + +Fixed a bug in some Fortran examples where `c_null_ptr` was passed as an +argument to a function pointer instead of `c_null_funptr`. This caused +compilation issues with the Cray Fortran compiler. + +Fixed a bug in the HIP execution policies where `WARP_SIZE` would not be set +with ROCm 6.0.0 or newer. + +Fixed a bug that caused error messages to be cut off in some cases. Fixes +[GitHub Issue #461](https://github.com/LLNL/sundials/issues/461). + +Fixed a memory leak when an error handler was added to a `SUNContext`. Fixes +[GitHub Issue #466](https://github.com/LLNL/sundials/issues/466). Fixed a bug where `MRIStepEvolve` would not handle a recoverable error produced from evolving the inner stepper. -Added CMake infrastructure that enables externally maintained addons/plugins -to be *optionally* built with SUNDIALS. See the [Contributing Guide](./CONTRIBUTING.md) -for more details. - -Added support for Kokkos Kernels v4. +Added missing `SetRootDirection` and `SetNoInactiveRootWarn` functions to +ARKODE's SPRKStep time-stepping module. -Fixed a bug that caused error messages to be cut off in some cases. Fixes [GitHub Issue #461](https://github.com/LLNL/sundials/issues/461). +### Deprecation Notices -Fixed a memory leak when an error handler was added to a `SUNContext`. Fixes [GitHub Issue #466](https://github.com/LLNL/sundials/issues/466). +Numerous ARKODE stepper-specific functions are now deprecated in favor of +ARKODE-wide functions. -Fixed a CMake bug that caused an MPI linking error for our C++ examples in some instances. Fixes [GitHub Issue #464](https://github.com/LLNL/sundials/issues/464). +Deprecated `ARKStepSetOptimalParams` function; added instructions to user guide +for users who wish to retain the current functionality. ## Changes to SUNDIALS in release v7.0.0 diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index ef560561bf..f5fe5d4ca4 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -1,19 +1,16 @@ -**New Features** +**Major Features** -Created shared user interface for ARKODE user-callable routines, to allow more -uniform control over time-stepping algorithms, improved extensibility, and -simplified code maintenance. Marked the corresponding stepper-specific -user-callable routines as deprecated; these will be removed in a future major -release. +Created shared user interface functions for ARKODE to allow more uniform control +over time-stepping algorithms, improved extensibility, and simplified code +maintenance. The corresponding stepper-specific user-callable functions are now +deprecated and will be removed in a future major release. -Added "Resize" capability, as well as missing ``SetRootDirection`` and -``SetNoInactiveRootWarn`` functions, to ARKODE's SPRKStep time-stepping module. +Added CMake infrastructure that enables externally maintained addons/plugins to +be *optionally* built with SUNDIALS. See :ref:`Contributing` for details. -Deprecated ``ARKStepSetOptimalParams`` function; added instructions to user guide -for users who wish to retain the current functionality. +**New Features and Enhancements** -Added CMake infrastructure that enables externally maintained addons/plugins -to be *optionally* built with SUNDIALS. See :ref:`Contributing` for details. +Added support for Kokkos Kernels v4. Added the following Runge-Kutta Butcher tables @@ -35,30 +32,60 @@ Added the following MRI coupling tables * ``ARKODE_IMEX_MRI_GARK_TRAPEZOIDAL`` * ``ARKODE_IMEX_MRI_GARK_MIDPOINT`` +Users may now disable interpolated output in ARKODE by passing +``ARK_INTERP_NONE`` to the :c:func:`ARKodeSetInterpolantType`. When +interpolation is disabled, rootfinding is not supported, implicit methods must +use the trivial predictor (the default option), and interpolation at stop times +cannot be used (interpolating at stop times is disabled by default). With +interpolation disabled, calling :c:func:`ARKodeEvolve` in ``ARK_NORMAL`` mode +will return at or past the requested output time (setting a stop time may still +be used to halt the integrator at a specific time). Disabling interpolation will +reduce the memory footprint of an integrator by two or more state vectors +(depending on the interpolant type and degree) which can be beneficial when +interpolation is not needed e.g., when integrating to a final time without +output in between or using an explicit fast time scale integrator with an MRI +method. + +Added "Resize" capability to ARKODE's SPRKStep time-stepping module. + **Bug Fixes** Updated the CMake variable ``HIP_PLATFORM`` default to ``amd`` as the previous default, ``hcc``, is no longer recognized in ROCm 5.7.0 or newer. The new default is also valid in older version of ROCm (at least back to version 4.3.1). +Changed the CMake version compatibility mode for SUNDIALS to ``AnyNewerVersion`` +instead of ``SameMajorVersion``. This fixes the issue seen `here +`_. + +Fixed a CMake bug that caused an MPI linking error for our C++ examples in some +instances. Fixes `GitHub Issue #464 +`_. + +Fixed a bug in some Fortran examples where ``c_null_ptr`` was passed as an +argument to a function pointer instead of ``c_null_funptr``. This caused +compilation issues with the Cray Fortran compiler. + Fixed a bug in the HIP execution policies where ``WARP_SIZE`` would not be set with ROCm 6.0.0 or newer. -Changed the CMake version compatibility mode for SUNDIALS to ``AnyNewerVersion`` -instead of ``SameMajorVersion``. This fixes the issue seen -`here `_. +Fixed a bug that caused error messages to be cut off in some cases. Fixes +`GitHub Issue #461 `_. -Fixed a bug in some Fortran examples where ``c_null_ptr`` was passed as an argument -to a function pointer instead of ``c_null_funptr``. This caused compilation issues -with the Cray Fortran compiler. +Fixed a memory leak when an error handler was added to a +:c:type:`SUNContext`. Fixes `GitHub Issue #466 +`_. Fixed a bug where :c:func:`MRIStepEvolve` would not handle a recoverable error produced from evolving the inner stepper. -Added support for Kokkos Kernels v4. +Added missing ``SetRootDirection`` and ``SetNoInactiveRootWarn`` functions to +ARKODE's SPRKStep time-stepping module. -Fixed a bug that caused error messages to be cut off in some cases. Fixes `GitHub Issue #461 `_. +**Deprecation Notices** -Fixed a memory leak when an error handler was added to a :c:type:`SUNContext`. Fixes `GitHub Issue #466 `_. +Numerous ARKODE stepper-specific functions are now deprecated in favor of +ARKODE-wide functions. -Fixed a CMake bug that caused an MPI linking error for our C++ examples in some instances. Fixes `GitHub Issue #464 `_. +Deprecated ``ARKStepSetOptimalParams`` function; added instructions to user +guide for users who wish to retain the current functionality. From bb790d445c645d770c0e3782959ea420ab30d574 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sat, 11 May 2024 23:46:43 -0700 Subject: [PATCH 02/18] update docs --- doc/arkode/guide/source/Constants.rst | 2 + .../ARKStep_c_interface/User_callable.rst | 33 +--------- .../ERKStep_c_interface/User_callable.rst | 33 +--------- .../MRIStep_c_interface/User_callable.rst | 38 +---------- .../SPRKStep_c_interface/User_callable.rst | 36 +--------- .../guide/source/Usage/User_callable.rst | 65 +++++++++++++------ 6 files changed, 56 insertions(+), 151 deletions(-) diff --git a/doc/arkode/guide/source/Constants.rst b/doc/arkode/guide/source/Constants.rst index 088dbbdda8..5915413240 100644 --- a/doc/arkode/guide/source/Constants.rst +++ b/doc/arkode/guide/source/Constants.rst @@ -52,6 +52,8 @@ contains the ARKODE output constants. +-----------------------------------------------+------------------------------------------------------------+ | **Interpolation module input constants** | | +-----------------------------------------------+------------------------------------------------------------+ + | :index:`ARK_INTERP_NONE` | Disables polynomial interpolation for dense output. | + +-----------------------------------------------+------------------------------------------------------------+ | :index:`ARK_INTERP_HERMITE` | Specifies use of the Hermite polynomial interpolation | | | module (for non-stiff problems). | +-----------------------------------------------+------------------------------------------------------------+ diff --git a/doc/arkode/guide/source/Usage/ARKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/ARKStep_c_interface/User_callable.rst index dcd7339a97..383c3795ea 100644 --- a/doc/arkode/guide/source/Usage/ARKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/ARKStep_c_interface/User_callable.rst @@ -552,39 +552,10 @@ Optional inputs for ARKStep .. c:function:: int ARKStepSetInterpolantType(void* arkode_mem, int itype) - Specifies use of the Lagrange or Hermite interpolation modules (used for - dense output -- interpolation of solution output values and implicit - method predictors). - - **Arguments:** - * *arkode_mem* -- pointer to the ARKStep memory block. - * *itype* -- requested interpolant type (``ARK_INTERP_HERMITE`` or ``ARK_INTERP_LAGRANGE``) - - **Return value:** - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the ARKStep memory is ``NULL`` - * *ARK_MEM_FAIL* if the interpolation module cannot be allocated - * *ARK_ILL_INPUT* if the *itype* argument is not recognized or the - interpolation module has already been initialized - - **Notes:** - The Hermite interpolation module is described in - :numref:`ARKODE.Mathematics.Interpolation.Hermite`, and the Lagrange interpolation module - is described in :numref:`ARKODE.Mathematics.Interpolation.Lagrange`. - - This routine frees any previously-allocated interpolation module, and re-creates - one according to the specified argument. Thus any previous calls to - :c:func:`ARKStepSetInterpolantDegree()` will be nullified. - - This routine may only be called *after* the call to :c:func:`ARKStepCreate`. - After the first call to :c:func:`ARKStepEvolve()` the interpolation type may - not be changed without first calling :c:func:`ARKStepReInit()`. - - If this routine is not called, the Hermite interpolation module will be used. - .. deprecated:: x.y.z - Use :c:func:`ARKodeSetInterpolantType` instead. + This function is now a wrapper to :c:func:`ARKodeSetInterpolantType`, see + the documentation for that function instead. .. c:function:: int ARKStepSetInterpolantDegree(void* arkode_mem, int degree) diff --git a/doc/arkode/guide/source/Usage/ERKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/ERKStep_c_interface/User_callable.rst index 8984b67a9b..03a9954b28 100644 --- a/doc/arkode/guide/source/Usage/ERKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/ERKStep_c_interface/User_callable.rst @@ -329,39 +329,10 @@ Optional inputs for ERKStep .. c:function:: int ERKStepSetInterpolantType(void* arkode_mem, int itype) - Specifies use of the Lagrange or Hermite interpolation modules (used for - dense output -- interpolation of solution output values and implicit - method predictors). - - **Arguments:** - * *arkode_mem* -- pointer to the ERKStep memory block. - * *itype* -- requested interpolant type (``ARK_INTERP_HERMITE`` or ``ARK_INTERP_LAGRANGE``) - - **Return value:** - * *ARK_SUCCESS* if successful - * *ARK_MEM_NULL* if the ERKStep memory is ``NULL`` - * *ARK_MEM_FAIL* if the interpolation module cannot be allocated - * *ARK_ILL_INPUT* if the *itype* argument is not recognized or the - interpolation module has already been initialized - - **Notes:** - The Hermite interpolation module is described in - :numref:`ARKODE.Mathematics.Interpolation.Hermite`, and the Lagrange interpolation module - is described in :numref:`ARKODE.Mathematics.Interpolation.Lagrange`. - - This routine frees any previously-allocated interpolation module, and re-creates - one according to the specified argument. Thus any previous calls to - :c:func:`ERKStepSetInterpolantDegree()` will be nullified. - - This routine must be called *after* the call to :c:func:`ERKStepCreate`. - After the first call to :c:func:`ERKStepEvolve()` the interpolation type may - not be changed without first calling :c:func:`ERKStepReInit()`. - - If this routine is not called, the Hermite interpolation module will be used. - .. deprecated:: x.y.z - Use :c:func:`ARKodeSetInterpolantType` instead. + This function is now a wrapper to :c:func:`ARKodeSetInterpolantType`, see + the documentation for that function instead. diff --git a/doc/arkode/guide/source/Usage/MRIStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/MRIStep_c_interface/User_callable.rst index 3719395f66..eb92a95ac9 100644 --- a/doc/arkode/guide/source/Usage/MRIStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/MRIStep_c_interface/User_callable.rst @@ -462,44 +462,10 @@ Optional inputs for MRIStep .. c:function:: int MRIStepSetInterpolantType(void* arkode_mem, int itype) - Specifies use of the Lagrange or Hermite interpolation modules (used for - dense output -- interpolation of solution output values and implicit - method predictors). - - **Arguments:** - - * *arkode_mem* -- pointer to the MRIStep memory block. - - * *itype* -- requested interpolant type (``ARK_INTERP_HERMITE`` or ``ARK_INTERP_LAGRANGE``) - - **Return value:** - - * *ARK_SUCCESS* if successful - - * *ARK_MEM_NULL* if the MRIStep memory is ``NULL`` - - * *ARK_MEM_FAIL* if the interpolation module cannot be allocated - - * *ARK_ILL_INPUT* if the *itype* argument is not recognized or the - interpolation module has already been initialized - - **Notes:** The Hermite interpolation module is described in - :numref:`ARKODE.Mathematics.Interpolation.Hermite`, and the Lagrange interpolation module - is described in :numref:`ARKODE.Mathematics.Interpolation.Lagrange`. - - This routine frees any previously-allocated interpolation module, and re-creates - one according to the specified argument. Thus any previous calls to - :c:func:`MRIStepSetInterpolantDegree()` will be nullified. - - This routine must be called *after* the call to :c:func:`MRIStepCreate()`. - After the first call to :c:func:`MRIStepEvolve()` the interpolation type may - not be changed without first calling :c:func:`MRIStepReInit()`. - - If this routine is not called, the Hermite interpolation module will be used. - .. deprecated:: x.y.z - Use :c:func:`ARKodeSetInterpolantType` instead. + This function is now a wrapper to :c:func:`ARKodeSetInterpolantType`, see + the documentation for that function instead. diff --git a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst index 45996860cf..4d9d8fc3c8 100644 --- a/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst +++ b/doc/arkode/guide/source/Usage/SPRKStep_c_interface/User_callable.rst @@ -244,42 +244,10 @@ Optional inputs for SPRKStep .. c:function:: int SPRKStepSetInterpolantType(void* arkode_mem, int itype) - Specifies use of the Lagrange or Hermite interpolation modules (used for - dense output -- interpolation of solution output values and implicit - method predictors). - - :param arkode_mem: pointer to the SPRKStep memory block. - :param itype: requested interpolant type (``ARK_INTERP_HERMITE`` or ``ARK_INTERP_LAGRANGE``) - - :retval ARK_SUCCESS: if successful - :retval ARK_MEM_NULL: if the SPRKStep memory is ``NULL`` - :retval ARK_MEM_FAIL: if the interpolation module cannot be allocated - :retval ARK_ILL_INPUT: if the *itype* argument is not recognized or the - interpolation module has already been initialized - - .. note:: - - The Hermite interpolation module is described in - :numref:`ARKODE.Mathematics.Interpolation.Hermite`, and the Lagrange interpolation module - is described in :numref:`ARKODE.Mathematics.Interpolation.Lagrange`. - - This routine frees any previously-allocated interpolation module, and re-creates - one according to the specified argument. Thus any previous calls to - :c:func:`SPRKStepSetInterpolantDegree()` will be nullified. - - This routine must be called *after* the call to :c:func:`SPRKStepCreate`. - After the first call to :c:func:`SPRKStepEvolve()` the interpolation type may - not be changed without first calling :c:func:`SPRKStepReInit()`. - - If this routine is not called, the Lagrange interpolation module will be used. - - Interpolated outputs may or may not conserve the Hamiltonian. Our testing - has shown that Lagrange interpolation typically performs well in this - regard, while Hermite interpolation does not. - .. deprecated:: x.y.z - Use :c:func:`ARKodeSetInterpolantType` instead. + This function is now a wrapper to :c:func:`ARKodeSetInterpolantType`, see + the documentation for that function instead. .. c:function:: int SPRKStepSetInterpolantDegree(void* arkode_mem, int degree) diff --git a/doc/arkode/guide/source/Usage/User_callable.rst b/doc/arkode/guide/source/Usage/User_callable.rst index 96d4f5eddd..f320ac206f 100644 --- a/doc/arkode/guide/source/Usage/User_callable.rst +++ b/doc/arkode/guide/source/Usage/User_callable.rst @@ -709,9 +709,12 @@ the user has set a stop time (with a call to the optional input function time, *tout*, in the direction of integration, i.e. :math:`t_{n-1} <` *tout* :math:`\le t_{n}` for forward integration, or :math:`t_{n} \le` *tout* :math:`< t_{n-1}` for - backward integration. It will then compute an approximation - to the solution :math:`y(tout)` by interpolation (as described - in :numref:`ARKODE.Mathematics.Interpolation`). + backward integration. If interpolation is enabled (on by + default), it will then compute an approximation to the solution + :math:`y(tout)` by interpolation (as described in + :numref:`ARKODE.Mathematics.Interpolation`). Otherwise, the + solution at the time reached by the solver is returned, + :math:`y(tret)`. The *ARK_ONE_STEP* option tells the solver to only take a single internal step, :math:`y_{n-1} \to y_{n}`, and return the solution @@ -922,12 +925,41 @@ Set max number of constraint failures :c:func:`ARKodeSetMaxNumConstr .. c:function:: int ARKodeSetInterpolantType(void* arkode_mem, int itype) - Specifies use of the Lagrange or Hermite interpolation modules (used for - dense output -- interpolation of solution output values and implicit - method predictors). + Specifies the interpolation type used for dense output (interpolation of + solution output values) and implicit method predictors. By default, the + Hermite interpolation is used expect with SPRK method where Lagrange + interpolation is the default. + + This routine must be called *after* the calling a stepper constructor. After + the first call to :c:func:`ARKodeEvolve` the interpolation type may not be + changed without first calling a stepper ``ReInit`` function. + + The Hermite interpolation module (``ARK_INTERP_HERMITE``) is described in + :numref:`ARKODE.Mathematics.Interpolation.Hermite`, and the Lagrange + interpolation module (``ARK_INTERP_LAGRANGE``) is described in + :numref:`ARKODE.Mathematics.Interpolation.Lagrange`. ``ARK_INTERP_NONE`` will + disable interpolation. + + When interpolation is disabled using, rootfinding is not supported, implicit + methods must use the trivial predictor (the default option), and + interpolation at stop times cannot be used (interpolating at stop times is + disabled by default). With interpolation disabled, calling + :c:func:`ARKodeEvolve` in ``ARK_NORMAL`` mode will return at or past the + requested output time (setting a stop time may still be used to halt the + integrator at a specific time). + + Disabling interpolation will reduce the memory footprint of an integrator by + two or more state vectors (depending on the interpolant type and degree) + which can be beneficial when interpolation is not needed e.g., when + integrating to a final time without output in between or using ARKStep as an + explicit fast time scale integrator with MRI methods. + + This routine frees any previously-allocated interpolation module, and + re-creates one according to the specified argument. :param arkode_mem: pointer to the ARKODE memory block. - :param itype: requested interpolant type (``ARK_INTERP_HERMITE`` or ``ARK_INTERP_LAGRANGE``). + :param itype: requested interpolant type: ``ARK_INTERP_HERMITE``, + ``ARK_INTERP_LAGRANGE``, or ``ARK_INTERP_NONE`` :retval ARK_SUCCESS: the function exited successfully. :retval ARK_MEM_NULL: ``arkode_mem`` was ``NULL``. @@ -935,23 +967,18 @@ Set max number of constraint failures :c:func:`ARKodeSetMaxNumConstr :retval ARK_ILL_INPUT: the *itype* argument is not recognized or the interpolation module has already been initialized. - .. note:: - - The Hermite interpolation module is described in - :numref:`ARKODE.Mathematics.Interpolation.Hermite`, and the Lagrange interpolation module - is described in :numref:`ARKODE.Mathematics.Interpolation.Lagrange`. + .. versionchanged:: x.y.z - This routine frees any previously-allocated interpolation module, and re-creates - one according to the specified argument. Thus any previous calls to - :c:func:`ARKodeSetInterpolantDegree` will be nullified. + Added the ``ARK_INTERP_NONE`` option to disable interpolation. - After the first call to :c:func:`ARKodeEvolve` the interpolation type may - not be changed without first calling ``*StepReInit``. - - If this routine is not called, the Hermite interpolation module will be used. + Values set by a previous call to :c:func:`ARKStepSetInterpolantDegree` are + no longer nullified by a call to :c:func:`ARKStepSetInterpolantType`. .. versionadded:: x.y.z + This function replaces stepper specific versions in ARKStep, ERKStep, + MRIStep, and SPRKStep. + .. c:function:: int ARKodeSetInterpolantDegree(void* arkode_mem, int degree) From d3a92e8716819675ba0e5add646c0cffc26c155e Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sat, 11 May 2024 23:50:12 -0700 Subject: [PATCH 03/18] add more subsections to change logs --- scripts/startReleaseCycle.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/startReleaseCycle.sh b/scripts/startReleaseCycle.sh index 042e4a251f..5e9f9e86b8 100755 --- a/scripts/startReleaseCycle.sh +++ b/scripts/startReleaseCycle.sh @@ -46,9 +46,13 @@ cat > tmp.txt < ../doc/shared/RecentChanges.rst < Date: Sun, 12 May 2024 00:29:23 -0700 Subject: [PATCH 04/18] update arkode and steppers --- include/arkode/arkode.h | 1 + src/arkode/arkode.c | 107 ++++++++++++++++++++------------ src/arkode/arkode_arkstep.c | 37 +++++------ src/arkode/arkode_erkstep.c | 31 +++------ src/arkode/arkode_impl.h | 1 + src/arkode/arkode_interp.c | 55 +++++----------- src/arkode/arkode_io.c | 63 +++++++++++++------ src/arkode/arkode_mristep.c | 37 +++++------ src/arkode/arkode_sprkstep.c | 34 ++++------ src/arkode/fmod/farkode_mod.f90 | 1 + 10 files changed, 187 insertions(+), 180 deletions(-) diff --git a/include/arkode/arkode.h b/include/arkode/arkode.h index a656411f3f..7bb5e8df38 100644 --- a/include/arkode/arkode.h +++ b/include/arkode/arkode.h @@ -64,6 +64,7 @@ extern "C" { #define ARK_INTERP_MAX_DEGREE 5 /* interpolation module types */ +#define ARK_INTERP_NONE -1 #define ARK_INTERP_HERMITE 0 #define ARK_INTERP_LAGRANGE 1 diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 098d0756c6..ebff430d03 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -1020,7 +1020,7 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, if ((tout - ark_mem->tstop) * ark_mem->h >= ZERO || SUNRabs(tout - ark_mem->tstop) <= troundoff) { - if (ark_mem->tstopinterp) + if (ark_mem->tstopinterp && ark_mem->interp) { retval = ARKodeGetDky(ark_mem, ark_mem->tstop, 0, yout); if (retval != ARK_SUCCESS) @@ -1051,18 +1051,28 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, /* In NORMAL mode, check if tout reached */ if ((itask == ARK_NORMAL) && (ark_mem->tcur - tout) * ark_mem->h >= ZERO) { - retval = ARKodeGetDky(ark_mem, tout, 0, yout); - if (retval != ARK_SUCCESS) + if (ark_mem->interp) { - arkProcessError(ark_mem, retval, __LINE__, __func__, __FILE__, - MSG_ARK_INTERPOLATION_FAIL, tout); - istate = retval; + retval = ARKodeGetDky(ark_mem, tout, 0, yout); + if (retval != ARK_SUCCESS) + { + arkProcessError(ark_mem, retval, __LINE__, __func__, __FILE__, + MSG_ARK_INTERPOLATION_FAIL, tout); + istate = retval; + break; + } + ark_mem->tretlast = *tret = tout; + ark_mem->next_h = ark_mem->hprime; + istate = ARK_SUCCESS; + break; + } + else + { + N_VScale(ONE, ark_mem->yn, yout); + ark_mem->tretlast = *tret = ark_mem->tcur; + istate = ARK_SUCCESS; break; } - ark_mem->tretlast = *tret = tout; - ark_mem->next_h = ark_mem->hprime; - istate = ARK_SUCCESS; - break; } /* In ONE_STEP mode, copy y and exit loop */ @@ -1193,8 +1203,7 @@ void ARKodeFree(void** arkode_mem) if (ark_mem->interp != NULL) { arkInterpFree(ark_mem, ark_mem->interp); - ark_mem->interp = NULL; - ark_mem->interp_type = -1; + ark_mem->interp = NULL; } /* free the root-finding module */ @@ -1300,7 +1309,8 @@ void ARKodePrintMem(void* arkode_mem, FILE* outfile) } /* output interpolation quantities */ - arkInterpPrintMem(ark_mem->interp, outfile); + if (ark_mem->interp) { arkInterpPrintMem(ark_mem->interp, outfile); } + else { fprintf(outfile, "interpolation = NULL\n"); } #ifdef SUNDIALS_DEBUG_PRINTVEC /* output vector quantities */ @@ -1487,8 +1497,9 @@ ARKodeMem arkCreate(SUNContext sunctx) ark_mem->liw += leniw; /* Initialize the interpolation structure to NULL */ - ark_mem->interp = NULL; - ark_mem->interp_type = -1; + ark_mem->interp = NULL; + ark_mem->interp_type = ARK_INTERP_NONE; + ark_mem->interp_degree = ARK_INTERP_MAX_DEGREE; /* Initially, rwt should point to ewt */ ark_mem->rwt_is_ewt = SUNTRUE; @@ -1654,19 +1665,6 @@ int arkInit(ARKodeMem ark_mem, sunrealtype t0, N_Vector y0, int init_type) return (ARK_MEM_FAIL); } - /* Create default Hermite interpolation module */ - if (!(ark_mem->interp)) - { - ark_mem->interp = arkInterpCreate_Hermite(ark_mem, ARK_INTERP_MAX_DEGREE); - if (ark_mem->interp == NULL) - { - arkProcessError(ark_mem, ARK_MEM_FAIL, __LINE__, __func__, __FILE__, - "Unable to allocate interpolation module"); - return (ARK_MEM_FAIL); - } - ark_mem->interp_type = ARK_INTERP_HERMITE; - } - /* All allocations are complete */ ark_mem->MallocDone = SUNTRUE; } @@ -1894,11 +1892,51 @@ int arkInitialSetup(ARKodeMem ark_mem, sunrealtype tout) } } + /* Create default Hermite interpolation module (if needed) */ + if (ark_mem->interp_type != ARK_INTERP_NONE && !(ark_mem->interp)) + { + ark_mem->interp = arkInterpCreate_Hermite(ark_mem, ark_mem->interp_degree); + if (ark_mem->interp == NULL) + { + arkProcessError(ark_mem, ARK_MEM_FAIL, __LINE__, __func__, __FILE__, + "Unable to allocate interpolation module"); + return ARK_MEM_FAIL; + } + ark_mem->interp_type = ARK_INTERP_HERMITE; + } + /* Fill initial interpolation data (if needed) */ if (ark_mem->interp != NULL) { - retval = arkInterpInit(ark_mem, ark_mem->interp, ark_mem->tcur); - if (retval != 0) { return (retval); } + /* Stepper init may have limited the interpolation degree */ + if (arkInterpSetDegree(ark_mem, ark_mem->interp, ark_mem->interp_degree)) + { + arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, __FILE__, + "Unable to update interpolation polynomial degree"); + return ARK_ILL_INPUT; + } + + if (arkInterpInit(ark_mem, ark_mem->interp, ark_mem->tcur)) + { + arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, __FILE__, + "Unable to initialize interpolation module"); + return ARK_ILL_INPUT; + } + } + + /* Check if the configuration requires interpolation */ + if (ark_mem->root_mem && !(ark_mem->interp)) + { + arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, __FILE__, + "Rootfinding requires an interpolation module"); + return ARK_ILL_INPUT; + } + + if (ark_mem->tstopinterp && !(ark_mem->interp)) + { + arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, __FILE__, + "Stop time interpolation requires an interpolation module"); + return ARK_ILL_INPUT; } /* If fullrhs will be called (to estimate initial step, explicit steppers, Hermite @@ -2144,7 +2182,7 @@ int arkStopTests(ARKodeMem ark_mem, sunrealtype tout, N_Vector yout, if ((tout - ark_mem->tstop) * ark_mem->h >= ZERO || SUNRabs(tout - ark_mem->tstop) <= troundoff) { - if (ark_mem->tstopinterp) + if (ark_mem->tstopinterp && ark_mem->interp) { *ier = ARKodeGetDky(ark_mem, ark_mem->tstop, 0, yout); if (*ier != ARK_SUCCESS) @@ -2403,13 +2441,6 @@ int arkYddNorm(ARKodeMem ark_mem, sunrealtype hg, sunrealtype* yddnrm) { int retval; - if (ark_mem->interp == NULL) - { - arkProcessError(ark_mem, ARK_MEM_NULL, __LINE__, __func__, __FILE__, - "Missing interpolation structure"); - return (ARK_MEM_NULL); - } - /* increment y with a multiple of f */ N_VLinearSum(hg, ark_mem->fn, ONE, ark_mem->yn, ark_mem->ycur); diff --git a/src/arkode/arkode_arkstep.c b/src/arkode/arkode_arkstep.c index 70275484ec..f5f61f5e38 100644 --- a/src/arkode/arkode_arkstep.c +++ b/src/arkode/arkode_arkstep.c @@ -1150,28 +1150,25 @@ int arkStep_Init(ARKodeMem ark_mem, int init_type) } } - /* Limit max interpolant degree (negative input only overwrites the current - interpolant degree if it is greater than abs(input). */ - if (ark_mem->interp != NULL) + /* Override the interpolant degree (if needed), used in arkInitialSetup */ + if (step_mem->q > 1 && ark_mem->interp_degree > (step_mem->q - 1)) { - if (step_mem->q > 1) - { - /* Limit max degree to at most one less than the method global order */ - retval = arkInterpSetDegree(ark_mem, ark_mem->interp, -(step_mem->q - 1)); - } - else - { - /* Allow for linear interpolant with first order methods to ensure - solution values are returned at the time interval end points */ - retval = arkInterpSetDegree(ark_mem, ark_mem->interp, -(step_mem->q)); - } + /* Limit max degree to at most one less than the method global order */ + ark_mem->interp_degree = step_mem->q - 1; + } + else if (step_mem->q == 1 && ark_mem->interp_degree > 1) + { + /* Allow for linear interpolant with first order methods to ensure + solution values are returned at the time interval end points */ + ark_mem->interp_degree = 1; + } - if (retval != ARK_SUCCESS) - { - arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, __FILE__, - "Unable to update interpolation polynomial degree"); - return (ARK_ILL_INPUT); - } + /* Higher-order predictors require interpolation */ + if (ark_mem->interp_type == ARK_INTERP_NONE && step_mem->predictor != 0) + { + arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, __FILE__, + "Non-trival predictors require an interpolation module"); + return ARK_ILL_INPUT; } } diff --git a/src/arkode/arkode_erkstep.c b/src/arkode/arkode_erkstep.c index 2432784596..1da8125942 100644 --- a/src/arkode/arkode_erkstep.c +++ b/src/arkode/arkode_erkstep.c @@ -449,28 +449,17 @@ int erkStep_Init(ARKodeMem ark_mem, int init_type) ark_mem->liw += (step_mem->stages + 1); /* pointers */ } - /* Limit max interpolant degree (negative input only overwrites the current - interpolant degree if it is greater than abs(input). */ - if (ark_mem->interp != NULL) + /* Override the interpolant degree (if needed), used in arkInitialSetup */ + if (step_mem->q > 1 && ark_mem->interp_degree > (step_mem->q - 1)) { - if (step_mem->q > 1) - { - /* Limit max degree to at most one less than the method global order */ - retval = arkInterpSetDegree(ark_mem, ark_mem->interp, -(step_mem->q - 1)); - } - else - { - /* Allow for linear interpolant with first order methods to ensure - solution values are returned at the time interval end points */ - retval = arkInterpSetDegree(ark_mem, ark_mem->interp, -(step_mem->q)); - } - - if (retval != ARK_SUCCESS) - { - arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, __FILE__, - "Unable to update interpolation polynomial degree"); - return (ARK_ILL_INPUT); - } + /* Limit max degree to at most one less than the method global order */ + ark_mem->interp_degree = step_mem->q - 1; + } + else if (step_mem->q == 1 && ark_mem->interp_degree > 1) + { + /* Allow for linear interpolant with first order methods to ensure + solution values are returned at the time interval end points */ + ark_mem->interp_degree = 1; } /* Signal to shared arkode module that full RHS evaluations are required */ diff --git a/src/arkode/arkode_impl.h b/src/arkode/arkode_impl.h index 4f6cad21be..f5a91d468c 100644 --- a/src/arkode/arkode_impl.h +++ b/src/arkode/arkode_impl.h @@ -466,6 +466,7 @@ struct ARKodeMemRec /* Temporal interpolation module */ ARKInterp interp; int interp_type; + int interp_degree; /* Tstop information */ sunbooleantype tstopset; diff --git a/src/arkode/arkode_interp.c b/src/arkode/arkode_interp.c index 2d61283c7a..9ed3c38b05 100644 --- a/src/arkode/arkode_interp.c +++ b/src/arkode/arkode_interp.c @@ -23,6 +23,7 @@ #include #include +#include "arkode/arkode.h" #include "arkode_impl.h" #include "arkode_interp_impl.h" @@ -311,29 +312,18 @@ void arkInterpPrintMem_Hermite(ARKInterp interp, FILE* outfile) ---------------------------------------------------------------*/ int arkInterpSetDegree_Hermite(ARKodeMem ark_mem, ARKInterp interp, int degree) { - /* if this degree is already stored, just return */ - if (abs(degree) == HINT_DEGREE(interp)) { return (ARK_SUCCESS); } - - /* on positive degree, check for allowable value and overwrite stored degree */ - if (degree >= 0) + if (degree > ARK_INTERP_MAX_DEGREE) { - if (degree > ARK_INTERP_MAX_DEGREE) - { - arkProcessError(ark_mem, ARK_INTERP_FAIL, __LINE__, __func__, __FILE__, - "Illegal degree specified."); - return (ARK_ILL_INPUT); - } - - HINT_DEGREE(interp) = degree; - return (ARK_SUCCESS); + arkProcessError(ark_mem, ARK_INTERP_FAIL, __LINE__, __func__, __FILE__, + "Illegal degree specified."); + return ARK_ILL_INPUT; } - /* on negative degree, check for allowable value and update stored degree */ - degree = -degree; - if (degree > ARK_INTERP_MAX_DEGREE) { degree = ARK_INTERP_MAX_DEGREE; } - HINT_DEGREE(interp) = SUNMIN(HINT_DEGREE(interp), degree); + if (degree < 0) { degree = ARK_INTERP_MAX_DEGREE; } - return (ARK_SUCCESS); + HINT_DEGREE(interp) = degree; + + return ARK_SUCCESS; } /*--------------------------------------------------------------- @@ -1036,29 +1026,18 @@ void arkInterpPrintMem_Lagrange(ARKInterp I, FILE* outfile) ---------------------------------------------------------------*/ int arkInterpSetDegree_Lagrange(ARKodeMem ark_mem, ARKInterp I, int degree) { - /* if this degree is already stored, just return */ - if (abs(degree) + 1 == LINT_NMAX(I)) { return (ARK_SUCCESS); } - - /* on positive degree, check for allowable value and overwrite stored degree */ - if (degree >= 0) + if (degree > ARK_INTERP_MAX_DEGREE) { - if (degree > ARK_INTERP_MAX_DEGREE) - { - arkProcessError(ark_mem, ARK_INTERP_FAIL, __LINE__, __func__, __FILE__, - "Illegal degree specified."); - return (ARK_ILL_INPUT); - } - - LINT_NMAX(I) = degree + 1; - return (ARK_SUCCESS); + arkProcessError(ark_mem, ARK_INTERP_FAIL, __LINE__, __func__, __FILE__, + "Illegal degree specified."); + return ARK_ILL_INPUT; } - /* on negative degree, check for allowable value and update stored degree */ - degree = -degree; - if (degree > ARK_INTERP_MAX_DEGREE) { degree = ARK_INTERP_MAX_DEGREE; } - LINT_NMAX(I) = SUNMIN(LINT_NMAX(I), degree + 1); + if (degree < 0) { degree = ARK_INTERP_MAX_DEGREE; } - return (ARK_SUCCESS); + LINT_NMAX(I) = degree + 1; + + return ARK_SUCCESS; } /*--------------------------------------------------------------- diff --git a/src/arkode/arkode_io.c b/src/arkode/arkode_io.c index 291a61ec35..aa743e9171 100644 --- a/src/arkode/arkode_io.c +++ b/src/arkode/arkode_io.c @@ -25,6 +25,7 @@ #include #include +#include "arkode/arkode.h" #include "arkode_impl.h" #include "arkode_interp_impl.h" #include "arkode_user_controller.h" @@ -165,7 +166,8 @@ int ARKodeSetInterpolantType(void* arkode_mem, int itype) ark_mem = (ARKodeMem)arkode_mem; /* check for legal itype input */ - if ((itype != ARK_INTERP_HERMITE) && (itype != ARK_INTERP_LAGRANGE)) + if ((itype != ARK_INTERP_HERMITE) && (itype != ARK_INTERP_LAGRANGE) && + (itype != ARK_INTERP_NONE)) { arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, __FILE__, "Illegal interpolation type input."); @@ -191,24 +193,30 @@ int ARKodeSetInterpolantType(void* arkode_mem, int itype) the maximum possible interpolant degree. */ if (itype == ARK_INTERP_HERMITE) { - ark_mem->interp = arkInterpCreate_Hermite(arkode_mem, ARK_INTERP_MAX_DEGREE); + ark_mem->interp = arkInterpCreate_Hermite(arkode_mem, ark_mem->interp_degree); + if (ark_mem->interp == NULL) + { + arkProcessError(ark_mem, ARK_MEM_FAIL, __LINE__, __func__, __FILE__, + "Unable to allocate interpolation structure"); + return ARK_MEM_FAIL; + } ark_mem->interp_type = ARK_INTERP_HERMITE; } else if (itype == ARK_INTERP_LAGRANGE) { - ark_mem->interp = arkInterpCreate_Lagrange(arkode_mem, ARK_INTERP_MAX_DEGREE); + ark_mem->interp = arkInterpCreate_Lagrange(arkode_mem, + ark_mem->interp_degree); + if (ark_mem->interp == NULL) + { + arkProcessError(ark_mem, ARK_MEM_FAIL, __LINE__, __func__, __FILE__, + "Unable to allocate interpolation structure"); + } ark_mem->interp_type = ARK_INTERP_LAGRANGE; } else { ark_mem->interp = NULL; - ark_mem->interp_type = -1; - } - if (ark_mem->interp == NULL) - { - arkProcessError(ark_mem, ARK_MEM_FAIL, __LINE__, __func__, __FILE__, - "Unable to allocate interpolation structure"); - return (ARK_MEM_FAIL); + ark_mem->interp_type = ARK_INTERP_NONE; } return (ARK_SUCCESS); @@ -239,13 +247,6 @@ int ARKodeSetInterpolantDegree(void* arkode_mem, int degree) } ark_mem = (ARKodeMem)arkode_mem; - if (ark_mem->interp == NULL) - { - arkProcessError(ark_mem, ARK_MEM_NULL, __LINE__, __func__, __FILE__, - "Interpolation module is not yet allocated"); - return (ARK_MEM_NULL); - } - /* do not change degree once the module has been initialized */ if (ark_mem->initialized) { @@ -254,9 +255,23 @@ int ARKodeSetInterpolantDegree(void* arkode_mem, int degree) return (ARK_ILL_INPUT); } - /* pass 'degree' to interpolation module, returning its value */ - if (degree < 0) { degree = ARK_INTERP_MAX_DEGREE; } - return (arkInterpSetDegree(ark_mem, ark_mem->interp, degree)); + if (degree > ARK_INTERP_MAX_DEGREE) + { + arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, __FILE__, + "Illegal degree specified."); + return ARK_ILL_INPUT; + } + else if (degree < 0) { ark_mem->interp_degree = ARK_INTERP_MAX_DEGREE; } + else { ark_mem->interp_degree = degree; } + + /* Set the degree now if possible otherwise it will be used when creating the + interpolation module */ + if (ark_mem->interp) + { + return arkInterpSetDegree(ark_mem, ark_mem->interp, ark_mem->interp_degree); + } + + return ARK_SUCCESS; } /*--------------------------------------------------------------- @@ -655,6 +670,14 @@ int ARKodeSetPredictorMethod(void* arkode_mem, int pred_method) return (ARK_STEPPER_UNSUPPORTED); } + /* Higher-order predictors require interpolation */ + if (ark_mem->interp_type == ARK_INTERP_NONE && pred_method != 0) + { + arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, __FILE__, + "Non-trival predictors require an interpolation module"); + return ARK_ILL_INPUT; + } + /* Call stepper routine (if provided) */ if (ark_mem->step_setpredictormethod) { diff --git a/src/arkode/arkode_mristep.c b/src/arkode/arkode_mristep.c index 78f34da788..ce77dde8d4 100644 --- a/src/arkode/arkode_mristep.c +++ b/src/arkode/arkode_mristep.c @@ -1115,28 +1115,25 @@ int mriStep_Init(ARKodeMem ark_mem, int init_type) return (ARK_MEM_FAIL); } - /* Limit max interpolant degree (negative input only overwrites the current - interpolant degree if it is greater than abs(input). */ - if (ark_mem->interp != NULL) + /* Override the interpolant degree (if needed), used in arkInitialSetup */ + if (step_mem->q > 1 && ark_mem->interp_degree > (step_mem->q - 1)) { - if (step_mem->q > 1) - { - /* Limit max degree to at most one less than the method global order */ - retval = arkInterpSetDegree(ark_mem, ark_mem->interp, -(step_mem->q - 1)); - } - else - { - /* Allow for linear interpolant with first order methods to ensure - solution values are returned at the time interval end points */ - retval = arkInterpSetDegree(ark_mem, ark_mem->interp, -(step_mem->q)); - } + /* Limit max degree to at most one less than the method global order */ + ark_mem->interp_degree = step_mem->q - 1; + } + else if (step_mem->q == 1 && ark_mem->interp_degree > 1) + { + /* Allow for linear interpolant with first order methods to ensure + solution values are returned at the time interval end points */ + ark_mem->interp_degree = 1; + } - if (retval != ARK_SUCCESS) - { - arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, __FILE__, - "Unable to update interpolation polynomial degree"); - return (ARK_ILL_INPUT); - } + /* Higher-order predictors require interpolation */ + if (ark_mem->interp_type == ARK_INTERP_NONE && step_mem->predictor != 0) + { + arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, __FILE__, + "Non-trival predictors require an interpolation module"); + return ARK_ILL_INPUT; } } diff --git a/src/arkode/arkode_sprkstep.c b/src/arkode/arkode_sprkstep.c index 8537444ab6..b84bc328c1 100644 --- a/src/arkode/arkode_sprkstep.c +++ b/src/arkode/arkode_sprkstep.c @@ -410,30 +410,18 @@ int sprkStep_Init(ARKodeMem ark_mem, int init_type) } } - /* Limit max interpolant degree (negative input only overwrites the current - interpolant degree if it is greater than abs(input). */ - if (ark_mem->interp != NULL) + /* Override the interpolant degree (if needed), used in arkInitialSetup */ + if (step_mem->method->q > 1 && + ark_mem->interp_degree > (step_mem->method->q - 1)) { - if (step_mem->method->q > 1) - { - /* Limit max degree to at most one less than the method global order */ - retval = arkInterpSetDegree(ark_mem, ark_mem->interp, - -(step_mem->method->q - 1)); - } - else - { - /* Allow for linear interpolant with first order methods to ensure - solution values are returned at the time interval end points */ - retval = arkInterpSetDegree(ark_mem, ark_mem->interp, - -(step_mem->method->q)); - } - - if (retval != ARK_SUCCESS) - { - arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, __FILE__, - "Unable to update interpolation polynomial degree"); - return (ARK_ILL_INPUT); - } + /* Limit max degree to at most one less than the method global order */ + ark_mem->interp_degree = step_mem->method->q - 1; + } + else if (step_mem->method->q == 1 && ark_mem->interp_degree > 1) + { + /* Allow for linear interpolant with first order methods to ensure + solution values are returned at the time interval end points */ + ark_mem->interp_degree = 1; } return (ARK_SUCCESS); diff --git a/src/arkode/fmod/farkode_mod.f90 b/src/arkode/fmod/farkode_mod.f90 index f6252c31f4..182cf7fe2f 100644 --- a/src/arkode/fmod/farkode_mod.f90 +++ b/src/arkode/fmod/farkode_mod.f90 @@ -38,6 +38,7 @@ module farkode_mod integer(C_INT), parameter, public :: ARK_FULLRHS_END = 1_C_INT integer(C_INT), parameter, public :: ARK_FULLRHS_OTHER = 2_C_INT integer(C_INT), parameter, public :: ARK_INTERP_MAX_DEGREE = 5_C_INT + integer(C_INT), parameter, public :: ARK_INTERP_NONE = -1_C_INT integer(C_INT), parameter, public :: ARK_INTERP_HERMITE = 0_C_INT integer(C_INT), parameter, public :: ARK_INTERP_LAGRANGE = 1_C_INT integer(C_INT), parameter, public :: ARK_SUCCESS = 0_C_INT From 5650b89c4b8db2ca527d98365cc1f2dbf0282ed6 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 12 May 2024 00:58:16 -0700 Subject: [PATCH 05/18] update tests --- .../arkode/CXX_serial/CMakeLists.txt | 8 +- .../CXX_serial/ark_test_dahlquist_ark.cpp | 40 ++- .../CXX_serial/ark_test_dahlquist_erk.cpp | 40 ++- .../CXX_serial/ark_test_dahlquist_mri.cpp | 294 +++++++++++------- 4 files changed, 248 insertions(+), 134 deletions(-) diff --git a/test/unit_tests/arkode/CXX_serial/CMakeLists.txt b/test/unit_tests/arkode/CXX_serial/CMakeLists.txt index 9eb5952496..331b1ece35 100644 --- a/test/unit_tests/arkode/CXX_serial/CMakeLists.txt +++ b/test/unit_tests/arkode/CXX_serial/CMakeLists.txt @@ -18,15 +18,21 @@ set(unit_tests "ark_test_analytic_sys_mri.cpp\;0" "ark_test_analytic_sys_mri.cpp\;1" + "ark_test_dahlquist_ark.cpp\;0 -1" + "ark_test_dahlquist_ark.cpp\;1 -1" + "ark_test_dahlquist_ark.cpp\;2 -1" "ark_test_dahlquist_ark.cpp\;0 0" "ark_test_dahlquist_ark.cpp\;1 0" "ark_test_dahlquist_ark.cpp\;2 0" "ark_test_dahlquist_ark.cpp\;0 1" "ark_test_dahlquist_ark.cpp\;1 1" "ark_test_dahlquist_ark.cpp\;2 1" + "ark_test_dahlquist_erk.cpp\;-1" "ark_test_dahlquist_erk.cpp\;0" "ark_test_dahlquist_erk.cpp\;1" - "ark_test_dahlquist_mri.cpp\;" + "ark_test_dahlquist_mri.cpp\;-1" + "ark_test_dahlquist_mri.cpp\;0" + "ark_test_dahlquist_mri.cpp\;1" "ark_test_butcher.cpp\;" "ark_test_getjac.cpp\;" "ark_test_getjac_mri.cpp\;" diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_ark.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_ark.cpp index 6a98c79797..4cad0ee64b 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_ark.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_ark.cpp @@ -65,6 +65,7 @@ enum class rk_type enum class interp_type { + none = -1, hermite, lagrange }; @@ -93,8 +94,9 @@ struct ProblemOptions sunrealtype h = SUN_RCONST(0.01); // Interpolant type - // 0 = Hermite - // 1 = Lagrange + // -1 = None + // 0 = Hermite + // 1 = Lagrange interp_type i_type = interp_type::hermite; // Predictor type @@ -166,8 +168,20 @@ int main(int argc, char* argv[]) if (argc > 2) { - if (std::stoi(argv[2]) == 1) { prob_opts.i_type = interp_type::lagrange; } - else { prob_opts.i_type = interp_type::hermite; } + if (std::stoi(argv[2]) == -1) { prob_opts.i_type = interp_type::none; } + else if (std::stoi(argv[2]) == 0) + { + prob_opts.i_type = interp_type::hermite; + } + else if (std::stoi(argv[2]) == 1) + { + prob_opts.i_type = interp_type::lagrange; + } + else + { + std::cerr << "ERROR: Invalid interpolation type option" << std::endl; + return 1; + } } if (argc > 3) @@ -201,7 +215,11 @@ int main(int argc, char* argv[]) { std::cout << " interp type = Hermite\n"; } - else { std::cout << " interp type = Lagrange\n"; } + else if (prob_opts.i_type == interp_type::lagrange) + { + std::cout << " interp type = Lagrange\n"; + } + else { std::cout << " interp type = None\n"; } if (prob_opts.p_type == 0) { std::cout << " pred type = Trivial (0)\n"; } else { std::cout << " pred type = Max order (1)\n"; } @@ -489,6 +507,11 @@ int run_tests(ARKodeButcherTable Be, ARKodeButcherTable Bi, flag = ARKodeSetInterpolantType(arkstep_mem, ARK_INTERP_LAGRANGE); if (check_flag(&flag, "ARKodeSetInterpolantType", 1)) { return 1; } } + else if (prob_opts.i_type == interp_type::none) + { + flag = ARKodeSetInterpolantType(arkstep_mem, ARK_INTERP_NONE); + if (check_flag(&flag, "ARKodeSetInterpolantType", 1)) { return 1; } + } // Create matrix and linear solver (if necessary) SUNMatrix A = nullptr; @@ -595,8 +618,11 @@ int run_tests(ARKodeButcherTable Be, ARKodeButcherTable Bi, flag = ARKodeGetLastStep(arkstep_mem, &h_last); if (check_flag(&flag, "ARKodeGetLastStep", 1)) { return 1; } - flag = ARKodeGetDky(arkstep_mem, t_ret - h_last / TWO, 0, y); - if (check_flag(&flag, "ARKodeGetDky", 1)) { return 1; } + if (prob_opts.i_type != interp_type::none) + { + flag = ARKodeGetDky(arkstep_mem, t_ret - h_last / TWO, 0, y); + if (check_flag(&flag, "ARKodeGetDky", 1)) { return 1; } + } // Stiffly accurate (and FSAL) methods do not require an additional RHS // evaluation to get the new RHS value at the end of a step for dense diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_erk.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_erk.cpp index a97e27ecd8..de271e6646 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_erk.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_erk.cpp @@ -46,6 +46,7 @@ enum class interp_type { + none = -1, hermite, lagrange }; @@ -71,8 +72,9 @@ struct ProblemOptions sunrealtype h = SUN_RCONST(0.01); // Interpolant type - // 0 = Hermite - // 1 = Lagrange + // -1 = None + // 0 = Hermite + // 1 = Lagrange interp_type i_type = interp_type::hermite; }; @@ -109,8 +111,20 @@ int main(int argc, char* argv[]) // Check for inputs if (argc > 1) { - if (std::stoi(argv[1]) == 0) { prob_opts.i_type = interp_type::hermite; } - else { prob_opts.i_type = interp_type::lagrange; } + if (std::stoi(argv[1]) == -1) { prob_opts.i_type = interp_type::none; } + else if (std::stoi(argv[1]) == 0) + { + prob_opts.i_type = interp_type::hermite; + } + else if (std::stoi(argv[1]) == 1) + { + prob_opts.i_type = interp_type::lagrange; + } + else + { + std::cerr << "ERROR: Invalid interpolation type option" << std::endl; + return 1; + } } // Output problem setup @@ -123,7 +137,11 @@ int main(int argc, char* argv[]) { std::cout << " interp type = Hermite\n"; } - else { std::cout << " interp type = Lagrange\n"; } + else if (prob_opts.i_type == interp_type::lagrange) + { + std::cout << " interp type = Lagrange\n"; + } + else { std::cout << " interp type = None\n"; } // Create SUNDIALS context sundials::Context sunctx; @@ -251,6 +269,11 @@ int run_tests(ARKodeButcherTable Be, ProblemData& prob_data, flag = ARKodeSetInterpolantType(erkstep_mem, ARK_INTERP_LAGRANGE); if (check_flag(&flag, "ARKodeSetInterpolantType", 1)) { return 1; } } + else if (prob_opts.i_type == interp_type::none) + { + flag = ARKodeSetInterpolantType(erkstep_mem, ARK_INTERP_NONE); + if (check_flag(&flag, "ERKodeSetInterpolantType", 1)) { return 1; } + } // Attach Butcher tables flag = ERKStepSetTable(erkstep_mem, Be); @@ -305,8 +328,11 @@ int run_tests(ARKodeButcherTable Be, ProblemData& prob_data, flag = ARKodeGetLastStep(erkstep_mem, &h_last); if (check_flag(&flag, "ARKodeGetLastStep", 1)) { return 1; } - flag = ARKodeGetDky(erkstep_mem, t_ret - h_last / TWO, 0, y); - if (check_flag(&flag, "ARKodeGetDky", 1)) { return 1; } + if (prob_opts.i_type != interp_type::none) + { + flag = ARKodeGetDky(erkstep_mem, t_ret - h_last / TWO, 0, y); + if (check_flag(&flag, "ARKodeGetDky", 1)) { return 1; } + } // Stiffly accurate (and FSAL) methods do not require an additional RHS // evaluation to get the new RHS value at the end of a step for dense diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_mri.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_mri.cpp index 7e3d20ca84..85ea2b676a 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_mri.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_mri.cpp @@ -43,16 +43,45 @@ #define FSYM "f" #endif -using namespace std; +enum class interp_type +{ + none = -1, + hermite, + lagrange, +}; -// User data structure -struct UserData +// Problem parameters +struct ProblemData { sunrealtype lambda_e = SUN_RCONST(-1.0); sunrealtype lambda_i = SUN_RCONST(-1.0); sunrealtype lambda_f = SUN_RCONST(-1.0); }; +// Problem options +struct ProblemOptions +{ + // Initial time + sunrealtype t0 = SUN_RCONST(0.0); + + // Number of time steps + int nsteps = 1; + + // Relative and absolute tolerances + sunrealtype reltol = SUN_RCONST(1.0e-4); + sunrealtype abstol = SUN_RCONST(1.0e-6); + + // Slow and fast step sizes + sunrealtype hs = SUN_RCONST(0.01); + sunrealtype hf = SUN_RCONST(0.01); + + // Interpolant type + // -1 = None + // 0 = Hermite + // 1 = Lagrange + interp_type i_type = interp_type::hermite; +}; + // User-supplied Functions called by the solver static int fe(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); static int fi(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data); @@ -61,12 +90,11 @@ static int Ji(sunrealtype t, N_Vector y, N_Vector fy, SUNMatrix J, void* user_data, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3); // Private function to check function return values -static int check_flag(void* flagvalue, const string funcname, int opt); +static int check_flag(void* flagvalue, const std::string funcname, int opt); // Test drivers -static int run_tests(MRISTEP_METHOD_TYPE type, sunrealtype t0, int nsteps, - sunrealtype hs, sunrealtype hf, sunrealtype reltol, - sunrealtype abstol, UserData* udata, SUNContext ctx); +static int run_tests(MRISTEP_METHOD_TYPE type, ProblemOptions& prob_opts, + ProblemData& prob_data, SUNContext ctx); // ----------------------------------------------------------------------------- // Main Program @@ -74,58 +102,61 @@ static int run_tests(MRISTEP_METHOD_TYPE type, sunrealtype t0, int nsteps, int main(int argc, char* argv[]) { - // Initial time - sunrealtype t0 = SUN_RCONST(0.0); - - // Number of time steps - int nsteps = 1; - - // Relative and absolute tolerances - sunrealtype reltol = SUN_RCONST(1.0e-4); - sunrealtype abstol = SUN_RCONST(1.0e-6); - - // Slow and fast step sizes - sunrealtype hs = SUN_RCONST(0.01); - sunrealtype hf = SUN_RCONST(0.01); - - // User data structure - UserData udata; + // Problem data and options structures + ProblemData prob_data; + ProblemOptions prob_opts; // Check for inputs - if (argc > 1) { udata.lambda_e = std::stod(argv[1]); } - if (argc > 2) { udata.lambda_i = std::stod(argv[2]); } - if (argc > 3) { udata.lambda_f = std::stod(argv[3]); } - if (argc > 4) { hs = std::stod(argv[4]); } - if (argc > 5) { hf = std::stod(argv[5]); } - if (argc > 5) { nsteps = std::stoi(argv[6]); } + if (argc > 1) + { + if (std::stoi(argv[1]) == -1) { prob_opts.i_type = interp_type::none; } + else if (std::stoi(argv[1]) == 0) + { + prob_opts.i_type = interp_type::hermite; + } + else if (std::stoi(argv[1]) == 1) + { + prob_opts.i_type = interp_type::lagrange; + } + else + { + std::cerr << "ERROR: Invalid interpolation type option" << std::endl; + return 1; + } + } // Output problem setup - cout << "\nDahlquist ODE test problem:\n"; - cout << " lambda expl = " << udata.lambda_e << "\n"; - cout << " lambda impl = " << udata.lambda_i << "\n"; - cout << " lambda fast = " << udata.lambda_f << "\n"; - cout << " h slow = " << hs << "\n"; - cout << " h fast = " << hf << "\n"; - cout << " relative tol = " << reltol << "\n"; - cout << " absolute tol = " << abstol << "\n"; - + std::cout << "\nDahlquist ODE test problem:\n"; + std::cout << " lambda expl = " << prob_data.lambda_e << "\n"; + std::cout << " lambda impl = " << prob_data.lambda_i << "\n"; + std::cout << " lambda fast = " << prob_data.lambda_f << "\n"; + std::cout << " h slow = " << prob_opts.hs << "\n"; + std::cout << " h fast = " << prob_opts.hf << "\n"; + std::cout << " relative tol = " << prob_opts.reltol << "\n"; + std::cout << " absolute tol = " << prob_opts.abstol << "\n"; + if (prob_opts.i_type == interp_type::hermite) + { + std::cout << " interp type = Hermite\n"; + } + else if (prob_opts.i_type == interp_type::lagrange) + { + std::cout << " interp type = Lagrange\n"; + } + else { std::cout << " interp type = None\n"; } // Create SUNDIALS context sundials::Context sunctx; // Test methods int numfails = 0; - numfails += run_tests(MRISTEP_EXPLICIT, t0, nsteps, hs, hf, reltol, abstol, - &udata, sunctx); + numfails += run_tests(MRISTEP_EXPLICIT, prob_opts, prob_data, sunctx); - numfails += run_tests(MRISTEP_IMPLICIT, t0, nsteps, hs, hf, reltol, abstol, - &udata, sunctx); + numfails += run_tests(MRISTEP_IMPLICIT, prob_opts, prob_data, sunctx); - numfails += run_tests(MRISTEP_IMEX, t0, nsteps, hs, hf, reltol, abstol, - &udata, sunctx); + numfails += run_tests(MRISTEP_IMEX, prob_opts, prob_data, sunctx); - if (numfails) { cout << "\n\nFailed " << numfails << " tests!\n"; } - else { cout << "\n\nAll tests passed!\n"; } + if (numfails) { std::cout << "\n\nFailed " << numfails << " tests!\n"; } + else { std::cout << "\n\nAll tests passed!\n"; } // Return test status return numfails; @@ -135,9 +166,8 @@ int main(int argc, char* argv[]) // Test drivers // ----------------------------------------------------------------------------- -int run_tests(MRISTEP_METHOD_TYPE type, sunrealtype t0, int nsteps, - sunrealtype hs, sunrealtype hf, sunrealtype reltol, - sunrealtype abstol, UserData* udata, SUNContext sunctx) +int run_tests(MRISTEP_METHOD_TYPE type, ProblemOptions& prob_opts, + ProblemData& prob_data, SUNContext sunctx) { // Reusable error-checking flag int flag; @@ -170,21 +200,33 @@ int run_tests(MRISTEP_METHOD_TYPE type, sunrealtype t0, int nsteps, // ---------------------- // Create explicit fast integrator - void* arkstep_mem = ARKStepCreate(ff, nullptr, t0, y, sunctx); + void* arkstep_mem = ARKStepCreate(ff, nullptr, prob_opts.t0, y, sunctx); if (check_flag((void*)arkstep_mem, "ARKStepCreate", 0)) { return 1; } // Set user data - flag = ARKodeSetUserData(arkstep_mem, udata); + flag = ARKodeSetUserData(arkstep_mem, &prob_data); if (check_flag(&flag, "ARKodeSetUserData", 1)) { return 1; } // Specify tolerances - flag = ARKodeSStolerances(arkstep_mem, reltol, abstol); + flag = ARKodeSStolerances(arkstep_mem, prob_opts.reltol, prob_opts.abstol); if (check_flag(&flag, "ARKodeSStolerances", 1)) { return 1; } // Specify fixed time step size - flag = ARKodeSetFixedStep(arkstep_mem, hf); + flag = ARKodeSetFixedStep(arkstep_mem, prob_opts.hf); if (check_flag(&flag, "ARKodeSetFixedStep", 1)) { return 1; } + // Lagrange interpolant (removes additional RHS evaluation with DIRK methods) + if (prob_opts.i_type == interp_type::lagrange) + { + flag = ARKodeSetInterpolantType(arkstep_mem, ARK_INTERP_LAGRANGE); + if (check_flag(&flag, "ARKStepSetInterpolantType", 1)) { return 1; } + } + else if (prob_opts.i_type == interp_type::none) + { + flag = ARKodeSetInterpolantType(arkstep_mem, ARK_INTERP_NONE); + if (check_flag(&flag, "ARKStepSetInterpolantType", 1)) { return 1; } + } + // Wrap ARKStep integrator as fast integrator object MRIStepInnerStepper inner_stepper = nullptr; flag = ARKStepCreateMRIStepInnerStepper(arkstep_mem, &inner_stepper); @@ -199,29 +241,31 @@ int run_tests(MRISTEP_METHOD_TYPE type, sunrealtype t0, int nsteps, if (type == MRISTEP_EXPLICIT) { - mristep_mem = MRIStepCreate(fe, nullptr, t0, y, inner_stepper, sunctx); + mristep_mem = MRIStepCreate(fe, nullptr, prob_opts.t0, y, inner_stepper, + sunctx); } else if (type == MRISTEP_IMPLICIT) { - mristep_mem = MRIStepCreate(nullptr, fi, t0, y, inner_stepper, sunctx); + mristep_mem = MRIStepCreate(nullptr, fi, prob_opts.t0, y, inner_stepper, + sunctx); } else if (type == MRISTEP_IMEX) { - mristep_mem = MRIStepCreate(fe, fi, t0, y, inner_stepper, sunctx); + mristep_mem = MRIStepCreate(fe, fi, prob_opts.t0, y, inner_stepper, sunctx); } else { return 1; } if (check_flag((void*)mristep_mem, "MRIStepCreate", 0)) { return 1; } // Set user data - flag = ARKodeSetUserData(mristep_mem, udata); + flag = ARKodeSetUserData(mristep_mem, &prob_data); if (check_flag(&flag, "ARKodeSetUserData", 1)) { return 1; } // Specify tolerances - flag = ARKodeSStolerances(mristep_mem, reltol, abstol); + flag = ARKodeSStolerances(mristep_mem, prob_opts.reltol, prob_opts.abstol); if (check_flag(&flag, "ARKodeSStolerances", 1)) { return 1; } // Specify fixed time step sizes - flag = ARKodeSetFixedStep(mristep_mem, hs); + flag = ARKodeSetFixedStep(mristep_mem, prob_opts.hs); if (check_flag(&flag, "ARKodeSetFixedStep", 1)) { return 1; } if (type == MRISTEP_IMPLICIT || type == MRISTEP_IMEX) @@ -239,6 +283,18 @@ int run_tests(MRISTEP_METHOD_TYPE type, sunrealtype t0, int nsteps, if (check_flag(&flag, "ARKodeSetLinear", 1)) { return 1; } } + // Lagrange interpolant (removes additional RHS evaluation with DIRK methods) + if (prob_opts.i_type == interp_type::lagrange) + { + flag = ARKodeSetInterpolantType(mristep_mem, ARK_INTERP_LAGRANGE); + if (check_flag(&flag, "ARKStepSetInterpolantType", 1)) { return 1; } + } + else if (prob_opts.i_type == interp_type::none) + { + flag = ARKodeSetInterpolantType(mristep_mem, ARK_INTERP_NONE); + if (check_flag(&flag, "ARKStepSetInterpolantType", 1)) { return 1; } + } + // ------------------------------------ // Evolve with various IMEX MRI methods // ------------------------------------ @@ -248,9 +304,9 @@ int run_tests(MRISTEP_METHOD_TYPE type, sunrealtype t0, int nsteps, if (type == MRISTEP_EXPLICIT) { - cout << "\n=========================\n"; - cout << "Test explicit MRI methods\n"; - cout << "=========================\n"; + std::cout << "\n=========================\n"; + std::cout << "Test explicit MRI methods\n"; + std::cout << "=========================\n"; methods.insert({{"ARKODE_MRI_GARK_FORWARD_EULER", false}, {"ARKODE_MRI_GARK_ERK22a", false}, @@ -263,9 +319,9 @@ int run_tests(MRISTEP_METHOD_TYPE type, sunrealtype t0, int nsteps, } else if (type == MRISTEP_IMPLICIT) { - cout << "\n=========================\n"; - cout << "Test implicit MRI methods\n"; - cout << "=========================\n"; + std::cout << "\n=========================\n"; + std::cout << "Test implicit MRI methods\n"; + std::cout << "=========================\n"; methods.insert({{"ARKODE_MRI_GARK_BACKWARD_EULER", true}, {"ARKODE_MRI_GARK_IRK21a", true}, @@ -275,9 +331,9 @@ int run_tests(MRISTEP_METHOD_TYPE type, sunrealtype t0, int nsteps, } else if (type == MRISTEP_IMEX) { - cout << "\n=====================\n"; - cout << "Test IMEX MRI methods\n"; - cout << "=====================\n"; + std::cout << "\n=====================\n"; + std::cout << "Test IMEX MRI methods\n"; + std::cout << "=====================\n"; methods.insert({{"ARKODE_IMEX_MRI_GARK_EULER", true}, {"ARKODE_IMEX_MRI_GARK_TRAPEZOIDAL", false}, @@ -292,7 +348,7 @@ int run_tests(MRISTEP_METHOD_TYPE type, sunrealtype t0, int nsteps, { std::string id = pair.first; bool stiffly_accurate = pair.second; - cout << "\nTesting method " << id << "\n"; + std::cout << "\nTesting method " << id << "\n"; // ------------- // Select method @@ -311,7 +367,7 @@ int run_tests(MRISTEP_METHOD_TYPE type, sunrealtype t0, int nsteps, flag = mriStepCoupling_GetStageMap(C, stage_map, &nstages_stored); if (check_flag(&flag, "mriStepCoupling_GetStageMap", 1)) { return 1; } - cout << " Stored stages = " << nstages_stored << "\n"; + std::cout << " Stored stages = " << nstages_stored << "\n"; delete[] stage_map; // Set coupling table @@ -322,17 +378,17 @@ int run_tests(MRISTEP_METHOD_TYPE type, sunrealtype t0, int nsteps, // Output statistics // ----------------- - sunrealtype t = t0; - sunrealtype tf = nsteps * hs; + sunrealtype t = prob_opts.t0; + sunrealtype tf = prob_opts.nsteps * prob_opts.hs; - for (int i = 0; i < nsteps; i++) + for (int i = 0; i < prob_opts.nsteps; i++) { // Advance in time flag = ARKodeEvolve(mristep_mem, tf, y, &t, ARK_ONE_STEP); if (check_flag(&flag, "ARKodeEvolve", 1)) { return 1; } // Update output time - tf += hs; + tf += prob_opts.hs; } // ----------------- @@ -367,43 +423,43 @@ int run_tests(MRISTEP_METHOD_TYPE type, sunrealtype t0, int nsteps, check_flag(&flag, "ARKodeGetNumLinRhsEvals", 1); } - sunrealtype pow = udata->lambda_f; + sunrealtype pow = prob_data.lambda_f; if (type == MRISTEP_EXPLICIT || type == MRISTEP_IMEX) { - pow += udata->lambda_e; + pow += prob_data.lambda_e; } if (type == MRISTEP_IMPLICIT || type == MRISTEP_IMEX) { - pow += udata->lambda_i; + pow += prob_data.lambda_i; } sunrealtype ytrue = exp(pow * t); sunrealtype* ydata = N_VGetArrayPointer(y); sunrealtype error = ytrue - ydata[0]; - cout << "\nMRIStep Statistics:\n"; - cout << " Time = " << t << "\n"; - cout << " y(t) = " << ytrue << "\n"; - cout << " y_n = " << ydata[0] << "\n"; - cout << " Error = " << error << "\n"; - cout << " Steps = " << mri_nst << "\n"; - cout << " Fe evals = " << mri_nfse << "\n"; - cout << " Fi evals = " << mri_nfsi << "\n"; + std::cout << "\nMRIStep Statistics:\n"; + std::cout << " Time = " << t << "\n"; + std::cout << " y(t) = " << ytrue << "\n"; + std::cout << " y_n = " << ydata[0] << "\n"; + std::cout << " Error = " << error << "\n"; + std::cout << " Steps = " << mri_nst << "\n"; + std::cout << " Fe evals = " << mri_nfse << "\n"; + std::cout << " Fi evals = " << mri_nfsi << "\n"; if (type == MRISTEP_IMPLICIT || type == MRISTEP_IMEX) { - cout << " NLS iters = " << mri_nni << "\n"; - cout << " NLS fails = " << mri_ncfn << "\n"; - cout << " LS setups = " << mri_nsetups << "\n"; - cout << " LS Fi evals = " << mri_nfeLS << "\n"; - cout << " Ji evals = " << mri_nje << "\n"; + std::cout << " NLS iters = " << mri_nni << "\n"; + std::cout << " NLS fails = " << mri_ncfn << "\n"; + std::cout << " LS setups = " << mri_nsetups << "\n"; + std::cout << " LS Fi evals = " << mri_nfeLS << "\n"; + std::cout << " Ji evals = " << mri_nje << "\n"; } // ---------------- // Check statistics // ---------------- - cout << "\nComparing Solver Statistics:\n"; + std::cout << "\nComparing Solver Statistics:\n"; int nstages_evaluated = nstages_stored; if (stiffly_accurate) nstages_evaluated--; @@ -416,7 +472,7 @@ int run_tests(MRISTEP_METHOD_TYPE type, sunrealtype t0, int nsteps, if (mri_nfse != fe_evals) { numfails++; - cout << "Fe RHS evals: " << mri_nfse << " vs " << fe_evals << "\n"; + std::cout << "Fe RHS evals: " << mri_nfse << " vs " << fe_evals << "\n"; } long int fi_evals = 0; @@ -428,11 +484,11 @@ int run_tests(MRISTEP_METHOD_TYPE type, sunrealtype t0, int nsteps, if (mri_nfsi != fi_evals) { numfails++; - cout << "Fi RHS evals: " << mri_nfsi << " vs " << fi_evals << "\n"; + std::cout << "Fi RHS evals: " << mri_nfsi << " vs " << fi_evals << "\n"; } - if (numfails) { cout << "Failed " << numfails << " tests\n"; } - else { cout << "All checks passed\n"; } + if (numfails) { std::cout << "Failed " << numfails << " tests\n"; } + else { std::cout << "All checks passed\n"; } // ------------------- // Setup for next test @@ -445,21 +501,21 @@ int run_tests(MRISTEP_METHOD_TYPE type, sunrealtype t0, int nsteps, N_VConst(SUN_RCONST(1.0), y); // Re-initialize fast integrator - flag = ARKStepReInit(arkstep_mem, ff, nullptr, t0, y); + flag = ARKStepReInit(arkstep_mem, ff, nullptr, prob_opts.t0, y); if (check_flag(&flag, "ARKStepReInit", 1)) { return 1; } // Re-initialize slow integrator based on MRI type if (type == MRISTEP_EXPLICIT) { - flag = MRIStepReInit(mristep_mem, fe, nullptr, t0, y); + flag = MRIStepReInit(mristep_mem, fe, nullptr, prob_opts.t0, y); } else if (type == MRISTEP_IMPLICIT) { - flag = MRIStepReInit(mristep_mem, nullptr, fi, t0, y); + flag = MRIStepReInit(mristep_mem, nullptr, fi, prob_opts.t0, y); } else if (type == MRISTEP_IMEX) { - flag = MRIStepReInit(mristep_mem, fe, fi, t0, y); + flag = MRIStepReInit(mristep_mem, fe, fi, prob_opts.t0, y); } else { return 1; } if (check_flag(&flag, "MRIStepReInit", 1)) { return 1; } @@ -486,11 +542,11 @@ int run_tests(MRISTEP_METHOD_TYPE type, sunrealtype t0, int nsteps, // Explicit ODE RHS function fe(t,y) static int fe(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data) { - sunrealtype* y_data = N_VGetArrayPointer(y); - sunrealtype* yd_data = N_VGetArrayPointer(ydot); - UserData* udata = static_cast(user_data); + sunrealtype* y_data = N_VGetArrayPointer(y); + sunrealtype* yd_data = N_VGetArrayPointer(ydot); + ProblemData* prob_data = static_cast(user_data); - yd_data[0] = udata->lambda_e * y_data[0]; + yd_data[0] = prob_data->lambda_e * y_data[0]; return 0; } @@ -498,11 +554,11 @@ static int fe(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data) // Implicit ODE RHS function fi(t,y) static int fi(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data) { - sunrealtype* y_data = N_VGetArrayPointer(y); - sunrealtype* yd_data = N_VGetArrayPointer(ydot); - UserData* udata = static_cast(user_data); + sunrealtype* y_data = N_VGetArrayPointer(y); + sunrealtype* yd_data = N_VGetArrayPointer(ydot); + ProblemData* prob_data = static_cast(user_data); - yd_data[0] = udata->lambda_i * y_data[0]; + yd_data[0] = prob_data->lambda_i * y_data[0]; return 0; } @@ -510,11 +566,11 @@ static int fi(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data) // Fast ODE RHS function ff(t,y) static int ff(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data) { - sunrealtype* y_data = N_VGetArrayPointer(y); - sunrealtype* yd_data = N_VGetArrayPointer(ydot); - UserData* udata = static_cast(user_data); + sunrealtype* y_data = N_VGetArrayPointer(y); + sunrealtype* yd_data = N_VGetArrayPointer(ydot); + ProblemData* prob_data = static_cast(user_data); - yd_data[0] = udata->lambda_f * y_data[0]; + yd_data[0] = prob_data->lambda_f * y_data[0]; return 0; } @@ -523,10 +579,10 @@ static int ff(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data) static int Ji(sunrealtype t, N_Vector y, N_Vector fy, SUNMatrix J, void* user_data, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3) { - sunrealtype* J_data = SUNDenseMatrix_Data(J); - UserData* udata = static_cast(user_data); + sunrealtype* J_data = SUNDenseMatrix_Data(J); + ProblemData* prob_data = static_cast(user_data); - J_data[0] = udata->lambda_i; + J_data[0] = prob_data->lambda_i; return 0; } @@ -536,15 +592,15 @@ static int Ji(sunrealtype t, N_Vector y, N_Vector fy, SUNMatrix J, // ----------------------------------------------------------------------------- // Check function return value -static int check_flag(void* flagvalue, const string funcname, int opt) +static int check_flag(void* flagvalue, const std::string funcname, int opt) { int* errflag; // Check if function returned NULL pointer - no memory allocated if (opt == 0 && flagvalue == nullptr) { - cerr << "\nMEMORY_ERROR: " << funcname - << " failed - returned NULL pointer\n\n"; + std::cerr << "\nMEMORY_ERROR: " << funcname + << " failed - returned NULL pointer\n\n"; return 1; } // Check if flag < 0 @@ -553,8 +609,8 @@ static int check_flag(void* flagvalue, const string funcname, int opt) errflag = (int*)flagvalue; if (*errflag < 0) { - cerr << "\nSUNDIALS_ERROR: " << funcname - << " failed with flag = " << *errflag << "\n\n"; + std::cerr << "\nSUNDIALS_ERROR: " << funcname + << " failed with flag = " << *errflag << "\n\n"; return 1; } } From 5d3055d616f900c81eab7a11d140262d30ff5643 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 12 May 2024 01:03:57 -0700 Subject: [PATCH 06/18] fix formatting --- test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_mri.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_mri.cpp b/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_mri.cpp index 85ea2b676a..202e1780ef 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_mri.cpp +++ b/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_mri.cpp @@ -579,7 +579,7 @@ static int ff(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data) static int Ji(sunrealtype t, N_Vector y, N_Vector fy, SUNMatrix J, void* user_data, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3) { - sunrealtype* J_data = SUNDenseMatrix_Data(J); + sunrealtype* J_data = SUNDenseMatrix_Data(J); ProblemData* prob_data = static_cast(user_data); J_data[0] = prob_data->lambda_i; From 666062640854ed7fd01fe34fa940361b5ee3dfc1 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 12 May 2024 01:35:41 -0700 Subject: [PATCH 07/18] update answers submodule --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index 073b119355..39e5dd9cc0 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 073b119355058ac88a2e4abc87acfb007bc211f6 +Subproject commit 39e5dd9cc0f76efb81409ebba57b1db6dcc8db50 From d8f64f623dfba6bec8085a45ccdd27e871e7d6ca Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 12 May 2024 07:20:24 -0700 Subject: [PATCH 08/18] fix devault interp type --- src/arkode/arkode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index ebff430d03..6a2ce0e742 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -1498,7 +1498,7 @@ ARKodeMem arkCreate(SUNContext sunctx) /* Initialize the interpolation structure to NULL */ ark_mem->interp = NULL; - ark_mem->interp_type = ARK_INTERP_NONE; + ark_mem->interp_type = ARK_INTERP_HERMITE; ark_mem->interp_degree = ARK_INTERP_MAX_DEGREE; /* Initially, rwt should point to ewt */ From b35897268b45fcf0f82a226d8b5c4f51f7a87149 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 12 May 2024 08:01:37 -0700 Subject: [PATCH 09/18] add missing GetDky guard in stop tests --- src/arkode/arkode.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 6a2ce0e742..01f299429b 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -1070,6 +1070,7 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, { N_VScale(ONE, ark_mem->yn, yout); ark_mem->tretlast = *tret = ark_mem->tcur; + ark_mem->next_h = ark_mem->hprime; istate = ARK_SUCCESS; break; } @@ -2213,14 +2214,22 @@ int arkStopTests(ARKodeMem ark_mem, sunrealtype tout, N_Vector yout, /* In ARK_NORMAL mode, test if tout was reached */ if ((itask == ARK_NORMAL) && ((ark_mem->tcur - tout) * ark_mem->h >= ZERO)) { - ark_mem->tretlast = *tret = tout; - *ier = ARKodeGetDky(ark_mem, tout, 0, yout); - if (*ier != ARK_SUCCESS) + if (ark_mem->interp) { - arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, __FILE__, - MSG_ARK_BAD_TOUT, tout); - *ier = ARK_ILL_INPUT; - return (1); + *ier = ARKodeGetDky(ark_mem, tout, 0, yout); + if (*ier != ARK_SUCCESS) + { + arkProcessError(ark_mem, ARK_ILL_INPUT, __LINE__, __func__, __FILE__, + MSG_ARK_BAD_TOUT, tout); + *ier = ARK_ILL_INPUT; + return (1); + } + ark_mem->tretlast = *tret = tout; + } + else + { + N_VScale(ONE, ark_mem->yn, yout); + ark_mem->tretlast = *tret = ark_mem->tcur; } *ier = ARK_SUCCESS; return (1); From 9395c3d2ef9bd789690618e4e60c8d34daee3569 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 12 May 2024 08:38:25 -0700 Subject: [PATCH 10/18] update out files --- .../ark_test_dahlquist_ark_0_-1.out | 2405 +++++++++++++++++ .../ark_test_dahlquist_ark_1_-1.out | 2405 +++++++++++++++++ .../ark_test_dahlquist_ark_2_-1.out | 2405 +++++++++++++++++ .../CXX_serial/ark_test_dahlquist_erk_-1.out | 924 +++++++ ..._mri.out => ark_test_dahlquist_mri_-1.out} | 1 + .../CXX_serial/ark_test_dahlquist_mri_0.out | 706 +++++ .../CXX_serial/ark_test_dahlquist_mri_1.out | 706 +++++ 7 files changed, 9552 insertions(+) create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_ark_0_-1.out create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_ark_1_-1.out create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_ark_2_-1.out create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_erk_-1.out rename test/unit_tests/arkode/CXX_serial/{ark_test_dahlquist_mri.out => ark_test_dahlquist_mri_-1.out} (99%) create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_mri_0.out create mode 100644 test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_mri_1.out diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_ark_0_-1.out b/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_ark_0_-1.out new file mode 100644 index 0000000000..5ab8fcafd1 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_ark_0_-1.out @@ -0,0 +1,2405 @@ + +Dahlquist ODE test problem: + problem type = Identity + lambda expl = -1 + lambda impl = -1 + step size = 0.01 + relative tol = 0.0001 + absolute tol = 1e-06 + interp type = None + pred type = Trivial (0) + +======================== +Test explicit RK methods +======================== + +======================== +Explicit Euler + stages: 1 + order: 1 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 1 + expected: 1 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 2 + expected: 2 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 3 + expected: 3 +-------------------- +Dense Output +Fe RHS evals: + actual: 3 + expected: 3 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 4 + expected: 4 +-------------------- + +======================== +ERK Table ID 0 + stages: 2 + order: 2 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 2 + expected: 2 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Dense Output +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 8 + expected: 8 +-------------------- + +======================== +ERK Table ID 1 + stages: 4 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 7 + expected: 7 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 10 + expected: 10 +-------------------- +Dense Output +Fe RHS evals: + actual: 10 + expected: 10 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 13 + expected: 13 +-------------------- + +======================== +ERK Table ID 2 + stages: 4 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 8 + expected: 8 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- +Dense Output +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 16 + expected: 16 +-------------------- + +======================== +ERK Table ID 3 + stages: 5 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 5 + expected: 5 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 10 + expected: 10 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 15 + expected: 15 +-------------------- +Dense Output +Fe RHS evals: + actual: 15 + expected: 15 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 20 + expected: 20 +-------------------- + +======================== +ERK Table ID 4 + stages: 6 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Dense Output +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- + +======================== +ERK Table ID 5 + stages: 6 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Dense Output +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- + +======================== +ERK Table ID 6 + stages: 6 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Dense Output +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- + +======================== +ERK Table ID 7 + stages: 6 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Dense Output +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- + +======================== +ERK Table ID 8 + stages: 7 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 7 + expected: 7 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 19 + expected: 19 +-------------------- +Dense Output +Fe RHS evals: + actual: 19 + expected: 19 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 25 + expected: 25 +-------------------- + +======================== +ERK Table ID 9 + stages: 8 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 8 + expected: 8 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 16 + expected: 16 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- +Dense Output +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 32 + expected: 32 +-------------------- + +======================== +ERK Table ID 10 + stages: 8 + order: 6 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 8 + expected: 8 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 16 + expected: 16 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- +Dense Output +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 32 + expected: 32 +-------------------- + +======================== +ERK Table ID 11 + stages: 13 + order: 8 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 26 + expected: 26 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 39 + expected: 39 +-------------------- +Dense Output +Fe RHS evals: + actual: 39 + expected: 39 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 52 + expected: 52 +-------------------- + +======================== +ERK Table ID 12 + stages: 3 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 3 + expected: 3 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Dense Output +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- + +======================== +ERK Table ID 13 + stages: 7 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 7 + expected: 7 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 14 + expected: 14 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 21 + expected: 21 +-------------------- +Dense Output +Fe RHS evals: + actual: 21 + expected: 21 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 28 + expected: 28 +-------------------- + +======================== +ERK Table ID 14 + stages: 8 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 8 + expected: 8 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 16 + expected: 16 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- +Dense Output +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 32 + expected: 32 +-------------------- + +======================== +ERK Table ID 15 + stages: 3 + order: 2 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 3 + expected: 3 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Dense Output +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- + +======================== +ERK Table ID 16 + stages: 5 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 5 + expected: 5 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 13 + expected: 13 +-------------------- +Dense Output +Fe RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 17 + expected: 17 +-------------------- + +======================== +ERK Table ID 17 + stages: 3 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 3 + expected: 3 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Dense Output +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- + +======================== +ERK Table ID 18 + stages: 9 + order: 6 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 17 + expected: 17 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 25 + expected: 25 +-------------------- +Dense Output +Fe RHS evals: + actual: 25 + expected: 25 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 33 + expected: 33 +-------------------- + +======================== +ERK Table ID 19 + stages: 10 + order: 7 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 10 + expected: 10 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 20 + expected: 20 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 30 + expected: 30 +-------------------- +Dense Output +Fe RHS evals: + actual: 30 + expected: 30 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 40 + expected: 40 +-------------------- + +======================== +ERK Table ID 20 + stages: 13 + order: 8 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 26 + expected: 26 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 39 + expected: 39 +-------------------- +Dense Output +Fe RHS evals: + actual: 39 + expected: 39 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 52 + expected: 52 +-------------------- + +======================== +ERK Table ID 21 + stages: 16 + order: 9 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 16 + expected: 16 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 32 + expected: 32 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 48 + expected: 48 +-------------------- +Dense Output +Fe RHS evals: + actual: 48 + expected: 48 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 64 + expected: 64 +-------------------- + +======================== +ERK Table ID 22 + stages: 1 + order: 1 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 1 + expected: 1 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 2 + expected: 2 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 3 + expected: 3 +-------------------- +Dense Output +Fe RHS evals: + actual: 3 + expected: 3 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 4 + expected: 4 +-------------------- + +======================== +ERK Table ID 23 + stages: 2 + order: 2 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 2 + expected: 2 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Dense Output +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 8 + expected: 8 +-------------------- + +======================== +ERK Table ID 24 + stages: 2 + order: 2 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 2 + expected: 2 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Dense Output +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 8 + expected: 8 +-------------------- + +======================== +Test implicit RK methods +======================== + +======================== +Implicit Euler + stages: 1 + order: 1 + explicit 1st stage: 0 + stiffly accurate: 1 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 1 +Fi RHS evals: + actual: 2 + expected: 2 +-------------------- +Steps: 2 +NLS iters: 2 +Fi RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 3 +NLS iters: 3 +Fi RHS evals: + actual: 6 + expected: 6 +-------------------- +Dense Output +Fi RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 4 +NLS iters: 4 +Fi RHS evals: + actual: 8 + expected: 8 +-------------------- + +======================== +DIRK Table ID 100 + stages: 2 + order: 2 + explicit 1st stage: 0 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 2 +Fi RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 2 +NLS iters: 4 +Fi RHS evals: + actual: 8 + expected: 8 +-------------------- +Steps: 3 +NLS iters: 6 +Fi RHS evals: + actual: 12 + expected: 12 +-------------------- +Dense Output +Fi RHS evals: + actual: 12 + expected: 12 +-------------------- +Steps: 4 +NLS iters: 8 +Fi RHS evals: + actual: 16 + expected: 16 +-------------------- + +======================== +DIRK Table ID 101 + stages: 3 + order: 2 + explicit 1st stage: 0 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 3 +Fi RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 2 +NLS iters: 6 +Fi RHS evals: + actual: 12 + expected: 12 +-------------------- +Steps: 3 +NLS iters: 9 +Fi RHS evals: + actual: 18 + expected: 18 +-------------------- +Dense Output +Fi RHS evals: + actual: 18 + expected: 18 +-------------------- +Steps: 4 +NLS iters: 12 +Fi RHS evals: + actual: 24 + expected: 24 +-------------------- + +======================== +DIRK Table ID 102 + stages: 3 + order: 2 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 2 +Fi RHS evals: + actual: 5 + expected: 5 +-------------------- +Steps: 2 +NLS iters: 4 +Fi RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 3 +NLS iters: 6 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Dense Output +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 4 +NLS iters: 8 +Fi RHS evals: + actual: 17 + expected: 17 +-------------------- + +======================== +DIRK Table ID 103 + stages: 4 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 3 +Fi RHS evals: + actual: 7 + expected: 7 +-------------------- +Steps: 2 +NLS iters: 6 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 3 +NLS iters: 9 +Fi RHS evals: + actual: 19 + expected: 19 +-------------------- +Dense Output +Fi RHS evals: + actual: 19 + expected: 19 +-------------------- +Steps: 4 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- + +======================== +DIRK Table ID 104 + stages: 4 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 3 +Fi RHS evals: + actual: 7 + expected: 7 +-------------------- +Steps: 2 +NLS iters: 6 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 3 +NLS iters: 9 +Fi RHS evals: + actual: 19 + expected: 19 +-------------------- +Dense Output +Fi RHS evals: + actual: 19 + expected: 19 +-------------------- +Steps: 4 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- + +======================== +DIRK Table ID 105 + stages: 5 + order: 4 + explicit 1st stage: 0 + stiffly accurate: 1 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 5 +Fi RHS evals: + actual: 10 + expected: 10 +-------------------- +Steps: 2 +NLS iters: 10 +Fi RHS evals: + actual: 20 + expected: 20 +-------------------- +Steps: 3 +NLS iters: 15 +Fi RHS evals: + actual: 30 + expected: 30 +-------------------- +Dense Output +Fi RHS evals: + actual: 30 + expected: 30 +-------------------- +Steps: 4 +NLS iters: 20 +Fi RHS evals: + actual: 40 + expected: 40 +-------------------- + +======================== +DIRK Table ID 106 + stages: 5 + order: 4 + explicit 1st stage: 0 + stiffly accurate: 1 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 5 +Fi RHS evals: + actual: 10 + expected: 10 +-------------------- +Steps: 2 +NLS iters: 10 +Fi RHS evals: + actual: 20 + expected: 20 +-------------------- +Steps: 3 +NLS iters: 15 +Fi RHS evals: + actual: 30 + expected: 30 +-------------------- +Dense Output +Fi RHS evals: + actual: 30 + expected: 30 +-------------------- +Steps: 4 +NLS iters: 20 +Fi RHS evals: + actual: 40 + expected: 40 +-------------------- + +======================== +DIRK Table ID 107 + stages: 5 + order: 4 + explicit 1st stage: 0 + stiffly accurate: 1 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 5 +Fi RHS evals: + actual: 10 + expected: 10 +-------------------- +Steps: 2 +NLS iters: 10 +Fi RHS evals: + actual: 20 + expected: 20 +-------------------- +Steps: 3 +NLS iters: 15 +Fi RHS evals: + actual: 30 + expected: 30 +-------------------- +Dense Output +Fi RHS evals: + actual: 30 + expected: 30 +-------------------- +Steps: 4 +NLS iters: 20 +Fi RHS evals: + actual: 40 + expected: 40 +-------------------- + +======================== +DIRK Table ID 108 + stages: 5 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 4 +Fi RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 2 +NLS iters: 8 +Fi RHS evals: + actual: 17 + expected: 17 +-------------------- +Steps: 3 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Dense Output +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Steps: 4 +NLS iters: 16 +Fi RHS evals: + actual: 33 + expected: 33 +-------------------- + +======================== +DIRK Table ID 109 + stages: 6 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 5 +Fi RHS evals: + actual: 11 + expected: 11 +-------------------- +Steps: 2 +NLS iters: 10 +Fi RHS evals: + actual: 21 + expected: 21 +-------------------- +Steps: 3 +NLS iters: 15 +Fi RHS evals: + actual: 31 + expected: 31 +-------------------- +Dense Output +Fi RHS evals: + actual: 31 + expected: 31 +-------------------- +Steps: 4 +NLS iters: 20 +Fi RHS evals: + actual: 41 + expected: 41 +-------------------- + +======================== +DIRK Table ID 110 + stages: 7 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 6 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 2 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Steps: 3 +NLS iters: 18 +Fi RHS evals: + actual: 37 + expected: 37 +-------------------- +Dense Output +Fi RHS evals: + actual: 37 + expected: 37 +-------------------- +Steps: 4 +NLS iters: 24 +Fi RHS evals: + actual: 49 + expected: 49 +-------------------- + +======================== +DIRK Table ID 111 + stages: 8 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 7 +Fi RHS evals: + actual: 15 + expected: 15 +-------------------- +Steps: 2 +NLS iters: 14 +Fi RHS evals: + actual: 29 + expected: 29 +-------------------- +Steps: 3 +NLS iters: 21 +Fi RHS evals: + actual: 43 + expected: 43 +-------------------- +Dense Output +Fi RHS evals: + actual: 43 + expected: 43 +-------------------- +Steps: 4 +NLS iters: 28 +Fi RHS evals: + actual: 57 + expected: 57 +-------------------- + +======================== +DIRK Table ID 112 + stages: 7 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 6 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 2 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Steps: 3 +NLS iters: 18 +Fi RHS evals: + actual: 37 + expected: 37 +-------------------- +Dense Output +Fi RHS evals: + actual: 37 + expected: 37 +-------------------- +Steps: 4 +NLS iters: 24 +Fi RHS evals: + actual: 49 + expected: 49 +-------------------- + +======================== +DIRK Table ID 113 + stages: 8 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 7 +Fi RHS evals: + actual: 15 + expected: 15 +-------------------- +Steps: 2 +NLS iters: 14 +Fi RHS evals: + actual: 29 + expected: 29 +-------------------- +Steps: 3 +NLS iters: 21 +Fi RHS evals: + actual: 43 + expected: 43 +-------------------- +Dense Output +Fi RHS evals: + actual: 43 + expected: 43 +-------------------- +Steps: 4 +NLS iters: 28 +Fi RHS evals: + actual: 57 + expected: 57 +-------------------- + +======================== +DIRK Table ID 114 + stages: 4 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 3 +Fi RHS evals: + actual: 7 + expected: 7 +-------------------- +Steps: 2 +NLS iters: 6 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 3 +NLS iters: 9 +Fi RHS evals: + actual: 19 + expected: 19 +-------------------- +Dense Output +Fi RHS evals: + actual: 19 + expected: 19 +-------------------- +Steps: 4 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- + +======================== +DIRK Table ID 115 + stages: 5 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 4 +Fi RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 2 +NLS iters: 8 +Fi RHS evals: + actual: 17 + expected: 17 +-------------------- +Steps: 3 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Dense Output +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Steps: 4 +NLS iters: 16 +Fi RHS evals: + actual: 33 + expected: 33 +-------------------- + +======================== +DIRK Table ID 116 + stages: 5 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 4 +Fi RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 2 +NLS iters: 8 +Fi RHS evals: + actual: 17 + expected: 17 +-------------------- +Steps: 3 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Dense Output +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Steps: 4 +NLS iters: 16 +Fi RHS evals: + actual: 33 + expected: 33 +-------------------- + +======================== +DIRK Table ID 117 + stages: 6 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 5 +Fi RHS evals: + actual: 11 + expected: 11 +-------------------- +Steps: 2 +NLS iters: 10 +Fi RHS evals: + actual: 21 + expected: 21 +-------------------- +Steps: 3 +NLS iters: 15 +Fi RHS evals: + actual: 31 + expected: 31 +-------------------- +Dense Output +Fi RHS evals: + actual: 31 + expected: 31 +-------------------- +Steps: 4 +NLS iters: 20 +Fi RHS evals: + actual: 41 + expected: 41 +-------------------- + +======================== +DIRK Table ID 118 + stages: 6 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 5 +Fi RHS evals: + actual: 11 + expected: 11 +-------------------- +Steps: 2 +NLS iters: 10 +Fi RHS evals: + actual: 21 + expected: 21 +-------------------- +Steps: 3 +NLS iters: 15 +Fi RHS evals: + actual: 31 + expected: 31 +-------------------- +Dense Output +Fi RHS evals: + actual: 31 + expected: 31 +-------------------- +Steps: 4 +NLS iters: 20 +Fi RHS evals: + actual: 41 + expected: 41 +-------------------- + +======================== +DIRK Table ID 119 + stages: 6 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 5 +Fi RHS evals: + actual: 11 + expected: 11 +-------------------- +Steps: 2 +NLS iters: 10 +Fi RHS evals: + actual: 21 + expected: 21 +-------------------- +Steps: 3 +NLS iters: 15 +Fi RHS evals: + actual: 31 + expected: 31 +-------------------- +Dense Output +Fi RHS evals: + actual: 31 + expected: 31 +-------------------- +Steps: 4 +NLS iters: 20 +Fi RHS evals: + actual: 41 + expected: 41 +-------------------- + +======================== +DIRK Table ID 120 + stages: 7 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 6 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 2 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Steps: 3 +NLS iters: 18 +Fi RHS evals: + actual: 37 + expected: 37 +-------------------- +Dense Output +Fi RHS evals: + actual: 37 + expected: 37 +-------------------- +Steps: 4 +NLS iters: 24 +Fi RHS evals: + actual: 49 + expected: 49 +-------------------- + +======================== +DIRK Table ID 121 + stages: 7 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 6 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 2 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Steps: 3 +NLS iters: 18 +Fi RHS evals: + actual: 37 + expected: 37 +-------------------- +Dense Output +Fi RHS evals: + actual: 37 + expected: 37 +-------------------- +Steps: 4 +NLS iters: 24 +Fi RHS evals: + actual: 49 + expected: 49 +-------------------- + +======================== +DIRK Table ID 122 + stages: 7 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 6 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 2 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Steps: 3 +NLS iters: 18 +Fi RHS evals: + actual: 37 + expected: 37 +-------------------- +Dense Output +Fi RHS evals: + actual: 37 + expected: 37 +-------------------- +Steps: 4 +NLS iters: 24 +Fi RHS evals: + actual: 49 + expected: 49 +-------------------- + +======================== +DIRK Table ID 123 + stages: 3 + order: 2 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 2 +Fi RHS evals: + actual: 5 + expected: 5 +-------------------- +Steps: 2 +NLS iters: 4 +Fi RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 3 +NLS iters: 6 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Dense Output +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 4 +NLS iters: 8 +Fi RHS evals: + actual: 17 + expected: 17 +-------------------- + +======================== +DIRK Table ID 124 + stages: 1 + order: 1 + explicit 1st stage: 0 + stiffly accurate: 1 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 1 +Fi RHS evals: + actual: 2 + expected: 2 +-------------------- +Steps: 2 +NLS iters: 2 +Fi RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 3 +NLS iters: 3 +Fi RHS evals: + actual: 6 + expected: 6 +-------------------- +Dense Output +Fi RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 4 +NLS iters: 4 +Fi RHS evals: + actual: 8 + expected: 8 +-------------------- + +======================== +DIRK Table ID 125 + stages: 1 + order: 2 + explicit 1st stage: 0 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 1 +Fi RHS evals: + actual: 2 + expected: 2 +-------------------- +Steps: 2 +NLS iters: 2 +Fi RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 3 +NLS iters: 3 +Fi RHS evals: + actual: 6 + expected: 6 +-------------------- +Dense Output +Fi RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 4 +NLS iters: 4 +Fi RHS evals: + actual: 8 + expected: 8 +-------------------- + +======================== +DIRK Table ID 126 + stages: 2 + order: 2 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 1 +Fi RHS evals: + actual: 3 + expected: 3 +-------------------- +Steps: 2 +NLS iters: 2 +Fi RHS evals: + actual: 5 + expected: 5 +-------------------- +Steps: 3 +NLS iters: 3 +Fi RHS evals: + actual: 7 + expected: 7 +-------------------- +Dense Output +Fi RHS evals: + actual: 7 + expected: 7 +-------------------- +Steps: 4 +NLS iters: 4 +Fi RHS evals: + actual: 9 + expected: 9 +-------------------- + +===================== +Test IMEX ARK methods +===================== + +======================== +IMEX Euler + stages: 2 + order: 1 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 1 +Fe RHS evals: + actual: 2 + expected: 2 +Fi RHS evals: + actual: 3 + expected: 3 +-------------------- +Steps: 2 +NLS iters: 2 +Fe RHS evals: + actual: 3 + expected: 3 +Fi RHS evals: + actual: 5 + expected: 5 +-------------------- +Steps: 3 +NLS iters: 3 +Fe RHS evals: + actual: 4 + expected: 4 +Fi RHS evals: + actual: 7 + expected: 7 +-------------------- +Dense Output +Fe RHS evals: + actual: 4 + expected: 4 +Fi RHS evals: + actual: 7 + expected: 7 +-------------------- +Steps: 4 +NLS iters: 4 +Fe RHS evals: + actual: 5 + expected: 5 +Fi RHS evals: + actual: 9 + expected: 9 +-------------------- + +======================== +IMEX Table ID 0 + stages: 3 + order: 2 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 2 +Fe RHS evals: + actual: 3 + expected: 3 +Fi RHS evals: + actual: 5 + expected: 5 +-------------------- +Steps: 2 +NLS iters: 4 +Fe RHS evals: + actual: 6 + expected: 6 +Fi RHS evals: + actual: 10 + expected: 10 +-------------------- +Steps: 3 +NLS iters: 6 +Fe RHS evals: + actual: 9 + expected: 9 +Fi RHS evals: + actual: 15 + expected: 15 +-------------------- +Dense Output +Fe RHS evals: + actual: 9 + expected: 9 +Fi RHS evals: + actual: 15 + expected: 15 +-------------------- +Steps: 4 +NLS iters: 8 +Fe RHS evals: + actual: 12 + expected: 12 +Fi RHS evals: + actual: 20 + expected: 20 +-------------------- + +======================== +IMEX Table ID 1 + stages: 4 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 3 +Fe RHS evals: + actual: 4 + expected: 4 +Fi RHS evals: + actual: 7 + expected: 7 +-------------------- +Steps: 2 +NLS iters: 6 +Fe RHS evals: + actual: 8 + expected: 8 +Fi RHS evals: + actual: 14 + expected: 14 +-------------------- +Steps: 3 +NLS iters: 9 +Fe RHS evals: + actual: 12 + expected: 12 +Fi RHS evals: + actual: 21 + expected: 21 +-------------------- +Dense Output +Fe RHS evals: + actual: 12 + expected: 12 +Fi RHS evals: + actual: 21 + expected: 21 +-------------------- +Steps: 4 +NLS iters: 12 +Fe RHS evals: + actual: 16 + expected: 16 +Fi RHS evals: + actual: 28 + expected: 28 +-------------------- + +======================== +IMEX Table ID 2 + stages: 6 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 5 +Fe RHS evals: + actual: 6 + expected: 6 +Fi RHS evals: + actual: 11 + expected: 11 +-------------------- +Steps: 2 +NLS iters: 10 +Fe RHS evals: + actual: 12 + expected: 12 +Fi RHS evals: + actual: 22 + expected: 22 +-------------------- +Steps: 3 +NLS iters: 15 +Fe RHS evals: + actual: 18 + expected: 18 +Fi RHS evals: + actual: 33 + expected: 33 +-------------------- +Dense Output +Fe RHS evals: + actual: 18 + expected: 18 +Fi RHS evals: + actual: 33 + expected: 33 +-------------------- +Steps: 4 +NLS iters: 20 +Fe RHS evals: + actual: 24 + expected: 24 +Fi RHS evals: + actual: 44 + expected: 44 +-------------------- + +======================== +IMEX Table ID 3 + stages: 7 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 6 +Fe RHS evals: + actual: 7 + expected: 7 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 2 +NLS iters: 12 +Fe RHS evals: + actual: 14 + expected: 14 +Fi RHS evals: + actual: 26 + expected: 26 +-------------------- +Steps: 3 +NLS iters: 18 +Fe RHS evals: + actual: 21 + expected: 21 +Fi RHS evals: + actual: 39 + expected: 39 +-------------------- +Dense Output +Fe RHS evals: + actual: 21 + expected: 21 +Fi RHS evals: + actual: 39 + expected: 39 +-------------------- +Steps: 4 +NLS iters: 24 +Fe RHS evals: + actual: 28 + expected: 28 +Fi RHS evals: + actual: 52 + expected: 52 +-------------------- + +======================== +IMEX Table ID 4 + stages: 8 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 7 +Fe RHS evals: + actual: 8 + expected: 8 +Fi RHS evals: + actual: 15 + expected: 15 +-------------------- +Steps: 2 +NLS iters: 14 +Fe RHS evals: + actual: 16 + expected: 16 +Fi RHS evals: + actual: 30 + expected: 30 +-------------------- +Steps: 3 +NLS iters: 21 +Fe RHS evals: + actual: 24 + expected: 24 +Fi RHS evals: + actual: 45 + expected: 45 +-------------------- +Dense Output +Fe RHS evals: + actual: 24 + expected: 24 +Fi RHS evals: + actual: 45 + expected: 45 +-------------------- +Steps: 4 +NLS iters: 28 +Fe RHS evals: + actual: 32 + expected: 32 +Fi RHS evals: + actual: 60 + expected: 60 +-------------------- + +======================== +IMEX Table ID 5 + stages: 8 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 7 +Fe RHS evals: + actual: 8 + expected: 8 +Fi RHS evals: + actual: 15 + expected: 15 +-------------------- +Steps: 2 +NLS iters: 14 +Fe RHS evals: + actual: 16 + expected: 16 +Fi RHS evals: + actual: 30 + expected: 30 +-------------------- +Steps: 3 +NLS iters: 21 +Fe RHS evals: + actual: 24 + expected: 24 +Fi RHS evals: + actual: 45 + expected: 45 +-------------------- +Dense Output +Fe RHS evals: + actual: 24 + expected: 24 +Fi RHS evals: + actual: 45 + expected: 45 +-------------------- +Steps: 4 +NLS iters: 28 +Fe RHS evals: + actual: 32 + expected: 32 +Fi RHS evals: + actual: 60 + expected: 60 +-------------------- + + +All tests passed! diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_ark_1_-1.out b/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_ark_1_-1.out new file mode 100644 index 0000000000..11e1fc907f --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_ark_1_-1.out @@ -0,0 +1,2405 @@ + +Dahlquist ODE test problem: + problem type = Fixed mass matrix + lambda expl = -1 + lambda impl = -1 + step size = 0.01 + relative tol = 0.0001 + absolute tol = 1e-06 + interp type = None + pred type = Trivial (0) + +======================== +Test explicit RK methods +======================== + +======================== +Explicit Euler + stages: 1 + order: 1 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 1 + expected: 1 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 2 + expected: 2 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 3 + expected: 3 +-------------------- +Dense Output +Fe RHS evals: + actual: 3 + expected: 3 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 4 + expected: 4 +-------------------- + +======================== +ERK Table ID 0 + stages: 2 + order: 2 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 2 + expected: 2 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Dense Output +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 8 + expected: 8 +-------------------- + +======================== +ERK Table ID 1 + stages: 4 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 7 + expected: 7 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 10 + expected: 10 +-------------------- +Dense Output +Fe RHS evals: + actual: 10 + expected: 10 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 13 + expected: 13 +-------------------- + +======================== +ERK Table ID 2 + stages: 4 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 8 + expected: 8 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- +Dense Output +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 16 + expected: 16 +-------------------- + +======================== +ERK Table ID 3 + stages: 5 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 5 + expected: 5 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 10 + expected: 10 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 15 + expected: 15 +-------------------- +Dense Output +Fe RHS evals: + actual: 15 + expected: 15 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 20 + expected: 20 +-------------------- + +======================== +ERK Table ID 4 + stages: 6 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Dense Output +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- + +======================== +ERK Table ID 5 + stages: 6 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Dense Output +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- + +======================== +ERK Table ID 6 + stages: 6 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Dense Output +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- + +======================== +ERK Table ID 7 + stages: 6 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Dense Output +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- + +======================== +ERK Table ID 8 + stages: 7 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 7 + expected: 7 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 19 + expected: 19 +-------------------- +Dense Output +Fe RHS evals: + actual: 19 + expected: 19 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 25 + expected: 25 +-------------------- + +======================== +ERK Table ID 9 + stages: 8 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 8 + expected: 8 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 16 + expected: 16 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- +Dense Output +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 32 + expected: 32 +-------------------- + +======================== +ERK Table ID 10 + stages: 8 + order: 6 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 8 + expected: 8 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 16 + expected: 16 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- +Dense Output +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 32 + expected: 32 +-------------------- + +======================== +ERK Table ID 11 + stages: 13 + order: 8 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 26 + expected: 26 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 39 + expected: 39 +-------------------- +Dense Output +Fe RHS evals: + actual: 39 + expected: 39 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 52 + expected: 52 +-------------------- + +======================== +ERK Table ID 12 + stages: 3 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 3 + expected: 3 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Dense Output +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- + +======================== +ERK Table ID 13 + stages: 7 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 7 + expected: 7 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 14 + expected: 14 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 21 + expected: 21 +-------------------- +Dense Output +Fe RHS evals: + actual: 21 + expected: 21 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 28 + expected: 28 +-------------------- + +======================== +ERK Table ID 14 + stages: 8 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 8 + expected: 8 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 16 + expected: 16 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- +Dense Output +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 32 + expected: 32 +-------------------- + +======================== +ERK Table ID 15 + stages: 3 + order: 2 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 3 + expected: 3 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Dense Output +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- + +======================== +ERK Table ID 16 + stages: 5 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 5 + expected: 5 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 13 + expected: 13 +-------------------- +Dense Output +Fe RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 17 + expected: 17 +-------------------- + +======================== +ERK Table ID 17 + stages: 3 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 3 + expected: 3 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Dense Output +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- + +======================== +ERK Table ID 18 + stages: 9 + order: 6 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 17 + expected: 17 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 25 + expected: 25 +-------------------- +Dense Output +Fe RHS evals: + actual: 25 + expected: 25 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 33 + expected: 33 +-------------------- + +======================== +ERK Table ID 19 + stages: 10 + order: 7 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 10 + expected: 10 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 20 + expected: 20 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 30 + expected: 30 +-------------------- +Dense Output +Fe RHS evals: + actual: 30 + expected: 30 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 40 + expected: 40 +-------------------- + +======================== +ERK Table ID 20 + stages: 13 + order: 8 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 26 + expected: 26 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 39 + expected: 39 +-------------------- +Dense Output +Fe RHS evals: + actual: 39 + expected: 39 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 52 + expected: 52 +-------------------- + +======================== +ERK Table ID 21 + stages: 16 + order: 9 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 16 + expected: 16 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 32 + expected: 32 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 48 + expected: 48 +-------------------- +Dense Output +Fe RHS evals: + actual: 48 + expected: 48 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 64 + expected: 64 +-------------------- + +======================== +ERK Table ID 22 + stages: 1 + order: 1 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 1 + expected: 1 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 2 + expected: 2 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 3 + expected: 3 +-------------------- +Dense Output +Fe RHS evals: + actual: 3 + expected: 3 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 4 + expected: 4 +-------------------- + +======================== +ERK Table ID 23 + stages: 2 + order: 2 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 2 + expected: 2 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Dense Output +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 8 + expected: 8 +-------------------- + +======================== +ERK Table ID 24 + stages: 2 + order: 2 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 2 + expected: 2 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Dense Output +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 8 + expected: 8 +-------------------- + +======================== +Test implicit RK methods +======================== + +======================== +Implicit Euler + stages: 1 + order: 1 + explicit 1st stage: 0 + stiffly accurate: 1 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 1 +Fi RHS evals: + actual: 2 + expected: 2 +-------------------- +Steps: 2 +NLS iters: 2 +Fi RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 3 +NLS iters: 3 +Fi RHS evals: + actual: 6 + expected: 6 +-------------------- +Dense Output +Fi RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 4 +NLS iters: 4 +Fi RHS evals: + actual: 8 + expected: 8 +-------------------- + +======================== +DIRK Table ID 100 + stages: 2 + order: 2 + explicit 1st stage: 0 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 2 +Fi RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 2 +NLS iters: 4 +Fi RHS evals: + actual: 8 + expected: 8 +-------------------- +Steps: 3 +NLS iters: 6 +Fi RHS evals: + actual: 12 + expected: 12 +-------------------- +Dense Output +Fi RHS evals: + actual: 12 + expected: 12 +-------------------- +Steps: 4 +NLS iters: 8 +Fi RHS evals: + actual: 16 + expected: 16 +-------------------- + +======================== +DIRK Table ID 101 + stages: 3 + order: 2 + explicit 1st stage: 0 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 3 +Fi RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 2 +NLS iters: 6 +Fi RHS evals: + actual: 12 + expected: 12 +-------------------- +Steps: 3 +NLS iters: 9 +Fi RHS evals: + actual: 18 + expected: 18 +-------------------- +Dense Output +Fi RHS evals: + actual: 18 + expected: 18 +-------------------- +Steps: 4 +NLS iters: 12 +Fi RHS evals: + actual: 24 + expected: 24 +-------------------- + +======================== +DIRK Table ID 102 + stages: 3 + order: 2 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 2 +Fi RHS evals: + actual: 5 + expected: 5 +-------------------- +Steps: 2 +NLS iters: 4 +Fi RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 3 +NLS iters: 6 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Dense Output +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 4 +NLS iters: 8 +Fi RHS evals: + actual: 17 + expected: 17 +-------------------- + +======================== +DIRK Table ID 103 + stages: 4 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 3 +Fi RHS evals: + actual: 7 + expected: 7 +-------------------- +Steps: 2 +NLS iters: 6 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 3 +NLS iters: 9 +Fi RHS evals: + actual: 19 + expected: 19 +-------------------- +Dense Output +Fi RHS evals: + actual: 19 + expected: 19 +-------------------- +Steps: 4 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- + +======================== +DIRK Table ID 104 + stages: 4 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 3 +Fi RHS evals: + actual: 7 + expected: 7 +-------------------- +Steps: 2 +NLS iters: 6 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 3 +NLS iters: 9 +Fi RHS evals: + actual: 19 + expected: 19 +-------------------- +Dense Output +Fi RHS evals: + actual: 19 + expected: 19 +-------------------- +Steps: 4 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- + +======================== +DIRK Table ID 105 + stages: 5 + order: 4 + explicit 1st stage: 0 + stiffly accurate: 1 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 5 +Fi RHS evals: + actual: 10 + expected: 10 +-------------------- +Steps: 2 +NLS iters: 10 +Fi RHS evals: + actual: 20 + expected: 20 +-------------------- +Steps: 3 +NLS iters: 15 +Fi RHS evals: + actual: 30 + expected: 30 +-------------------- +Dense Output +Fi RHS evals: + actual: 30 + expected: 30 +-------------------- +Steps: 4 +NLS iters: 20 +Fi RHS evals: + actual: 40 + expected: 40 +-------------------- + +======================== +DIRK Table ID 106 + stages: 5 + order: 4 + explicit 1st stage: 0 + stiffly accurate: 1 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 5 +Fi RHS evals: + actual: 10 + expected: 10 +-------------------- +Steps: 2 +NLS iters: 10 +Fi RHS evals: + actual: 20 + expected: 20 +-------------------- +Steps: 3 +NLS iters: 15 +Fi RHS evals: + actual: 30 + expected: 30 +-------------------- +Dense Output +Fi RHS evals: + actual: 30 + expected: 30 +-------------------- +Steps: 4 +NLS iters: 20 +Fi RHS evals: + actual: 40 + expected: 40 +-------------------- + +======================== +DIRK Table ID 107 + stages: 5 + order: 4 + explicit 1st stage: 0 + stiffly accurate: 1 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 5 +Fi RHS evals: + actual: 10 + expected: 10 +-------------------- +Steps: 2 +NLS iters: 10 +Fi RHS evals: + actual: 20 + expected: 20 +-------------------- +Steps: 3 +NLS iters: 15 +Fi RHS evals: + actual: 30 + expected: 30 +-------------------- +Dense Output +Fi RHS evals: + actual: 30 + expected: 30 +-------------------- +Steps: 4 +NLS iters: 20 +Fi RHS evals: + actual: 40 + expected: 40 +-------------------- + +======================== +DIRK Table ID 108 + stages: 5 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 4 +Fi RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 2 +NLS iters: 8 +Fi RHS evals: + actual: 17 + expected: 17 +-------------------- +Steps: 3 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Dense Output +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Steps: 4 +NLS iters: 16 +Fi RHS evals: + actual: 33 + expected: 33 +-------------------- + +======================== +DIRK Table ID 109 + stages: 6 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 5 +Fi RHS evals: + actual: 11 + expected: 11 +-------------------- +Steps: 2 +NLS iters: 10 +Fi RHS evals: + actual: 21 + expected: 21 +-------------------- +Steps: 3 +NLS iters: 15 +Fi RHS evals: + actual: 31 + expected: 31 +-------------------- +Dense Output +Fi RHS evals: + actual: 31 + expected: 31 +-------------------- +Steps: 4 +NLS iters: 20 +Fi RHS evals: + actual: 41 + expected: 41 +-------------------- + +======================== +DIRK Table ID 110 + stages: 7 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 6 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 2 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Steps: 3 +NLS iters: 18 +Fi RHS evals: + actual: 37 + expected: 37 +-------------------- +Dense Output +Fi RHS evals: + actual: 37 + expected: 37 +-------------------- +Steps: 4 +NLS iters: 24 +Fi RHS evals: + actual: 49 + expected: 49 +-------------------- + +======================== +DIRK Table ID 111 + stages: 8 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 7 +Fi RHS evals: + actual: 15 + expected: 15 +-------------------- +Steps: 2 +NLS iters: 14 +Fi RHS evals: + actual: 29 + expected: 29 +-------------------- +Steps: 3 +NLS iters: 21 +Fi RHS evals: + actual: 43 + expected: 43 +-------------------- +Dense Output +Fi RHS evals: + actual: 43 + expected: 43 +-------------------- +Steps: 4 +NLS iters: 28 +Fi RHS evals: + actual: 57 + expected: 57 +-------------------- + +======================== +DIRK Table ID 112 + stages: 7 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 6 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 2 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Steps: 3 +NLS iters: 18 +Fi RHS evals: + actual: 37 + expected: 37 +-------------------- +Dense Output +Fi RHS evals: + actual: 37 + expected: 37 +-------------------- +Steps: 4 +NLS iters: 24 +Fi RHS evals: + actual: 49 + expected: 49 +-------------------- + +======================== +DIRK Table ID 113 + stages: 8 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 7 +Fi RHS evals: + actual: 15 + expected: 15 +-------------------- +Steps: 2 +NLS iters: 14 +Fi RHS evals: + actual: 29 + expected: 29 +-------------------- +Steps: 3 +NLS iters: 21 +Fi RHS evals: + actual: 43 + expected: 43 +-------------------- +Dense Output +Fi RHS evals: + actual: 43 + expected: 43 +-------------------- +Steps: 4 +NLS iters: 28 +Fi RHS evals: + actual: 57 + expected: 57 +-------------------- + +======================== +DIRK Table ID 114 + stages: 4 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 3 +Fi RHS evals: + actual: 7 + expected: 7 +-------------------- +Steps: 2 +NLS iters: 6 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 3 +NLS iters: 9 +Fi RHS evals: + actual: 19 + expected: 19 +-------------------- +Dense Output +Fi RHS evals: + actual: 19 + expected: 19 +-------------------- +Steps: 4 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- + +======================== +DIRK Table ID 115 + stages: 5 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 4 +Fi RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 2 +NLS iters: 8 +Fi RHS evals: + actual: 17 + expected: 17 +-------------------- +Steps: 3 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Dense Output +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Steps: 4 +NLS iters: 16 +Fi RHS evals: + actual: 33 + expected: 33 +-------------------- + +======================== +DIRK Table ID 116 + stages: 5 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 4 +Fi RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 2 +NLS iters: 8 +Fi RHS evals: + actual: 17 + expected: 17 +-------------------- +Steps: 3 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Dense Output +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Steps: 4 +NLS iters: 16 +Fi RHS evals: + actual: 33 + expected: 33 +-------------------- + +======================== +DIRK Table ID 117 + stages: 6 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 5 +Fi RHS evals: + actual: 11 + expected: 11 +-------------------- +Steps: 2 +NLS iters: 10 +Fi RHS evals: + actual: 21 + expected: 21 +-------------------- +Steps: 3 +NLS iters: 15 +Fi RHS evals: + actual: 31 + expected: 31 +-------------------- +Dense Output +Fi RHS evals: + actual: 31 + expected: 31 +-------------------- +Steps: 4 +NLS iters: 20 +Fi RHS evals: + actual: 41 + expected: 41 +-------------------- + +======================== +DIRK Table ID 118 + stages: 6 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 5 +Fi RHS evals: + actual: 11 + expected: 11 +-------------------- +Steps: 2 +NLS iters: 10 +Fi RHS evals: + actual: 21 + expected: 21 +-------------------- +Steps: 3 +NLS iters: 15 +Fi RHS evals: + actual: 31 + expected: 31 +-------------------- +Dense Output +Fi RHS evals: + actual: 31 + expected: 31 +-------------------- +Steps: 4 +NLS iters: 20 +Fi RHS evals: + actual: 41 + expected: 41 +-------------------- + +======================== +DIRK Table ID 119 + stages: 6 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 5 +Fi RHS evals: + actual: 11 + expected: 11 +-------------------- +Steps: 2 +NLS iters: 10 +Fi RHS evals: + actual: 21 + expected: 21 +-------------------- +Steps: 3 +NLS iters: 15 +Fi RHS evals: + actual: 31 + expected: 31 +-------------------- +Dense Output +Fi RHS evals: + actual: 31 + expected: 31 +-------------------- +Steps: 4 +NLS iters: 20 +Fi RHS evals: + actual: 41 + expected: 41 +-------------------- + +======================== +DIRK Table ID 120 + stages: 7 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 6 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 2 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Steps: 3 +NLS iters: 18 +Fi RHS evals: + actual: 37 + expected: 37 +-------------------- +Dense Output +Fi RHS evals: + actual: 37 + expected: 37 +-------------------- +Steps: 4 +NLS iters: 24 +Fi RHS evals: + actual: 49 + expected: 49 +-------------------- + +======================== +DIRK Table ID 121 + stages: 7 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 6 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 2 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Steps: 3 +NLS iters: 18 +Fi RHS evals: + actual: 37 + expected: 37 +-------------------- +Dense Output +Fi RHS evals: + actual: 37 + expected: 37 +-------------------- +Steps: 4 +NLS iters: 24 +Fi RHS evals: + actual: 49 + expected: 49 +-------------------- + +======================== +DIRK Table ID 122 + stages: 7 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 6 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 2 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Steps: 3 +NLS iters: 18 +Fi RHS evals: + actual: 37 + expected: 37 +-------------------- +Dense Output +Fi RHS evals: + actual: 37 + expected: 37 +-------------------- +Steps: 4 +NLS iters: 24 +Fi RHS evals: + actual: 49 + expected: 49 +-------------------- + +======================== +DIRK Table ID 123 + stages: 3 + order: 2 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 2 +Fi RHS evals: + actual: 5 + expected: 5 +-------------------- +Steps: 2 +NLS iters: 4 +Fi RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 3 +NLS iters: 6 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Dense Output +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 4 +NLS iters: 8 +Fi RHS evals: + actual: 17 + expected: 17 +-------------------- + +======================== +DIRK Table ID 124 + stages: 1 + order: 1 + explicit 1st stage: 0 + stiffly accurate: 1 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 1 +Fi RHS evals: + actual: 2 + expected: 2 +-------------------- +Steps: 2 +NLS iters: 2 +Fi RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 3 +NLS iters: 3 +Fi RHS evals: + actual: 6 + expected: 6 +-------------------- +Dense Output +Fi RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 4 +NLS iters: 4 +Fi RHS evals: + actual: 8 + expected: 8 +-------------------- + +======================== +DIRK Table ID 125 + stages: 1 + order: 2 + explicit 1st stage: 0 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 1 +Fi RHS evals: + actual: 2 + expected: 2 +-------------------- +Steps: 2 +NLS iters: 2 +Fi RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 3 +NLS iters: 3 +Fi RHS evals: + actual: 6 + expected: 6 +-------------------- +Dense Output +Fi RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 4 +NLS iters: 4 +Fi RHS evals: + actual: 8 + expected: 8 +-------------------- + +======================== +DIRK Table ID 126 + stages: 2 + order: 2 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 1 +Fi RHS evals: + actual: 3 + expected: 3 +-------------------- +Steps: 2 +NLS iters: 2 +Fi RHS evals: + actual: 5 + expected: 5 +-------------------- +Steps: 3 +NLS iters: 3 +Fi RHS evals: + actual: 7 + expected: 7 +-------------------- +Dense Output +Fi RHS evals: + actual: 7 + expected: 7 +-------------------- +Steps: 4 +NLS iters: 4 +Fi RHS evals: + actual: 9 + expected: 9 +-------------------- + +===================== +Test IMEX ARK methods +===================== + +======================== +IMEX Euler + stages: 2 + order: 1 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 1 +Fe RHS evals: + actual: 2 + expected: 2 +Fi RHS evals: + actual: 3 + expected: 3 +-------------------- +Steps: 2 +NLS iters: 2 +Fe RHS evals: + actual: 3 + expected: 3 +Fi RHS evals: + actual: 5 + expected: 5 +-------------------- +Steps: 3 +NLS iters: 3 +Fe RHS evals: + actual: 4 + expected: 4 +Fi RHS evals: + actual: 7 + expected: 7 +-------------------- +Dense Output +Fe RHS evals: + actual: 4 + expected: 4 +Fi RHS evals: + actual: 7 + expected: 7 +-------------------- +Steps: 4 +NLS iters: 4 +Fe RHS evals: + actual: 5 + expected: 5 +Fi RHS evals: + actual: 9 + expected: 9 +-------------------- + +======================== +IMEX Table ID 0 + stages: 3 + order: 2 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 2 +Fe RHS evals: + actual: 3 + expected: 3 +Fi RHS evals: + actual: 5 + expected: 5 +-------------------- +Steps: 2 +NLS iters: 4 +Fe RHS evals: + actual: 6 + expected: 6 +Fi RHS evals: + actual: 10 + expected: 10 +-------------------- +Steps: 3 +NLS iters: 6 +Fe RHS evals: + actual: 9 + expected: 9 +Fi RHS evals: + actual: 15 + expected: 15 +-------------------- +Dense Output +Fe RHS evals: + actual: 9 + expected: 9 +Fi RHS evals: + actual: 15 + expected: 15 +-------------------- +Steps: 4 +NLS iters: 8 +Fe RHS evals: + actual: 12 + expected: 12 +Fi RHS evals: + actual: 20 + expected: 20 +-------------------- + +======================== +IMEX Table ID 1 + stages: 4 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 3 +Fe RHS evals: + actual: 4 + expected: 4 +Fi RHS evals: + actual: 7 + expected: 7 +-------------------- +Steps: 2 +NLS iters: 6 +Fe RHS evals: + actual: 8 + expected: 8 +Fi RHS evals: + actual: 14 + expected: 14 +-------------------- +Steps: 3 +NLS iters: 9 +Fe RHS evals: + actual: 12 + expected: 12 +Fi RHS evals: + actual: 21 + expected: 21 +-------------------- +Dense Output +Fe RHS evals: + actual: 12 + expected: 12 +Fi RHS evals: + actual: 21 + expected: 21 +-------------------- +Steps: 4 +NLS iters: 12 +Fe RHS evals: + actual: 16 + expected: 16 +Fi RHS evals: + actual: 28 + expected: 28 +-------------------- + +======================== +IMEX Table ID 2 + stages: 6 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 5 +Fe RHS evals: + actual: 6 + expected: 6 +Fi RHS evals: + actual: 11 + expected: 11 +-------------------- +Steps: 2 +NLS iters: 10 +Fe RHS evals: + actual: 12 + expected: 12 +Fi RHS evals: + actual: 22 + expected: 22 +-------------------- +Steps: 3 +NLS iters: 15 +Fe RHS evals: + actual: 18 + expected: 18 +Fi RHS evals: + actual: 33 + expected: 33 +-------------------- +Dense Output +Fe RHS evals: + actual: 18 + expected: 18 +Fi RHS evals: + actual: 33 + expected: 33 +-------------------- +Steps: 4 +NLS iters: 20 +Fe RHS evals: + actual: 24 + expected: 24 +Fi RHS evals: + actual: 44 + expected: 44 +-------------------- + +======================== +IMEX Table ID 3 + stages: 7 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 6 +Fe RHS evals: + actual: 7 + expected: 7 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 2 +NLS iters: 12 +Fe RHS evals: + actual: 14 + expected: 14 +Fi RHS evals: + actual: 26 + expected: 26 +-------------------- +Steps: 3 +NLS iters: 18 +Fe RHS evals: + actual: 21 + expected: 21 +Fi RHS evals: + actual: 39 + expected: 39 +-------------------- +Dense Output +Fe RHS evals: + actual: 21 + expected: 21 +Fi RHS evals: + actual: 39 + expected: 39 +-------------------- +Steps: 4 +NLS iters: 24 +Fe RHS evals: + actual: 28 + expected: 28 +Fi RHS evals: + actual: 52 + expected: 52 +-------------------- + +======================== +IMEX Table ID 4 + stages: 8 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 7 +Fe RHS evals: + actual: 8 + expected: 8 +Fi RHS evals: + actual: 15 + expected: 15 +-------------------- +Steps: 2 +NLS iters: 14 +Fe RHS evals: + actual: 16 + expected: 16 +Fi RHS evals: + actual: 30 + expected: 30 +-------------------- +Steps: 3 +NLS iters: 21 +Fe RHS evals: + actual: 24 + expected: 24 +Fi RHS evals: + actual: 45 + expected: 45 +-------------------- +Dense Output +Fe RHS evals: + actual: 24 + expected: 24 +Fi RHS evals: + actual: 45 + expected: 45 +-------------------- +Steps: 4 +NLS iters: 28 +Fe RHS evals: + actual: 32 + expected: 32 +Fi RHS evals: + actual: 60 + expected: 60 +-------------------- + +======================== +IMEX Table ID 5 + stages: 8 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 7 +Fe RHS evals: + actual: 8 + expected: 8 +Fi RHS evals: + actual: 15 + expected: 15 +-------------------- +Steps: 2 +NLS iters: 14 +Fe RHS evals: + actual: 16 + expected: 16 +Fi RHS evals: + actual: 30 + expected: 30 +-------------------- +Steps: 3 +NLS iters: 21 +Fe RHS evals: + actual: 24 + expected: 24 +Fi RHS evals: + actual: 45 + expected: 45 +-------------------- +Dense Output +Fe RHS evals: + actual: 24 + expected: 24 +Fi RHS evals: + actual: 45 + expected: 45 +-------------------- +Steps: 4 +NLS iters: 28 +Fe RHS evals: + actual: 32 + expected: 32 +Fi RHS evals: + actual: 60 + expected: 60 +-------------------- + + +All tests passed! diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_ark_2_-1.out b/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_ark_2_-1.out new file mode 100644 index 0000000000..1fa5a0d33a --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_ark_2_-1.out @@ -0,0 +1,2405 @@ + +Dahlquist ODE test problem: + problem type = Time-dependent mass matrix + lambda expl = -1 + lambda impl = -1 + step size = 0.01 + relative tol = 0.0001 + absolute tol = 1e-06 + interp type = None + pred type = Trivial (0) + +======================== +Test explicit RK methods +======================== + +======================== +Explicit Euler + stages: 1 + order: 1 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 1 + expected: 1 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 2 + expected: 2 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 3 + expected: 3 +-------------------- +Dense Output +Fe RHS evals: + actual: 3 + expected: 3 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 4 + expected: 4 +-------------------- + +======================== +ERK Table ID 0 + stages: 2 + order: 2 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 2 + expected: 2 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Dense Output +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 8 + expected: 8 +-------------------- + +======================== +ERK Table ID 1 + stages: 4 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 7 + expected: 7 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 10 + expected: 10 +-------------------- +Dense Output +Fe RHS evals: + actual: 10 + expected: 10 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 13 + expected: 13 +-------------------- + +======================== +ERK Table ID 2 + stages: 4 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 8 + expected: 8 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- +Dense Output +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 16 + expected: 16 +-------------------- + +======================== +ERK Table ID 3 + stages: 5 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 5 + expected: 5 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 10 + expected: 10 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 15 + expected: 15 +-------------------- +Dense Output +Fe RHS evals: + actual: 15 + expected: 15 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 20 + expected: 20 +-------------------- + +======================== +ERK Table ID 4 + stages: 6 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Dense Output +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- + +======================== +ERK Table ID 5 + stages: 6 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Dense Output +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- + +======================== +ERK Table ID 6 + stages: 6 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Dense Output +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- + +======================== +ERK Table ID 7 + stages: 6 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Dense Output +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- + +======================== +ERK Table ID 8 + stages: 7 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 7 + expected: 7 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 19 + expected: 19 +-------------------- +Dense Output +Fe RHS evals: + actual: 19 + expected: 19 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 25 + expected: 25 +-------------------- + +======================== +ERK Table ID 9 + stages: 8 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 8 + expected: 8 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 16 + expected: 16 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- +Dense Output +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 32 + expected: 32 +-------------------- + +======================== +ERK Table ID 10 + stages: 8 + order: 6 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 8 + expected: 8 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 16 + expected: 16 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- +Dense Output +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 32 + expected: 32 +-------------------- + +======================== +ERK Table ID 11 + stages: 13 + order: 8 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 26 + expected: 26 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 39 + expected: 39 +-------------------- +Dense Output +Fe RHS evals: + actual: 39 + expected: 39 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 52 + expected: 52 +-------------------- + +======================== +ERK Table ID 12 + stages: 3 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 3 + expected: 3 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Dense Output +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- + +======================== +ERK Table ID 13 + stages: 7 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 7 + expected: 7 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 14 + expected: 14 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 21 + expected: 21 +-------------------- +Dense Output +Fe RHS evals: + actual: 21 + expected: 21 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 28 + expected: 28 +-------------------- + +======================== +ERK Table ID 14 + stages: 8 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 8 + expected: 8 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 16 + expected: 16 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- +Dense Output +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 32 + expected: 32 +-------------------- + +======================== +ERK Table ID 15 + stages: 3 + order: 2 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 3 + expected: 3 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Dense Output +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- + +======================== +ERK Table ID 16 + stages: 5 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 5 + expected: 5 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 13 + expected: 13 +-------------------- +Dense Output +Fe RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 17 + expected: 17 +-------------------- + +======================== +ERK Table ID 17 + stages: 3 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 3 + expected: 3 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Dense Output +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- + +======================== +ERK Table ID 18 + stages: 9 + order: 6 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 17 + expected: 17 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 25 + expected: 25 +-------------------- +Dense Output +Fe RHS evals: + actual: 25 + expected: 25 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 33 + expected: 33 +-------------------- + +======================== +ERK Table ID 19 + stages: 10 + order: 7 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 10 + expected: 10 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 20 + expected: 20 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 30 + expected: 30 +-------------------- +Dense Output +Fe RHS evals: + actual: 30 + expected: 30 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 40 + expected: 40 +-------------------- + +======================== +ERK Table ID 20 + stages: 13 + order: 8 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 26 + expected: 26 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 39 + expected: 39 +-------------------- +Dense Output +Fe RHS evals: + actual: 39 + expected: 39 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 52 + expected: 52 +-------------------- + +======================== +ERK Table ID 21 + stages: 16 + order: 9 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 16 + expected: 16 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 32 + expected: 32 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 48 + expected: 48 +-------------------- +Dense Output +Fe RHS evals: + actual: 48 + expected: 48 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 64 + expected: 64 +-------------------- + +======================== +ERK Table ID 22 + stages: 1 + order: 1 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 1 + expected: 1 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 2 + expected: 2 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 3 + expected: 3 +-------------------- +Dense Output +Fe RHS evals: + actual: 3 + expected: 3 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 4 + expected: 4 +-------------------- + +======================== +ERK Table ID 23 + stages: 2 + order: 2 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 2 + expected: 2 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Dense Output +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 8 + expected: 8 +-------------------- + +======================== +ERK Table ID 24 + stages: 2 + order: 2 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 2 + expected: 2 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Dense Output +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 8 + expected: 8 +-------------------- + +======================== +Test implicit RK methods +======================== + +======================== +Implicit Euler + stages: 1 + order: 1 + explicit 1st stage: 0 + stiffly accurate: 1 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 1 +Fi RHS evals: + actual: 2 + expected: 2 +-------------------- +Steps: 2 +NLS iters: 2 +Fi RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 3 +NLS iters: 3 +Fi RHS evals: + actual: 6 + expected: 6 +-------------------- +Dense Output +Fi RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 4 +NLS iters: 4 +Fi RHS evals: + actual: 8 + expected: 8 +-------------------- + +======================== +DIRK Table ID 100 + stages: 2 + order: 2 + explicit 1st stage: 0 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 2 +Fi RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 2 +NLS iters: 4 +Fi RHS evals: + actual: 8 + expected: 8 +-------------------- +Steps: 3 +NLS iters: 6 +Fi RHS evals: + actual: 12 + expected: 12 +-------------------- +Dense Output +Fi RHS evals: + actual: 12 + expected: 12 +-------------------- +Steps: 4 +NLS iters: 8 +Fi RHS evals: + actual: 16 + expected: 16 +-------------------- + +======================== +DIRK Table ID 101 + stages: 3 + order: 2 + explicit 1st stage: 0 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 3 +Fi RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 2 +NLS iters: 6 +Fi RHS evals: + actual: 12 + expected: 12 +-------------------- +Steps: 3 +NLS iters: 9 +Fi RHS evals: + actual: 18 + expected: 18 +-------------------- +Dense Output +Fi RHS evals: + actual: 18 + expected: 18 +-------------------- +Steps: 4 +NLS iters: 12 +Fi RHS evals: + actual: 24 + expected: 24 +-------------------- + +======================== +DIRK Table ID 102 + stages: 3 + order: 2 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 2 +Fi RHS evals: + actual: 5 + expected: 5 +-------------------- +Steps: 2 +NLS iters: 4 +Fi RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 3 +NLS iters: 6 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Dense Output +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 4 +NLS iters: 8 +Fi RHS evals: + actual: 17 + expected: 17 +-------------------- + +======================== +DIRK Table ID 103 + stages: 4 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 3 +Fi RHS evals: + actual: 7 + expected: 7 +-------------------- +Steps: 2 +NLS iters: 6 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 3 +NLS iters: 9 +Fi RHS evals: + actual: 19 + expected: 19 +-------------------- +Dense Output +Fi RHS evals: + actual: 19 + expected: 19 +-------------------- +Steps: 4 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- + +======================== +DIRK Table ID 104 + stages: 4 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 3 +Fi RHS evals: + actual: 7 + expected: 7 +-------------------- +Steps: 2 +NLS iters: 6 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 3 +NLS iters: 9 +Fi RHS evals: + actual: 19 + expected: 19 +-------------------- +Dense Output +Fi RHS evals: + actual: 19 + expected: 19 +-------------------- +Steps: 4 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- + +======================== +DIRK Table ID 105 + stages: 5 + order: 4 + explicit 1st stage: 0 + stiffly accurate: 1 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 5 +Fi RHS evals: + actual: 10 + expected: 10 +-------------------- +Steps: 2 +NLS iters: 10 +Fi RHS evals: + actual: 20 + expected: 20 +-------------------- +Steps: 3 +NLS iters: 15 +Fi RHS evals: + actual: 30 + expected: 30 +-------------------- +Dense Output +Fi RHS evals: + actual: 30 + expected: 30 +-------------------- +Steps: 4 +NLS iters: 20 +Fi RHS evals: + actual: 40 + expected: 40 +-------------------- + +======================== +DIRK Table ID 106 + stages: 5 + order: 4 + explicit 1st stage: 0 + stiffly accurate: 1 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 5 +Fi RHS evals: + actual: 10 + expected: 10 +-------------------- +Steps: 2 +NLS iters: 10 +Fi RHS evals: + actual: 20 + expected: 20 +-------------------- +Steps: 3 +NLS iters: 15 +Fi RHS evals: + actual: 30 + expected: 30 +-------------------- +Dense Output +Fi RHS evals: + actual: 30 + expected: 30 +-------------------- +Steps: 4 +NLS iters: 20 +Fi RHS evals: + actual: 40 + expected: 40 +-------------------- + +======================== +DIRK Table ID 107 + stages: 5 + order: 4 + explicit 1st stage: 0 + stiffly accurate: 1 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 5 +Fi RHS evals: + actual: 10 + expected: 10 +-------------------- +Steps: 2 +NLS iters: 10 +Fi RHS evals: + actual: 20 + expected: 20 +-------------------- +Steps: 3 +NLS iters: 15 +Fi RHS evals: + actual: 30 + expected: 30 +-------------------- +Dense Output +Fi RHS evals: + actual: 30 + expected: 30 +-------------------- +Steps: 4 +NLS iters: 20 +Fi RHS evals: + actual: 40 + expected: 40 +-------------------- + +======================== +DIRK Table ID 108 + stages: 5 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 4 +Fi RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 2 +NLS iters: 8 +Fi RHS evals: + actual: 17 + expected: 17 +-------------------- +Steps: 3 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Dense Output +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Steps: 4 +NLS iters: 16 +Fi RHS evals: + actual: 33 + expected: 33 +-------------------- + +======================== +DIRK Table ID 109 + stages: 6 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 5 +Fi RHS evals: + actual: 11 + expected: 11 +-------------------- +Steps: 2 +NLS iters: 10 +Fi RHS evals: + actual: 21 + expected: 21 +-------------------- +Steps: 3 +NLS iters: 15 +Fi RHS evals: + actual: 31 + expected: 31 +-------------------- +Dense Output +Fi RHS evals: + actual: 31 + expected: 31 +-------------------- +Steps: 4 +NLS iters: 20 +Fi RHS evals: + actual: 41 + expected: 41 +-------------------- + +======================== +DIRK Table ID 110 + stages: 7 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 6 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 2 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Steps: 3 +NLS iters: 18 +Fi RHS evals: + actual: 37 + expected: 37 +-------------------- +Dense Output +Fi RHS evals: + actual: 37 + expected: 37 +-------------------- +Steps: 4 +NLS iters: 24 +Fi RHS evals: + actual: 49 + expected: 49 +-------------------- + +======================== +DIRK Table ID 111 + stages: 8 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 7 +Fi RHS evals: + actual: 15 + expected: 15 +-------------------- +Steps: 2 +NLS iters: 14 +Fi RHS evals: + actual: 29 + expected: 29 +-------------------- +Steps: 3 +NLS iters: 21 +Fi RHS evals: + actual: 43 + expected: 43 +-------------------- +Dense Output +Fi RHS evals: + actual: 43 + expected: 43 +-------------------- +Steps: 4 +NLS iters: 28 +Fi RHS evals: + actual: 57 + expected: 57 +-------------------- + +======================== +DIRK Table ID 112 + stages: 7 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 6 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 2 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Steps: 3 +NLS iters: 18 +Fi RHS evals: + actual: 37 + expected: 37 +-------------------- +Dense Output +Fi RHS evals: + actual: 37 + expected: 37 +-------------------- +Steps: 4 +NLS iters: 24 +Fi RHS evals: + actual: 49 + expected: 49 +-------------------- + +======================== +DIRK Table ID 113 + stages: 8 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 7 +Fi RHS evals: + actual: 15 + expected: 15 +-------------------- +Steps: 2 +NLS iters: 14 +Fi RHS evals: + actual: 29 + expected: 29 +-------------------- +Steps: 3 +NLS iters: 21 +Fi RHS evals: + actual: 43 + expected: 43 +-------------------- +Dense Output +Fi RHS evals: + actual: 43 + expected: 43 +-------------------- +Steps: 4 +NLS iters: 28 +Fi RHS evals: + actual: 57 + expected: 57 +-------------------- + +======================== +DIRK Table ID 114 + stages: 4 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 3 +Fi RHS evals: + actual: 7 + expected: 7 +-------------------- +Steps: 2 +NLS iters: 6 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 3 +NLS iters: 9 +Fi RHS evals: + actual: 19 + expected: 19 +-------------------- +Dense Output +Fi RHS evals: + actual: 19 + expected: 19 +-------------------- +Steps: 4 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- + +======================== +DIRK Table ID 115 + stages: 5 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 4 +Fi RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 2 +NLS iters: 8 +Fi RHS evals: + actual: 17 + expected: 17 +-------------------- +Steps: 3 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Dense Output +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Steps: 4 +NLS iters: 16 +Fi RHS evals: + actual: 33 + expected: 33 +-------------------- + +======================== +DIRK Table ID 116 + stages: 5 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 4 +Fi RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 2 +NLS iters: 8 +Fi RHS evals: + actual: 17 + expected: 17 +-------------------- +Steps: 3 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Dense Output +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Steps: 4 +NLS iters: 16 +Fi RHS evals: + actual: 33 + expected: 33 +-------------------- + +======================== +DIRK Table ID 117 + stages: 6 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 5 +Fi RHS evals: + actual: 11 + expected: 11 +-------------------- +Steps: 2 +NLS iters: 10 +Fi RHS evals: + actual: 21 + expected: 21 +-------------------- +Steps: 3 +NLS iters: 15 +Fi RHS evals: + actual: 31 + expected: 31 +-------------------- +Dense Output +Fi RHS evals: + actual: 31 + expected: 31 +-------------------- +Steps: 4 +NLS iters: 20 +Fi RHS evals: + actual: 41 + expected: 41 +-------------------- + +======================== +DIRK Table ID 118 + stages: 6 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 5 +Fi RHS evals: + actual: 11 + expected: 11 +-------------------- +Steps: 2 +NLS iters: 10 +Fi RHS evals: + actual: 21 + expected: 21 +-------------------- +Steps: 3 +NLS iters: 15 +Fi RHS evals: + actual: 31 + expected: 31 +-------------------- +Dense Output +Fi RHS evals: + actual: 31 + expected: 31 +-------------------- +Steps: 4 +NLS iters: 20 +Fi RHS evals: + actual: 41 + expected: 41 +-------------------- + +======================== +DIRK Table ID 119 + stages: 6 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 5 +Fi RHS evals: + actual: 11 + expected: 11 +-------------------- +Steps: 2 +NLS iters: 10 +Fi RHS evals: + actual: 21 + expected: 21 +-------------------- +Steps: 3 +NLS iters: 15 +Fi RHS evals: + actual: 31 + expected: 31 +-------------------- +Dense Output +Fi RHS evals: + actual: 31 + expected: 31 +-------------------- +Steps: 4 +NLS iters: 20 +Fi RHS evals: + actual: 41 + expected: 41 +-------------------- + +======================== +DIRK Table ID 120 + stages: 7 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 6 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 2 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Steps: 3 +NLS iters: 18 +Fi RHS evals: + actual: 37 + expected: 37 +-------------------- +Dense Output +Fi RHS evals: + actual: 37 + expected: 37 +-------------------- +Steps: 4 +NLS iters: 24 +Fi RHS evals: + actual: 49 + expected: 49 +-------------------- + +======================== +DIRK Table ID 121 + stages: 7 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 6 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 2 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Steps: 3 +NLS iters: 18 +Fi RHS evals: + actual: 37 + expected: 37 +-------------------- +Dense Output +Fi RHS evals: + actual: 37 + expected: 37 +-------------------- +Steps: 4 +NLS iters: 24 +Fi RHS evals: + actual: 49 + expected: 49 +-------------------- + +======================== +DIRK Table ID 122 + stages: 7 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 6 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 2 +NLS iters: 12 +Fi RHS evals: + actual: 25 + expected: 25 +-------------------- +Steps: 3 +NLS iters: 18 +Fi RHS evals: + actual: 37 + expected: 37 +-------------------- +Dense Output +Fi RHS evals: + actual: 37 + expected: 37 +-------------------- +Steps: 4 +NLS iters: 24 +Fi RHS evals: + actual: 49 + expected: 49 +-------------------- + +======================== +DIRK Table ID 123 + stages: 3 + order: 2 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 2 +Fi RHS evals: + actual: 5 + expected: 5 +-------------------- +Steps: 2 +NLS iters: 4 +Fi RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 3 +NLS iters: 6 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Dense Output +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 4 +NLS iters: 8 +Fi RHS evals: + actual: 17 + expected: 17 +-------------------- + +======================== +DIRK Table ID 124 + stages: 1 + order: 1 + explicit 1st stage: 0 + stiffly accurate: 1 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 1 +Fi RHS evals: + actual: 2 + expected: 2 +-------------------- +Steps: 2 +NLS iters: 2 +Fi RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 3 +NLS iters: 3 +Fi RHS evals: + actual: 6 + expected: 6 +-------------------- +Dense Output +Fi RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 4 +NLS iters: 4 +Fi RHS evals: + actual: 8 + expected: 8 +-------------------- + +======================== +DIRK Table ID 125 + stages: 1 + order: 2 + explicit 1st stage: 0 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 1 +Fi RHS evals: + actual: 2 + expected: 2 +-------------------- +Steps: 2 +NLS iters: 2 +Fi RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 3 +NLS iters: 3 +Fi RHS evals: + actual: 6 + expected: 6 +-------------------- +Dense Output +Fi RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 4 +NLS iters: 4 +Fi RHS evals: + actual: 8 + expected: 8 +-------------------- + +======================== +DIRK Table ID 126 + stages: 2 + order: 2 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 1 +Fi RHS evals: + actual: 3 + expected: 3 +-------------------- +Steps: 2 +NLS iters: 2 +Fi RHS evals: + actual: 5 + expected: 5 +-------------------- +Steps: 3 +NLS iters: 3 +Fi RHS evals: + actual: 7 + expected: 7 +-------------------- +Dense Output +Fi RHS evals: + actual: 7 + expected: 7 +-------------------- +Steps: 4 +NLS iters: 4 +Fi RHS evals: + actual: 9 + expected: 9 +-------------------- + +===================== +Test IMEX ARK methods +===================== + +======================== +IMEX Euler + stages: 2 + order: 1 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +NLS iters: 1 +Fe RHS evals: + actual: 2 + expected: 2 +Fi RHS evals: + actual: 3 + expected: 3 +-------------------- +Steps: 2 +NLS iters: 2 +Fe RHS evals: + actual: 3 + expected: 3 +Fi RHS evals: + actual: 5 + expected: 5 +-------------------- +Steps: 3 +NLS iters: 3 +Fe RHS evals: + actual: 4 + expected: 4 +Fi RHS evals: + actual: 7 + expected: 7 +-------------------- +Dense Output +Fe RHS evals: + actual: 4 + expected: 4 +Fi RHS evals: + actual: 7 + expected: 7 +-------------------- +Steps: 4 +NLS iters: 4 +Fe RHS evals: + actual: 5 + expected: 5 +Fi RHS evals: + actual: 9 + expected: 9 +-------------------- + +======================== +IMEX Table ID 0 + stages: 3 + order: 2 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 2 +Fe RHS evals: + actual: 3 + expected: 3 +Fi RHS evals: + actual: 5 + expected: 5 +-------------------- +Steps: 2 +NLS iters: 4 +Fe RHS evals: + actual: 6 + expected: 6 +Fi RHS evals: + actual: 10 + expected: 10 +-------------------- +Steps: 3 +NLS iters: 6 +Fe RHS evals: + actual: 9 + expected: 9 +Fi RHS evals: + actual: 15 + expected: 15 +-------------------- +Dense Output +Fe RHS evals: + actual: 9 + expected: 9 +Fi RHS evals: + actual: 15 + expected: 15 +-------------------- +Steps: 4 +NLS iters: 8 +Fe RHS evals: + actual: 12 + expected: 12 +Fi RHS evals: + actual: 20 + expected: 20 +-------------------- + +======================== +IMEX Table ID 1 + stages: 4 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 3 +Fe RHS evals: + actual: 4 + expected: 4 +Fi RHS evals: + actual: 7 + expected: 7 +-------------------- +Steps: 2 +NLS iters: 6 +Fe RHS evals: + actual: 8 + expected: 8 +Fi RHS evals: + actual: 14 + expected: 14 +-------------------- +Steps: 3 +NLS iters: 9 +Fe RHS evals: + actual: 12 + expected: 12 +Fi RHS evals: + actual: 21 + expected: 21 +-------------------- +Dense Output +Fe RHS evals: + actual: 12 + expected: 12 +Fi RHS evals: + actual: 21 + expected: 21 +-------------------- +Steps: 4 +NLS iters: 12 +Fe RHS evals: + actual: 16 + expected: 16 +Fi RHS evals: + actual: 28 + expected: 28 +-------------------- + +======================== +IMEX Table ID 2 + stages: 6 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 5 +Fe RHS evals: + actual: 6 + expected: 6 +Fi RHS evals: + actual: 11 + expected: 11 +-------------------- +Steps: 2 +NLS iters: 10 +Fe RHS evals: + actual: 12 + expected: 12 +Fi RHS evals: + actual: 22 + expected: 22 +-------------------- +Steps: 3 +NLS iters: 15 +Fe RHS evals: + actual: 18 + expected: 18 +Fi RHS evals: + actual: 33 + expected: 33 +-------------------- +Dense Output +Fe RHS evals: + actual: 18 + expected: 18 +Fi RHS evals: + actual: 33 + expected: 33 +-------------------- +Steps: 4 +NLS iters: 20 +Fe RHS evals: + actual: 24 + expected: 24 +Fi RHS evals: + actual: 44 + expected: 44 +-------------------- + +======================== +IMEX Table ID 3 + stages: 7 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 6 +Fe RHS evals: + actual: 7 + expected: 7 +Fi RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 2 +NLS iters: 12 +Fe RHS evals: + actual: 14 + expected: 14 +Fi RHS evals: + actual: 26 + expected: 26 +-------------------- +Steps: 3 +NLS iters: 18 +Fe RHS evals: + actual: 21 + expected: 21 +Fi RHS evals: + actual: 39 + expected: 39 +-------------------- +Dense Output +Fe RHS evals: + actual: 21 + expected: 21 +Fi RHS evals: + actual: 39 + expected: 39 +-------------------- +Steps: 4 +NLS iters: 24 +Fe RHS evals: + actual: 28 + expected: 28 +Fi RHS evals: + actual: 52 + expected: 52 +-------------------- + +======================== +IMEX Table ID 4 + stages: 8 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 7 +Fe RHS evals: + actual: 8 + expected: 8 +Fi RHS evals: + actual: 15 + expected: 15 +-------------------- +Steps: 2 +NLS iters: 14 +Fe RHS evals: + actual: 16 + expected: 16 +Fi RHS evals: + actual: 30 + expected: 30 +-------------------- +Steps: 3 +NLS iters: 21 +Fe RHS evals: + actual: 24 + expected: 24 +Fi RHS evals: + actual: 45 + expected: 45 +-------------------- +Dense Output +Fe RHS evals: + actual: 24 + expected: 24 +Fi RHS evals: + actual: 45 + expected: 45 +-------------------- +Steps: 4 +NLS iters: 28 +Fe RHS evals: + actual: 32 + expected: 32 +Fi RHS evals: + actual: 60 + expected: 60 +-------------------- + +======================== +IMEX Table ID 5 + stages: 8 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +NLS iters: 7 +Fe RHS evals: + actual: 8 + expected: 8 +Fi RHS evals: + actual: 15 + expected: 15 +-------------------- +Steps: 2 +NLS iters: 14 +Fe RHS evals: + actual: 16 + expected: 16 +Fi RHS evals: + actual: 30 + expected: 30 +-------------------- +Steps: 3 +NLS iters: 21 +Fe RHS evals: + actual: 24 + expected: 24 +Fi RHS evals: + actual: 45 + expected: 45 +-------------------- +Dense Output +Fe RHS evals: + actual: 24 + expected: 24 +Fi RHS evals: + actual: 45 + expected: 45 +-------------------- +Steps: 4 +NLS iters: 28 +Fe RHS evals: + actual: 32 + expected: 32 +Fi RHS evals: + actual: 60 + expected: 60 +-------------------- + + +All tests passed! diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_erk_-1.out b/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_erk_-1.out new file mode 100644 index 0000000000..ddbbbe232b --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_erk_-1.out @@ -0,0 +1,924 @@ + +Dahlquist ODE test problem: + lambda expl = -1 + step size = 0.01 + relative tol = 0.0001 + absolute tol = 1e-06 + interp type = None + +======================== +Test explicit RK methods +======================== + +======================== +Explicit Euler + stages: 1 + order: 1 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 1 + expected: 1 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 2 + expected: 2 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 3 + expected: 3 +-------------------- +Dense Output +Fe RHS evals: + actual: 3 + expected: 3 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 4 + expected: 4 +-------------------- + +======================== +ERK Table ID 0 + stages: 2 + order: 2 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 2 + expected: 2 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Dense Output +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 8 + expected: 8 +-------------------- + +======================== +ERK Table ID 1 + stages: 4 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 7 + expected: 7 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 10 + expected: 10 +-------------------- +Dense Output +Fe RHS evals: + actual: 10 + expected: 10 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 13 + expected: 13 +-------------------- + +======================== +ERK Table ID 2 + stages: 4 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 8 + expected: 8 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- +Dense Output +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 16 + expected: 16 +-------------------- + +======================== +ERK Table ID 3 + stages: 5 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 5 + expected: 5 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 10 + expected: 10 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 15 + expected: 15 +-------------------- +Dense Output +Fe RHS evals: + actual: 15 + expected: 15 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 20 + expected: 20 +-------------------- + +======================== +ERK Table ID 4 + stages: 6 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Dense Output +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- + +======================== +ERK Table ID 5 + stages: 6 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Dense Output +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- + +======================== +ERK Table ID 6 + stages: 6 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Dense Output +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- + +======================== +ERK Table ID 7 + stages: 6 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Dense Output +Fe RHS evals: + actual: 18 + expected: 18 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- + +======================== +ERK Table ID 8 + stages: 7 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 7 + expected: 7 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 19 + expected: 19 +-------------------- +Dense Output +Fe RHS evals: + actual: 19 + expected: 19 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 25 + expected: 25 +-------------------- + +======================== +ERK Table ID 9 + stages: 8 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 8 + expected: 8 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 16 + expected: 16 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- +Dense Output +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 32 + expected: 32 +-------------------- + +======================== +ERK Table ID 10 + stages: 8 + order: 6 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 8 + expected: 8 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 16 + expected: 16 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- +Dense Output +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 32 + expected: 32 +-------------------- + +======================== +ERK Table ID 11 + stages: 13 + order: 8 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 26 + expected: 26 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 39 + expected: 39 +-------------------- +Dense Output +Fe RHS evals: + actual: 39 + expected: 39 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 52 + expected: 52 +-------------------- + +======================== +ERK Table ID 12 + stages: 3 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 3 + expected: 3 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Dense Output +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- + +======================== +ERK Table ID 13 + stages: 7 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 7 + expected: 7 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 14 + expected: 14 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 21 + expected: 21 +-------------------- +Dense Output +Fe RHS evals: + actual: 21 + expected: 21 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 28 + expected: 28 +-------------------- + +======================== +ERK Table ID 14 + stages: 8 + order: 5 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 8 + expected: 8 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 16 + expected: 16 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- +Dense Output +Fe RHS evals: + actual: 24 + expected: 24 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 32 + expected: 32 +-------------------- + +======================== +ERK Table ID 15 + stages: 3 + order: 2 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 3 + expected: 3 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Dense Output +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- + +======================== +ERK Table ID 16 + stages: 5 + order: 4 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 5 + expected: 5 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 13 + expected: 13 +-------------------- +Dense Output +Fe RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 17 + expected: 17 +-------------------- + +======================== +ERK Table ID 17 + stages: 3 + order: 3 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 3 + expected: 3 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Dense Output +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 12 + expected: 12 +-------------------- + +======================== +ERK Table ID 18 + stages: 9 + order: 6 + explicit 1st stage: 1 + stiffly accurate: 1 + first same as last: 1 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 9 + expected: 9 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 17 + expected: 17 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 25 + expected: 25 +-------------------- +Dense Output +Fe RHS evals: + actual: 25 + expected: 25 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 33 + expected: 33 +-------------------- + +======================== +ERK Table ID 19 + stages: 10 + order: 7 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 10 + expected: 10 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 20 + expected: 20 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 30 + expected: 30 +-------------------- +Dense Output +Fe RHS evals: + actual: 30 + expected: 30 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 40 + expected: 40 +-------------------- + +======================== +ERK Table ID 20 + stages: 13 + order: 8 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 13 + expected: 13 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 26 + expected: 26 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 39 + expected: 39 +-------------------- +Dense Output +Fe RHS evals: + actual: 39 + expected: 39 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 52 + expected: 52 +-------------------- + +======================== +ERK Table ID 21 + stages: 16 + order: 9 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 16 + expected: 16 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 32 + expected: 32 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 48 + expected: 48 +-------------------- +Dense Output +Fe RHS evals: + actual: 48 + expected: 48 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 64 + expected: 64 +-------------------- + +======================== +ERK Table ID 22 + stages: 1 + order: 1 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 1 + expected: 1 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 2 + expected: 2 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 3 + expected: 3 +-------------------- +Dense Output +Fe RHS evals: + actual: 3 + expected: 3 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 4 + expected: 4 +-------------------- + +======================== +ERK Table ID 23 + stages: 2 + order: 2 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 2 + expected: 2 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Dense Output +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 8 + expected: 8 +-------------------- + +======================== +ERK Table ID 24 + stages: 2 + order: 2 + explicit 1st stage: 1 + stiffly accurate: 0 + first same as last: 0 +======================== +-------------------- +Steps: 1 +Fe RHS evals: + actual: 2 + expected: 2 +-------------------- +Steps: 2 +Fe RHS evals: + actual: 4 + expected: 4 +-------------------- +Steps: 3 +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Dense Output +Fe RHS evals: + actual: 6 + expected: 6 +-------------------- +Steps: 4 +Fe RHS evals: + actual: 8 + expected: 8 +-------------------- + + +All tests passed! diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_mri.out b/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_mri_-1.out similarity index 99% rename from test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_mri.out rename to test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_mri_-1.out index e5f2a9b602..9f09d86912 100644 --- a/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_mri.out +++ b/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_mri_-1.out @@ -7,6 +7,7 @@ Dahlquist ODE test problem: h fast = 0.01 relative tol = 0.0001 absolute tol = 1e-06 + interp type = None ========================= Test explicit MRI methods diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_mri_0.out b/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_mri_0.out new file mode 100644 index 0000000000..4591cb3cd3 --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_mri_0.out @@ -0,0 +1,706 @@ + +Dahlquist ODE test problem: + lambda expl = -1 + lambda impl = -1 + lambda fast = -1 + h slow = 0.01 + h fast = 0.01 + relative tol = 0.0001 + absolute tol = 1e-06 + interp type = Hermite + +========================= +Test explicit MRI methods +========================= + +Testing method ARKODE_MIS_KW3 + nmat = 1 + stages = 4 + method order (q) = 3 + embedding order (p) = 0 + c = 0 0.3333333333333333 0.75 1 + W[0] = + 0 0 0 0 + 0.3333333333333333 0 0 0 + -0.5208333333333333 0.9375 0 0 + 0.3541666666666666 -0.6375 0.5333333333333333 0 + + Stored stages = 3 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.980199 + y_n = 0.980199 + Error = 1.86014e-09 + Steps = 1 + Fe evals = 3 + Fi evals = 0 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_MRI_GARK_ERK22a + nmat = 1 + stages = 3 + method order (q) = 2 + embedding order (p) = 0 + c = 0 0.5 1 + W[0] = + 0 0 0 + 0.5 0 0 + -0.5 1 0 + + Stored stages = 2 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.980199 + y_n = 0.980199 + Error = -4.95647e-07 + Steps = 1 + Fe evals = 2 + Fi evals = 0 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_MRI_GARK_ERK22b + nmat = 1 + stages = 3 + method order (q) = 2 + embedding order (p) = 0 + c = 0 1 1 + W[0] = + 0 0 0 + 1 0 0 + -0.5 0.5 0 + + Stored stages = 2 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.980199 + y_n = 0.980199 + Error = -4.95856e-07 + Steps = 1 + Fe evals = 2 + Fi evals = 0 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_MRI_GARK_ERK33a + nmat = 2 + stages = 4 + method order (q) = 3 + embedding order (p) = 0 + c = 0 0.3333333333333333 0.6666666666666666 1 + W[0] = + 0 0 0 0 + 0.3333333333333333 0 0 0 + -0.3333333333333333 0.6666666666666666 0 0 + 0 -0.6666666666666666 1 0 + + W[1] = + 0 0 0 0 + 0 0 0 0 + 0 0 0 0 + 0.5 0 -0.5 0 + + Stored stages = 3 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.980199 + y_n = 0.980199 + Error = 1.7757e-09 + Steps = 1 + Fe evals = 3 + Fi evals = 0 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_MRI_GARK_ERK45a + nmat = 2 + stages = 6 + method order (q) = 4 + embedding order (p) = 0 + c = 0 0.2 0.4 0.6 0.8 1 + W[0] = + 0 0 0 0 0 0 + 0.2 0 0 0 0 0 + -3.3125 3.5125 0 0 0 0 + -0.5121234603937985 1.955496920787597 -1.243373460393798 0 0 0 + -0.1068927211587161 -4.656693056981116 3.994968532757531 0.9686172453823019 0 0 + 0.911960843690752 -0.1837327083772207 -1.193926866090864 -2.611983006811319 3.277681737588653 0 + + W[1] = + 0 0 0 0 0 0 + 0 0 0 0 0 0 + 6.2875 -6.2875 0 0 0 0 + -0.0382530792124029 0.6952561584248058 -0.6570030792124029 0 0 0 + 1.87616694642529 3.003768197383342 -3 -1.879935143808632 0 0 + -2.423803191489362 2 1 5 -5.576196808510638 0 + + Stored stages = 5 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.980199 + y_n = 0.980199 + Error = -5.3153e-12 + Steps = 1 + Fe evals = 5 + Fi evals = 0 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_MRI_GARK_FORWARD_EULER + nmat = 1 + stages = 2 + method order (q) = 1 + embedding order (p) = 0 + c = 0 1 + W[0] = + 0 0 + 1 0 + + Stored stages = 1 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.980199 + y_n = 0.9801 + Error = 9.90058e-05 + Steps = 1 + Fe evals = 1 + Fi evals = 0 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_MRI_GARK_RALSTON2 + nmat = 1 + stages = 3 + method order (q) = 2 + embedding order (p) = 0 + c = 0 0.6666666666666666 1 + W[0] = + 0 0 0 + 0.6666666666666666 0 0 + -0.4166666666666666 0.75 0 + + Stored stages = 2 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.980199 + y_n = 0.980199 + Error = -4.9567e-07 + Steps = 1 + Fe evals = 2 + Fi evals = 0 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_MRI_GARK_RALSTON3 + nmat = 2 + stages = 4 + method order (q) = 3 + embedding order (p) = 0 + c = 0 0.5 0.75 1 + W[0] = + 0 0 0 0 + 0.5 0 0 0 + -2.75 3 0 0 + 1.305555555555556 -0.1666666666666667 -0.8888888888888888 0 + + W[1] = + 0 0 0 0 + 0 0 0 0 + 4.5 -4.5 0 0 + -2.166666666666667 -0.5 2.666666666666667 0 + + Stored stages = 3 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.980199 + y_n = 0.980199 + Error = 1.72143e-09 + Steps = 1 + Fe evals = 3 + Fi evals = 0 + +Comparing Solver Statistics: +All checks passed + +========================= +Test implicit MRI methods +========================= + +Testing method ARKODE_MRI_GARK_BACKWARD_EULER + nmat = 1 + stages = 3 + method order (q) = 1 + embedding order (p) = 0 + c = 0 1 1 + G[0] = + 0 0 0 + 1 0 0 + -1 0 1 + + Stored stages = 2 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.980199 + y_n = 0.980297 + Error = -9.80272e-05 + Steps = 1 + Fe evals = 0 + Fi evals = 2 + NLS iters = 1 + NLS fails = 0 + LS setups = 1 + LS Fi evals = 0 + Ji evals = 1 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_MRI_GARK_ESDIRK34a + nmat = 1 + stages = 7 + method order (q) = 3 + embedding order (p) = 0 + c = 0 0.3333333333333333 0.3333333333333333 0.6666666666666666 0.6666666666666666 1 1 + G[0] = + 0 0 0 0 0 0 0 + 0.3333333333333333 0 0 0 0 0 0 + -0.435866521508459 0 0.435866521508459 0 0 0 0 + -0.3045790611944505 0 0.6379123945277838 0 0 0 0 + 0.2116913105640267 0 -0.6475578320724856 0 0.435866521508459 0 0 + 0.4454209388055495 0 0.8813784805616198 0 -0.993466086033836 0 0 + -0.435866521508459 0 0 0 0 0 0.435866521508459 + + Stored stages = 4 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.980199 + y_n = 0.980199 + Error = 1.40689e-10 + Steps = 1 + Fe evals = 0 + Fi evals = 6 + NLS iters = 3 + NLS fails = 0 + LS setups = 1 + LS Fi evals = 0 + Ji evals = 1 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_MRI_GARK_ESDIRK46a + nmat = 2 + stages = 11 + method order (q) = 4 + embedding order (p) = 0 + c = 0 0.2 0.2 0.4 0.4 0.6 0.6 0.8 0.8 1 1 + G[0] = + 0 0 0 0 0 0 0 0 0 0 0 + 0.2 0 0 0 0 0 0 0 0 0 0 + -0.25 0 0.25 0 0 0 0 0 0 0 0 + 0.9179311933794375 0 -0.7179311933794374 0 0 0 0 0 0 0 0 + 2.643172353961828 0 -2.893172353961828 0 0.25 0 0 0 0 0 0 + 0.501564151341775 0 0.06834736723773695 0 -0.369911518579512 0 0 0 0 0 0 + 4.342116951031425 0 0.03897604588394062 0 -4.631092996915365 0 0.25 0 0 0 0 + -1.690014953911908 0 0.7232372452056922 0 1.84784916447243 0 -0.681071455766214 0 0 0 0 + 3.315267994849762 0 1.086235127654301 0 -1.202424037428737 0 -3.449079085075326 0 0.25 0 0 + -1.563558636602688 0 1.020883954835773 0 2.489384426659126 0 -0.1865282766779755 0 -1.560181468214235 0 0 + 0.19 0 -0.2433333333333333 0 0.4233333333333333 0 0.4233333333333333 0 -1.043333333333333 0 0.25 + + G[1] = + 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 + -1.735862386758875 0 1.735862386758875 0 0 0 0 0 0 0 0 + -5.82844997108155 0 5.82844997108155 0 0 0 0 0 0 0 0 + -0.4610230395256553 0 -0.9787999976333687 0 1.439823037159024 0 0 0 0 0 0 + -7.403989721900906 0 0.06115468960863698 0 7.342835032292269 0 0 0 0 0 0 + 2.099785727661873 0 -1.585581271787903 0 -2.976347367406398 0 2.462142911532428 0 0 0 0 + -5.523652150637583 0 -1.829811152193671 0 1.834216697306453 0 5.519246605524801 0 0 0 0 + 2.020233434143436 0 -2.384427012786476 0 -4.40813747576723 0 0.1519681179818014 0 4.62036293642847 0 0 + 0.12 0 -0.09666666666666666 0 0.2366666666666667 0 0.2366666666666667 0 -0.4966666666666666 0 0 + + Stored stages = 6 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.980199 + y_n = 0.980199 + Error = 1.36036e-12 + Steps = 1 + Fe evals = 0 + Fi evals = 10 + NLS iters = 5 + NLS fails = 0 + LS setups = 1 + LS Fi evals = 0 + Ji evals = 1 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_MRI_GARK_IMPLICIT_MIDPOINT + nmat = 1 + stages = 4 + method order (q) = 2 + embedding order (p) = 0 + c = 0 0.5 0.5 1 + G[0] = + 0 0 0 0 + 0.5 0 0 0 + -0.5 0 0.5 0 + 0 0 0.5 0 + + Stored stages = 2 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.980199 + y_n = 0.980199 + Error = 1.2304e-07 + Steps = 1 + Fe evals = 0 + Fi evals = 3 + NLS iters = 1 + NLS fails = 0 + LS setups = 1 + LS Fi evals = 0 + Ji evals = 1 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_MRI_GARK_IRK21a + nmat = 1 + stages = 3 + method order (q) = 2 + embedding order (p) = 0 + c = 0 1 1 + G[0] = + 0 0 0 + 1 0 0 + -0.5 0 0.5 + + Stored stages = 2 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.980199 + y_n = 0.980199 + Error = -8.22598e-10 + Steps = 1 + Fe evals = 0 + Fi evals = 2 + NLS iters = 1 + NLS fails = 0 + LS setups = 1 + LS Fi evals = 0 + Ji evals = 1 + +Comparing Solver Statistics: +All checks passed + +===================== +Test IMEX MRI methods +===================== + +Testing method ARKODE_IMEX_MRI_GARK3a + nmat = 1 + stages = 8 + method order (q) = 3 + embedding order (p) = 0 + c = 0 0.435866521508459 0.435866521508459 0.7179332607542295 0.7179332607542295 1 1 1 + W[0] = + 0 0 0 0 0 0 0 0 + 0.435866521508459 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 + -0.5688715801234401 0 0.8509383193692106 0 0 0 0 0 + 0.4542839446436089 0 -0.4542839446436089 0 0 0 0 0 + -0.4271371821005074 0 0.1562747733103381 0 0.5529291480359398 0 0 0 + 0 0 0 0 0 0 0 0 + 0.1058582960718796 0 0.6555675011400702 0 -1.197292318720409 0 0.435866521508459 0 + + G[0] = + 0 0 0 0 0 0 0 0 + 0.435866521508459 0 0 0 0 0 0 0 + -0.435866521508459 0 0.435866521508459 0 0 0 0 0 + -0.4103336962288525 0 0.692400435474623 0 0 0 0 0 + 0.4103336962288525 0 -0.8462002177373115 0 0.435866521508459 0 0 0 + 0.435866521508459 0 0.9264299099302395 0 -1.080229692192928 0 0 0 + -0.435866521508459 0 0 0 0 0 0.435866521508459 0 + 0 0 0 0 0 0 0 0 + + Stored stages = 4 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.970446 + y_n = 0.970446 + Error = 2.79396e-10 + Steps = 1 + Fe evals = 4 + Fi evals = 7 + NLS iters = 3 + NLS fails = 0 + LS setups = 1 + LS Fi evals = 0 + Ji evals = 1 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_IMEX_MRI_GARK3b + nmat = 1 + stages = 8 + method order (q) = 3 + embedding order (p) = 0 + c = 0 0.435866521508459 0.435866521508459 0.7179332607542295 0.7179332607542295 1 1 1 + W[0] = + 0 0 0 0 0 0 0 0 + 0.435866521508459 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 + -0.1750145285570468 0 0.4570812678028173 0 0 0 0 0 + 0.06042689307721552 0 -0.06042689307721552 0 0 0 0 0 + 0.1195213959425454 0 -1.843725226689662 0 2.006270569992887 0 0 0 + -0.5466585780430528 0 2 0 -1.453341421956947 0 0 0 + 0.1058582960718796 0 0.6555675011400702 0 -1.197292318720409 0 0.435866521508459 0 + + G[0] = + 0 0 0 0 0 0 0 0 + 0.435866521508459 0 0 0 0 0 0 0 + -0.435866521508459 0 0.435866521508459 0 0 0 0 0 + 0.04142737535644148 0 0.240639363889329 0 0 0 0 0 + -0.04142737535644148 0 -0.3944391461520175 0 0.435866521508459 0 0 0 + 0.1123373143006048 0 1.051807513648115 0 -0.8820780887029493 0 0 0 + -0.1123373143006048 0 -0.1253776037178755 0 -0.1981516034899788 0 0.435866521508459 0 + 0 0 0 0 0 0 0 0 + + Stored stages = 4 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.970446 + y_n = 0.970446 + Error = -3.9875e-09 + Steps = 1 + Fe evals = 4 + Fi evals = 7 + NLS iters = 3 + NLS fails = 0 + LS setups = 1 + LS Fi evals = 0 + Ji evals = 1 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_IMEX_MRI_GARK4 + nmat = 2 + stages = 12 + method order (q) = 4 + embedding order (p) = 0 + c = 0 0.5 0.5 0.625 0.625 0.75 0.75 0.875 0.875 1 1 1 + W[0] = + 0 0 0 0 0 0 0 0 0 0 0 0 + 0.5 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + -1.917165343636629 0 2.042165343636629 0 0 0 0 0 0 0 0 0 + -0.4047510318011059 0 0.4047510318011059 0 0 0 0 0 0 0 0 0 + 11.45146602249222 0 -30.21075747526504 0 18.88429145277282 0 0 0 0 0 0 0 + -0.7090335647602615 0 1.030307208587519 0 -0.3212736438272573 0 0 0 0 0 0 0 + -29.99548716455828 0 37.6059827749918 0 0.3212736438272573 0 -7.806769254260774 0 0 0 0 0 + 3.104665054272962 0 -2.430325019757162 0 -1.905479301151525 0 1.231139266635725 0 0 0 0 0 + -2.424429547752048 0 2.430325019757162 0 1.905479301151525 0 -1.231139266635725 0 -0.5552355065209142 0 0 0 + -0.01044135044479749 0 0.07260303614655074 0 -0.1288275951677261 0 0.1129355350093824 0 -0.04626962554340952 0 0 0 + -0.8108522787762101 0 0.2560073199220492 0 0.8068294072697528 0 -0.4557148228721824 0 -0.04626962554340952 0 0.25 0 + + W[1] = + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 4.084330687273257 0 -4.084330687273257 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + -21.84342998138222 0 59.61201288692787 0 -37.76858290554565 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 61.65904145863709 0 -77.27257996715863 0 0 0 15.61353850852155 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + -1.110471013041828 0 0 0 0 0 0 0 1.110471013041828 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + + G[0] = + 0 0 0 0 0 0 0 0 0 0 0 0 + 0.5 0 0 0 0 0 0 0 0 0 0 0 + -0.25 0 0.25 0 0 0 0 0 0 0 0 0 + -3.977281248108488 0 4.102281248108488 0 0 0 0 0 0 0 0 0 + -0.06905388741401691 0 -0.1809461125859831 0 0.25 0 0 0 0 0 0 0 + -1.76176766375792 0 2.694524698377299 0 -0.8077570346193781 0 0 0 0 0 0 0 + 0.555872179155397 0 -0.6799140501579995 0 -0.1259581289973974 0 0.25 0 0 0 0 0 + -5.840176028724956 0 8.174456684291915 0 0.1259581289973974 0 -2.335238784564357 0 0 0 0 0 + -1.906792645167812 0 -1.547057811385124 0 4.12988801314935 0 -0.9260375565964145 0 0.25 0 0 0 + 3.337028151688726 0 1.547057811385124 0 -4.12988801314935 0 0.9260375565964145 0 -1.555235506520914 0 0 0 + -0.8212936292210076 0 0.3286103560686 0 0.6780018121020267 0 -0.3427792878628 0 -0.09253925108681904 0 0.25 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + + G[1] = + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 8.704562496216976 0 -8.704562496216976 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 3.911643102343875 0 -5.027157171582631 0 1.115514069238756 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 10.81860769913912 0 -14.98908526826783 0 0 0 4.170477569128713 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + -2.610471013041828 0 0 0 0 0 0 0 2.610471013041828 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + + Stored stages = 6 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.970446 + y_n = 0.970446 + Error = -2.09769e-11 + Steps = 1 + Fe evals = 6 + Fi evals = 11 + NLS iters = 5 + NLS fails = 0 + LS setups = 1 + LS Fi evals = 0 + Ji evals = 1 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_IMEX_MRI_GARK_EULER + nmat = 1 + stages = 3 + method order (q) = 1 + embedding order (p) = 0 + c = 0 1 1 + W[0] = + 0 0 0 + 1 0 0 + 0 0 0 + + G[0] = + 0 0 0 + 1 0 0 + -1 0 1 + + Stored stages = 2 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.970446 + y_n = 0.970445 + Error = 4.82806e-07 + Steps = 1 + Fe evals = 1 + Fi evals = 2 + NLS iters = 1 + NLS fails = 0 + LS setups = 1 + LS Fi evals = 0 + Ji evals = 1 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_IMEX_MRI_GARK_MIDPOINT + nmat = 1 + stages = 4 + method order (q) = 2 + embedding order (p) = 0 + c = 0 0.5 0.5 1 + W[0] = + 0 0 0 0 + 0.5 0 0 0 + 0 0 0 0 + -0.5 0 1 0 + + G[0] = + 0 0 0 0 + 0.5 0 0 0 + -0.5 0 0.5 0 + 0 0 0.5 0 + + Stored stages = 2 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.970446 + y_n = 0.970446 + Error = -8.01486e-07 + Steps = 1 + Fe evals = 2 + Fi evals = 3 + NLS iters = 1 + NLS fails = 0 + LS setups = 1 + LS Fi evals = 0 + Ji evals = 1 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_IMEX_MRI_GARK_TRAPEZOIDAL + nmat = 1 + stages = 4 + method order (q) = 2 + embedding order (p) = 0 + c = 0 1 1 1 + W[0] = + 0 0 0 0 + 1 0 0 0 + 0 0 0 0 + -0.5 0 0.5 0 + + G[0] = + 0 0 0 0 + 1 0 0 0 + -0.5 0 0.5 0 + 0 0 0 0 + + Stored stages = 2 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.970446 + y_n = 0.970447 + Error = -9.8759e-07 + Steps = 1 + Fe evals = 2 + Fi evals = 3 + NLS iters = 1 + NLS fails = 0 + LS setups = 1 + LS Fi evals = 0 + Ji evals = 1 + +Comparing Solver Statistics: +All checks passed + + +All tests passed! diff --git a/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_mri_1.out b/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_mri_1.out new file mode 100644 index 0000000000..5311a51fcd --- /dev/null +++ b/test/unit_tests/arkode/CXX_serial/ark_test_dahlquist_mri_1.out @@ -0,0 +1,706 @@ + +Dahlquist ODE test problem: + lambda expl = -1 + lambda impl = -1 + lambda fast = -1 + h slow = 0.01 + h fast = 0.01 + relative tol = 0.0001 + absolute tol = 1e-06 + interp type = Lagrange + +========================= +Test explicit MRI methods +========================= + +Testing method ARKODE_MIS_KW3 + nmat = 1 + stages = 4 + method order (q) = 3 + embedding order (p) = 0 + c = 0 0.3333333333333333 0.75 1 + W[0] = + 0 0 0 0 + 0.3333333333333333 0 0 0 + -0.5208333333333333 0.9375 0 0 + 0.3541666666666666 -0.6375 0.5333333333333333 0 + + Stored stages = 3 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.980199 + y_n = 0.980199 + Error = 1.86014e-09 + Steps = 1 + Fe evals = 3 + Fi evals = 0 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_MRI_GARK_ERK22a + nmat = 1 + stages = 3 + method order (q) = 2 + embedding order (p) = 0 + c = 0 0.5 1 + W[0] = + 0 0 0 + 0.5 0 0 + -0.5 1 0 + + Stored stages = 2 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.980199 + y_n = 0.980199 + Error = -4.95647e-07 + Steps = 1 + Fe evals = 2 + Fi evals = 0 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_MRI_GARK_ERK22b + nmat = 1 + stages = 3 + method order (q) = 2 + embedding order (p) = 0 + c = 0 1 1 + W[0] = + 0 0 0 + 1 0 0 + -0.5 0.5 0 + + Stored stages = 2 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.980199 + y_n = 0.980199 + Error = -4.95856e-07 + Steps = 1 + Fe evals = 2 + Fi evals = 0 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_MRI_GARK_ERK33a + nmat = 2 + stages = 4 + method order (q) = 3 + embedding order (p) = 0 + c = 0 0.3333333333333333 0.6666666666666666 1 + W[0] = + 0 0 0 0 + 0.3333333333333333 0 0 0 + -0.3333333333333333 0.6666666666666666 0 0 + 0 -0.6666666666666666 1 0 + + W[1] = + 0 0 0 0 + 0 0 0 0 + 0 0 0 0 + 0.5 0 -0.5 0 + + Stored stages = 3 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.980199 + y_n = 0.980199 + Error = 1.7757e-09 + Steps = 1 + Fe evals = 3 + Fi evals = 0 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_MRI_GARK_ERK45a + nmat = 2 + stages = 6 + method order (q) = 4 + embedding order (p) = 0 + c = 0 0.2 0.4 0.6 0.8 1 + W[0] = + 0 0 0 0 0 0 + 0.2 0 0 0 0 0 + -3.3125 3.5125 0 0 0 0 + -0.5121234603937985 1.955496920787597 -1.243373460393798 0 0 0 + -0.1068927211587161 -4.656693056981116 3.994968532757531 0.9686172453823019 0 0 + 0.911960843690752 -0.1837327083772207 -1.193926866090864 -2.611983006811319 3.277681737588653 0 + + W[1] = + 0 0 0 0 0 0 + 0 0 0 0 0 0 + 6.2875 -6.2875 0 0 0 0 + -0.0382530792124029 0.6952561584248058 -0.6570030792124029 0 0 0 + 1.87616694642529 3.003768197383342 -3 -1.879935143808632 0 0 + -2.423803191489362 2 1 5 -5.576196808510638 0 + + Stored stages = 5 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.980199 + y_n = 0.980199 + Error = -5.3153e-12 + Steps = 1 + Fe evals = 5 + Fi evals = 0 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_MRI_GARK_FORWARD_EULER + nmat = 1 + stages = 2 + method order (q) = 1 + embedding order (p) = 0 + c = 0 1 + W[0] = + 0 0 + 1 0 + + Stored stages = 1 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.980199 + y_n = 0.9801 + Error = 9.90058e-05 + Steps = 1 + Fe evals = 1 + Fi evals = 0 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_MRI_GARK_RALSTON2 + nmat = 1 + stages = 3 + method order (q) = 2 + embedding order (p) = 0 + c = 0 0.6666666666666666 1 + W[0] = + 0 0 0 + 0.6666666666666666 0 0 + -0.4166666666666666 0.75 0 + + Stored stages = 2 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.980199 + y_n = 0.980199 + Error = -4.9567e-07 + Steps = 1 + Fe evals = 2 + Fi evals = 0 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_MRI_GARK_RALSTON3 + nmat = 2 + stages = 4 + method order (q) = 3 + embedding order (p) = 0 + c = 0 0.5 0.75 1 + W[0] = + 0 0 0 0 + 0.5 0 0 0 + -2.75 3 0 0 + 1.305555555555556 -0.1666666666666667 -0.8888888888888888 0 + + W[1] = + 0 0 0 0 + 0 0 0 0 + 4.5 -4.5 0 0 + -2.166666666666667 -0.5 2.666666666666667 0 + + Stored stages = 3 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.980199 + y_n = 0.980199 + Error = 1.72143e-09 + Steps = 1 + Fe evals = 3 + Fi evals = 0 + +Comparing Solver Statistics: +All checks passed + +========================= +Test implicit MRI methods +========================= + +Testing method ARKODE_MRI_GARK_BACKWARD_EULER + nmat = 1 + stages = 3 + method order (q) = 1 + embedding order (p) = 0 + c = 0 1 1 + G[0] = + 0 0 0 + 1 0 0 + -1 0 1 + + Stored stages = 2 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.980199 + y_n = 0.980297 + Error = -9.80272e-05 + Steps = 1 + Fe evals = 0 + Fi evals = 2 + NLS iters = 1 + NLS fails = 0 + LS setups = 1 + LS Fi evals = 0 + Ji evals = 1 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_MRI_GARK_ESDIRK34a + nmat = 1 + stages = 7 + method order (q) = 3 + embedding order (p) = 0 + c = 0 0.3333333333333333 0.3333333333333333 0.6666666666666666 0.6666666666666666 1 1 + G[0] = + 0 0 0 0 0 0 0 + 0.3333333333333333 0 0 0 0 0 0 + -0.435866521508459 0 0.435866521508459 0 0 0 0 + -0.3045790611944505 0 0.6379123945277838 0 0 0 0 + 0.2116913105640267 0 -0.6475578320724856 0 0.435866521508459 0 0 + 0.4454209388055495 0 0.8813784805616198 0 -0.993466086033836 0 0 + -0.435866521508459 0 0 0 0 0 0.435866521508459 + + Stored stages = 4 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.980199 + y_n = 0.980199 + Error = 1.40689e-10 + Steps = 1 + Fe evals = 0 + Fi evals = 6 + NLS iters = 3 + NLS fails = 0 + LS setups = 1 + LS Fi evals = 0 + Ji evals = 1 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_MRI_GARK_ESDIRK46a + nmat = 2 + stages = 11 + method order (q) = 4 + embedding order (p) = 0 + c = 0 0.2 0.2 0.4 0.4 0.6 0.6 0.8 0.8 1 1 + G[0] = + 0 0 0 0 0 0 0 0 0 0 0 + 0.2 0 0 0 0 0 0 0 0 0 0 + -0.25 0 0.25 0 0 0 0 0 0 0 0 + 0.9179311933794375 0 -0.7179311933794374 0 0 0 0 0 0 0 0 + 2.643172353961828 0 -2.893172353961828 0 0.25 0 0 0 0 0 0 + 0.501564151341775 0 0.06834736723773695 0 -0.369911518579512 0 0 0 0 0 0 + 4.342116951031425 0 0.03897604588394062 0 -4.631092996915365 0 0.25 0 0 0 0 + -1.690014953911908 0 0.7232372452056922 0 1.84784916447243 0 -0.681071455766214 0 0 0 0 + 3.315267994849762 0 1.086235127654301 0 -1.202424037428737 0 -3.449079085075326 0 0.25 0 0 + -1.563558636602688 0 1.020883954835773 0 2.489384426659126 0 -0.1865282766779755 0 -1.560181468214235 0 0 + 0.19 0 -0.2433333333333333 0 0.4233333333333333 0 0.4233333333333333 0 -1.043333333333333 0 0.25 + + G[1] = + 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 + -1.735862386758875 0 1.735862386758875 0 0 0 0 0 0 0 0 + -5.82844997108155 0 5.82844997108155 0 0 0 0 0 0 0 0 + -0.4610230395256553 0 -0.9787999976333687 0 1.439823037159024 0 0 0 0 0 0 + -7.403989721900906 0 0.06115468960863698 0 7.342835032292269 0 0 0 0 0 0 + 2.099785727661873 0 -1.585581271787903 0 -2.976347367406398 0 2.462142911532428 0 0 0 0 + -5.523652150637583 0 -1.829811152193671 0 1.834216697306453 0 5.519246605524801 0 0 0 0 + 2.020233434143436 0 -2.384427012786476 0 -4.40813747576723 0 0.1519681179818014 0 4.62036293642847 0 0 + 0.12 0 -0.09666666666666666 0 0.2366666666666667 0 0.2366666666666667 0 -0.4966666666666666 0 0 + + Stored stages = 6 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.980199 + y_n = 0.980199 + Error = 1.36036e-12 + Steps = 1 + Fe evals = 0 + Fi evals = 10 + NLS iters = 5 + NLS fails = 0 + LS setups = 1 + LS Fi evals = 0 + Ji evals = 1 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_MRI_GARK_IMPLICIT_MIDPOINT + nmat = 1 + stages = 4 + method order (q) = 2 + embedding order (p) = 0 + c = 0 0.5 0.5 1 + G[0] = + 0 0 0 0 + 0.5 0 0 0 + -0.5 0 0.5 0 + 0 0 0.5 0 + + Stored stages = 2 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.980199 + y_n = 0.980199 + Error = 1.2304e-07 + Steps = 1 + Fe evals = 0 + Fi evals = 3 + NLS iters = 1 + NLS fails = 0 + LS setups = 1 + LS Fi evals = 0 + Ji evals = 1 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_MRI_GARK_IRK21a + nmat = 1 + stages = 3 + method order (q) = 2 + embedding order (p) = 0 + c = 0 1 1 + G[0] = + 0 0 0 + 1 0 0 + -0.5 0 0.5 + + Stored stages = 2 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.980199 + y_n = 0.980199 + Error = -8.22598e-10 + Steps = 1 + Fe evals = 0 + Fi evals = 2 + NLS iters = 1 + NLS fails = 0 + LS setups = 1 + LS Fi evals = 0 + Ji evals = 1 + +Comparing Solver Statistics: +All checks passed + +===================== +Test IMEX MRI methods +===================== + +Testing method ARKODE_IMEX_MRI_GARK3a + nmat = 1 + stages = 8 + method order (q) = 3 + embedding order (p) = 0 + c = 0 0.435866521508459 0.435866521508459 0.7179332607542295 0.7179332607542295 1 1 1 + W[0] = + 0 0 0 0 0 0 0 0 + 0.435866521508459 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 + -0.5688715801234401 0 0.8509383193692106 0 0 0 0 0 + 0.4542839446436089 0 -0.4542839446436089 0 0 0 0 0 + -0.4271371821005074 0 0.1562747733103381 0 0.5529291480359398 0 0 0 + 0 0 0 0 0 0 0 0 + 0.1058582960718796 0 0.6555675011400702 0 -1.197292318720409 0 0.435866521508459 0 + + G[0] = + 0 0 0 0 0 0 0 0 + 0.435866521508459 0 0 0 0 0 0 0 + -0.435866521508459 0 0.435866521508459 0 0 0 0 0 + -0.4103336962288525 0 0.692400435474623 0 0 0 0 0 + 0.4103336962288525 0 -0.8462002177373115 0 0.435866521508459 0 0 0 + 0.435866521508459 0 0.9264299099302395 0 -1.080229692192928 0 0 0 + -0.435866521508459 0 0 0 0 0 0.435866521508459 0 + 0 0 0 0 0 0 0 0 + + Stored stages = 4 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.970446 + y_n = 0.970446 + Error = 2.79396e-10 + Steps = 1 + Fe evals = 4 + Fi evals = 7 + NLS iters = 3 + NLS fails = 0 + LS setups = 1 + LS Fi evals = 0 + Ji evals = 1 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_IMEX_MRI_GARK3b + nmat = 1 + stages = 8 + method order (q) = 3 + embedding order (p) = 0 + c = 0 0.435866521508459 0.435866521508459 0.7179332607542295 0.7179332607542295 1 1 1 + W[0] = + 0 0 0 0 0 0 0 0 + 0.435866521508459 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 + -0.1750145285570468 0 0.4570812678028173 0 0 0 0 0 + 0.06042689307721552 0 -0.06042689307721552 0 0 0 0 0 + 0.1195213959425454 0 -1.843725226689662 0 2.006270569992887 0 0 0 + -0.5466585780430528 0 2 0 -1.453341421956947 0 0 0 + 0.1058582960718796 0 0.6555675011400702 0 -1.197292318720409 0 0.435866521508459 0 + + G[0] = + 0 0 0 0 0 0 0 0 + 0.435866521508459 0 0 0 0 0 0 0 + -0.435866521508459 0 0.435866521508459 0 0 0 0 0 + 0.04142737535644148 0 0.240639363889329 0 0 0 0 0 + -0.04142737535644148 0 -0.3944391461520175 0 0.435866521508459 0 0 0 + 0.1123373143006048 0 1.051807513648115 0 -0.8820780887029493 0 0 0 + -0.1123373143006048 0 -0.1253776037178755 0 -0.1981516034899788 0 0.435866521508459 0 + 0 0 0 0 0 0 0 0 + + Stored stages = 4 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.970446 + y_n = 0.970446 + Error = -3.9875e-09 + Steps = 1 + Fe evals = 4 + Fi evals = 7 + NLS iters = 3 + NLS fails = 0 + LS setups = 1 + LS Fi evals = 0 + Ji evals = 1 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_IMEX_MRI_GARK4 + nmat = 2 + stages = 12 + method order (q) = 4 + embedding order (p) = 0 + c = 0 0.5 0.5 0.625 0.625 0.75 0.75 0.875 0.875 1 1 1 + W[0] = + 0 0 0 0 0 0 0 0 0 0 0 0 + 0.5 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + -1.917165343636629 0 2.042165343636629 0 0 0 0 0 0 0 0 0 + -0.4047510318011059 0 0.4047510318011059 0 0 0 0 0 0 0 0 0 + 11.45146602249222 0 -30.21075747526504 0 18.88429145277282 0 0 0 0 0 0 0 + -0.7090335647602615 0 1.030307208587519 0 -0.3212736438272573 0 0 0 0 0 0 0 + -29.99548716455828 0 37.6059827749918 0 0.3212736438272573 0 -7.806769254260774 0 0 0 0 0 + 3.104665054272962 0 -2.430325019757162 0 -1.905479301151525 0 1.231139266635725 0 0 0 0 0 + -2.424429547752048 0 2.430325019757162 0 1.905479301151525 0 -1.231139266635725 0 -0.5552355065209142 0 0 0 + -0.01044135044479749 0 0.07260303614655074 0 -0.1288275951677261 0 0.1129355350093824 0 -0.04626962554340952 0 0 0 + -0.8108522787762101 0 0.2560073199220492 0 0.8068294072697528 0 -0.4557148228721824 0 -0.04626962554340952 0 0.25 0 + + W[1] = + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 4.084330687273257 0 -4.084330687273257 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + -21.84342998138222 0 59.61201288692787 0 -37.76858290554565 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 61.65904145863709 0 -77.27257996715863 0 0 0 15.61353850852155 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + -1.110471013041828 0 0 0 0 0 0 0 1.110471013041828 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + + G[0] = + 0 0 0 0 0 0 0 0 0 0 0 0 + 0.5 0 0 0 0 0 0 0 0 0 0 0 + -0.25 0 0.25 0 0 0 0 0 0 0 0 0 + -3.977281248108488 0 4.102281248108488 0 0 0 0 0 0 0 0 0 + -0.06905388741401691 0 -0.1809461125859831 0 0.25 0 0 0 0 0 0 0 + -1.76176766375792 0 2.694524698377299 0 -0.8077570346193781 0 0 0 0 0 0 0 + 0.555872179155397 0 -0.6799140501579995 0 -0.1259581289973974 0 0.25 0 0 0 0 0 + -5.840176028724956 0 8.174456684291915 0 0.1259581289973974 0 -2.335238784564357 0 0 0 0 0 + -1.906792645167812 0 -1.547057811385124 0 4.12988801314935 0 -0.9260375565964145 0 0.25 0 0 0 + 3.337028151688726 0 1.547057811385124 0 -4.12988801314935 0 0.9260375565964145 0 -1.555235506520914 0 0 0 + -0.8212936292210076 0 0.3286103560686 0 0.6780018121020267 0 -0.3427792878628 0 -0.09253925108681904 0 0.25 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + + G[1] = + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 8.704562496216976 0 -8.704562496216976 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 3.911643102343875 0 -5.027157171582631 0 1.115514069238756 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 10.81860769913912 0 -14.98908526826783 0 0 0 4.170477569128713 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + -2.610471013041828 0 0 0 0 0 0 0 2.610471013041828 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + + Stored stages = 6 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.970446 + y_n = 0.970446 + Error = -2.09769e-11 + Steps = 1 + Fe evals = 6 + Fi evals = 11 + NLS iters = 5 + NLS fails = 0 + LS setups = 1 + LS Fi evals = 0 + Ji evals = 1 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_IMEX_MRI_GARK_EULER + nmat = 1 + stages = 3 + method order (q) = 1 + embedding order (p) = 0 + c = 0 1 1 + W[0] = + 0 0 0 + 1 0 0 + 0 0 0 + + G[0] = + 0 0 0 + 1 0 0 + -1 0 1 + + Stored stages = 2 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.970446 + y_n = 0.970445 + Error = 4.82806e-07 + Steps = 1 + Fe evals = 1 + Fi evals = 2 + NLS iters = 1 + NLS fails = 0 + LS setups = 1 + LS Fi evals = 0 + Ji evals = 1 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_IMEX_MRI_GARK_MIDPOINT + nmat = 1 + stages = 4 + method order (q) = 2 + embedding order (p) = 0 + c = 0 0.5 0.5 1 + W[0] = + 0 0 0 0 + 0.5 0 0 0 + 0 0 0 0 + -0.5 0 1 0 + + G[0] = + 0 0 0 0 + 0.5 0 0 0 + -0.5 0 0.5 0 + 0 0 0.5 0 + + Stored stages = 2 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.970446 + y_n = 0.970446 + Error = -8.01486e-07 + Steps = 1 + Fe evals = 2 + Fi evals = 3 + NLS iters = 1 + NLS fails = 0 + LS setups = 1 + LS Fi evals = 0 + Ji evals = 1 + +Comparing Solver Statistics: +All checks passed + +Testing method ARKODE_IMEX_MRI_GARK_TRAPEZOIDAL + nmat = 1 + stages = 4 + method order (q) = 2 + embedding order (p) = 0 + c = 0 1 1 1 + W[0] = + 0 0 0 0 + 1 0 0 0 + 0 0 0 0 + -0.5 0 0.5 0 + + G[0] = + 0 0 0 0 + 1 0 0 0 + -0.5 0 0.5 0 + 0 0 0 0 + + Stored stages = 2 + +MRIStep Statistics: + Time = 0.01 + y(t) = 0.970446 + y_n = 0.970447 + Error = -9.8759e-07 + Steps = 1 + Fe evals = 2 + Fi evals = 3 + NLS iters = 1 + NLS fails = 0 + LS setups = 1 + LS Fi evals = 0 + Ji evals = 1 + +Comparing Solver Statistics: +All checks passed + + +All tests passed! From 5811b5cc0cb3395527754ca96d3d12a16d71da7b Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 12 May 2024 08:39:44 -0700 Subject: [PATCH 11/18] update answers submodule --- test/answers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/answers b/test/answers index 39e5dd9cc0..682e0c8fe8 160000 --- a/test/answers +++ b/test/answers @@ -1 +1 @@ -Subproject commit 39e5dd9cc0f76efb81409ebba57b1db6dcc8db50 +Subproject commit 682e0c8fe88dad174cb595edc46731005b826656 From e29fe496ccef3d80aaddf9d0d1b7b9e475c1ea71 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 12 May 2024 09:21:44 -0700 Subject: [PATCH 12/18] fix typo --- CHANGELOG.md | 4 ++-- doc/shared/RecentChanges.rst | 23 +++++++++++------------ 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cf62311a33..f7f84884e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,8 +36,8 @@ Added the following MRI coupling tables * `ARKODE_IMEX_MRI_GARK_MIDPOINT` Users may now disable interpolated output in ARKODE by passing `ARK_INTERP_NONE` -to the `ARKodeSetInterpolantType`. When interpolation is disabled, rootfinding -is not supported, implicit methods must use the trivial predictor (the default +to `ARKodeSetInterpolantType`. When interpolation is disabled, rootfinding is +not supported, implicit methods must use the trivial predictor (the default option), and interpolation at stop times cannot be used (interpolating at stop times is disabled by default). With interpolation disabled, calling `ARKodeEvolve` in `ARK_NORMAL` mode will return at or past the requested output diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index 1f1160a39f..cd12404033 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -33,18 +33,17 @@ Added the following MRI coupling tables * ``ARKODE_IMEX_MRI_GARK_MIDPOINT`` Users may now disable interpolated output in ARKODE by passing -``ARK_INTERP_NONE`` to the :c:func:`ARKodeSetInterpolantType`. When -interpolation is disabled, rootfinding is not supported, implicit methods must -use the trivial predictor (the default option), and interpolation at stop times -cannot be used (interpolating at stop times is disabled by default). With -interpolation disabled, calling :c:func:`ARKodeEvolve` in ``ARK_NORMAL`` mode -will return at or past the requested output time (setting a stop time may still -be used to halt the integrator at a specific time). Disabling interpolation will -reduce the memory footprint of an integrator by two or more state vectors -(depending on the interpolant type and degree) which can be beneficial when -interpolation is not needed e.g., when integrating to a final time without -output in between or using an explicit fast time scale integrator with an MRI -method. +``ARK_INTERP_NONE`` to :c:func:`ARKodeSetInterpolantType`. When interpolation is +disabled, rootfinding is not supported, implicit methods must use the trivial +predictor (the default option), and interpolation at stop times cannot be used +(interpolating at stop times is disabled by default). With interpolation +disabled, calling :c:func:`ARKodeEvolve` in ``ARK_NORMAL`` mode will return at +or past the requested output time (setting a stop time may still be used to halt +the integrator at a specific time). Disabling interpolation will reduce the +memory footprint of an integrator by two or more state vectors (depending on the +interpolant type and degree) which can be beneficial when interpolation is not +needed e.g., when integrating to a final time without output in between or using +an explicit fast time scale integrator with an MRI method. Added "Resize" capability to ARKODE's SPRKStep time-stepping module. From d4e4a644df192e0db65caa461ebbf5337b9072fc Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 12 May 2024 09:22:08 -0700 Subject: [PATCH 13/18] move shared upates outside conditional --- src/arkode/arkode.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/arkode/arkode.c b/src/arkode/arkode.c index 01f299429b..6885921424 100644 --- a/src/arkode/arkode.c +++ b/src/arkode/arkode.c @@ -1062,18 +1062,15 @@ int ARKodeEvolve(void* arkode_mem, sunrealtype tout, N_Vector yout, break; } ark_mem->tretlast = *tret = tout; - ark_mem->next_h = ark_mem->hprime; - istate = ARK_SUCCESS; - break; } else { N_VScale(ONE, ark_mem->yn, yout); ark_mem->tretlast = *tret = ark_mem->tcur; - ark_mem->next_h = ark_mem->hprime; - istate = ARK_SUCCESS; - break; } + ark_mem->next_h = ark_mem->hprime; + istate = ARK_SUCCESS; + break; } /* In ONE_STEP mode, copy y and exit loop */ From 6e0cad2af3693c6e452bb6f93867e9326e8fc693 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Sun, 12 May 2024 09:30:16 -0700 Subject: [PATCH 14/18] single quotes in markdown --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7f84884e2..44adec3f08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -91,7 +91,7 @@ allocated. Numerous ARKODE stepper-specific functions are now deprecated in favor of ARKODE-wide functions. -Deprecated ``ARKStepSetOptimalParams`` function. This functions does not have an +Deprecated `ARKStepSetOptimalParams` function. This functions does not have an ARKODE-wide equivalent, instructions have been added to the user guide for how to retain the current functionality using other user-callable functions. From d8aca4ff9f1fe8c69627c06d23d8edb901fb2587 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Mon, 20 May 2024 09:46:44 -0700 Subject: [PATCH 15/18] fix merge --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2621533b25..e530918a78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Changes to SUNDIALS in release X.Y.Z +### Major Features + Created shared user interface functions for ARKODE to allow more uniform control over time-stepping algorithms, improved extensibility, and simplified code maintenance. The corresponding stepper-specific user-callable functions are now From 6c9582ed56286bbc82810b76ce6fca5f531d237f Mon Sep 17 00:00:00 2001 From: David Gardner Date: Tue, 21 May 2024 06:34:48 -0700 Subject: [PATCH 16/18] Apply suggestions from code review Co-authored-by: Cody Balos --- doc/arkode/guide/source/Usage/User_callable.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/arkode/guide/source/Usage/User_callable.rst b/doc/arkode/guide/source/Usage/User_callable.rst index f320ac206f..45360409d0 100644 --- a/doc/arkode/guide/source/Usage/User_callable.rst +++ b/doc/arkode/guide/source/Usage/User_callable.rst @@ -926,8 +926,8 @@ Set max number of constraint failures :c:func:`ARKodeSetMaxNumConstr .. c:function:: int ARKodeSetInterpolantType(void* arkode_mem, int itype) Specifies the interpolation type used for dense output (interpolation of - solution output values) and implicit method predictors. By default, the - Hermite interpolation is used expect with SPRK method where Lagrange + solution output values) and implicit method predictors. By default, + Hermite interpolation is used except with SPRK methods where Lagrange interpolation is the default. This routine must be called *after* the calling a stepper constructor. After From 1f0a093b2ce9330e06bff33e322f09f24ca756d3 Mon Sep 17 00:00:00 2001 From: David Gardner Date: Tue, 21 May 2024 07:37:46 -0700 Subject: [PATCH 17/18] Apply suggestions from code review Co-authored-by: Daniel R. Reynolds --- CHANGELOG.md | 2 +- doc/arkode/guide/source/Usage/User_callable.rst | 2 +- doc/shared/RecentChanges.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b1131898f2..6b1f819250 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -108,7 +108,7 @@ when using KLU. Numerous ARKODE stepper-specific functions are now deprecated in favor of ARKODE-wide functions. -Deprecated `ARKStepSetOptimalParams` function. This functions does not have an +Deprecated the `ARKStepSetOptimalParams` function. Since this function does not have an ARKODE-wide equivalent, instructions have been added to the user guide for how to retain the current functionality using other user-callable functions. diff --git a/doc/arkode/guide/source/Usage/User_callable.rst b/doc/arkode/guide/source/Usage/User_callable.rst index 45360409d0..718655dff1 100644 --- a/doc/arkode/guide/source/Usage/User_callable.rst +++ b/doc/arkode/guide/source/Usage/User_callable.rst @@ -940,7 +940,7 @@ Set max number of constraint failures :c:func:`ARKodeSetMaxNumConstr :numref:`ARKODE.Mathematics.Interpolation.Lagrange`. ``ARK_INTERP_NONE`` will disable interpolation. - When interpolation is disabled using, rootfinding is not supported, implicit + When interpolation is disabled, using rootfinding is not supported, implicit methods must use the trivial predictor (the default option), and interpolation at stop times cannot be used (interpolating at stop times is disabled by default). With interpolation disabled, calling diff --git a/doc/shared/RecentChanges.rst b/doc/shared/RecentChanges.rst index 356f6f5a42..690e4b36e2 100644 --- a/doc/shared/RecentChanges.rst +++ b/doc/shared/RecentChanges.rst @@ -106,6 +106,6 @@ when using KLU. Numerous ARKODE stepper-specific functions are now deprecated in favor of ARKODE-wide functions. -Deprecated ``ARKStepSetOptimalParams`` function. This functions does not have an +Deprecated the `ARKStepSetOptimalParams` function. Since this function does not have an ARKODE-wide equivalent, instructions have been added to the user guide for how to retain the current functionality using other user-callable functions. From 47e16b2267abf378970ecd7842a878f548f792c6 Mon Sep 17 00:00:00 2001 From: "David J. Gardner" Date: Tue, 21 May 2024 07:46:15 -0700 Subject: [PATCH 18/18] update input checks and comments in SetDegree --- src/arkode/arkode_interp.c | 36 ++++++------------------------------ 1 file changed, 6 insertions(+), 30 deletions(-) diff --git a/src/arkode/arkode_interp.c b/src/arkode/arkode_interp.c index 9ed3c38b05..daf42de479 100644 --- a/src/arkode/arkode_interp.c +++ b/src/arkode/arkode_interp.c @@ -291,18 +291,8 @@ void arkInterpPrintMem_Hermite(ARKInterp interp, FILE* outfile) /*--------------------------------------------------------------- arkInterpSetDegree_Hermite - This routine sets a supplied interpolation degree. If the - argument is positive, then we require that - 0 <= degree <= ARK_INTERP_MAX_DEGREE - and use this value as the user-specified (or default) degree. - - If the argument is negative, then we assume that this has been - called by a time-step module to limit the interpolant degree - based on the temporal method order. In this case we set the - Hermite polynomial degree to be the minimum of (-degree), - ARK_INTERP_MAX_DEGREE, and the previously-set value [i.e., in - case the user has already specified use of a lower-degree - polynomial]. + This routine sets a supplied interpolation degree which must be + in the range 0 <= degree <= ARK_INTERP_MAX_DEGREE. Return values: ARK_ILL_INPUT -- if the input is outside of allowable bounds @@ -312,15 +302,13 @@ void arkInterpPrintMem_Hermite(ARKInterp interp, FILE* outfile) ---------------------------------------------------------------*/ int arkInterpSetDegree_Hermite(ARKodeMem ark_mem, ARKInterp interp, int degree) { - if (degree > ARK_INTERP_MAX_DEGREE) + if (degree > ARK_INTERP_MAX_DEGREE || degree < 0) { arkProcessError(ark_mem, ARK_INTERP_FAIL, __LINE__, __func__, __FILE__, "Illegal degree specified."); return ARK_ILL_INPUT; } - if (degree < 0) { degree = ARK_INTERP_MAX_DEGREE; } - HINT_DEGREE(interp) = degree; return ARK_SUCCESS; @@ -1005,18 +993,8 @@ void arkInterpPrintMem_Lagrange(ARKInterp I, FILE* outfile) /*--------------------------------------------------------------- arkInterpSetDegree_Lagrange - This routine sets a supplied interpolation degree. If the - argument is positive, then we require that - 0 <= degree <= ARK_INTERP_MAX_DEGREE - and use this value as the user-specified (or default) degree. - - If the argument is negative, then we assume that this has been - called by a time-step module to limit the interpolant degree - based on the temporal method order. In this case we set the - Lagrange polynomial degree to be the minimum of (-degree), - ARK_INTERP_MAX_DEGREE, and the previously-set value [i.e., in - case the user has already specified use of a lower-degree - polynomial]. + This routine sets a supplied interpolation degree which must be + in the range 0 <= degree <= ARK_INTERP_MAX_DEGREE. Return values: ARK_ILL_INPUT -- if the input is outside of allowable bounds @@ -1026,15 +1004,13 @@ void arkInterpPrintMem_Lagrange(ARKInterp I, FILE* outfile) ---------------------------------------------------------------*/ int arkInterpSetDegree_Lagrange(ARKodeMem ark_mem, ARKInterp I, int degree) { - if (degree > ARK_INTERP_MAX_DEGREE) + if (degree > ARK_INTERP_MAX_DEGREE || degree < 0) { arkProcessError(ark_mem, ARK_INTERP_FAIL, __LINE__, __func__, __FILE__, "Illegal degree specified."); return ARK_ILL_INPUT; } - if (degree < 0) { degree = ARK_INTERP_MAX_DEGREE; } - LINT_NMAX(I) = degree + 1; return ARK_SUCCESS;