Documentation for module dbcsr_transformations

DBCSR transformations

source: dbcsr_transformations.F
Loading...

public Subroutines/Functions:

Fully redistributes a DBCSR matrix.
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
Duplicates data in symmetric matrix to make it normal (w.r.t. data structure. Can handle symmetric/antisymmetric/hermitian/skewhermitian matrices
Distributes a matrix that is currently replicated.
Makes a dense matrix, inplace.
Copies a matrix and makes its data dense.
Makes a blocked matrix from a dense matrix, inplace
Detransposes all blocks in a matrix
Transposes a DBCSR matrix.
Redistributes a DBCSR matrix.
Replicates a DBCSR on all processors.

SUBROUTINEdbcsr_complete_redistribute(matrix, redist, keep_sparsity)

Fully redistributes a DBCSR matrix.

Arguments:
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

SUBROUTINEdbcsr_datablock_redistribute(dblk, row_p, col_i, blk_p, proc_nblks, proc_darea_sizes, new_matrix)

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

Arguments:
INTENT(in)
:: dblk data blocks of the DBCSR matrix that the current node possesses after reading the data file
INTEGER,
INTENT(in),
POINTER
:: row_p(:) row_p of the DBCSR matrix that the current node possesses after reading the data file
INTEGER,
INTENT(in),
POINTER
:: col_i(:) col_i of the DBCSR matrix that the current node possesses after reading the data file
INTEGER,
INTENT(in),
POINTER
:: blk_p(:) blk_p of the DBCSR matrix that the current node possesses after reading the data file
INTEGER,
INTENT(in),
POINTER
:: proc_nblks(:) 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
INTEGER,
INTENT(in),
POINTER
:: proc_darea_sizes(:) 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

SUBROUTINEdbcsr_desymmetrize_deep(sm, desm, untransposed_data)

Duplicates data in symmetric matrix to make it normal (w.r.t. data structure. Can handle symmetric/antisymmetric/hermitian/skewhermitian matrices

Arguments:
TYPE(dbcsr_type),
INTENT(in)
:: sm input symmetric matrix
TYPE(dbcsr_type),
INTENT(inout)
:: desm desymmetrized matrix
LOGICAL,
INTENT(in),
OPTIONAL
:: untransposed_data ...

SUBROUTINEdbcsr_distribute(matrix, fast)

Distributes a matrix that is currently replicated.

Arguments:
TYPE(dbcsr_type),
INTENT(inout)
:: matrix matrix to replicate
LOGICAL,
INTENT(in),
OPTIONAL
:: fast change just the index, don't touch the data

SUBROUTINEdbcsr_make_dense(matrix, dense_matrix, dense_dist, dense_row_sizes, dense_col_sizes, row_map, col_map)

Makes a dense matrix, inplace.

Arguments:
TYPE(dbcsr_type),
INTENT(in)
:: matrix matrix to make dense
TYPE(dbcsr_type),
INTENT(out)
:: dense_matrix ...
INTENT(inout)
:: dense_dist ...
INTENT(in)
:: dense_row_sizes ...
INTENT(in)
:: dense_col_sizes ...
INTENT(in)
:: row_map ...
INTENT(in)
:: col_map ...

SUBROUTINEdbcsr_make_dense_low(und_matrix, dense_matrix, und_local_rows, und_local_cols, und_row_blk_offsets, und_col_blk_offsets, dense_local_rows, dense_local_cols, dense_row_blk_offsets, dense_col_blk_offsets, row_map, col_map, join_rows, join_cols)

Copies a matrix and makes its data dense.

Arguments:
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)
:: und_local_rows(:) The process-grid local rows of the non-dense und_matrix
INTEGER,
INTENT(in)
:: und_local_cols(:) The process-grid local columns of the non-dense und_matrix
INTEGER,
INTENT(in)
:: und_row_blk_offsets(:) The block offsets of the rows of the non-dense matrix
INTEGER,
INTENT(in)
:: und_col_blk_offsets(:) The block offsets of the columns of the non-dense matrix
INTEGER,
INTENT(in)
:: dense_local_rows(:) The process-grid local rows of the dense matrix
INTEGER,
INTENT(in)
:: dense_local_cols(:) The process-grid local columns of the dense matrix
INTEGER,
INTENT(in)
:: dense_row_blk_offsets(:) The block offsets of the rows of the dense matrix
INTEGER,
INTENT(in)
:: dense_col_blk_offsets(:) The block offsets of the columns of the dense matrix
INTEGER,
INTENT(in)
:: row_map(:) Mapping of non-dense rows to dense rows
INTEGER,
INTENT(in)
:: col_map(:) Mapping of non-dense columns to dense columns
LOGICAL,
INTENT(in)
:: join_rows Make rows dense
LOGICAL,
INTENT(in)
:: join_cols Make columns dense

SUBROUTINEdbcsr_make_undense(matrix, undense_matrix, distribution, row_blk_offsets, col_blk_offsets, row_blk_sizes, col_blk_sizes, row_map, col_map)

Makes a blocked matrix from a dense matrix, inplace

Arguments:
TYPE(dbcsr_type),
INTENT(in)
:: matrix dense matrix
TYPE(dbcsr_type),
INTENT(inout)
:: undense_matrix matrix to make undense
INTENT(in)
:: distribution distribution of non-dense rows and columns
INTENT(in)
:: row_blk_offsets non-dense row block offsets
INTENT(in)
:: col_blk_offsets non-dense column block offsets
INTENT(in)
:: row_blk_sizes non-dense row block sizes
INTENT(in)
:: col_blk_sizes non-dense column block sizes
INTENT(in)
:: row_map mapping from non-dense rows
INTENT(in)
:: col_map mapping from non-dense columns

SUBROUTINEdbcsr_make_untransposed_blocks(matrix)

Detransposes all blocks in a matrix

Arguments:
TYPE(dbcsr_type),
INTENT(inout)
:: matrix DBCSR matrix

SUBROUTINEdbcsr_new_transposed(transposed, normal, shallow_data_copy, transpose_data, transpose_distribution, transpose_index, use_distribution, redistribute)

Transposes a DBCSR matrix.

Arguments:
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
LOGICAL,
INTENT(in),
OPTIONAL
:: transpose_data transpose data blocks, default is True
LOGICAL,
INTENT(in),
OPTIONAL
:: transpose_distribution transpose the distribution from the input matrix, default is True
LOGICAL,
INTENT(in),
OPTIONAL
:: transpose_index transpose the index (default=yes) or turn it into BCSC
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.

SUBROUTINEdbcsr_redistribute(matrix, redist)

Redistributes a DBCSR matrix.

Arguments:
TYPE(dbcsr_type),
INTENT(in)
:: matrix matrix to redistribute
TYPE(dbcsr_type),
INTENT(inout)
:: redist redistributed matrix, which should already be created

SUBROUTINEdbcsr_replicate_all(matrix)

Replicates a DBCSR on all processors.

Arguments:
TYPE(dbcsr_type),
INTENT(inout)
:: matrix matrix to replicate