Skip to content

Commit

Permalink
revision
Browse files Browse the repository at this point in the history
  • Loading branch information
maggul committed Oct 22, 2024
1 parent fad0406 commit bbc8f5c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
3 changes: 3 additions & 0 deletions doc/arkode/guide/source/Constants.rst
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,9 @@ contains the ARKODE output constants.
| :index:`ARK_STEPPER_UNSUPPORTED` | -48 | An operation was not supported by the current |
| | | time-stepping module. |
+-------------------------------------+------+------------------------------------------------------------+
| :index:`ARK_DOMEIG_FAIL` | -49 | The dominant eigenvalue function failed. It is either not |
| | | provided or returns an illegal value. |
+-------------------------------------+------+------------------------------------------------------------+
| :index:`ARK_UNRECOGNIZED_ERROR` | -99 | An unknown error was encountered. |
+-------------------------------------+------+------------------------------------------------------------+
| |
Expand Down
8 changes: 4 additions & 4 deletions doc/arkode/guide/source/Usage/LSRKStep/User_callable.rst
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,11 @@ Allowable Method Families
.. c:function:: int LSRKStepSetSSPStageNum(void* arkode_mem, int num_of_stages);
Sets the number of stages, ``s`` in ``SSP(s, p)`` methods. This input is only utilized by SSPRK methods. Thus,
this set routine must be called after calling LSRKStepSetMethod with an SSPRK method.
this set routine must be called after calling :c:func:`LSRKStepSetMethod` with an SSPRK method.

* :c:enumerator:`ARKODE_LSRK_SSP_S_2` -- ``num_of_stages`` must be greater than or equal to 2
* :c:enumerator:`ARKODE_LSRK_SSP_S_3` -- ``num_of_stages`` must be a perfect-square greater than or equal to 9
* :c:enumerator:`ARKODE_LSRK_SSP_10_4` -- ``num_of_stages`` cannot be modified from 10, so this function should not be called.
* :c:enumerator:`ARKODE_LSRK_SSP_S_2` -- ``num_of_stages`` must be greater than or equal to 2
* :c:enumerator:`ARKODE_LSRK_SSP_S_3` -- ``num_of_stages`` must be a perfect-square greater than or equal to 4
* :c:enumerator:`ARKODE_LSRK_SSP_10_4` -- ``num_of_stages`` cannot be modified from 10, so this function should not be called.

**Arguments:**
* *arkode_mem* -- pointer to the LSRKStep memory block.
Expand Down
2 changes: 2 additions & 0 deletions doc/arkode/guide/source/Usage/User_callable.rst
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,8 @@ the user has set a stop time (with a call to the optional input function
:retval ARK_MASSSETUP_FAIL: the mass matrix solver's setup routine failed.
:retval ARK_MASSSOLVE_FAIL: the mass matrix solver's solve routine failed.
:retval ARK_VECTOROP_ERR: a vector operation error occurred.
:retval ARK_DOMEIG_FAIL: the dominant eigenvalue function failed. It is either
not provided or returns an illegal value.

.. note::

Expand Down
1 change: 0 additions & 1 deletion src/arkode/arkode_lsrkstep.c
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,6 @@ int lsrkStep_TakeStepRKC(ARKodeMem ark_mem, sunrealtype* dsmPtr, int* nflagPtr)
{
retval = lsrkStep_ComputeNewDomEig(ark_mem, step_mem);
if (retval != ARK_SUCCESS) { return retval; }
step_mem->dom_eig_num_evals++;
}

/* determine the number of required stages */
Expand Down
3 changes: 3 additions & 0 deletions src/arkode/arkode_lsrkstep_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,9 @@ int LSRKStepSetSSPStageNum(void* arkode_mem, int num_of_stages)
break;

case ARKODE_LSRK_SSP_S_3:
/* The SSP3 method differs significantly when s = 4. Therefore, the case
where num_of_stages = 4 is considered separately to avoid unnecessary
boolean checks and improve computational efficiency. */
if (num_of_stages < 4 || ((int)SUNIceil(SUNRsqrt(num_of_stages)) !=
(int)SUNIfloor(SUNRsqrt(num_of_stages))))
{
Expand Down

0 comments on commit bbc8f5c

Please sign in to comment.