Skip to content

Commit

Permalink
moved advection test
Browse files Browse the repository at this point in the history
  • Loading branch information
Angelyr committed Jul 12, 2024
1 parent 64dd06e commit 6657923
Showing 1 changed file with 26 additions and 8 deletions.
34 changes: 26 additions & 8 deletions test/testFortranMPAdvection.f90
Original file line number Diff line number Diff line change
@@ -1,10 +1,35 @@
module advectionTesting
contains
include "calculateDisplacement.f90"
subroutine advectionTest(mpMesh, numPush, latVertex, lonVertex, nEdgesOnCell, verticesOnCell, nVertices, sphereRadius)
use :: polympo
use :: readMPAS
use :: iso_c_binding
implicit none

type(c_ptr) :: mpMesh
integer :: i, numPush, nVertices
real(kind=MPAS_RKIND), dimension(:), pointer :: latVertex, lonVertex
integer, dimension(:), pointer :: nEdgesOnCell
integer, dimension(:,:), pointer :: verticesOnCell
real(kind=MPAS_RKIND) :: sphereRadius


do i = 1, numPush
call calcSurfDispIncr(mpMesh, latVertex, lonVertex, nEdgesOnCell, verticesOnCell, nVertices, sphereRadius)
call polympo_push(mpMesh)
end do

end subroutine
end module
!---------------------------------------------------------------------------
!> todo add a discription
!---------------------------------------------------------------------------
program main
use :: polympo
use :: readMPAS
use :: iso_c_binding
use :: advectionTesting
implicit none
include 'mpif.h'

Expand Down Expand Up @@ -37,7 +62,6 @@ program main
call polympo_setMPICommunicator(mpi_comm_handle)
call polympo_initialize()
call polympo_enableTiming()
call polympo_setTimingVerbosity(1)

call polympo_checkPrecisionForRealKind(MPAS_RKIND)
argc = command_argument_count()
Expand Down Expand Up @@ -150,10 +174,7 @@ program main
call polympo_setMPRotLatLon(mpMesh,2,numMPs,c_loc(mpLatLon))
call polympo_setMPPositions(mpMesh,3,numMPs,c_loc(mpPosition))

do i = 1, numPush
call calcSurfDispIncr(mpMesh, latVertex, lonVertex, nEdgesOnCell, verticesOnCell, nVertices, sphereRadius)
call polympo_push(mpMesh)
end do
call advectionTest(mpMesh, numPush, latVertex, lonVertex, nEdgesOnCell, verticesOnCell, nVertices, sphereRadius)

call polympo_summarizeTime();

Expand All @@ -178,7 +199,4 @@ program main

stop

contains
include "calculateDisplacement.f90"

end program

0 comments on commit 6657923

Please sign in to comment.