# pdegrad

Gradient of PDE solution

## 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

$\frac{\partial {u}_{i}}{\partial x}$

Row i from 1 to N of `uy` contains

$\frac{\partial {u}_{i}}{\partial y}$

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`.

For a description of the format for the solution vector `u`, see `assempde`.

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

## See Also

Was this topic helpful?

Get trial now