Skip to content

Commit

Permalink
Bugfix: Support ARK2-3-1-2 in ARKStepSetTableNum (#346)
Browse files Browse the repository at this point in the history
Update ARKStepSetTableNum to recognize ARK2-3-1-2 as a valid ARK pair.
  • Loading branch information
drreynolds authored and gardner48 committed Dec 18, 2023
1 parent 0facbe5 commit f01c0aa
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

## Changes to SUNDIALS in release X.X.X

Fixed a bug in `ARKStepSetTableNum` wherein it did not recognize `ARKODE_ARK2_ERK_3_1_2` and
`ARKODE_ARK2_DIRK_3_1_2` as a valid additive Runge--Kutta Butcher table pair.

Renamed some internal types in CVODES and IDAS to allow both packages to be built together in the same binary.

Improved computational complexity of `SUNMatScaleAddI_Sparse` from `O(M*N)` to
Expand Down
4 changes: 4 additions & 0 deletions doc/arkode/guide/source/Introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ Changes from previous versions
Changes in vX.X.X
-----------------

Fixed a bug in :c:func:`ARKStepSetTableNum` wherein it did not recognize
`ARKODE_ARK2_ERK_3_1_2` and `ARKODE_ARK2_DIRK_3_1_2` as a valid additive
Runge--Kutta Butcher table pair.

Improved computational complexity of ``SUNMatScaleAddI_Sparse`` from ``O(M*N)`` to
``O(NNZ)``.

Expand Down
3 changes: 2 additions & 1 deletion src/arkode/arkode_arkstep_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,8 @@ int ARKStepSetTableNum(void *arkode_mem, ARKODE_DIRKTableID itable, ARKODE_ERKTa
!((etable == ARKODE_ARK436L2SA_ERK_6_3_4) && (itable == ARKODE_ARK436L2SA_DIRK_6_3_4)) &&
!((etable == ARKODE_ARK437L2SA_ERK_7_3_4) && (itable == ARKODE_ARK437L2SA_DIRK_7_3_4)) &&
!((etable == ARKODE_ARK548L2SA_ERK_8_4_5) && (itable == ARKODE_ARK548L2SA_DIRK_8_4_5)) &&
!((etable == ARKODE_ARK548L2SAb_ERK_8_4_5) && (itable == ARKODE_ARK548L2SAb_DIRK_8_4_5)) ) {
!((etable == ARKODE_ARK548L2SAb_ERK_8_4_5) && (itable == ARKODE_ARK548L2SAb_DIRK_8_4_5)) &&
!((etable == ARKODE_ARK2_ERK_3_1_2) && (itable == ARKODE_ARK2_DIRK_3_1_2)) ) {
arkProcessError(ark_mem, ARK_ILL_INPUT, "ARKODE::ARKStep",
"ARKStepSetTableNum",
"Incompatible Butcher tables for ARK method");
Expand Down

0 comments on commit f01c0aa

Please sign in to comment.