checks if matrix symmetry and data_type are consistent \brief note: does not check the symmetry of the data itself
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=1), | intent(in) | :: | matrix_type | |||
integer, | intent(in) | :: | data_type |
LOGICAL 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 CHARACTER, INTENT(IN) :: matrix_type INTEGER, INTENT(IN) :: data_type symmetry_consistent = .FALSE. SELECT CASE (data_type) CASE (dbcsr_type_real_4, dbcsr_type_real_8) SELECT CASE (matrix_type) CASE (dbcsr_type_no_symmetry, dbcsr_type_symmetric, dbcsr_type_antisymmetric) symmetry_consistent = .TRUE. END SELECT CASE (dbcsr_type_complex_4, dbcsr_type_complex_8) SELECT CASE (matrix_type) CASE (dbcsr_type_no_symmetry, dbcsr_type_hermitian, dbcsr_type_antihermitian) symmetry_consistent = .TRUE. END SELECT CASE DEFAULT DBCSR_ABORT("Invalid data type.") END SELECT END FUNCTION symmetry_consistent