|
3 | 3 | # --- Input file for particle-boundary interaction testing in RZ.
|
4 | 4 | # --- This input is a simple case of reflection
|
5 | 5 | # --- of one electron on the surface of a sphere.
|
6 |
| - |
7 |
| -import argparse |
8 |
| - |
9 | 6 | import numpy as np
|
10 |
| - |
11 | 7 | from pywarpx import callbacks, particle_containers, picmi
|
12 | 8 |
|
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 |
| - |
23 | 9 | ##########################
|
24 | 10 | # numerics parameters
|
25 | 11 | ##########################
|
|
88 | 74 | period = diagnostic_interval,
|
89 | 75 | data_list = ['Er', 'Ez', 'phi', 'rho','rho_electrons'],
|
90 | 76 | 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' |
93 | 79 | )
|
94 | 80 |
|
95 | 81 | part_diag = picmi.ParticleDiagnostic(name = 'diag1',
|
96 | 82 | period = diagnostic_interval,
|
97 | 83 | species = [electrons],
|
98 | 84 | 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' |
101 | 87 | )
|
102 | 88 |
|
103 | 89 | ##########################
|
@@ -162,8 +148,7 @@ def mirror_reflection():
|
162 | 148 | elect_pc.add_particles(
|
163 | 149 | x=x + (dt-delta_t)*ux_reflect, y=y + (dt-delta_t)*uy_reflect, z=z + (dt-delta_t)*uz_reflect,
|
164 | 150 | ux=ux_reflect, uy=uy_reflect, uz=uz_reflect,
|
165 |
| - w=w, |
166 |
| - unique_particles=args.unique |
| 151 | + w=w |
167 | 152 | ) #adds the particle in the general particle container at the next step
|
168 | 153 | #### Can be modified depending to the model of interaction.
|
169 | 154 |
|
|
0 commit comments