Date: 2016-07-24T17:03:24+00:00

Actual source code: none.c
petsc-3.7.3 2016-07-24
Report Typos and Errors

      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*/

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

     44:   pc->data = 0;
     45:   return(0);
     46: }