pdsolve/numeric/errorcontrol - Maple Programming Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : Mathematics : Differential Equations : pdsolve : pdsolve/numeric/errorcontrol


find a numerical solution of PDE with an error approximation, or within a certain tolerance


Calling Sequence






Calling Sequence

pdsolve(PDE, conditions, numeric, meth, options)




single or set or list of time-dependent partial differential equations in two independent variables



set or list of initial and boundary conditions



keyword indicating a numerical solution is to be obtained



(optional) method description of the form method=theta or method=θv



(optional) equations of the form keyword = value where keyword is one of 'errorest, 'errortype', 'abstol', mintimestep, and maxtimestep



This page describes options and capabilities specific to use of error estimation and error control with numeric PDE solution.


Solution of PDE with error estimation is restricted to the theta family of schemes, where the index of the theta (the v in meth=θv) gives the relative time value of the point used for the approximation as a ratio of the total step. The default is 12, which gives second order accuracy and fair stability. The value 0 represents an explicit method, while the value 1 is a fully implicit method with the best stability (in general).


There are two main operating modes for PDE solution with error estimation. The first simply provides viewable information on the approximate errors of the solution, while the second provides an automatic control mechanism, whereby the time step is adjusted to keep the error per unit step within a specified bound.


Information on the error estimation process is provided in Details below.



The relevant options are as follows.


'errorest'= boolean


Specifies whether error estimates are to be computed. If error control is in use (that is, 'abstol' was specified), then this is true automatically.


'errortype'= keyword


Specifies the form of the error estimates to be viewed.


-  The option 'accumulated' (the default) provides an error estimate at any given time as the sum of the error estimates for all prior time steps from the start of the problem. This option is most useful in obtaining solutions with approximate error bounds.


-  The option 'singlestep' provides a local error estimate for the current step. This option is most useful in determining where the local error in a solution is most problematic.




In addition to providing an upper bound on the local estimate of the time and spatial errors per unit step, use of this option indicates that time adaptation should be used.


Note: This upper bound is used independently on the two error estimators, meaning that it is used to control errors due to the spatial discretization and errors due to the time discretization separately. If an overall total error bound is required, then 'abstol' should be specified as half the desired value.


Another consideration here is that only the time step can be adjusted to reduce the error (the spatial mesh is fixed), so if the spatial error estimate exceeds the tolerance, then the integration halts with an appropriate error message.




This option provides an absolute minimum value for the time step taken to compute a requested solution. By default, the value is 1/1000th the initial time step (either the default, or specified by the timestep value).




This option provides an absolute maximum value for the time step taken to compute a requested solution. By default, the value is 100 times the initial time step (either the default, or specified by the timestep value).


Error estimates can be used in the dependent variable specification of the plot, animate, plot3d and value methods of the returned module.


Quite simply, for a dependent variable ux,t, the time error can be specified as terrux,t, the spatial error can be specified as serrux,t, and the total error (just the sum of the time and space errors) can be specified as errux,t.


The additional shortcuts terr(), serr, and err() are provided to display the maximum time, space, or total error for all solution components. This is only useful if the input PDE is higher than first order, or the input PDE is a system.



The error estimators used, in both the visual error estimates and the error control, are simply local truncation error estimates for the PDE or PDE system. Essentially, what is done is to compute the solution on a different mesh, and use the difference between solutions to estimate the error.


The spatial error estimate is obtained by comparing the solution to another computed on a coarser spatial mesh, but for the same time step. This gives an estimate of the Oh2 local truncation error (where h is the mesh spacing for the spatial variable).


The time error estimate is obtained by comparing the solution to another computed with a larger time step, but the same spatial mesh. This gives an estimate of the Ok2 or Ok local truncation error (where k is the time step).


It is important to note that these estimates are local, so they do not account for situations where a small perturbation in the solution at a time t=t1 can result in a large change in the solution at a later time t=t2.


Simple one-way wave equation with error estimates. Comparison at two sets of step sizes.








pds:=moduleexportplot,plot3d,animate,value,settings;...end module





Comparison of error estimate and true error (for this problem the exact solution is known).





In this case, the error estimate is somewhat pessimistic.

A nonlinear PDE with a forming shock layer using error control








pds:=moduleexportplot,plot3d,animate,value,settings;...end module



Error, (in `pdsolve/numeric/plot`) unable to compute solution for t>.383973957308842:
spatial error estimate exceeds tolerance. consider decreasing 'spacestep'

You must decrease the space step size. A little experimentation shows that you can get to t=0.5 with:


And at that time, the spatial error looks like


See Also







Download Help Document

Was this information helpful?

Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam