BACOLIKR, BACOLRI, BACOLI, BACOLR, BACOL

 

A Family of Error Control Software

 Packages for the Numerical Solution of

 Systems of One-Dimensional

Time-Dependent Partial Differential Equations

 

Background:

 

·       Error control is an essential element of all high-quality numerical software. Error control software returns a numerical solution for which an associated high-quality error estimate satisfies a user-prescribed tolerance. Such software has two important advantages:

1.     the user can have reasonable confidence that the numerical solution has an error that is consistent with the requested tolerance, and

2.     the cost of the computation will be consistent with the requested tolerance.

 

·       This website provides access to a family of software packages for the error controlled numerical solution of systems of 1D Partial Differential Equations (PDEs) of the form

 

ut(x,t) = f(x, t, u(x,t), ux(x,t), uxx(x,t)),  a ≤  x ≤ b,  t ≥ t0,

 

      with initial conditions of the form

 

                        u(x, t) = u0(x),   a ≤  x ≤ b,

 

      and with boundary conditions of the form

 

                        bL(t, u(a,t), ux(a,t)) = 0,   bR(t, u(b,t), ux(b,t)) = 0,  t ≥ t0.

If the solver has an event detection capability (see below) then the user can provide an additional event function of the form

 

g(x, t, u(x,t), ux(x,t), uxx(x,t), ut(t,x)). 

 

 

      Examples of PDEs of this form are provided within the software drivers given below.

                       

·       The software family (which we call the BACOL family of solvers) available on this website shares the common trait that for each member of the family, the spatial discretization of the PDE is based on the use of Gaussian (also known as Orthogonal) spline collocation. The numerical solution is represented in terms of a B-spline basis with unknown time-dependent coefficients. The collocation process requires that the numerical solution satisfy the PDE at certain points in [a,b] known as collocation points. The application of the collocation process to the PDE yields a set of time-dependent ordinary differential equations, which together with the boundary conditions, represents a system of Differential Algebraic Equations (DAEs), whose solution gives the B-spline coefficients. This DAE system is solved using a DAE solver, either DASSL [Brenan, Campbell, Petzold, 1996], DASKR [Brown, Hindmarsh, Petzold, 1994, 1998], or RADAU5 [Hairer, Wanner, 1996].

 

·       The BACOL family of solvers follows from two earlier B-spline Gaussian collocation solvers, EPDCOL [Keast, Muir, 1991], and PDECOL [Madsen, Sincovec, 1979]. However, neither of these older packages provides control of the spatial error. (The EPDCOL package is archived below on this website.)

 

·       The BACOL family of solvers features adaptive control of the temporal and spatial errors.

 

o   The family consists of the solvers:

·       BACOL [Wang, Keast, Muir, 2004a, 2004b] ,

·       BACOLR [Wang, Keast, Muir, 2008],

·       BACOLI [Pew, Li, Muir, 2016],

·       BACOLRI [Pew, Murtha, Tannahill, Muir, 2018, 2019],

·       BACOLIKR [Pew, Murtha, Tannahill, Muir, 2024].

 

o   Control of an estimate of the temporal error in these solvers is provided through either DASSL, DASKR, or RADAU5; these solvers compute the time-dependent B-spline coefficients using adaptive error control algorithms. BACOL and BACOLI use DASSL, BACOLIKR uses DASKR, and BACOLR and BACOLRI use RADAU5.

 

o   Control of an estimate of the spatial error is implemented in BACOL and BACOLR through the computation of two separate collocation solutions (one based on B-splines of degree p and the other based on B-splines of degree p+1, for a given input integer p). The difference between these two solutions provides the spatial error estimate which is used to adapt the spatial mesh so that the error estimate satisfies a user-provided tolerance on each timestep.

 

o   BACOLI and BACOLRI avoid the computation of two collocation solutions by replacing one of them with a low-cost interpolant which is then used to obtain the spatial error estimate. BACOLI and BACOLRI provide two options: (i) the superconvergent interpolant (SCI) scheme [Arsenault, Smith, Muir, 2009] which replaces the degree p+1 collocation solution, or (ii) the low order interpolant (LOI) scheme [Arsenault, Smith, Muir, Pew, 2012] which replaces the degree p collocation solution.

 

o   BACOLIKR is a modification of BACOLI that replaces DASSL with DASKR in order to provide an event detection capability. See below for further details.

 

 

SOFTWARE (newest to oldest):

 

 

·      BACOLIKR (2024)

 

·       BACOLIKR is a modification of BACOLI that replaces DASSL with DASKR. The latter time integrator has an event detection capability.

 

·       BACOLIKR exploits this feature of DASKR to provide an event detection capability that can be employed during the error controlled numerical solution of a PDE. Event control means that the user can specify an event function which depends on the solution or one of its derivatives.

 

·       The solver can determine the time at which the event arises as the root of the event function. This allows the solver to determine automatically unknown times at which an event occurs.

 

·       The Technical Report, [Pew, Tannahill, Muir, 2024], describes this project.

 

·       The BACOLIKR Fortran 95 software:

 

(i) The solver (download all four of these):

·       A Fortran 95 interface: bacoli95.f95,

·       BACOLRI (Fortran 77) source code:  bacoli.f,

·       Auxiliary (Fortran 77) source code: bacoli-aux.f

·       Auxiliary (Fortran 95) source code: d1mach_i1mach.f95

 

(ii) Driver (main) programs (Fortran 95) + Problem-based routines (Fortran 77) (download one pair of these):

·       Solution Layer Crossing Detection for the One Layer Burgers' Equation: driver95-simple-root-layer-burg1.f95,  burg1.f  

·       Solution Value Detection Involving Multiple Events for the Catalytic Surface Reaction Model: driver95-simple-root-rcd.f95, rcdsys.f  

·       Layer Merge Detection for the Two Layer Burgers' Equation: driver95-simple-root-layermerge-burg2.f95,  burg2.f  

·       Critical Tumor Mass  Detection in a Brain Tumor Model: driver95-simple-tumor-root.f95,  tumor.f  

·       Steady State Detection via Layer-boundary Tracking for the  One Layer Burgers' Equation: driver95-simple-steady-burg1.f95,  burg1.f  

·       Steady state detection for the Gierer-Meinhardt Model: driver95-simple-steady-Gierer-Meinhardt.f95,  Gierer-Meinhardt.f  

·       Event detection in the Heat Equation with changes in the boundary conditions at unknown times: driver95-simple-root-heat-dcbc.f95,  heat-equation-dcbc.f  

 

(iii) Compile using gfortran and the flags -Wno-all and std=legacy

 

·      BACOLRI (2019)

 

·       BACOLRI was developed through a modification of BACOLR and employs some elements (the interpolation-based error estimation schemes) originally developed for BACOLI.

·       The primary modification to BACOLR involved removing the computation of the second numerical solution based on B-splines of degree p+1 and replacing it with an option for computing one of the two interpolants (the SCI or the LOI) mentioned above.

·       The Technical Reports [Pew, Murtha, Tannahill, Muir, 2018, 2019] describe this project.

 

·       The BACOLRI Fortran 95 software:

 

(i) The solver (download all four of these):

·       A Fortran 95 interface: bacolri95.f95,

·       BACOLRI (Fortran 77) source code:  bacolri.f,

·       Auxiliary (Fortran 77) source code: bacolri-aux.f

·       Auxiliary (Fortran 95) source code: d1mach_i1mach.f95

 

(ii) Generic driver (main) programs (Fortran 95) (download one of these):

·       driver95_simple.f95,

·       driver95_curve.f95,

·       driver95_trimesh.f95

 

(iii) Problem-based routines (Fortran 77) (download one of these):

·       A One Layer Burger’s Equation: burg1.f  (Wang, Keast, Muir, J. Comp. Appl. Math., 2004: Page 139)

·       A Two Layer Burger’s Equation: burg2.f  (Wang, Keast, Muir, J. Comp. Appl. Math., 2004: Page 135)

·       The Cahn Allen equation: cahn_allen.f  (Wang, Keast, Muir, J. Comp. Appl. Math., 2004: Page 141)

·       A Reaction-Convection-Diffusion System: rcdsys.f  (Wang, Keast, Muir, J. Comp. Appl. Math., 2004: Page 144)

·       A nonlinear problem with a steady state: steady.f  (Wang, Keast, Muir, J. Comp. Appl. Math., 2004: Page 143)

·       Simple Example:  sincmads.f  (Madsen and Sincovec, ACM Trans. Math. Soft., 1979: Page 340)

·       Nonlinear Schrodinger system: schrod.f ([Pew, Murtha, Tannahill, Muir, 2019])

 

(iv) Make sure that the value for npde set in the driver from (ii) is the same as the number of PDEs in the problem chosen from (iii).

 

(v) A makefile that may be helpful in compiling and running the above software is available here.

 

·       The BACOLRI Fortran 77 software:

 

(i) The solver (download all three of these):

·       BACOLRI (Fortran 77) source code:  bacolri.f,

·       Auxiliary (Fortran 77) source code: bacolri-aux.f

·       Auxiliary (Fortran 77) source code: d1mach_i1mach.f

 

(ii) Generic driver (main) programs (Fortran 77) (download one of these):

o   driver_gridmesh.f,

o   driver_curve.f,

o   driver_trimesh.f

 

(iii) Problem based routines (Fortran 77) (download one of these):

·       A One Layer Burger’s Equation: burg1.f  (Wang, Keast, Muir, J. Comp. Appl. Math., 2004: Page 139)

·       A Two Layer Burger’s Equation: burg2.f  (Wang, Keast, Muir, J. Comp. Appl. Math., 2004: Page 135)

·       The Cahn Allen equation: cahn_allen.f  (Wang, Keast, Muir, J. Comp. Appl. Math., 2004: Page 141)

·       A Reaction-Convection-Diffusion System: rcdsys.f  (Wang, Keast, Muir, J. Comp. Appl. Math., 2004: Page 144)

·       A nonlinear problem with a steady state: steady.f  (Wang, Keast, Muir, J. Comp. Appl. Math., 2004: Page 143)

·       Simple Example:  sincmads.f  (Madsen and Sincovec, ACM Trans. Math. Soft., 1979: Page 340)

·       Nonlinear Schrodinger system: schrod.f ([Pew, Murtha, Tannahill, Muir, 2019])

 

(iv) Make sure that the value for npde set in the driver from (ii) is the same as the number of PDEs in the problem chosen from (iii).

 

 

·      BACOLI (2019)

 

·       BACOLI was developed through a major modification of BACOL to remove the computation of the second numerical solution based on B-splines of degree p+1 and replace it with an option for computing one of the two interpolants (the SCI or the LOI) mentioned above.

 

·       The SCI and LOI schemes are described in the papers [Arsenault, Smith, Muir, 2009], [Arsenault, Smith, Muir, Pew 2012]. See also the Technical Report  [Arsenault, Smith, Muir, Keast, 2011].

 

·       The BACOLI software is described in the paper [Pew, Li, Muir, 2016]. See also the Technical Report  Pew, Li, Muir, 2013.

 

·       The 2016 BACOLI software is available at http://calgo.acm.org/ as Algorithm 962.

 

·       A Performance Analysis of the BACOL and BACOLI packages is reported in the technical report Pew, Tannahill, Muir 2018. The software employed to conduct the numerical experiments reported in that report is available here.

 

·       The BACOLI 2019 Fortran 95 software (a minor upgrade of the 2016 BACOLI package):

 

(i) The solver (download all four of these):

·       A Fortran 95 interface: bacoli95.f95,

·       BACOLI (Fortran 77) source code:  bacoli.f,

·       Auxiliary (Fortran 77) source code: bacoli-aux.f

·       Auxiliary (Fortran 95) source code: d1mach_i1mach.f95

 

(ii) Generic driver (main) programs (Fortran 95) (download one of these):

o   driver95_simple.f95,

o   driver95_curve.f95,

o   driver95_trimesh.f95

 

(iii) Problem based routines (Fortran 77) (download one of these):

o   A One Layer Burger’s Equation: burg1.f  (Wang, Keast, Muir, J. Comp. Appl. Math., 2004: Page 139)

o   A Two Layer Burger’s Equation: burg2.f  (Wang, Keast, Muir, J. Comp. Appl. Math., 2004: Page 135)

o   The Cahn Allen equation: cahn_allen.f  (Wang, Keast, Muir, J. Comp. Appl. Math., 2004: Page 141)

o   A Reaction-Convection-Diffusion System: rcdsys.f  (Wang, Keast, Muir, J. Comp. Appl. Math., 2004: Page 144)

o   A nonlinear problem with a steady state: steady.f  (Wang, Keast, Muir, J. Comp. Appl. Math., 2004: Page 143)

o   Simple Example:  sincmads.f  (Madsen and Sincovec, ACM Trans. Math. Soft., 1979: Page 340)

o   Note: Make sure that the number of PDEs (npdes) specified in (ii) and (iii) is the same

 

·       The BACOLI 2019 Fortran 77 software:

 

      (i) The solver (download all three of these):

·       BACOLI (Fortran 77) source code:  bacoli.f,

·       Auxiliary (Fortran 77) source code: bacoli-aux.f

·       Auxiliary Fortran 77) source code: d1mach_i1mach.f

 

(ii) Generic driver (main) programs (Fortran 77) (download one of these):

o   driver_gridmesh.f,

o   driver_curve.f,

o   driver_trimesh.f

 

 (iii) The drivers can be run with any of the following problem based routines (Fortran 77) (download one of these):

·       A One Layer Burger’s Equation: burg1.f  (Wang, Keast, Muir, J. Comp. Appl. Math., 2004: Page 139)

·       A Two Layer Burger’s Equation: burg2.f  (Wang, Keast, Muir, J. Comp. Appl. Math., 2004: Page 135)

·       The Cahn Allen equation: cahn_allen.f  (Wang, Keast, Muir, J. Comp. Appl. Math., 2004: Page 141)

·       A Reaction-Convection-Diffusion System: rcdsys.f  (Wang, Keast, Muir, J. Comp. Appl. Math., 2004: Page 144)

·       A nonlinear problem with a steady state: steady.f (Wang, Keast, Muir, J. Comp. Appl. Math., 2004: Page 143)

·       Simple Example:  sincmads.f  (Madsen and Sincovec, ACM Trans. Math. Soft., 1979: Page 340)

·       Note: Make sure that the number of PDEs (npdes) specified in (ii) and (iii) is the same

 

 

·      BACOLR (2019)

 

o   The original BACOLR software (in Fortran 77) was developed in 2008 by Rong Wang, Pat Keast, and Paul Muir [Wang, Keast, Muir, 2008] and is available at http://calgo.acm.org/ as Algorithm 874.

 

o   A new release of the BACOLR software (in Fortran 77) (a minor upgrade of the 2008 BACOLR package):

o    

(i) The BACOL source code:  bacolr.f

 

(ii) Generic driver (main) programs: driver_curve-bac.f, driver_gridmesh-bac.f, driver_trimesh-bac.f

 

(iii) The drivers can be run with any of the following problem based routines:

·       A One Layer Burger’s Equation: burg1.f  (Wang, Keast, Muir, J. Comp. Appl. Math., 2004: Page 139)

·       A Two Layer Burger’s Equation: burg2.f  (Wang, Keast, Muir, J. Comp. Appl. Math., 2004: Page 135)

·       The Cahn Allen equation: Cahn_Allen.f  (Wang, Keast, Muir, J. Comp. Appl. Math., 2004: Page 141)

·       A Reaction-Convection-Diffusion System: RCDsys.f  (Wang, Keast, Muir, J. Comp. Appl. Math., 2004: Page 144)

·       A nonlinear problem with a steady state: steady.f  (Wang, Keast, Muir, J. Comp. Appl. Math., 2004: Page 143)

·       Simple Example:  sincmads.f  (Madsen and Sincovec, ACM Trans. Math. Soft., 1979: Page 340)

 

 

·      BACOL (2013)

 

o   The original BACOL software (in Fortran 77) was developed in 2004 by Rong Wang, Pat Keast, and Paul Muir [Wang, Keast, Muir, 2004a, 2004b].

 

o   A new release of the BACOL software (in Fortran 77) (a minor upgrade of the 2004 BACOL package):

 

(i) The BACOL source code:  bacol.f

 

(ii) Generic driver (main) programs: driver_curve-bac.f, driver_gridmesh-bac.f, driver_trimesh-bac.f

 

(iii) The drivers can be run with any of the following problem based routines:

·       A One Layer Burger’s Equation: burg1.f  (Wang, Keast, Muir, J. Comp. Appl. Math., 2004: Page 139)

·       A Two Layer Burger’s Equation: burg2.f  (Wang, Keast, Muir, J. Comp. Appl. Math., 2004: Page 135)

·       The Cahn Allen equation: Cahn_Allen.f  (Wang, Keast, Muir, J. Comp. Appl. Math., 2004: Page 141)

·       A Reaction-Convection-Diffusion System: RCDsys.f  (Wang, Keast, Muir, J. Comp. Appl. Math., 2004: Page 144)

·       A nonlinear problem with a steady state: steady.f  (Wang, Keast, Muir, J. Comp. Appl. Math., 2004: Page 143)

·       Simple Example:  sincmads.f  (Madsen and Sincovec, ACM Trans. Math. Soft., 1979: Page 340)

 

 

·      EPDCOL (1991)

 

o   The EPDCOL software [Keast, Muir, 1991], a modification of the PDECOL package [Madsen, Sincovec, 1979] , was published as Algorithm 688 of the Collected Algorithms of the ACM http://calgo.acm.org/

 

o   Here we provide a copy of the EPDCOL (Fortran 77) software:

 

(i) The EPDCOL source code, pdecoldp.f (download this).

(ii) Example driver #1, ex1drvdp.f, Example driver #2, ex2drvdp.f (download one of these).

(iii) The original README file.

 

 

·      REFERENCES

 

[Arsenault, Smith, Muir, 2009] T. Arsenault, T. Smith, and P.H. Muir. Superconvergent interpolants for efficient spatial error estimation in 1D PDE collocation solvers. Can. Appl. Math. Q., 17(3):409–431, 2009.

 

[Arsenault, Smith, Muir, Pew, 2012] T. Arsenault, T. Smith, P.H. Muir, J. Pew, Asymptotically Correct Interpolation-based Spatial Error Estimation for 1D PDE Solvers, Can. Appl. Math. Q., 20(3):307328, 2012.

 

[Arsenault, Smith, Muir, Keast, 2011], Tom Arsenault, Tristan Smith, Paul Muir, and Pat Keast, Efficient Interpolation-based Error Estimation for 1D Time-Dependent PDE Collocation Codes, Saint Mary’s University, Department of Mathematics and Computing Science, Technical Report 2011_001, 2011.

 

[Brenan, Campbell, Petzold, 1996] K.E. Brenan, S.L. Campbell, and L.R. Petzold. Numerical solution of initial-value problems in differential-algebraic equations, volume 14 of Classics in Applied Mathematics. Society for Industrial and Applied Mathematics (SIAM), Philadelphia, PA, 1996.

 

[Hairer, Wanner, 1996] E. Hairer, G. Wanner: Solving ordinary differential equations. II, volume 14 of Springer series in computational mathematics, 2nd edn. Springer, Berlin, 1996.

 

[Keast, Muir, 1991] P. Keast and P.H. Muir,  Algorithm 688. EPDCOL: A more efficient PDECOL code.

ACM Trans. Math. Softw. 17, 153–166, 1991.

 

[Madsen, Sincovec, 1979]  N.K. Madsen and R.F. Sincovec,  Algorithm 540. PDECOL, general collocation software for partial differential equations. ACM Trans. Math. Softw. 5, 326–351, 1979.

 

[Pew, Li, Muir, 2013] J. Pew, Z. Li, P.H. Muir, A Computational Study of the Efficiency of Collocation Software for 1D Parabolic PDEs with Interpolation-based Spatial Error Estimation, Saint Mary’s University, Department of Mathematics and Computing Science, Technical Report 2013_001, 2013.

 

[Pew, Li, Muir, 2016] J. Pew, Z. Li, P.H. Muir, Algorithm 962: BACOLI: B-spline Adaptive Collocation Software for PDEs with Interpolation-based Spatial Error Control, ACM Trans. on Math. Softw., 42, 3, Article 25, 2016.

 

[Pew, Murtha, Tannahill, Muir, 2018] Jack Pew, Tom Murtha, Connor Tannahill, Paul Muir, Error Control B-spline Gaussian Collocation/Runge-Kutta PDE Software with Interpolation-based Spatial Error Estimation, Saint Mary’s University, Department of Mathematics and Computing Science, Technical Report 2018_002, 2018.

 

[Pew, Murtha, Tannahill, Muir, 2019] Jack Pew, Tom Murtha, Connor Tannahill, Paul Muir,  Performance Analysis of Interpolation-based Spatial Error Control B-spline Gaussian Collocation PDE Software: BDF Time Integration vs. IRK Time Integration, Saint Mary’s University, Department of Mathematics and Computing Science, Technical Report 2019_001, 2019.

 

[Wang, Keast, Muir, 2004a] R. Wang, P. Keast, and P.H. Muir. BACOL: B-spline Adaptive COL-location software for 1-D parabolic PDEs. ACM Trans. Math. Software, 30(4):454–470, 2004.

 

 [Wang, Keast, Muir, 2004b]  R. Wang, P. Keast, and P.H. Muir. A high-order global spatially adaptive collocation method for 1-D parabolic PDEs. Appl. Numer. Math., 50(2):239–260, 2004.

 

[Wang, Keast, Muir, 2004c]  R. Wang, P. Keast, and P.H. Muir. A comparison of adaptive software for 1D parabolic PDEs. J. Comput. Appl. Math., 169(1):127–150, 2004.

 

[Wang, Keast, Muir, 2008] R. Wang, P. Keast, and P.H. Muir. Algorithm 874: BACOLR—spatial and temporal error control software for PDEs based on high-order adaptive collocation. ACM Trans. Math. Software, 34(3): Article No. 15, 2008.