dbcsr_get_matrix_type Function

public pure function dbcsr_get_matrix_type(matrix) result(matrix_type)

Returns the matrix type

Arguments

TypeIntentOptionalAttributesName
type(dbcsr_type), intent(in) :: matrix

query this matrix

Return Value character

matrix_type (see dbcsr_types.F for possible values)


Contents

Source Code


Source Code

   PURE FUNCTION dbcsr_get_matrix_type(matrix) RESULT(matrix_type)
      !! Returns the matrix type

      TYPE(dbcsr_type), INTENT(IN)                       :: matrix
         !! query this matrix
      CHARACTER                                          :: matrix_type
         !! matrix_type (see dbcsr_types.F for possible values)

      matrix_type = dbcsr_type_invalid
      IF (matrix%symmetry) THEN
         IF ((.NOT. matrix%negate_real) .AND. matrix%negate_imaginary) THEN
            matrix_type = dbcsr_type_hermitian
         ELSEIF (matrix%negate_real .AND. (.NOT. matrix%negate_imaginary)) THEN
            matrix_type = dbcsr_type_antihermitian
         ELSEIF (matrix%negate_real .AND. matrix%negate_imaginary) THEN
            matrix_type = dbcsr_type_antisymmetric
         ELSEIF ((.NOT. matrix%negate_real) .AND. (.NOT. matrix%negate_imaginary)) THEN
            matrix_type = dbcsr_type_symmetric
         END IF
      ELSE
         matrix_type = dbcsr_type_no_symmetry
      END IF
   END FUNCTION dbcsr_get_matrix_type