dbcsr_scalar_c Function

private elemental function dbcsr_scalar_c(scalar) result(encapsulated_scalar)

Sets a scalar in an encapsulated data structure

Arguments

Type IntentOptional Attributes Name
complex(kind=real_4), intent(in) :: scalar

scalar to encapsulate

Return Value type(dbcsr_scalar_type)

encapsulated scalar


Source Code

      ELEMENTAL FUNCTION dbcsr_scalar_c (scalar) RESULT(encapsulated_scalar)
     !! Sets a scalar in an encapsulated data structure

         COMPLEX(kind=real_4), INTENT(IN)       :: scalar
        !! scalar to encapsulate
         TYPE(dbcsr_scalar_type)   :: encapsulated_scalar
        !! encapsulated scalar

         encapsulated_scalar = dbcsr_scalar_zero(dbcsr_type_complex_4)
         encapsulated_scalar%c_sp = scalar
      END FUNCTION dbcsr_scalar_c