aboutsummaryrefslogtreecommitdiff
path: root/Examples/Tests/particles_in_PML/analysis_particles_in_pml.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/Tests/particles_in_PML/analysis_particles_in_pml.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/Tests/particles_in_PML/analysis_particles_in_pml.py')
-rwxr-xr-xExamples/Tests/particles_in_PML/analysis_particles_in_pml.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Examples/Tests/particles_in_PML/analysis_particles_in_pml.py b/Examples/Tests/particles_in_PML/analysis_particles_in_pml.py
index ce796cdb9..94612eeda 100755
--- a/Examples/Tests/particles_in_PML/analysis_particles_in_pml.py
+++ b/Examples/Tests/particles_in_PML/analysis_particles_in_pml.py
@@ -20,6 +20,8 @@ charge, with associated fields, behind them.
import sys
import yt
yt.funcs.mylog.setLevel(0)
+sys.path.insert(1, '../../../../warpx/Regression/Checksum/')
+import checksumAPI
# Open plotfile specified in command line
filename = sys.argv[1]
@@ -45,3 +47,5 @@ else:
print("tolerance_abs: " + str(tolerance_abs))
assert max_Efield < tolerance_abs
+test_name = filename[:-9] # Could also be os.path.split(os.getcwd())[1]
+checksumAPI.evaluate_checksum(test_name, filename)