Skip to main content
Ctrl+K
PETSc 3.23.1 documentation - Home
  • Overview
  • Install
  • Tutorials
  • User-Guide
  • C/Fortran API
  • petsc4py API
  • FAQ
  • Community
  • Developers
  • Misc.
  • GitLab
  • Overview
  • Install
  • Tutorials
  • User-Guide
  • C/Fortran API
  • petsc4py API
  • FAQ
  • Community
  • Developers
  • Misc.
  • GitLab
  • PCShellSetApply

PCShellSetApply#

Sets routine to use as preconditioner.

Synopsis#

#include "petscpc.h" 
PetscErrorCode PCShellSetApply(PC pc, PetscErrorCode (*apply)(PC pc, Vec xin, Vec xout))

Logically Collective

Input Parameters#

  • pc - the preconditioner context

  • apply - the application-provided preconditioning routine

Calling sequence of apply#

  • pc - the preconditioner, get the application context with PCShellGetContext()

  • xin - input vector

  • xout - output vector

Note#

You can get the PCSHELL context set with PCShellSetContext() using PCShellGetContext() if needed by apply.

See Also#

KSP: Linear System Solvers, PCSHELL, PCShellSetApplyRichardson(), PCShellSetSetUp(), PCShellSetApplyTranspose(), PCShellSetContext(), PCShellSetApplyBA(), PCShellSetApplySymmetricRight(), PCShellSetApplySymmetricLeft(), PCShellGetContext()

Level#

intermediate

Location#

src/ksp/pc/impls/shell/shellpc.c

Examples#

src/tao/pde_constrained/tutorials/hyperbolic.c
src/tao/pde_constrained/tutorials/parabolic.c
src/snes/tutorials/ex3.c
src/ksp/ksp/tutorials/ex60.c
src/ksp/ksp/tutorials/ex15.c
src/ksp/pc/tutorials/ex4.c
src/ksp/ksp/tutorials/ex15f.F90

Implementations#

PCShellSetApply_Shell(PC pc, PetscErrorCode (*apply)() in src/ksp/pc/impls/shell/shellpc.c


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

On this page
  • Synopsis
  • Input Parameters
  • Calling sequence of apply
  • Note
  • See Also
  • Level
  • Location
  • Examples
  • Implementations
Edit on GitLab
Show Source

© Copyright 1991-2025, UChicago Argonne, LLC and the PETSc Development Team.

Created using Sphinx 7.3.7.

Built with the PyData Sphinx Theme 0.15.1.

Last updated on 2025-04-30T13:10:40-0500 (v3.23.1).