From c98d59519c166f6813048f69880d583c6de1ee91 Mon Sep 17 00:00:00 2001 From: Maximilian Dinkel Date: Tue, 25 Feb 2025 11:15:09 +0100 Subject: [PATCH] fix: 4C input DAMPING parameter --- .../fourc/coarse_plate_dirichlet_template.dat | 4 ++-- .../third_party/fourc/solid_runtime_hex8.dat | 2 +- tests/integration_tests/fourc/test_fourc_mc.py | 14 ++++++-------- .../fourc/test_fourc_mc_random_field_ensight.py | 14 ++++++-------- 4 files changed, 15 insertions(+), 19 deletions(-) diff --git a/tests/input_files/third_party/fourc/coarse_plate_dirichlet_template.dat b/tests/input_files/third_party/fourc/coarse_plate_dirichlet_template.dat index 33c0fb69d..120a9278d 100644 --- a/tests/input_files/third_party/fourc/coarse_plate_dirichlet_template.dat +++ b/tests/input_files/third_party/fourc/coarse_plate_dirichlet_template.dat @@ -12,7 +12,7 @@ DIM 3 -----------------------------------------------------DISCRETISATION NUMSTRUCDIS 1 --------------------------------------------------------PROBLEM TYPE -PROBLEMTYPE Structure +PROBLEMTYPE Structure RESTART 0 SHAPEFCT Polynomial -----------------------------------------------------------------IO @@ -30,7 +30,7 @@ NLNSOL fullnewton TIMESTEP 0.025 NUMSTEP 40 MAXTIME 1.0 -DAMPING no +DAMPING None M_DAMP 0.001 K_DAMP 0.001 PREDICT ConstDisVelAcc diff --git a/tests/input_files/third_party/fourc/solid_runtime_hex8.dat b/tests/input_files/third_party/fourc/solid_runtime_hex8.dat index 5987c3435..92a6ef087 100644 --- a/tests/input_files/third_party/fourc/solid_runtime_hex8.dat +++ b/tests/input_files/third_party/fourc/solid_runtime_hex8.dat @@ -4,7 +4,7 @@ hex8 discretization tested date: 19.12.2024 -------------------------------------------------------------------PROBLEM TYPE -PROBLEMTYPE Structure +PROBLEMTYPE Structure ----------------------------------------------------------------------------IO OUTPUT_BIN yes STRUCT_DISP yes diff --git a/tests/integration_tests/fourc/test_fourc_mc.py b/tests/integration_tests/fourc/test_fourc_mc.py index 4101e8548..1b0775311 100644 --- a/tests/integration_tests/fourc/test_fourc_mc.py +++ b/tests/integration_tests/fourc/test_fourc_mc.py @@ -75,24 +75,22 @@ def test_fourc_mc( global_settings=global_settings, ) - # Actual analysis - run_iterator(iterator, global_settings=global_settings) + try: + # Actual analysis + run_iterator(iterator, global_settings=global_settings) - # Load results - results = load_result(global_settings.result_file(".pickle")) + # Load results + results = load_result(global_settings.result_file(".pickle")) - try: # assert statements np.testing.assert_array_almost_equal( results["raw_output_data"]["result"], fourc_example_expected_output, decimal=6 ) - except (AssertionError, KeyError) as error: + except Exception as error: experiment_dir = experiment_directory(global_settings.experiment_name) job_dir = experiment_dir / "0" _logger.info(list(job_dir.iterdir())) output_dir = job_dir / "output" _logger.info(list(output_dir.iterdir())) - - _logger.info(read_file(output_dir / "test_fourc_mc_0.err")) _logger.info(read_file(output_dir / "test_fourc_mc_0.log")) raise error diff --git a/tests/integration_tests/fourc/test_fourc_mc_random_field_ensight.py b/tests/integration_tests/fourc/test_fourc_mc_random_field_ensight.py index 5869bf0b1..525b11e44 100644 --- a/tests/integration_tests/fourc/test_fourc_mc_random_field_ensight.py +++ b/tests/integration_tests/fourc/test_fourc_mc_random_field_ensight.py @@ -127,24 +127,22 @@ def test_write_random_material_to_dat( global_settings=global_settings, ) - # Actual analysis - run_iterator(iterator, global_settings=global_settings) + try: + # Actual analysis + run_iterator(iterator, global_settings=global_settings) - # Load results - results = load_result(global_settings.result_file(".pickle")) + # Load results + results = load_result(global_settings.result_file(".pickle")) - try: # Check if we got the expected results np.testing.assert_array_almost_equal(results["mean"], expected_mean, decimal=8) np.testing.assert_array_almost_equal(results["var"], expected_var, decimal=8) - except (AssertionError, KeyError) as error: + except Exception as error: experiment_dir = experiment_directory(global_settings.experiment_name) job_dir = experiment_dir / "0" _logger.info(list(job_dir.iterdir())) output_dir = job_dir / "output" _logger.info(list(output_dir.iterdir())) - - _logger.info(read_file(output_dir / "test_write_random_material_to_dat_0.err")) _logger.info(read_file(output_dir / "test_write_random_material_to_dat_0.log")) raise error