aboutsummaryrefslogtreecommitdiff
path: root/Examples/Modules/RigidInjection/analysis_rigid_injection_LabFrame.py
diff options
context:
space:
mode:
authorGravatar MaxThevenet <mthevenet@lbl.gov> 2020-06-03 14:40:32 -0700
committerGravatar GitHub <noreply@github.com> 2020-06-03 14:40:32 -0700
commit22c5f32eb1ec0f61e3a17cb2e2b2dcb0d411eacd (patch)
tree15236b2b4535ed840a02b7f2ba0a92d248897118 /Examples/Modules/RigidInjection/analysis_rigid_injection_LabFrame.py
parent36b4ef471cbc72b739cee2027f4dc420e1d20608 (diff)
downloadWarpX-22c5f32eb1ec0f61e3a17cb2e2b2dcb0d411eacd.tar.gz
WarpX-22c5f32eb1ec0f61e3a17cb2e2b2dcb0d411eacd.tar.zst
WarpX-22c5f32eb1ec0f61e3a17cb2e2b2dcb0d411eacd.zip
Add checksum regression tests (#1065)
* add a checksum module for regtests * All capabilities to checksum tests * update tests to generate a clean benchmark * call checksum tests from analysis scripts * Add checksum json benchmarks * add missing script, better printing and increase tol * eol * fix permission, and bump tolerance * chmod +x checksumAPI.py * update benchmarks, probably old ones were wrong due to parallelization * remove unused variable, thanks lgtm * special handling when the benchmark is 0 * non-zero but very small CFL for 1 step for init tests * reset erroneous Python benchmarks * slightly bump tolerance for initial distribution test * too small dr results in nans * improve prints, tolerance handling, and fix tests * typo * enable tolerance and fields/particles optional comparison to fix tests * more minor cleaning in space charge initialization tests * update Python benchmarks for serial runs * Run Python tests with 1 rank instead of 2 * fields that are zero should not be in reg tests * Add developer documentation on checksum regression tests Co-authored-by: Tools <warpx@lbl.gov>
Diffstat (limited to 'Examples/Modules/RigidInjection/analysis_rigid_injection_LabFrame.py')
-rwxr-xr-xExamples/Modules/RigidInjection/analysis_rigid_injection_LabFrame.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Examples/Modules/RigidInjection/analysis_rigid_injection_LabFrame.py b/Examples/Modules/RigidInjection/analysis_rigid_injection_LabFrame.py
index 380212adb..2c97483fd 100755
--- a/Examples/Modules/RigidInjection/analysis_rigid_injection_LabFrame.py
+++ b/Examples/Modules/RigidInjection/analysis_rigid_injection_LabFrame.py
@@ -24,6 +24,8 @@ import sys
import yt
import numpy as np
yt.funcs.mylog.setLevel(0)
+sys.path.insert(1, '../../../../warpx/Regression/Checksum/')
+import checksumAPI
filename = sys.argv[1]
@@ -79,3 +81,6 @@ print("error_rel : " + str(error_rel))
print("tolerance_rel: " + str(tolerance_rel))
assert( error_rel < tolerance_rel )
+
+test_name = filename[:-9] # Could also be os.path.split(os.getcwd())[1]
+checksumAPI.evaluate_checksum(test_name, filename)