petsc-3.7.1 2016-05-15
Report Typos and Errors

KSPSetOptionsPrefix

Sets the prefix used for searching for all KSP options in the database.

Synopsis

#include "petscksp.h" 
PetscErrorCode  KSPSetOptionsPrefix(KSP ksp,const char prefix[])
Logically Collective on KSP Many br

Input Parameters

ksp - the Krylov context Many br
prefix - the prefix string to prepend to all KSP option requests Many br

Notes

A hyphen (-) must NOT be given at the beginning of the prefix name. Many brThe first character of all runtime options is AUTOMATICALLY the Many brhyphen. Many br

For example, to distinguish between the runtime options for two Many brdifferent KSP contexts, one could call Many br

      KSPSetOptionsPrefix(ksp1,"sys1_")
      KSPSetOptionsPrefix(ksp2,"sys2_")
Many br

This would enable use of different options for each system, such as Many br

      -sys1_ksp_type gmres -sys1_ksp_rtol 1.e-3
      -sys2_ksp_type bcgs  -sys2_ksp_rtol 1.e-4
Many br

Many br

Keywords

KSP, set, options, prefix, database

See Also

KSPAppendOptionsPrefix(), KSPGetOptionsPrefix()

Level:advanced
Location:
src/ksp/ksp/interface/itcl.c
Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/ksp/ksp/examples/tutorials/ex42.c.html
src/ksp/ksp/examples/tutorials/ex43.c.html
src/ksp/ksp/examples/tutorials/ex49.c.html