ESMF_XGridGetFrac2IntMesh Subroutine

private subroutine ESMF_XGridGetFrac2IntMesh(Mesh, Array, meshloc, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_Mesh), intent(inout) :: Mesh
type(ESMF_Array), intent(inout) :: Array
type(ESMF_MeshLoc), intent(in) :: meshloc
integer, intent(out), optional :: rc

Calls

proc~~esmf_xgridgetfrac2intmesh~~CallsGraph proc~esmf_xgridgetfrac2intmesh ESMF_XGridGetFrac2IntMesh esmf_arrayget esmf_arrayget proc~esmf_xgridgetfrac2intmesh->esmf_arrayget proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_xgridgetfrac2intmesh->proc~esmf_logfounderror proc~esmf_logseterror ESMF_LogSetError proc~esmf_xgridgetfrac2intmesh->proc~esmf_logseterror proc~esmf_meshget ESMF_MeshGet proc~esmf_xgridgetfrac2intmesh->proc~esmf_meshget proc~esmf_meshgetelemfrac2 ESMF_MeshGetElemFrac2 proc~esmf_xgridgetfrac2intmesh->proc~esmf_meshgetelemfrac2

Called by

proc~~esmf_xgridgetfrac2intmesh~~CalledByGraph proc~esmf_xgridgetfrac2intmesh ESMF_XGridGetFrac2IntMesh interface~esmf_xgridgetfrac2int ESMF_XGridGetFrac2Int interface~esmf_xgridgetfrac2int->proc~esmf_xgridgetfrac2intmesh proc~esmf_xgridcreate ESMF_XGridCreate proc~esmf_xgridcreate->interface~esmf_xgridgetfrac2int proc~f_esmf_xgridcreate f_esmf_xgridcreate proc~f_esmf_xgridcreate->proc~esmf_xgridcreate proc~test2d_masking_single test2d_masking_single proc~test2d_masking_single->proc~esmf_xgridcreate proc~test3d_masking_global test3d_masking_global proc~test3d_masking_global->proc~esmf_xgridcreate proc~test3d_masking_regional test3d_masking_regional proc~test3d_masking_regional->proc~esmf_xgridcreate proc~test4 test4 proc~test4->proc~esmf_xgridcreate proc~test5 test5 proc~test5->proc~esmf_xgridcreate proc~test6 test6 proc~test6->proc~esmf_xgridcreate proc~test7 test7 proc~test7->proc~esmf_xgridcreate proc~test8 test8 proc~test8->proc~esmf_xgridcreate proc~test_cart_bilinear_xgrid test_cart_bilinear_xgrid proc~test_cart_bilinear_xgrid->proc~esmf_xgridcreate proc~test_cartmeshtomesh_2nd test_CartMeshToMesh_2nd proc~test_cartmeshtomesh_2nd->proc~esmf_xgridcreate proc~test_csgridtogrid_2nd test_CSGridToGrid_2nd proc~test_csgridtogrid_2nd->proc~esmf_xgridcreate proc~test_meshtomesh_2nd test_MeshToMesh_2nd proc~test_meshtomesh_2nd->proc~esmf_xgridcreate proc~test_regrid2xg_online test_regrid2xg_online proc~test_regrid2xg_online->proc~esmf_xgridcreate proc~test_regrid2xgsph~2 test_regrid2xgSph proc~test_regrid2xgsph~2->proc~esmf_xgridcreate proc~test_side_and_elem_info test_side_and_elem_info proc~test_side_and_elem_info->proc~esmf_xgridcreate proc~test_sph_bilinear_xgrid test_sph_bilinear_xgrid proc~test_sph_bilinear_xgrid->proc~esmf_xgridcreate proc~test_xgrid_w_ngon_mesh test_xgrid_w_ngon_mesh proc~test_xgrid_w_ngon_mesh->proc~esmf_xgridcreate proc~user_init~7 user_init proc~user_init~7->proc~esmf_xgridcreate proc~user_init~9 user_init proc~user_init~9->proc~esmf_xgridcreate program~esmf_xgridex ESMF_XGridEx program~esmf_xgridex->proc~esmf_xgridcreate program~esmf_xgridutest ESMF_XGridUTest program~esmf_xgridutest->proc~esmf_xgridcreate program~esmf_xgridutest->proc~test4 program~esmf_xgridutest->proc~test5 program~esmf_xgridutest->proc~test6 program~esmf_xgridutest->proc~test7 program~esmf_xgridutest->proc~test8 program~esmf_xgridutest->proc~test_cartmeshtomesh_2nd program~esmf_xgridutest->proc~test_csgridtogrid_2nd program~esmf_xgridutest->proc~test_meshtomesh_2nd program~esmf_xgridutest->proc~test_side_and_elem_info program~esmf_xgridutest->proc~test_xgrid_w_ngon_mesh program~esmf_xgridmaskingutest ESMF_XGridMaskingUTest program~esmf_xgridmaskingutest->proc~test2d_masking_single program~esmf_xgridmaskingutest->proc~test3d_masking_global program~esmf_xgridmaskingutest->proc~test3d_masking_regional

Source Code

      subroutine ESMF_XGridGetFrac2IntMesh(Mesh, Array, meshloc, rc)
!
! !ARGUMENTS:
      type(ESMF_Mesh), intent(inout)         :: Mesh
      type(ESMF_Array), intent(inout)        :: Array
      type(ESMF_MeshLoc), intent(in)         :: meshloc
      integer, intent(out), optional         :: rc
!
! !DESCRIPTION:
!     The arguments are:
!     \begin{description}
!     \item[Mesh]
!          The mesh.
!     \item[Array]
!          The grid array.
!     \item[{rc}]
!          Return code.
!     \end{description}
!EOPI
       integer                     :: localrc
       real(ESMF_KIND_R8), pointer :: frac(:)
       logical                     :: isMemFreed
       integer                     :: localDeCount, i

       ! Logic to determine if valid optional args are passed.  

       ! Initialize return code; assume failure until success is certain
       localrc = ESMF_RC_NOT_IMPL
       if (present(rc)) rc = ESMF_RC_NOT_IMPL

       ! Make sure the srcMesh has its internal bits in place
       call ESMF_MeshGet(Mesh, isMemFreed=isMemFreed, rc=localrc)
       if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
         ESMF_CONTEXT, rcToReturn=rc)) return

       if (isMemFreed)  then
           call ESMF_LogSetError(rcToCheck=ESMF_RC_OBJ_WRONG, & 
                 msg="- Mesh has had its coordinate and connectivity info freed", & 
                 ESMF_CONTEXT, rcToReturn=rc) 
          return 
       endif

       call ESMF_ArrayGet(Array, localDECount=localDeCount, rc=localrc)
       if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
         ESMF_CONTEXT, rcToReturn=rc)) return

       do i = 0, localDeCount-1
         call ESMF_ArrayGet(Array, localDe=i, farrayPtr=frac, rc=localrc)
         if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
           ESMF_CONTEXT, rcToReturn=rc)) return

         ! Call through to the C++ object that does the work
         call ESMF_MeshGetElemFrac2(Mesh, frac, rc=localrc)
         if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
           ESMF_CONTEXT, rcToReturn=rc)) return
       enddo

      rc = ESMF_SUCCESS

      end subroutine ESMF_XGridGetFrac2IntMesh