Accelerating the pace of engineering and science

# Documentation

### Contents

Flux of PDE solution

## Syntax

```[cgxu,cgyu] = pdecgrad(p,t,c,u)
```

## Description

[cgxu,cgyu] = pdecgrad(p,t,c,u) returns the flux, $\underset{¯}{c}\otimes \nabla u$, evaluated at the center of each triangle.

Row i of cgxu contains

$\sum _{j=1}^{N}{c}_{ij11}\frac{\partial {u}_{j}}{\partial x}+{c}_{ij12}\frac{\partial {u}_{j}}{\partial y}$

Row i of cgyu contains

$\sum _{j=1}^{N}{c}_{ij21}\frac{\partial {u}_{j}}{\partial x}+{c}_{ij22}\frac{\partial {u}_{j}}{\partial y}$

There is one column for each triangle in t in both cgxu and cgyu.

The geometry of the PDE problem is given by the mesh data p and t. Details on the mesh data representation can be found in the entry on initmesh.

The coefficient c of the PDE problem can be given in a variety of ways. A complete listing of all options can be found in the entry on assempdeScalar PDE Coefficients and c for Systems.

The format for the solution vector u is described in assempde.

The scalar optional argument time is used for parabolic and hyperbolic problems, if c depends on t, the time.

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