test_FieldSCAL_R8 Subroutine

public subroutine test_FieldSCAL_R8()

Arguments

None

Calls

proc~~test_fieldscal_r8~~CallsGraph proc~test_fieldscal_r8 Test_FieldBLAS::test_FieldSCAL_R8 assertequal assertequal proc~test_fieldscal_r8->assertequal esmf_fieldget esmf_fieldget proc~test_fieldscal_r8->esmf_fieldget interface~fieldscal mapl_FieldBLAS::FieldSCAL proc~test_fieldscal_r8->interface~fieldscal proc~mapl_verify MAPL_ErrorHandlingMod::MAPL_Verify proc~test_fieldscal_r8->proc~mapl_verify proc~mapl_throw_exception MAPL_ThrowMod::MAPL_throw_exception proc~mapl_verify->proc~mapl_throw_exception

Source Code

   subroutine test_FieldSCAL_R8()
      real(kind=ESMF_KIND_R8), parameter :: a = 2.0
      type(ESMF_Field) :: x
      real(kind=ESMF_KIND_R8), dimension(:,:), allocatable :: x_array
      real(kind=ESMF_KIND_R8), dimension(:,:), pointer :: x_ptr
      integer :: status, rc

      x = XR8
      call ESMF_FieldGet(x, farrayPtr = x_ptr, _RC)
      x_array = x_ptr
      call FieldSCAL(a, x, _RC)
      call ESMF_FieldGet(x, farrayPtr = x_ptr, _RC)
      @assertEqual(x_ptr, a*x_array)

   end subroutine test_FieldSCAL_R8