From 9560b639d233567aa9eb5c52f9cfd58d4952256e Mon Sep 17 00:00:00 2001 From: Justin Angus Date: Thu, 11 Jul 2024 10:29:38 -0700 Subject: [PATCH] moved checksum to before error assert for intraspecies DD fusion regression test analysis script. --- .../analysis_deuterium_deuterium_3d_intraspecies.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Examples/Tests/nuclear_fusion/analysis_deuterium_deuterium_3d_intraspecies.py b/Examples/Tests/nuclear_fusion/analysis_deuterium_deuterium_3d_intraspecies.py index 70178fe97a6..adf91f2cc9e 100755 --- a/Examples/Tests/nuclear_fusion/analysis_deuterium_deuterium_3d_intraspecies.py +++ b/Examples/Tests/nuclear_fusion/analysis_deuterium_deuterium_3d_intraspecies.py @@ -45,11 +45,13 @@ V = (2e-3)**3 # simulation volume in m^3 sigma = dY_dt*(1+delta_ij)/(nD**2)/V*(1e2)**3 +# Compare checksums with benchmark +test_name = os.path.split(os.getcwd())[1] +checksumAPI.evaluate_checksum(test_name, fn) + sigma_th = 2.603e-18 error = np.abs(sigma-sigma_th)/sigma_th tolerance = 1e-2 +print('error = ', error) +print('tolerance = ', tolerance) assert error < tolerance - -# Compare checksums with benchmark -test_name = os.path.split(os.getcwd())[1] -checksumAPI.evaluate_checksum(test_name, fn)