ESMF_HConfigEQ Function

private function ESMF_HConfigEQ(HConfig1, HConfig2)

Arguments

Type IntentOptional Attributes Name
type(ESMF_HConfig), intent(in) :: HConfig1
type(ESMF_HConfig), intent(in) :: HConfig2

Return Value logical


Calls

proc~~esmf_hconfigeq~~CallsGraph proc~esmf_hconfigeq ESMF_HConfigEQ interface~c_esmc_hconfigequal c_ESMC_HConfigEqual proc~esmf_hconfigeq->interface~c_esmc_hconfigequal proc~esmf_hconfiggetinit ESMF_HConfigGetInit proc~esmf_hconfigeq->proc~esmf_hconfiggetinit

Called by

proc~~esmf_hconfigeq~~CalledByGraph proc~esmf_hconfigeq ESMF_HConfigEQ interface~operator(==)~6 operator(==) interface~operator(==)~6->proc~esmf_hconfigeq proc~esmf_hconfigne ESMF_HConfigNE proc~esmf_hconfigne->proc~esmf_hconfigeq interface~operator(SLASH=)~6 operator(/=) interface~operator(SLASH=)~6->proc~esmf_hconfigne

Source Code

  function ESMF_HConfigEQ(HConfig1, HConfig2)
!
! !RETURN VALUE:
    logical :: ESMF_HConfigEQ

! !ARGUMENTS:
    type(ESMF_HConfig), intent(in) :: HConfig1
    type(ESMF_HConfig), intent(in) :: HConfig2

! !DESCRIPTION:
!   Test if both {\tt HConfig1} and {\tt HConfig2} alias the same
!   ESMF HConfig object.
!
!EOPI
!-------------------------------------------------------------------------------

    ESMF_INIT_TYPE init1, init2
    type(ESMF_Logical) :: isEqual

    ! Use the following logic, rather than "ESMF-INIT-CHECK-DEEP", to gain
    ! init checks on both args, and in the case where both are uninitialized,
    ! to distinguish equality based on uninitialized type (uncreated,
    ! deleted).

    ! check inputs
    init1 = ESMF_HConfigGetInit(HConfig1)
    init2 = ESMF_HConfigGetInit(HConfig2)

    ! initialize return value
    ESMF_HConfigEQ = .false.

    ! TODO: this line must remain split in two for SunOS f90 8.3 127000-03
    if (init1 .eq. ESMF_INIT_CREATED .and. &
      init2 .eq. ESMF_INIT_CREATED) then

       ! Call into the C++ interface to determine equality
       call c_ESMC_HConfigEqual(HConfig1, HConfig2, isEqual)

       ! Translate from ESMF logical to Fortran logical
       ESMF_HConfigEQ = isEqual

    endif

  end function ESMF_HConfigEQ