6.1. Introduction
IDAS is part of a software family called SUNDIALS: SUite of Nonlinear and DIfferential/ALgebraic equation Solvers [84]. This suite consists of CVODE, ARKODE, KINSOL, and IDAS, and variants of these with sensitivity analysis capabilities, CVODES and IDAS.
IDAS is a general purpose solver for the initial value problem (IVP) for systems of differential-algebraic equations (DAEs). The name IDAS stands for Implicit Differential-Algebraic solver with Sensitivity capabilities. IDAS is an extension of the IDA solver within SUNDIALS, itself based on on DASPK [27, 28], 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 IDAS shares significant modules previously written within CASC at LLNL to support the ordinary differential equation (ODE) solvers CVODE [42, 87] and PVODE [33, 34], and also the nonlinear system solver KINSOL [88].
At present, IDAS may utilize a variety of Krylov methods provided in SUNDIALS that can be used in conjunction with Newton iteration: these include the GMRES (Generalized Minimal RESidual) [129], FGMRES (Flexible Generalized Minimum RESidual) [128], Bi-CGStab (Bi-Conjugate Gradient Stabilized) [164], TFQMR (Transpose-Free Quasi-Minimal Residual) [65], and PCG (Preconditioned Conjugate Gradient) [78] 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.
IDAS is written with a functionality that is a superset of that of IDA. Sensitivity analysis capabilities, both forward and adjoint, have been added to the main integrator. Enabling forward sensitivity computations in IDAS will result in the code integrating the so-called sensitivity equations simultaneously with the original IVP, yielding both the solution and its sensitivity with respect to parameters in the model. Adjoint sensitivity analysis, most useful when the gradients of relatively few functionals of the solution with respect to many parameters are sought, involves integration of the original IVP forward in time followed by the integration of the so-called adjoint equations backward in time. IDAS provides the infrastructure needed to integrate any final-condition ODE dependent on the solution of the original IVP (in particular the adjoint system).
6.1.1. Changes to SUNDIALS in release X.Y.Z
Major Features
New Features and Enhancements
Added the function SUNLogger_SetQueueAndFlushMsgFns() to allow for
user-defined functions to queue and flush log messages.
Updated examples/cvode/petsc/cv_petsc_ex7.c to support PETSc 3.25.0.
Added the ARKODE_SSP_ERK_3_1_2, ARKODE_SSP_ERK_4_1_2,
ARKODE_SSP_ERK_4_2_3, ARKODE_SSP_ERK_10_3_4, ARKODE_SSP_LSPUM_ERK_3_1_2,
and ARKODE_ASCHER_ERK_3_1_2
embedded explicit Runge-Kutta Butcher tables.
Added the ARKODE_SSP_DIRK_3_1_2, ARKODE_SSP_LSPUM_SDIRK_3_1_2,
ARKODE_ESDIRK_4_2_3, and ARKODE_ASCHER_SDIRK_3_1_2 embedded diagonally
implicit Runge-Kutta Butcher tables.
Of these, embedded additive Runge-Kutta methods may be formed using
ARKODE_SSP_ERK_3_1_2 + ARKODE_SSP_DIRK_3_1_2,
ARKODE_SSP_ERK_4_2_3 + ARKODE_ESDIRK_4_2_3,
ARKODE_SSP_LSPUM_ERK_3_1_2 + ARKODE_SSP_LSPUM_SDIRK_3_1_2,
and ARKODE_ASCHER_ERK_3_1_2 + ARKODE_ASCHER_SDIRK_3_1_2.
Added the ARKODE_IMEX_MRI_GARK_ASCHER_ARK2 and ARKODE_IMEX_MRI_GARK_ARK2
embedded implicit-explicit MRI-GARK coupling tables.
When info or debug logging is enabled, i.e., SUNDIALS_LOGGING_LEVEL is at
least 3, it will now print to stdout by default. Previously, the default was
to produce no output, and this behavior can be restored by setting the
environment variables SUNLOGGER_INFO_FILENAME and
SUNLOGGER_DEBUG_FILENAME to an empty string.
Improved the performance of logging when enabled but no file pointer was set.
Bug Fixes
Fixed a bug in the sundials4py wrappers for user-provided SUNStepper evolve and one_step functions.
Fixed a bug where an unrecognized error return flag from a user-provided SUNLinearSolver module would register as a successful linear solve.
Fixed a minor bug where the number of required stages for STS methods in the LSRKStep module was incorrectly computed using the spectral radius instead of the real part of the Jacobian eigenvalues.
Fixed a minor bug where the negative real extent of the stability region for the RKC method was not being properly computed, which could result in an underestimation of the number of stages required for stability.
Fixed a minor bug where STS methods were limited to one fewer than the maximum allowed number of stages. STS can now use the full maximum number of stages.
Fixed a bug that caused SUNDomEigEstimator_Initialize to overwrite the user-provided initial guess from SUNDomEigEstimator_SetInitialGuess. These routines are now order-independent.
Fixed memory leaks in CVODES, IDAS, and KINSOL in the unlikely event of a failed
malloc.
Fixed minor bug in reporting the maximum number of stages in
ARKodeGetStageIndex() when running SSP methods in LSRKStep.
Removed duplicate logging output that would cause the Python logging tools to fail with a repeated key error.
Fixed a CMake issue that prevented finding third-party libraries installed in
default search locations e.g., paths included in CMAKE_INSTALL_PREFIX
(Issue #935).
Fixed a CMake issue that prevented automatically finding PETSc dependencies.
Fixed empty elseif() cases in the CMake files for the Fortran interfaces to
the ManyVector and MPIPlusX vectors which could results in a missing include
path when compiling if an MPI compiler wrapper is not found.
Fixed a bug where IDAS would incorrectly compute the quadrature predictor when IDACalcIC was used. In some cases, this lead to an inconsistent solution in the forward solve compared to the forward recomputation from a checkpoint, ultimately causing a segfault.
Fixed a CMake bug where Fortran modules were not created for LSRKStep, ForcingStep, and SplittingStep.
Corrected the version number used in version added, changed, and deprecated notes in the documentation to always use the SUNDIALS version number with the package version number as a parenthetical note when it differs from the SUNDIALS version number.
Fixed a bug in sundials4py where the CVodeGetRootInfo(),
ARKodeGetRootInfo(), and IDAGetRootInfo() functions did not
correctly return the rootsfound array. This addresses Issue #937.
Fixed a bug in ERKStep where calling ARKodeResize() before
ARKodeEvolve() or ARKodeInit() would result in a segmentation
fault.
Deprecation Notices
For changes in prior versions of SUNDIALS see §19.
6.1.2. Reading this User Guide
The structure of this document is as follows:
In Chapter §6.2, we give short descriptions of the numerical methods implemented by IDAS for the solution of initial value problems for systems of DAEs, along with short descriptions of preconditioning (§6.2.3) and rootfinding (§6.2.4).
The following chapter describes the software organization of the IDAS solver (§6.3).
Chapter §6.4.1 is the main usage document for IDAS for simulation applications. It includes a complete description of the user interface for the integration of DAE initial value problems. Readers that are not interested in using IDAS for sensitivity analysis can then skip the next two chapters.
Chapter §6.4.4 describes the usage of IDAS for forward sensitivity analysis as an extension of its IVP integration capabilities. We begin with a skeleton of the user main program, with emphasis on the steps that are required in addition to those already described in Chapter §6.4.1. Following that we provide detailed descriptions of the user-callable interface routines specific to forward sensitivity analysis and of the additional optional user-defined routines.
Chapter §6.4.5 describes the usage of IDAS for adjoint sensitivity analysis. We begin by describing the IDAS checkpointing implementation for interpolation of the original IVP solution during integration of the adjoint system backward in time, and with an overview of a user’s main program. Following that we provide complete descriptions of the user-callable interface routines for adjoint sensitivity analysis as well as descriptions of the required additional user-defined routines.
Chapter §8 gives a brief overview of the generic
N_Vectormodule shared among the various components of SUNDIALS, as well as details on theN_Vectorimplementations provided with SUNDIALS.Chapter §9 gives a brief overview of the generic
SUNMatrixmodule shared among the various components of SUNDIALS, and details on theSUNMatriximplementations provided with SUNDIALS.Chapter §10 gives a brief overview of the generic
SUNLinearSolvermodule shared among the various components of SUNDIALS. This chapter contains details on theSUNLinearSolverimplementations provided with SUNDIALS. The chapter also contains details on theSUNLinearSolverimplementations provided with SUNDIALS that interface with external linear solver libraries.Chapter §11 describes the
SUNNonlinearSolverAPI and nonlinear solver implementations shared among the various components of SUNDIALS.Finally, in the appendices, we provide detailed instructions for the installation of IDAS, within the structure of SUNDIALS (Appendix §1.1), as well as a list of all the constants used for input to and output from IDAS functions (Appendix §6.5).
6.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.