diff --git a/Applications/CLI/CMakeLists.txt b/Applications/CLI/CMakeLists.txt index 25432ff0db8ec85be012f083a608fe4ae6a2d084..8324aba968de1d4b7f64607eff7f7aa339a23d7f 100644 --- a/Applications/CLI/CMakeLists.txt +++ b/Applications/CLI/CMakeLists.txt @@ -14,9 +14,7 @@ if(OGS_USE_PETSC) target_link_libraries(ogs ${PETSC_LIBRARIES}) endif() -if(NOT OGS_USE_MPI) - include(Tests.cmake) -endif() +include(Tests.cmake) #################### ### Installation ### diff --git a/Applications/CLI/Tests.cmake b/Applications/CLI/Tests.cmake index f061bbfd946a22e2211e2332d7c8a86719f67dff..bf22e51448eb36c6849ee91752f3394a1fec59a1 100644 --- a/Applications/CLI/Tests.cmake +++ b/Applications/CLI/Tests.cmake @@ -2,125 +2,167 @@ add_test(NAME ogs_no_args COMMAND ogs) set_tests_properties(ogs_no_args PROPERTIES WILL_FAIL TRUE) -# CUBE 1x1x1 GROUNDWATER FLOW TESTS -foreach(mesh_size 1e0 1e1 1e2 1e3) - AddTest( - NAME GroundWaterFlowProcess_cube_1x1x1_${mesh_size} - PATH Elliptic/cube_1x1x1_GroundWaterFlow - EXECUTABLE ogs - EXECUTABLE_ARGS cube_${mesh_size}.prj - WRAPPER time - TESTER vtkdiff - DIFF_DATA cube_${mesh_size}_pcs_0_ts_1.vtu Linear_1_to_minus1 Result - DATA cube_${mesh_size}.prj cube_1x1x1_hex_${mesh_size}.vtu cube_1x1x1.gml - ) +if(NOT OGS_USE_MPI) + # CUBE 1x1x1 GROUNDWATER FLOW TESTS + foreach(mesh_size 1e0 1e1 1e2 1e3) + AddTest( + NAME GroundWaterFlowProcess_cube_1x1x1_${mesh_size} + PATH Elliptic/cube_1x1x1_GroundWaterFlow + EXECUTABLE ogs + EXECUTABLE_ARGS cube_${mesh_size}.prj + WRAPPER time + TESTER vtkdiff + DIFF_DATA cube_${mesh_size}_pcs_0_ts_1.vtu Linear_1_to_minus1 Result + DATA cube_${mesh_size}.prj cube_1x1x1_hex_${mesh_size}.vtu cube_1x1x1.gml + ) - AddTest( - NAME GroundWaterFlowProcess_cube_1x1x1_Neumann_${mesh_size} - PATH Elliptic/cube_1x1x1_GroundWaterFlow - EXECUTABLE ogs - EXECUTABLE_ARGS cube_${mesh_size}_neumann.prj - WRAPPER time - TESTER vtkdiff - DIFF_DATA cube_${mesh_size}_neumann_pcs_0_ts_1.vtu D1_left_front_N1_right Result - DATA cube_${mesh_size}_neumann.prj cube_1x1x1_hex_${mesh_size}.vtu cube_1x1x1.gml - ) -endforeach() + AddTest( + NAME GroundWaterFlowProcess_cube_1x1x1_Neumann_${mesh_size} + PATH Elliptic/cube_1x1x1_GroundWaterFlow + EXECUTABLE ogs + EXECUTABLE_ARGS cube_${mesh_size}_neumann.prj + WRAPPER time + TESTER vtkdiff + DIFF_DATA cube_${mesh_size}_neumann_pcs_0_ts_1.vtu D1_left_front_N1_right Result + DATA cube_${mesh_size}_neumann.prj cube_1x1x1_hex_${mesh_size}.vtu cube_1x1x1.gml + ) + endforeach() -foreach(mesh_size 1e4 2e4 3e4 4e4 5e4 1e5 1e6) - AddTest( - NAME LARGE_GroundWaterFlowProcess_cube_1x1x1_${mesh_size} - PATH Elliptic/cube_1x1x1_GroundWaterFlow - EXECUTABLE ogs - EXECUTABLE_ARGS cube_${mesh_size}.prj - WRAPPER time - TESTER vtkdiff - DIFF_DATA cube_${mesh_size}_pcs_0_ts_1.vtu Linear_1_to_minus1 Result - DATA cube_${mesh_size}.prj cube_1x1x1_hex_${mesh_size}.vtu cube_1x1x1.gml - ) + foreach(mesh_size 1e4 2e4 3e4 4e4 5e4 1e5 1e6) + AddTest( + NAME LARGE_GroundWaterFlowProcess_cube_1x1x1_${mesh_size} + PATH Elliptic/cube_1x1x1_GroundWaterFlow + EXECUTABLE ogs + EXECUTABLE_ARGS cube_${mesh_size}.prj + WRAPPER time + TESTER vtkdiff + DIFF_DATA cube_${mesh_size}_pcs_0_ts_1.vtu Linear_1_to_minus1 Result + DATA cube_${mesh_size}.prj cube_1x1x1_hex_${mesh_size}.vtu cube_1x1x1.gml + ) - AddTest( - NAME LARGE_GroundWaterFlowProcess_cube_1x1x1_Neumann_${mesh_size} - PATH Elliptic/cube_1x1x1_GroundWaterFlow - EXECUTABLE ogs - EXECUTABLE_ARGS cube_${mesh_size}_neumann.prj - WRAPPER time - TESTER vtkdiff - DIFF_DATA cube_${mesh_size}_neumann_pcs_0_ts_1.vtu D1_left_front_N1_right Result - DATA cube_${mesh_size}_neumann.prj cube_1x1x1_hex_${mesh_size}.vtu cube_1x1x1.gml - ) -endforeach() + AddTest( + NAME LARGE_GroundWaterFlowProcess_cube_1x1x1_Neumann_${mesh_size} + PATH Elliptic/cube_1x1x1_GroundWaterFlow + EXECUTABLE ogs + EXECUTABLE_ARGS cube_${mesh_size}_neumann.prj + WRAPPER time + TESTER vtkdiff + DIFF_DATA cube_${mesh_size}_neumann_pcs_0_ts_1.vtu D1_left_front_N1_right Result + DATA cube_${mesh_size}_neumann.prj cube_1x1x1_hex_${mesh_size}.vtu cube_1x1x1.gml + ) + endforeach() -# SQUARE 1x1 GROUNDWATER FLOW TESTS -foreach(mesh_size 1e0 1e1 1e2 1e3 1e4) - AddTest( - NAME GroundWaterFlowProcess_square_1x1_${mesh_size} - PATH Elliptic/square_1x1_GroundWaterFlow - EXECUTABLE ogs - EXECUTABLE_ARGS square_${mesh_size}.prj - WRAPPER time - TESTER vtkdiff - DIFF_DATA square_${mesh_size}_pcs_0_ts_1.vtu Linear_1_to_minus1 Result - DATA square_${mesh_size}.prj square_1x1_quad_${mesh_size}.vtu square_1x1.gml - ) + # SQUARE 1x1 GROUNDWATER FLOW TESTS + foreach(mesh_size 1e0 1e1 1e2 1e3 1e4) + AddTest( + NAME GroundWaterFlowProcess_square_1x1_${mesh_size} + PATH Elliptic/square_1x1_GroundWaterFlow + EXECUTABLE ogs + EXECUTABLE_ARGS square_${mesh_size}.prj + WRAPPER time + TESTER vtkdiff + DIFF_DATA square_${mesh_size}_pcs_0_ts_1.vtu Linear_1_to_minus1 Result + DATA square_${mesh_size}.prj square_1x1_quad_${mesh_size}.vtu square_1x1.gml + ) - AddTest( - NAME GroundWaterFlowProcess_square_1x1_Neumann_${mesh_size} - PATH Elliptic/square_1x1_GroundWaterFlow - EXECUTABLE ogs - EXECUTABLE_ARGS square_${mesh_size}_neumann.prj - WRAPPER time - TESTER vtkdiff - DIFF_DATA square_${mesh_size}_neumann_pcs_0_ts_1.vtu D1_left_bottom_N1_right Result - DATA square_${mesh_size}_neumann.prj square_1x1_quad_${mesh_size}.vtu square_1x1.gml - ) -endforeach() + AddTest( + NAME GroundWaterFlowProcess_square_1x1_Neumann_${mesh_size} + PATH Elliptic/square_1x1_GroundWaterFlow + EXECUTABLE ogs + EXECUTABLE_ARGS square_${mesh_size}_neumann.prj + WRAPPER time + TESTER vtkdiff + DIFF_DATA square_${mesh_size}_neumann_pcs_0_ts_1.vtu D1_left_bottom_N1_right Result + DATA square_${mesh_size}_neumann.prj square_1x1_quad_${mesh_size}.vtu square_1x1.gml + ) + endforeach() -foreach(mesh_size 1e5 1e6) - AddTest( - NAME LARGE_GroundWaterFlowProcess_square_1x1_${mesh_size} - PATH Elliptic/square_1x1_GroundWaterFlow - EXECUTABLE ogs - EXECUTABLE_ARGS square_${mesh_size}.prj - WRAPPER time - TESTER vtkdiff - DIFF_DATA square_${mesh_size}_pcs_0_ts_1.vtu Linear_1_to_minus1 Result - DATA square_${mesh_size}.prj square_1x1_quad_${mesh_size}.vtu square_1x1.gml - ) + foreach(mesh_size 1e5 1e6) + AddTest( + NAME LARGE_GroundWaterFlowProcess_square_1x1_${mesh_size} + PATH Elliptic/square_1x1_GroundWaterFlow + EXECUTABLE ogs + EXECUTABLE_ARGS square_${mesh_size}.prj + WRAPPER time + TESTER vtkdiff + DIFF_DATA square_${mesh_size}_pcs_0_ts_1.vtu Linear_1_to_minus1 Result + DATA square_${mesh_size}.prj square_1x1_quad_${mesh_size}.vtu square_1x1.gml + ) + + AddTest( + NAME LARGE_GroundWaterFlowProcess_square_1x1_Neumann_${mesh_size} + PATH Elliptic/square_1x1_GroundWaterFlow + EXECUTABLE ogs + EXECUTABLE_ARGS square_${mesh_size}_neumann.prj + WRAPPER time + TESTER vtkdiff + DIFF_DATA square_${mesh_size}_neumann_pcs_0_ts_1.vtu D1_left_bottom_N1_right Result + DATA square_${mesh_size}_neumann.prj square_1x1_quad_${mesh_size}.vtu square_1x1.gml + ) + endforeach() + + # LINE 1 GROUNDWATER FLOW TESTS + foreach(mesh_size 1e1) + AddTest( + NAME GroundWaterFlowProcess_line_1_${mesh_size} + PATH Elliptic/line_1_GroundWaterFlow + EXECUTABLE ogs + EXECUTABLE_ARGS line_${mesh_size}.prj + WRAPPER time + TESTER vtkdiff + DIFF_DATA line_${mesh_size}_pcs_0_ts_1.vtu Linear_1_to_minus1 Result + DATA line_${mesh_size}.prj line_1_line_${mesh_size}.vtu line_1.gml + ) + AddTest( + NAME GroundWaterFlowProcess_line_1_Neumann_${mesh_size} + PATH Elliptic/line_1_GroundWaterFlow + EXECUTABLE ogs + EXECUTABLE_ARGS line_${mesh_size}_neumann.prj + WRAPPER time + TESTER vtkdiff + DIFF_DATA line_${mesh_size}_neumann_pcs_0_ts_1.vtu D1_left_N1_right Result + DATA line_${mesh_size}_neumann.prj line_1_line_${mesh_size}.vtu line_1.gml + ) + endforeach() +else() + # MPI groundwater flow tests AddTest( - NAME LARGE_GroundWaterFlowProcess_square_1x1_Neumann_${mesh_size} - PATH Elliptic/square_1x1_GroundWaterFlow - EXECUTABLE ogs - EXECUTABLE_ARGS square_${mesh_size}_neumann.prj - WRAPPER time - TESTER vtkdiff - DIFF_DATA square_${mesh_size}_neumann_pcs_0_ts_1.vtu D1_left_bottom_N1_right Result - DATA square_${mesh_size}_neumann.prj square_1x1_quad_${mesh_size}.vtu square_1x1.gml + NAME ParallelFEM_GroundWaterFlow2D + PATH EllipticPETSc/ + EXECUTABLE_ARGS quad_20x10_GroundWaterFlow.prj -gw_ksp_type bcgs -gw_pc_type bjacobi -gw_ksp_atol 1.e-10 + WRAPPER mpirun + WRAPPER_ARGS "-np 3" + TESTER diff + DIFF_DATA + quad_20x10_GroundWaterFlow_result_pcs_0_ts_1_0.vtu + quad_20x10_GroundWaterFlow_result_pcs_0_ts_1_1.vtu + quad_20x10_GroundWaterFlow_result_pcs_0_ts_1_2.vtu ) -endforeach() -# LINE 1 GROUNDWATER FLOW TESTS -foreach(mesh_size 1e1) AddTest( - NAME GroundWaterFlowProcess_line_1_${mesh_size} - PATH Elliptic/line_1_GroundWaterFlow - EXECUTABLE ogs - EXECUTABLE_ARGS line_${mesh_size}.prj - WRAPPER time - TESTER vtkdiff - DIFF_DATA line_${mesh_size}_pcs_0_ts_1.vtu Linear_1_to_minus1 Result - DATA line_${mesh_size}.prj line_1_line_${mesh_size}.vtu line_1.gml + NAME ParallelFEM_GroundWaterFlow3D_DirichletBC + PATH EllipticPETSc/ + EXECUTABLE_ARGS cube_1e3.prj -gw_ksp_type bcgs -gw_pc_type bjacobi -gw_ksp_atol 1.e-10 + WRAPPER mpirun + WRAPPER_ARGS "-np 3" + TESTER diff + DIFF_DATA + cube_1e3_result_pcs_0_ts_1_0.vtu + cube_1e3_result_pcs_0_ts_1_1.vtu + cube_1e3_result_pcs_0_ts_1_2.vtu ) AddTest( - NAME GroundWaterFlowProcess_line_1_Neumann_${mesh_size} - PATH Elliptic/line_1_GroundWaterFlow - EXECUTABLE ogs - EXECUTABLE_ARGS line_${mesh_size}_neumann.prj - WRAPPER time - TESTER vtkdiff - DIFF_DATA line_${mesh_size}_neumann_pcs_0_ts_1.vtu D1_left_N1_right Result - DATA line_${mesh_size}_neumann.prj line_1_line_${mesh_size}.vtu line_1.gml + NAME ParallelFEM_GroundWaterFlow3D_NeumannBC + PATH EllipticPETSc/ + EXECUTABLE_ARGS cube_1e3_neumann.prj -gw_ksp_type bcgs -gw_pc_type bjacobi -gw_ksp_atol 1.e-10 + WRAPPER mpirun + WRAPPER_ARGS "-np 3" + TESTER diff + DIFF_DATA + cube_1e3_neumann_result_pcs_0_ts_1_0.vtu + cube_1e3_neumann_result_pcs_0_ts_1_1.vtu + cube_1e3_neumann_result_pcs_0_ts_1_2.vtu ) -endforeach() +endif() diff --git a/SimpleTests/MeshTests/MPI/CMakeLists.txt b/SimpleTests/MeshTests/MPI/CMakeLists.txt index 1190c8e07dd5badf5475968ae9fa39ea7e8b1be1..272702959809342c0c330efdcfafb8decb0f84f0 100644 --- a/SimpleTests/MeshTests/MPI/CMakeLists.txt +++ b/SimpleTests/MeshTests/MPI/CMakeLists.txt @@ -40,43 +40,3 @@ AddTest( TESTER diff DIFF_DATA mesh_3d_partition_0.msh mesh_3d_partition_1.msh mesh_3d_partition_2.msh ) - -## FEM#PETSc solver tests -AddTest( - NAME ParallelFEM_GroundWaterFlow2D - PATH EllipticPETSc/ - EXECUTABLE_ARGS quad_20x10_GroundWaterFlow.prj -gw_ksp_type bcgs -gw_pc_type bjacobi -gw_ksp_atol 1.e-10 - WRAPPER mpirun - WRAPPER_ARGS "-np 3" - TESTER diff - DIFF_DATA - quad_20x10_GroundWaterFlow_result_pcs_0_ts_1_0.vtu - quad_20x10_GroundWaterFlow_result_pcs_0_ts_1_1.vtu - quad_20x10_GroundWaterFlow_result_pcs_0_ts_1_2.vtu -) - -AddTest( - NAME ParallelFEM_GroundWaterFlow3D_DirichletBC - PATH EllipticPETSc/ - EXECUTABLE_ARGS cube_1e3.prj -gw_ksp_type bcgs -gw_pc_type bjacobi -gw_ksp_atol 1.e-10 - WRAPPER mpirun - WRAPPER_ARGS "-np 3" - TESTER diff - DIFF_DATA - cube_1e3_result_pcs_0_ts_1_0.vtu - cube_1e3_result_pcs_0_ts_1_1.vtu - cube_1e3_result_pcs_0_ts_1_2.vtu -) - -AddTest( - NAME ParallelFEM_GroundWaterFlow3D_NeumannBC - PATH EllipticPETSc/ - EXECUTABLE_ARGS cube_1e3_neumann.prj -gw_ksp_type bcgs -gw_pc_type bjacobi -gw_ksp_atol 1.e-10 - WRAPPER mpirun - WRAPPER_ARGS "-np 3" - TESTER diff - DIFF_DATA - cube_1e3_neumann_result_pcs_0_ts_1_0.vtu - cube_1e3_neumann_result_pcs_0_ts_1_1.vtu - cube_1e3_neumann_result_pcs_0_ts_1_2.vtu -)