Appendix: ARKode Constants

Below we list all input and output constants used by the main solver, timestepper, and linear solver modules, together with their numerical values and a short description of their meaning.

ARKode input constants

Shared ARKode input constants

ARK_NORMAL (1):
Solver returns at a specified output time.
ARK_ONE_STEP (2):
Solver returns after each successful step.

Explicit Butcher table specification

HEUN_EULER_2_1_2 (0):
Use the Heun-Euler-2-1-2 ERK method
BOGACKI_SHAMPINE_4_2_3 (1):
Use the Bogacki-Shampine-4-2-3 ERK method
ARK324L2SA_ERK_4_2_3 (2):
Use the ARK-4-2-3 ERK method
ZONNEVELD_5_3_4 (3):
Use the Zonneveld-5-3-4 ERK method
ARK436L2SA_ERK_6_3_4 (4):
Use the ARK-6-3-4 ERK method
SAYFY_ABURUB_6_3_4 (5):
Use the Sayfy-Aburub-6-3-4 ERK method
CASH_KARP_6_4_5 (6):
Use the Cash-Karp-6-4-5 ERK method
FEHLBERG_6_4_5 (7):
Use the Fehlberg-6-4-5 ERK method
DORMAND_PRINCE_7_4_5 (8):
Use the Dormand-Prince-7-4-5 ERK method
ARK548L2SA_ERK_8_4_5 (9):
Use the ARK-8-4-5 ERK method
VERNER_8_5_6 (10):
Use the Verner-8-5-6 ERK method
FEHLBERG_13_7_8 (11):
Use the Fehlberg-13-7-8 ERK method
KNOTH_WOLKE_3_3 (12):
Use the Knoth-Wolke-3-3 ERK method
DEFAULT_ERK_2 (HEUN_EULER_2_1_2):
Use the default second-order ERK method
DEFAULT_ERK_3 (BOGACKI_SHAMPINE_4_2_3):
Use the default third-order ERK method
DEFAULT_ERK_4 (ZONNEVELD_5_3_4):
Use the default fourth-order ERK method
DEFAULT_ERK_5 (CASH_KARP_6_4_5):
Use the default fifth-order ERK method
DEFAULT_ERK_6 (VERNER_8_5_6):
Use the default sixth-order ERK method
DEFAULT_ERK_8 (FEHLBERG_13_7_8):
Use the default eighth-order ERK method

Implicit Butcher table specification

SDIRK_2_1_2 (12):
Use the SDIRK-2-1-2 SDIRK method
BILLINGTON_3_3_2 (13):
Use the Billington-3-3-2 SDIRK method
TRBDF2_3_3_2 (14):
Use the TRBDF2-3-3-2 ESDIRK method
KVAERNO_4_2_3 (15):
Use the Kvaerno-4-2-3 ESDIRK method
ARK324L2SA_DIRK_4_2_3 (16):
Use the ARK-4-2-3 ESDIRK method
CASH_5_2_4 (17):
Use the Cash-5-2-4 SDIRK method
CASH_5_3_4 (18):
Use the Cash-5-3-4 SDIRK method
SDIRK_5_3_4 (19):
Use the SDIRK-5-3-4 SDIRK method
KVAERNO_5_3_4 (20):
Use the Kvaerno-5-3-4 ESDIRK method
ARK436L2SA_DIRK_6_3_4 (21):
Use the ARK-6-3-4 ESDIRK method
KVAERNO_7_4_5 (22):
Use the Kvaerno-7-4-5 ESDIRK method
ARK548L2SA_DIRK_8_4_5 (23):
Use the ARK-8-4-5 ESDIRK method
DEFAULT_DIRK_2 (SDIRK_2_1_2):
Use the default second-order DIRK method
DEFAULT_DIRK_3 (ARK324L2SA_DIRK_4_2_3):
Use the default third-order DIRK method
DEFAULT_DIRK_4 (SDIRK_5_3_4):
Use the default fourth-order DIRK method
DEFAULT_DIRK_5 (ARK548L2SA_DIRK_8_4_5):
Use the default fifth-order DIRK method

ImEx Butcher table specification

ARK324L2SA_ERK_4_2_3 and ARK324L2SA_DIRK_4_2_3 (2 and 16):
Use the ARK-4-2-3 ARK method
ARK436L2SA_ERK_6_3_4 and ARK436L2SA_DIRK_6_3_4 (4 and 21):
Use the ARK-6-3-4 ARK method
ARK548L2SA_ERK_8_4_5 and ARK548L2SA_DIRK_8_4_5 (9 and 23):
Use the ARK-8-4-5 ARK method
DEFAULT_ARK_ETABLE_3 and DEFAULT_ARK_ITABLE_3 (ARK324L2SA_[ERK,DIRK]_4_2_3):
Use the default third-order ARK method
DEFAULT_ARK_ETABLE_4 and DEFAULT_ARK_ITABLE_4 (ARK436L2SA_[ERK,DIRK]_6_3_4):
Use the default fourth-order ARK method
DEFAULT_ARK_ETABLE_5 and DEFAULT_ARK_ITABLE_5 (ARK548L2SA_[ERK,DIRK]_8_4_5):
Use the default fifth-order ARK method

ARKode output constants

Shared ARKode output constants

ARK_SUCCESS (0):
Successful function return.
ARK_TSTOP_RETURN (1):
ARKode succeeded by reachign the specified stopping point.
ARK_ROOT_RETURN (2):
ARKode succeeded and found one more more roots.
ARK_WARNING (99):
ARKode succeeded but an unusual situation occurred.
ARK_TOO_MUCH_WORK (-1):
The solver took mxstep internal steps but could not reach tout.
ARK_TOO_MUCH_ACC (-2):
The solver could not satisfy the accuracy demanded by the user for some internal step.
ARK_ERR_FAILURE (-3):
Error test failures occurred too many times during one internal time step, or the minimum step size was reached.
ARK_CONV_FAILURE (-4):
Convergence test failures occurred too many times during one internal time step, or the minimum step size was reached.
ARK_LINIT_FAIL (-5):
The linear solver’s initialization function failed.
ARK_LSETUP_FAIL (-6):
The linear solver’s setup function failed in an unrecoverable manner.
ARK_LSOLVE_FAIL (-7):
The linear solver’s solve function failed in an unrecoverable manner.
ARK_RHSFUNC_FAIL (-8):
The right-hand side function failed in an unrecoverable manner.
ARK_FIRST_RHSFUNC_ERR (-9):
The right-hand side function failed at the first call.
ARK_REPTD_RHSFUNC_ERR (-10):
The right-hand side function had repeated recoverable errors.
ARK_UNREC_RHSFUNC_ERR (-11):
The right-hand side function had a recoverable error, but no recovery is possible.
ARK_RTFUNC_FAIL (-12):
The rootfinding function failed in an unrecoverable manner.
ARK_LFREE_FAIL (-13):
The linear solver’s memory deallocation function failed.
ARK_MASSINIT_FAIL (-14):
The mass matrix linear solver’s initialization function failed.
ARK_MASSSETUP_FAIL (-15):
The mass matrix linear solver’s setup function failed in an unrecoverable manner.
ARK_MASSSOLVE_FAIL (-16):
The mass matrix linear solver’s solve function failed in an unrecoverable manner.
ARK_MASSFREE_FAIL (-17):
The mass matrix linear solver’s memory deallocation function failed.
ARK_MASSMULT_FAIL (-17):
The mass matrix-vector product function failed.
ARK_MEM_FAIL (-20):
A memory allocation failed.
ARK_MEM_NULL (-21):
The arkode_mem argument was NULL.
ARK_ILL_INPUT (-22):
One of the function inputs is illegal.
ARK_NO_MALLOC (-23):
The ARKode memory block was not allocated by a call to ARKodeMalloc().
ARK_BAD_K (-24):
The derivative order \(k\) is larger than allowed.
ARK_BAD_T (-25):
The time \(t\) is outside the last step taken.
ARK_BAD_DKY (-26):
The output derivative vector is NULL.
ARK_TOO_CLOSE (-27):
The output and initial times are too close to each other.
ARK_VECTOROP_ERR (-29):
An error occurred when calling an NVECTOR routine.
ARK_NLS_INIT_FAIL (-30):
An error occurred when initializing a SUNNonlinearSolver module.
ARK_NLS_SETUP_FAIL (-31):
A non-recoverable error occurred when setting up a SUNNonlinearSolver module.
ARK_NLS_SETUP_RECVR (-32):
A recoverable error occurred when setting up a SUNNonlinearSolver module.
ARK_NLS_OP_ERR (-33):
An error occurred when calling a set/get routine in a SUNNonlinearSolver module.
ARK_INNERSTEP_OP_ERR (-34):
An error occurred when calling an internal stepper within an ARKode module.
ARK_UNRECOGNIZED_ERROR (-99):
An unknown error was encountered.

ARKLS linear solver modules

ARKLS_SUCCESS (0):
Successful function return.
ARKLS_MEM_NULL (-1):
The arkode_mem argument was NULL.
ARKLS_LMEM_NULL (-2):
The ARKLS linear solver interface has not been initialized.
ARKLS_ILL_INPUT (-3):
The ARKLS solver interface is not compatible with the current NVECTOR module, or an input value was illegal.
ARKLS_MEM_FAIL (-4):
A memory allocation request failed.
ARKLS_PMEM_NULL (-5):
The preconditioner module has not been initialized.
ARKLS_MASSMEM_NULL (-6):
The ARKLS mass-matrix linear solver interface has not been initialized.
ARKLS_JACFUNC_UNRECVR (-7):
The Jacobian function failed in an unrecoverable manner.
ARKLS_JACFUNC_RECVR (-8):
The Jacobian function had a recoverable error.
ARKLS_MASSFUNC_UNRECVR (-9):
The mass matrix function failed in an unrecoverable manner.
ARKLS_MASSFUNC_RECVR (-10):
The mass matrix function had a recoverable error.
ARKLS_SUNMAT_FAIL (-11):
An error occurred with the current SUNMATRIX module.
ARKLS_SUNLS_FAIL (-12):
An error occurred with the current SUNLINSOL module.