petsc-3.7.1 2016-05-15
Report Typos and Errors

# DMComputeL2Diff

This function computes the L_2 difference between a function u and an FEM interpolant solution u_h.

### Synopsis

    #include "petscdm.h"
    #include "petscdmlabel.h"
    PetscErrorCode DMComputeL2Diff(DM dm, PetscReal time, PetscErrorCode (**funcs)(PetscInt, PetscReal, const PetscReal [], PetscInt, PetscScalar *, void *), void **ctxs, Vec X, PetscReal *diff)

### Input Parameters

| dm | - The DM Many br
| time | - The time Many br
| funcs | - The functions to evaluate for each field component Many br
| ctxs | - Optional array of contexts to pass to each function, or NULL. Many br
| X | - The coefficient vector u_h Many br

### Output Parameter

diff -The diff ||u - u_h||_2 Many br

Many br

### See Also

DMProjectFunction(), DMComputeL2FieldDiff(), DMComputeL2GradientDiff()

Level:developer
Location:src/dm/interface/dm.c
Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/snes/examples/tutorials/ex12.c.html
src/snes/examples/tutorials/ex62.c.html