mirror of
https://github.com/JHUAPL/kaiju.git
synced 2026-01-09 15:17:56 -05:00
Removing IChelper file, and making pfunit optional
This commit is contained in:
@@ -4,8 +4,10 @@ project(Kaiju Fortran)
|
||||
|
||||
# add and search for pfunit
|
||||
list(APPEND CMAKE_PREFIX_PATH "./external")
|
||||
find_package(PFUNIT REQUIRED)
|
||||
enable_testing()
|
||||
find_package(PFUNIT)
|
||||
if(PFUNIT_FOUND)
|
||||
enable_testing()
|
||||
endif()
|
||||
|
||||
#Set hostname & configuration defaults before going to compilers.cmake
|
||||
cmake_host_system_information(RESULT HOST QUERY HOSTNAME)
|
||||
@@ -119,10 +121,12 @@ add_executable(kaiju.x src/drivers/kaijux.F90)
|
||||
target_link_libraries(kaiju.x baselib gamlib remixlib voltlib)
|
||||
add_dependencies(voltron kaiju.x remixlib gamlib baselib)
|
||||
|
||||
#-------------
|
||||
#Kaiju: tests
|
||||
message("Adding tests module ...")
|
||||
#Add source
|
||||
add_subdirectory(tests)
|
||||
add_dependencies(allTests baselib gamlib remixlib voltlib)
|
||||
if(PFUNIT_FOUND)
|
||||
#-------------
|
||||
#Kaiju: tests
|
||||
message("Adding tests module ...")
|
||||
#Add source
|
||||
add_subdirectory(tests)
|
||||
add_dependencies(allTests baselib gamlib remixlib voltlib)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
module ichelper
|
||||
|
||||
! contain helper functions to mask
|
||||
! the need for mpi comands in the
|
||||
! non-mpi compilations/runs
|
||||
|
||||
use gdefs
|
||||
use types
|
||||
implicit none
|
||||
|
||||
!VectorField_T
|
||||
!Generic vector field
|
||||
abstract interface
|
||||
subroutine reduced_T(Rio)
|
||||
Import :: rp
|
||||
real(rp), intent(inout) :: Rio(:,:)
|
||||
end subroutine reduced_T
|
||||
end interface
|
||||
|
||||
procedure(reduced_T), pointer :: reduced
|
||||
|
||||
abstract interface
|
||||
subroutine GlobalGrid_T(Model,lgrid,Grid)
|
||||
Import Model_T, Grid_T
|
||||
type(Model_T), intent(in) :: Model
|
||||
type(Grid_T), intent(in) :: lGrid
|
||||
type(Grid_T), intent(inout) :: Grid
|
||||
end subroutine GlobalGrid_T
|
||||
end interface
|
||||
|
||||
procedure(GlobalGrid_T), pointer :: GlobalGrid
|
||||
|
||||
contains
|
||||
|
||||
subroutine single_reduced(R)
|
||||
real(rp), intent(inout) :: R(:,:)
|
||||
|
||||
return
|
||||
end subroutine single_reduced
|
||||
|
||||
!For some inital conditions we need to know the global grid cordinates
|
||||
! But NO ALLOCATED ARRAYS!!!!!!!!!!!!!!!!!!!!!
|
||||
subroutine single_GlobalGrid(Model,lgrid,Grid)
|
||||
type(Model_T), intent(in) :: Model
|
||||
type(Grid_T), intent(in) :: lGrid
|
||||
type(Grid_T), intent(inout) :: Grid
|
||||
|
||||
!Derived quantities
|
||||
Grid%Ni = lGrid%Nip + 2*Model%nG
|
||||
Grid%Nj = lGrid%Njp + 2*Model%nG
|
||||
Grid%Nk = lGrid%Nkp + 2*Model%nG
|
||||
|
||||
Grid%Nip = lGrid%Nip
|
||||
Grid%Njp = lGrid%Njp
|
||||
Grid%Nkp = lGrid%Nkp
|
||||
|
||||
Grid%is = 1; Grid%ie = lGrid%Nip
|
||||
Grid%js = 1; Grid%je = lGrid%Njp
|
||||
Grid%ks = 1; Grid%ke = lGrid%Nkp
|
||||
|
||||
Grid%isg = Grid%is-Model%nG
|
||||
Grid%ieg = Grid%ie+Model%nG
|
||||
|
||||
Grid%jsg = Grid%js-Model%nG
|
||||
Grid%jeg = Grid%je+Model%nG
|
||||
|
||||
Grid%ksg = Grid%ks-Model%nG
|
||||
Grid%keg = Grid%ke+Model%nG
|
||||
end subroutine single_GlobalGrid
|
||||
|
||||
|
||||
|
||||
|
||||
subroutine initIChelper()
|
||||
|
||||
reduced => single_reduced
|
||||
GlobalGrid => single_GlobalGrid
|
||||
|
||||
end subroutine initIChelper
|
||||
|
||||
end module ichelper
|
||||
Reference in New Issue
Block a user