Skip to content

Commit

Permalink
Merge branch 'development' into Terrain_Turbines
Browse files Browse the repository at this point in the history
  • Loading branch information
AMLattanzi authored Dec 17, 2024
2 parents 8c5ae98 + 4643d91 commit bd67bf0
Showing 1 changed file with 64 additions and 95 deletions.
159 changes: 64 additions & 95 deletions Tests/CTestList.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ macro(setup_test)
endmacro(setup_test)

# Standard regression test
function(add_test_r TEST_NAME TEST_EXE PLTFILE)
function(add_test_r TEST_NAME TEST_DIR TEST_EXE PLTFILE)
set(options )
set(oneValueArgs "INPUT_SOUNDING" "RUNTIME_OPTIONS")
set(multiValueArgs )
Expand All @@ -42,7 +42,12 @@ function(add_test_r TEST_NAME TEST_EXE PLTFILE)
string(APPEND RUNTIME_OPTIONS "erf.input_sounding_file=${CURRENT_TEST_BINARY_DIR}/${ADD_TEST_R_INPUT_SOUNDING}")
endif()

set(TEST_EXE ${CMAKE_BINARY_DIR}/Exec/${TEST_EXE})
if(WIN32)
set(TEST_EXE "${CMAKE_BINARY_DIR}/Exec/${TEST_DIR}/*/${TEST_EXE}.exe")
else()
set(TEST_EXE "${CMAKE_BINARY_DIR}/Exec/${TEST_DIR}/${TEST_EXE}")
endif()

set(FCOMPARE_TOLERANCE "-r ${ERF_TEST_FCOMPARE_RTOL} --abs_tol ${ERF_TEST_FCOMPARE_ATOL}")
set(FCOMPARE_FLAGS "--abort_if_not_all_found -a ${FCOMPARE_TOLERANCE}")
set(test_command sh -c "${MPI_COMMANDS} ${TEST_EXE} ${CURRENT_TEST_BINARY_DIR}/${TEST_NAME}.i ${RUNTIME_OPTIONS} > ${TEST_NAME}.log && ${MPI_FCOMP_COMMANDS} ${FCOMPARE_EXE} ${FCOMPARE_FLAGS} ${PLOT_GOLD} ${CURRENT_TEST_BINARY_DIR}/${PLTFILE}")
Expand All @@ -59,10 +64,14 @@ function(add_test_r TEST_NAME TEST_EXE PLTFILE)
endfunction(add_test_r)

# Debug regression test with lower tolerance
function(add_test_d TEST_NAME TEST_EXE PLTFILE)
function(add_test_d TEST_NAME TEST_DIR TEST_EXE PLTFILE)
setup_test()

set(TEST_EXE ${CMAKE_BINARY_DIR}/Exec/${TEST_EXE})
if(WIN32)
set(TEST_EXE "${CMAKE_BINARY_DIR}/Exec/${TEST_DIR}/*/${TEST_EXE}.exe")
else()
set(TEST_EXE "${CMAKE_BINARY_DIR}/Exec/${TEST_DIR}/${TEST_EXE}")
endif()
set(FCOMPARE_TOLERANCE "-r 3.0e-9 --abs_tol 3.0e-9")
set(FCOMPARE_FLAGS "--abort_if_not_all_found -a ${FCOMPARE_TOLERANCE}")
set(test_command sh -c "${MPI_COMMANDS} ${TEST_EXE} ${CURRENT_TEST_BINARY_DIR}/${TEST_NAME}.i > ${TEST_NAME}.log && ${MPI_FCOMP_COMMANDS} ${FCOMPARE_EXE} ${FCOMPARE_FLAGS} ${PLOT_GOLD} ${CURRENT_TEST_BINARY_DIR}/${PLTFILE}")
Expand All @@ -79,10 +88,14 @@ function(add_test_d TEST_NAME TEST_EXE PLTFILE)
endfunction(add_test_d)

# Stationary test -- compare with time 0
function(add_test_0 TEST_NAME TEST_EXE PLTFILE)
function(add_test_0 TEST_NAME TEST_DIR TEST_EXE PLTFILE)
setup_test()

set(TEST_EXE ${CMAKE_BINARY_DIR}/Exec/${TEST_EXE})
if(WIN32)
set(TEST_EXE "${CMAKE_BINARY_DIR}/Exec/${TEST_DIR}/*/${TEST_EXE}.exe")
else()
set(TEST_EXE "${CMAKE_BINARY_DIR}/Exec/${TEST_DIR}/${TEST_EXE}")
endif()
set(FCOMPARE_TOLERANCE "-r 1e-14 --abs_tol 1.0e-14")
set(FCOMPARE_FLAGS "-a ${FCOMPARE_TOLERANCE}")
set(test_command sh -c "${MPI_COMMANDS} ${TEST_EXE} ${CURRENT_TEST_BINARY_DIR}/${TEST_NAME}.i erf.input_sounding_file=${CURRENT_TEST_BINARY_DIR}/input_sounding > ${TEST_NAME}.log && ${MPI_FCOMP_COMMANDS} ${FCOMPARE_EXE} ${FCOMPARE_FLAGS} ${CURRENT_TEST_BINARY_DIR}/plt00000 ${CURRENT_TEST_BINARY_DIR}/${PLTFILE}")
Expand All @@ -101,95 +114,51 @@ endfunction(add_test_0)
#=============================================================================
# Regression tests
#=============================================================================
if(WIN32)
add_test_r(CouetteFlow_x "DryRegTests/Couette_Poiseuille/*/erf_couette_poiseuille.exe" "plt00050")
add_test_r(CouetteFlow_y "DryRegTests/Couette_Poiseuille/*/erf_couette_poiseuille.exe" "plt00050")
add_test_r(DensityCurrent "DryRegTests/DensityCurrent/*/erf_density_current.exe" "plt00010")
add_test_r(DensityCurrent_anelastic "DryRegTests/DensityCurrent/*/erf_density_current.exe" "plt00010")
add_test_r(DensityCurrent_detJ2 "DryRegTests/DensityCurrent/*/erf_density_current.exe" "plt00010")
add_test_r(DensityCurrent_detJ2_nosub "DryRegTests/DensityCurrent/*/erf_density_current.exe" "plt00020")
add_test_r(DensityCurrent_detJ2_MT "DryRegTests/DensityCurrent/*/erf_density_current.exe" "plt00010")
add_test_r(EkmanSpiral "DryRegTests/EkmanSpiral/*/erf_ekman_spiral.exe" "plt00010")
add_test_r(IsentropicVortexStationary "DryRegTests/IsentropicVortex/*/erf_isentropic_vortex.exe" "plt00010")
add_test_r(IsentropicVortexAdvecting "DryRegTests/IsentropicVortex/*/erf_isentropic_vortex.exe" "plt00010")
add_test_r(IVA_NumDiff "DryRegTests/IsentropicVortex/*/erf_isentropic_vortex.exe" "plt00010")
add_test_r(MovingTerrain_nosub "DevTests/MovingTerrain/*/erf_moving_terrain.exe" "plt00020")
add_test_r(MovingTerrain_sub "DevTests/MovingTerrain/*/erf_moving_terrain.exe" "plt00010")
add_test_r(PoiseuilleFlow_x "DryRegTests/Couette_Poiseuille/*/erf_couette_poiseuille.exe" "plt00010")
add_test_r(PoiseuilleFlow_y "DryRegTests/Couette_Poiseuille/*/erf_couette_poiseuille.exe" "plt00010")
add_test_r(RayleighDamping "DryRegTests/ScalarAdvDiff/*/erf_scalar_advdiff.exe" "plt00100")
add_test_r(ScalarAdvectionUniformU "DryRegTests/ScalarAdvDiff/*/erf_scalar_advdiff.exe" "plt00020")
add_test_r(ScalarAdvectionShearedU "DryRegTests/ScalarAdvDiff/*/erf_scalar_advdiff.exe" "plt00080")
add_test_r(ScalarAdvDiff_order2 "DryRegTests/ScalarAdvDiff/*/erf_scalar_advdiff.exe" "plt00020")
add_test_r(ScalarAdvDiff_order3 "DryRegTests/ScalarAdvDiff/*/erf_scalar_advdiff.exe" "plt00020")
add_test_r(ScalarAdvDiff_order4 "DryRegTests/ScalarAdvDiff/*/erf_scalar_advdiff.exe" "plt00020")
add_test_r(ScalarAdvDiff_order5 "DryRegTests/ScalarAdvDiff/*/erf_scalar_advdiff.exe" "plt00020")
add_test_r(ScalarAdvDiff_order6 "DryRegTests/ScalarAdvDiff/*/erf_scalar_advdiff.exe" "plt00020")
add_test_r(ScalarAdvDiff_weno3 "DryRegTests/ScalarAdvDiff/*/erf_scalar_advdiff.exe" "plt00020")
add_test_d(ScalarAdvDiff_weno3z "DryRegTests/ScalarAdvDiff/*/erf_scalar_advdiff.exe" "plt00020")
add_test_r(ScalarAdvDiff_weno5 "DryRegTests/ScalarAdvDiff/*/erf_scalar_advdiff.exe" "plt00020")
add_test_d(ScalarAdvDiff_weno5z "DryRegTests/ScalarAdvDiff/*/erf_scalar_advdiff.exe" "plt00020")
add_test_r(ScalarAdvDiff_wenomzq3 "DryRegTests/ScalarAdvDiff/*/erf_scalar_advdiff.exe" "plt00020")
add_test_r(ScalarDiffusionGaussian "DryRegTests/ScalarAdvDiff/*/erf_scalar_advdiff.exe" "plt00020")
add_test_r(ScalarDiffusionSine "DryRegTests/ScalarAdvDiff/*/erf_scalar_advdiff.exe" "plt00020")
add_test_r(TaylorGreenAdvecting "DryRegTests/TaylorGreenVortex/*/erf_taylor_green.exe" "plt00010")
add_test_r(TaylorGreenAdvectingDiffusing "DryRegTests/TaylorGreenVortex/*/erf_taylor_green.exe" "plt00010")
add_test_r(MSF_NoSub_IsentropicVortexAdv "DryRegTests/IsentropicVortex/*/erf_isentropic_vortex.exe" "plt00010")
add_test_r(MSF_Sub_IsentropicVortexAdv "DryRegTests/IsentropicVortex/*/erf_isentropic_vortex.exe" "plt00010")
add_test_r(ABL_MOST "ABL/*/erf_abl.exe" "plt00010")
add_test_r(ABL_MYNN_PBL "ABL/*/erf_abl.exe" "plt00100" INPUT_SOUNDING "input_sounding_GABLS1")
add_test_r(ABL_InflowFile "ABL/*/erf_abl.exe" "plt00010")
add_test_r(MoistBubble "MoistRegTests/Bubble/*/erf_bubble.exe" "plt00010")
add_test_r(SquallLine_2D "MoistRegTests/SquallLine_2D/*/erf_squallline.exe" "plt00010")
add_test_r(SuperCell_3D "MoistRegTests/SuperCell_3D/*/erf_supercell.exe" "plt00010")

add_test_0(Deardorff_stationary "ABL/*/erf_abl.exe" "plt00010")

else()
add_test_r(CouetteFlow_x "DryRegTests/Couette_Poiseuille/erf_couette_poiseuille" "plt00050")
add_test_r(CouetteFlow_y "DryRegTests/Couette_Poiseuille/erf_couette_poiseuille" "plt00050")
add_test_r(DensityCurrent "DryRegTests/DensityCurrent/erf_density_current" "plt00010")
add_test_r(DensityCurrent_anelastic "DryRegTests/DensityCurrent/erf_density_current" "plt00010")
add_test_r(DensityCurrent_detJ2 "DryRegTests/DensityCurrent/erf_density_current" "plt00010")
add_test_r(DensityCurrent_detJ2_nosub "DryRegTests/DensityCurrent/erf_density_current" "plt00020")
add_test_r(DensityCurrent_detJ2_MT "DryRegTests/DensityCurrent/erf_density_current" "plt00010")
add_test_r(EkmanSpiral "DryRegTests/EkmanSpiral/erf_ekman_spiral" "plt00010")
add_test_r(IsentropicVortexStationary "DryRegTests/IsentropicVortex/erf_isentropic_vortex" "plt00010")
add_test_r(IsentropicVortexAdvecting "DryRegTests/IsentropicVortex/erf_isentropic_vortex" "plt00010")
add_test_r(IVA_NumDiff "DryRegTests/IsentropicVortex/erf_isentropic_vortex" "plt00010")
add_test_r(MovingTerrain_nosub "DevTests/MovingTerrain/erf_moving_terrain" "plt00020")
add_test_r(MovingTerrain_sub "DevTests/MovingTerrain/erf_moving_terrain" "plt00010")
add_test_r(PoiseuilleFlow_x "DryRegTests/Couette_Poiseuille/erf_couette_poiseuille" "plt00010")
add_test_r(PoiseuilleFlow_y "DryRegTests/Couette_Poiseuille/erf_couette_poiseuille" "plt00010")
add_test_r(RayleighDamping "DryRegTests/ScalarAdvDiff/erf_scalar_advdiff" "plt00100")
add_test_r(ScalarAdvectionUniformU "DryRegTests/ScalarAdvDiff/erf_scalar_advdiff" "plt00020")
add_test_r(ScalarAdvectionShearedU "DryRegTests/ScalarAdvDiff/erf_scalar_advdiff" "plt00080")
add_test_r(ScalarAdvDiff_order2 "DryRegTests/ScalarAdvDiff/erf_scalar_advdiff" "plt00020")
add_test_r(ScalarAdvDiff_order3 "DryRegTests/ScalarAdvDiff/erf_scalar_advdiff" "plt00020")
add_test_r(ScalarAdvDiff_order4 "DryRegTests/ScalarAdvDiff/erf_scalar_advdiff" "plt00020")
add_test_r(ScalarAdvDiff_order5 "DryRegTests/ScalarAdvDiff/erf_scalar_advdiff" "plt00020")
add_test_r(ScalarAdvDiff_order6 "DryRegTests/ScalarAdvDiff/erf_scalar_advdiff" "plt00020")
add_test_r(ScalarAdvDiff_weno3 "DryRegTests/ScalarAdvDiff/erf_scalar_advdiff" "plt00020")
add_test_d(ScalarAdvDiff_weno3z "DryRegTests/ScalarAdvDiff/erf_scalar_advdiff" "plt00020")
add_test_r(ScalarAdvDiff_weno5 "DryRegTests/ScalarAdvDiff/erf_scalar_advdiff" "plt00020")
add_test_d(ScalarAdvDiff_weno5z "DryRegTests/ScalarAdvDiff/erf_scalar_advdiff" "plt00020")
add_test_r(ScalarAdvDiff_wenomzq3 "DryRegTests/ScalarAdvDiff/erf_scalar_advdiff" "plt00020")
add_test_r(ScalarDiffusionGaussian "DryRegTests/ScalarAdvDiff/erf_scalar_advdiff" "plt00020")
add_test_r(ScalarDiffusionSine "DryRegTests/ScalarAdvDiff/erf_scalar_advdiff" "plt00020")
add_test_r(TaylorGreenAdvecting "DryRegTests/TaylorGreenVortex/erf_taylor_green" "plt00010")
add_test_r(TaylorGreenAdvectingDiffusing "DryRegTests/TaylorGreenVortex/erf_taylor_green" "plt00010")
add_test_r(MSF_NoSub_IsentropicVortexAdv "DryRegTests/IsentropicVortex/erf_isentropic_vortex" "plt00010")
add_test_r(MSF_Sub_IsentropicVortexAdv "DryRegTests/IsentropicVortex/erf_isentropic_vortex" "plt00010")
add_test_r(ABL_MOST "ABL/erf_abl" "plt00010")
add_test_r(ABL_MYNN_PBL "ABL/erf_abl" "plt00100" INPUT_SOUNDING "input_sounding_GABLS1")
add_test_r(ABL_InflowFile "ABL/erf_abl" "plt00010")
add_test_r(MoistBubble "MoistRegTests/Bubble/erf_bubble" "plt00010")
add_test_r(SquallLine_2D "MoistRegTests/SquallLine_2D/erf_squallline" "plt00010")
add_test_r(SuperCell_3D "MoistRegTests/SuperCell_3D/erf_supercell" "plt00010")

add_test_0(InitSoundingIdeal_stationary "ABL/erf_abl" "plt00010")
add_test_0(Deardorff_stationary "ABL/erf_abl" "plt00010")
endif()

add_test_r(CouetteFlow_x "DryRegTests/Couette_Poiseuille" "erf_couette_poiseuille" "plt00050")
add_test_r(CouetteFlow_y "DryRegTests/Couette_Poiseuille" "erf_couette_poiseuille" "plt00050")
add_test_r(DensityCurrent "DryRegTests/DensityCurrent" "erf_density_current" "plt00010")
add_test_r(DensityCurrent_anelastic "DryRegTests/DensityCurrent" "erf_density_current" "plt00010")
add_test_r(DensityCurrent_detJ2 "DryRegTests/DensityCurrent" "erf_density_current" "plt00010")
add_test_r(DensityCurrent_detJ2_nosub "DryRegTests/DensityCurrent" "erf_density_current" "plt00020")
add_test_r(DensityCurrent_detJ2_MT "DryRegTests/DensityCurrent" "erf_density_current" "plt00010")
add_test_r(EkmanSpiral "DryRegTests/EkmanSpiral" "erf_ekman_spiral" "plt00010")
add_test_r(IsentropicVortexStationary "DryRegTests/IsentropicVortex" "erf_isentropic_vortex" "plt00010")
add_test_r(IsentropicVortexAdvecting "DryRegTests/IsentropicVortex" "erf_isentropic_vortex" "plt00010")
add_test_r(IVA_NumDiff "DryRegTests/IsentropicVortex" "erf_isentropic_vortex" "plt00010")
add_test_r(MovingTerrain_nosub "DevTests/MovingTerrain" "erf_moving_terrain" "plt00020")
add_test_r(MovingTerrain_sub "DevTests/MovingTerrain" "erf_moving_terrain" "plt00010")
add_test_r(PoiseuilleFlow_x "DryRegTests/Couette_Poiseuille" "erf_couette_poiseuille" "plt00010")
add_test_r(PoiseuilleFlow_y "DryRegTests/Couette_Poiseuille" "erf_couette_poiseuille" "plt00010")
add_test_r(RayleighDamping "DryRegTests/ScalarAdvDiff" "erf_scalar_advdiff" "plt00100")
add_test_r(ScalarAdvectionUniformU "DryRegTests/ScalarAdvDiff" "erf_scalar_advdiff" "plt00020")
add_test_r(ScalarAdvectionShearedU "DryRegTests/ScalarAdvDiff" "erf_scalar_advdiff" "plt00080")
add_test_r(ScalarAdvDiff_order2 "DryRegTests/ScalarAdvDiff" "erf_scalar_advdiff" "plt00020")
add_test_r(ScalarAdvDiff_order3 "DryRegTests/ScalarAdvDiff" "erf_scalar_advdiff" "plt00020")
add_test_r(ScalarAdvDiff_order4 "DryRegTests/ScalarAdvDiff" "erf_scalar_advdiff" "plt00020")
add_test_r(ScalarAdvDiff_order5 "DryRegTests/ScalarAdvDiff" "erf_scalar_advdiff" "plt00020")
add_test_r(ScalarAdvDiff_order6 "DryRegTests/ScalarAdvDiff" "erf_scalar_advdiff" "plt00020")
add_test_r(ScalarAdvDiff_weno3 "DryRegTests/ScalarAdvDiff" "erf_scalar_advdiff" "plt00020")
add_test_d(ScalarAdvDiff_weno3z "DryRegTests/ScalarAdvDiff" "erf_scalar_advdiff" "plt00020")
add_test_r(ScalarAdvDiff_weno5 "DryRegTests/ScalarAdvDiff" "erf_scalar_advdiff" "plt00020")
add_test_d(ScalarAdvDiff_weno5z "DryRegTests/ScalarAdvDiff" "erf_scalar_advdiff" "plt00020")
add_test_r(ScalarAdvDiff_wenomzq3 "DryRegTests/ScalarAdvDiff" "erf_scalar_advdiff" "plt00020")
add_test_r(ScalarDiffusionGaussian "DryRegTests/ScalarAdvDiff" "erf_scalar_advdiff" "plt00020")
add_test_r(ScalarDiffusionSine "DryRegTests/ScalarAdvDiff" "erf_scalar_advdiff" "plt00020")
add_test_r(TaylorGreenAdvecting "DryRegTests/TaylorGreenVortex" "erf_taylor_green" "plt00010")
add_test_r(TaylorGreenAdvectingDiffusing "DryRegTests/TaylorGreenVortex" "erf_taylor_green" "plt00010")
add_test_r(MSF_NoSub_IsentropicVortexAdv "DryRegTests/IsentropicVortex" "erf_isentropic_vortex" "plt00010")
add_test_r(MSF_Sub_IsentropicVortexAdv "DryRegTests/IsentropicVortex" "erf_isentropic_vortex" "plt00010")
add_test_r(ABL_MOST "ABL" "erf_abl" "plt00010")
add_test_r(ABL_MYNN_PBL "ABL" "erf_abl" "plt00100" INPUT_SOUNDING "input_sounding_GABLS1")
add_test_r(ABL_InflowFile "ABL" "erf_abl" "plt00010")
add_test_r(MoistBubble "MoistRegTests/Bubble" "erf_bubble" "plt00010")
add_test_r(SquallLine_2D "MoistRegTests/SquallLine_2D" "erf_squallline" "plt00010")
add_test_r(SuperCell_3D "MoistRegTests/SuperCell_3D" "erf_supercell" "plt00010")

add_test_0(InitSoundingIdeal_stationary "ABL" "erf_abl" "plt00010")
add_test_0(Deardorff_stationary "ABL" "erf_abl" "plt00010")

#=============================================================================
# Performance tests
#=============================================================================

0 comments on commit bd67bf0

Please sign in to comment.