:orphan: # PCPatchSetComputeOperator Set the callback used to compute patch matrices ## Synopsis ``` #include "petscpc.h" #include "petscmat.h" PetscErrorCode PCPatchSetComputeOperator(PC pc, PetscErrorCode (*func)(PC, PetscInt, Vec, Mat, IS, PetscInt, const PetscInt *, const PetscInt *, void *), void *ctx) ``` Logically Collective ## Input Parameters - ***pc -*** The `PC` - ***func -*** The callback - ***ctx -*** The user context ## Calling sequence of `func` ```none PetscErrorCode func(PC pc, PetscInt point, Vec x, Mat mat, IS facetIS, PetscInt n, const PetscInt* dofsArray, const PetscInt* dofsArrayWithAll, void* ctx) ``` - ***pc -*** The `PC` - ***point -*** The point - ***x -*** The input solution (not used in linear problems) - ***mat -*** The patch matrix - ***cellIS -*** An array of the cell numbers - ***n -*** The size of `dofsArray` - ***dofsArray -*** The dofmap for the dofs to be solved for - ***dofsArrayWithAll -*** The dofmap for all dofs on the patch - ***ctx -*** The user context ## Note The matrix entries have been set to zero before the call. ## See Also `PCPatchGetComputeOperator()`, `PCPatchSetComputeFunction()`, `PCPatchSetDiscretisationInfo()` ## Level advanced ## Location src/ksp/pc/impls/patch/pcpatch.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ksp/pc/impls/patch/pcpatch.c) [Index of all PC routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)