Skip to content

Commit

Permalink
Merge branch 'feature/min-err' into feautre/adapt-opt
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven-Roberts committed Feb 14, 2025
2 parents 0292f28 + f09a521 commit 6c926c9
Show file tree
Hide file tree
Showing 229 changed files with 19,440 additions and 20,210 deletions.
10 changes: 6 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@

### New Features and Enhancements

Added new temporal adaptivity controller utility constructors,
`SUNAdaptController_H0211`, `SUNAdaptController_H211`, and
`SUNAdaptController_H312`.

Added the `ARKODE_RALSTON_3_1_2` and `ARKODE_TSITOURAS_7_4_5` explicit
Runge-Kutta Butcher tables.

Expand All @@ -31,6 +27,12 @@ Improved the efficiency of default ARKODE methods with the following changes:

### Bug Fixes

Removed error floors from the `SUNAdaptController` implementations which could
unnecessarily limit the time size growth, particularly after the first step.

On the first two time steps, the Soderlind controller uses an I controller
instead of omitting unavailable terms.

Fixed bug in `ARKodeSetFixedStep` where it could return `ARK_SUCCESS` despite
an error occurring.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ nonlinear algebraic systems:

* ARKODE - for integrating stiff, nonstiff, and multirate ODEs of the form

$$M(t) \\, y' = f_1(t,y) + f_2(t,y), \quad y(t_0) = y_0$$
$$M(t) y' = f_1(t,y) + f_2(t,y), \quad y(t_0) = y_0$$

* CVODE - for integrating stiff and nonstiff ODEs of the form

Expand Down
2 changes: 1 addition & 1 deletion doc/arkode/guide/source/Butcher.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2283,7 +2283,7 @@ and the default 5th order method.
Accessible via the constant (or string) ``ARKODE_SPRK_YOSHIDA_6_8`` to
:c:func:`ARKodeSPRKTable_Load` or :c:func:`ARKodeSPRKTable_LoadByName`.
This is the 6th order method given by Yoshida in :cite:p:`Yoshida:90`
and the 6th order method.
and the default 6th order method.


.. c:enumerator:: ARKODE_SPRK_SUZUKI_UMENO_8_16
Expand Down
19 changes: 19 additions & 0 deletions doc/arkode/guide/source/Constants.rst
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,25 @@ contains the ARKODE output constants.
+-----------------------------------------------+------------------------------------------------------------+
| | |
+-----------------------------------------------+------------------------------------------------------------+
| **Default ImEx Butcher tables** | |
+-----------------------------------------------+------------------------------------------------------------+
| :index:`ARKSTEP_DEFAULT_ARK_ETABLE_2` & | Use ARKStep's default second-order ARK method |
| :index:`ARKSTEP_DEFAULT_ARK_ITABLE_2` | (ARKODE_ARK2_ERK_3_1_2 and ARKODE_ARK2_DIRK_3_1_2). |
+-----------------------------------------------+------------------------------------------------------------+
| :index:`ARKSTEP_DEFAULT_ARK_ETABLE_3` & | Use ARKStep's default third-order ARK method |
| :index:`ARKSTEP_DEFAULT_ARK_ITABLE_3` | (ARKODE_ARK324L2SA_ERK_4_2_3 and |
| | ARKODE_ARK324L2SA_DIRK_4_2_3). |
+-----------------------------------------------+------------------------------------------------------------+
| :index:`ARKSTEP_DEFAULT_ARK_ETABLE_4` & | Use ARKStep's default fourth-order ARK method |
| :index:`ARKSTEP_DEFAULT_ARK_ITABLE_4` | (ARKODE_ARK436L2SA_ERK_6_3_4 and |
| | ARKODE_ARK436L2SA_DIRK_6_3_4). |
+-----------------------------------------------+------------------------------------------------------------+
| :index:`ARKSTEP_DEFAULT_ARK_ETABLE_5` & | Use ARKStep's default fifth-order ARK method |
| :index:`ARKSTEP_DEFAULT_ARK_ITABLE_5` | (ARKODE_ARK548L2SA_ERK_8_4_5 and |
| | ARKODE_ARK548L2SA_DIRK_8_4_5). |
+-----------------------------------------------+------------------------------------------------------------+
| | |
+-----------------------------------------------+------------------------------------------------------------+
| **LSRK method types** | |
+-----------------------------------------------+------------------------------------------------------------+
| :index:`ARKODE_LSRK_RKC_2` | 2nd order Runge-Kutta-Chebyshev (RKC) method |
Expand Down
11 changes: 7 additions & 4 deletions doc/shared/RecentChanges.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

**New Features and Enhancements**

Added new temporal adaptivity controller utility constructors,
``SUNAdaptController_H0211``, ``SUNAdaptController_H211``, and
``SUNAdaptController_H312``.

Added the ``ARKODE_RALSTON_3_1_2`` and ``ARKODE_TSITOURAS_7_4_5`` explicit
Runge-Kutta Butcher tables.

Expand Down Expand Up @@ -41,6 +37,13 @@ Improved the efficiency of default ARKODE methods with the following changes:

**Bug Fixes**

Removed error floors from the :c:type:`SUNAdaptController` implementations
which could unnecessarily limit the time size growth, particularly after the
first step.

On the first two time steps, the Soderlind controller uses an I controller
instead of omitting unavailable terms.

Fixed bug in :c:func:`ARKodeSetFixedStep` where it could return ``ARK_SUCCESS``
despite an error occurring.

Expand Down
2 changes: 1 addition & 1 deletion doc/shared/nvectors/NVector_Operations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ operation, we give the name, usage of the function, and a description
of its mathematical operations below.


.. c:function:: SUNErrCode N_VLinearSumVectorArray(int nv, sunrealtype a, N_Vector X, sunrealtype b, N_Vector* Y, N_Vector* Z)
.. c:function:: SUNErrCode N_VLinearSumVectorArray(int nv, sunrealtype a, N_Vector* X, sunrealtype b, N_Vector* Y, N_Vector* Z)
This routine computes the linear sum of two vector arrays of *nv* vectors with :math:`n` elements:
Expand Down
32 changes: 16 additions & 16 deletions examples/arkode/CXX_manyvector/ark_sod_lsrk.out
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ Problem parameters and options:
t ||rho|| ||mx|| ||my|| ||mz|| ||et||
--------------------------------------------------------------------------
0.00e+00 7.12610e-01 0.00000e+00 0.00000e+00 0.00000e+00 1.77658e+00
1.00e-02 7.09460e-01 5.28096e-02 0.00000e+00 0.00000e+00 1.76732e+00
2.00e-02 7.06459e-01 7.61804e-02 0.00000e+00 0.00000e+00 1.75863e+00
3.00e-02 7.03444e-01 9.39395e-02 0.00000e+00 0.00000e+00 1.74990e+00
1.00e-02 7.09460e-01 5.28085e-02 0.00000e+00 0.00000e+00 1.76732e+00
2.00e-02 7.06459e-01 7.61805e-02 0.00000e+00 0.00000e+00 1.75863e+00
3.00e-02 7.03444e-01 9.39390e-02 0.00000e+00 0.00000e+00 1.74990e+00
4.00e-02 7.00418e-01 1.08850e-01 0.00000e+00 0.00000e+00 1.74113e+00
5.00e-02 6.97379e-01 1.21955e-01 0.00000e+00 0.00000e+00 1.73232e+00
6.00e-02 6.94326e-01 1.33784e-01 0.00000e+00 0.00000e+00 1.72346e+00
Expand All @@ -33,16 +33,16 @@ Problem parameters and options:
--------------------------------------------------------------------------

Final integrator statistics:
Current time = 0.1
Steps = 382
Step attempts = 397
Stability limited steps = 0
Accuracy limited steps = 397
Error test fails = 15
NLS step fails = 0
Inequality constraint fails = 0
Initial step size = 1.12228425974954e-14
Last step size = 0.000233441607859208
Current step size = 0.000233441607859208
RHS fn evals = 3957
Number of stages used = 10
Current time = 0.1
Steps = 374
Step attempts = 391
Stability limited steps = 0
Accuracy limited steps = 391
Error test fails = 17
NLS step fails = 0
Inequality constraint fails = 0
Initial step size = 1.12228425974954e-14
Last step size = 8.26420296853591e-05
Current step size = 8.26420296853591e-05
RHS fn evals = 3895
Number of stages used = 10
Original file line number Diff line number Diff line change
Expand Up @@ -25,49 +25,49 @@ Output directory: .
t ||u||_rms ||v||_rms ||w||_rms
----------------------------------------------------
0.000000 1.060205 3.559930 3.059949
0.250000 1.134976 3.463307 3.499980
0.500000 1.251255 3.307480 3.499978
0.750000 1.421776 3.076173 3.499975
1.000000 1.617972 2.789695 3.499972
1.250000 1.738611 2.525641 3.499970
1.500000 1.724313 2.346645 3.499970
0.250000 1.134975 3.463308 3.499980
0.500000 1.251254 3.307483 3.499978
0.750000 1.421775 3.076175 3.499975
1.000000 1.617974 2.789694 3.499972
1.250000 1.738612 2.525640 3.499970
1.500000 1.724313 2.346644 3.499970
1.750000 1.609332 2.267405 3.499972
2.000000 1.441938 2.284790 3.499975
2.000000 1.441938 2.284789 3.499975
2.250000 1.254548 2.387110 3.499978
2.500000 1.067861 2.552978 3.499982
2.750000 0.894914 2.755797 3.499985
3.000000 0.742698 2.972707 3.499988
3.250000 0.614424 3.189681 3.499990
3.500000 0.511703 3.400292 3.499992
3.750000 0.435022 3.602349 3.499993
4.000000 0.382884 3.795611 3.499993
3.000000 0.742698 2.972706 3.499988
3.250000 0.614424 3.189680 3.499990
3.500000 0.511703 3.400291 3.499992
3.750000 0.435022 3.602348 3.499993
4.000000 0.382885 3.795610 3.499993
4.250000 0.351268 3.980789 3.499994
4.500000 0.334675 4.159066 3.499994
4.750000 0.327999 4.331676 3.499994
4.500000 0.334675 4.159065 3.499994
4.750000 0.327999 4.331675 3.499994
5.000000 0.327576 4.499585 3.499994
5.250000 0.331182 4.663357 3.499994
5.500000 0.337619 4.823164 3.499994
5.750000 0.346346 4.978846 3.499994
6.000000 0.357245 5.129937 3.499994
5.500000 0.337620 4.823164 3.499994
5.750000 0.346346 4.978845 3.499994
6.000000 0.357244 5.129937 3.499994
6.250000 0.370526 5.275660 3.499994
6.500000 0.386740 5.414810 3.499993
6.750000 0.406897 5.545549 3.499993
7.000000 0.432797 5.664942 3.499992
7.250000 0.467856 5.767888 3.499992
7.500000 0.519324 5.844481 3.499991
7.750000 0.605996 5.871569 3.499989
8.000000 0.797170 5.775343 3.499986
8.250000 1.629022 5.135025 3.499974
8.500000 3.774898 3.499505 3.499941
8.750000 4.025788 2.194933 3.499932
9.000000 3.877379 0.967603 3.499933
9.250000 3.148899 1.087229 3.499946
9.500000 2.471560 1.322866 3.499958
9.750000 1.912340 1.594916 3.499967
10.000000 1.450253 1.896162 3.499975
6.500000 0.386741 5.414808 3.499993
6.750000 0.406897 5.545550 3.499993
7.000000 0.432798 5.664941 3.499992
7.250000 0.467855 5.767889 3.499992
7.500000 0.519325 5.844479 3.499991
7.750000 0.605996 5.871568 3.499989
8.000000 0.797169 5.775343 3.499986
8.250000 1.629015 5.135030 3.499974
8.500000 3.774895 3.499509 3.499941
8.750000 4.025789 2.194934 3.499932
9.000000 3.877381 0.967603 3.499933
9.250000 3.148900 1.087229 3.499946
9.500000 2.471561 1.322865 3.499958
9.750000 1.912340 1.594915 3.499967
10.000000 1.450254 1.896163 3.499975

Final Solver Statistics (for processor 0):
Internal solver steps = 482 (attempted = 482)
Total RHS evals: Fe = 1931, Fi = 5936
Total number of error test failures = 0
Internal solver steps = 481 (attempted = 483)
Total RHS evals: Fe = 1933, Fi = 5951
Total number of error test failures = 2
Total number of nonlinear solver convergence failures = 0
Original file line number Diff line number Diff line change
Expand Up @@ -25,52 +25,52 @@ Output directory: .
t ||u||_rms ||v||_rms ||w||_rms
----------------------------------------------------
0.000000 1.060205 3.559930 3.059949
0.250000 1.134976 3.463307 3.499980
0.500000 1.251255 3.307480 3.499978
0.750000 1.421776 3.076173 3.499975
1.000000 1.617972 2.789695 3.499972
1.250000 1.738611 2.525641 3.499970
1.500000 1.724313 2.346645 3.499970
0.250000 1.134975 3.463308 3.499980
0.500000 1.251254 3.307483 3.499978
0.750000 1.421775 3.076175 3.499975
1.000000 1.617974 2.789694 3.499972
1.250000 1.738612 2.525640 3.499970
1.500000 1.724313 2.346644 3.499970
1.750000 1.609332 2.267405 3.499972
2.000000 1.441938 2.284790 3.499975
2.000000 1.441938 2.284789 3.499975
2.250000 1.254548 2.387110 3.499978
2.500000 1.067861 2.552978 3.499982
2.750000 0.894914 2.755797 3.499985
3.000000 0.742698 2.972707 3.499988
3.250000 0.614424 3.189681 3.499990
3.500000 0.511703 3.400292 3.499992
3.750000 0.435022 3.602349 3.499993
4.000000 0.382884 3.795611 3.499993
3.000000 0.742698 2.972706 3.499988
3.250000 0.614424 3.189680 3.499990
3.500000 0.511703 3.400291 3.499992
3.750000 0.435022 3.602348 3.499993
4.000000 0.382885 3.795610 3.499993
4.250000 0.351268 3.980789 3.499994
4.500000 0.334675 4.159066 3.499994
4.750000 0.327999 4.331676 3.499994
4.500000 0.334675 4.159065 3.499994
4.750000 0.327999 4.331675 3.499994
5.000000 0.327576 4.499585 3.499994
5.250000 0.331182 4.663357 3.499994
5.500000 0.337619 4.823164 3.499994
5.750000 0.346346 4.978846 3.499994
6.000000 0.357245 5.129937 3.499994
5.500000 0.337620 4.823164 3.499994
5.750000 0.346346 4.978845 3.499994
6.000000 0.357244 5.129937 3.499994
6.250000 0.370526 5.275660 3.499994
6.500000 0.386740 5.414810 3.499993
6.750000 0.406897 5.545549 3.499993
7.000000 0.432797 5.664942 3.499992
7.250000 0.467856 5.767888 3.499992
7.500000 0.519324 5.844481 3.499991
7.750000 0.605996 5.871569 3.499989
8.000000 0.797170 5.775343 3.499986
8.250000 1.629022 5.135025 3.499974
8.500000 3.774898 3.499505 3.499941
8.750000 4.025788 2.194933 3.499932
9.000000 3.877379 0.967603 3.499933
9.250000 3.148899 1.087229 3.499946
9.500000 2.471560 1.322866 3.499958
9.750000 1.912340 1.594916 3.499967
10.000000 1.450253 1.896162 3.499975
6.500000 0.386741 5.414808 3.499993
6.750000 0.406897 5.545550 3.499993
7.000000 0.432798 5.664941 3.499992
7.250000 0.467855 5.767889 3.499992
7.500000 0.519325 5.844479 3.499991
7.750000 0.605996 5.871568 3.499989
8.000000 0.797169 5.775343 3.499986
8.250000 1.629015 5.135030 3.499974
8.500000 3.774895 3.499509 3.499941
8.750000 4.025789 2.194934 3.499932
9.000000 3.877381 0.967603 3.499933
9.250000 3.148900 1.087229 3.499946
9.500000 2.471561 1.322865 3.499958
9.750000 1.912340 1.594915 3.499967
10.000000 1.450254 1.896163 3.499975

Final Solver Statistics (for processor 0):
Internal solver steps = 482 (attempted = 482)
Total RHS evals: Fe = 1931, Fi = 6084
Total number of error test failures = 0
Internal solver steps = 481 (attempted = 483)
Total RHS evals: Fe = 1933, Fi = 6088
Total number of error test failures = 2
Total number of nonlinear solver convergence failures = 0
Total number of nonlinear iterations = 4153
Total number of linear iterations = 2912
Total number of preconditioner solves = 5690
Total number of nonlinear iterations = 4155
Total number of linear iterations = 2913
Total number of preconditioner solves = 5688
Loading

0 comments on commit 6c926c9

Please sign in to comment.