f_esmf_compgetvmparent Subroutine

recursive subroutine f_esmf_compgetvmparent(comp, vm_parent, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_CWrap) :: comp
type(ESMF_VM) :: vm_parent
integer :: rc

Source Code

recursive subroutine f_esmf_compgetvmparent(comp, vm_parent, rc)
  use ESMF_UtilTypesMod      ! ESMF utility types
  use ESMF_BaseMod           ! ESMF base class
  use ESMF_CompMod
  use ESMF_VMMod
  use ESMF_InitMacrosMod
  
  implicit none

  type(ESMF_CWrap) :: comp
  type(ESMF_VM)    :: vm_parent
  integer          :: rc
  
  type(ESMF_VM)      :: local_vm_parent
  type(ESMF_Pointer) :: this

  ! Initialize return code; assume routine not implemented
  rc = ESMF_RC_NOT_IMPL

  call ESMF_CompGet(compp=comp%compp, vm_parent=local_vm_parent, rc=rc)

  call ESMF_VMGetThis(local_vm_parent, this, rc=rc)  ! Get C++ address
  call ESMF_VMSetThis(vm_parent, this, rc=rc)        ! Set C++ address
end subroutine f_esmf_compgetvmparent