Skip to content

Commit

Permalink
Add missing checksums
Browse files Browse the repository at this point in the history
  • Loading branch information
EZoni committed Oct 2, 2024
1 parent 2d7e944 commit f827d7e
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 21 deletions.
11 changes: 10 additions & 1 deletion Examples/Tests/embedded_boundary_python_api/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,17 @@
# This script just checks that the PICMI file executed successfully.
# If it did there will be a plotfile for the final step.

import os
import sys

step = int(sys.argv[1][-5:])
sys.path.insert(1, "../../../../warpx/Regression/Checksum/")
from checksumAPI import evaluate_checksum

step = int(sys.argv[1][-5:])
assert step == 2

# compare checksums
evaluate_checksum(
test_name=os.path.split(os.getcwd())[1],
output_file=sys.argv[1],
)
12 changes: 12 additions & 0 deletions Examples/Tests/field_probe/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,15 @@
which can be solved analytically.
"""

import os
import sys

import numpy as np
import pandas as pd

sys.path.insert(1, "../../../../warpx/Regression/Checksum/")
from checksumAPI import evaluate_checksum

filename = "diags/reducedfiles/FP_line.txt"

# Open data file
Expand Down Expand Up @@ -59,3 +65,9 @@ def I_envelope(x, lam=0.2e-6, a=0.3e-6, D=1.7e-6):
print("Average error greater than 2.5%")

assert averror < 2.5

# compare checksums
evaluate_checksum(
test_name=os.path.split(os.getcwd())[1],
output_file=sys.argv[1],
)
2 changes: 1 addition & 1 deletion Examples/Tests/particle_boundary_process/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ add_warpx_test(
2 # dims
1 # nprocs
inputs_test_2d_particle_reflection_picmi.py # inputs
analysis_reflection.py # analysis
analysis_default_regression.py # analysis
diags/diag1000010 # output
OFF # dependency
)
Expand Down
15 changes: 0 additions & 15 deletions Examples/Tests/particle_boundary_process/analysis_reflection.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,12 @@
particle_diag = picmi.ParticleDiagnostic(
name="diag1",
period=10,
write_dir=".",
warpx_file_prefix="Python_particle_reflection_plt",
)
field_diag = picmi.FieldDiagnostic(
grid=grid,
name="diag1",
data_list=["E"],
period=10,
write_dir=".",
warpx_file_prefix="Python_particle_reflection_plt",
)

##########################
Expand Down
10 changes: 10 additions & 0 deletions Regression/Checksum/benchmarks_json/test_2d_field_probe.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"lev=0": {
"Bx": 0.0,
"By": 126826.78487921853,
"Bz": 0.0,
"Ex": 32517064310550.266,
"Ey": 0.0,
"Ez": 17321323003697.61
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"lev=0": {
"Ex": 4.865922376234882e-11,
"Ey": 0.0,
"Ez": 2.3293326580399806e-10
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"lev=0": {
"Ex": 0.0
}
}

0 comments on commit f827d7e

Please sign in to comment.