36 #include "qrm_common.h" 89 integer :: scol(:), srow(:), mcperm(:), mrperm(:)
90 integer :: nrsing, ncsing
93 integer,
allocatable :: tmp(:)
94 integer :: m, n, i, nnodes
103 nnodes = qrm_mat%adata%nnodes+1
107 call qrm_aalloc(tmp, n)
110 tmp(ncsing+i) = mcperm(qrm_mat%adata%cperm(i))
112 call qrm_adealloc(qrm_mat%adata%cperm)
113 call move_alloc(tmp, qrm_mat%adata%cperm)
118 call qrm_aalloc(tmp, m)
121 tmp(nrsing+i) = mrperm(qrm_mat%adata%rperm(i))
123 call qrm_adealloc(qrm_mat%adata%rperm)
124 call move_alloc(tmp, qrm_mat%adata%rperm)
129 call qrm_aalloc(tmp, nnodes+1)
131 tmp(2:nnodes+1) = qrm_mat%adata%cp_ptr(1:qrm_mat%adata%nnodes+1)+ncsing
132 call qrm_adealloc(qrm_mat%adata%cp_ptr)
133 call move_alloc(tmp, qrm_mat%adata%cp_ptr)
138 call qrm_aalloc(tmp, nnodes)
140 do i=1, qrm_mat%adata%nnodes
141 if(qrm_mat%adata%parent(i) .eq. 0)
then 144 tmp(i+1) = qrm_mat%adata%parent(i)+1
147 call qrm_adealloc(qrm_mat%adata%parent)
148 call move_alloc(tmp, qrm_mat%adata%parent)
153 call qrm_aalloc(tmp, nnodes)
155 tmp(2:nnodes) = qrm_mat%adata%rc(1:qrm_mat%adata%nnodes)
156 call qrm_adealloc(qrm_mat%adata%rc)
157 call move_alloc(tmp, qrm_mat%adata%rc)
162 call qrm_aalloc(tmp, nnodes)
164 tmp(2:nnodes) = qrm_mat%adata%stair(1:qrm_mat%adata%nnodes)+nrsing
165 call qrm_adealloc(qrm_mat%adata%stair)
166 call move_alloc(tmp, qrm_mat%adata%stair)
171 call qrm_aalloc(tmp, nnodes+1)
173 tmp(2:nnodes+1) = qrm_mat%adata%childptr(1:qrm_mat%adata%nnodes+1)
174 qrm_mat%adata%child = qrm_mat%adata%child+1
175 call qrm_adealloc(qrm_mat%adata%childptr)
176 call move_alloc(tmp, qrm_mat%adata%childptr)
181 call qrm_aalloc(tmp, nnodes)
183 tmp(2:nnodes) = qrm_mat%adata%nfrows(1:qrm_mat%adata%nnodes)
184 call qrm_adealloc(qrm_mat%adata%nfrows)
185 call move_alloc(tmp, qrm_mat%adata%nfrows)
190 call qrm_aalloc(tmp, nnodes+1)
192 tmp(2:nnodes+1) = qrm_mat%adata%fcol_ptr(1:qrm_mat%adata%nnodes+1)
193 call qrm_adealloc(qrm_mat%adata%fcol_ptr)
194 call move_alloc(tmp, qrm_mat%adata%fcol_ptr)
195 do i=1, qrm_mat%adata%fcol_ptr(nnodes+1)-1
196 qrm_mat%adata%fcol(i) = mcperm(qrm_mat%adata%fcol(i))
202 qrm_mat%adata%leaves = qrm_mat%adata%leaves+1
203 call qrm_aalloc(tmp, nnodes)
205 tmp(2:nnodes) = qrm_mat%adata%small(1:qrm_mat%adata%nnodes)
206 call qrm_adealloc(qrm_mat%adata%small)
207 call move_alloc(tmp, qrm_mat%adata%small)
212 call qrm_arealloc(qrm_mat%adata%icperm, n)
214 qrm_mat%adata%icperm(qrm_mat%adata%cperm(i)) = i
218 qrm_mat%adata%nnodes = nnodes
219 qrm_mat%adata%ncsing = ncsing
220 qrm_mat%adata%nrsing = nrsing
This module contains the definition of the analysis data type.
This module contains the definition of the basic sparse matrix type and of the associated methods...
subroutine dqrm_attach_singletons(qrm_mat, scol, srow, mrperm, mcperm, nrsing, ncsing)
This subroutine merges the results of the singletons detection into the results of the analysis phase...
This type defines the data structure used to store a matrix.