dbcsr_methods Module

Base methods on DBCSR data structures



Variables

Type Visibility Attributes Name Initial
character(len=*), private, parameter :: moduleN = 'dbcsr_methods'
integer, public, SAVE :: dbcsr_matrix_counter = 111111

Interfaces

public interface dbcsr_destroy_array


Functions

public pure function dbcsr_valid_index(matrix) result(valid_index)

Returns whether the index structure of the matrix is valid.

Arguments

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

verify index validity of this matrix

Return Value logical

index validity

public function dbcsr_nblkrows_total(matrix) result(nblkrows_total)

Arguments

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

Return Value integer

public function dbcsr_nblkcols_total(matrix) result(nblkcols_total)

Arguments

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

Return Value integer

public function dbcsr_nfullrows_total(matrix) result(nfullrows_total)

Arguments

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

Return Value integer

public function dbcsr_nfullcols_total(matrix) result(nfullcols_total)

Arguments

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

Return Value integer

public function dbcsr_nblkrows_local(matrix) result(nblkrows_local)

Arguments

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

Return Value integer

public function dbcsr_nblkcols_local(matrix) result(nblkcols_local)

Arguments

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

Return Value integer

public function dbcsr_nfullrows_local(matrix) result(nfullrows_local)

Arguments

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

Return Value integer

public function dbcsr_nfullcols_local(matrix) result(nfullcols_local)

Arguments

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

Return Value integer

public function dbcsr_max_row_size(matrix) result(max_row_size)

Arguments

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

Return Value integer

public function dbcsr_max_col_size(matrix) result(max_col_size)

Arguments

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

Return Value integer

public function dbcsr_distribution(matrix) result(distribution)

Arguments

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

Return Value type(dbcsr_distribution_obj)

public function dbcsr_name(matrix) result(name)

Arguments

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

Return Value character(len=default_string_length)

public pure function dbcsr_wm_use_mutable(wm) result(use_mutable)

Returns whether this work matrix uses the mutable type

Arguments

Type IntentOptional Attributes Name
type(dbcsr_work_type), intent(in) :: wm

work matrix

Return Value logical

use the mutable and not append-only working structures

public pure function dbcsr_use_mutable(matrix) result(use_mutable)

Returns whether work matrices should use the mutable data type

Arguments

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

matrix

Return Value logical

use the mutable and not append-only working structures

public function dbcsr_row_block_sizes(matrix) result(row_blk_sizes)

Arguments

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

Return Value integer, DIMENSION(:), POINTER, CONTIGUOUS

public function dbcsr_col_block_sizes(matrix) result(col_blk_sizes)

Arguments

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

Return Value integer, DIMENSION(:), POINTER, CONTIGUOUS

public function dbcsr_col_block_offsets(matrix) result(col_blk_offsets)

Arguments

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

Return Value integer, DIMENSION(:), POINTER, CONTIGUOUS

public function dbcsr_row_block_offsets(matrix) result(row_blk_offsets)

Arguments

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

Return Value integer, DIMENSION(:), POINTER, CONTIGUOUS

public pure function dbcsr_blk_row_size(matrix, row) result(row_size)

Returns the blocked row size of a row This routine is optimized for speed and no checks are performed.

Arguments

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

DBCSR matrix

integer, intent(in) :: row

row number

Return Value integer

blocked row size

public pure function dbcsr_blk_row_offset(matrix, row) result(row_offset)

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(in) :: matrix
integer, intent(in) :: row

Return Value integer

public pure function dbcsr_blk_column_size(matrix, column) result(column_size)

Returns the blocked column size of a column This routine is optimized for speed and no checks are performed.

Arguments

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

DBCSR matrix

integer, intent(in) :: column

column number

Return Value integer

blocked row size

public pure function dbcsr_blk_col_offset(matrix, col) result(col_offset)

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(in) :: matrix
integer, intent(in) :: col

Return Value integer

public function dbcsr_data_area(matrix) result(data_area)

Returns the data area

Arguments

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

matrix from which to get data

Return Value type(dbcsr_data_obj)

data area

public pure function dbcsr_get_matrix_type(matrix) result(matrix_type)

Returns the matrix type

Arguments

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

query this matrix

Return Value character(len=1)

matrix_type (see dbcsr_types.F for possible values)

public pure function dbcsr_has_symmetry(matrix) result(has_symmetry)

Whether matrix has symmetry

Arguments

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

query this matrix

Return Value logical

matrix has symmetry

public pure function dbcsr_get_replication_type(matrix) result(repl_type)

Returns the data type stored in the matrix

Arguments

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

query this matrix

Return Value character(len=1)

repl_type (see dbcsr_types.F for possible values)

public pure function dbcsr_get_data_type(matrix) result(data_type)

Returns the data type stored in the matrix

Arguments

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

query this matrix

Return Value integer

data_type (see dbcsr_types.F for possible values)

public function dbcsr_get_data_memory_type(matrix) result(memory_type)

Returns the type of memory used for data in the matrix

Read more…

Arguments

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

query this matrix

Return Value type(dbcsr_memtype_type)

memory type used for data

public function dbcsr_get_index_memory_type(matrix) result(memory_type)

Returns the type of memory used for the index in the matrix

Arguments

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

query this matrix

Return Value type(dbcsr_memtype_type)

memory type used for the index

public function dbcsr_get_data_size(matrix) result(data_size)

Returns the allocated data size of a DBCSR matrix

Arguments

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

matrix

Return Value integer

size of data

public function dbcsr_get_data_size_used(matrix) result(data_size)

Count actual data storage used for matrix data.

Arguments

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

Count data of this matrix

Return Value integer

Data size used by matrix

public pure function dbcsr_get_num_blocks(matrix) result(num_blocks)

Returns the number of blocks in the matrix

Arguments

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

matrix from which to get data

Return Value integer

public pure function dbcsr_get_nze(matrix) result(num_nze)

Returns the number of non-zero elements in the matrix

Arguments

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

matrix from which to get data

Return Value integer

public pure function dbcsr_mutable_instantiated(mutable) result(instantiated)

Unregisters a reference to the mutable data type The object is destroy when there is no reference to it left.

Arguments

Type IntentOptional Attributes Name
type(dbcsr_mutable_obj), intent(in) :: mutable

mutable data

Return Value logical

whether the object is instantiated


Subroutines

public recursive subroutine dbcsr_release(matrix)

Releases a reference for a DBCSR matrix If there are no references left, the matrix is destroyed.

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix

DBCSR matrix

private recursive subroutine dbcsr_destroy(matrix, force)

Deallocates and destroys a matrix.

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix

matrix

logical, intent(in), optional :: force

force deallocation

public subroutine dbcsr_distribution_release(dist)

Releases and potentially destroys a distribution

Arguments

Type IntentOptional Attributes Name
type(dbcsr_distribution_obj), intent(inout) :: dist

private subroutine dbcsr_dist_release_locals(dist)

Arguments

Type IntentOptional Attributes Name
type(dbcsr_distribution_obj), intent(inout) :: dist

public subroutine dbcsr_mp_release(mp_env)

Releases and potentially destroys an mp_env

Arguments

Type IntentOptional Attributes Name
type(dbcsr_mp_obj), intent(inout) :: mp_env

multiprocessor environment

public subroutine dbcsr_mp_grid_remove(mp_env)

Removes an MPI cartesian process grid

Arguments

Type IntentOptional Attributes Name
type(dbcsr_mp_obj), intent(inout) :: mp_env

multiprocessor environment

public subroutine dbcsr_release_locals(matrix)

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix

public subroutine dbcsr_setname(matrix, newname)

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix
character(len=*), intent(in) :: newname

private subroutine dbcsr_destroy_1d_array(marray)

Releases all matrices in a 1-d array.

Arguments

Type IntentOptional Attributes Name
type(dbcsr_1d_array_type), intent(inout) :: marray

matrix array

private subroutine dbcsr_destroy_2d_array(marray)

Releases all matrices in 2-d array.

Arguments

Type IntentOptional Attributes Name
type(dbcsr_2d_array_type), intent(inout) :: marray

matrix array

public subroutine dbcsr_image_dist_release(imgdist)

Releases a reference to and possible deallocates an image distribution

Arguments

Type IntentOptional Attributes Name
type(dbcsr_imagedistribution_obj), intent(inout) :: imgdist

public subroutine dbcsr_image_dist_hold(imgdist)

Retains a reference to an image distribution

Arguments

Type IntentOptional Attributes Name
type(dbcsr_imagedistribution_obj), intent(inout) :: imgdist

public subroutine dbcsr_image_dist_init(imgdist)

Initialized an image distribution

Read more…

Arguments

Type IntentOptional Attributes Name
type(dbcsr_imagedistribution_obj), intent(out) :: imgdist

private subroutine dbcsr_destroy_image_dist(imgdist)

Destroys a DBCSR distribution for a matrix multiplication based on the right matrix

Arguments

Type IntentOptional Attributes Name
type(dbcsr_imagedistribution_type), intent(inout) :: imgdist

product distribution repetition

public subroutine dbcsr_mutable_init(mutable)

Initializes a mutable data type

Arguments

Type IntentOptional Attributes Name
type(dbcsr_mutable_obj), intent(out) :: mutable

mutable data

public subroutine dbcsr_mutable_destroy(mutable)

Destroys a mutable data type

Arguments

Type IntentOptional Attributes Name
type(dbcsr_mutable_obj), intent(inout) :: mutable

mutable data

public subroutine dbcsr_mutable_release(mutable)

Unregisters a reference to the mutable data type The object is destroy when there is no reference to it left.

Arguments

Type IntentOptional Attributes Name
type(dbcsr_mutable_obj), intent(inout) :: mutable

mutable data

public subroutine dbcsr_mutable_new(mutable, data_type)

Creates a new mutable instance.

Arguments

Type IntentOptional Attributes Name
type(dbcsr_mutable_obj), intent(inout) :: mutable

mutable data

integer, intent(in) :: data_type

data type to be stored here (see dbcsr_types for possibilities)