petsc-3.7.1 2016-05-15
Report Typos and Errors

# 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

    #include "petscksp.h"
    PetscErrorCode  KSPCGSetType(KSP ksp,KSPCGType type)

Logically Collective on KSP Many br

### Input Parameters

| ksp | - the iterative context Many br
| type | - the variant of CG to use, one of Many br

          KSP_CG_HERMITIAN - complex, Hermitian matrix (default)
          KSP_CG_SYMMETRIC - complex, symmetric matrix

Many br

Many br

### Options Database Keys

| -ksp_cg_Hermitian | - Indicates Hermitian matrix Many br
| -ksp_cg_symmetric | - Indicates symmetric matrix Many br

### Note

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

### Keywords

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

Level:intermediate
Location:src/ksp/ksp/impls/cg/cgtype.c
Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages