SNESPatchSetConstructType — PETSc 3.25.4 documentation

Skip to main content
`Ctrl`+`K`

# SNESPatchSetConstructType

Set the way patches are constructed for a `SNESPATCH` solver

## Synopsis

    #include "petscsnes.h"
    PetscErrorCode SNESPatchSetConstructType(SNES snes, PCPatchConstructType ctype, PetscErrorCode (*func)(PC pc, PetscInt *npatch, IS *patches[], IS *patchIterationSet, PetscCtx ctx), PetscCtx ctx)

Logically Collective

## Input Parameters

- snes - the `SNESPATCH` solver

- ctype - the `PCPatchConstructType` selecting the patch construction strategy

- func - user callback that builds the patches, used only when `ctype` is `PC_PATCH_USER` or `PC_PATCH_PYTHON`; may be `NULL` otherwise

- ctx - optional application context passed to `func`

## Calling sequence of `func`

- pc - the `PC` associated with the `SNESPATCH` solver

- npatch - number of patches

- patches - the `IS` that define each patch

- patchIterationSet - how the patches are iterated over

- ctx - optional application context

## See Also

SNES: Nonlinear Solvers, `SNESPATCH`, `PCPATCH`, `PCPatchSetConstructType()`, `PCPatchConstructType`

## Level

advanced

## Location

src/snes/impls/patch/snespatch.c

Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages