ARKode Example documentation

This is the documentation for the ARKode examples. ARKode is an adaptive step time integration package for stiff, nonstiff and multi-rate systems of ordinary differential equations (ODEs). The ARKode solver is a component of the SUNDIALS suite of nonlinear and differential/algebraic equation solvers. It is designed to have a similar user experience to the CVODE solver, with user modes to allow adaptive integration to specified output times, return after each internal step and root-finding capabilities, for calculations both in serial and parallel (via MPI). The default integration and solver options should apply to most users, though complete control over all internal parameters and time adaptivity algorithms is enabled through optional interface routines.

ARKode is developed by Southern Methodist University, with support by the US Department of Energy through the FASTMath SciDAC Institute, under subcontract B598130 from Lawrence Livermore National Laboratory.

Along with the ARKode solver, we have created a suite of example problems demonstrating its usage on applications written in C, C++ and Fortran 77 and Fortran 90. These examples demonstrate a large variety of ARKode solver options, including explicit, implicit and ImEx solvers, root-finding, Newton and fixed-point nonlinear solvers, direct and iterative linear solvers, adaptive resize capabilities, and the Fortran solver interface. While these examples are not an exhaustive set of all possible usage scenarios, they are designed to show a variety of exemplars, and can be used as templates for new problems using ARKode’s solvers. Further information on the ARKode package itself may be found in the accompanying ARKode user guide [R2018].

The following tables summarize the salient features of each of the example problems in this document. Each example is designed to be relatively self-contained, so that you need only study and/or emulate the problem that is most closely related to your own. We group these examples according to programming language (C, C++, Fortran 77, Fortran 90).

ARKode example problems written in C are summarized in the table below, and are further described in the chapters Serial C example problems, OpenMP C example problems, Parallel C example problems and Parallel Hypre example problems.

Problem Integrator Nonlinear Linear Size Extras
ark_analytic DIRK Newton Dense 1  
ark_analytic_nonlin ERK N.A. N.A. 1 ERKStep timestepping module
ark_brusselator DIRK Newton Dense 3  
ark_brusselator_fp ARK Fixed-point N.A. 3  
ark_robertson DIRK Newton Dense 3  
ark_robertson_root DIRK Newton Dense 3 rootfinding
ark_brusselator1D DIRK Newton Band 3N  
ark_brusselator1D_omp DIRK Newton Band 3N OpenMP-enabled
ark_brusselator1D_klu DIRK Newton KLU 3N sparse matrices
ark_brusselator1D_FEM_slu DIRK Newton SuperLU_MT 3N finite-element, \(M\ne I\), sparse matrices
ark_heat1D DIRK Newton PCG N  
ark_heat1D_adapt DIRK Newton PCG (dynamic) adaptive vector resizing
ark_KrylovDemo_prec DIRK Newton SPGMR 216 multiple preconditioners
ark_diurnal_kry_bbd_p DIRK Newton SPGMR 200 parallel, BBD preconditioner
ark_diurnal_kry_p DIRK Newton SPGMR 200 parallel, block-diagonal precond.
ark_diurnal_kry_ph DIRK Newton SPGMR 200 HYPRE parallel vector

ARKode example problems written in C++ are summarized in the table below, and are further described in the chapters Serial C++ example problems and Parallel C++ example problems.

Problem Integrator Nonlinear Linear Size Extras
ark_analytic_sys DIRK Newton Dense 3  
ark_heat2D DIRK Newton PCG \(nx*ny\) parallel

ARKode example problems written in Fortran 77 are summarized in the table below, and are further described in the chapters Serial Fortran 77 example problems and Parallel Fortran 77 example problems.

Problem Integrator Nonlinear Linear Size Extras
fark_diurnal_kry_bp DIRK Newton SPGMR 10 banded preconditioner
fark_roberts_dnsL DIRK Newton Dense 3 LAPACK dense solver, rootfinding
fark_diag_kry_bbd_p DIRK Newton SPGMR 10*NProcs parallel BBD preconditioner
fark_diag_non_p ERK N.A. N.A. 10*NProcs parallel

ARKode example problems written in Fortran 90 are summarized in the table below, and are further described in the chapters Serial Fortran 90 example problems and Parallel Fortran 90 example problems.

Problem Integrator Nonlinear Linear Size Extras
ark_bruss ARK Newton Dense 3  
ark_bruss1D_FEM_klu DIRK Newton KLU 3N finite-element, \(M\ne I\), sparse matrices
fark_heat2D DIRK Newton PCG \(nx*ny\) parallel

Further details on each of the above-listed examples are provided in the following chapters: