petsc-3.13.6 2020-09-29
Report Typos and Errors

Krylov Methods - KSP: : Examples

The scalable linear equations solvers (KSP) component provides an easy-to-use interface to the combination of a Krylov subspace iterative method and a preconditioner (in the KSP and PC components, respectively) or a sequential direct solver. KSP users can set various Krylov subspace options at runtime via the options database (e.g., -ksp_type cg ). KSP users can also set KSP options directly in application by directly calling the KSP routines listed below (e.g., KSPSetType() ). KSP components can be used directly to create and destroy solvers; this is not needed for users but is intended for library developers.

ex1.c: Solves a tridiagonal linear system with KSP
ex2.c: Solves a linear system in parallel with KSP
ex3.c: Bilinear elements on the unit square for Laplacian
ex4.c: Solves a linear system in parallel with KSP and HMG
ex5.c: Solves two linear systems in parallel with KSP
ex6.c: Solves a tridiagonal linear system with KSP
ex7.c: Block Jacobi preconditioner for solving a linear system in parallel with KSP
ex8.c: Illustrates use of the preconditioner ASM
ex9.c: The solution of 2 different linear systems with different linear solvers
ex10.c: Solve a small system and a large system through preloading\n\
ex11.c: Solves a linear system in parallel with KSP
ex12.c: Solves a linear system in parallel with KSP,\n\
ex13.c: Solves a variable Poisson problem with KSP
ex15.c: Solves a linear system in parallel with KSP
ex16.c: Solves a sequence of linear systems with different right-hand-side vectors
ex18.c: Solves a (permuted) linear system in parallel with KSP
ex23.c: Solves a tridiagonal linear system
ex25.c: Solves 1D variable coefficient Laplacian using multigrid
ex27.c: Reads a PETSc matrix and vector from a file and solves the normal equations
ex28.c: Solves 1D wave equation using multigrid
ex29.c: Solves 2D inhomogeneous Laplacian using multigrid
ex32.c: Solves 2D inhomogeneous Laplacian using multigrid
ex34.c: Solves 3D Laplacian using multigrid
ex41.c: Reads a PETSc matrix and vector from a socket connection, solves a linear system and sends the result back
ex42.c: Solves the incompressible, variable viscosity stokes equation in 3d using Q1Q1 elements, \n\
ex43.c: Solves the incompressible, variable viscosity Stokes equation in 2d on the unit domain \n\
ex45.c: Solves 3D Laplacian using multigrid
ex46.c: Solves a linear system in parallel with KSP and DM
ex49.c: Solves the compressible plane strain elasticity equations in 2d on the unit domain using Q1 finite elements
ex50.c: Solves 2D Poisson equation using multigrid
ex51.c: This example solves a linear system in parallel with KSP
ex52.c: Solves a linear system in parallel with KSP
ex53.c: Solves a tridiagonal linear system with KSP
ex54.c: Creates a matrix from quadrilateral finite elements in 2D, Laplacian \n\
ex55.c: 2D, bi-linear quadrilateral (Q1), displacement finite element formulation\n\
ex56.c: 3D, tri-linear quadrilateral (Q1), displacement finite element formulation\n\
ex59.c: This example illustrates the use of PCBDDC/FETI-DP and its customization
ex62.c: Illustrates use of PCGASM
ex64.c: Illustrates use of the preconditioner GASM
ex65.c: Solves 1D constant coefficient Laplacian using DMSHELL and multigrid
ex66.c: Solves 2D Poisson equation,\n\
ex67.c: Krylov methods to solve u'' = f in parallel with periodic boundary conditions,\n\
ex68.c:
ex69.c:
ex70.c: ------------------------------------------------------------------------------------------------------------------------------ \n\
ex71.c: This example illustrates the use of PCBDDC/FETI-DP with 2D/3D DMDA
ex72.c: Reads a PETSc matrix and vector from a file and solves a linear system
ex73.c: Solves 2D inhomogeneous Laplacian
ex74.c: Solves the constant-coefficient 1D heat equation \n\
ex75.c: Solves a series of linear systems using KSPHPDDM
ex76.c: Solves a linear system using PCHPDDM
ex77.c: Solves a linear system with a block of right-hand sides using KSPHPDDM
ex100.c: Python-implemented Mat/KSP/PC
makefile