test_FieldSinR4 Subroutine

public subroutine test_FieldSinR4(this)

Arguments

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

Calls

proc~~test_fieldsinr4~~CallsGraph proc~test_fieldsinr4 test_FieldSinR4 assertequal assertequal proc~test_fieldsinr4->assertequal esmf_fieldget esmf_fieldget proc~test_fieldsinr4->esmf_fieldget proc~fieldsin fieldSin proc~test_fieldsinr4->proc~fieldsin proc~mapl_verify MAPL_Verify proc~test_fieldsinr4->proc~mapl_verify proc~fieldsin->esmf_fieldget proc~fieldsin->proc~mapl_verify interface~assign_fptr assign_fptr proc~fieldsin->interface~assign_fptr interface~fieldsareconformable FieldsAreConformable proc~fieldsin->interface~fieldsareconformable interface~getfieldsundef GetFieldsUndef proc~fieldsin->interface~getfieldsundef interface~mapl_assert MAPL_Assert proc~fieldsin->interface~mapl_assert proc~fieldshaveundef FieldsHaveUndef proc~fieldsin->proc~fieldshaveundef proc~mapl_return MAPL_Return proc~fieldsin->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_FieldSinR4(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 = sin(2.0)
      call FieldSin(x, x, _RC)
      @assertEqual(x_ptr, result_array)
   end subroutine test_FieldSinR4