Actual source code: cgtype.c

 2:  #include src/ksp/ksp/impls/cg/cgctx.h

  6: /*@
  7:     KSPCGSetType - Sets the variant of the conjugate gradient method to
  8:     use for solving a linear system with a complex coefficient matrix.
  9:     This option is irrelevant when solving a real system.

 11:     Collective on KSP

 13:     Input Parameters:
 14: +   ksp - the iterative context
 15: -   type - the variant of CG to use, one of
 16: .vb
 17:       KSP_CG_HERMITIAN - complex, Hermitian matrix (default)
 18:       KSP_CG_SYMMETRIC - complex, symmetric matrix
 19: .ve

 21:     Level: intermediate
 22:     
 23:     Options Database Keys:
 24: +   -ksp_cg_Hermitian - Indicates Hermitian matrix
 25: -   -ksp_cg_symmetric - Indicates symmetric matrix

 27:     Note:
 28:     By default, the matrix is assumed to be complex, Hermitian.

 30: .keywords: CG, conjugate gradient, Hermitian, symmetric, set, type
 31: @*/
 32: PetscErrorCode KSPCGSetType(KSP ksp,KSPCGType type)
 33: {
 34:   PetscErrorCode ierr,(*f)(KSP,KSPCGType);

 38:   PetscObjectQueryFunction((PetscObject)ksp,"KSPCGSetType_C",(void (**)(void))&f);
 39:   if (f) {
 40:     (*f)(ksp,type);
 41:   }
 42:   return(0);
 43: }