Skip to content

Commit

Permalink
Merge branch 'develop' into feature/sunstepper
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven-Roberts committed Oct 22, 2024
2 parents 9641457 + 5473f16 commit 9a8d422
Show file tree
Hide file tree
Showing 117 changed files with 1,272 additions and 794 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ SUNStepper can be created from an ARKODE memory block with the new function
`ARKodeCreateSUNStepper`. To enable interoperability with `MRIStepInnerStepper`,
the function `MRIStepInnerStepper_CreateFromSUNStepper` was added.

The following DIRK schemes now have coefficients accurate to quad precision:
* `ARKODE_BILLINGTON_3_3_2`
* `ARKODE_KVAERNO_4_2_3`
* `ARKODE_CASH_5_2_4`
* `ARKODE_CASH_5_3_4`
* `ARKODE_KVAERNO_5_3_4`
* `ARKODE_KVAERNO_7_4_5`

The default value of `CMAKE_CUDA_ARCHITECTURES` is no longer set to `70` and is
now determined automatically by CMake. The previous default was only valid for
Volta GPUs while the automatically selected value will vary across compilers and
Expand Down Expand Up @@ -54,6 +62,9 @@ using `ENABLE_KLU=ON` in combination with a static-only build of SuiteSparse.

### Deprecation Notices

The ARKODE stepper specific functions to retrieve the number of right-hand side
function evaluations have been deprecated. Use `ARKodeGetNumRhsEvals` instead.

## Changes to SUNDIALS in release 7.1.1

### Bug Fixes
Expand Down
16 changes: 10 additions & 6 deletions benchmarks/advection_reaction_3D/kokkos/arkode_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,10 @@ int EvolveProblemDIRK(N_Vector y, UserData* udata, UserOptions* uopt)
check_retval(&retval, "ARKodeGetNumSteps", 1, udata->myid);
retval = ARKodeGetNumStepAttempts(arkode_mem, &nst_a);
check_retval(&retval, "ARKodeGetNumStepAttempts", 1, udata->myid);
retval = ARKStepGetNumRhsEvals(arkode_mem, &nfe, &nfi);
check_retval(&retval, "ARKStepGetNumRhsEvals", 1, udata->myid);
retval = ARKodeGetNumRhsEvals(arkode_mem, 0, &nfe);
check_retval(&retval, "ARKodeGetNumRhsEvals", 1, udata->myid);
retval = ARKodeGetNumRhsEvals(arkode_mem, 1, &nfi);
check_retval(&retval, "ARKodeGetNumRhsEvals", 1, udata->myid);
retval = ARKodeGetNumErrTestFails(arkode_mem, &netf);
check_retval(&retval, "ARKodeGetNumErrTestFails", 1, udata->myid);
retval = ARKodeGetNumNonlinSolvIters(arkode_mem, &nni);
Expand Down Expand Up @@ -392,8 +394,10 @@ int EvolveProblemIMEX(N_Vector y, UserData* udata, UserOptions* uopt)
check_retval(&retval, "ARKodeGetNumSteps", 1, udata->myid);
retval = ARKodeGetNumStepAttempts(arkode_mem, &nst_a);
check_retval(&retval, "ARKodeGetNumStepAttempts", 1, udata->myid);
retval = ARKStepGetNumRhsEvals(arkode_mem, &nfe, &nfi);
check_retval(&retval, "ARKStepGetNumRhsEvals", 1, udata->myid);
retval = ARKodeGetNumRhsEvals(arkode_mem, 0, &nfe);
check_retval(&retval, "ARKodeGetNumRhsEvals", 1, udata->myid);
retval = ARKodeGetNumRhsEvals(arkode_mem, 1, &nfi);
check_retval(&retval, "ARKodeGetNumRhsEvals", 1, udata->myid);
retval = ARKodeGetNumErrTestFails(arkode_mem, &netf);
check_retval(&retval, "ARKodeGetNumErrTestFails", 1, udata->myid);
retval = ARKodeGetNumNonlinSolvIters(arkode_mem, &nni);
Expand Down Expand Up @@ -516,8 +520,8 @@ int EvolveProblemExplicit(N_Vector y, UserData* udata, UserOptions* uopt)
check_retval(&retval, "ARKodeGetNumSteps", 1, udata->myid);
retval = ARKodeGetNumStepAttempts(arkode_mem, &nst_a);
check_retval(&retval, "ARKodeGetNumStepAttempts", 1, udata->myid);
retval = ERKStepGetNumRhsEvals(arkode_mem, &nfe);
check_retval(&retval, "ERKStepGetNumRhsEvals", 1, udata->myid);
retval = ARKodeGetNumRhsEvals(arkode_mem, 0, &nfe);
check_retval(&retval, "ARKodeGetNumRhsEvals", 1, udata->myid);
retval = ARKodeGetNumErrTestFails(arkode_mem, &netf);
check_retval(&retval, "ARKodeGetNumErrTestFails", 1, udata->myid);

Expand Down
16 changes: 10 additions & 6 deletions benchmarks/advection_reaction_3D/raja/arkode_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,10 @@ int EvolveProblemDIRK(N_Vector y, UserData* udata, UserOptions* uopt)
check_retval(&retval, "ARKodeGetNumSteps", 1, udata->myid);
retval = ARKodeGetNumStepAttempts(arkode_mem, &nst_a);
check_retval(&retval, "ARKodeGetNumStepAttempts", 1, udata->myid);
retval = ARKStepGetNumRhsEvals(arkode_mem, &nfe, &nfi);
check_retval(&retval, "ARKStepGetNumRhsEvals", 1, udata->myid);
retval = ARKodeGetNumRhsEvals(arkode_mem, 0, &nfe);
check_retval(&retval, "ARKodeGetNumRhsEvals", 1, udata->myid);
retval = ARKodeGetNumRhsEvals(arkode_mem, 1, &nfi);
check_retval(&retval, "ARKodeGetNumRhsEvals", 1, udata->myid);
retval = ARKodeGetNumErrTestFails(arkode_mem, &netf);
check_retval(&retval, "ARKodeGetNumErrTestFails", 1, udata->myid);
retval = ARKodeGetNumNonlinSolvIters(arkode_mem, &nni);
Expand Down Expand Up @@ -394,8 +396,10 @@ int EvolveProblemIMEX(N_Vector y, UserData* udata, UserOptions* uopt)
check_retval(&retval, "ARKodeGetNumSteps", 1, udata->myid);
retval = ARKodeGetNumStepAttempts(arkode_mem, &nst_a);
check_retval(&retval, "ARKodeGetNumStepAttempts", 1, udata->myid);
retval = ARKStepGetNumRhsEvals(arkode_mem, &nfe, &nfi);
check_retval(&retval, "ARKStepGetNumRhsEvals", 1, udata->myid);
retval = ARKodeGetNumRhsEvals(arkode_mem, 0, &nfe);
check_retval(&retval, "ARKodeGetNumRhsEvals", 1, udata->myid);
retval = ARKodeGetNumRhsEvals(arkode_mem, 1, &nfi);
check_retval(&retval, "ARKodeGetNumRhsEvals", 1, udata->myid);
retval = ARKodeGetNumErrTestFails(arkode_mem, &netf);
check_retval(&retval, "ARKodeGetNumErrTestFails", 1, udata->myid);
retval = ARKodeGetNumNonlinSolvIters(arkode_mem, &nni);
Expand Down Expand Up @@ -519,8 +523,8 @@ int EvolveProblemExplicit(N_Vector y, UserData* udata, UserOptions* uopt)
check_retval(&retval, "ARKodeGetNumSteps", 1, udata->myid);
retval = ARKodeGetNumStepAttempts(arkode_mem, &nst_a);
check_retval(&retval, "ARKodeGetNumStepAttempts", 1, udata->myid);
retval = ERKStepGetNumRhsEvals(arkode_mem, &nfe);
check_retval(&retval, "ERKStepGetNumRhsEvals", 1, udata->myid);
retval = ARKodeGetNumRhsEvals(arkode_mem, 0, &nfe);
check_retval(&retval, "ARKodeGetNumRhsEvals", 1, udata->myid);
retval = ARKodeGetNumErrTestFails(arkode_mem, &netf);
check_retval(&retval, "ARKodeGetNumErrTestFails", 1, udata->myid);

Expand Down
10 changes: 5 additions & 5 deletions doc/arkode/guide/source/Butcher.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1407,12 +1407,12 @@ Here, the higher-order embedding is less stable than the lower-order method
\renewcommand{\arraystretch}{1.5}
\begin{array}{r|ccc}
0.292893218813 & 0.292893218813 & 0 & 0 \\
1.091883092037 & 0.798989873223 & 0.292893218813 & 0 \\
1.292893218813 & 0.740789228841 & 0.259210771159 & 0.292893218813 \\
1 - \frac{1}{\sqrt{2}} & 1 - \frac{1}{\sqrt{2}} & 0 & 0 \\
\frac{27}{\sqrt{2}} - 18 & 14 \sqrt{2} - 19 & 1 - \frac{1}{\sqrt{2}} & 0 \\
2 - \frac{1}{\sqrt{2}} & \frac{53 - 5 \sqrt{2}}{62} & \frac{9 + 5 \sqrt{2}}{62} & 1 - \frac{1}{\sqrt{2}} \\
\hline
2 & 0.740789228840 & 0.259210771159 & 0 \\
3 & 0.691665115992 & 0.503597029883 & -0.195262145876
2 & \frac{53 - 5 \sqrt{2}}{62} & \frac{9 + 5 \sqrt{2}}{62} & 0 \\
3 & \frac{263 - 95 \sqrt{2}}{186} & \frac{47 + 33 \sqrt{2}}{186} & \frac{\sqrt{2} - 2}{3}
\end{array}
.. figure:: /figs/arkode/stab_region_12.png
Expand Down
3 changes: 3 additions & 0 deletions doc/arkode/guide/source/Usage/ARKStep/User_callable.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3160,6 +3160,9 @@ Main solver optional output functions
The *nfi_evals* value does not account for calls made to
:math:`f^I` by a linear solver or preconditioner module.
.. deprecated:: x.y.z
Use :c:func:`ARKodeGetNumRhsEvals` instead.
.. c:function:: int ARKStepGetNumErrTestFails(void* arkode_mem, long int* netfails)
Expand Down
3 changes: 3 additions & 0 deletions doc/arkode/guide/source/Usage/ERKStep/User_callable.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1743,6 +1743,9 @@ Main solver optional output functions
* *ARK_SUCCESS* if successful
* *ARK_MEM_NULL* if the ERKStep memory was ``NULL``
.. deprecated:: x.y.z
Use :c:func:`ARKodeGetNumRhsEvals` instead.
.. c:function:: int ERKStepGetNumErrTestFails(void* arkode_mem, long int* netfails)
Expand Down
3 changes: 3 additions & 0 deletions doc/arkode/guide/source/Usage/MRIStep/User_callable.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1899,6 +1899,9 @@ Main solver optional output functions
* *ARK_MEM_NULL* if the MRIStep memory was ``NULL``
.. deprecated:: x.y.z
Use :c:func:`ARKodeGetNumRhsEvals` instead.
.. c:function:: int MRIStepGetNumStepSolveFails(void* arkode_mem, long int* ncnf)
Expand Down
3 changes: 3 additions & 0 deletions doc/arkode/guide/source/Usage/SPRKStep/User_callable.rst
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,9 @@ Main solver optional output functions
:retval ARK_SUCCESS: if successful
:retval ARK_MEM_NULL: if the SPRKStep memory was ``NULL``
.. deprecated:: x.y.z
Use :c:func:`ARKodeGetNumRhsEvals` instead.
.. c:function:: int SPRKStepGetCurrentMethod(void* arkode_mem, ARKodeSPRKTable *sprk_table)
Expand Down
34 changes: 34 additions & 0 deletions doc/arkode/guide/source/Usage/User_callable.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3165,6 +3165,7 @@ Name of constant associated with a return flag :c:func:`ARKodeGetReturnF
No. of explicit stability-limited steps :c:func:`ARKodeGetNumExpSteps`
No. of accuracy-limited steps :c:func:`ARKodeGetNumAccSteps`
No. of attempted steps :c:func:`ARKodeGetNumStepAttempts`
No. of RHS evaluations :c:func:`ARKodeGetNumRhsEvals`
No. of local error test failures that have occurred :c:func:`ARKodeGetNumErrTestFails`
No. of failed steps due to a nonlinear solver failure :c:func:`ARKodeGetNumStepSolveFails`
Estimated local truncation error vector :c:func:`ARKodeGetEstLocalErrors`
Expand Down Expand Up @@ -3470,6 +3471,39 @@ Retrieve a pointer for user data :c:func:`ARKodeGetUserDat
.. versionadded:: 6.1.0
.. c:function:: int ARKodeGetNumRhsEvals(void* arkode_mem, int partition_index, long int* num_rhs_evals)
Returns the number of calls to the user's right-hand side function (so far).
For implicit methods or methods with an implicit partition, the count does
not include calls made by a linear solver or preconditioner.
:param arkode_mem: pointer to the ARKODE memory block.
:param num_partition: the right-hand side partition index:
* For ERKStep, ``0`` corresponds to :math:`f(t,y)`
* For ARKStep, ``0`` corresponds to :math:`f^E(t,y)` and
``1`` to :math:`f^I(t,y)`
* For MRIStep, ``0`` corresponds to :math:`f^E(t,y)` and
``1`` to :math:`f^I(t,y)`
* For SPRKStep, ``0`` corresponds to :math:`f_1(t,p)` and
``1`` to :math:`f_2(t,q)`
A negative index will return the sum of the evaluations for
each partition.
:param num_rhs_evals: the number of right-hand side evaluations.
:retval ARK_SUCCESS: the function exited successfully.
:retval ARK_MEM_NULL: if ``arkode_mem`` was ``NULL``.
:retval ARK_ILL_INPUT: if ``num_partiton`` was invalid for the stepper or
``num_rhs_evals`` was ``NULL``
.. versionadded:: x.y.z
.. c:function:: int ARKodeGetNumErrTestFails(void* arkode_mem, long int* netfails)
Returns the number of local error test failures that
Expand Down
18 changes: 18 additions & 0 deletions doc/shared/RecentChanges.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,20 @@ can be created from an ARKODE memory block with the new function
:c:type:`MRIStepInnerStepper`, the function
:c:func:`MRIStepInnerStepper_CreateFromSUNStepper` was added.

The following DIRK schemes now have coefficients accurate to quad precision:

* ``ARKODE_BILLINGTON_3_3_2``

* ``ARKODE_KVAERNO_4_2_3``

* ``ARKODE_CASH_5_2_4``

* ``ARKODE_CASH_5_3_4``

* ``ARKODE_KVAERNO_5_3_4``

* ``ARKODE_KVAERNO_7_4_5``

The default value of :cmakeop:`CMAKE_CUDA_ARCHITECTURES` is no longer set to
``70`` and is now determined automatically by CMake. The previous default was
only valid for Volta GPUs while the automatically selected value will vary
Expand Down Expand Up @@ -52,3 +66,7 @@ Fixed a CMake configuration issue related to aliasing an ``ALIAS`` target when
using ``ENABLE_KLU=ON`` in combination with a static-only build of SuiteSparse.

**Deprecation Notices**

The ARKODE stepper specific functions to retrieve the number of right-hand side
function evaluations have been deprecated. Use :c:func:`ARKodeGetNumRhsEvals`
instead.
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,10 @@ int EvolveProblemIMEX(SUNContext ctx, N_Vector y, UserData* udata,
check_retval(&retval, "ARKodeGetNumSteps", 1);
retval = ARKodeGetNumStepAttempts(arkode_mem, &nst_a);
check_retval(&retval, "ARKodeGetNumStepAttempts", 1);
retval = ARKStepGetNumRhsEvals(arkode_mem, &nfe, &nfi);
check_retval(&retval, "ARKStepGetNumRhsEvals", 1);
retval = ARKodeGetNumRhsEvals(arkode_mem, 0, &nfe);
check_retval(&retval, "ARKodeGetNumRhsEvals", 1);
retval = ARKodeGetNumRhsEvals(arkode_mem, 1, &nfi);
check_retval(&retval, "ARKodeGetNumRhsEvals", 1);
retval = ARKodeGetNumErrTestFails(arkode_mem, &netf);
check_retval(&retval, "ARKodeGetNumErrTestFails", 1);
retval = ARKodeGetNumNonlinSolvIters(arkode_mem, &nni);
Expand Down Expand Up @@ -443,8 +445,8 @@ int EvolveProblemExplicit(SUNContext ctx, N_Vector y, UserData* udata,
check_retval(&retval, "ARKodeGetNumSteps", 1);
retval = ARKodeGetNumStepAttempts(arkode_mem, &nst_a);
check_retval(&retval, "ARKodeGetNumStepAttempts", 1);
retval = ERKStepGetNumRhsEvals(arkode_mem, &nfe);
check_retval(&retval, "ERKStepGetNumRhsEvals", 1);
retval = ARKodeGetNumRhsEvals(arkode_mem, 0, &nfe);
check_retval(&retval, "ARKodeGetNumRhsEvals", 1);
retval = ARKodeGetNumErrTestFails(arkode_mem, &netf);
check_retval(&retval, "ARKodeGetNumErrTestFails", 1);

Expand Down
24 changes: 13 additions & 11 deletions examples/arkode/CXX_parallel/ark_diffusion_reaction_p.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2600,8 +2600,10 @@ static int OutputStatsIMEX(void* arkode_mem, UserData* udata)
if (check_flag(&flag, "ARKodeGetNumStepAttempts", 1)) { return -1; }
flag = ARKodeGetNumErrTestFails(arkode_mem, &netf);
if (check_flag(&flag, "ARKodeGetNumErrTestFails", 1)) { return -1; }
flag = ARKStepGetNumRhsEvals(arkode_mem, &nfe, &nfi);
if (check_flag(&flag, "ARKStepGetNumRhsEvals", 1)) { return -1; }
flag = ARKodeGetNumRhsEvals(arkode_mem, 0, &nfe);
if (check_flag(&flag, "ARKodeGetNumRhsEvals", 1)) { return -1; }
flag = ARKodeGetNumRhsEvals(arkode_mem, 1, &nfi);
if (check_flag(&flag, "ARKodeGetNumRhsEvals", 1)) { return -1; }

if (udata->diffusion)
{
Expand Down Expand Up @@ -2675,11 +2677,11 @@ static int OutputStatsMRI(void* arkode_mem, MRIStepInnerStepper stepper,
int flag;

// Get slow integrator and solver stats
long int nsts, nfse, nfsi, nni, ncfn, nli, nlcf, nsetups, nfi_ls, nJv;
long int nsts, nfsi, nni, ncfn, nli, nlcf, nsetups, nfi_ls, nJv;
flag = ARKodeGetNumSteps(arkode_mem, &nsts);
if (check_flag(&flag, "ARKodeGetNumSteps", 1)) { return -1; }
flag = MRIStepGetNumRhsEvals(arkode_mem, &nfse, &nfsi);
if (check_flag(&flag, "MRIStepGetNumRhsEvals", 1)) { return -1; }
flag = ARKodeGetNumRhsEvals(arkode_mem, 1, &nfsi);
if (check_flag(&flag, "ARKodeGetNumRhsEvals", 1)) { return -1; }
flag = ARKodeGetNumNonlinSolvIters(arkode_mem, &nni);
if (check_flag(&flag, "ARKodeGetNumNonlinSolvIters", 1)) { return -1; }
flag = ARKodeGetNumNonlinSolvConvFails(arkode_mem, &ncfn);
Expand Down Expand Up @@ -2736,16 +2738,16 @@ static int OutputStatsMRI(void* arkode_mem, MRIStepInnerStepper stepper,
void* inner_arkode_mem;
MRIStepInnerStepper_GetContent(stepper, &inner_arkode_mem);

long int nstf, nstf_a, netff, nffe, nffi;
long int nstf, nstf_a, netff, nffe;

flag = ARKodeGetNumSteps(inner_arkode_mem, &nstf);
if (check_flag(&flag, "ARKodeGetNumSteps", 1)) { return -1; }
flag = ARKodeGetNumStepAttempts(inner_arkode_mem, &nstf_a);
if (check_flag(&flag, "ARKodeGetNumStepAttempts", 1)) { return -1; }
flag = ARKodeGetNumErrTestFails(inner_arkode_mem, &netff);
if (check_flag(&flag, "ARKodeGetNumErrTestFails", 1)) { return -1; }
flag = ARKStepGetNumRhsEvals(inner_arkode_mem, &nffe, &nffi);
if (check_flag(&flag, "ARKStepGetNumRhsEvals", 1)) { return -1; }
flag = ARKodeGetNumRhsEvals(inner_arkode_mem, 0, &nffe);
if (check_flag(&flag, "ARKodeGetNumRhsEvals", 1)) { return -1; }

cout << "Fast Integrator:" << endl;
cout << " Steps = " << nstf << endl;
Expand All @@ -2763,11 +2765,11 @@ static int OutputStatsMRICVODE(void* arkode_mem, MRIStepInnerStepper stepper,
int flag;

// Get slow integrator and solver stats
long int nsts, nfse, nfsi, nni, ncfn, nli, nlcf, nsetups, nfi_ls, nJv;
long int nsts, nfsi, nni, ncfn, nli, nlcf, nsetups, nfi_ls, nJv;
flag = ARKodeGetNumSteps(arkode_mem, &nsts);
if (check_flag(&flag, "ARKodeGetNumSteps", 1)) { return -1; }
flag = MRIStepGetNumRhsEvals(arkode_mem, &nfse, &nfsi);
if (check_flag(&flag, "MRIStepGetNumRhsEvals", 1)) { return -1; }
flag = ARKodeGetNumRhsEvals(arkode_mem, 1, &nfsi);
if (check_flag(&flag, "ARKodeGetNumRhsEvals", 1)) { return -1; }
flag = ARKodeGetNumNonlinSolvIters(arkode_mem, &nni);
if (check_flag(&flag, "ARKodeGetNumNonlinSolvIters", 1)) { return -1; }
flag = ARKodeGetNumNonlinSolvConvFails(arkode_mem, &ncfn);
Expand Down
6 changes: 3 additions & 3 deletions examples/arkode/CXX_parallel/ark_heat2D_p.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1819,15 +1819,15 @@ static int OutputStats(void* arkode_mem, UserData* udata)
int flag;

// Get integrator and solver stats
long int nst, nst_a, netf, nfe, nfi, nni, ncfn, nli, nlcf, nsetups, nfi_ls, nJv;
long int nst, nst_a, netf, nfi, nni, ncfn, nli, nlcf, nsetups, nfi_ls, nJv;
flag = ARKodeGetNumSteps(arkode_mem, &nst);
if (check_flag(&flag, "ARKodeGetNumSteps", 1)) { return -1; }
flag = ARKodeGetNumStepAttempts(arkode_mem, &nst_a);
if (check_flag(&flag, "ARKodeGetNumStepAttempts", 1)) { return -1; }
flag = ARKodeGetNumErrTestFails(arkode_mem, &netf);
if (check_flag(&flag, "ARKodeGetNumErrTestFails", 1)) { return -1; }
flag = ARKStepGetNumRhsEvals(arkode_mem, &nfe, &nfi);
if (check_flag(&flag, "ARKStepGetNumRhsEvals", 1)) { return -1; }
flag = ARKodeGetNumRhsEvals(arkode_mem, 1, &nfi);
if (check_flag(&flag, "ARKodeGetNumRhsEvals", 1)) { return -1; }
flag = ARKodeGetNumNonlinSolvIters(arkode_mem, &nni);
if (check_flag(&flag, "ARKodeGetNumNonlinSolvIters", 1)) { return -1; }
flag = ARKodeGetNumNonlinSolvConvFails(arkode_mem, &ncfn);
Expand Down
6 changes: 3 additions & 3 deletions examples/arkode/CXX_parhyp/ark_heat2D_hypre_ls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2111,15 +2111,15 @@ static int OutputStats(void* arkode_mem, UserData* udata)
int flag;

// Get integrator and solver stats
long int nst, nst_a, netf, nfe, nfi, nni, ncfn, nli, nlcf, nsetups, nJeval;
long int nst, nst_a, netf, nfi, nni, ncfn, nli, nlcf, nsetups, nJeval;
flag = ARKodeGetNumSteps(arkode_mem, &nst);
if (check_flag(&flag, "ARKodeGetNumSteps", 1)) { return -1; }
flag = ARKodeGetNumStepAttempts(arkode_mem, &nst_a);
if (check_flag(&flag, "ARKodeGetNumStepAttempts", 1)) { return -1; }
flag = ARKodeGetNumErrTestFails(arkode_mem, &netf);
if (check_flag(&flag, "ARKodeGetNumErrTestFails", 1)) { return -1; }
flag = ARKStepGetNumRhsEvals(arkode_mem, &nfe, &nfi);
if (check_flag(&flag, "ARKStepGetNumRhsEvals", 1)) { return -1; }
flag = ARKodeGetNumRhsEvals(arkode_mem, 1, &nfi);
if (check_flag(&flag, "ARKodeGetNumRhsEvals", 1)) { return -1; }
flag = ARKodeGetNumNonlinSolvIters(arkode_mem, &nni);
if (check_flag(&flag, "ARKodeGetNumNonlinSolvIters", 1)) { return -1; }
flag = ARKodeGetNumNonlinSolvConvFails(arkode_mem, &ncfn);
Expand Down
6 changes: 3 additions & 3 deletions examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2647,15 +2647,15 @@ static int OutputStats(void* arkode_mem, UserData* udata)
int flag;

// Get integrator and solver stats
long int nst, nst_a, netf, nfe, nfi, nni, ncfn, nli, nlcf, nsetups, nfi_ls, nJv;
long int nst, nst_a, netf, nfi, nni, ncfn, nli, nlcf, nsetups, nfi_ls, nJv;
flag = ARKodeGetNumSteps(arkode_mem, &nst);
if (check_flag(&flag, "ARKodeGetNumSteps", 1)) { return -1; }
flag = ARKodeGetNumStepAttempts(arkode_mem, &nst_a);
if (check_flag(&flag, "ARKodeGetNumStepAttempts", 1)) { return -1; }
flag = ARKodeGetNumErrTestFails(arkode_mem, &netf);
if (check_flag(&flag, "ARKodeGetNumErrTestFails", 1)) { return -1; }
flag = ARKStepGetNumRhsEvals(arkode_mem, &nfe, &nfi);
if (check_flag(&flag, "ARKStepGetNumRhsEvals", 1)) { return -1; }
flag = ARKodeGetNumRhsEvals(arkode_mem, 1, &nfi);
if (check_flag(&flag, "ARKodeGetNumRhsEvals", 1)) { return -1; }
flag = ARKodeGetNumNonlinSolvIters(arkode_mem, &nni);
if (check_flag(&flag, "ARKodeGetNumNonlinSolvIters", 1)) { return -1; }
flag = ARKodeGetNumNonlinSolvConvFails(arkode_mem, &ncfn);
Expand Down
Loading

0 comments on commit 9a8d422

Please sign in to comment.