d02uef finds the solution of a linear constant coefficient boundary value problem by using the Chebyshev integration formulation on a Chebyshev Gauss–Lobatto grid.
The routine may be called by the names d02uef or nagf_ode_bvp_ps_lin_solve.
3Description
d02uef solves the constant linear coefficient ordinary differential problem
subject to a set of linear constraints at points , for :
where , is an matrix of constant coefficients and are constants. The points are usually either or .
The function is supplied as an array of Chebyshev coefficients , for the function discretized on Chebyshev Gauss–Lobatto points (as returned by d02ucf); the coefficients are normally obtained by a previous call to d02uaf. The solution and its derivatives (up to order ) are returned, in the form of their Chebyshev series representation, as arrays of Chebyshev coefficients; subsequent calls to d02ubf will return the corresponding function and derivative values at the Chebyshev Gauss–Lobatto discretization points on . Function and derivative values can be obtained on any uniform grid over the same range by calling the interpolation routine d02uwf.
4References
Clenshaw C W (1957) The numerical solution of linear differential equations in Chebyshev series Proc. Camb. Phil. Soc.53 134–149
Coutsias E A, Hagstrom T and Torres D (1996) An efficient spectral method for ordinary differential equations with rational function coefficients Mathematics of Computation65(214) 611–635
Greengard L (1991) Spectral integration and two-point boundary value problems SIAM J. Numer. Anal.28(4) 1071–80
Lundbladh A, Hennigson D S and Johannson A V (1992) An efficient spectral integration method for the solution of the Navier–Stokes equations Technical report FFA–TN 1992–28 Aeronautical Research Institute of Sweden
Muite B K (2010) A numerical comparison of Chebyshev methods for solving fourth-order semilinear initial boundary value problems Journal of Computational and Applied Mathematics234(2) 317–342
On entry: the order, , of the boundary value problem to be solved.
Constraint:
.
5: – Real (Kind=nag_wp) arrayInput
On entry: the Chebyshev coefficients , , for the right-hand side of the boundary value problem. Usually these are obtained by a previous call of d02uaf.
6: – Real (Kind=nag_wp) arrayInput/Output
On entry: must contain the coefficients , for and , in the problem formulation of Section 3.
On exit: the coefficients have been scaled to form an equivalent problem defined on the domain .
7: – Real (Kind=nag_wp) arrayInput
On entry: the points,
, for , where the boundary conditions are discretized.
8: – Real (Kind=nag_wp) arrayInput
On entry: the values,
, for , in the formulation of the boundary conditions given in Section 3.
9: – Real (Kind=nag_wp) arrayInput/Output
On entry: the coefficients,
, for , in the formulation of the linear boundary value problem given in Section 3. The highest order term, , needs to be nonzero to have a well posed problem.
On exit: the coefficients have been scaled to form an equivalent problem defined on the domain .
10: – Real (Kind=nag_wp) arrayOutput
On exit: the Chebyshev coefficients in the Chebyshev series representations of the solution and derivatives of the solution to the boundary value problem. The elements contain the coefficients representing the solution
, for .
contains the coefficients representing the th derivative of , for .
11: – Real (Kind=nag_wp)Output
On exit: the maximum residual resulting from substituting the solution vectors returned in uc into both linear equations of Section 3 representing the linear boundary value problem and associated boundary conditions. That is
12: – IntegerInput/Output
On entry: ifail must be set to , or to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of means that an error message is printed while a value of means that it is not.
If halting is not appropriate, the value or is recommended. If message printing is undesirable, then the value is recommended. Otherwise, the value is recommended. When the value or is used it is essential to test the value of ifail on exit.
On exit: unless the routine detects an error or a warning has been flagged (see Section 6).
6Error Indicators and Warnings
If on entry or , explanatory error messages are output on the current error message unit (as defined by x04aaf).
Internal error while unpacking matrix during iterative refinement.
Please contact NAG.
Singular matrix encountered during iterative refinement.
Please check that your system is well posed.
During iterative refinement, the maximum number of iterations was reached.
and .
During iterative refinement, convergence was achieved, but the residual is more than . .
An unexpected error has been triggered by this routine. Please
contact NAG.
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.
7Accuracy
The accuracy should be close to machine precision for well conditioned boundary value problems.
8Parallelism and Performance
Background information to multithreading can be found in the Multithreading documentation.
d02uef is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
d02uef makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the Users' Note for your implementation for any additional implementation-specific information.
9Further Comments
The number of operations is of the order and the memory requirements are ; thus the computation remains efficient and practical for very fine discretizations (very large values of ). Collocation methods will be faster for small problems, but the method of d02uef should be faster for larger discretizations.
10Example
This example solves the third-order problem on subject to the boundary conditions , , and using the Chebyshev integration formulation on a Chebyshev Gauss–Lobatto grid of order .