Lines Matching refs:pc

46 PetscErrorCode PCSetType(PC pc, PCType type)  in PCSetType()  argument
52 PetscValidHeaderSpecific(pc, PC_CLASSID, 1); in PCSetType()
55 PetscCall(PetscObjectTypeCompare((PetscObject)pc, type, &match)); in PCSetType()
59 …PetscCheck(r, PetscObjectComm((PetscObject)pc), PETSC_ERR_ARG_UNKNOWN_TYPE, "Unable to find reques… in PCSetType()
61 PetscTryTypeMethod(pc, destroy); in PCSetType()
63 PetscCall(PetscFunctionListDestroy(&((PetscObject)pc)->qlist)); in PCSetType()
65 PetscCall(PetscMemzero(pc->ops, sizeof(struct _PCOps))); in PCSetType()
67 pc->modifysubmatrices = NULL; in PCSetType()
68 pc->modifysubmatricesP = NULL; in PCSetType()
70 pc->setupcalled = PETSC_FALSE; in PCSetType()
72 PetscCall(PetscObjectChangeTypeName((PetscObject)pc, type)); in PCSetType()
73 PetscCall((*r)(pc)); in PCSetType()
93 PetscErrorCode PCGetType(PC pc, PCType *type) in PCGetType() argument
96 PetscValidHeaderSpecific(pc, PC_CLASSID, 1); in PCGetType()
98 *type = ((PetscObject)pc)->type_name; in PCGetType()
125 PetscErrorCode PCSetFromOptions(PC pc) in PCSetFromOptions() argument
132 PetscValidHeaderSpecific(pc, PC_CLASSID, 1); in PCSetFromOptions()
135 if (!((PetscObject)pc)->type_name) { in PCSetFromOptions()
136 PetscCall(PCGetDefaultType_Private(pc, &def)); in PCSetFromOptions()
138 def = ((PetscObject)pc)->type_name; in PCSetFromOptions()
140 PetscObjectOptionsBegin((PetscObject)pc); in PCSetFromOptions()
144 PetscCall(PCSetType(pc, type)); in PCSetFromOptions()
145 } else if (!((PetscObject)pc)->type_name && def) { in PCSetFromOptions()
146 PetscCall(PCSetType(pc, def)); in PCSetFromOptions()
149 PetscCall(PetscObjectTypeCompare((PetscObject)pc, PCNONE, &flg)); in PCSetFromOptions()
152 …) to define preconditioner in nested inner solves", "PCSetUseAmat", pc->useAmat, &pc->useAmat, NUL… in PCSetFromOptions()
154 PetscTryTypeMethod(pc, setfromoptions, PetscOptionsObject); in PCSetFromOptions()
158 PetscCall(PetscObjectProcessOptionsHandlers((PetscObject)pc, PetscOptionsObject)); in PCSetFromOptions()
160 pc->setfromoptionscalled++; in PCSetFromOptions()
184 PetscErrorCode PCSetDM(PC pc, DM dm) in PCSetDM() argument
187 PetscValidHeaderSpecific(pc, PC_CLASSID, 1); in PCSetDM()
189 PetscCall(DMDestroy(&pc->dm)); in PCSetDM()
190 pc->dm = dm; in PCSetDM()
209 PetscErrorCode PCGetDM(PC pc, DM *dm) in PCGetDM() argument
212 PetscValidHeaderSpecific(pc, PC_CLASSID, 1); in PCGetDM()
213 *dm = pc->dm; in PCGetDM()
235 PetscErrorCode PCSetApplicationContext(PC pc, PetscCtx ctx) in PCSetApplicationContext() argument
238 PetscValidHeaderSpecific(pc, PC_CLASSID, 1); in PCSetApplicationContext()
239 pc->ctx = ctx; in PCSetApplicationContext()
264 PetscErrorCode PCGetApplicationContext(PC pc, PetscCtxRt ctx) in PCGetApplicationContext() argument
267 PetscValidHeaderSpecific(pc, PC_CLASSID, 1); in PCGetApplicationContext()
268 *(void **)ctx = pc->ctx; in PCGetApplicationContext()