dbcsr_transposed Subroutine

public subroutine dbcsr_transposed(transposed, normal, shallow_data_copy, transpose_data, transpose_distribution, use_distribution)

Transposes a DBCSR matrix, keeping the same distribution

Arguments

Type IntentOptional Attributes Name
type(dbcsr_type), intent(inout) :: transposed
type(dbcsr_type), intent(in) :: normal
logical, intent(in), optional :: shallow_data_copy
logical, intent(in), optional :: transpose_data
logical, intent(in), optional :: transpose_distribution
type(dbcsr_distribution_obj), intent(in), optional :: use_distribution

Source Code

   SUBROUTINE dbcsr_transposed(transposed, normal, shallow_data_copy, &
      !! Transposes a DBCSR matrix, keeping the same distribution
                               transpose_data, transpose_distribution, use_distribution)

      TYPE(dbcsr_type), INTENT(INOUT)                    :: transposed
      TYPE(dbcsr_type), INTENT(IN)                       :: normal
      LOGICAL, INTENT(IN), OPTIONAL                      :: shallow_data_copy, transpose_data, &
                                                            transpose_distribution
      TYPE(dbcsr_distribution_obj), INTENT(IN), &
         OPTIONAL                                        :: use_distribution

      LOGICAL                                            :: myshallow_data_copy, &
                                                            mytranspose_distribution
      TYPE(dbcsr_distribution_obj)                           :: myuse_distribution

!   set some defaults to make usage a bit less painful (fschiff)

      myshallow_data_copy = .FALSE.
      myuse_distribution = normal%dist
      mytranspose_distribution = .FALSE.
      IF (PRESENT(shallow_data_copy)) myshallow_data_copy = shallow_data_copy
      IF (PRESENT(use_distribution)) myuse_distribution = use_distribution
      IF (PRESENT(transpose_distribution)) mytranspose_distribution = transpose_distribution

      CALL dbcsr_new_transposed(transposed, normal, myshallow_data_copy, &
                                transpose_data, mytranspose_distribution, &
                                use_distribution=myuse_distribution)
   END SUBROUTINE dbcsr_transposed