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

# DMComputeL2GradientDiff

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

### Synopsis

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

### Input Parameters

| dm | - The DM Many br, time - The time Many br
| funcs | - The gradient 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
| n | - The vector to project along Many br

### Output Parameter

diff -The diff ||(grad u - grad u_h) . n||_2 Many br

Many br

### See Also

DMProjectFunction(), DMComputeL2Diff()

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