ESMF_DELayoutGetDEMatchDE Subroutine

public subroutine ESMF_DELayoutGetDEMatchDE(delayout, de, delayoutMatch, deMatchCount, deMatchList, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_DELayout), intent(in) :: delayout
integer, intent(in) :: de
type(ESMF_DELayout), intent(in) :: delayoutMatch
integer, intent(out), optional :: deMatchCount
integer, intent(out), optional, target :: deMatchList(:)
integer, intent(out), optional :: rc

Calls

proc~~esmf_delayoutgetdematchde~~CallsGraph proc~esmf_delayoutgetdematchde ESMF_DELayoutGetDEMatchDE c_esmc_delayoutgetdematchde c_esmc_delayoutgetdematchde proc~esmf_delayoutgetdematchde->c_esmc_delayoutgetdematchde proc~esmf_delayoutgetinit ESMF_DELayoutGetInit proc~esmf_delayoutgetdematchde->proc~esmf_delayoutgetinit proc~esmf_imerr ESMF_IMErr proc~esmf_delayoutgetdematchde->proc~esmf_imerr proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_delayoutgetdematchde->proc~esmf_logfounderror proc~esmf_imerr->proc~esmf_logfounderror proc~esmf_initcheckdeep ESMF_InitCheckDeep proc~esmf_imerr->proc~esmf_initcheckdeep esmf_breakpoint esmf_breakpoint proc~esmf_logfounderror->esmf_breakpoint proc~esmf_logrc2msg ESMF_LogRc2Msg proc~esmf_logfounderror->proc~esmf_logrc2msg proc~esmf_logwrite ESMF_LogWrite proc~esmf_logfounderror->proc~esmf_logwrite c_esmc_loggeterrormsg c_esmc_loggeterrormsg proc~esmf_logrc2msg->c_esmc_loggeterrormsg c_esmc_vmwtime c_esmc_vmwtime proc~esmf_logwrite->c_esmc_vmwtime proc~esmf_logclose ESMF_LogClose proc~esmf_logwrite->proc~esmf_logclose proc~esmf_logflush ESMF_LogFlush proc~esmf_logwrite->proc~esmf_logflush proc~esmf_logopenfile ESMF_LogOpenFile proc~esmf_logwrite->proc~esmf_logopenfile proc~esmf_utiliounitflush ESMF_UtilIOUnitFlush proc~esmf_logwrite->proc~esmf_utiliounitflush proc~esmf_utilstring2array ESMF_UtilString2Array proc~esmf_logwrite->proc~esmf_utilstring2array proc~esmf_logclose->proc~esmf_logflush proc~esmf_logflush->proc~esmf_utiliounitflush proc~esmf_utilarray2string ESMF_UtilArray2String proc~esmf_logflush->proc~esmf_utilarray2string proc~esmf_logopenfile->proc~esmf_utiliounitflush proc~esmf_utiliounitget ESMF_UtilIOUnitGet proc~esmf_logopenfile->proc~esmf_utiliounitget

Source Code

  subroutine ESMF_DELayoutGetDEMatchDE(delayout, de, delayoutMatch, &
    deMatchCount, deMatchList, rc)
!
! !ARGUMENTS:
    type(ESMF_DELayout),  intent(in)            :: delayout
    integer,              intent(in)            :: de
    type(ESMF_DELayout),  intent(in)            :: delayoutMatch
    integer,              intent(out), optional :: deMatchCount
    integer, target,      intent(out), optional :: deMatchList(:)
    integer,              intent(out), optional :: rc  
!
! !DESCRIPTION:
!     Match the virtual address space of the specified DE in a DELayout with that
!     of the DEs of a second DELayout. The use of this method is crucial when
!     dealing with decomposed data structures that were not defined in the
!     current VM context, i.e. defined in another component.
!
!     The arguments are:
!     \begin{description}
!     \item[delayout] 
!        {\tt ESMF\_DELayout} object in which the specified DE is defined.
!     \item[de]
!        Specified DE within delayout, for which to find matching DEs in 
!        delayoutMatch,
!     \item[delayoutMatch] 
!        DELayout object in which to find DEs that match the virtual address
!        space of the specified DE.
!     \item[{[deMatchCount]}]
!        Upon return this holds the number of DEs in delayoutMatch that share
!        virtual address space with the specified DE.
!     \item[{[deMatchList]}]
!        Upon return this holds the list of DEs in delayoutMatch that share
!        virtual address space with the specified DE.
!     \item[{[rc]}] 
!          Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!     \end{description}
!
!EOPI
!------------------------------------------------------------------------------
    integer                 :: localrc      ! local return code
    integer                 :: len_deMatchList
    integer, target         :: dummy(1)     ! used to satisfy the C interface...
    integer, pointer        :: opt_deMatchList(:)

    ! 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)
    ESMF_INIT_CHECK_DEEP(ESMF_DELayoutGetInit, delayoutMatch, rc)
    
    ! Deal with optional array arguments
    if (present(deMatchList)) then
      len_deMatchList = size(deMatchList)
      opt_deMatchList => deMatchList
    else
      len_deMatchList = -1 ! indicate not present
      opt_deMatchList => dummy
    endif

    ! Call into the C++ interface.
    call c_ESMC_DELayoutGetDEMatchDE(delayout, de, delayoutMatch, &
      deMatchCount, opt_deMatchList(1), len_deMatchList, localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return

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