KSP
The following KSP routines are available:
PETSc.Fn_KSPComputeOperators — Typestruct Fn_KSPComputeOperators{T} endType used to wrap ComputeOperators! functions in KSP
PETSc.Fn_KSPComputeRHS — Typestruct Fn_KSPComputeRHS{T} endType used to wrap ComputeRHS! functions in KSP
PETSc.KSP — MethodKSP(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
PETSc.KSP — MethodKSP(A, P; options...)Construct a PETSc Krylov subspace solver.
Any PETSc options prefixed with ksp_ and pc_ can be passed as keywords.
PETSc.KSPSetComputeOperators! — FunctionKSPSetComputeOperators!(
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
PETSc.KSPSetComputeRHS! — FunctionKSPSetComputeRHS!(
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
PETSc.iters — Functioniters(ksp::KSP)Gets the current iteration number; if the solve! is complete, returns the number of iterations used.
External Links
- PETSc Manual:
KSP/KSPGetIterationNumber
PETSc.resnorm — Functionresnorm(ksp::KSP)Gets the last (approximate preconditioned) residual norm that has been computed.
External Links
- PETSc Manual:
KSP/KSPGetResidualNorm