petsc-3.6.1 2015-08-06
Report Typos and Errors

DMDAComputeL2GradientDiff

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

Synopsis

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

Input Parameters

dm - The DM
funcs - The gradient functions to evaluate for each field component
ctxs - Optional array of contexts to pass to each coordinate function. ctxs itself may be null.
X - The coefficient vector u_h
n - The vector to project along

Output Parameter

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

See Also

DMDAProjectFunction(), DMPlexComputeL2Diff()

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