skip to main content

Algorithm 927: The MATLAB Code bvptwp.m for the Numerical Solution of Two Point Boundary Value Problems

Published:01 February 2013Publication History
Skip Abstract Section

Abstract

In this article we describe the code bvptwp.m, a MATLAB code for the solution of two point boundary value problems. This code is based on the well-known Fortran codes, twpbvp.f, twpbvpl.f and acdc.f, that employ a mesh selection strategy based on the estimation of the local error, and on revisions of these codes, called twpbvpc.f, twpbvplc.f and acdcc.f, that employ a mesh selection strategy based on the estimation of the local error and the estimation of two parameters which characterize the conditioning of the problem. The codes twpbvp.f/tpbvpc.f use a deferred correction scheme based on Mono-Implicit Runge-Kutta methods (MIRK); the other codes use a deferred correction scheme based on Lobatto formulas. The acdc.f/acdcc.f codes implement an automatic continuation strategy. The performance and features of the new solver are checked by performing some numerical tests to show that the new code is robust and able to solve very difficult singularly perturbed problems. The results obtained show that bvptwp.m is often able to solve problems requiring stringent accuracies and problems with very sharp changes in the solution. This code, coupled with the existing boundary value codes such as bvp4c.m, makes the MATLAB BVP section an extremely powerful one for a very wide range of problems.

Skip Supplemental Material Section

Supplemental Material

References

  1. Ascher, U., Christiansen, J., and Russell, R. D. 1981. Collocation software for boundary-value odes. ACM Trans. Math. Softw. 7, 2, 209--222. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Ascher, U. M., Mattheij, R. M. M., and Russell, R. D. 1995. Numerical Solution of Boundary Value Problems for Ordinary Differential Equations. Classics in Applied Mathematics Series, vol. 13, SIAM, Philadelphia, PA. (Corrected reprint of the 1988 original.)Google ScholarGoogle Scholar
  3. Bashir-Ali, Z., Cash, J. R., and Silva, H. H. M. 1998. Lobatto deferred correction for stiff two-point boundary value problems. Comput. Math. Appl. 36, 10--12, 59--69.Google ScholarGoogle ScholarCross RefCross Ref
  4. Brugnano, L., Mazzia, F., and Trigiante, D. 2011. Fifty years of stiffness. In Recent Advances in Computational and Applied Mathematics, Springer, 1--22.Google ScholarGoogle Scholar
  5. Cash, J. R. 1988. On the numerical integration of nonlinear two-point boundary value problems using iterated deferred corrections. II. The development and analysis of highly stable deferred correction formulae. SIAM J. Numer. Anal. 25, 4, 862--882.Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Cash, J. R. and Mazzia, F. 2005. A new mesh selection algorithm, based on conditioning, for two-point boundary value codes. J. Comput. Appl. Math. 184, 2, 362--381. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Cash, J. R. and Mazzia, F. 2006a. Algorithms for the solution of two-point boundary value problems. http://www.ma.ic.ac.uk/~jcash/BVP_software/twpbvp.php.Google ScholarGoogle Scholar
  8. Cash, J. R. and Mazzia, F. 2006b. Hybrid mesh selection algorithms based on conditioning for two-point boundary value problems. J. Numer. Anal. Ind. Appl. Math. 1, 1, 81--90.Google ScholarGoogle Scholar
  9. Cash, J. R. and Mazzia, F. 2009. Conditioning and hybrid mesh selection algorithms for two point boundary value problems. Scalable Comput. Pract. Exper. 10, 4, 347--361.Google ScholarGoogle Scholar
  10. Cash, J. R. and Wright, M. H. 1990. Implementation issues in solving nonlinear equations for two-point boundary value problems. Computing 45, 1, 17--37. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Cash, J. R. and Wright, M. H. 1991. A deferred correction method for nonlinear two-point boundary value problems: implementation and numerical evaluation. SIAM J. Sci. Statist. Comput. 12, 4, 971--989.Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Cash, J. R., Moore, G., and Wright, R. W. 1995. An automatic continuation strategy for the solution of singularly perturbed linear two-point boundary value problems. J. Comput. Phys. 122, 2, 266--279. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Cash, J. R., Moore, G., and Wright, R. 2001. An automatic continuation strategy for the solution of singularly perturbed nonlinear boundary value problems. ACM Trans. Math. Softw. 27, 2, 245--266. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Cash, J. R., Moore, D. R., Sumarti, N., and Daele, M. V. 2003. A highly stable deferred correction scheme with interpolant for systems of nonlinear two-point boundary value problems. J. Comput. Appl. Math. 155, 2, 339--358. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Díaz, J. C., Fairweather, G., and Keast, P. 1983. Algorithm 603. COLROW and ARCECO: Fortran packages for solving certain almost block diagonal linear systems by modified alternate row and column elimination. ACM Trans. Math. Softw. 9, 3, 376--380. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Enright, W. E. and Muir, P. H. 1986. Efficient classes of Runge-Kutta methods for two-point boundary value problems. Computing 37, 4, 315--334. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Enright, W. E. and Muir, P. H. 1996. Runge-Kutta software with defect control for boundary value odes. SIAM J. Sci. Comput. 17, 479--497. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Fox, L. 1957. The Numerical Solution of Two-Point Boundary Problems in Ordinary Differential Equations. Oxford University Press, New York.Google ScholarGoogle Scholar
  19. Kierzenka, J. and Shampine, L. F. 2001. A BVP solver based on residual control and the MATLAB pse. ACM Trans. Math. Softw. 27, 3, 299--316. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Kierzenka, J. and Shampine, L. F. 2008. A BVP solver that controls residual and error. J. Numer. Anal. Ind. Appl. Math. 3, 1--2, 27--41.Google ScholarGoogle Scholar
  21. Lindberg, B. 1980. Error estimation and iterative improvement for discretization algorithms. BIT 20, 4, 486--500.Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Mathworks, T. 2012. Matlab release 2012a. http://www.mathworks.com/.Google ScholarGoogle Scholar
  23. Mazzia, F. and Magherini, C. 2008. Test Set for Initial Value Problem Solvers, release 2.4. Department of Mathematics, University of Bari and INdAM, Research Unit of Bari. http://www.dm.uniba.it/~testset.Google ScholarGoogle Scholar
  24. Shampine, L. F., Gladwell, I., and Thompson, S. 2003. Solving ODEs with MATLAB. Cambridge University Press, Cambridge, UK. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Shampine, L. F., Muir, P. H., and Xu, H. 2006. A user-friendly Fortran BVP solver. J. Numer. Anal. Ind. Appl. Math. 1, 2, 201--217.Google ScholarGoogle Scholar
  26. Skeel, R. D. 1982. A theoretical framework for proving accuracy results for deferred corrections. SIAM J. Numer. Anal. 19, 1, 171--196.Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Wright, R., Cash, J. R., and Moore, G. 1994. Mesh selection for stiff two-point boundary value problems. Numer. Algor. 7, 2--4, 205--224.Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. Algorithm 927: The MATLAB Code bvptwp.m for the Numerical Solution of Two Point Boundary Value Problems

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image ACM Transactions on Mathematical Software
      ACM Transactions on Mathematical Software  Volume 39, Issue 2
      February 2013
      151 pages
      ISSN:0098-3500
      EISSN:1557-7295
      DOI:10.1145/2427023
      Issue’s Table of Contents

      Copyright © 2013 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 1 February 2013
      • Revised: 1 May 2012
      • Accepted: 1 May 2012
      • Received: 1 April 2011
      Published in toms Volume 39, Issue 2

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article
      • Research
      • Refereed

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader