KSPEKSMGetKSP#

Returns the internal KSP objects used by EKSM.

Synopsis#

#include "petscksp.h" 
PetscErrorCode KSPEKSMGetKSP(KSP ksp, KSP *ksps, KSP *kspm)

Not Collective, but if ksp is parallel, then ksps and kspm are parallel

Input Parameter#

  • ksp - the Krylov space solver context

Output Parameters#

  • ksps - the KSP context used internally for linear systems with coefficient matrix \(K + \varsigma M\)

  • kspm - the KSP context used internally for linear systems with coefficient matrix \(M\)

Notes#

The extended Krylov subspace method needs to solve linear systems with matrices \(K + \varsigma M\) as well as \(M\) (in case \(M\) is not the identity). Here, \(K\) and \(M\) are the matrices provided in MatCreateNestFromMultipleShifts() and \(\varsigma\) is the shift set with KSPEKSMSetShift().

This function is provided to allow the user to configure the internal KSP objects that will do most of the work. Pass NULL to any of the arguments if not needed. In particular, if \(M=I\) the kspm object is not needed.

To configure the linear solvers from the command line, use the -eksm_s_ and -eksm_m_ prefixes, respectively. For instance -ksp_type eksm -eksm_s_ksp_type bcgs -eksm_s_pc_type bjacobi -eksm_m_pc_type none.

See Also#

KSP: Linear System Solvers, KSPEKSM, MatCreateNestFromMultipleShifts(), KSPEKSMSetShift(), KSPEKSMSetKSP()

Level#

intermediate

Location#

src/ksp/ksp/impls/eksm/eksm.c

Implementations#

KSPEKSMGetKSP_EKSM() in src/ksp/ksp/impls/eksm/eksm.c


Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages