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 a38774a commit 1497dfc
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
18 changes: 14 additions & 4 deletions Examples/Tests/particle_boundary_process/analysis_absorption.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
#!/usr/bin/env python3

import sys

import yt

# This test shoots a beam of electrons at cubic embedded boundary geometry
# At time step 40, none of the particles have hit the boundary yet. At time
# step 60, all of them should have been absorbed by the boundary. In the
# absence of the cube, none of the particles would have had time to exit
# the problem domain yet.

import os
import sys

import yt

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

# all particles are still there
ds40 = yt.load("diags/diag1000040")
np40 = ds40.index.particle_headers["electrons"].num_particles
Expand All @@ -20,3 +24,9 @@
ds60 = yt.load(filename)
np60 = ds60.index.particle_headers["electrons"].num_particles
assert np60 == 0

# compare checksums
evaluate_checksum(
test_name=os.path.split(os.getcwd())[1],
output_file=sys.argv[1],
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"lev=0": {
"Bx": 202106.71291347666,
"By": 202106.71291347663,
"Bz": 3371.897999274175,
"Ex": 38304043178806.11,
"Ey": 38304043178806.11,
"Ez": 83057027925874.84
}
}

0 comments on commit 1497dfc

Please sign in to comment.