get_parent Function

private elemental function get_parent(n) result(parent)

Arguments

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

Return Value integer


Source Code

   ELEMENTAL FUNCTION get_parent(n) RESULT(parent)
      INTEGER, INTENT(IN)                                :: n
      INTEGER                                            :: parent

      parent = INT(n/2)
   END FUNCTION get_parent