Skip to content

Commit

Permalink
Fix broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
EZoni committed Aug 16, 2024
1 parent 942e9c0 commit e1e6bf4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions Examples/Tests/collision/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ add_warpx_test(
OFF # eb
Examples/Tests/collision/inputs_3d_test_collision_xyz # inputs
Examples/Tests/collision/analysis_collision_3d.py # analysis
collision_xyz_plt000150 # output
diags/diag1000150 # output
)

# collision_xz ################################################################
Expand All @@ -58,7 +58,7 @@ add_warpx_test(
OFF # eb
Examples/Tests/collision/inputs_2d_test_collision_xz # inputs
Examples/Tests/collision/analysis_collision_2d.py # analysis
collision_xz_plt000150 # output
diags/diag1000150 # output
)

# collision_xz_picmi ##########################################################
Expand All @@ -70,5 +70,5 @@ add_warpx_test(
OFF # eb
Examples/Tests/collision/inputs_2d_test_collision_xz_picmi.py # inputs
Examples/Tests/collision/analysis_collision_2d.py # analysis
collision_xz_plt000150 # output
diags/diag1000150 # output
)
10 changes: 8 additions & 2 deletions Examples/Tests/collision/analysis_collision_2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
sys.path.insert(1, '../../../../warpx/Regression/Checksum/')
import checksumAPI

test_name = os.path.split(os.getcwd())[1]

tolerance = 0.001

ng = 64
Expand All @@ -61,6 +63,11 @@
# Collect all output files in fn_list (names match pattern prefix + arbitrary number)
fn_list = glob.glob(prefix + '*[0-9]')

print(last_fn)
print(last_it)
print(prefix)
print(fn_list)

error = 0.0
nt = 0
for fn in fn_list:
Expand All @@ -86,7 +93,7 @@

# The second part of the analysis is not done for the Python test
# since the particle filter function is not accessible from PICMI yet
if "Python" in last_fn:
if "picmi" in test_name:
exit()

## In the second part of the test, we verify that the diagnostic particle filter function works as
Expand All @@ -110,5 +117,4 @@
post_processing_utils.check_random_filter(last_fn, random_filter_fn, random_fraction,
dim, species_name)

test_name = os.path.split(os.getcwd())[1]
checksumAPI.evaluate_checksum(test_name, last_fn)
1 change: 0 additions & 1 deletion Examples/Tests/collision/inputs_2d_test_collision_xz
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ diagnostics.diags_names = diag1 diag_parser_filter diag_uniform_filter diag_rand
diag1.intervals = 10
diag1.diag_type = Full
diag1.fields_to_plot = Ex Ey Ez Bx By Bz
diag1.file_prefix = collisionXZ_plt

## diag_parser_filter is a diag used to test the particle filter function.
diag_parser_filter.intervals = 150:150:
Expand Down
4 changes: 0 additions & 4 deletions Examples/Tests/collision/inputs_2d_test_collision_xz_picmi.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,12 @@
particle_diag = picmi.ParticleDiagnostic(
name='diag1',
period=10,
write_dir='.',
warpx_file_prefix='collision_xz_picmi_plt'
)
field_diag = picmi.FieldDiagnostic(
name='diag1',
grid=grid,
period=10,
data_list=[],
write_dir='.',
warpx_file_prefix='collision_xz_picmi_plt'
)

#################################
Expand Down
1 change: 0 additions & 1 deletion Examples/Tests/collision/inputs_3d_test_collision_xyz
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ diagnostics.diags_names = diag1 diag_parser_filter diag_uniform_filter diag_rand
diag1.intervals = 10
diag1.diag_type = Full
diag1.fields_to_plot = Ex Ey Ez Bx By Bz T_electron T_ion
diag1.file_prefix = collisionXYZ_plt

## diag_parser_filter is a diag used to test the particle filter function.
diag_parser_filter.intervals = 150:150:
Expand Down

0 comments on commit e1e6bf4

Please sign in to comment.