Skip to main content
`Ctrl`+`K`

# DMPlexSetSNESLocalFEM

Use `DMPLEX`’s internal FEM routines to compute `SNES` boundary values, objective, residual, and Jacobian.

## Synopsis

    #include "petscdmplex.h"
    #include "petscsnes.h"
    PetscErrorCode DMPlexSetSNESLocalFEM(DM dm, PetscBool use_obj, void *ctx)

## Input Parameters

- dm - The `DM` object

- use_obj - Use the objective function callback

- ctx - The user context that will be passed to pointwise evaluation routines

## See Also

SNES: Nonlinear Solvers,`DMPLEX`, `SNES`, `PetscDSAddBoundary()`, `PetscDSSetObjective()`, `PetscDSSetResidual()`, `PetscDSSetJacobian()`

## Level

developer

## Location

src/snes/utils/dmplexsnes.c

## Examples

src/snes/tutorials/ex64.c
src/snes/tutorials/ex11.c
src/snes/tutorials/ex12.c
src/snes/tutorials/ex20.c
src/snes/tutorials/ex23.c
src/snes/tutorials/ex63.c
src/snes/tutorials/ex13.c
src/snes/tutorials/ex26.c
src/snes/tutorials/ex24.c
src/snes/tutorials/ex17.c

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