1: /* 2: Identity preconditioner, simply copies vector x to y. 3: */ 4: #include src/ksp/pc/pcimpl.h 8: PetscErrorCode PCApply_None(PC pc,Vec x,Vec y) 9: { 13: VecCopy(x,y); 14: return(0); 15: } 17: /*MC 18: PCNONE - This is used when you wish to employ a nonpreconditioned 19: Krylov method. 21: Level: beginner 23: Concepts: preconditioners 25: Notes: This is implemented by a VecCopy() 27: .seealso: PCCreate(), PCSetType(), PCType (for list of available types), PC 28: M*/ 33: 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: }