# 5.1. Introduction

IDA is part of a software family called SUNDIALS: SUite of Nonlinear and DIfferential/ALgebraic equation Solvers [70]. This suite consists of CVODE, ARKODE, KINSOL, and IDA, and variants of these with sensitivity analysis capabilities, CVODES and IDAS.

IDA is a general purpose solver for the initial value problem (IVP) for systems of differential-algebraic equations (DAEs). The name IDA stands for Implicit Differential-Algebraic solver. IDA is based on DASPK [23, 24], but is written in ANSI-standard C rather than Fortran77. Its most notable features are that, (1) in the solution of the underlying nonlinear system at each time step, it offers a choice of Newton/direct methods and a choice of Inexact Newton/Krylov (iterative) methods; and (2) it is written in a data-independent manner in that it acts on generic vectors and matrices without any assumptions on the underlying organization of the data. Thus IDA shares significant modules previously written within CASC at LLNL to support the ordinary differential equation (ODE) solvers CVODE [38, 73] and PVODE [29, 30], and also the nonlinear system solver KINSOL [74].

At present, IDA may utilize a variety of Krylov methods provided in SUNDIALS that can be used in conjuction with Newton iteration: these include the GMRES (Generalized Minimal RESidual) [106], FGMRES (Flexible Generalized Minimum RESidual) [105], Bi-CGStab (Bi-Conjugate Gradient Stabilized) [131], TFQMR (Transpose-Free Quasi-Minimal Residual) [56], and PCG (Preconditioned Conjugate Gradient) [65] linear iterative methods. As Krylov methods, these require little matrix storage for solving the Newton equations as compared to direct methods. However, the algorithms allow for a user-supplied preconditioner, and, for most problems, preconditioning is essential for an efficient solution.

For very large DAE systems, the Krylov methods are preferable over direct linear solver methods, and are often the only feasible choice. Among the Krylov methods in SUNDIALS, we recommend GMRES as the best overall choice. However, users are encouraged to compare all options, especially if encountering convergence failures with GMRES. Bi-CGFStab and TFQMR have an advantage in storage requirements, in that the number of workspace vectors they require is fixed, while that number for GMRES depends on the desired Krylov subspace size. FGMRES has an advantage in that it is designed to support preconditioners that vary between iterations (e.g. iterative methods). PCG exhibits rapid convergence and minimal workspace vectors, but only works for symmetric linear systems.

## 5.1.1. Changes to SUNDIALS in release 7.1.0

Major Features

Created shared user interface functions for ARKODE to allow more uniform control over time-stepping algorithms, improved extensibility, and simplified code maintenance. The corresponding stepper-specific user-callable functions are now deprecated and will be removed in a future major release.

Added CMake infrastructure that enables externally maintained addons/plugins to be optionally built with SUNDIALS. See Contributing for details.

New Features and Enhancements

Added support for Kokkos Kernels v4.

Added the following Runge-Kutta Butcher tables

• `ARKODE_FORWARD_EULER_1_1`

• `ARKODE_RALSTON_EULER_2_1_2`

• `ARKODE_EXPLICIT_MIDPOINT_EULER_2_1_2`

• `ARKODE_BACKWARD_EULER_1_1`

• `ARKODE_IMPLICIT_MIDPOINT_1_2`

• `ARKODE_IMPLICIT_TRAPEZOIDAL_2_2`

Added the following MRI coupling tables

• `ARKODE_MRI_GARK_FORWARD_EULER`

• `ARKODE_MRI_GARK_RALSTON2`

• `ARKODE_MRI_GARK_RALSTON3`

• `ARKODE_MRI_GARK_BACKWARD_EULER`

• `ARKODE_MRI_GARK_IMPLICIT_MIDPOINT`

• `ARKODE_IMEX_MRI_GARK_EULER`

• `ARKODE_IMEX_MRI_GARK_TRAPEZOIDAL`

• `ARKODE_IMEX_MRI_GARK_MIDPOINT`

Added `ARKodeButcherTable_ERKIDToName()` and `ARKodeButcherTable_DIRKIDToName()` to convert a Butcher table ID to a string representation.

Added the function `ARKodeSetAutonomous()` in ARKODE to indicate that the implicit right-hand side function does not explicitly depend on time. When using the trivial predictor, an autonomous problem may reuse implicit function evaluations across stage solves to reduce the total number of function evaluations.

Users may now disable interpolated output in ARKODE by passing `ARK_INTERP_NONE` to `ARKodeSetInterpolantType()`. When interpolation is disabled, rootfinding is not supported, implicit methods must use the trivial predictor (the default option), and interpolation at stop times cannot be used (interpolating at stop times is disabled by default). With interpolation disabled, calling `ARKodeEvolve()` in `ARK_NORMAL` mode will return at or past the requested output time (setting a stop time may still be used to halt the integrator at a specific time). Disabling interpolation will reduce the memory footprint of an integrator by two or more state vectors (depending on the interpolant type and degree) which can be beneficial when interpolation is not needed e.g., when integrating to a final time without output in between or using an explicit fast time scale integrator with an MRI method.

Added “Resize” capability to ARKODE’s SPRKStep time-stepping module.

Enabled the Fortran interfaces to build with 32-bit `sunindextype`.

Bug Fixes

Updated the CMake variable `HIP_PLATFORM` default to `amd` as the previous default, `hcc`, is no longer recognized in ROCm 5.7.0 or newer. The new default is also valid in older version of ROCm (at least back to version 4.3.1).

Renamed the DPCPP value for the `SUNDIALS_GINKGO_BACKENDS` CMake option to `SYCL` to match Ginkgo’s updated naming convention.

Changed the CMake version compatibility mode for SUNDIALS to `AnyNewerVersion` instead of `SameMajorVersion`. This fixes the issue seen here.

Fixed a CMake bug that caused an MPI linking error for our C++ examples in some instances. Fixes GitHub Issue #464.

Fixed the runtime library installation path for windows systems. This fix changes the default library installation path from `CMAKE_INSTALL_PREFIX/CMAKE_INSTALL_LIBDIR` to `CMAKE_INSTALL_PREFIX/CMAKE_INSTALL_BINDIR`.

Fixed conflicting `.lib` files between shared and static libs when using `MSVC` on Windows

Fixed invalid `SUNDIALS_EXPORT` generated macro when building both shared and static libs.

Fixed a bug in some Fortran examples where `c_null_ptr` was passed as an argument to a function pointer instead of `c_null_funptr`. This caused compilation issues with the Cray Fortran compiler.

Fixed a bug in the HIP execution policies where `WARP_SIZE` would not be set with ROCm 6.0.0 or newer.

Fixed a bug that caused error messages to be cut off in some cases. Fixes GitHub Issue #461.

Fixed a memory leak when an error handler was added to a `SUNContext`. Fixes GitHub Issue #466.

Fixed a bug where `MRIStepEvolve()` would not handle a recoverable error produced from evolving the inner stepper.

Added missing `SetRootDirection` and `SetNoInactiveRootWarn` functions to ARKODE’s SPRKStep time-stepping module.

Fixed a bug in `ARKodeSPRKTable_Create()` where the coefficient arrays were not allocated.

Fix bug on LLP64 platforms (like Windows 64-bit) where `KLU_INDEXTYPE` could be 32 bits wide even if `SUNDIALS_INT64_T` is defined.

Check if size of `SuiteSparse_long` is 8 if the size of `sunindextype` is 8 when using KLU.

Fixed several build errors with the Fortran interfaces on Windows systems.

Deprecation Notices

Numerous ARKODE stepper-specific functions are now deprecated in favor of ARKODE-wide functions.

Deprecated the ARKStepSetOptimalParams function. Since this function does not have an ARKODE-wide equivalent, instructions have been added to the user guide for how to retain the current functionality using other user-callable functions.

The unsupported implementations of `N_VGetArrayPointer` and `N_VSetArrayPointer` for the hypre and PETSc vectors are now deprecated. Users should access the underlying wrapped external library vector objects instead with `N_VGetVector_ParHyp` and `N_VGetVector_Petsc`, respectively.

For changes in prior versions of SUNDIALS see §15.

## 5.1.2. Reading this User Guide

The structure of this document is as follows:

• In Chapter §5.2, we give short descriptions of the numerical methods implemented by IDA for the solution of initial value problems for systems of DAEs, along with short descriptions of preconditioning (§5.2.3) and rootfinding (§5.2.4).

• The following chapter describes the software organization of the IDA solver (§5.3).

• Chapter §5.4 is the main usage document for IDA for C and C++ applications. It includes a complete description of the user interface for the integration of DAE initial value problems. This is followed by documentation for using IDA with Fortran applications and on GPU accelerated systems.

• Chapter §8 gives a brief overview of the generic `N_Vector` module shared among the various components of SUNDIALS, as well as details on the `N_Vector` implementations provided with SUNDIALS.

• Chapter §9 gives a brief overview of the generic `SUNMatrix` module shared among the various components of SUNDIALS, and details on the `SUNMatrix` implementations provided with SUNDIALS.

• Chapter §10 gives a brief overview of the generic `SUNLinearSolver` module shared among the various components of SUNDIALS. This chapter contains details on the `SUNLinearSolver` implementations provided with SUNDIALS. The chapter also contains details on the `SUNLinearSolver` implementations provided with SUNDIALS that interface with external linear solver libraries.

• Chapter §11 describes the `SUNNonlinearSolver` API and nonlinear solver implementations shared among the various components of SUNDIALS.

• Finally, in the appendices, we provide detailed instructions for the installation of IDA, within the structure of SUNDIALS (Appendix §1.1), as well as a list of all the constants used for input to and output from IDA functions (Appendix §5.5).

## 5.1.3. SUNDIALS License and Notices

All SUNDIALS packages are released open source, under the BSD 3-Clause license for more details see the LICENSE and NOTICE files provided with all SUNDIALS packages.