test_FieldPowR8 Subroutine

public subroutine test_FieldPowR8(this)

Arguments

Type IntentOptional Attributes Name
class(MpiTestMethod), intent(inout) :: this

Calls

proc~~test_fieldpowr8~~CallsGraph proc~test_fieldpowr8 test_FieldPowR8 assertequal assertequal proc~test_fieldpowr8->assertequal esmf_fieldget esmf_fieldget proc~test_fieldpowr8->esmf_fieldget proc~fieldpow FieldPow proc~test_fieldpowr8->proc~fieldpow proc~mapl_verify MAPL_Verify proc~test_fieldpowr8->proc~mapl_verify proc~fieldpow->esmf_fieldget proc~fieldpow->proc~mapl_verify interface~assign_fptr assign_fptr proc~fieldpow->interface~assign_fptr interface~fieldsareconformable FieldsAreConformable proc~fieldpow->interface~fieldsareconformable interface~getfieldsundef GetFieldsUndef proc~fieldpow->interface~getfieldsundef interface~mapl_assert MAPL_Assert proc~fieldpow->interface~mapl_assert proc~fieldshaveundef FieldsHaveUndef proc~fieldpow->proc~fieldshaveundef proc~mapl_return MAPL_Return proc~fieldpow->proc~mapl_return proc~mapl_throw_exception MAPL_throw_exception proc~mapl_verify->proc~mapl_throw_exception proc~fieldshaveundef->proc~mapl_verify proc~fieldshaveundef->proc~mapl_return ESMF_AttributeGet ESMF_AttributeGet proc~fieldshaveundef->ESMF_AttributeGet proc~mapl_return->proc~mapl_throw_exception at at proc~mapl_return->at insert insert proc~mapl_return->insert

Source Code

   subroutine test_FieldPowR8(this)
      class(MpiTestMethod), intent(inout) :: this
      type(ESMF_Field) :: x
      real(kind=ESMF_KIND_R8), pointer :: x_ptr(:,:)
      real(kind=ESMF_KIND_R8), allocatable :: result_array(:,:)
      integer :: status, rc
      real :: expo

      x = XR8
      call ESMF_FieldGet(x , farrayPtr = x_ptr, _RC)

      x_ptr = 2.d0
      expo = 4.0
      result_array = x_ptr
      result_array = 2.d0**expo
      call FieldPow(x, x, expo, _RC)
      @assertEqual(x_ptr, result_array)
   end subroutine test_FieldPowR8