buds  0.1
FORTRAN reference counted types
Private Member Functions | List of all members

Fold a sparse matrix to form a smaller sparse matrix. More...

Collaboration diagram for mat_fold:
Collaboration graph

Private Member Functions

subroutine fold_ (from, nr, nc, to, single)
 

Detailed Description

Fold a sparse matrix to form a smaller sparse matrix.

Reduce the size of a sparse matrix by folding ir -> mod(ir, nnr) with nnr being the new number of rows.

If the folding reduces the matrix dimensions by half (for a matrix with even number of rows and columns) it will correspond to the following operation:

\begin{align*} \mathbf M_{\mathrm{old}} &= \begin{bmatrix} \mathbf A & \mathbf B \\{} \mathbf C & \mathbf D \end{bmatrix} \\{} \mathbf M_{\mathrm{new}} &= \mathbf A + \mathbf B + \mathbf C + \mathbf D \end{align*}

Both the number of rows and/or columns may changed individually.


The documentation for this interface was generated from the following file: