#include "petscdm.h" #include "petscdmlabel.h" #include "petscds.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)Collective on dm
dm | - The DM , time - The time | |
funcs | - The gradient functions to evaluate for each field component | |
ctxs | - Optional array of contexts to pass to each function, or NULL. | |
X | - The coefficient vector u_h, a global vector | |
n | - The vector to project along |
diff | - The diff ||(grad u - grad u_h) . n||_2 |