1dba47a55SKris Buschelman 24b9ad928SBarry Smith /* 34b9ad928SBarry Smith Identity preconditioner, simply copies vector x to y. 44b9ad928SBarry Smith */ 5af0996ceSBarry Smith #include <petsc/private/pcimpl.h> /*I "petscpc.h" I*/ 64b9ad928SBarry Smith 7dfbe8321SBarry Smith PetscErrorCode PCApply_None(PC pc,Vec x,Vec y) 84b9ad928SBarry Smith { 9dfbe8321SBarry Smith PetscErrorCode ierr; 104b9ad928SBarry Smith 114b9ad928SBarry Smith PetscFunctionBegin; 124b9ad928SBarry Smith ierr = VecCopy(x,y);CHKERRQ(ierr); 134b9ad928SBarry Smith PetscFunctionReturn(0); 144b9ad928SBarry Smith } 154b9ad928SBarry Smith 164b9ad928SBarry Smith /*MC 174b9ad928SBarry Smith PCNONE - This is used when you wish to employ a nonpreconditioned 184b9ad928SBarry Smith Krylov method. 194b9ad928SBarry Smith 204b9ad928SBarry Smith Level: beginner 214b9ad928SBarry Smith 2295452b02SPatrick Sanan Notes: 2395452b02SPatrick Sanan This is implemented by a VecCopy() 244b9ad928SBarry Smith 254b9ad928SBarry Smith .seealso: PCCreate(), PCSetType(), PCType (for list of available types), PC 264b9ad928SBarry Smith M*/ 274b9ad928SBarry Smith 288cc058d9SJed Brown PETSC_EXTERN PetscErrorCode PCCreate_None(PC pc) 294b9ad928SBarry Smith { 304b9ad928SBarry Smith PetscFunctionBegin; 314b9ad928SBarry Smith pc->ops->apply = PCApply_None; 324b9ad928SBarry Smith pc->ops->applytranspose = PCApply_None; 33*0a545947SLisandro Dalcin pc->ops->destroy = NULL; 34*0a545947SLisandro Dalcin pc->ops->setup = NULL; 35*0a545947SLisandro Dalcin pc->ops->view = NULL; 364b9ad928SBarry Smith pc->ops->applysymmetricleft = PCApply_None; 374b9ad928SBarry Smith pc->ops->applysymmetricright = PCApply_None; 384b9ad928SBarry Smith 39*0a545947SLisandro Dalcin pc->data = NULL; 404b9ad928SBarry Smith PetscFunctionReturn(0); 414b9ad928SBarry Smith } 42