fill a dbcsr matrix with zeros
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_type), | intent(inout) | :: | matrix_a |
SUBROUTINE dbcsr_zero(matrix_a) !! fill a dbcsr matrix with zeros TYPE(dbcsr_type), INTENT(INOUT) :: matrix_a CHARACTER(len=*), PARAMETER :: routineN = 'dbcsr_zero' INTEGER :: handle CALL timeset(routineN, handle) SELECT CASE (dbcsr_get_data_type(matrix_a)) CASE (dbcsr_type_complex_4) matrix_a%data_area%d%c_sp = (0.0, 0.0) CASE (dbcsr_type_complex_8) matrix_a%data_area%d%c_dp = (0.0_dp, 0.0_dp) CASE (dbcsr_type_real_4) matrix_a%data_area%d%r_sp = 0.0 CASE (dbcsr_type_real_8) matrix_a%data_area%d%r_dp = 0.0_dp END SELECT CALL timestop(handle) END SUBROUTINE dbcsr_zero