Skip to content

Commit

Permalink
Cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
EZoni committed Oct 2, 2024
1 parent e9ac10f commit 2d7e944
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 12 deletions.
5 changes: 2 additions & 3 deletions Examples/Tests/electrostatic_dirichlet_bc/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,9 @@
assert np.allclose(potentials_lo, expected_potentials_lo, rtol=0.1)
assert np.allclose(potentials_hi, expected_potentials_hi, rtol=0.1)

# The PICMI and native input versions run the same test, so
# their results are compared to the same benchmark file
# compare checksums
test_name = os.path.split(os.getcwd())[1]
test_name = re.sub("_picmi", "", test_name)
test_name = re.sub("_picmi", "", test_name) # same checksums for PICMI test
evaluate_checksum(
test_name=test_name,
output_file=sys.argv[1],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def return_energies(iteration):
Ek_i + Ep_i
) # Check conservation of energy

# Checksum regression analysis
# compare checksums
evaluate_checksum(
test_name=os.path.split(os.getcwd())[1],
output_file=sys.argv[1],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# Check that the energy is conserved to 0.3%
assert np.all(abs(E - E[0]) / E[0] < 0.003)

# Checksum test
# compare checksums
evaluate_checksum(
test_name=os.path.split(os.getcwd())[1],
output_file=sys.argv[1],
Expand Down
5 changes: 2 additions & 3 deletions Examples/Tests/plasma_lens/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,9 @@ def applylens(x0, vx0, vz0, gamma, lens_length, lens_strength):
"error in y particle velocity"
)

# The PICMI and native input versions run the same test, so
# their results are compared to the same benchmark file
# compare checksums
test_name = os.path.split(os.getcwd())[1]
test_name = re.sub("_picmi", "", test_name)
test_name = re.sub("_picmi", "", test_name) # same checksums for PICMI test
evaluate_checksum(
test_name=test_name,
output_file=sys.argv[1],
Expand Down
2 changes: 1 addition & 1 deletion Examples/Tests/radiation_reaction/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def check():

assert error_rel < tolerance_rel

# compare checksum
# compare checksums
evaluate_checksum(
test_name=os.path.split(os.getcwd())[1],
output_file=sys.argv[1],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,9 @@ def get_efficiency(i):
# than non-load balanced case
assert efficiency_before < efficiency_after

# The PICMI and native input versions run the same test, so
# their results are compared to the same benchmark file
# compare checksums
test_name = os.path.split(os.getcwd())[1]
test_name = re.sub("_picmi", "", test_name)
test_name = re.sub("_picmi", "", test_name) # same checksums for PICMI test
evaluate_checksum(
test_name=test_name,
output_file=sys.argv[1],
Expand Down

0 comments on commit 2d7e944

Please sign in to comment.