Actual source code: none.c

petsc-3.3-p7 2013-05-11
  2: /*
  3:     Identity preconditioner, simply copies vector x to y.
  4: */
  5: #include <petsc-private/pcimpl.h>          /*I "petscpc.h" I*/

  9: PetscErrorCode PCApply_None(PC pc,Vec x,Vec y)
 10: {

 14:   VecCopy(x,y);
 15:   return(0);
 16: }

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

 22:    Level: beginner

 24:   Concepts: preconditioners

 26:   Notes: This is implemented by a VecCopy()

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

 31: EXTERN_C_BEGIN
 34: PetscErrorCode  PCCreate_None(PC pc)
 35: {
 37:   pc->ops->apply               = PCApply_None;
 38:   pc->ops->applytranspose      = PCApply_None;
 39:   pc->ops->destroy             = 0;
 40:   pc->ops->setup               = 0;
 41:   pc->ops->view                = 0;
 42:   pc->ops->applysymmetricleft  = PCApply_None;
 43:   pc->ops->applysymmetricright = PCApply_None;

 45:   pc->data                     = 0;
 46:   return(0);
 47: }
 48: EXTERN_C_END