Actual source code: cgtype.c
1: /*$Id: cgtype.c,v 1.23 2001/04/10 19:36:31 bsmith Exp $*/
3: #include src/sles/ksp/impls/cg/cgctx.h
5: /*@
6: KSPCGSetType - Sets the variant of the conjugate gradient method to
7: use for solving a linear system with a complex coefficient matrix.
8: This option is irrelevant when solving a real system.
10: Collective on KSP
12: Input Parameters:
13: + ksp - the iterative context
14: - type - the variant of CG to use, one of
15: .vb
16: KSP_CG_HERMITIAN - complex, Hermitian matrix (default)
17: KSP_CG_SYMMETRIC - complex, symmetric matrix
18: .ve
20: Level: intermediate
21:
22: Options Database Keys:
23: + -ksp_cg_Hermitian - Indicates Hermitian matrix
24: - -ksp_cg_symmetric - Indicates symmetric matrix
26: Note:
27: By default, the matrix is assumed to be complex, Hermitian.
29: .keywords: CG, conjugate gradient, Hermitian, symmetric, set, type
30: @*/
31: int KSPCGSetType(KSP ksp,KSPCGType type)
32: {
33: int ierr,(*f)(KSP,KSPCGType);
37: PetscObjectQueryFunction((PetscObject)ksp,"KSPCGSetType_C",(void (**)(void))&f);
38: if (f) {
39: (*f)(ksp,type);
40: }
41: return(0);
42: }