**petsc-3.3-p7 2013-05-11**

## 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: Solves a linear system in parallel with KSP

ex4.c: Test MatSetValuesBatch: setting batches of elements using the GPU

ex5.c: Solves two linear systems in parallel with KSP

ex7.c: Block Jacobi preconditioner for solving a linear system in parallel with KSP

ex8.c: Illustrates use of the preconditioner ASM

ex8g.c: Illustrates use of the preconditioner GASM

ex9.c: The solution of 2 different linear systems with different linear solvers

ex10.c: Reads a PETSc matrix and vector from a file and solves a linear system

ex11.c: Solves a linear system in parallel with KSP

ex12.c: Solves a linear system in parallel with KSP

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

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

ex30.c:

ex31.c: Solves 2D compressible Euler using multigrid

ex32.c: Solves 2D inhomogeneous Laplacian using multigrid

ex34.c: Solves 3D Laplacian using multigrid

ex38.c: Tests the aSA multigrid code

ex39.c: Lattice Gauge 2D model

ex40.c: Lattice Gauge 2D model

ex41.c: Reads a PETSc matrix and vector from a socket connection, solves a linear system and sends the result back

ex42.c: static char help[] =

ex43.c: static char help[] =

ex45.c: Solves 3D Laplacian using multigrid

ex46.c: Solves a linear system in parallel with KSP and DM

ex49.c: static char help[] =

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 using simple quadirlateral finite elements, and uses it to test GAMG\n\

ex55.c: static char help[] =

ex56.c: static char help[] =

ex58.c: Solves a tridiagonal linear system with KSP

makefile