test_FieldGetLocalElementCount Subroutine

public subroutine test_FieldGetLocalElementCount()

Arguments

None

Calls

proc~~test_fieldgetlocalelementcount~~CallsGraph proc~test_fieldgetlocalelementcount Test_FieldBLAS::test_FieldGetLocalElementCount assertequal assertequal proc~test_fieldgetlocalelementcount->assertequal esmf_fieldget esmf_fieldget proc~test_fieldgetlocalelementcount->esmf_fieldget interface~fieldgetlocalelementcount MAPL_FieldPointerUtilities::FieldGetLocalElementCount proc~test_fieldgetlocalelementcount->interface~fieldgetlocalelementcount proc~mapl_verify MAPL_ErrorHandlingMod::MAPL_Verify proc~test_fieldgetlocalelementcount->proc~mapl_verify proc~mapl_throw_exception MAPL_ThrowMod::MAPL_throw_exception proc~mapl_verify->proc~mapl_throw_exception

Source Code

   subroutine test_FieldGetLocalElementCount()
      type(ESMF_Field) :: x
      integer :: rank
      integer, allocatable :: expected_count(:)
      integer, allocatable :: actual_count(:)
      integer :: status, rc

      x = XR4
      call ESMF_FieldGet(x, rank=rank, _RC)
      allocate(expected_count(rank))
      call ESMF_FieldGet(x, localElementCount=expected_count, _RC)
      actual_count = FieldGetLocalElementCount(x, _RC)
      @assertEqual(actual_count, expected_count)
      if(allocated(expected_count)) deallocate(expected_count)

   end subroutine test_FieldGetLocalElementCount