# PDESolverOptions Properties

Algorithm options for solvers

A `PDESolverOptions`

object contains options used by the
solvers when solving a structural, thermal, or general PDE problem specified as a
`StructuralModel`

, `ThermalModel`

, or `PDEModel`

object, respectively. `StructuralModel`

,
`ThermalModel`

, and `PDEModel`

objects contain a
`PDESolverOptions`

object in their
`SolverOptions`

property.

Solvers for structural modal analysis problems and reduced-order modeling use the Lanczos algorithm.

## Statistics and Convergence Report

`ReportStatistics`

— Flag to display internal solver statistics and convergence report during the solution process

`'off'`

(default) | `'on'`

Flag to display the internal solver statistics and the convergence report
during the solution process, specified as `'off'`

or
`'on'`

.

**Example: **```
model.SolverOptions.ReportStatistics =
'on'
```

**Data Types: **`char`

## ODE Solver

`AbsoluteTolerance`

— Absolute tolerance for internal ODE solver

1.0000e-06 (default) | positive number

Absolute tolerance for the internal ODE solver, specified as a positive number. Absolute tolerance is a threshold below which the value of the solution component is unimportant. This property determines the accuracy when the solution approaches zero.

**Example: **```
model.SolverOptions.AbsoluteTolerance =
5.0000e-06
```

**Data Types: **`double`

`RelativeTolerance`

— Relative tolerance for internal ODE solver

1.0000e-03 (default) | positive number

Relative tolerance for the internal ODE solver, specified as a positive
number. This tolerance is a measure of the error relative to the size of
each solution component. Roughly, it controls the number of correct digits
in all solution components, except those smaller than thresholds imposed by
`AbsoluteTolerance`

. The default value corresponds to
0.1% accuracy.

**Example: **```
model.SolverOptions.RelativeTolerance =
5.0000e-03
```

**Data Types: **`double`

## Nonlinear Solver

`ResidualTolerance`

— Acceptable residual tolerance for internal nonlinear solver

1.0000e-04 (default) | positive number

Acceptable residual tolerance for the internal nonlinear solver, specified
as a positive number. The nonlinear solver iterates until the residual size
is less than the value of `ResidualTolerance`

.

**Example: **```
model.SolverOptions.ResidualTolerance =
5.0000e-04
```

**Data Types: **`double`

`MaxIterations`

— Maximal number of Gauss-Newton iterations for internal nonlinear solver

25 (default) | positive integer

Maximal number of Gauss-Newton iterations for the internal nonlinear solver, specified as a positive integer.

**Example: **```
model.SolverOptions.MaxIterations =
30
```

**Data Types: **`double`

`MinStep`

— Minimum damping of search direction for internal nonlinear solver

1.5259e-05 (default) | positive number

Minimum damping of the search direction for the internal nonlinear solver, specified as a positive number. For details, see Nonlinear Solver Algorithm.

**Example: **```
model.SolverOptions.MinStep =
1.5259e-7
```

**Data Types: **`double`

`ResidualNorm`

— Type of norm for computing residual for internal nonlinear solver

`Inf`

| `-Inf`

| positive number | `'energy'`

Type of norm for computing the residual for the internal nonlinear solver,
specified as `Inf`

, `-Inf`

, a positive
number, or `'energy'`

. The default value for
`ElectromagneticModel`

is 2, and for all other models
it is `Inf`

.

The infinity norms of a vector are

$${\Vert \rho \Vert}_{\infty}={\mathrm{max}}_{i}\left(\left|\rho \left(i\right)\right|\right)$$

$${\Vert \rho \Vert}_{-\infty}={\mathrm{min}}_{i}\left(\left|\rho \left(i\right)\right|\right)$$

The `L`

-norm of a vector ρ
that has ^{p}`N`

elements is

$${\Vert \rho \Vert}_{p}=\frac{{\left[{\displaystyle \sum _{k=1}^{N}{\left|{\rho}_{k}\right|}^{p}}\right]}^{\frac{1}{p}}}{{N}^{\frac{1}{p}}}$$

The energy norm of a vector ρ is

$$\Vert \rho \Vert ={\rho}^{T}K\rho $$

Here, *K* is the combined stiffness matrix defined in
Nonlinear Solver Algorithm.

**Example: **```
model.SolverOptions.ResidualNorm =
'energy'
```

**Data Types: **`double`

| `char`

## Lanczos Solver

`MaxShift`

— Maximum number of Lanczos shifts

100 (default) | positive integer

Maximum number of Lanczos shifts, specified as a positive integer. Increase this value when computing a large number of eigenpairs.

**Example: **```
model.SolverOptions.MaxShift =
500
```

**Data Types: **`double`

`BlockSize`

— Block size for block Lanczos recurrence

ranges from 7 to 25 (default) | positive integer

Block size for block Lanczos recurrence, specified as a positive integer.
The default number ranges from 7 to 25, depending on the size of the
stiffness matrix `K`

.

**Example: **```
model.SolverOptions.BlockSize =
20
```

**Data Types: **`double`

## Algorithms

### Nonlinear Solver Algorithm

The residual equation of a nonlinear PDE is as follows:

$$r\left(u\right)=-\nabla \cdot \left(c\left(u\right)\nabla \left(u\right)\right)+a\left(u\right)u-f\left(u\right)=0$$

To obtain a discretized residual equation, apply the finite element method (FEM) to a partial differential equation as described in Finite Element Method Basics:

$$\rho \left(U\right)=K\left(U\right)U-F\left(U\right)=0$$

The nonlinear solver uses a Gauss-Newton iteration scheme applied to the finite element matrices. Use a Taylor series expansion to obtain the linearized system for the residual:

$$\rho \left({U}^{n+1}\right)\cong \rho \left({U}^{n}\right)+\frac{\partial \rho \left({U}^{n}\right)}{\partial U}\left({U}^{n+1}-{U}^{n}\right)+\dots =0$$

Neglecting the higher-order terms, write the linearized system of equations as

$$\frac{\partial \rho \left({U}^{n}\right)}{\partial U}\left({U}^{n+1}-{U}^{n}\right)=-\rho \left({U}^{n}\right)$$

The descent direction for the residual is

$${p}_{n}=-{\left(\frac{\partial \rho \left({U}^{n}\right)}{\partial U}\right)}^{-1}\rho \left({U}^{n}\right)$$

The Gauss-Newton iteration minimizes the residual, that is, the solution of $${\mathrm{min}}_{U}\Vert \rho \left(U\right)\Vert $$, using the equation

$${U}^{n+1}={U}^{n}+\alpha {p}_{n}$$

Here, ɑ ≤ 1 is a positive number, that must be set as large as possible so that the step has a reasonable descent. For a sufficiently small ɑ,

$$\Vert \rho \left({U}^{n}+\alpha {p}_{n}\right)\Vert <\Vert \rho \left({U}^{n}\right)\Vert $$

For the Gauss-Newton algorithm to converge, $${U}^{0}$$ must be close enough to the solution. The first guess is often outside the region of convergence. The Armijo-Goldstein line search (a damping strategy for choosing ɑ) helps to improve convergence from bad initial guesses. This method chooses the largest damping coefficient ɑ out of the sequence 1, 1/2, 1/4, . . . such that the following inequality holds:

$$\Vert \rho \left({U}^{n}\right)\Vert -\Vert \rho \left({U}^{n}+\alpha {p}_{n}\right)\Vert \ge \frac{\alpha}{2}\Vert \rho \left({U}^{n}\right)\Vert $$

Using the Armijo-Goldstein line search guarantees a reduction of the residual norm by at least $$1-\alpha /2$$. Each step of the line-search algorithm must evaluate the residual $$\Vert \rho \left({U}^{n}+\alpha {p}_{n}\right)\Vert $$.

With this strategy, when
*U*^{n} approaches
the solution, $$\alpha $$→1, thus, the convergence rate increases.

## Version History

**Introduced in R2016a**

## See Also

## MATLAB Command

You clicked a link that corresponds to this MATLAB command:

Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.

# Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list:

## How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

### Americas

- América Latina (Español)
- Canada (English)
- United States (English)

### Europe

- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)

- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)