Skip to main content
`Ctrl`+`K`

# DMPlexComputeL2FluxDiffVecLocal

This function computes the integral of the difference between the gradient of field `f`in `u` and field `mf` in `mu`

## Synopsis

    #include "petscdmplex.h"
    PetscErrorCode DMPlexComputeL2FluxDiffVecLocal(Vec lu, PetscInt f, Vec lmu, PetscInt mf, Vec eFlux)

Collective

## Input Parameters

- lu - The local `Vec` containing the primal solution

- f - The field number for the potential

- lmu - The local `Vec` containing the mixed solution

- mf - The field number for the flux

## Output Parameter

- eFlux - A global `Vec` which holds \(||\nabla u_f - \mu_{mf}||\)

## Notes

We assume that the `DM` for each solution has the same topology, geometry, and quadrature.

This is usually used to get an error estimate for the primal solution, using the flux from a mixed solution.

## See Also

DMPlex: Unstructured Grids, `DM`, `DMPLEX`, `DMPlexComputeL2FluxDiffVec()`, `DMProjectFunction()`, `DMComputeL2Diff()`, `DMPlexComputeL2FieldDiff()`, `DMComputeL2GradientDiff()`

## Level

advanced

## Location

src/dm/impls/plex/plexfem.c

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