Documentation

pdegrad

Gradient of PDE solution

THIS PAGE DESCRIBES THE LEGACY WORKFLOW. New features might not be compatible with the legacy workflow. For the corresponding step in the recommended workflow, see evaluateGradient.

Syntax

[ux,uy] = pdegrad(p,t,u)
[ux,uy] = pdegrad(p,t,u,sdl)

Description

[ux,uy] = pdegrad(p,t,u) returns the gradient of u evaluated at the center of each triangle.

Row i from 1 to N of ux contains

uix

Row i from 1 to N of uy contains

uiy

There is one column for each triangle in t in both ux and uy.

The geometry of the PDE problem is given by the mesh data p and t. For details on the mesh data representation, see initmesh.

The optional argument sdl restricts the computation to the subdomains in the list sdl.

Was this topic helpful?