Actual source code: none.c

petsc-3.11.3 2019-06-26
Report Typos and Errors

  2: /*
  3:     Identity preconditioner, simply copies vector x to y.
  4: */
  5:  #include <petsc/private/pcimpl.h>

  7: PetscErrorCode PCApply_None(PC pc,Vec x,Vec y)
  8: {

 12:   VecCopy(x,y);
 13:   return(0);
 14: }

 16: /*MC
 17:      PCNONE - This is used when you wish to employ a nonpreconditioned
 18:              Krylov method.

 20:    Level: beginner

 22:   Concepts: preconditioners

 24:   Notes:
 25:     This is implemented by a VecCopy()

 27: .seealso:  PCCreate(), PCSetType(), PCType (for list of available types), PC
 28: M*/

 30: PETSC_EXTERN PetscErrorCode PCCreate_None(PC pc)
 31: {
 33:   pc->ops->apply               = PCApply_None;
 34:   pc->ops->applytranspose      = PCApply_None;
 35:   pc->ops->destroy             = 0;
 36:   pc->ops->setup               = 0;
 37:   pc->ops->view                = 0;
 38:   pc->ops->applysymmetricleft  = PCApply_None;
 39:   pc->ops->applysymmetricright = PCApply_None;

 41:   pc->data = 0;
 42:   return(0);
 43: }