Skip to content

Commit 773cf82

Browse files
authored
Update PICMI_inputs_rz.py
1 parent 2decfa3 commit 773cf82

File tree

1 file changed

+5
-20
lines changed

1 file changed

+5
-20
lines changed

Examples/Tests/particle_boundary_interaction/PICMI_inputs_rz.py

+5-20
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,9 @@
33
# --- Input file for particle-boundary interaction testing in RZ.
44
# --- This input is a simple case of reflection
55
# --- of one electron on the surface of a sphere.
6-
7-
import argparse
8-
96
import numpy as np
10-
117
from pywarpx import callbacks, particle_containers, picmi
128

13-
# Create the parser and add the argument
14-
parser = argparse.ArgumentParser()
15-
parser.add_argument(
16-
'-u', '--unique', action='store_true',
17-
help="Whether injected particles should be treated as unique"
18-
)
19-
20-
# Parse the input
21-
args, left = parser.parse_known_args()
22-
239
##########################
2410
# numerics parameters
2511
##########################
@@ -88,16 +74,16 @@
8874
period = diagnostic_interval,
8975
data_list = ['Er', 'Ez', 'phi', 'rho','rho_electrons'],
9076
warpx_format = 'openpmd',
91-
#write_dir = '.',
92-
#warpx_file_prefix = 'particle_boundary_interaction_plt'
77+
write_dir = '.',
78+
warpx_file_prefix = 'particle_boundary_interaction_plt'
9379
)
9480

9581
part_diag = picmi.ParticleDiagnostic(name = 'diag1',
9682
period = diagnostic_interval,
9783
species = [electrons],
9884
warpx_format = 'openpmd',
99-
#write_dir = '.',
100-
#warpx_file_prefix = 'particle_boundary_interaction_plt'
85+
write_dir = '.',
86+
warpx_file_prefix = 'particle_boundary_interaction_plt'
10187
)
10288

10389
##########################
@@ -162,8 +148,7 @@ def mirror_reflection():
162148
elect_pc.add_particles(
163149
x=x + (dt-delta_t)*ux_reflect, y=y + (dt-delta_t)*uy_reflect, z=z + (dt-delta_t)*uz_reflect,
164150
ux=ux_reflect, uy=uy_reflect, uz=uz_reflect,
165-
w=w,
166-
unique_particles=args.unique
151+
w=w
167152
) #adds the particle in the general particle container at the next step
168153
#### Can be modified depending to the model of interaction.
169154

0 commit comments

Comments
 (0)