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/ex20.c
src/snes/tutorials/ex23.c
src/snes/tutorials/ex63.c
src/snes/tutorials/ex76.c
src/snes/tutorials/ex8.c
src/snes/tutorials/ex71.c
src/snes/tutorials/ex26.c
src/snes/tutorials/ex12.c
src/snes/tutorials/ex77.c
src/snes/tutorials/ex11.c

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