KSPGuessRegister#

Registers a method for initial guess computation in Krylov subspace solver package.

Synopsis#

#include "petscksp.h"  
PetscErrorCode KSPGuessRegister(const char sname[], PetscErrorCode (*function)(KSPGuess))

Not Collective

Input Parameters#

  • sname - name of a new user-defined solver

  • function - routine to create method context

Example Usage#

   KSPGuessRegister("my_initial_guess", MyInitialGuessCreate);

Then, it can be chosen with the procedural interface via

KSPSetGuessType(ksp, "my_initial_guess")

or at runtime via the option

-ksp_guess_type my_initial_guess

Notes#

KSPGuessRegister() may be called multiple times to add several user-defined solvers.

See Also#

KSP: Linear System Solvers, KSPGuess, KSPGuessRegisterAll()

Level#

developer

Location#

src/ksp/ksp/interface/iguess.c


Edit on GitLab

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