KSPCGSetType

Sets the variant of the conjugate gradient method to use for solving a linear system with a complex coefficient matrix. This option is irrelevant when solving a real system.

Synopsis

int KSPCGSetType(KSP ksp,KSPCGType type)
Collective on KSP

Input Parameters

ksp - the iterative context
type - the variant of CG to use, one of
      KSP_CG_HERMITIAN - complex, Hermitian matrix (default)
      KSP_CG_SYMMETRIC - complex, symmetric matrix

Options Database Keys

-ksp_cg_Hermitian - Indicates Hermitian matrix
-ksp_cg_symmetric - Indicates symmetric matrix

Note

By default, the matrix is assumed to be complex, Hermitian.

Keywords

CG, conjugate gradient, Hermitian, symmetric, set, type

Location: src/ksp/impls/cg/cgtype.c
KSP Index
Table of Contents