1: #define PETSCKSP_DLL
3: /*
4: Identity preconditioner, simply copies vector x to y.
5: */
6: #include private/pcimpl.h
10: PetscErrorCode PCApply_None(PC pc,Vec x,Vec y)
11: {
15: VecCopy(x,y);
16: return(0);
17: }
19: /*MC
20: PCNONE - This is used when you wish to employ a nonpreconditioned
21: Krylov method.
23: Level: beginner
25: Concepts: preconditioners
27: Notes: This is implemented by a VecCopy()
29: .seealso: PCCreate(), PCSetType(), PCType (for list of available types), PC
30: M*/
35: PetscErrorCode PCCreate_None(PC pc)
36: {
38: pc->ops->apply = PCApply_None;
39: pc->ops->applytranspose = PCApply_None;
40: pc->ops->destroy = 0;
41: pc->ops->setup = 0;
42: pc->ops->view = 0;
43: pc->ops->applysymmetricleft = PCApply_None;
44: pc->ops->applysymmetricright = PCApply_None;
46: pc->data = 0;
47: return(0);
48: }