From 83f9accc7ccab3c84cfa889f8336efbddfb0494c Mon Sep 17 00:00:00 2001 From: Feng Wang Date: Tue, 29 Oct 2024 18:12:29 +0100 Subject: [PATCH] regression test --- ...ObserverCenterPoint_TurbulentViscosity.xml | 36 ++++++++++++++++++ ...rPoint_TurbulentViscosity_Run_0_result.xml | 9 +++++ ...rPoint_TurbulentViscosity_Run_1_result.xml | 9 +++++ ...rPoint_TurbulentViscosity_Run_2_result.xml | 9 +++++ ...rPoint_TurbulentViscosity_Run_3_result.xml | 9 +++++ ...rPoint_TurbulentViscosity_Run_4_result.xml | 9 +++++ ...rPoint_TurbulentViscosity_Run_5_result.xml | 9 +++++ ...erPoint_TurbulentViscosity_dtwdistance.xml | 4 ++ ...enterPoint_TurbulentViscosity_runtimes.dat | 3 ++ .../regression_test_tool.py | 38 +++++++++++++++++++ 10 files changed, 135 insertions(+) create mode 100644 tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity.xml create mode 100644 tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_Run_0_result.xml create mode 100644 tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_Run_1_result.xml create mode 100644 tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_Run_2_result.xml create mode 100644 tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_Run_3_result.xml create mode 100644 tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_Run_4_result.xml create mode 100644 tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_Run_5_result.xml create mode 100644 tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_dtwdistance.xml create mode 100644 tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_runtimes.dat create mode 100644 tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/regression_test_tool.py diff --git a/tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity.xml b/tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity.xml new file mode 100644 index 0000000000..bddb4c5ad6 --- /dev/null +++ b/tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_Run_0_result.xml b/tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_Run_0_result.xml new file mode 100644 index 0000000000..9d78485c94 --- /dev/null +++ b/tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_Run_0_result.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_Run_1_result.xml b/tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_Run_1_result.xml new file mode 100644 index 0000000000..690c721674 --- /dev/null +++ b/tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_Run_1_result.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_Run_2_result.xml b/tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_Run_2_result.xml new file mode 100644 index 0000000000..08c6af352d --- /dev/null +++ b/tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_Run_2_result.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_Run_3_result.xml b/tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_Run_3_result.xml new file mode 100644 index 0000000000..50c0321c2d --- /dev/null +++ b/tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_Run_3_result.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_Run_4_result.xml b/tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_Run_4_result.xml new file mode 100644 index 0000000000..ea0c0e826b --- /dev/null +++ b/tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_Run_4_result.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_Run_5_result.xml b/tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_Run_5_result.xml new file mode 100644 index 0000000000..b2960c0d15 --- /dev/null +++ b/tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_Run_5_result.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_dtwdistance.xml b/tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_dtwdistance.xml new file mode 100644 index 0000000000..c17a876ffe --- /dev/null +++ b/tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_dtwdistance.xml @@ -0,0 +1,4 @@ + + + + diff --git a/tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_runtimes.dat b/tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_runtimes.dat new file mode 100644 index 0000000000..de07de18db --- /dev/null +++ b/tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/ObserverCenterPoint_TurbulentViscosity_runtimes.dat @@ -0,0 +1,3 @@ +true +6 +4 \ No newline at end of file diff --git a/tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/regression_test_tool.py b/tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/regression_test_tool.py new file mode 100644 index 0000000000..20f68caeb8 --- /dev/null +++ b/tests/extra_source_and_tests/test_2d_turbulent_channel/regression_test_tool/regression_test_tool.py @@ -0,0 +1,38 @@ +# !/usr/bin/env python3 +import os +import sys + +path = os.path.abspath('../../../../../PythonScriptStore/RegressionTest') +sys.path.append(path) +from regression_test_base_tool import SphinxsysRegressionTest + +""" +case name: 2d_turbulent_channel_VI_offset_model +""" + +case_name = "2d_turbulent_channel_VI_offset_model" +body_name = "ObserverCenterPoint" +parameter_name = "TurbulentViscosity" + + +number_of_run_times = 0 +converged = 0 +sphinxsys = SphinxsysRegressionTest(case_name, body_name, parameter_name) + + +while True: + print("Now start a new run......") + sphinxsys.run_case() + number_of_run_times += 1 + converged = sphinxsys.read_dat_file() + print("Please note: This is the", number_of_run_times, "run!") + if number_of_run_times <= 100: + if (converged == "true"): + print("The tested parameters of all variables are converged, and the run will stop here!") + break + elif converged != "true": + print("The tested parameters of", sphinxsys.sphinxsys_parameter_name, "are not converged!") + continue + else: + print("It's too many runs but still not converged, please try again!") + break