Returns the matrix type
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_type), | intent(in) | :: | matrix |
query this matrix |
matrix_type (see dbcsr_types.F for possible values)
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