DMPlexSNESComputeResidualFEM — PETSc 3.25.4 documentation

Skip to main content
`Ctrl`+`K`

# DMPlexSNESComputeResidualFEM

Sums the local residual into vector `F` from the local input `X` using pointwise functions specified by the user

## Synopsis

    #include "petscdmplex.h"
    #include "petscsnes.h"
    PetscErrorCode DMPlexSNESComputeResidualFEM(DM dm, Vec X, Vec F, PetscCtx ctx)

## Input Parameters

- dm - The mesh

- X - Local solution

- ctx - The application context

## Output Parameter

- F - Local output vector

## Note

The residual is summed into `F`; the caller is responsible for using `VecZeroEntries()` or otherwise ensuring that any data in `F` is intentional.

## See Also

SNES: Nonlinear Solvers, `DM`, `DMPLEX`, `DMSNESComputeJacobianAction()`

## Level

developer

## Location

src/snes/utils/dmplexsnes.c

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