This module contains the definition of the basic sparse matrix type and of the associated methods. More...
Data Types | |
type | _qrm_spmat_type |
This type defines the data structure used to store a matrix. More... | |
interface | qrm_cntl_init |
Generif interface for the ::_qrm_cntl_init routine. More... | |
interface | qrm_get |
Generif interface for the ::_qrm_pgeti, ::_qrm_pgetr and. More... | |
interface | qrm_get_r |
Generif interface for the ::_qrm_spmat_alloc routine. More... | |
interface | qrm_set |
Generif interface for the ::_qrm_pseti, ::_qrm_psetr and. More... | |
interface | qrm_spmat_alloc |
Generif interface for the ::_qrm_spmat_alloc routine. More... | |
interface | qrm_spmat_convert |
Generif interface for the ::_qrm_spmat_convert routine. More... | |
interface | qrm_spmat_copy |
Generif interface for the ::_qrm_spmat_copy routine. More... | |
interface | qrm_spmat_destroy |
Generif interface for the ::_qrm_spmat_destroy routine. More... | |
interface | qrm_spmat_init |
Generif interface for the ::_qrm_spmat_init routine. More... | |
Public Member Functions | |
subroutine | _qrm_spmat_alloc (qrm_spmat, nz, m, n, fmt) |
This subroutine allocates memory for a sparse matrix. More... | |
subroutine | _qrm_spmat_init (qrm_spmat) |
This subroutine initializes a qrm_spmat_type instance setting default values into the control parameters. More... | |
subroutine | _qrm_cntl_init (qrm_spmat) |
This subroutine initializes a qrm_spmat_type instance setting default values into the control parameters. More... | |
subroutine | _qrm_spmat_convert (in_mat, out_mat, fmt, values) |
This subroutine converts an input matrix into a different storage format. Optionally the values may be ignored (this comes handy during the analysis) More... | |
subroutine | _qrm_coo_to_csc (in_mat, out_mat, values) |
This subroutine converts a COO matrix into a CSC matrix. Optionally the values may be ignored (this comes handy during the analysis) More... | |
subroutine | _qrm_csc_to_csr (in_mat, out_mat, values) |
This subroutine converts a CSC matrix into a CSR matrix. Optionally the values may be ignored (this comes handy during the analysis) More... | |
subroutine | _qrm_spmat_copy (in_mat, out_mat, values) |
This subroutine makes a copy of a matrix. Optionally the values may be ignored (this comes handy during the analysis) More... | |
subroutine | _qrm_spmat_destroy (qrm_spmat, all) |
This subroutine destroyes a qrm_spmat instance. More... | |
subroutine | _qrm_pseti (qrm_spmat, string, ival) |
This subroutine is meant to set the integer control parameters. More... | |
subroutine | _qrm_psetr (qrm_spmat, string, rval) |
This subroutine is meant to set the real control parameters. More... | |
subroutine | _qrm_pgeti (qrm_spmat, string, ival) |
Gets the values of an integer control parameter. This is the dual of the ::_qrm_pseti routine; the parameters and accepted values are the same. More... | |
subroutine | _qrm_pgetii (qrm_spmat, string, ival) |
Gets the values of an integer control parameter. This is the dual of the ::_qrm_pseti routine; the parameters and accepted values are the same. More... | |
subroutine | _qrm_pgetr (qrm_spmat, string, rval) |
Gets the values of a real control parameter. This is the dual of the ::_qrm_psetr routine; the parameters and accepted values are the same. More... | |
subroutine | _qrm_check_spmat (qrm_spmat, op) |
Check the compatibility and correctness of icntl and rcntl parameters. More... | |
subroutine | _qrm_get_r (qrm_mat, r) |
This module contains the definition of the basic sparse matrix type and of the associated methods.
Definition at line 40 of file qrm_spmat_mod.F90.
subroutine _qrm_spmat_mod::_qrm_check_spmat | ( | type(_qrm_spmat_type) | qrm_spmat, |
integer, optional | op | ||
) |
Check the compatibility and correctness of icntl and rcntl parameters.
Definition at line 1212 of file qrm_spmat_mod.F90.
References qrm_error_mod::qrm_err_act_restore(), qrm_error_mod::qrm_err_act_save(), qrm_error_mod::qrm_err_check(), qrm_error_mod::qrm_err_push(), qrm_given_, qrm_ib_, qrm_nb_, qrm_ordering_, qrm_sing_, and qrm_yes_.
Referenced by _qrm_analyse(), _qrm_factorize(), _qrm_least_squares1d(), _qrm_least_squares2d(), _qrm_min_norm1d(), _qrm_min_norm2d(), _qrm_residual_and_orth1d(), _qrm_residual_and_orth2d(), _qrm_residual_norm1d(), _qrm_residual_norm2d(), _qrm_residual_orth1d(), and _qrm_residual_orth2d().
subroutine _qrm_spmat_mod::_qrm_cntl_init | ( | type(_qrm_spmat_type), intent(inout) | qrm_spmat | ) |
This subroutine initializes a qrm_spmat_type instance setting default values into the control parameters.
[in,out] | qrm_spmat | The matrix to be initialized |
Definition at line 302 of file qrm_spmat_mod.F90.
References qrm_ib_, qrm_keeph_, qrm_minamalg_, qrm_nb_, qrm_no_, qrm_ordering_, qrm_rhsnb_, qrm_rhsnthreads_, qrm_sing_, and qrm_yes_.
subroutine _qrm_spmat_mod::_qrm_coo_to_csc | ( | type(_qrm_spmat_type), intent(in) | in_mat, |
type(_qrm_spmat_type) | out_mat, | ||
logical, optional | values | ||
) |
This subroutine converts a COO matrix into a CSC matrix. Optionally the values may be ignored (this comes handy during the analysis)
[in] | in_mat | the input matrix |
[in,out] | out_mat | the output matrix in fmt format |
[in] | values | (optional) if values=.true. the output matrix will include numerical values, otherwise only the structure |
Definition at line 417 of file qrm_spmat_mod.F90.
References i, qrm_error_mod::qrm_err_act_restore(), qrm_error_mod::qrm_err_act_save(), and qrm_error_mod::qrm_err_check().
Referenced by _qrm_spmat_convert().
subroutine _qrm_spmat_mod::_qrm_csc_to_csr | ( | type(_qrm_spmat_type), intent(in) | in_mat, |
type(_qrm_spmat_type) | out_mat, | ||
logical, optional | values | ||
) |
This subroutine converts a CSC matrix into a CSR matrix. Optionally the values may be ignored (this comes handy during the analysis)
[in] | in_mat | the input matrix |
[in,out] | out_mat | the output matrix in fmt format |
[in] | values | (optional) if values=.true. the output matrix will include numerical values, otherwise only the structure |
Definition at line 532 of file qrm_spmat_mod.F90.
References i, qrm_error_mod::qrm_err_act_restore(), qrm_error_mod::qrm_err_act_save(), and qrm_error_mod::qrm_err_check().
Referenced by _qrm_spmat_convert().
subroutine _qrm_spmat_mod::_qrm_get_r | ( | type(_qrm_spmat_type), target | qrm_mat, |
type(_qrm_spmat_type) | r | ||
) |
Definition at line 1289 of file qrm_spmat_mod.F90.
References qrm_nnz_r_.
subroutine _qrm_spmat_mod::_qrm_pgeti | ( | type(_qrm_spmat_type) | qrm_spmat, |
character(len=*) | string, | ||
integer | ival | ||
) |
Gets the values of an integer control parameter. This is the dual of the ::_qrm_pseti routine; the parameters and accepted values are the same.
Definition at line 1007 of file qrm_spmat_mod.F90.
References _qrm_spmat_mod::qrm_get::_qrm_pgetii(), qrm_error_mod::qrm_err_act_restore(), qrm_error_mod::qrm_err_act_save(), and qrm_error_mod::qrm_err_check().
subroutine _qrm_spmat_mod::_qrm_pgetii | ( | type(_qrm_spmat_type) | qrm_spmat, |
character(len=* ) | string, | ||
integer(kind=8) | ival | ||
) |
Gets the values of an integer control parameter. This is the dual of the ::_qrm_pseti routine; the parameters and accepted values are the same.
Definition at line 1046 of file qrm_spmat_mod.F90.
References qrm_e_facto_flops_, qrm_e_nnz_h_, qrm_e_nnz_r_, qrm_error_mod::qrm_err_act_restore(), qrm_error_mod::qrm_err_act_save(), qrm_error_mod::qrm_err_check(), qrm_error_mod::qrm_err_push(), qrm_facto_flops_, qrm_ib_, qrm_keeph_, qrm_minamalg_, qrm_nb_, qrm_nnz_h_, qrm_nnz_r_, qrm_ordering_, qrm_rhsnb_, qrm_rhsnthreads_, and qrm_sing_.
subroutine _qrm_spmat_mod::_qrm_pgetr | ( | type(_qrm_spmat_type) | qrm_spmat, |
character(len=*) | string, | ||
real(kind(1.d0)) | rval | ||
) |
Gets the values of a real control parameter. This is the dual of the ::_qrm_psetr routine; the parameters and accepted values are the same.
Definition at line 1119 of file qrm_spmat_mod.F90.
References qrm_error_mod::qrm_err_act_restore(), qrm_error_mod::qrm_err_act_save(), qrm_error_mod::qrm_err_check(), and qrm_error_mod::qrm_err_push().
subroutine _qrm_spmat_mod::_qrm_pseti | ( | type(_qrm_spmat_type) | qrm_spmat, |
character(len=*) | string, | ||
integer | ival | ||
) |
This subroutine is meant to set the integer control parameters.
[in,out] | qrm_spmat | The qrm_spmat instance concerned by the setting |
[in] | string | a string describing the parameter to be set. Accepted values are:
|
[in] | ival | Any of the accepted values described above |
Definition at line 823 of file qrm_spmat_mod.F90.
References qrm_error_mod::qrm_err_act_restore(), qrm_error_mod::qrm_err_act_save(), qrm_error_mod::qrm_err_check(), qrm_error_mod::qrm_err_push(), qrm_ib_, qrm_keeph_, qrm_minamalg_, qrm_nb_, qrm_no_, qrm_ordering_, qrm_rhsnb_, qrm_rhsnthreads_, qrm_sing_, and qrm_yes_.
subroutine _qrm_spmat_mod::_qrm_psetr | ( | type(_qrm_spmat_type) | qrm_spmat, |
character(len=*) | string, | ||
real(kind(1.d0)) | rval | ||
) |
This subroutine is meant to set the real control parameters.
[in,out] | qrm_spmat | The qrm_spmat instance concerned by the setting |
[in] | string | a string describing the parameter to be set. Accepted values are:
|
[in] | rval | Any of the accepted values described above |
Definition at line 910 of file qrm_spmat_mod.F90.
References qrm_error_mod::qrm_err_act_restore(), qrm_error_mod::qrm_err_act_save(), qrm_error_mod::qrm_err_check(), and qrm_error_mod::qrm_err_push().
subroutine _qrm_spmat_mod::_qrm_spmat_alloc | ( | type(_qrm_spmat_type), intent(inout) | qrm_spmat, |
integer, intent(in) | nz, | ||
integer, intent(in) | m, | ||
integer, intent(in) | n, | ||
character, dimension(*), intent(in) | fmt | ||
) |
This subroutine allocates memory for a sparse matrix.
[in,out] | qrm_spmat | A _qrm_spmat_mod::_qrm_spmat_type data structure. The memory for storing the matrix is allocated according to the storage format. Also qrm_spmatnz, qrm_spmatm and qrm_spmatn are set to nz, m and n respectively. These are the sizes of the arrays in output
|
[in] | nz | The number of nonzeroes contained in the matrix |
[in] | m | The number of rows in the matrix |
[in] | n | The number of columns in the matrix |
[in] | fmt | The matrix storage format. Can be either "coo" or "csr" or "csc" |
Definition at line 216 of file qrm_spmat_mod.F90.
References qrm_error_mod::qrm_err_act_restore(), qrm_error_mod::qrm_err_act_save(), qrm_error_mod::qrm_err_check(), and qrm_error_mod::qrm_err_push().
subroutine _qrm_spmat_mod::_qrm_spmat_convert | ( | type(_qrm_spmat_type), intent(in) | in_mat, |
type(_qrm_spmat_type) | out_mat, | ||
character, dimension(*), intent(in) | fmt, | ||
logical, optional | values | ||
) |
This subroutine converts an input matrix into a different storage format. Optionally the values may be ignored (this comes handy during the analysis)
[in] | in_mat | the input matrix |
[in,out] | out_mat | the output matrix in fmt format |
[in] | fmt | the format of the output matrix |
[in] | values | (optional) if values=.true. the output matrix will include numerical values, otherwise only the structure |
Definition at line 355 of file qrm_spmat_mod.F90.
References _qrm_coo_to_csc(), _qrm_csc_to_csr(), qrm_error_mod::qrm_err_act_restore(), qrm_error_mod::qrm_err_act_save(), qrm_error_mod::qrm_err_check(), and qrm_error_mod::qrm_err_push().
subroutine _qrm_spmat_mod::_qrm_spmat_copy | ( | type(_qrm_spmat_type), intent(in) | in_mat, |
type(_qrm_spmat_type) | out_mat, | ||
logical, optional | values | ||
) |
This subroutine makes a copy of a matrix. Optionally the values may be ignored (this comes handy during the analysis)
[in] | in_mat | the input matrix |
[in,out] | out_mat | the output matrix in fmt format |
[in] | values | (optional) if values=.true. the output matrix will include numerical values, otherwise only the structure |
Definition at line 652 of file qrm_spmat_mod.F90.
References i, qrm_error_mod::qrm_err_act_restore(), qrm_error_mod::qrm_err_act_save(), qrm_error_mod::qrm_err_check(), and qrm_error_mod::qrm_err_push().
subroutine _qrm_spmat_mod::_qrm_spmat_destroy | ( | type(_qrm_spmat_type) | qrm_spmat, |
logical, optional | all | ||
) |
This subroutine destroyes a qrm_spmat instance.
[in,out] | qrm_spmat | the matrix to be destroyed |
[in] | all | whether to deallocate all the memory or not |
Definition at line 729 of file qrm_spmat_mod.F90.
References _qrm_fdata_mod::qrm_fdata_destroy::_qrm_fdata_destroy(), qrm_adata_mod::qrm_adata_destroy(), qrm_error_mod::qrm_err_act_restore(), qrm_error_mod::qrm_err_act_save(), and qrm_error_mod::qrm_err_check().
subroutine _qrm_spmat_mod::_qrm_spmat_init | ( | type(_qrm_spmat_type), intent(inout) | qrm_spmat | ) |
This subroutine initializes a qrm_spmat_type instance setting default values into the control parameters.
[in,out] | qrm_spmat | The matrix to be initialized |
Definition at line 278 of file qrm_spmat_mod.F90.
References _qrm_spmat_mod::qrm_cntl_init::_qrm_cntl_init().