Welcome to bvmatrix’s documentation!

This libary is focused on the iterative solution of the linear system

\[M\, \mathbf{y} = \mathbf{e}_1 \otimes \eta + h\,(B \otimes I) \mathbf{g},\]

where

\[ {\bf e}_1=(1,0,\ldots,0)^* \in \mathbb{R}^{s+1}, \quad \mathbf{y} = (\mathbf{y}_0,\ldots,\mathbf{y}_s)^*, \quad \mathbf{g}=(\mathbf{g}_0,\ldots,\mathbf{g}_s)^*,\]

and

\[M= A \otimes I - h\, B \otimes J.\]

Coming from the discretization of

\[\begin{split}\begin{array}{ll} {\displaystyle \frac{{\rm d} {\bf y}(t)}{{\rm d}t}}=J {\bf y}(t) + {\bf g}(t), & t \in (t_0, T],\\ \\ {\bf y}(t_0) = {\bf z}, & \\ \end{array}\end{split}\]

wiht Boundary Value Methods.

Library

To assemble the linear system the key routine is represented by the method bvmatrices.builder.mab() that builds the \(A\) and \(B\) matrices for the different BVM formulas. Then the function bvmatrices.builder.buildlinop() produces the linear operator \(M\) to be used inside a Krylov method.

class builder.bvmethod

A class containing all the information for a given BVM

buildlinop(J, T, t0, g, u0, E=None)

This function build the linear operator \(M= A \otimes E - h\, B \otimes J.\) and the right-hand side for the liner system.

Parameters
  • J – Jacobian of the system to integrate

  • T – Final time of integration

  • t0 – Initial integration

  • g – Right-Hand side, could be either a vector or a function

  • u0 – Initial condition

  • E (optional) – Mass matrix, default value is the identity matrix

Return M

LinearOperator implementing the matrix-vector product

buildprecond(J, T, t0, ptype, E=None)

This function build the linear operator \(P= \operatorname{approx}(A) \otimes E - h\, \operatorname{approx}(B) \otimes J.\)

Parameters
  • J – Jacobian of the system to integrate

  • T – Final time of integration

  • t0 – Initial integration

  • ptype – Type of structured preconditioner to build

  • E (optional) – Mass matrix, default value is the identity matrix

Return P

LinearOperator implementing the preconditioner

buildrhs(u0, g, T, t0)

This function bulds the right-hand side for the all-at-once system with the given BVM formula.

Parameters
  • u0 – Initial condition

  • g – source vector, it can be both a function of t or a constant vector

  • T – Final time of integration

  • t0 – Initial integration

Return rhs

info()

This function prints out the information about the method

mab(type, k, n)

This function creates the A and B matrices for the construction of the BVM.

Parameters
  • type – BVM formula “TOM”, “GBDF”, “GAM”

  • k – Degree of the formula

  • n – Number of time steps

savetomatlab()

Save the building blocks of the method in MATLAB format

builder.rosi_gbdf(k, j)

Builds the ρ and σ polynomials for a generalized BDF formula with

Parameters
  • k – steps

  • j – initial conditions

Return ro

ρ polynomial

Return si

σ polynomial

Utilities

Some auxiliary routines are contained in the utilities module.

utilities.dropcols_coo(C, idx_to_drop)

Drops columns from matrices stored in COO format. Result is returned in CSR format.

Parameters
  • C – Matrix in COO format.

  • idx_to_drop – List of columns to be dropped.

Return C

Matrix in CSR format with dropped columns.

utilities.vsolve(x, b)

This function solves the Vandermonde linear system \(W(x)f = b\). It is a service function needed to compute the ρ and σ polynomials.

Parameters
  • x – vector of the variables generating the Vandermonde system

  • b – right-hand side of the system

Return f

solution of the linear system

Bibliography

Preconditioners and material used in this library are discussed in detail in a number of papers:

Ber99

D. Bertaccini. P–circulant preconditioners and the systems of the ODE codes, pages 179–193. Volume 5 of IMACS series in computational and applied mathematics. IMACS, 1999.

Ber00

D. Bertaccini. A circulant preconditioner for the systems of LMF-based ODE codes. SIAM J. Sci. Comput., 22(3):767–786, 2000. URL: https://doi.org/10.1137/S1064827599353476, doi:10.1137/S1064827599353476.

Ber01

D. Bertaccini. Reliable preconditioned iterative linear solvers for some numerical integrators. Numer. Linear Algebra Appl., 8(2):111–125, 2001.

Ber02

D. Bertaccini. The spectrum of circulant–like preconditioners for some general linear multistep formulas for linear boundary value problems. SIAM J. Numer. Anal., 40(5):1798–1822, 2002.

BD18

D. Bertaccini and F. Durastante. Limited memory block preconditioners for fast solution of fractional partial differential equations. J. Sci. Comput., 77(2):950–970, 2018. URL: https://doi.org/10.1007/s10915-018-0729-3, doi:10.1007/s10915-018-0729-3.

BN03a

D. Bertaccini and M. K. Ng. Block ω-circulant preconditioners for the systems of differential equations. Calcolo, 40(2):71–90, 2003. URL: https://doi.org/10.1007/s100920300004, doi:10.1007/s100920300004.

BN01a

D. Bertaccini and Michael K. Ng. Skew-circulant preconditioners for systems of LMF-based ODE codes. In Numerical analysis and its applications (Rousse, 2000), volume 1988 of Lecture Notes in Comput. Sci., 93–101. Springer, Berlin, 2001. URL: https://doi.org/10.1007/3-540-45262-1_12, doi:10.1007/3-540-45262-1\_12.

BN01b

D. Bertaccini and Michael K. Ng. The convergence rate of block preconditioned systems arising from LMF-based ODE codes. BIT, 41(3):433–450, 2001. URL: https://doi.org/10.1023/A:1021906926616, doi:10.1023/A:1021906926616.

BN03b

D. Bertaccini and Michael K. Ng. Band-Toeplitz preconditioned GMRES iterations for time-dependent PDEs. BIT, 43(suppl.):901–914, 2003.

Indices and tables