| pcset.c (72ce74bd30d5d09d1371a3eb387704f4af395d1a) | pcset.c (6849ba73f22fecb8f92ef896a42e4e8bd4cd6965) |
|---|---|
| 1/* 2 Routines to set PC methods and options. 3*/ 4 5#include "src/ksp/pc/pcimpl.h" /*I "petscpc.h" I*/ 6#include "petscsys.h" 7 8PetscTruth PCRegisterAllCalled = PETSC_FALSE; --- 62 unchanged lines hidden (view full) --- 71 /* Get the function pointers for the method requested */ 72 if (!PCRegisterAllCalled) {ierr = PCRegisterAll(0);CHKERRQ(ierr);} 73 74 /* Determine the PCCreateXXX routine for a particular preconditioner */ 75 ierr = PetscFListFind(pc->comm,PCList,type,(void (**)(void)) &r);CHKERRQ(ierr); 76 if (!r) SETERRQ1(PETSC_ERR_ARG_UNKNOWN_TYPE,"Unable to find requested PC type %s",type); 77 if (pc->data) {ierr = PetscFree(pc->data);CHKERRQ(ierr);} 78 | 1/* 2 Routines to set PC methods and options. 3*/ 4 5#include "src/ksp/pc/pcimpl.h" /*I "petscpc.h" I*/ 6#include "petscsys.h" 7 8PetscTruth PCRegisterAllCalled = PETSC_FALSE; --- 62 unchanged lines hidden (view full) --- 71 /* Get the function pointers for the method requested */ 72 if (!PCRegisterAllCalled) {ierr = PCRegisterAll(0);CHKERRQ(ierr);} 73 74 /* Determine the PCCreateXXX routine for a particular preconditioner */ 75 ierr = PetscFListFind(pc->comm,PCList,type,(void (**)(void)) &r);CHKERRQ(ierr); 76 if (!r) SETERRQ1(PETSC_ERR_ARG_UNKNOWN_TYPE,"Unable to find requested PC type %s",type); 77 if (pc->data) {ierr = PetscFree(pc->data);CHKERRQ(ierr);} 78 |
| 79 pc->ops->destroy = (int (*)(PC)) 0; 80 pc->ops->view = (int (*)(PC,PetscViewer)) 0; 81 pc->ops->apply = (int (*)(PC,Vec,Vec)) 0; 82 pc->ops->setup = (int (*)(PC)) 0; 83 pc->ops->applyrichardson = (int (*)(PC,Vec,Vec,Vec,PetscReal,PetscReal,PetscReal,int)) 0; 84 pc->ops->applyBA = (int (*)(PC,int,Vec,Vec,Vec)) 0; 85 pc->ops->setfromoptions = (int (*)(PC)) 0; 86 pc->ops->applytranspose = (int (*)(PC,Vec,Vec)) 0; 87 pc->ops->applyBAtranspose = (int (*)(PC,int,Vec,Vec,Vec)) 0; 88 pc->ops->presolve = (int (*)(PC,KSP,Vec,Vec)) 0; 89 pc->ops->postsolve = (int (*)(PC,KSP,Vec,Vec)) 0; 90 pc->ops->getfactoredmatrix = (int (*)(PC,Mat*)) 0; 91 pc->ops->applysymmetricleft = (int (*)(PC,Vec,Vec)) 0; 92 pc->ops->applysymmetricright = (int (*)(PC,Vec,Vec)) 0; 93 pc->ops->setuponblocks = (int (*)(PC)) 0; 94 pc->modifysubmatrices = (int (*)(PC,int,const IS[],const IS[],Mat[],void*)) 0; | 79 pc->ops->destroy = (PetscErrorCode (*)(PC)) 0; 80 pc->ops->view = (PetscErrorCode (*)(PC,PetscViewer)) 0; 81 pc->ops->apply = (PetscErrorCode (*)(PC,Vec,Vec)) 0; 82 pc->ops->setup = (PetscErrorCode (*)(PC)) 0; 83 pc->ops->applyrichardson = (PetscErrorCode (*)(PC,Vec,Vec,Vec,PetscReal,PetscReal,PetscReal,int)) 0; 84 pc->ops->applyBA = (PetscErrorCode (*)(PC,int,Vec,Vec,Vec)) 0; 85 pc->ops->setfromoptions = (PetscErrorCode (*)(PC)) 0; 86 pc->ops->applytranspose = (PetscErrorCode (*)(PC,Vec,Vec)) 0; 87 pc->ops->applyBAtranspose = (PetscErrorCode (*)(PC,int,Vec,Vec,Vec)) 0; 88 pc->ops->presolve = (PetscErrorCode (*)(PC,KSP,Vec,Vec)) 0; 89 pc->ops->postsolve = (PetscErrorCode (*)(PC,KSP,Vec,Vec)) 0; 90 pc->ops->getfactoredmatrix = (PetscErrorCode (*)(PC,Mat*)) 0; 91 pc->ops->applysymmetricleft = (PetscErrorCode (*)(PC,Vec,Vec)) 0; 92 pc->ops->applysymmetricright = (PetscErrorCode (*)(PC,Vec,Vec)) 0; 93 pc->ops->setuponblocks = (PetscErrorCode (*)(PC)) 0; 94 pc->modifysubmatrices = (PetscErrorCode (*)(PC,int,const IS[],const IS[],Mat[],void*)) 0; |
| 95 96 /* Call the PCCreateXXX routine for this particular preconditioner */ 97 ierr = (*r)(pc);CHKERRQ(ierr); 98 99 ierr = PetscObjectChangeTypeName((PetscObject)pc,type);CHKERRQ(ierr); 100 PetscFunctionReturn(0); 101} 102 --- 111 unchanged lines hidden --- | 95 96 /* Call the PCCreateXXX routine for this particular preconditioner */ 97 ierr = (*r)(pc);CHKERRQ(ierr); 98 99 ierr = PetscObjectChangeTypeName((PetscObject)pc,type);CHKERRQ(ierr); 100 PetscFunctionReturn(0); 101} 102 --- 111 unchanged lines hidden --- |