def Run(): Msg = "" Text = "========== Adjoint Fluid Application ==========\n" # # SquareWithUpstreamRectangle Text += "SquareWithUpstreamRectangle test: " os.chdir("SquareWithUpstreamRectangle/kratos.gid") print("running the SquareWithUpstreamRectangle benchmark test ...") successful,Msg = benchmarking.RunBenchmark("run_test.py", "finite_difference_ref.txt") if(successful==True): Text += "OK\n" print("SquareWithUpstreamRectangle test successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("SquareWithUpstreamRectangle test FAILED") os.chdir("../..") # # Circle Text += "Circle test: " os.chdir("Circle/kratos.gid") print("running the Circle benchmark test ...") successful,Msg = benchmarking.RunBenchmark("run_test.py", "finite_difference_ref.txt") if(successful==True): Text += "OK\n" print("Circle test successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("Circle test FAILED") os.chdir("../..") # # Add other examples here # print("resume of all of the examples for the AdjointFluidApplication :") print(Text) return Text
def Run(): Msg = "" Text = "== ThermoMechanical Application ==========\n" # # naca3d test for edge based level set solver Text += "Activation_test : " os.chdir("Activation_test.gid") sys.path.append(os.getcwd()) print("running the benchmark for the Activation_test ...") successful,Msg = benchmarking.RunBenchmark("run_benchmark.py", "Activation_reference_solution.txt") if(successful==True): Text += "OK\n" print("Activation_test example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("Activation_test example FAILED") os.chdir("..") # # Add other examples here # Add other examples here # print("resume of all of the examples for the ThermoMechanical Application :") print(Text) return Text
def Run(): print("Running VMS2D test...") return benchmarking.RunBenchmark("script_elemtest.py", "vms2d_test_ref.txt")
def Run(): Msg = "" Text = "== Incompressible_Fluid ==========\n" # # column # Text += "column: " # os.chdir("column.gid") # sys.path.append(os.getcwd()) # import column_benchmark # success, Msg = column_benchmark.Run() # print "Running column.py..." # successful,Msg = benchmarking.RunBenchmark("column.py", "column_ref.txt") # if (Msg == True): # Text += "OK\n" # print "colum example successful" # else: # Text += "FAILED\n" # Text += Msg # Text += "\n\n" # print "colum example FAILED" # os.chdir("..") # # naca3d test for edge based level set solver try: Text += "naca3d test: " os.chdir("naca3d.gid") sys.path.append(os.getcwd()) except OSError: print("Skipping naca3d benchmark: directory does not exist") Text += "FAILED: directory not found\n" else: print("running the benchmark for naca3d test...") successful,Msg = benchmarking.RunBenchmark( "run_benchmark.py", "benchmark_reference_solution.txt") if(successful==True): Text += "OK\n" print("naca3d test example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("naca3d test example FAILED") os.chdir("..") # # mass conservation test for edge based level set solver try: Text += "mass conservation test: " os.chdir("mass_conservation.gid") sys.path.append(os.getcwd()) except OSError: print("mass conservation test: directory does not exist") Text += "FAILED: directory not found\n" else: print("running the benchmark for mass_conservation test...") successful,Msg = benchmarking.RunBenchmark( "run_benchmark.py", "benchmark_reference_solution.txt") if(successful==True): Text += "OK\n" print("mass_conservation test example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("mass_conservation test example FAILED") os.chdir("..") # Add other examples here # # cavity2D # # Text += "cavity2d: " # os.chdir("cavity2d.gid") # sys.path.append(os.getcwd()) # # import column_benchmark # success, Msg = column_benchmark.Run() # # print "Running cavity.py..." # successful,Msg = benchmarking.RunBenchmark("cavity2d.py", "cavity_ref.txt") # # if (Msg == True): # Text += "OK\n" # print "cavity2d example successful" # else: # Text += "FAILED\n" # Text += Msg # Text += "\n\n" # print "cavity2d example FAILED" # # os.chdir("..") # # Add other examples here # # cavity2D try: Text += "cavity2D: " os.chdir("cavity2D.gid") sys.path.append(os.getcwd()) except OSError: print("cavity2D test: directory does not exist") Text += "FAILED: directory not found\n" os.chdir("..") else: print("verifying test_fractstep_cont_laplacian.py...") successful,Msg = benchmarking.RunBenchmark( "test_fractstep_cont_laplacian.py", "fractstep_cont_laplacian_benchmarking_ref.txt") if(successful==True): Text += "OK\n" print("test_fractstep_cont_laplacian example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("test_fractstep_cont_laplacian example FAILED") print("verifying test_fractstep_discrete_laplacian.py...") successful,Msg = benchmarking.RunBenchmark( "test_fractstep_discrete_laplacian.py", "fractstep_discrete_laplacian_benchmarking_ref.txt") if(successful==True): Text += "OK\n" print("test_fractstep_discrete_laplacian example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("test_fractstep_discrete_laplacian example FAILED") os.chdir("..") # # cavity2D try: Text += "cavity3D: " os.chdir("cavity3D.gid") sys.path.append(os.getcwd()) except OSError: print("cavity3D test: directory does not exist") Text += "FAILED: directory not found\n" os.chdir("..") else: print("verifying test_fractstep_cont_laplacian.py...3D") successful,Msg = benchmarking.RunBenchmark( "test_fractstep_cont_laplacian.py", "fractstep_cont_laplacian_benchmarking_ref.txt") if(successful==True): Text += "OK\n" print("test_fractstep_cont_laplacian 3D example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("test_fractstep_cont_laplacian 3D example FAILED") os.chdir("..") # # cylinder try: Text += "cylinder: " os.chdir("cylinder.gid") sys.path.append(os.getcwd()) except OSError: print("cylinder test: directory does not exist") Text += "FAILED: directory not found\n" os.chdir("..") else: # import column_benchmark # success, Msg = column_benchmark.Run() print("Running cylinder.py...") successful,Msg = benchmarking.RunBenchmark("run_example.py", "cylinder_ref.txt") if(successful==True): Text += "OK\n" print("cylinder example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("cylinder example FAILED") os.chdir("..") # # cilinderGLS try: Text += "cilinderGLS: " os.chdir("cilinderGLS.gid") sys.path.append(os.getcwd()) except OSError: print("cilinderGLS test: directory does not exist") Text += "FAILED: directory not found\n" os.chdir("..") else: # import column_benchmark # success, Msg = column_benchmark.Run() print("Running Cilinder GLS example with explicit Runge-Kutta and FRAC STEP...") successful,Msg = benchmarking.RunBenchmark("cil_gls.py", "cil_gls_ref.txt") if(successful==True): Text += "OK\n" print("cilinderGLS example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("cilinderGLS example FAILED") os.chdir("..") # Add other examples here # # dam2d #try: #Text += "dam2d: " #os.chdir("dam2d.gid") #sys.path.append(os.getcwd()) #except OSError: #print("dam2d test: directory does not exist") #Text += "FAILED: directory not found\n" #os.chdir("..") #else: #print("Running dam2d.py...") #successful,Msg = benchmarking.RunBenchmark("run_example.py", "dam2d_ref.txt") #if(successful==True): #Text += "OK\n" #print("dam2d example successful") #else: #Text += "FAILED\n" #Text += Msg #Text += "\n\n" #print("dam2d example FAILED") #os.chdir("..") # # StillWater_Edgebased try: Text += "StillWater_Edgebased: " os.chdir("StillWater_Edgebased.gid") sys.path.append(os.getcwd()) except OSError: print("StillWater_Edgebased test: directory does not exist") Text += "FAILED: directory not found\n" os.chdir("..") else: print("Running StillWater_Edgebased...") successful,Msg = benchmarking.RunBenchmark( "StillWater_Edgebased_script.py", "StillWater_Edgebased_ref.txt") if(successful==True): Text += "OK\n" print("StillWater_Edgebased example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("StillWater_Edgebased example FAILED") os.chdir("..") # # StillWater_Edgebased_halfPorous try: Text += "StillWater_Edgebased_halfPorous: " os.chdir("StillWater_Edgebased_halfPorous.gid") sys.path.append(os.getcwd()) except OSError: print("StillWater_Edgebased_halfPorous test: directory does not exist") Text += "FAILED: directory not found\n" os.chdir("..") else: print("Running StillWater_Edgebased_halfPorous...") successful,Msg = benchmarking.RunBenchmark( "StillWater_Edgebased_halfPorous_script.py", "StillWater_Edgebased_halfPorous_ref.txt") if(successful==True): Text += "OK\n" print("StillWater_Edgebased_halfPorous example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("StillWater_Edgebased_halfPorous example FAILED") os.chdir("..") # # cylinder # Text += "cylinder_3d: " # os.chdir("cylinder_3d.gid") # sys.path.append(os.getcwd()) # import column_benchmark # success, Msg = column_benchmark.Run() # print "Running cylinder_3d.py..." # successful,Msg = benchmarking.RunBenchmark("run_example.py", "cylinder_3d_ref.txt") # if (Msg == True): # Text += "OK\n" # print "cylinder_3d example successful" # else: # Text += "FAILED\n" # Text += Msg # Text += "\n\n" # print "cylinder_3d example FAILED" # os.chdir("..") # # cavityMonolithic2D try: Text += "cavity_monolithic_3d: " os.chdir("CavityMonolithic3D.gid") sys.path.append(os.getcwd()) except OSError: print("cavity_monolithic_3d test: directory does not exist") Text += "FAILED: directory not found\n" os.chdir("..") else: # import column_benchmark # success, Msg = column_benchmark.Run() print("Running script.py...") successful,Msg = benchmarking.RunBenchmark( "script.py", "cavity_monolithic_3d_ref.txt") if(successful==True): Text += "OK\n" print("cavity_monolithic_3d example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("cavity_monolithic_3d example FAILED") os.chdir("..") # # edgebased fixed press test for edge based level set solver try: Text += "edgebased fixed press test: " os.chdir("edgebased_fixed_press.gid") sys.path.append(os.getcwd()) except OSError: print("edgebased fixed press test: directory does not exist") Text += "FAILED: directory not found\n" os.chdir("..") else: print("running the benchmark for edgebased_fixed_press test...") successful,Msg = benchmarking.RunBenchmark( "run_benchmark.py", "benchmark_reference_solution.txt") if(successful==True): Text += "OK\n" print("edgebased_fixed_press test example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("edgebased_fixed_press test example FAILED") os.chdir("..") # Add other examples here # # Add other examples here # print("resume of all of the examples for the fluid application :") print(Text) return Text
def Run(): Msg = "" Text = "===== Structural Mechanics Application - Sprism3D6N Scord test =====\n" # Sprism3D6N Scord 2 test: Text += "Sprism3D6N Scord 2 test: " os.chdir("Sprism3D6N_Scord_2_test.gid") sys.path.append(os.getcwd()) print("running the Sprism3D6N Scord 2 test benchmark...") successful,Msg = benchmarking.RunBenchmark("run_test.py", "benchmark_results.txt") if(successful==True): Text += "OK\n" print("Sprism3D6N Scord 2 test successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("Sprism3D6N Scord 2 test FAILED") os.chdir("..") # Sprism3D6N Scord 4 test: Text += "Sprism3D6N Scord 4 test: " os.chdir("Sprism3D6N_Scord_4_test.gid") sys.path.append(os.getcwd()) print("running the Sprism3D6N Scord 4 test benchmark...") successful,Msg = benchmarking.RunBenchmark("run_test.py", "benchmark_results.txt") if(successful==True): Text += "OK\n" print("Sprism3D6N Scord 4 test successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("Sprism3D6N Scord 4 test FAILED") os.chdir("..") # Sprism3D6N Scord 8 test: Text += "Sprism3D6N Scord 8 test: " os.chdir("Sprism3D6N_Scord_8_test.gid") sys.path.append(os.getcwd()) print("running the Sprism3D6N Scord 8 test benchmark...") successful,Msg = benchmarking.RunBenchmark("run_test.py", "benchmark_results.txt") if(successful==True): Text += "OK\n" print("Sprism3D6N Scord 8 test successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("Sprism3D6N Scord 8 test FAILED") os.chdir("..") # Sprism3D6N Scord 16 test: Text += "Sprism3D6N Scord 16 test: " os.chdir("Sprism3D6N_Scord_16_test.gid") sys.path.append(os.getcwd()) print("running the Sprism3D6N Scord 16 test benchmark...") successful,Msg = benchmarking.RunBenchmark("run_test.py", "benchmark_results.txt") if(successful==True): Text += "OK\n" print("Sprism3D6N Scord 16 test successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("Sprism3D6N Scord 16 test FAILED") os.chdir("..") # Sprism3D6N Scord 32 test: Text += "Sprism3D6N Scord 32 test: " os.chdir("Sprism3D6N_Scord_32_test.gid") sys.path.append(os.getcwd()) print("running the Sprism3D6N Scord 32 test benchmark...") successful,Msg = benchmarking.RunBenchmark("run_test.py", "benchmark_results.txt") if(successful==True): Text += "OK\n" print("Sprism3D6N Scord 32 test successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("Sprism3D6N Scord 32 test FAILED") os.chdir("..") # print("---end forming application tests---") print("resume of all of the examples for the Structural Mechanics Application - Sprism3D6N Scord test :") print(Text) return Text
def Run(): print("Running Benchmark") return benchmarking.RunBenchmark("run_test.py", "benchmark_results.txt")
def Run(): Msg = "" Text = "========== Structural Aplication ==========\n" # Text += "Patch_Test_Total_Lagrangian_3D_8N: " os.chdir("Patch_Test_Total_Lagrangian_3D_8N.gid") sys.path.append(os.getcwd()) print("Running Patch_Test_Total_Lagrangian_3D_8N...") successful, Msg = benchmarking.RunBenchmark( "Patch_Test_Total_Lagrangian_3D_8N_benchmarking.py", "Patch_Test_Total_Lagrangian_3D_8N.txt") if (successful == True): Text += "OK\n" print( "Patch_Test_Total_Lagrangian_3D_8N_benchmarking example successful" ) else: Text += "FAILED\n" Text += Msg Text += "\n\n" print( "Patch_Test_Total_Lagrangian_3D_8N_benchmarking.py example FAILED") os.chdir("..") # Text += "Patch_Test_Total_Lagrangian_4N: " os.chdir("Patch_Test_Total_Lagrangian_4N.gid") sys.path.append(os.getcwd()) print("Running Patch_Test_Total_Lagrangian_4N...") successful, Msg = benchmarking.RunBenchmark( "Patch_Test_Total_Lagrangian_4N_benchmarking.py", "Patch_Test_Total_Lagrangian_4N.txt") if (successful == True): Text += "OK\n" print("Patch_Test_Total_Lagrangian_4N_benchmarking example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("Patch_Test_Total_Lagrangian_4N_benchmarking.py example FAILED") os.chdir("..") # Text += "cantilever2dDynamic:" os.chdir("cantilever2d.gid") sys.path.append(os.getcwd()) print("Running cantilever2ddynamic") successful, Msg = benchmarking.RunBenchmark( "cantilever2ddynamic_benchmarking.py", "cantilever2ddynamic.txt") if (successful == True): Text += "OK\n" print("cantilever2dynamic successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("cantilever2dynamic example FAILED") os.chdir("..") # Text += "cantilever2dstatic using MKLPardisoSolver: " os.chdir("cantilever2d.gid") sys.path.append(os.getcwd()) print("Running cantilever2dstatic using MKLPardisoSolver") successful, Msg = benchmarking.RunBenchmark( "cantilever2dstatic_Mkl_benchmarking.py", "cantilever2dstatic_superlu.txt") if (successful == True): Text += "OK\n" print("cantilever2dstatic using MKLPardisoSolver successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print( "Expected fail because the program should be compiled with INTEL compliler." ) os.chdir("..") # Text += "cantilever2dstatic_superlu: " os.chdir("cantilever2d.gid") sys.path.append(os.getcwd()) print("Running cantilever2dstatic witdh SuperLUSolver") successful, Msg = benchmarking.RunBenchmark( "cantilever2dstatic_superlu_benchmarking.py", "cantilever2dstatic_superlu.txt") if (successful == True): Text += "OK\n" print("cantilever2dstatic witdh SuperLUSolver example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("cantilever2dstatic witdh SuperLUSolver example FAILED") os.chdir("..") # Text += "cantilever2dstatic: " os.chdir("cantilever2d.gid") sys.path.append(os.getcwd()) print("Running cantilever2dstatic with classical solver") successful, Msg = benchmarking.RunBenchmark( "cantilever2dstatic_benchmarking.py", "cantilever2dstatic_superlu.txt") if (successful == True): Text += "OK\n" print("cantilever2dstatic with classical solver example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("cantilever2dstatic with classical solver example FAILED") os.chdir("..") # Text += "cantilever2dstatic_parallel:" os.chdir("cantilever2d.gid") sys.path.append(os.getcwd()) print( "Running cantilever2dstatic_parallel using ParallelSkylineLUFactorizationSolver" ) successful, Msg = benchmarking.RunBenchmark( "cantilever2dstatic_parallel_benchmarking.py", "cantilever2dstatic_superlu.txt") if (successful == True): Text += "OK\n" print( "cantilever2dstatic_parallel using ParallelSkylineLUFactorizationSolver example successful" ) else: Text += "FAILED\n" Text += Msg Text += "\n\n" print( "Expected fail because the program should be compiled with INTEL compliler." ) os.chdir("..") # Text += "cantilever2dstatic using ParallelMKLPardisoSolver: " os.chdir("cantilever2d.gid") sys.path.append(os.getcwd()) print("Running cantilever2dstatic using ParallelMKLPardisoSolver") successful, Msg = benchmarking.RunBenchmark( "cantilever2dstatic_parallel_pardiso_benchmarking.py", "cantilever2dstatic_superlu.txt") if (successful == True): Text += "OK\n" print( "cantilever2dstatic using ParallelMKLPardisoSolver example successful" ) else: Text += "FAILED\n" Text += Msg Text += "\n\n" print( "Expected fail because the program should be compiled with INTEL compliler." ) os.chdir("..") # Text += "cantilever3dstatic: " os.chdir("cantilever3d.gid") sys.path.append(os.getcwd()) print("Running cantilever3dstatic") successful, Msg = benchmarking.RunBenchmark( "cantilever3dstatic_superlu_benchmarking.py", "cantilever3dstatic.txt") if (successful == True): Text += "OK\n" print("cantilever3dstatic example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("cantilever3dstatic example FAILED") os.chdir("..") # Text += "cantilever3ddynamic: " os.chdir("cantilever3d.gid") sys.path.append(os.getcwd()) print("Running cantilever3dynamic") successful, Msg = benchmarking.RunBenchmark( "cantilever3ddynamic_benchmarking.py", "cantilever3ddynamic.txt") if (successful == True): Text += "OK\n" print("cantilever3ddynamic example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("cantilever2dynamic example FAILED") os.chdir("..") # Text += "balken contact benchmark: " os.chdir("balken.gid") sys.path.append(os.getcwd()) print("Running balken contact benchmark...") successful, Msg = benchmarking.RunBenchmark("balken_benchmarking.py", "balken_ref.txt") if (successful == True): Text += "OK\n" print("balken contact benchmark example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("balken contact benchmark example FAILED") os.chdir("..") # Text += "arc length desplacement benchmark: " os.chdir("arc_length_des.gid") sys.path.append(os.getcwd()) print("Running arc length desplacement benchmark...") successful, Msg = benchmarking.RunBenchmark( "arc_length_des_benchmarking.py", "arc_length_des_benchmarking.txt") if (successful == True): Text += "OK\n" print("arc_length_des benchmark example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("arc_length_des benchmark example FAILED") os.chdir("..") # Text += "arc length benchmark: " os.chdir("arc_length.gid") sys.path.append(os.getcwd()) print("Running arc length benchmark...") successful, Msg = benchmarking.RunBenchmark("arc_length_benchmarking.py", "arc_length_benchmarking.txt") if (successful == True): Text += "OK\n" print("arc_length benchmark example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("arc_length benchmark example FAILED") os.chdir("..") # Text += "Pendulo Kratos Length benchmark: " os.chdir("Pendulo_Kratos.gid") sys.path.append(os.getcwd()) print("Pendulo Kratos Length benchmark...") successful, Msg = benchmarking.RunBenchmark( "Pendulo_Kratos_benchmarking.py", "Pendulo_Kratos_benchmarking.txt") if (successful == True): Text += "OK\n" print("Pendulo Kratos benchmark example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("Pendulo Kratos benchmark example FAILED") os.chdir("..") # Text += "PlasticitJ2 with EBST collection benchmarks: " os.chdir("plasticJ2.gid") sys.path.append(os.getcwd()) print("PlasticitJ2 with EBST TENSION benchmarks...") successful, Msg = benchmarking.RunBenchmark("tension.py", "tension_ref.txt") if (successful == True): Text += "OK\n" print("PlasticitJ2 with EBST TENSION benchmarks successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("PlasticitJ2 with EBST TENSION benchmarks FAILED") print("PlasticitJ2 with EBST TORSION benchmarks...") successful, Msg = benchmarking.RunBenchmark("torsion.py", "torsion_ref.txt") if (successful == True): Text += "OK\n" print("PlasticitJ2 with EBST TORSION benchmarks successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("PlasticitJ2 with EBST TORSION benchmarks FAILED") print("PlasticitJ2 with EBST VERTICAL benchmarks...") successful, Msg = benchmarking.RunBenchmark("vertical.py", "vertical_ref.txt") if (successful == True): Text += "OK\n" print("PlasticitJ2 with EBST VERTICAL benchmarks successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("PlasticitJ2 with EBST VERTICAL benchmarks FAILED") print("PlasticitJ2 with EBST FORCE benchmarks...") successful, Msg = benchmarking.RunBenchmark("force.py", "force_ref.txt") if (successful == True): Text += "OK\n" print("PlasticitJ2 with EBST FORCE benchmarks successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("PlasticitJ2 with EBST FORCE benchmarks FAILED") os.chdir("..") # print("Resume of all of the examples for the structural application :") print(Text) return Text
def Run(): Msg = "" Text = "========== Meshing Aplication ==========\n" # Text += "adaptive_mesher2d: " os.chdir("adaptive_mesher2d.gid") sys.path.append(os.getcwd()) print("Running Adaptive Mesher 2d benchmark...") successful, Msg = benchmarking.RunBenchmark("remesh.py", "adaptive_mesher2d_ref.txt") if (successful == True): Text += "OK\n" print("Adaptive_mesher2d benchmarking example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("Adaptive_mesher2d benchmarking example FAILED") os.chdir("..") # Text += "adaptive_mesher3d: " os.chdir("adaptive_mesher3d.gid") sys.path.append(os.getcwd()) print("Running Adaptive Mesher 3d benchmark...") successful, Msg = benchmarking.RunBenchmark("remesh.py", "adaptive_mesher3d_ref.txt") if (successful == True): Text += "OK\n" print("Adaptive_mesher2d benchmarking example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("Adaptive_mesher2d benchmarking example FAILED") os.chdir("..") # Text += "Mapping_2d: " os.chdir("Mapping_2d.gid") sys.path.append(os.getcwd()) print("Running Mapping_2d benchmark...") successful, Msg = benchmarking.RunBenchmark( "ProjectionTest_2D_script.py", "ProjectionTest_2D_benchmarking_ref.txt") if (successful == True): Text += "OK\n" print("Mapping_2d benchmarking example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("Mapping_2d benchmarking example FAILED") os.chdir("..") # Text += "Mapping_3d: " os.chdir("Mapping_3d.gid") sys.path.append(os.getcwd()) print("Running Mapping_3d benchmark...") successful, Msg = benchmarking.RunBenchmark( "ProjectionTest_3D_script.py", "ProjectionTest_3D_benchmarking_ref.txt") if (successful == True): Text += "OK\n" print("Mapping_3d benchmarking example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("Mapping_3d benchmarking example FAILED") os.chdir("..") # Text += "Mapping_2d_BinBased: " os.chdir("Mapping_2d_BinBased.gid") sys.path.append(os.getcwd()) print("Running Mapping_2d_BinBased benchmark...") successful, Msg = benchmarking.RunBenchmark( "ProjectionTestBinBased_2D_script.py", "ProjectionTestBinBased_2D_benchmarking_ref.txt") if (successful == True): Text += "OK\n" print("Mapping_2d_BinBased benchmarking example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("Mapping_2d_BinBased benchmarking example FAILED") os.chdir("..") # Text += "Mapping_3d_BinBased: " os.chdir("Mapping_3d_BinBased.gid") sys.path.append(os.getcwd()) print("Running Mapping_3d_BinBased benchmark...") successful, Msg = benchmarking.RunBenchmark( "ProjectionTestBinBased_3D_script.py", "ProjectionTestBinBased_3D_benchmarking_ref.txt") if (successful == True): Text += "OK\n" print("Mapping_3d_BinBased benchmarking example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("Mapping_3d_BinBased benchmarking example FAILED") os.chdir("..") # Text += "connectivity_preserve_modeler benchmark: " os.chdir("test_connectivity_preserve_modeler") sys.path.append(os.getcwd()) print("verifying connectivity_preserve_modeler benchmark...") successful, Msg = benchmarking.RunBenchmark( "do_test.py", "connectivity_preserve_benchmarking_ref.txt") if (successful == True): Text += "OK\n" print("connectivity_preserve_modeler benchmark successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("connectivity_preserve_modeler benchmark FAILED") os.chdir("..") # # print("resume of all of the examples for the meshing application :") print(Text) return Text
def Run(): Msg = "" Text = "== FSI_application ==========\n" # Example benchmark problem: # # column # Text += "column: " # os.chdir("column.gid") # sys.path.append(os.getcwd()) # import column_benchmark # success, Msg = column_benchmark.Run() # print "Running column.py..." # successful,Msg = benchmarking.RunBenchmark("column.py", "column_ref.txt") # if (Msg == True): # Text += "OK\n" # print "colum example successful" # else: # Text += "FAILED\n" # Text += Msg # Text += "\n\n" # print "colum example FAILED" # os.chdir("..") # # non-conformant mesh test Text += "meshtest: " os.chdir("meshtest3D.gid") sys.path.append(os.getcwd()) print("Running mesh.py...") successful, Msg = benchmarking.RunBenchmark("mesh.py", "mesh_ref.txt") if (successful == True): Text += "OK\n" print("non-conformant mesh example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("non-conformant mesh example FAILED") os.chdir("..") Text += "meshtest: " os.chdir("meshtest2D.gid") sys.path.append(os.getcwd()) print("Running mesh.py...") successful, Msg = benchmarking.RunBenchmark("mesh.py", "mesh_ref.txt") if (successful == True): Text += "OK\n" print("non-conformant mesh example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("non-conformant mesh example FAILED") os.chdir("..") # # Add other examples here # print("resume of all of the examples for the FSI application :") print(Text) return Text
from __future__ import print_function, absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7 import sys kratos_benchmarking_path = '../../../../benchmarking' sys.path.append(kratos_benchmarking_path) import benchmarking Text = " " # print("verifying test_fractstep_cont_laplacian.py...3D case") successful, Msg = benchmarking.RunBenchmark( "test_fractstep_cont_laplacian.py", "fractstep_cont_laplacian_benchmarking_ref.txt") if (successful == True): Text += "OK\n" print("test_fractstep_cont_laplacian 3D example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("test_fractstep_cont_laplacian 3D example FAILED") print(Text)
from __future__ import print_function, absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7 import sys kratos_benchmarking_path = '../../../../benchmarking' sys.path.append(kratos_benchmarking_path) import benchmarking Text = " " # print("verifying CoupledNonNewtSlope.py...") successful,Msg = benchmarking.RunBenchmark("CoupledNonNewtSlope.py", "CoupledNonNewtSlope_ref.txt") if(successful==True): Text += "OK\n" print("CoupledNonNewtSlope example SUCCESFUL") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("CoupledNonNewtSlope example FAILED") print(Text)
def Run(): print("Running dam2d.py...") return benchmarking.RunBenchmark("dam2d.py", "dam2d_ref.txt")
def Run(): print("Running slip condition test...") return benchmarking.RunBenchmark("slip_test.py", "slip_test_ref.txt")
from __future__ import print_function, absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7 import sys kratos_benchmarking_path = '../../../../benchmarking' sys.path.append(kratos_benchmarking_path) import benchmarking Text = " " # print("verifying dam2dNonNewt.py...") successful, Msg = benchmarking.RunBenchmark("dam2dNonNewt.py", "dam2dNonNewt_ref.txt") if (successful == True): Text += "OK\n" print("dam2dNonNewt example SUCCESFUL") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("dam2dNonNewt example FAILED") print(Text)
def Run(): print("Running SUPGConvDiffPhaseChange3D - rotating pulse test.") return benchmarking.RunBenchmark("rotating_pulse_benchmark.py", "rotating_pulse_benchmark_test_ref.txt")
def Run(): print("Running remesh.py...") return benchmarking.RunBenchmark("remesh.py", "adaptive_mesher3d_ref.txt")
from __future__ import print_function, absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7 import sys kratos_benchmarking_path = '../../../../benchmarking' sys.path.append(kratos_benchmarking_path) import benchmarking print("running reference data for edgebased_PureConvection.py...") benchmarking.RunBenchmark("edgebased_PureConvection.py", "test_pureconvectionsolver_benchmarking_ref.txt")
def Run(): Msg = "" Text = "== Fluid Dynamics ==========\n" # # VMS2D element test Text += "VMS2D element test: " os.chdir("vms2d_test") sys.path.append(os.getcwd()) print("running the vms2d_test benchmark test...") successful, Msg = benchmarking.RunBenchmark("script_elemtest.py", "vms2d_test_ref.txt") if (successful == True): Text += "OK\n" print("VMS2D element test successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("VMS2D element test FAILED") os.chdir("..") # # parabolic flow in a trapezoidal domain: test VMS2D OSS implementation Text += "Parabolic flow OSS test: " os.chdir("oss_trapezoid") sys.path.append(os.getcwd()) import trapezoid_benchmark success, Msg = trapezoid_benchmark.Run() if (successful == True): Text += "OK\n" print("oss_trapezoid test successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("oss_trapezoid test FAILED") os.chdir("..") # # slip condition and wall law (MonolithicWallCondition2D + ResidualBasedVelocityBossakSchemeTurbulent) Text += "Slip condition and wall law test: " os.chdir("slip_test") sys.path.append(os.getcwd()) import slip_test_benchmark success, Msg = slip_test_benchmark.Run() if (successful == True): Text += "OK\n" print("slip condition test successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("slip condition test FAILED") os.chdir("..") # # fractional step 2D cavity Text += "Fractional step element test: 2D cavity flow: " os.chdir("fs_cavity") sys.path.append(os.getcwd()) import fs_cavity_verify_benchmark success, Msg = fs_cavity_verify_benchmark.Run() if (successful == True): Text += "OK\n" print("Fractional step 2D cavity test successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("Fractional step 2D cavity test FAILED") os.chdir("..") # # test of cylinder with slip BC, wall law and outlet close to the cylinder Text += "test of cylinder with slip BC, wall law and outlet close to the cylinder: " os.chdir("cyl_bench") sys.path.append(os.getcwd()) import cyl_verify_benchmark success, Msg = cyl_verify_benchmark.Run() if (successful == True): Text += "OK\n" print("cylinder with slip BC, wall law and outlet test successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("cylinder with slip BC, wall law and outlet test FAILED") os.chdir("..") # Add other examples here # print("resume of all of the examples for the Fluid Dynamics application :") print(Text) return Text
def Run(): Msg = "" Text = "===== Structural Mechanics Application =====\n" # # SHELL elements tests Text += "Shell T3 Isotropic Scordelis test: " os.chdir("Shell_T3_Isotropic_Scordelis.gid") sys.path.append(os.getcwd()) print("---start solid mechanics application tests---") print("running the Scordelis Low Roof benchmark test...") successful, Msg = benchmarking.RunBenchmark("run_test.py", "min_displacements.txt") if (successful == True): Text += "OK\n" print("Scordelis Low Roof test successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("Scordelis Low Roof test FAILED") os.chdir("..") # Bending RollUp Q4 test: Text += "Shell Q4 Thick Bending RollUp test: " os.chdir("Shell_Q4_Thick__BendingRollUp.gid") sys.path.append(os.getcwd()) print("running the Shell Q4 Thick Bending RollUp benchmark test...") successful, Msg = benchmarking.RunBenchmark("run_test.py", "benchmark_results.txt") if (successful == True): Text += "OK\n" print("Shell Q4 Thick Bending RollUp test successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("Shell Q4 Thick Bending RollUp test FAILED") os.chdir("..") # Drilling RollUp Q4 test: Text += "Shell Q4 Thick Drilling RollUp test: " os.chdir("Shell_Q4_Thick__DrillingRollUp.gid") sys.path.append(os.getcwd()) print("running the Shell Q4 Thick Drilling RollUp benchmark test...") successful, Msg = benchmarking.RunBenchmark("run_test.py", "benchmark_results.txt") if (successful == True): Text += "OK\n" print("Shell Q4 Thick Drilling RollUp test successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("Shell Q4 Thick Drilling RollUp test FAILED") os.chdir("..") # Bending RollUp T3 test: Text += "Shell T3 Thin Bending RollUp test: " os.chdir("Shell_T3_Thin__BendingRollUp.gid") sys.path.append(os.getcwd()) print("running the Shell T3 Thin Bending RollUp benchmark test...") successful, Msg = benchmarking.RunBenchmark("run_test.py", "benchmark_results.txt") if (successful == True): Text += "OK\n" print("Shell T3 Thin Bending RollUp test successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("Shell T3 Thin Bending RollUp test FAILED") os.chdir("..") # Drilling RollUp T3 test: Text += "Shell T3 Thin Drilling RollUp test: " os.chdir("Shell_T3_Thin__DrillingRollUp.gid") sys.path.append(os.getcwd()) print("running the Shell T3 Thin Drilling RollUp benchmark test...") successful, Msg = benchmarking.RunBenchmark("run_test.py", "benchmark_results.txt") if (successful == True): Text += "OK\n" print("Shell T3 Thin Drilling RollUp test successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("Shell T3 Thin Drilling RollUp test FAILED") os.chdir("..") # # print("---end solid mechanics application tests---") print("resume of all of the examples for the SolidMechanicsApplication :") print(Text) ##### ADDING EXTERNAL TESTS ##### ## SPRISM os.chdir("SPRISM_test") # SCORD TESTS os.chdir("Scord_test") os.system("python3 run_all.py") os.chdir("..") os.chdir("..") return Text
def Run(): print("Running scordelis low roof") return benchmarking.RunBenchmark("run_test.py", "min_displacements.txt")
def Run(): print("Running SUPGConvDiffPhaseChange3D - CUBE test.") return benchmarking.RunBenchmark("cube_benchmark.py", "cube_benchmark_test_ref.txt")
def Run(): print( "Running VMS test: parabolic flow in a trapezoidal domain solved using OSS" ) return benchmarking.RunBenchmark("test.py", "trapezoid_exact.txt")
def Run(): Msg = "" Text = "== Convection_Diffusion ==========\n" # # rotatingcone_PureConvection # Text += "rotationgcone: " # os.chdir("square.gid") # sys.path.append(os.getcwd()) # # print "Running rotatingcone_PureConvection.py..." # successful,Msg = benchmarking.RunBenchmark("rotatingcone_PureConvectionBenchmarking.py", "rotatingcone_PureConvection_ref.txt") # # if (Msg == True): # Text += "OK\n" # print "square example successful" # else: # Text += "FAILED\n" # Text += Msg # Text += "\n\n" # print "square example FAILED" # # os.chdir("..") # # testConvection Edgebased Text += "square_edgebased: " os.chdir("square_edgebased.gid") sys.path.append(os.getcwd()) print("Running edgebased_PureConvection.py...") successful, Msg = benchmarking.RunBenchmark( "edgebased_PureConvection.py", "test_pureconvectionsolver_benchmarking_ref.txt") if (successful == True): Text += "OK\n" print("testConvectionEdgebased example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("testConvectionEdgebased example FAILED") os.chdir("..") # Add other examples here # # testPureConvection Text += "pure_convection: " os.chdir("testPureConvection.gid") sys.path.append(os.getcwd()) print("Running testPureConvection.py...") successful, Msg = benchmarking.RunBenchmark( "test_pureconvectionsolver_benchmarking.py", "test_pureconvectionsolver_benchmarking_ref.txt") if (successful == True): Text += "OK\n" print("testPureConvection example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("testPureConvection example FAILED") os.chdir("..") # Add other examples here # print("resume of all of the examples for the fluid application :") print(Text) return Text
def Run(): Msg = "" Text = "===== Solid Mechanics Application =====\n" print("---start solid mechanics application tests---") print("---they must fail: ") print(" ProjectParameters.json update is needed---") # # SOLID 2D elements tests # Thin Plate Axial Load Text += "2D Small Displacements Plane Stress Axial Load test: " os.chdir("1_Thin_plate_Axial_load.gid") sys.path.append(os.getcwd()) print("running the 2D Small Displacements Plane Stress Axial Load test...") successful, Msg = benchmarking.RunBenchmark("run_test.py", "benchmark_results.txt") if (successful == True): Text += "OK\n" print("2D Small Displacements Plane Stress Axial Load test successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("2D Small Displacements Plane Stress Axial Load test FAILED") os.chdir("..") # Thin Plate Self Weight Text += "2D Large Displacements Plane Strain Self Weight test: " os.chdir("2_Thin_plate_Selfweight.gid") sys.path.append(os.getcwd()) print( "running the 2D Large Displacements Plane Strain Self Weight test...") successful, Msg = benchmarking.RunBenchmark("run_test.py", "benchmark_results.txt") if (successful == True): Text += "OK\n" print( "2D Large Displacements Plane Strain Self Weight test successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("2D Large Displacements Plane Strain Self Weight test FAILED") os.chdir("..") # Plane Strain Text += "2D Isotropic Damage Plane Stress SimoJu test: " os.chdir("IsotropicDamageSimoJuPlaneStress_FourPointShearTest.gid") sys.path.append(os.getcwd()) print("running the 2D Isotropic Damage Plane Stress SimoJu test...") successful, Msg = benchmarking.RunBenchmark("run_test.py", "benchmark_results.txt") if (successful == True): Text += "OK\n" print("2D Isotropic Damage Plane Stress SimoJu test successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("2D Isotropic Damage Plane Stress SimoJu test FAILED") os.chdir("..") # # SOLID 2D elements tests # Bending 3D Beam Text += "3D Small Displacements Linear Elastic Point Load test: " os.chdir("4_Flexion_3D_Beam.gid") sys.path.append(os.getcwd()) print( "running the 3D Small Displacements Linear Elastic Point Load test...") successful, Msg = benchmarking.RunBenchmark("run_test.py", "benchmark_results.txt") if (successful == True): Text += "OK\n" print( "3D Small Displacements Linear Elastic Point Load test successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("3D Small Displacements Linear Elastic Point Load test FAILED") os.chdir("..") # Z cantilever Text += "3D Large Displacements Hyper Elastic Point Load test: " os.chdir("4_Flexion_3D_Beam.gid") sys.path.append(os.getcwd()) print( "running the 3D Large Displacements Hyper Elastic Point Load test...") successful, Msg = benchmarking.RunBenchmark("run_test.py", "benchmark_results.txt") if (successful == True): Text += "OK\n" print( "3D Large Displacements Hyper Elastic Point Load test successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("3D Large Displacements Hyper Elastic Point Load test FAILED") os.chdir("..") # # print("---end solid mechanics application tests---") print("resume of all of the examples for the SolidMechanicsApplication :") print(Text) return Text
def Run(): print("Running Shell Q4 Thick Drilling RollUp") return benchmarking.RunBenchmark("run_test.py", "benchmark_results.txt")
def Run(): Msg = "" Text = "== PFEM ==========\n" # dam2d # # Text += "dam_2d: " # os.chdir("dam2d.gid") # sys.path.append(os.getcwd()) # # print "running the pfem dam2d benchmark test..." # successful,Msg = benchmarking.RunBenchmark("dam2d.py","dam2d_ref.txt") # # if (Msg == True): # Text += "OK\n" # print "pfem dam2d test example successful" # else: # Text += "FAILED\n" # Text += Msg # Text += "\n\n" # print "pfem dam2d test example FAILED" # # # os.chdir("..") # # dam 2D NON-NEWTONIAN Text += "dam_2d_Non-Newtonian: " os.chdir("dam2dNonNewt_Y1500.gid") sys.path.append(os.getcwd()) print("running the dam2dNonNewt benchmark test...") successful, Msg = benchmarking.RunBenchmark("dam2dNonNewt.py", "dam2dNonNewt_ref.txt") if (successful == True): Text += "OK\n" print("dam2dNonNewt example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("dam2dNonNewt example FAILED") os.chdir("..") # # slope 2D NON-NEWTONIAN COUPLED Text += "coupled_slope_2d_Non-Newtonian: " os.chdir("Coupled_slope2dNonNewt.gid") sys.path.append(os.getcwd()) print("running the CoupledNonNewtSlope benchmark test...") successful, Msg = benchmarking.RunBenchmark("CoupledNonNewtSlope.py", "CoupledNonNewtSlope_ref.txt") if (successful == True): Text += "OK\n" print("CoupledNonNewtSlope example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("CoupledNonNewtSlope example FAILED") os.chdir("..") # # slope 2D COUETTE NON-NEWTONIAN Text += "COUETTE_2d_Non-Newtonian: " os.chdir("CouetteNonNewtonian2d.gid") sys.path.append(os.getcwd()) print("running the Couette2dNonNewt benchmark test...") successful, Msg = benchmarking.RunBenchmark("Couette2dNonNewt.py", "Couette2dNonNewt_ref.txt") if (successful == True): Text += "OK\n" print("Couette2dNonNewt example successful") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("Couette2dNonNewt example FAILED") os.chdir("..") # # Add other examples here # print("resume of all of the examples for the pfem application :") print(Text) return Text
from __future__ import print_function, absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7 import sys kratos_benchmarking_path = '../../../../benchmarking' sys.path.append(kratos_benchmarking_path) import benchmarking Text = " " # print("verifying Couette2dNonNewt.py...") successful,Msg = benchmarking.RunBenchmark("Couette2dNonNewt.py", "Couette2dNonNewt_ref.txt") if(successful==True): Text += "OK\n" print("Couette2dNonNewt example SUCCESFUL") else: Text += "FAILED\n" Text += Msg Text += "\n\n" print("Couette2dNonNewt example FAILED") print(Text)
from __future__ import print_function, absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7 import sys kratos_benchmarking_path = '../../../../benchmarking' sys.path.append(kratos_benchmarking_path) import benchmarking print("running the benchmark for edgebased_fixed_press test...") successful, Msg = benchmarking.RunBenchmark( "run_benchmark.py", "benchmark_reference_solution.txt") if (successful == True): print("edgebased_fixed_press test example successful") else: print("edgebased_fixed_press test example FAILED")
def Run(): print("Running Fractional step element test: 2D cavity flow") return benchmarking.RunBenchmark("fs_benchmark.py", "fs_benchmark_ref.txt")