1 2 /* 3 Identity preconditioner, simply copies vector x to y. 4 */ 5 #include <private/pcimpl.h> /*I "petscpc.h" I*/ 6 7 #undef __FUNCT__ 8 #define __FUNCT__ "PCApply_None" 9 PetscErrorCode PCApply_None(PC pc,Vec x,Vec y) 10 { 11 PetscErrorCode ierr; 12 13 PetscFunctionBegin; 14 ierr = VecCopy(x,y);CHKERRQ(ierr); 15 PetscFunctionReturn(0); 16 } 17 18 /*MC 19 PCNONE - This is used when you wish to employ a nonpreconditioned 20 Krylov method. 21 22 Level: beginner 23 24 Concepts: preconditioners 25 26 Notes: This is implemented by a VecCopy() 27 28 .seealso: PCCreate(), PCSetType(), PCType (for list of available types), PC 29 M*/ 30 31 EXTERN_C_BEGIN 32 #undef __FUNCT__ 33 #define __FUNCT__ "PCCreate_None" 34 PetscErrorCode PCCreate_None(PC pc) 35 { 36 PetscFunctionBegin; 37 pc->ops->apply = PCApply_None; 38 pc->ops->applytranspose = PCApply_None; 39 pc->ops->destroy = 0; 40 pc->ops->setup = 0; 41 pc->ops->view = 0; 42 pc->ops->applysymmetricleft = PCApply_None; 43 pc->ops->applysymmetricright = PCApply_None; 44 45 pc->data = 0; 46 PetscFunctionReturn(0); 47 } 48 EXTERN_C_END 49