f_esmf_compgetvm Subroutine

recursive subroutine f_esmf_compgetvm(comp, vm, rc)

Arguments

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

Source Code

recursive subroutine f_esmf_compgetvm(comp, vm, 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
  integer          :: rc
  
  type(ESMF_VM)      :: local_vm
  type(ESMF_Pointer) :: this

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

  call ESMF_CompGet(compp=comp%compp, vm=local_vm, rc=rc)

  call ESMF_VMGetThis(local_vm, this, rc=rc)  ! Get C++ address
  call ESMF_VMSetThis(vm, this, rc=rc)        ! Set C++ address
end subroutine f_esmf_compgetvm