Actual source code: none.c
petsc-3.9.4 2018-09-11
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: This is implemented by a VecCopy()
26: .seealso: PCCreate(), PCSetType(), PCType (for list of available types), PC
27: M*/
29: PETSC_EXTERN PetscErrorCode PCCreate_None(PC pc)
30: {
32: pc->ops->apply = PCApply_None;
33: pc->ops->applytranspose = PCApply_None;
34: pc->ops->destroy = 0;
35: pc->ops->setup = 0;
36: pc->ops->view = 0;
37: pc->ops->applysymmetricleft = PCApply_None;
38: pc->ops->applysymmetricright = PCApply_None;
40: pc->data = 0;
41: return(0);
42: }