TSGetKSP#

Returns the KSP (linear solver) associated with a TS (timestepper) context.

Synopsis#

#include "petscts.h"  
PetscErrorCode TSGetKSP(TS ts, KSP *ksp)

Not Collective, but ksp is parallel if ts is parallel

Input Parameter#

Output Parameter#

  • ksp - the nonlinear solver context

Notes#

The user can then directly manipulate the KSP context to set various options, etc. Likewise, the user can then extract and manipulate the PC context as well.

For nonlinear problems (TS_NONLINEAR), use TSGetSNES() followed by SNESGetKSP().

For integrators that do not use KSP (that is, explicit methods), TSGetKSP() returns a ksp that is not used. Use TSIsImplicit() to determine if the ksp is actually used.

See Also#

TS: Scalable ODE and DAE Solvers, TS, SNES, KSP, TSCreate(), TSSetUp(), TSSolve(), TSGetSNES(), TSIsImplicit()

Level#

beginner

Location#

src/ts/interface/ts.c


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