Tpetra,Ifpack2: Efficient MVP and block Jacobi (BCRS) preconditioning with A + D
Created by: ambrad
An application with implicit time stepping typically assembles a matrix A. Then it determines the next time step and needs to update A with a diagonal matrix D.
Suppose A is a Tpetra BlockCrsMatrix (BCRS).
An extreme (and common case) is D = d I, where d is a scalar and I is the identity matrix. It may be efficient to specialize for this case.
One solution is simply to explicitly update the diagonal blocks of A. Because the time step is not known during assembly (it is computed during assembly), explicitly forming A += D requires traversing A's memory to touch each on-diagonal block. We do not want to traverse A's memory unless absolutely necessary.
A second class of solutions is to represent D implicitly. A is not explicitly updated, but instead D (or d in the special case) is carried around separately. It must be handled in at least two contexts:
- The matrix-vector product y = (A + D) x must be as efficient as possible. Ideally, one does not simply do y = D x y += A x since that traverses (x,y)'s memory twice.
- The formation of the preconditioner. For concreteness, consider the block Jacobi preconditioner. In the setup, it must do something mathematically equivalent to [L U p] = lu(block(A + D, k, k)), where block(M, k, k) extracts block (k,k) from BCRS matrix M.