test_FieldNegR4 Subroutine

public subroutine test_FieldNegR4(this)

Arguments

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

Calls

proc~~test_fieldnegr4~~CallsGraph proc~test_fieldnegr4 test_FieldNegR4 assertequal assertequal proc~test_fieldnegr4->assertequal esmf_fieldget esmf_fieldget proc~test_fieldnegr4->esmf_fieldget proc~fieldnegate FieldNegate proc~test_fieldnegr4->proc~fieldnegate proc~mapl_verify MAPL_Verify proc~test_fieldnegr4->proc~mapl_verify proc~fieldnegate->esmf_fieldget proc~fieldnegate->proc~mapl_verify interface~assign_fptr assign_fptr proc~fieldnegate->interface~assign_fptr interface~getfieldsundef GetFieldsUndef proc~fieldnegate->interface~getfieldsundef interface~mapl_assert MAPL_Assert proc~fieldnegate->interface~mapl_assert proc~fieldshaveundef FieldsHaveUndef proc~fieldnegate->proc~fieldshaveundef proc~mapl_return MAPL_Return proc~fieldnegate->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_FieldNegR4(this)
      class(MpiTestMethod), intent(inout) :: this
      type(ESMF_Field) :: x
      real(kind=ESMF_KIND_R4), pointer :: x_ptr(:,:)
      real(kind=ESMF_KIND_R4), allocatable :: result_array(:,:)
      integer :: status, rc

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

      x_ptr = 2.0
      result_array = x_ptr
      result_array = -2.0
      call FieldNegate(x, _RC)
      @assertEqual(x_ptr, result_array)
   end subroutine test_FieldNegR4