dbcsr_test_methods Module

Tests for CP2K DBCSR operations



Variables

Type Visibility Attributes Name Initial
character(len=*), private, parameter :: moduleN = 'dbcsr_test_methods'
integer, private, SAVE :: randmat_counter = 0
integer, private, parameter :: rand_seed_init = 12341313

Functions

public function compx_to_dbcsr_scalar(z, data_type) result(res)

Arguments

Type IntentOptional Attributes Name
complex(kind=real_8) :: z
integer :: data_type

Return Value type(dbcsr_scalar_type)


Subroutines

public subroutine dbcsr_reset_randmat_seed()

Reset the seed used for generating random matrices to default value

Arguments

None

public subroutine dbcsr_impose_sparsity(sparse, dense)

Impose sparsity on a dense matrix based on a dbcsr

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(in) :: sparse

sparse matrix

type(dbcsr_data_obj), intent(inout) :: dense

dense matrix Take into account the symmetry of the sparse matrix. The dense matrix need to be valid. The operation is done locally.

public subroutine dbcsr_to_dense_local(sparse, dense)

Convert a sparse matrix to a dense matrix

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(in) :: sparse

sparse matrix

type(dbcsr_data_obj), intent(inout) :: dense

dense matrix Take into account the symmetry of the sparse matrix. The dense matrix need to be valid. The operation is done locally.

public subroutine dbcsr_random_dist(dist_array, dist_size, nbins)

Arguments

Type IntentOptional Attributes Name
integer, intent(out), DIMENSION(:), POINTER :: dist_array
integer, intent(in) :: dist_size
integer, intent(in) :: nbins

public subroutine dbcsr_make_random_matrix(matrix, row_blk_sizes, col_blk_sizes, name, sparsity, mp_group, data_type, symmetry, dist)

Creates a random matrix.

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(out) :: matrix
integer, intent(inout), DIMENSION(:), POINTER, CONTIGUOUS :: row_blk_sizes
integer, intent(inout), DIMENSION(:), POINTER, CONTIGUOUS :: col_blk_sizes
character(len=*), intent(in) :: name
real(kind=real_8), intent(in) :: sparsity
type(mp_comm_type), intent(in) :: mp_group
integer, intent(in), optional :: data_type
character(len=1), intent(in), optional :: symmetry
type(dbcsr_distribution_obj), intent(in), optional :: dist

public subroutine dbcsr_make_random_block_sizes(block_sizes, size_sum, size_mix)

Arguments

Type IntentOptional Attributes Name
integer, intent(out), DIMENSION(:), POINTER :: block_sizes
integer, intent(in) :: size_sum
integer, intent(in), DIMENSION(:) :: size_mix

private subroutine dbcsr_make_null_mp(mp_env, group)

Arguments

Type IntentOptional Attributes Name
type(dbcsr_mp_obj), intent(out) :: mp_env
type(mp_comm_type), intent(in), optional :: group

private subroutine dbcsr_make_null_dist(distribution, nblkrows, nblkcols, group)

Arguments

Type IntentOptional Attributes Name
type(dbcsr_distribution_obj), intent(out) :: distribution
integer, intent(in) :: nblkrows
integer, intent(in) :: nblkcols
type(mp_comm_type), intent(in), optional :: group