dbcsr_t_contract_index Subroutine

public subroutine dbcsr_t_contract_index(alpha, tensor_1, tensor_2, beta, tensor_3, contract_1, notcontract_1, contract_2, notcontract_2, map_1, map_2, bounds_1, bounds_2, bounds_3, filter_eps, nblks_local, result_index)

get indices of non-zero tensor blocks for contraction result without actually performing contraction. this is an estimate based on block norm multiplication. See documentation of dbcsr_t_contract.

Arguments

Type IntentOptional Attributes Name
type(dbcsr_scalar_type), intent(in) :: alpha
type(dbcsr_t_type), intent(inout), TARGET :: tensor_1
type(dbcsr_t_type), intent(inout), TARGET :: tensor_2
type(dbcsr_scalar_type), intent(in) :: beta
type(dbcsr_t_type), intent(inout), TARGET :: tensor_3
integer, intent(in), DIMENSION(:) :: contract_1
integer, intent(in), DIMENSION(:) :: notcontract_1
integer, intent(in), DIMENSION(:) :: contract_2
integer, intent(in), DIMENSION(:) :: notcontract_2
integer, intent(in), DIMENSION(:) :: map_1
integer, intent(in), DIMENSION(:) :: map_2
integer, intent(in), optional, DIMENSION(2, SIZE(contract_1)) :: bounds_1
integer, intent(in), optional, DIMENSION(2, SIZE(notcontract_1)) :: bounds_2
integer, intent(in), optional, DIMENSION(2, SIZE(notcontract_2)) :: bounds_3
real(kind=real_8), intent(in), optional :: filter_eps
integer, intent(out) :: nblks_local

number of local blocks on this MPI rank

integer, intent(out), DIMENSION(dbcsr_t_max_nblks_local(tensor_3), ndims_tensor(tensor_3)) :: result_index

indices of local non-zero tensor blocks for tensor_3 only the elements result_index(:nblks_local, :) are relevant (all others are set to 0)