34 #include "qrm_common.h" 57 _qrm_data :: b(:,:), x(:,:)
60 _qrm_real,
allocatable :: nrmb(:), nrmx(:)
66 character(len=*),
parameter :: name=
'qrm_residual_norm' 71 __qrm_check_ret(name,
'qrm_check_spmat',9999)
73 nrhs = min(
size(b,2),
size(x,2))
75 call qrm_aalloc(nrmb, nrhs)
76 call qrm_aalloc(nrmx, nrhs)
78 call qrm_vecnrm(b(:,1:nrhs), qrm_mat%m,
'i', nrmb)
79 call qrm_vecnrm(x(:,1:nrhs), qrm_mat%n,
'i', nrmx)
82 call qrm_matmul(qrm_mat,
'n', -_qrm_one, x, _qrm_one, b)
86 nrmb = nrmb + nrma*nrmx
90 call qrm_adealloc(nrmx)
91 call qrm_adealloc(nrmb)
128 _qrm_data :: b(:), x(:)
131 _qrm_real :: nrmb, nrmx
137 character(len=*),
parameter :: name=
'qrm_residual_norm' 142 __qrm_check_ret(name,
'qrm_check_spmat',9999)
148 call qrm_matmul(qrm_mat,
'n', -_qrm_one, x, _qrm_one, b)
152 nrmb = nrmb + nrma*nrmx
subroutine _qrm_residual_norm1d(qrm_mat, b, x, nrm)
This routine computes the scaled norm of the residual.
This module contains generic interfaces for a number of auxiliary tools.
subroutine qrm_err_act_save(err_act)
Saves a copy of the qrm_err_act variable.
subroutine _qrm_residual_norm2d(qrm_mat, b, x, nrm)
This routine computes the scaled norm of multiple residuals.
This module contains all the error management routines and data.
Generic interface for the ::_qrm_vecnrm2d and ::_qrm_vecnrm1d routines.
integer, parameter qrm_abort_
Possible actions to be performed upon detection of an error.
subroutine qrm_err_check()
This subroutine checks the errors stack. If something is found all the entries in the stack are poppe...
This type defines the data structure used to store a matrix.
This module contains the definition of the basic sparse matrix type and of the associated methods...
subroutine _qrm_check_spmat(qrm_spmat, op)
Check the compatibility and correctness of icntl and rcntl parameters.
subroutine qrm_err_act_restore(err_act)
Restores the value of the qrm_err_act variable.
Generic interface for the ::_qrm_matmul2d and ::_qrm_matmul1d routines.