Actual source code: none.c
petsc-3.13.6 2020-09-29
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:   Notes:
     23:     This is implemented by a VecCopy()

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

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

     39:   pc->data = 0;
     40:   return(0);
     41: }