KSP

  • solving a linear system Reads a PETSc matrix and vector from a file and solves a linear system.
    Tests inplace factorization for SeqBAIJ. Input parameters include
    -f0 <input_file> : first file to load (small system)
  • writing a user-defined nonlinear solver (parallel Bratu example); Solves a nonlinear system in parallel with a user-defined Newton method.
    Uses KSP to solve the linearized Newton sytems. This solver
    is a very simplistic inexact Newton method. The intent of this code is to
    demonstrate the repeated solution of linear sytems with the same nonzero pattern.

    This is NOT the recommended approach for solving nonlinear problems with PETSc!
    We urge users to employ the SNES component for solving nonlinear problems whenever
    possible, as it offers many advantages over coding nonlinear solvers independently.

    We solve the Bratu (SFI - solid fuel ignition) problem in a 2D rectangular
    domain, using distributed arrays (DAs) to partition the parallel grid.