buds
0.1
FORTRAN reference counted types
|
Fold a sparse matrix to form a smaller sparse matrix. More...
Private Member Functions | |
subroutine | fold_ (from, nr, nc, to, single) |
subroutine | fold_ (from, nr, nc, to, single) |
Fold a sparse matrix to form a smaller sparse matrix.
Reduce the size of a sparse matrix by folding ir -> mod(ir-1, nnr) + 1
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.
|
private |
[in] | from | the originating sparse pattern |
[in] | nr | new number of rows in the sparse pattern |
[in] | nc | new number of columns in the sparse pattern |
[in,out] | to | the resulting sparse pattern |
[in] | single | optional=.false. if .true.: will compress equivalent entries to a single entry, no double entries will be found subsequently. |