dbcsr_scalar_zero Function

public elemental function dbcsr_scalar_zero(data_type) result(zero)

Returns an encapsulated scalar "0"

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: data_type

use the data type

Return Value type(dbcsr_scalar_type)

encapsulated value of zero


Source Code

   ELEMENTAL FUNCTION dbcsr_scalar_zero(data_type) RESULT(zero)
      !! Returns an encapsulated scalar "0"

      INTEGER, INTENT(IN)                                :: data_type
         !! use the data type
      TYPE(dbcsr_scalar_type)                            :: zero
         !! encapsulated value of zero

      zero%data_type = data_type
      zero%r_sp = 0.0_real_4
      zero%r_dp = 0.0_real_8
      zero%c_sp = CMPLX(0.0, 0.0, real_4)
      zero%c_dp = CMPLX(0.0, 0.0, real_8)
   END FUNCTION dbcsr_scalar_zero