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)
 
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-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.

Member Function/Subroutine Documentation

subroutine fold_ ( class(ism_csc), intent(in)  from,
integer(ii_), intent(in)  nr,
integer(ii_), intent(in)  nc,
class(ism_csc), intent(inout)  to,
logical, intent(in), optional  single 
)
private
Parameters
[in]fromthe originating sparse pattern
[in]nrnew number of rows in the sparse pattern
[in]ncnew number of columns in the sparse pattern
[in,out]tothe resulting sparse pattern
[in]singleoptional=.false. if .true.: will compress equivalent entries to a single entry, no double entries will be found subsequently.

Here is the call graph for this function:


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