R: Solution of an almost block diagonal system of linear...
Solve.block
R Documentation
Solution of an almost block diagonal system of linear equations
Description
Solves the linear system A*X=B where A is an almost block diagonal matrix of
the form:
TopBlock
... Array(1) ... ... ...
... ... Array(2) ... ...
...
... ... ... Array(Nblocks)...
... ... ... BotBlock
The method is based on Gauss elimination with alternate row and column
elimination with partial pivoting, producing a stable decomposition of
the matrix A without introducing fill-in.
uses FORTRAN subroutine colrow
Usage
Solve.block(Top, AR, Bot, B, overlap)
Arguments
Top
the first block of the almost block diagonal matrix A.
AR
intermediary blocks; AR(.,.,K) contains the kth block of
matrix A.
Bot
the last block of the almost block diagonal matrix A.
B
Right-hand side of the equations, a vector with length = number
of rows of A,
or a matrix with number of rows = number of rows of A.
overlap
the number of columns in which successive blocks
overlap, and where overlap = nrow(Top) + nrow(Bot).
Value
matrix with the solution, X, of the block diagonal system of equations Ax=B,
the number of columns of this matrix = number of columns of B.
Note
A similar function but that requires a totally different input can now
also be found in the Matrix package
Author(s)
Karline Soetaert <karline.soetaert@nioz.nl>
References
J. C. Diaz , G. Fairweather , P. Keast, 1983.
FORTRAN Packages for Solving Certain Almost Block Diagonal Linear
Systems by Modified Alternate Row and Column Elimination,
ACM Transactions on Mathematical Software (TOMS), v.9 n.3, p.358-375
See Also
Solve.tridiag to solve a tridiagonal system of linear equations.
Solve.banded to solve a banded system of linear equations.