Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Create solution object

**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 solvepde and solvepdeeig.**

**The original (R2015b) version of createPDEResults had
only one syntax, and created a PDEResults object.
Beginning with R2016a, you generally do not need to use createPDEResults,
because the solvepde and solvepdeeig functions
return solution objects. Furthermore, createPDEResults returns
an object of a newer type than PDEResults. If you
open an existing PDEResults object, it is converted
to a StationaryResults object.**

**If you use one of the older solvers such as adaptmesh,
then you can use createPDEResults to obtain a
solution object. Stationary and time-dependent solution objects have
gradients available, whereas PDEResults did not
include gradients.**

`results = createPDEResults(model,u)`

```
results =
createPDEResults(model,u,'stationary')
```

`results = createPDEResults(model,u,utimes,'time-dependent')`

`results = createPDEResults(model,eigenvectors,eigenvalues,'eigen')`

creates
a `results`

= createPDEResults(`model`

,`u`

,`utimes`

,'time-dependent')`TimeDependentResults`

solution
object from `model`

, its solution `u`

,
and the times `utimes`

.

creates
an `results`

= createPDEResults(`model`

,`eigenvectors`

,`eigenvalues`

,'eigen')`EigenResults`

solution
object from `model`

, its eigenvector solution `eigenvectors`

,
and its eigenvalues `eigenvalues`

.

Dimensions of the returned solutions and gradients are the same as those returned by

`solvepde`

and`solvepdeeig`

. For details, see Dimensions of Solutions, Gradients, and Fluxes.

The procedure for evaluating gradients at nodal locations is as follows:

Calculate the gradients at the Gauss points located inside each element.

Extrapolate the gradients at the nodal locations.

Average the value of the gradient from all elements that meet at the nodal point. This step is needed because of the inter-element discontinuity of gradients. The elements that connect at the same nodal point give different extrapolated values of the gradient for the point.

`createPDEResults`

performs area-weighted averaging for 2-D meshes and volume-weighted averaging for 3-D meshes.

`EigenResults`

| `StationaryResults`

| `TimeDependentResults`

| `evaluateGradient`

| `interpolateSolution`