KSP

The following KSP routines are available:

PETSc.KSPMethod
KSP(da::AbstractDM; options...)

Construct a PETSc Krylov subspace solver from the distributed mesh

Any PETSc options prefixed with ksp_ and pc_ can be passed as keywords.

see PETSc manual

source
PETSc.KSPMethod
KSP(A, P; options...)

Construct a PETSc Krylov subspace solver.

Any PETSc options prefixed with ksp_ and pc_ can be passed as keywords.

source
PETSc.KSPSetComputeOperators!Function
KSPSetComputeOperators!(
    ksp::KSP{Number},
    ComputeOperators!,
    ctx = C_NULL,
)

Set the linear operators function ComputeOperators! for the ksp using the user ctx. ComputeOperators! should be callable with four arguments of type (::KSP{Number}, ::Mat, ::Mat, ::Ptr); see PETSc manual

source
PETSc.KSPSetComputeRHS!Function
KSPSetComputeRHS!(
    ksp::KSP{Number},
    ComputeRHS!,
    ctx = C_NULL,
)

Set the right-hand side function ComputeRHS! for the ksp using the user ctx. ComputeRHS! should be callable with three arguments of type (::KSP{Number}, ::Vec, ::Ptr); see PETSc manual

source