Skip to content

Commit

Permalink
improve fctest_functions for fields
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrdar committed Nov 21, 2023
1 parent d89f092 commit 74b8326
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/tests/util/fctest_functions.F90
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,15 @@ end module fcta_functions_fxt
END_TEST

TEST( test_initialise_field )
type(atlas_Field) :: field
real(c_double), dimension(:,:), pointer :: fieldv
real(c_double), dimension(3) :: val
field = atlas_Field(kind=atlas_real(c_double), shape=[3,3])
call field%data(fieldv)
val = MDPI_sinusoid(fieldv(1,:), fieldv(2,:))
type(atlas_Field) :: field_xy, field_val
real(c_double), dimension(:,:), pointer :: field_xy_v
real(c_double), dimension(:), pointer :: field_val_v
field_xy = atlas_Field(kind=atlas_real(c_double), shape=[3,3])
field_val = atlas_Field(kind=atlas_real(c_double), shape=[3])
call field_xy%data(field_xy_v)
field_xy_v = 1._c_double
call field_val%data(field_val_v)
field_val_v = MDPI_sinusoid(field_xy_v(1,:), field_xy_v(2,:))
END_TEST

! -----------------------------------------------------------------------------
Expand Down

0 comments on commit 74b8326

Please sign in to comment.