ESMF_DELayoutGetDeprecated Subroutine

public subroutine ESMF_DELayoutGetDeprecated(delayout, deCount, dimCount, localDeCount, localDeToDeMap, localDe, oneToOneFlag, logRectFlag, deCountPerDim, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_DELayout), intent(in) :: delayout
integer, intent(out), optional :: deCount
integer, intent(out), optional :: dimCount
integer, intent(out), optional :: localDeCount
integer, intent(out), optional, target :: localDeToDeMap(:)
integer, intent(out), optional :: localDe
type(ESMF_Logical), intent(out), optional :: oneToOneFlag
type(ESMF_Logical), intent(out), optional :: logRectFlag
integer, intent(out), optional, target :: deCountPerDim(:)
integer, intent(out), optional :: rc

Source Code

  subroutine ESMF_DELayoutGetDeprecated(delayout, deCount, dimCount, &
    localDeCount, localDeToDeMap, localDe, oneToOneFlag, logRectFlag, &
    deCountPerDim, rc)
!
! !ARGUMENTS:
    type(ESMF_DELayout),  intent(in)            :: delayout
    integer,              intent(out), optional :: deCount
    integer,              intent(out), optional :: dimCount
    integer,              intent(out), optional :: localDeCount
    integer, target,      intent(out), optional :: localDeToDeMap(:)
    integer,              intent(out), optional :: localDe
    type(ESMF_Logical),   intent(out), optional :: oneToOneFlag
    type(ESMF_Logical),   intent(out), optional :: logRectFlag
    integer, target,      intent(out), optional :: deCountPerDim(:)
    integer,              intent(out), optional :: rc  
!
! !DESCRIPTION:
!     Get internal decomposition information.
!
!     The arguments are:
!     \begin{description}
!     \item[delayout] 
!        Queried {\tt ESMF\_DELayout} object.
!     \item[{[deCount]}]
!        Upon return this holds the total number of DEs.
!     \item[{[dimCount]}]
!        Upon return this holds the number of dimensions in the specified 
!        {\tt ESMF\_DELayout} object's coordinate tuples.
!     \item[{[localDeCount]}]
!        Upon return this holds the number of DEs associated with the local PET.
!     \item[{[localDeToDeMap]}]
!        Upon return this holds the list of DEs associated with the local PET.
!     \item[{[localDe]}]
!        Upon return this holds the DE associated with the local PET. If the
!        specified {\tt ESMF\_DELayout} object associates more than one DE
!        with the local PET then the first local DE is returned. If there are
!        no PET-local DEs {\tt localDE} is set to "-1" and error code
!        {\tt ESMF\_RC\_CANNOT\_GET} is returned in {\tt rc}.
!     \item[{[oneToOneFlag]}]
!        Upon return this holds {\tt ESMF\_TRUE} if the specified 
!        {\tt ESMF\_DELayout} object is 1-to-1, {\tt ESMF\_FALSE} otherwise.
!     \item[{[logRectFlag]}]
!        Upon return this holds {\tt ESMF\_TRUE} if the specified 
!        {\tt ESMF\_DELayout} object is logically rectangular, {\tt ESMF\_FALSE}
!        otherwise.
!     \item[{[deCountPerDim]}]
!        If the specified {\tt ESMF\_DELayout} object is logically rectangular
!        then upon return this holds the number of DEs along each dimension.
!        Otherwise {\tt deCountPerDim} is filled with values of "-1" and
!        error code {\tt ESMF\_RC\_CANNOT\_GET} is returned in {\tt rc}.
!     \item[{[rc]}] 
!          Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!     \end{description}
!
!EOPI
!------------------------------------------------------------------------------
    integer                 :: localrc      ! local return code
    integer                 :: len_localDeToDeMap, len_deCountPerDim
    integer, pointer        :: opt_localDeToDeMap(:), opt_deCountPerDim(:)
    integer, target         :: dummy(1)     ! used to satisfy the C interface...

    ! initialize return code; assume routine not implemented
    localrc = ESMF_RC_NOT_IMPL
    if (present(rc)) rc = ESMF_RC_NOT_IMPL

    ! Check init status of arguments
    ESMF_INIT_CHECK_DEEP(ESMF_DELayoutGetInit, delayout, rc)
    
    ! Deal with optional array arguments
    if (present(localDeToDeMap)) then
      len_localDeToDeMap = size(localDeToDeMap)
      opt_localDeToDeMap => localDeToDeMap
    else
      len_localDeToDeMap = 0
      opt_localDeToDeMap => dummy
    endif
    if (present(deCountPerDim)) then
      len_deCountPerDim = size(deCountPerDim)
      opt_deCountPerDim => deCountPerDim
    else
      len_deCountPerDim = 0
      opt_deCountPerDim => dummy
    endif

    ! Call into the C++ interface.
    call c_ESMC_DELayoutGetDeprecated(delayout, deCount, dimCount, &
      localDeCount, opt_localDeToDeMap(1), len_localDeToDeMap, localDe, &
      oneToOneFlag, logRectFlag, opt_deCountPerDim(1), len_deCountPerDim, &
      localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return

    ! return successfully
    if (present(rc)) rc = ESMF_SUCCESS
    
  end subroutine ESMF_DELayoutGetDeprecated