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 8657022
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
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],
)
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
}
}

0 comments on commit 8657022

Please sign in to comment.