dbcsr_operations Module

Higher-level operations on DBCSR matrices.



Variables

Type Visibility Attributes Name Initial
character(len=*), private, parameter :: moduleN = 'dbcsr_operations'
character(len=1), private, parameter :: xa = dbcsr_type_hermitian
character(len=1), private, parameter :: xb = dbcsr_type_antihermitian
character(len=1), private, parameter :: xc = dbcsr_type_no_symmetry
logical, private, parameter :: debug_mod = .FALSE.
logical, private, parameter :: careful_mod = .FALSE.
integer, private, parameter :: rpslot_owner = 1
integer, private, parameter :: rpslot_addblks = 2
integer, private, parameter :: rpslot_addoffset = 3
integer, private, parameter :: rpslot_oldblks = 4
integer, private, parameter :: rpslot_oldoffset = 5
integer, private, parameter :: rpslot_totaloffset = 6
integer, private, parameter :: rpnslots = 6

Interfaces

public interface dbcsr_conform_scalar

  • private function make_conformant_scalar_d(scalar, matrix) result(encapsulated)

    Encapsulates a given scalar value and makes it conform with the type of the matrix.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real_8), intent(in) :: scalar
    type(dbcsr_type), intent(in) :: matrix

    Return Value type(dbcsr_scalar_type)

  • private function make_conformant_scalar_s(scalar, matrix) result(encapsulated)

    Encapsulates a given scalar value and makes it conform with the type of the matrix.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real_4), intent(in) :: scalar
    type(dbcsr_type), intent(in) :: matrix

    Return Value type(dbcsr_scalar_type)

  • private function make_conformant_scalar_c(scalar, matrix) result(encapsulated)

    Encapsulates a given scalar value and makes it conform with the type of the matrix.

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=real_4), intent(in) :: scalar
    type(dbcsr_type), intent(in) :: matrix

    Return Value type(dbcsr_scalar_type)

  • private function make_conformant_scalar_z(scalar, matrix) result(encapsulated)

    Encapsulates a given scalar value and makes it conform with the type of the matrix.

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=real_8), intent(in) :: scalar
    type(dbcsr_type), intent(in) :: matrix

    Return Value type(dbcsr_scalar_type)

public interface dbcsr_trace

  • private subroutine dbcsr_trace_s(matrix_a, trace)

    traces a DBCSR matrix

    Arguments

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

    DBCSR matrix

    real(kind=real_4), intent(inout) :: trace

    the trace of the matrix

  • private subroutine dbcsr_trace_sd(matrix_a, trace)

    Trace of DBCSR matrices

    Arguments

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

    DBCSR matrices

    real(kind=real_8), intent(inout) :: trace

    the trace of the product of the matrices

  • private subroutine dbcsr_trace_c(matrix_a, trace)

    traces a DBCSR matrix

    Arguments

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

    DBCSR matrix

    complex(kind=real_4), intent(inout) :: trace

    the trace of the matrix

  • private subroutine dbcsr_trace_z(matrix_a, trace)

    traces a DBCSR matrix

    Arguments

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

    DBCSR matrix

    complex(kind=real_8), intent(inout) :: trace

    the trace of the matrix

public interface dbcsr_dot

  • private subroutine dbcsr_dot_s(matrix_a, matrix_b, trace)

    Dot product of DBCSR matrices

    Arguments

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

    DBCSR matrices DBCSR matrices

    type(dbcsr_type), intent(in) :: matrix_b

    DBCSR matrices DBCSR matrices

    real(kind=real_4), intent(inout) :: trace

    the trace of the product of the matrices

  • private subroutine dbcsr_dot_sd(matrix_a, matrix_b, trace)

    Dot product of DBCSR matrices \result the dot product of the matrices

    Arguments

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

    DBCSR matrices DBCSR matrices

    type(dbcsr_type), intent(in) :: matrix_b

    DBCSR matrices DBCSR matrices

    real(kind=real_8), intent(inout) :: trace
  • private subroutine dbcsr_dot_c(matrix_a, matrix_b, trace)

    Dot product of DBCSR matrices

    Arguments

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

    DBCSR matrices DBCSR matrices

    type(dbcsr_type), intent(in) :: matrix_b

    DBCSR matrices DBCSR matrices

    complex(kind=real_4), intent(inout) :: trace

    the trace of the product of the matrices

  • private subroutine dbcsr_dot_z(matrix_a, matrix_b, trace)

    Dot product of DBCSR matrices

    Arguments

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

    DBCSR matrices DBCSR matrices

    type(dbcsr_type), intent(in) :: matrix_b

    DBCSR matrices DBCSR matrices

    complex(kind=real_8), intent(inout) :: trace

    the trace of the product of the matrices

public interface dbcsr_scale

  • private subroutine dbcsr_scale_anytype(matrix_a, alpha_scalar, limits)

    Scales a DBCSR matrix by alpha

    Limits A 4-tuple describing (first_row, last_row, first_column, last_column). Set to 0 to avoid limiting.

    Arguments

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

    DBCSR matrix

    type(dbcsr_scalar_type), intent(in) :: alpha_scalar

    a scalar

    integer, intent(in), optional, DIMENSION(4) :: limits

    Scale only a subbox

  • private subroutine dbcsr_scale_s(matrix_a, alpha_scalar, last_column)

    Interface for matrix scaling by a scalar

    Arguments

    Type IntentOptional Attributes Name
    type(dbcsr_type), intent(inout) :: matrix_a
    real(kind=real_4), intent(in) :: alpha_scalar
    integer, intent(in), optional :: last_column
  • private subroutine dbcsr_scale_d(matrix_a, alpha_scalar, last_column)

    Interface for matrix scaling by a scalar

    Arguments

    Type IntentOptional Attributes Name
    type(dbcsr_type), intent(inout) :: matrix_a
    real(kind=real_8), intent(in) :: alpha_scalar
    integer, intent(in), optional :: last_column
  • private subroutine dbcsr_scale_c(matrix_a, alpha_scalar, last_column)

    Interface for matrix scaling by a scalar

    Arguments

    Type IntentOptional Attributes Name
    type(dbcsr_type), intent(inout) :: matrix_a
    complex(kind=real_4), intent(in) :: alpha_scalar
    integer, intent(in), optional :: last_column
  • private subroutine dbcsr_scale_z(matrix_a, alpha_scalar, last_column)

    Interface for matrix scaling by a scalar

    Arguments

    Type IntentOptional Attributes Name
    type(dbcsr_type), intent(inout) :: matrix_a
    complex(kind=real_8), intent(in) :: alpha_scalar
    integer, intent(in), optional :: last_column

public interface dbcsr_scale_by_vector

  • private subroutine dbcsr_scale_by_vector_anytype(matrix_a, alpha, side)

    Scales a DBCSR matrix by alpha

    Arguments

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

    DBCSR matrix

    type(dbcsr_data_obj), intent(in), optional :: alpha

    the scaling vector

    character(len=*), intent(in) :: side

    apply the scaling from the side

  • private subroutine dbcsr_scale_by_vector_s(matrix_a, alpha, side)

    Interface for matrix scaling by a vector

    Arguments

    Type IntentOptional Attributes Name
    type(dbcsr_type), intent(inout) :: matrix_a
    real(kind=real_4), intent(in), DIMENSION(:), TARGET, CONTIGUOUS :: alpha
    character(len=*), intent(in) :: side
  • private subroutine dbcsr_scale_by_vector_d(matrix_a, alpha, side)

    Interface for matrix scaling by a vector

    Arguments

    Type IntentOptional Attributes Name
    type(dbcsr_type), intent(inout) :: matrix_a
    real(kind=real_8), intent(in), DIMENSION(:), TARGET, CONTIGUOUS :: alpha
    character(len=*), intent(in) :: side
  • private subroutine dbcsr_scale_by_vector_c(matrix_a, alpha, side)

    Interface for matrix scaling by a vector

    Arguments

    Type IntentOptional Attributes Name
    type(dbcsr_type), intent(inout) :: matrix_a
    complex(kind=real_4), intent(in), DIMENSION(:), TARGET, CONTIGUOUS :: alpha
    character(len=*), intent(in) :: side
  • private subroutine dbcsr_scale_by_vector_z(matrix_a, alpha, side)

    Interface for matrix scaling by a vector

    Arguments

    Type IntentOptional Attributes Name
    type(dbcsr_type), intent(inout) :: matrix_a
    complex(kind=real_8), intent(in), DIMENSION(:), TARGET, CONTIGUOUS :: alpha
    character(len=*), intent(in) :: side

public interface dbcsr_set

  • private subroutine dbcsr_set_s(matrix, alpha)

    Interface for dbcsr_set

    Arguments

    Type IntentOptional Attributes Name
    type(dbcsr_type), intent(inout) :: matrix
    real(kind=real_4), intent(in) :: alpha
  • private subroutine dbcsr_set_d(matrix, alpha)

    Interface for dbcsr_set

    Arguments

    Type IntentOptional Attributes Name
    type(dbcsr_type), intent(inout) :: matrix
    real(kind=real_8), intent(in) :: alpha
  • private subroutine dbcsr_set_c(matrix, alpha)

    Interface for dbcsr_set

    Arguments

    Type IntentOptional Attributes Name
    type(dbcsr_type), intent(inout) :: matrix
    complex(kind=real_4), intent(in) :: alpha
  • private subroutine dbcsr_set_z(matrix, alpha)

    Interface for dbcsr_set

    Arguments

    Type IntentOptional Attributes Name
    type(dbcsr_type), intent(inout) :: matrix
    complex(kind=real_8), intent(in) :: alpha

public interface dbcsr_add

  • private subroutine dbcsr_add_anytype(matrix_a, matrix_b, alpha_scalar, beta_scalar, flop)

    add and scale matrices A = alphaA + betaB or

    Arguments

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

    DBCSR matrix

    type(dbcsr_type), intent(in) :: matrix_b

    DBCSR matrix

    type(dbcsr_scalar_type), intent(in), optional :: alpha_scalar
    type(dbcsr_scalar_type), intent(in), optional :: beta_scalar
    integer(kind=int_8), intent(inout), optional :: flop
  • private subroutine dbcsr_add_s(matrix_a, matrix_b, alpha_scalar, beta_scalar)

    Arguments

    Type IntentOptional Attributes Name
    type(dbcsr_type), intent(inout) :: matrix_a
    type(dbcsr_type), intent(in) :: matrix_b
    real(kind=real_4), intent(in) :: alpha_scalar
    real(kind=real_4), intent(in) :: beta_scalar
  • private subroutine dbcsr_add_d(matrix_a, matrix_b, alpha_scalar, beta_scalar)

    Interface for dbcsr_add

    Arguments

    Type IntentOptional Attributes Name
    type(dbcsr_type), intent(inout) :: matrix_a
    type(dbcsr_type), intent(in) :: matrix_b
    real(kind=real_8), intent(in) :: alpha_scalar
    real(kind=real_8), intent(in) :: beta_scalar
  • private subroutine dbcsr_add_c(matrix_a, matrix_b, alpha_scalar, beta_scalar)

    Arguments

    Type IntentOptional Attributes Name
    type(dbcsr_type), intent(inout) :: matrix_a
    type(dbcsr_type), intent(in) :: matrix_b
    complex(kind=real_4), intent(in) :: alpha_scalar
    complex(kind=real_4), intent(in) :: beta_scalar
  • private subroutine dbcsr_add_z(matrix_a, matrix_b, alpha_scalar, beta_scalar)

    Arguments

    Type IntentOptional Attributes Name
    type(dbcsr_type), intent(inout) :: matrix_a
    type(dbcsr_type), intent(in) :: matrix_b
    complex(kind=real_8), intent(in) :: alpha_scalar
    complex(kind=real_8), intent(in) :: beta_scalar

public interface dbcsr_add_on_diag

  • private subroutine dbcsr_add_on_diag_s(matrix, alpha)

    add a constant to the diagonal of a matrix

    Arguments

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

    DBCSR matrix

    real(kind=real_4), intent(in) :: alpha

    scalar

  • private subroutine dbcsr_add_on_diag_ds(matrix, alpha)

    Arguments

    Type IntentOptional Attributes Name
    type(dbcsr_type), intent(inout) :: matrix
    real(kind=real_8), intent(in) :: alpha
  • private subroutine dbcsr_add_on_diag_c(matrix, alpha)

    add a constant to the diagonal of a matrix

    Arguments

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

    DBCSR matrix

    complex(kind=real_4), intent(in) :: alpha

    scalar

  • private subroutine dbcsr_add_on_diag_z(matrix, alpha)

    add a constant to the diagonal of a matrix

    Arguments

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

    DBCSR matrix

    complex(kind=real_8), intent(in) :: alpha

    scalar

public interface dbcsr_filter

  • public subroutine dbcsr_filter_anytype(matrix, eps, method, use_absolute, filter_diag)

    filter a dbcsr matrix

    Arguments

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

    the matrix

    type(dbcsr_scalar_type), intent(in) :: eps

    the threshold

    integer, intent(in), optional :: method

    how the matrix is filtered

    logical, intent(in), optional :: use_absolute

    NYI

    logical, intent(in), optional :: filter_diag

    NYI

  • private subroutine dbcsr_filter_s(matrix, eps, method, use_absolute, filter_diag)

    Arguments

    Type IntentOptional Attributes Name
    type(dbcsr_type), intent(inout) :: matrix
    real(kind=real_4), intent(in) :: eps
    integer, intent(in), optional :: method
    logical, intent(in), optional :: use_absolute
    logical, intent(in), optional :: filter_diag
  • private subroutine dbcsr_filter_d(matrix, eps, method, use_absolute, filter_diag)

    Arguments

    Type IntentOptional Attributes Name
    type(dbcsr_type), intent(inout) :: matrix
    real(kind=real_8), intent(in) :: eps
    integer, intent(in), optional :: method
    logical, intent(in), optional :: use_absolute
    logical, intent(in), optional :: filter_diag
  • private subroutine dbcsr_filter_c(matrix, eps, method, use_absolute, filter_diag)

    Arguments

    Type IntentOptional Attributes Name
    type(dbcsr_type), intent(inout) :: matrix
    complex(kind=real_4), intent(in) :: eps
    integer, intent(in), optional :: method
    logical, intent(in), optional :: use_absolute
    logical, intent(in), optional :: filter_diag
  • private subroutine dbcsr_filter_z(matrix, eps, method, use_absolute, filter_diag)

    Arguments

    Type IntentOptional Attributes Name
    type(dbcsr_type), intent(inout) :: matrix
    complex(kind=real_8), intent(in) :: eps
    integer, intent(in), optional :: method
    logical, intent(in), optional :: use_absolute
    logical, intent(in), optional :: filter_diag

public interface dbcsr_get_diag

  • private subroutine dbcsr_get_diag_s(matrix, diag)

    Arguments

    Type IntentOptional Attributes Name
    type(dbcsr_type), intent(in) :: matrix
    real(kind=real_4), intent(out), DIMENSION(:) :: diag
  • private subroutine dbcsr_get_diag_d(matrix, diag)

    Arguments

    Type IntentOptional Attributes Name
    type(dbcsr_type), intent(in) :: matrix
    real(kind=real_8), intent(out), DIMENSION(:) :: diag
  • private subroutine dbcsr_get_diag_c(matrix, diag)

    Arguments

    Type IntentOptional Attributes Name
    type(dbcsr_type), intent(in) :: matrix
    complex(kind=real_4), intent(out), DIMENSION(:) :: diag
  • private subroutine dbcsr_get_diag_z(matrix, diag)

    Arguments

    Type IntentOptional Attributes Name
    type(dbcsr_type), intent(in) :: matrix
    complex(kind=real_8), intent(out), DIMENSION(:) :: diag

public interface dbcsr_set_diag

  • private subroutine dbcsr_set_diag_s(matrix, diag)

    Arguments

    Type IntentOptional Attributes Name
    type(dbcsr_type), intent(inout) :: matrix
    real(kind=real_4), intent(in), DIMENSION(:) :: diag
  • private subroutine dbcsr_set_diag_d(matrix, diag)

    Arguments

    Type IntentOptional Attributes Name
    type(dbcsr_type), intent(inout) :: matrix
    real(kind=real_8), intent(in), DIMENSION(:) :: diag
  • private subroutine dbcsr_set_diag_c(matrix, diag)

    Arguments

    Type IntentOptional Attributes Name
    type(dbcsr_type), intent(inout) :: matrix
    complex(kind=real_4), intent(in), DIMENSION(:) :: diag
  • private subroutine dbcsr_set_diag_z(matrix, diag)

    Arguments

    Type IntentOptional Attributes Name
    type(dbcsr_type), intent(inout) :: matrix
    complex(kind=real_8), intent(in), DIMENSION(:) :: diag

Functions

private function make_conformant_scalar_d(scalar, matrix) result(encapsulated)

Encapsulates a given scalar value and makes it conform with the type of the matrix.

Arguments

Type IntentOptional Attributes Name
real(kind=real_8), intent(in) :: scalar
type(dbcsr_type), intent(in) :: matrix

Return Value type(dbcsr_scalar_type)

private function make_conformant_scalar_s(scalar, matrix) result(encapsulated)

Encapsulates a given scalar value and makes it conform with the type of the matrix.

Arguments

Type IntentOptional Attributes Name
real(kind=real_4), intent(in) :: scalar
type(dbcsr_type), intent(in) :: matrix

Return Value type(dbcsr_scalar_type)

private function make_conformant_scalar_z(scalar, matrix) result(encapsulated)

Encapsulates a given scalar value and makes it conform with the type of the matrix.

Arguments

Type IntentOptional Attributes Name
complex(kind=real_8), intent(in) :: scalar
type(dbcsr_type), intent(in) :: matrix

Return Value type(dbcsr_scalar_type)

private function make_conformant_scalar_c(scalar, matrix) result(encapsulated)

Encapsulates a given scalar value and makes it conform with the type of the matrix.

Arguments

Type IntentOptional Attributes Name
complex(kind=real_4), intent(in) :: scalar
type(dbcsr_type), intent(in) :: matrix

Return Value type(dbcsr_scalar_type)

private function symmetry_consistent(matrix_type, data_type)

checks if matrix symmetry and data_type are consistent \brief note: does not check the symmetry of the data itself

Arguments

Type IntentOptional Attributes Name
character(len=1), intent(in) :: matrix_type
integer, intent(in) :: data_type

Return Value logical

private function symmetry_compatible(matrix_type_a, matrix_type_b)

checks if symmetries of two matrices are compatible for copying \brief data from matrix_a(source) to matrix_b(target)

Arguments

Type IntentOptional Attributes Name
character(len=1), intent(in) :: matrix_type_a
character(len=1), intent(in) :: matrix_type_b

Return Value logical

private elemental function pos_relation(row1, col1, row2, col2) result(relation)

Determines the relation between two matrix positions.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: row1
integer, intent(in) :: col1
integer, intent(in) :: row2
integer, intent(in) :: col2

Return Value integer

Relation between positions 1 and 2. 0: same -1: pos1 < pos2 1: pos1 > pos2

public function dbcsr_gershgorin_norm(matrix) result(norm)

compute a norm of a dbcsr matrix

Arguments

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

the matrix

Return Value real(kind=real_8)

public function dbcsr_maxabs(matrix) result(norm)

compute a norm of a dbcsr matrix

Arguments

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

the matrix

Return Value real(kind=real_8)

public function dbcsr_frobenius_norm(matrix, local) result(norm)

compute a norm of a dbcsr matrix

Arguments

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

the matrix

logical, intent(in), optional :: local

Return Value real(kind=real_8)

private function dbcsr_block_in_limits(row, col, block_row_limits, block_column_limits)

check if a block is not in the limits

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: row
integer, intent(in) :: col
integer, intent(in), optional, DIMENSION(2) :: block_row_limits
integer, intent(in), optional, DIMENSION(2) :: block_column_limits

Return Value logical

public function dbcsr_may_be_dense(matrix, occ_thresh) result(may_be_dense)

Returns whether the matrix could be represented in a dense form

Arguments

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

matrix

real(kind=real_8), intent(in) :: occ_thresh

Return Value logical

use the mutable and not append-only working structures

public function dbcsr_get_occupation(matrix) result(occupation)

Returns the occupation of the matrix

Arguments

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

matrix from which to get the occupation

Return Value real(kind=real_8)


Subroutines

public subroutine dbcsr_add_block_node(matrix, block_row, block_col, block)

Emulation of sparse_matrix_types/add_block_node mapped to add_real_matrix_block.... should not be used any longer It adds a block to the dbcsr matrix and returns a rank-2 pointer to the block. Currently it only and always uses the mutable data.

Arguments

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

DBCSR matrix

integer, intent(in) :: block_row

the row the column

integer, intent(in) :: block_col

the row the column

real(kind=dp), DIMENSION(:, :), POINTER :: block

the block to put

public subroutine dbcsr_conjg(matrix)

Conjugate a DBCSR matrix

Arguments

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

DBCSR matrix

public subroutine dbcsr_zero(matrix_a)

fill a dbcsr matrix with zeros

Arguments

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

private subroutine dbcsr_scale_anytype(matrix_a, alpha_scalar, limits)

Scales a DBCSR matrix by alpha

Read more…

Arguments

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

DBCSR matrix

type(dbcsr_scalar_type), intent(in) :: alpha_scalar

a scalar

integer, intent(in), optional, DIMENSION(4) :: limits

Scale only a subbox

private elemental subroutine frame_block_limit(block_size, block_offset, first_limit, last_limit, frame_size, frame_offset)

Determines the effect of limits on a block

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: block_size

size of block global offset of block lower limit upper limit

integer, intent(in) :: block_offset

size of block global offset of block lower limit upper limit

integer, intent(in) :: first_limit

size of block global offset of block lower limit upper limit

integer, intent(in) :: last_limit

size of block global offset of block lower limit upper limit

integer, intent(out) :: frame_size

size of block region within the limits starting position of the block region that is within the limits

integer, intent(out) :: frame_offset

size of block region within the limits starting position of the block region that is within the limits

private subroutine dbcsr_scale_by_vector_anytype(matrix_a, alpha, side)

Scales a DBCSR matrix by alpha

Arguments

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

DBCSR matrix

type(dbcsr_data_obj), intent(in), optional :: alpha

the scaling vector

character(len=*), intent(in) :: side

apply the scaling from the side

private subroutine dbcsr_add_anytype(matrix_a, matrix_b, alpha_scalar, beta_scalar, flop)

add and scale matrices A = alphaA + betaB or

Arguments

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

DBCSR matrix

type(dbcsr_type), intent(in) :: matrix_b

DBCSR matrix

type(dbcsr_scalar_type), intent(in), optional :: alpha_scalar
type(dbcsr_scalar_type), intent(in), optional :: beta_scalar
integer(kind=int_8), intent(inout), optional :: flop

private subroutine dbcsr_add_d(matrix_a, matrix_b, alpha_scalar, beta_scalar)

Interface for dbcsr_add

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix_a
type(dbcsr_type), intent(in) :: matrix_b
real(kind=real_8), intent(in) :: alpha_scalar
real(kind=real_8), intent(in) :: beta_scalar

private subroutine dbcsr_add_s(matrix_a, matrix_b, alpha_scalar, beta_scalar)

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix_a
type(dbcsr_type), intent(in) :: matrix_b
real(kind=real_4), intent(in) :: alpha_scalar
real(kind=real_4), intent(in) :: beta_scalar

private subroutine dbcsr_add_z(matrix_a, matrix_b, alpha_scalar, beta_scalar)

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix_a
type(dbcsr_type), intent(in) :: matrix_b
complex(kind=real_8), intent(in) :: alpha_scalar
complex(kind=real_8), intent(in) :: beta_scalar

private subroutine dbcsr_add_c(matrix_a, matrix_b, alpha_scalar, beta_scalar)

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix_a
type(dbcsr_type), intent(in) :: matrix_b
complex(kind=real_4), intent(in) :: alpha_scalar
complex(kind=real_4), intent(in) :: beta_scalar

private subroutine dbcsr_add_on_diag_ds(matrix, alpha)

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix
real(kind=real_8), intent(in) :: alpha

public subroutine dbcsr_function_of_elements(matrix_a, func, a0, a1, a2)

Computes various functions (defined by func) of matrix elements

Read more…

Arguments

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

DBCSR matrix

integer, intent(in) :: func
real(kind=dp), intent(in), optional :: a0
real(kind=dp), intent(in), optional :: a1
real(kind=dp), intent(in), optional :: a2

public subroutine dbcsr_hadamard_product(matrix_a, matrix_b, matrix_c, b_assume_value)

Hadamard product C = A . B (C needs to be different from A and B)

Arguments

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

DBCSR matrix DBCSR matrix

type(dbcsr_type), intent(in) :: matrix_b

DBCSR matrix DBCSR matrix

type(dbcsr_type), intent(inout) :: matrix_c

DBCSR matrix

real(kind=dp), intent(in), optional :: b_assume_value

public subroutine dbcsr_init_random(matrix, keep_sparsity, mini_seed)

... TODO : unify with other version which is generic in the data_type

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix
logical, optional :: keep_sparsity
integer, intent(in), optional :: mini_seed

public subroutine dbcsr_get_block_diag(matrix, diag)

get the diagonal of a dbcsr matrix

Arguments

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

the matrix

type(dbcsr_type), intent(inout) :: diag

the diagonal

public subroutine dbcsr_copy(matrix_b, matrix_a, name, keep_sparsity, shallow_data, keep_imaginary, matrix_type)

copy a matrix

Arguments

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

target DBCSR matrix

type(dbcsr_type), intent(in) :: matrix_a

source DBCSR matrix

character(len=*), intent(in), optional :: name

name of the new matrix

logical, intent(in), optional :: keep_sparsity

keep the target matrix sparsity; default is False. shallow data copy when copy from complex to real,& the default is to keep only the real part; if this flag is set, the imaginary part is used

logical, intent(in), optional :: shallow_data

keep the target matrix sparsity; default is False. shallow data copy when copy from complex to real,& the default is to keep only the real part; if this flag is set, the imaginary part is used

logical, intent(in), optional :: keep_imaginary

keep the target matrix sparsity; default is False. shallow data copy when copy from complex to real,& the default is to keep only the real part; if this flag is set, the imaginary part is used

character(len=1), intent(in), optional :: matrix_type

'N' for normal, 'T' for transposed, 'S' for symmetric, and 'A' for antisymmetric

public subroutine dbcsr_copy_into_existing(matrix_b, matrix_a)

copy a matrix, retaining current sparsity

Arguments

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

target DBCSR matrix

type(dbcsr_type), intent(in) :: matrix_a

source DBCSR matrix

private subroutine dbcsr_copy_into_existing_sym(matrix_b, matrix_a)

copy a matrix, retaining current sparsity

Arguments

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

target DBCSR matrix

type(dbcsr_type), intent(in) :: matrix_a

source DBCSR matrix

private subroutine dbcsr_copy_submatrix(matrix_b, matrix_a, name, block_row_bounds, block_column_bounds, shallow_data)

Copy a submatrix.

Arguments

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

target DBCSR matrix

type(dbcsr_type), intent(in) :: matrix_a

source DBCSR matrix

character(len=*), intent(in), optional :: name

name of the new matrix

integer, intent(in), optional, DIMENSION(2) :: block_row_bounds

rows to extract (array of size 2 holding the lower and upper inclusive bounds) columns to extract (array of size 2 holding the lower and upper inclusive bounds)

integer, intent(in), optional, DIMENSION(2) :: block_column_bounds

rows to extract (array of size 2 holding the lower and upper inclusive bounds) columns to extract (array of size 2 holding the lower and upper inclusive bounds)

logical, intent(in), optional :: shallow_data

shallow data copy

public subroutine dbcsr_crop_matrix(matrix_b, matrix_a, full_row_bounds, full_column_bounds, shallow_data)

Crop and copies a matrix.

Arguments

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

target DBCSR matrix

type(dbcsr_type), intent(in) :: matrix_a

source DBCSR matrix

integer, intent(in), optional, DIMENSION(2) :: full_row_bounds

rows to extract (array of size 2 holding the lower and upper inclusive bounds) columns to extract (array of size 2 holding the lower and upper inclusive bounds)

integer, intent(in), optional, DIMENSION(2) :: full_column_bounds

rows to extract (array of size 2 holding the lower and upper inclusive bounds) columns to extract (array of size 2 holding the lower and upper inclusive bounds)

logical, intent(in), optional :: shallow_data

public subroutine dbcsr_triu(matrix_a)

triu of a dbcsr matrix

Arguments

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

the matrix

public subroutine dbcsr_filter_anytype(matrix, eps, method, use_absolute, filter_diag)

filter a dbcsr matrix

Arguments

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

the matrix

type(dbcsr_scalar_type), intent(in) :: eps

the threshold

integer, intent(in), optional :: method

how the matrix is filtered

logical, intent(in), optional :: use_absolute

NYI

logical, intent(in), optional :: filter_diag

NYI

public subroutine dbcsr_norm_scalar(matrix, which_norm, norm_scalar)

compute a norm of a dbcsr matrix

Arguments

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

the matrix

integer, intent(in) :: which_norm
real(kind=real_8), intent(out) :: norm_scalar

public subroutine dbcsr_norm_r8_vec(matrix, which_norm, norm_vector)

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix
integer, intent(in) :: which_norm
real(kind=real_8), intent(out), DIMENSION(:), TARGET, CONTIGUOUS :: norm_vector

private subroutine dbcsr_norm_vec(matrix, which_norm, norm_vector)

compute the column norms of the dbcsr matrix

Arguments

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

the matrix

integer, intent(in) :: which_norm
type(dbcsr_data_obj), intent(inout) :: norm_vector

public subroutine dbcsr_sum_replicated(matrix)

Sums blocks in a replicated dbcsr matrix, which has the same structure on all ranks.

Arguments

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

dbcsr matrix to operate on

public subroutine dbcsr_get_info(matrix, nblkrows_total, nblkcols_total, nfullrows_total, nfullcols_total, nblkrows_local, nblkcols_local, nfullrows_local, nfullcols_local, my_prow, my_pcol, local_rows, local_cols, proc_row_dist, proc_col_dist, row_blk_size, col_blk_size, row_blk_offset, col_blk_offset, distribution, name, data_area, matrix_type, data_type, group)

Gets information about a matrix

Arguments

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

matrix to query

integer, intent(out), optional :: nblkrows_total
integer, intent(out), optional :: nblkcols_total
integer, intent(out), optional :: nfullrows_total
integer, intent(out), optional :: nfullcols_total
integer, intent(out), optional :: nblkrows_local
integer, intent(out), optional :: nblkcols_local
integer, intent(out), optional :: nfullrows_local
integer, intent(out), optional :: nfullcols_local
integer, intent(out), optional :: my_prow
integer, intent(out), optional :: my_pcol
integer, optional, DIMENSION(:), POINTER :: local_rows
integer, optional, DIMENSION(:), POINTER :: local_cols
integer, optional, DIMENSION(:), POINTER :: proc_row_dist
integer, optional, DIMENSION(:), POINTER :: proc_col_dist
integer, optional, DIMENSION(:), POINTER :: row_blk_size
integer, optional, DIMENSION(:), POINTER :: col_blk_size
integer, optional, DIMENSION(:), POINTER :: row_blk_offset
integer, optional, DIMENSION(:), POINTER :: col_blk_offset
type(dbcsr_distribution_obj), intent(out), optional :: distribution

the data distribution of the matrix

character(len=*), intent(out), optional :: name

matrix name

type(dbcsr_data_obj), intent(out), optional :: data_area

data_area

character(len=1), optional :: matrix_type

matrix type (regular, symmetric, see dbcsr_types.F for values)

integer, optional :: data_type

data type (single/double precision real/complex)

type(mp_comm_type), intent(out), optional :: group

public subroutine dbcsr_clear(matrix)

Clear a matrix (remove all blocks)

Arguments

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

private subroutine dbcsr_trace_sd(matrix_a, trace)

Trace of DBCSR matrices

Arguments

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

DBCSR matrices

real(kind=real_8), intent(inout) :: trace

the trace of the product of the matrices

private subroutine dbcsr_dot_sd(matrix_a, matrix_b, trace)

Dot product of DBCSR matrices \result the dot product of the matrices

Arguments

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

DBCSR matrices DBCSR matrices

type(dbcsr_type), intent(in) :: matrix_b

DBCSR matrices DBCSR matrices

real(kind=real_8), intent(inout) :: trace

private subroutine dbcsr_trace_d(matrix_a, trace)

traces a DBCSR matrix

Arguments

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

DBCSR matrix

real(kind=real_8), intent(inout) :: trace

the trace of the matrix

private subroutine dbcsr_dot_d(matrix_a, matrix_b, trace)

Dot product of DBCSR matrices

Arguments

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

DBCSR matrices DBCSR matrices

type(dbcsr_type), intent(in) :: matrix_b

DBCSR matrices DBCSR matrices

real(kind=real_8), intent(inout) :: trace

the trace of the product of the matrices

private subroutine dbcsr_scale_d(matrix_a, alpha_scalar, last_column)

Interface for matrix scaling by a scalar

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix_a
real(kind=real_8), intent(in) :: alpha_scalar
integer, intent(in), optional :: last_column

private subroutine dbcsr_scale_by_vector_d(matrix_a, alpha, side)

Interface for matrix scaling by a vector

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix_a
real(kind=real_8), intent(in), DIMENSION(:), TARGET, CONTIGUOUS :: alpha
character(len=*), intent(in) :: side

private subroutine dbcsr_set_d(matrix, alpha)

Interface for dbcsr_set

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix
real(kind=real_8), intent(in) :: alpha

private subroutine dbcsr_filter_d(matrix, eps, method, use_absolute, filter_diag)

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix
real(kind=real_8), intent(in) :: eps
integer, intent(in), optional :: method
logical, intent(in), optional :: use_absolute
logical, intent(in), optional :: filter_diag

private subroutine dbcsr_set_diag_d(matrix, diag)

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix
real(kind=real_8), intent(in), DIMENSION(:) :: diag

private subroutine dbcsr_get_diag_d(matrix, diag)

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(in) :: matrix
real(kind=real_8), intent(out), DIMENSION(:) :: diag

private subroutine dbcsr_add_on_diag_d(matrix, alpha)

add a constant to the diagonal of a matrix

Arguments

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

DBCSR matrix

real(kind=real_8), intent(in) :: alpha

scalar

private subroutine dbcsr_update_contiguous_blocks_d(matrix_a, matrix_b, first_lb_a, first_lb_b, nze, do_scale, my_beta_scalar, found, iw)

Low level function to sum contiguous chunks of blocks of the matrices (matrix_a = matrix_a + beta*matrix_b)

Arguments

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

DBCSR matrix

type(dbcsr_type), intent(in) :: matrix_b

DBCSR matrix

integer, intent(in) :: first_lb_a
integer, intent(in) :: first_lb_b
integer, intent(in) :: nze
logical, intent(in) :: do_scale
type(dbcsr_scalar_type), intent(in) :: my_beta_scalar
logical, intent(in) :: found
integer, intent(in) :: iw

private subroutine dbcsr_add_anytype_d(matrix_a, matrix_b, iter, iw, do_scale, my_beta_scalar, my_flop)

Low level function to sum two matrices (matrix_a = matrix_a + beta*matrix_b

Arguments

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

DBCSR matrix

type(dbcsr_type), intent(in) :: matrix_b

DBCSR matrix

type(dbcsr_iterator), intent(inout) :: iter
integer, intent(in) :: iw
logical, intent(in) :: do_scale
type(dbcsr_scalar_type), intent(in) :: my_beta_scalar
integer(kind=int_8), intent(inout) :: my_flop

private subroutine dbcsr_trace_s(matrix_a, trace)

traces a DBCSR matrix

Arguments

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

DBCSR matrix

real(kind=real_4), intent(inout) :: trace

the trace of the matrix

private subroutine dbcsr_dot_s(matrix_a, matrix_b, trace)

Dot product of DBCSR matrices

Arguments

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

DBCSR matrices DBCSR matrices

type(dbcsr_type), intent(in) :: matrix_b

DBCSR matrices DBCSR matrices

real(kind=real_4), intent(inout) :: trace

the trace of the product of the matrices

private subroutine dbcsr_scale_s(matrix_a, alpha_scalar, last_column)

Interface for matrix scaling by a scalar

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix_a
real(kind=real_4), intent(in) :: alpha_scalar
integer, intent(in), optional :: last_column

private subroutine dbcsr_scale_by_vector_s(matrix_a, alpha, side)

Interface for matrix scaling by a vector

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix_a
real(kind=real_4), intent(in), DIMENSION(:), TARGET, CONTIGUOUS :: alpha
character(len=*), intent(in) :: side

private subroutine dbcsr_set_s(matrix, alpha)

Interface for dbcsr_set

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix
real(kind=real_4), intent(in) :: alpha

private subroutine dbcsr_filter_s(matrix, eps, method, use_absolute, filter_diag)

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix
real(kind=real_4), intent(in) :: eps
integer, intent(in), optional :: method
logical, intent(in), optional :: use_absolute
logical, intent(in), optional :: filter_diag

private subroutine dbcsr_set_diag_s(matrix, diag)

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix
real(kind=real_4), intent(in), DIMENSION(:) :: diag

private subroutine dbcsr_get_diag_s(matrix, diag)

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(in) :: matrix
real(kind=real_4), intent(out), DIMENSION(:) :: diag

private subroutine dbcsr_add_on_diag_s(matrix, alpha)

add a constant to the diagonal of a matrix

Arguments

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

DBCSR matrix

real(kind=real_4), intent(in) :: alpha

scalar

private subroutine dbcsr_update_contiguous_blocks_s(matrix_a, matrix_b, first_lb_a, first_lb_b, nze, do_scale, my_beta_scalar, found, iw)

Low level function to sum contiguous chunks of blocks of the matrices (matrix_a = matrix_a + beta*matrix_b)

Arguments

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

DBCSR matrix

type(dbcsr_type), intent(in) :: matrix_b

DBCSR matrix

integer, intent(in) :: first_lb_a
integer, intent(in) :: first_lb_b
integer, intent(in) :: nze
logical, intent(in) :: do_scale
type(dbcsr_scalar_type), intent(in) :: my_beta_scalar
logical, intent(in) :: found
integer, intent(in) :: iw

private subroutine dbcsr_add_anytype_s(matrix_a, matrix_b, iter, iw, do_scale, my_beta_scalar, my_flop)

Low level function to sum two matrices (matrix_a = matrix_a + beta*matrix_b

Arguments

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

DBCSR matrix

type(dbcsr_type), intent(in) :: matrix_b

DBCSR matrix

type(dbcsr_iterator), intent(inout) :: iter
integer, intent(in) :: iw
logical, intent(in) :: do_scale
type(dbcsr_scalar_type), intent(in) :: my_beta_scalar
integer(kind=int_8), intent(inout) :: my_flop

private subroutine dbcsr_trace_z(matrix_a, trace)

traces a DBCSR matrix

Arguments

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

DBCSR matrix

complex(kind=real_8), intent(inout) :: trace

the trace of the matrix

private subroutine dbcsr_dot_z(matrix_a, matrix_b, trace)

Dot product of DBCSR matrices

Arguments

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

DBCSR matrices DBCSR matrices

type(dbcsr_type), intent(in) :: matrix_b

DBCSR matrices DBCSR matrices

complex(kind=real_8), intent(inout) :: trace

the trace of the product of the matrices

private subroutine dbcsr_scale_z(matrix_a, alpha_scalar, last_column)

Interface for matrix scaling by a scalar

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix_a
complex(kind=real_8), intent(in) :: alpha_scalar
integer, intent(in), optional :: last_column

private subroutine dbcsr_scale_by_vector_z(matrix_a, alpha, side)

Interface for matrix scaling by a vector

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix_a
complex(kind=real_8), intent(in), DIMENSION(:), TARGET, CONTIGUOUS :: alpha
character(len=*), intent(in) :: side

private subroutine dbcsr_set_z(matrix, alpha)

Interface for dbcsr_set

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix
complex(kind=real_8), intent(in) :: alpha

private subroutine dbcsr_filter_z(matrix, eps, method, use_absolute, filter_diag)

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix
complex(kind=real_8), intent(in) :: eps
integer, intent(in), optional :: method
logical, intent(in), optional :: use_absolute
logical, intent(in), optional :: filter_diag

private subroutine dbcsr_set_diag_z(matrix, diag)

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix
complex(kind=real_8), intent(in), DIMENSION(:) :: diag

private subroutine dbcsr_get_diag_z(matrix, diag)

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(in) :: matrix
complex(kind=real_8), intent(out), DIMENSION(:) :: diag

private subroutine dbcsr_add_on_diag_z(matrix, alpha)

add a constant to the diagonal of a matrix

Arguments

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

DBCSR matrix

complex(kind=real_8), intent(in) :: alpha

scalar

private subroutine dbcsr_update_contiguous_blocks_z(matrix_a, matrix_b, first_lb_a, first_lb_b, nze, do_scale, my_beta_scalar, found, iw)

Low level function to sum contiguous chunks of blocks of the matrices (matrix_a = matrix_a + beta*matrix_b)

Arguments

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

DBCSR matrix

type(dbcsr_type), intent(in) :: matrix_b

DBCSR matrix

integer, intent(in) :: first_lb_a
integer, intent(in) :: first_lb_b
integer, intent(in) :: nze
logical, intent(in) :: do_scale
type(dbcsr_scalar_type), intent(in) :: my_beta_scalar
logical, intent(in) :: found
integer, intent(in) :: iw

private subroutine dbcsr_add_anytype_z(matrix_a, matrix_b, iter, iw, do_scale, my_beta_scalar, my_flop)

Low level function to sum two matrices (matrix_a = matrix_a + beta*matrix_b

Arguments

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

DBCSR matrix

type(dbcsr_type), intent(in) :: matrix_b

DBCSR matrix

type(dbcsr_iterator), intent(inout) :: iter
integer, intent(in) :: iw
logical, intent(in) :: do_scale
type(dbcsr_scalar_type), intent(in) :: my_beta_scalar
integer(kind=int_8), intent(inout) :: my_flop

private subroutine dbcsr_trace_c(matrix_a, trace)

traces a DBCSR matrix

Arguments

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

DBCSR matrix

complex(kind=real_4), intent(inout) :: trace

the trace of the matrix

private subroutine dbcsr_dot_c(matrix_a, matrix_b, trace)

Dot product of DBCSR matrices

Arguments

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

DBCSR matrices DBCSR matrices

type(dbcsr_type), intent(in) :: matrix_b

DBCSR matrices DBCSR matrices

complex(kind=real_4), intent(inout) :: trace

the trace of the product of the matrices

private subroutine dbcsr_scale_c(matrix_a, alpha_scalar, last_column)

Interface for matrix scaling by a scalar

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix_a
complex(kind=real_4), intent(in) :: alpha_scalar
integer, intent(in), optional :: last_column

private subroutine dbcsr_scale_by_vector_c(matrix_a, alpha, side)

Interface for matrix scaling by a vector

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix_a
complex(kind=real_4), intent(in), DIMENSION(:), TARGET, CONTIGUOUS :: alpha
character(len=*), intent(in) :: side

private subroutine dbcsr_set_c(matrix, alpha)

Interface for dbcsr_set

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix
complex(kind=real_4), intent(in) :: alpha

private subroutine dbcsr_filter_c(matrix, eps, method, use_absolute, filter_diag)

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix
complex(kind=real_4), intent(in) :: eps
integer, intent(in), optional :: method
logical, intent(in), optional :: use_absolute
logical, intent(in), optional :: filter_diag

private subroutine dbcsr_set_diag_c(matrix, diag)

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: matrix
complex(kind=real_4), intent(in), DIMENSION(:) :: diag

private subroutine dbcsr_get_diag_c(matrix, diag)

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(in) :: matrix
complex(kind=real_4), intent(out), DIMENSION(:) :: diag

private subroutine dbcsr_add_on_diag_c(matrix, alpha)

add a constant to the diagonal of a matrix

Arguments

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

DBCSR matrix

complex(kind=real_4), intent(in) :: alpha

scalar

private subroutine dbcsr_update_contiguous_blocks_c(matrix_a, matrix_b, first_lb_a, first_lb_b, nze, do_scale, my_beta_scalar, found, iw)

Low level function to sum contiguous chunks of blocks of the matrices (matrix_a = matrix_a + beta*matrix_b)

Arguments

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

DBCSR matrix

type(dbcsr_type), intent(in) :: matrix_b

DBCSR matrix

integer, intent(in) :: first_lb_a
integer, intent(in) :: first_lb_b
integer, intent(in) :: nze
logical, intent(in) :: do_scale
type(dbcsr_scalar_type), intent(in) :: my_beta_scalar
logical, intent(in) :: found
integer, intent(in) :: iw

private subroutine dbcsr_add_anytype_c(matrix_a, matrix_b, iter, iw, do_scale, my_beta_scalar, my_flop)

Low level function to sum two matrices (matrix_a = matrix_a + beta*matrix_b

Arguments

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

DBCSR matrix

type(dbcsr_type), intent(in) :: matrix_b

DBCSR matrix

type(dbcsr_iterator), intent(inout) :: iter
integer, intent(in) :: iw
logical, intent(in) :: do_scale
type(dbcsr_scalar_type), intent(in) :: my_beta_scalar
integer(kind=int_8), intent(inout) :: my_flop