SNESPatchSetComputeFunction#
Set the callback used to compute the per-patch nonlinear residual for a SNESPATCH solver
Synopsis#
#include "petscsnes.h"
PetscErrorCode SNESPatchSetComputeFunction(SNES snes, PetscErrorCode (*func)(PC pc, PetscInt point, Vec x, Vec f, IS cellIS, PetscInt n, const PetscInt *dofsArray, const PetscInt *dofsArrayWithAll, PetscCtx ctx), PetscCtx ctx)
Logically Collective
Input Parameters#
snes - the
SNESPATCHsolverfunc - callback that computes the patch residual; forwarded to the underlying
PCPATCHviaPCPatchSetComputeFunction()ctx - optional application context passed to
func
Calling sequence of func#
point - the point
x - the input solution (not used in linear problems)
f - the patch residual vector
cellIS - an array of the cell numbers
n - the size of
dofsArraydofsArray - the dofmap for the dofs to be solved for
dofsArrayWithAll - the dofmap for all dofs on the patch
ctx - the application context
See Also#
SNES: Nonlinear Solvers, SNESPATCH, PCPATCH, PCPatchSetComputeFunction(), SNESPatchSetComputeOperator()
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