Lightweight implementation of Krylov methods using modern Fortran.

Find us on…

GitHub The Web Download the Source

LightKrylov

Warning

This API documentation for the LightKrylov pacakge is a work in progress. It is build from the source code in the main branch and does not track the current development in dev or any other branches. If you use another branch, please refer to the in-code documentation. Use the navigation bar at the top of the screen to browse modules, procedures, source files, etc. The listings near the bootom of the page are incomplete.

This is the main API documentation landing page generated by FORD. This documentation is released under the CC-BY-SA license while the LightKrylov source code is distribution under the BSD-3 Clause one.

Scope

The goal of LightKrylov is to provide a lightweight implementation of many standard Krylov techniques using modern Fortran features, including:

  • Linear solvers for
    • cg when is a symmetric (hermitian) positive definite matrix.
    • gmres when is a non-symmetric square linear operator.
  • Krylov-based matrix factorizations
    • arnoldi - Construct an upper Hessenberg matrix and an orthonormal (unitary) basis capturing the dominant eigenspace of a square non-symmetric matrix using the Arnoldi iterative process.
    • lanczos - Construct a symmetric (hermitian) tridiagonal matrix and an orthonormal (unitary) basis capturing the dominant eigenspace of a symmetric (hermitian) linear operator using the Lanczos iterative process.
    • bidiagonalization - Construct a bidiagonal matrix and orthonormal bases and for the dominant column (resp. row) span of a general linear operator using the Lanczos bidiagonalization iterative process.
  • Eigenvalue solvers for
    • eigs to compute the largest eigenvalues and associated eigenvectors of a general square linear operator using the Arnoldi iterative process.
    • eighs to compute the largest eigenvalues and associated eigenvectors of a symmetric (hermitian) linear operator using the Lanczos iterative process.
  • Singular value decomposition
    • svds to compute the leading singular triplets of a general linear operator using the Lanczos bidiagonalization iterative process.
  • Solving a system of nonlinear equations
    • newton to find the solution to using a Newton-Krylov solver with optimal step size found by a simple bisection method.

While similar and more feature-complete packages exist (e.g. Arpack, SLEPC or Trilinos), the use of abstract_type in LightKrylov and its nearly non-existant list of dependencies makes it far easier to incorporate into an existing code base. Preliminary benchmark results moreover show that it is on par with Arpack in terms of accuracy and computational performances.

Acknowledgment

The development of LightKrylov is part of an on-going research project funded by Agence Nationale pour la Recherche (ANR) under the grant agreement ANR-22-CE46-0008. The project started in January 2023 and will run until December 2026. We are also very grateful to the fortran-lang community and the maintainers of stdlib.

Related projects

LightKrylov is the base package of our ecosystem. If you like it, you may also be interested in:

  • LightROM : a lightweight Fortran package providing a set of functions for reduced-order modeling, control and estimation of large-scale linear time invariant dynamical systems.
  • neklab : a bifurcation and stability analysis toolbox based on LightKrylov for the massively parallel spectral element solver Nek5000.

Developer Info

nekstab/LightKrylov contributors