Package: krylov
Iterative methods for linear equation systems.krylovprovides Krylov subspace methods for the solution of linear systems in Python.
Install withpip install krylovand use asimportnumpyimportkrylovA=numpy.diag([1.0e-3]+list(range(2,101)))b=numpy.ones(100)sol,info=krylov.gmres(A,b)# sol is None if no solution has been foundinfo.success# Booleaninfo.xk# the last iterate; equal to sol if successinfo.numsteps# number of iterationsinfo.resnorms# relative residual normsinfo.nresnorms# resnorms of the normalized equations ||A.H (b - Ax)||info.acond# estimate of cond(A)info.anorm# estimate of the Frobenius norm of Ainfo.xnorm# estimate of norm(x)info.reason# if not successful, reasonkrylovprovides the following Krylov subspace methods for solving linear equation
systems:BiCG,BiCGSTAB,CG,CGNE,CGNR,CGR,CGS,Chebyshev,GCR,GMRES,MINRES,QMR,SYMMLQ,TFQMR.For solving least-squares problems,krylovhasCGLS,LSMR,LSQRCraig's methodsolves the minimization problem\text{Minimize } \|x\| \text{s.t.} Ax=b.Additionally,krylovprovides the stationary methodsGauss-Seidel,Jacobi,Richardson,SOR,SSOR.All methodsreturn many interesting statistics, e.g., the residual norms,are fully blocked/vectorized, can deal with multiple right-hand sides,have callback for retrieving/manipulating internal solver data,support real and complex data,work with SciPy sparse matrices, NumPy arrays, custom LinearOperators,allow arbitrary inner products, andlet the user adjust various parameters, e.g., the orthogonalization method in GMRES.krylovis written completely in Python, so methods can be easily adapted.Other Krylov softwarepykrylov- A library of Krylov methods in pure Python.KryPy- Another Python package for Krylov subspace methods.scipy.sparse.linalg- SciPy's implementation of Krylov methods. Uses the Fortran implementations of theTemplates for the Solution of Linear SystemsPETSc- Parallel high-performance implementation of many Krylov methods in C.Krylov.jl- A Julia Basket of Hand-Picked Krylov Methods.Team KrylovSome important figures in Krylov subspace method, ordered by date of birth.Aleksey N. Krylov(1863–1945)Алексе́й Никола́евич Крыло́в, Russian naval engineer, applied mathematician and memoirist.
Krylov wrote about 300 papers and books. They span a wide range of topics, including
shipbuilding, magnetism, artillery, mathematics, astronomy, and geodesy. In 1904 he
built the first machine in Russia for integrating Ordinary differential equations. In
1931 (aged 68) he published a paper on what is now called theKrylov
subspaceand Krylov subspace methods.Cornelius Lanczos(1893–1974)Extensive contributions all over numerical analysis and physics. For example, Lanczos
pioneeredFFT, introducedChebyshev polynomialsto
numerics, and devised theLanczos
algorithmfor eigenvalue computations.Assistant to Einstein in Berlin. Later one of the "Martians", a group of Hungarian
scientists who emigrated to the US in the first half the 20th century.In 1972, aged 79, Lanczos gave two extensive interviews which are recorded on video and
can be watched on YouTube:Lanczos about his lifeLanczos about mathematicsAlston Scott Householder(1904–1993)Discoverer of theHouseholder
transformationand ofHouseholder's method.SIAMandACMpresident, organizer of
the Gatlinburg conferences, now named Householder Symposia.Magnus Hestenes(1906–1991)Best known for his contributions to calculus of variations and optimal control, pioneer
in in computer science. Co-discoverer (with Lanczos and Stiefel) of the conjugate
gradient method (CG).AMSvice president.Eduard Stiefel(1909–1978)Ground-breaking contributions in the fields of algebraic topology. Co-discoverer (with
Lanczos and Hestenes) of CG.Also active as a military officer, rising to the rank of colonel (Oberst der Artillerie)
in the Swiss army during World War II.J. Wallace Givens(1910–1993)Pioneer in computer science. Director of the Division of Applied Mathematics at the
Argonne National Labs. SIAM president.Givens
rotationsare named after him.Walter Edwin Arnoldi(1917–1995)American engineer, mainly known for thediscoveryof theArnoldi
iterationwhich for Hermitian
matrices, reduces to theLanczos
algorithm.Henk van der Vorst(1944–)Various important contributions in Krylov subspace methods and related topics.
Discoverer of the BiCGSTAB method and the Jacobi-Davidson method.Since 2006, van der Vorstworks as an artist.YouTube:Galerie Laimböck -- Henk van der Vorst ‘Geometrische Origami’
(Dutch)Yousef Saad(1950–)Various important contributions in Krylov subspace methods and related topics.
Discoverer of GCR andGMRES(with Martin H. Schultz).YouTube:Filtering techniques for eigenvalue problems, SaadChristopher PaigeDiscoverer ofMINRES, SYMMLQ, andLSQR(with Saunders).Michael SaundersDiscoverer ofMINRES, SYMMLQ,LSQR(with Paige), andLSMR(with Fong).BooksR. Barrett et al.,Templates for the Solution of Linear Systems: Building Blocks for
Iterative Methods, 1994C.T. Kelley,Iterative Methods for Linear and Nonlinear Equations, 1995Anne Greenbaum,Iterative Methods for Solving Linear Systems, 1997James W. Demmel,Applied Numerical Linear Algebra, 1997Yousef Saad,Iterative Methods for Sparse Linear Systems, 2003Henk A. van der Vorst,Iterative Krylov Methods for Large Linear Systems, 2003Jörg Liesen and Zdeněk Strakoš,Krylov Subspace Methods - Principles and Analysis, 2012TestingTo run the krylov unit tests, check out this repository and type, e.g.,tox -- --maxfail=1