NDSolve::mxsst NDSolveValue::mxsst ParametricNDSolve::mxsst ParametricNDSolveValue::mxsst

Details

  • This message is generated when the number of grid points used by the partial differential equation solver is the number specified in the value of the MaxSteps option rather than the number that would have been chosen by default.
  • This warning is normally seen if the initial condition for a partial differential equation has sharp or oscillating features, or when using relatively small values in the MaxSteps option.
  • This warning is can be seen if the differential equation is stiff.
  • Off[message] switches off the message; On[message] switches it on. For example: Off[NDSolve::mxsst].

Examples

Basic Examples  (4)

A warning message is generated because the sharp feature in the initial condition cannot be handled reliably with the number of grid points specified by the MaxSteps option:

The error can be avoided by omitting the setting for the MaxSteps option:

A warning message is generated because the sharp feature in the initial condition cannot be handled reliably with the number of grid points specified by the MaxSteps option:

The error can be avoided by omitting the setting for the MaxSteps option:

Consider this PDE:

The problem here is that the initial condition is effectively discontinuous when the periodic continuation is taken into account.

This shows a plot of the initial condition over the extent of three full periods:

Since there is always a large derivative error at the cusps, NDSolve is forced to use the maximum number of points in an attempt to satisfy the a priori error bound. To make matters worse, the extreme change makes solving the resulting ODEs more difficult, leading to a very long solution time that uses a lot of memory. For this reason the above example is wrapped in a TimeConstrained.

This can usually be fixed easily enough by extending the domain or by adding in terms to smooth things between periods:

Consider this following initial condition and a heat equation:

Note that the initial condition is piecewise continuous. However, NDSolve needs an initial condition that is continuous up until the highest spatial derivative of the PDE. In this case NDSolve needs continuous initial condition up until the second spatial derivative . Plot the second derivative of the initial condition:

We see that the second derivative is non longer continuous. The issue the message points at can be fixed by using an initial condition that is continuous up to the second derivative:

Evaluate NDSolve with the new initial condition:

The reason for this requirement is that a non-continuous second derivative of the initial condition can not be approximated well by the standard finite difference method due to Gibbs' phenomenon. To explain the issue in more detail we define the following:

The finite difference derivative approximates the second order spatial derivative of the PDE. When we evaluate the original initial condition over the grid we get over- and undershoots around 0.1 and 0.9 due to Gibbs' phenomenon:

These over- and undershoots effect the error estimate and NDSolve will try to increase the number of grid points, which in this case does not help. Note that for the initial condition that is continuous up to the second derivative we do not have the problem of over- and undershoot:

More information on the error estimate can be found in the section Spatial Error Estimates.