DBCSR transformations
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=*), | private, | parameter | :: | moduleN | = | 'dbcsr_transformations' | |
logical, | private, | parameter | :: | careful_mod | = | .FALSE. |
Transposes a DBCSR matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_type), | intent(inout) | :: | transposed |
transposed DBCSR matrix |
||
type(dbcsr_type), | intent(in) | :: | normal |
input DBCSR matrix |
||
logical, | intent(in), | optional | :: | shallow_data_copy |
only shallow data_copy; default is no; if set, the transpose_data option is ignored transpose data blocks, default is True transpose the distribution from the input matrix, default is True transpose the index (default=yes) or turn it into BCSC |
|
logical, | intent(in), | optional | :: | transpose_data |
only shallow data_copy; default is no; if set, the transpose_data option is ignored transpose data blocks, default is True transpose the distribution from the input matrix, default is True transpose the index (default=yes) or turn it into BCSC |
|
logical, | intent(in), | optional | :: | transpose_distribution |
only shallow data_copy; default is no; if set, the transpose_data option is ignored transpose data blocks, default is True transpose the distribution from the input matrix, default is True transpose the index (default=yes) or turn it into BCSC |
|
logical, | intent(in), | optional | :: | transpose_index |
only shallow data_copy; default is no; if set, the transpose_data option is ignored transpose data blocks, default is True transpose the distribution from the input matrix, default is True transpose the index (default=yes) or turn it into BCSC |
|
type(dbcsr_distribution_obj), | intent(in), | optional | :: | use_distribution |
use this distribution |
|
logical, | intent(in), | optional | :: | redistribute |
redistributes the matrix; default is .TRUE. unless shallow or transpose_distribution are set. |
Transposes a DBCSR matrix, keeping the same distribution
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_type), | intent(inout) | :: | transposed | |||
type(dbcsr_type), | intent(in) | :: | normal | |||
logical, | intent(in), | optional | :: | shallow_data_copy | ||
logical, | intent(in), | optional | :: | transpose_data | ||
logical, | intent(in), | optional | :: | transpose_distribution | ||
type(dbcsr_distribution_obj), | intent(in), | optional | :: | use_distribution |
Duplicates data in symmetric matrix to make it normal (w.r.t. data structure. Can handle symmetric/antisymmetric/hermitian/skewhermitian matrices
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_type), | intent(in) | :: | sm |
input symmetric matrix |
||
type(dbcsr_type), | intent(inout) | :: | desm |
desymmetrized matrix |
||
logical, | intent(in), | optional | :: | untransposed_data |
Distributes a matrix that is currently replicated.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_type), | intent(inout) | :: | matrix |
matrix to replicate |
||
logical, | intent(in), | optional | :: | fast |
change just the index, don't touch the data |
Detransposes all blocks in a matrix
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_type), | intent(inout) | :: | matrix |
DBCSR matrix |
Makes a dense matrix, inplace.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_type), | intent(in) | :: | matrix |
matrix to make dense |
||
type(dbcsr_type), | intent(out) | :: | dense_matrix | |||
type(dbcsr_distribution_obj), | intent(inout) | :: | dense_dist | |||
type(array_i1d_obj), | intent(in) | :: | dense_row_sizes | |||
type(array_i1d_obj), | intent(in) | :: | dense_col_sizes | |||
type(array_i1d_obj), | intent(in) | :: | row_map | |||
type(array_i1d_obj), | intent(in) | :: | col_map |
Copies a matrix and makes its data dense.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_type), | intent(in) | :: | und_matrix |
Original non-dense matrix |
||
type(dbcsr_type), | intent(inout) | :: | dense_matrix |
Dense copy of und_matrix |
||
integer, | intent(in), | DIMENSION(:) | :: | und_local_rows |
The process-grid local rows of the non-dense und_matrix The process-grid local columns of the non-dense und_matrix The block offsets of the rows of the non-dense matrix The block offsets of the columns of the non-dense matrix The process-grid local rows of the dense matrix The process-grid local columns of the dense matrix The block offsets of the rows of the dense matrix The block offsets of the columns of the dense matrix Mapping of non-dense rows to dense rows Mapping of non-dense columns to dense columns |
|
integer, | intent(in), | DIMENSION(:) | :: | und_local_cols |
The process-grid local rows of the non-dense und_matrix The process-grid local columns of the non-dense und_matrix The block offsets of the rows of the non-dense matrix The block offsets of the columns of the non-dense matrix The process-grid local rows of the dense matrix The process-grid local columns of the dense matrix The block offsets of the rows of the dense matrix The block offsets of the columns of the dense matrix Mapping of non-dense rows to dense rows Mapping of non-dense columns to dense columns |
|
integer, | intent(in), | DIMENSION(:) | :: | und_row_blk_offsets |
The process-grid local rows of the non-dense und_matrix The process-grid local columns of the non-dense und_matrix The block offsets of the rows of the non-dense matrix The block offsets of the columns of the non-dense matrix The process-grid local rows of the dense matrix The process-grid local columns of the dense matrix The block offsets of the rows of the dense matrix The block offsets of the columns of the dense matrix Mapping of non-dense rows to dense rows Mapping of non-dense columns to dense columns |
|
integer, | intent(in), | DIMENSION(:) | :: | und_col_blk_offsets |
The process-grid local rows of the non-dense und_matrix The process-grid local columns of the non-dense und_matrix The block offsets of the rows of the non-dense matrix The block offsets of the columns of the non-dense matrix The process-grid local rows of the dense matrix The process-grid local columns of the dense matrix The block offsets of the rows of the dense matrix The block offsets of the columns of the dense matrix Mapping of non-dense rows to dense rows Mapping of non-dense columns to dense columns |
|
integer, | intent(in), | DIMENSION(:) | :: | dense_local_rows |
The process-grid local rows of the non-dense und_matrix The process-grid local columns of the non-dense und_matrix The block offsets of the rows of the non-dense matrix The block offsets of the columns of the non-dense matrix The process-grid local rows of the dense matrix The process-grid local columns of the dense matrix The block offsets of the rows of the dense matrix The block offsets of the columns of the dense matrix Mapping of non-dense rows to dense rows Mapping of non-dense columns to dense columns |
|
integer, | intent(in), | DIMENSION(:) | :: | dense_local_cols |
The process-grid local rows of the non-dense und_matrix The process-grid local columns of the non-dense und_matrix The block offsets of the rows of the non-dense matrix The block offsets of the columns of the non-dense matrix The process-grid local rows of the dense matrix The process-grid local columns of the dense matrix The block offsets of the rows of the dense matrix The block offsets of the columns of the dense matrix Mapping of non-dense rows to dense rows Mapping of non-dense columns to dense columns |
|
integer, | intent(in), | DIMENSION(:) | :: | dense_row_blk_offsets |
The process-grid local rows of the non-dense und_matrix The process-grid local columns of the non-dense und_matrix The block offsets of the rows of the non-dense matrix The block offsets of the columns of the non-dense matrix The process-grid local rows of the dense matrix The process-grid local columns of the dense matrix The block offsets of the rows of the dense matrix The block offsets of the columns of the dense matrix Mapping of non-dense rows to dense rows Mapping of non-dense columns to dense columns |
|
integer, | intent(in), | DIMENSION(:) | :: | dense_col_blk_offsets |
The process-grid local rows of the non-dense und_matrix The process-grid local columns of the non-dense und_matrix The block offsets of the rows of the non-dense matrix The block offsets of the columns of the non-dense matrix The process-grid local rows of the dense matrix The process-grid local columns of the dense matrix The block offsets of the rows of the dense matrix The block offsets of the columns of the dense matrix Mapping of non-dense rows to dense rows Mapping of non-dense columns to dense columns |
|
integer, | intent(in), | DIMENSION(:) | :: | row_map |
The process-grid local rows of the non-dense und_matrix The process-grid local columns of the non-dense und_matrix The block offsets of the rows of the non-dense matrix The block offsets of the columns of the non-dense matrix The process-grid local rows of the dense matrix The process-grid local columns of the dense matrix The block offsets of the rows of the dense matrix The block offsets of the columns of the dense matrix Mapping of non-dense rows to dense rows Mapping of non-dense columns to dense columns |
|
integer, | intent(in), | DIMENSION(:) | :: | col_map |
The process-grid local rows of the non-dense und_matrix The process-grid local columns of the non-dense und_matrix The block offsets of the rows of the non-dense matrix The block offsets of the columns of the non-dense matrix The process-grid local rows of the dense matrix The process-grid local columns of the dense matrix The block offsets of the rows of the dense matrix The block offsets of the columns of the dense matrix Mapping of non-dense rows to dense rows Mapping of non-dense columns to dense columns |
|
logical, | intent(in) | :: | join_rows |
Make rows dense Make columns dense |
||
logical, | intent(in) | :: | join_cols |
Make rows dense Make columns dense |
Makes a blocked matrix from a dense matrix, inplace
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_type), | intent(in) | :: | matrix |
dense matrix |
||
type(dbcsr_type), | intent(inout) | :: | undense_matrix |
matrix to make undense |
||
type(dbcsr_distribution_obj), | intent(in) | :: | distribution |
distribution of non-dense rows and columns |
||
type(array_i1d_obj), | intent(in) | :: | row_blk_offsets |
non-dense row block offsets non-dense column block offsets non-dense row block sizes non-dense column block sizes mapping from non-dense rows mapping from non-dense columns |
||
type(array_i1d_obj), | intent(in) | :: | col_blk_offsets |
non-dense row block offsets non-dense column block offsets non-dense row block sizes non-dense column block sizes mapping from non-dense rows mapping from non-dense columns |
||
type(array_i1d_obj), | intent(in) | :: | row_blk_sizes |
non-dense row block offsets non-dense column block offsets non-dense row block sizes non-dense column block sizes mapping from non-dense rows mapping from non-dense columns |
||
type(array_i1d_obj), | intent(in) | :: | col_blk_sizes |
non-dense row block offsets non-dense column block offsets non-dense row block sizes non-dense column block sizes mapping from non-dense rows mapping from non-dense columns |
||
type(array_i1d_obj), | intent(in) | :: | row_map |
non-dense row block offsets non-dense column block offsets non-dense row block sizes non-dense column block sizes mapping from non-dense rows mapping from non-dense columns |
||
type(array_i1d_obj), | intent(in) | :: | col_map |
non-dense row block offsets non-dense column block offsets non-dense row block sizes non-dense column block sizes mapping from non-dense rows mapping from non-dense columns |
Shuffles the data from blocked to standard dense form
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_type), | intent(in) | :: | matrix |
Existing blocked matrix |
||
type(dbcsr_data_obj), | intent(inout) | :: | dense_data |
Dense data |
||
integer, | intent(in) | :: | nfullrows |
size of new data size of new data |
||
integer, | intent(in) | :: | nfullcols |
size of new data size of new data |
||
integer, | intent(in), | DIMENSION(:) | :: | und_row_blk_offsets | ||
integer, | intent(in), | DIMENSION(:) | :: | und_col_blk_offsets | ||
integer, | intent(in), | DIMENSION(:) | :: | dense_row_blk_offsets | ||
integer, | intent(in), | DIMENSION(:) | :: | dense_col_blk_offsets | ||
integer, | intent(in), | DIMENSION(:) | :: | row_map | ||
integer, | intent(in), | DIMENSION(:) | :: | col_map | ||
integer, | intent(in), | DIMENSION(:) | :: | row_internal_offsets | ||
integer, | intent(in), | DIMENSION(:) | :: | col_internal_offsets | ||
logical, | intent(in) | :: | join_rows |
make rows dense, default is yes make columns dense, default is yes make the dense blocks transposed |
||
logical, | intent(in) | :: | join_cols |
make rows dense, default is yes make columns dense, default is yes make the dense blocks transposed |
||
logical, | intent(in) | :: | make_tr |
make rows dense, default is yes make columns dense, default is yes make the dense blocks transposed |
Shuffles the data from standard dense to blocked form
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_type), | intent(inout) | :: | matrix |
Matrix with data to fill |
||
type(dbcsr_data_obj), | intent(in) | :: | dense_data |
Dense data |
||
integer, | intent(in) | :: | nfullrows |
number of full rows in local submatrix number of full columns in local submatrix |
||
integer, | intent(in) | :: | nfullcols |
number of full rows in local submatrix number of full columns in local submatrix |
||
integer, | intent(in), | DIMENSION(:) | :: | dense_row_blk_offsets |
row block offsets for dense data column block offsets for dense data mapping from undense to dense rows mapping from undense to dense rows |
|
integer, | intent(in), | DIMENSION(:) | :: | dense_col_blk_offsets |
row block offsets for dense data column block offsets for dense data mapping from undense to dense rows mapping from undense to dense rows |
|
integer, | intent(in), | DIMENSION(:) | :: | row_map |
row block offsets for dense data column block offsets for dense data mapping from undense to dense rows mapping from undense to dense rows |
|
integer, | intent(in), | DIMENSION(:) | :: | col_map |
row block offsets for dense data column block offsets for dense data mapping from undense to dense rows mapping from undense to dense rows |
|
integer, | intent(in), | DIMENSION(:) | :: | row_internal_offsets |
row block offsets for dense data column block offsets for dense data mapping from undense to dense rows mapping from undense to dense rows |
|
integer, | intent(in), | DIMENSION(:) | :: | col_internal_offsets |
row block offsets for dense data column block offsets for dense data mapping from undense to dense rows mapping from undense to dense rows |
Replicates a DBCSR on all processors.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_type), | intent(inout) | :: | matrix |
matrix to replicate |
Replicates a DBCSR matrix among process rows and columns
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_type), | intent(inout) | :: | matrix |
matrix to replicate |
||
logical, | intent(in) | :: | replicate_rows |
Row should be replicated among all processors Column should be replicated among all processors |
||
logical, | intent(in) | :: | replicate_columns |
Row should be replicated among all processors Column should be replicated among all processors |
||
integer, | intent(in), | optional | :: | restrict_source |
Send only from this node (ignores blocks on other nodes) |
Fully redistributes a DBCSR matrix. The new distribution may be arbitrary as long as the total number full rows and columns matches that of the existing matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_type), | intent(in) | :: | matrix |
matrix to redistribute |
||
type(dbcsr_type), | intent(inout) | :: | redist |
redistributed matrix |
||
logical, | intent(in), | optional | :: | keep_sparsity |
retains the sparsity of the redist matrix sum blocks with identical row and col from different processes |
|
logical, | intent(in), | optional | :: | summation |
retains the sparsity of the redist matrix sum blocks with identical row and col from different processes |
Redistributes a DBCSR matrix. The new distribution should have compatible row and column blocks.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_type), | intent(in) | :: | matrix |
matrix to redistribute |
||
type(dbcsr_type), | intent(inout) | :: | redist |
redistributed matrix, which should already be created |
Redistributes data blocks of a DBCSR matrix read from a file. This routine should be used with dbcsr_binary_read in the module dbcsr_io.F
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_data_obj), | intent(in) | :: | dblk |
data blocks of the DBCSR matrix that the current node possesses after reading the data file |
||
integer, | intent(in), | DIMENSION(:), POINTER | :: | row_p |
row_p of the DBCSR matrix that the current node possesses after reading the data file col_i of the DBCSR matrix that the current node possesses after reading the data file blk_p of the DBCSR matrix that the current node possesses after reading the data file 1D array holding nblks of those nodes of the mp environment, that created the file, whose contents have been read by the current node of the present mp environment 1D array holding data_area_size of those nodes of the mp environment, that created the file, whose contents have been read by the current node of the present mp environment |
|
integer, | intent(in), | DIMENSION(:), POINTER | :: | col_i |
row_p of the DBCSR matrix that the current node possesses after reading the data file col_i of the DBCSR matrix that the current node possesses after reading the data file blk_p of the DBCSR matrix that the current node possesses after reading the data file 1D array holding nblks of those nodes of the mp environment, that created the file, whose contents have been read by the current node of the present mp environment 1D array holding data_area_size of those nodes of the mp environment, that created the file, whose contents have been read by the current node of the present mp environment |
|
integer, | intent(in), | DIMENSION(:), POINTER | :: | blk_p |
row_p of the DBCSR matrix that the current node possesses after reading the data file col_i of the DBCSR matrix that the current node possesses after reading the data file blk_p of the DBCSR matrix that the current node possesses after reading the data file 1D array holding nblks of those nodes of the mp environment, that created the file, whose contents have been read by the current node of the present mp environment 1D array holding data_area_size of those nodes of the mp environment, that created the file, whose contents have been read by the current node of the present mp environment |
|
integer, | intent(in), | DIMENSION(:), POINTER | :: | proc_nblks |
row_p of the DBCSR matrix that the current node possesses after reading the data file col_i of the DBCSR matrix that the current node possesses after reading the data file blk_p of the DBCSR matrix that the current node possesses after reading the data file 1D array holding nblks of those nodes of the mp environment, that created the file, whose contents have been read by the current node of the present mp environment 1D array holding data_area_size of those nodes of the mp environment, that created the file, whose contents have been read by the current node of the present mp environment |
|
integer, | intent(in), | DIMENSION(:), POINTER | :: | proc_darea_sizes |
row_p of the DBCSR matrix that the current node possesses after reading the data file col_i of the DBCSR matrix that the current node possesses after reading the data file blk_p of the DBCSR matrix that the current node possesses after reading the data file 1D array holding nblks of those nodes of the mp environment, that created the file, whose contents have been read by the current node of the present mp environment 1D array holding data_area_size of those nodes of the mp environment, that created the file, whose contents have been read by the current node of the present mp environment |
|
type(dbcsr_type), | intent(inout) | :: | new_matrix |
redistributed matrix |