35 #include "qrm_common.h"
62 integer :: f, nrowsf, nvalsf,
i, j, roff, r, c, lrow, itmp, k, m, n
63 integer,
allocatable :: rmap(:), rcnt(:), vcnt(:), row_to_frow(:)
65 real(kind(1.d0)) :: vtmp
68 character(len=*),
parameter :: name=
'qrm_analyse'
73 __qrm_check_ret(name,
'qrm_fdata_destroy',9999)
74 allocate(qrm_mat%fdata%front_list(qrm_mat%adata%nnodes))
81 __qrm_check_ret(name,
'qrm_aalloc',9999)
87 qrm_mat%fdata%nfronts = qrm_mat%adata%nnodes
89 call omp_init_lock(qrm_mat%fdata%lock)
96 do f = 1, qrm_mat%adata%nnodes
98 do i = roff, qrm_mat%adata%stair(f)
99 rmap(qrm_mat%adata%rperm(
i)) = f
100 row_to_frow(qrm_mat%adata%rperm(
i)) =
i-roff+1
102 roff = qrm_mat%adata%stair(f)+1
109 if((j.le.0) .or. (j.gt.n) .or. (
i.le.0) .or. (
i.gt.m) ) cycle
119 qrm_mat%fdata%front_list(:)%status=0
120 do f = 1, qrm_mat%adata%nnodes
121 front => qrm_mat%fdata%front_list(f)
122 nrowsf = qrm_mat%adata%stair(f) - roff
123 front%anrows = nrowsf
125 do i=qrm_mat%adata%childptr(f), qrm_mat%adata%childptr(f+1)-1
126 c = qrm_mat%adata%child(
i)
127 if(qrm_mat%adata%small(c) .eq. 0) front%status = front%status-1
130 call omp_init_lock(front%lock)
135 __qrm_check_ret(name,
'qrm_aalloc',9999)
139 front%aiptr(
i+2) = front%aiptr(
i+1)+rcnt(qrm_mat%adata%rperm(roff+
i))
142 roff = qrm_mat%adata%stair(f)
151 if((j.le.0) .or. (j.gt.n) .or. (
i.le.0) .or. (
i.gt.m) ) cycle
155 lrow = row_to_frow(r)
156 front => qrm_mat%fdata%front_list(f)
157 front%ajcn(front%aiptr(lrow+1)) = c
158 front%aval(front%aiptr(lrow+1)) = qrm_mat%val(k)
159 front%aiptr(lrow+1) = front%aiptr(lrow+1)+1
162 qrm_mat%fdata%done = 0
164 if(qrm_mat%adata%ncsing .gt. 0)
then
165 qrm_mat%fdata%done = 1
172 front => qrm_mat%fdata%front_list(1)
174 do j=front%aiptr(
i), front%aiptr(
i+1)-1
176 if(qrm_mat%adata%cperm(
i) .eq. c)
then
178 vtmp = front%aval(front%aiptr(
i))
179 front%aval(front%aiptr(
i)) = front%aval(j)
181 itmp = front%ajcn(front%aiptr(
i))
182 front%ajcn(front%aiptr(
i)) = c
195 __qrm_check_ret(name,
'qrm_adealloc',9999)
202 if(err_act .eq. qrm_abort_)
then
This module contains all the error management routines and data.
Generic interface for the qrm_adealloc_i, qrm_adealloc_2i, qrm_adealloc_s, qrm_adealloc_2s, qrm_adealloc_3s, qrm_adealloc_d, qrm_adealloc_2d, qrm_adealloc_3d, qrm_adealloc_c, qrm_adealloc_2c, qrm_adealloc_3c, qrm_adealloc_z, qrm_adealloc_2z, qrm_adealloc_3z, routines.
This module contains the interfaces of all non-typed routines.
subroutine qrm_err_act_restore(err_act)
Restores the value of the qrm_err_act variable.
This module contains the definition of the basic sparse matrix type and of the associated methods...
This module contains generic interfaces for a number of auxiliary tools.
subroutine qrm_err_check()
This subroutine checks the errors stack. If something is found all the entries in the stack are poppe...
This module contains the definition of all the data related to the factorization phase.
Generic interface for the qrm_aalloc_i, qrm_aalloc_2i, qrm_aalloc_s, qrm_aalloc_2s, qrm_aalloc_3s, qrm_aalloc_d, qrm_aalloc_2d, qrm_aalloc_3d, qrm_aalloc_c, qrm_aalloc_2c, qrm_aalloc_3c, qrm_aalloc_z, qrm_aalloc_2z, qrm_aalloc_3z, routines.
This type defines the data structure used to store a matrix.
subroutine dqrm_factorization_init(qrm_mat)
This subroutine initializes the data structures needed for the actual factorization.
This type defines a data structure containing all the data related to a front.
This module implements the memory handling routines. Pretty mucch allocations and deallocations...
subroutine dqrm_fdata_destroy(qrm_fdata)
Destroys a dqrm_fdata_type instance.
subroutine qrm_err_act_save(err_act)
Saves a copy of the qrm_err_act variable.