|
24 | 24 | # Number of azimuthal modes beyond m=0, for "circ" (not used for "2d" and "3d") |
25 | 25 | circ_m = 1 |
26 | 26 | # Total number of timesteps in the simulation |
27 | | -N_steps = 500 |
| 27 | +N_steps = 401 |
28 | 28 | # Whether to run the simulation interactively (0:off, 1:on) |
29 | 29 | interactive = 0 |
30 | 30 |
|
|
59 | 59 | # Diagnostics |
60 | 60 | # ----------- |
61 | 61 | # Period of diagnostics (in number of timesteps) |
62 | | -diag_period = 25 |
| 62 | +diag_period = 5 |
63 | 63 | # Whether to write the fields |
64 | 64 | write_fields = 1 |
65 | 65 | # Whether to write the particles |
@@ -324,36 +324,30 @@ def beam_dens_func(x, y, z): |
324 | 324 | diag1 = FieldDiagnostic( period=diag_period, top=top, w3d=w3d, em=em, |
325 | 325 | comm_world=comm_world, lparallel_output=parallel_output, |
326 | 326 | write_dir='./example-2d', fieldtypes=["E", "rho"] ) |
327 | | - installafterstep( diag1.write ) |
328 | 327 | if write_particles == 1: |
329 | 328 | species_dict = { species.name : species for species in listofallspecies \ |
330 | 329 | if species.name == "electrons" } |
331 | 330 | diag2 = ParticleDiagnostic( period=diag_period, top=top, w3d=w3d, |
332 | 331 | species=species_dict, write_dir='./example-2d', |
333 | 332 | particle_data={"position","momentum","weighting","id"}, |
334 | 333 | comm_world=comm_world, lparallel_output=parallel_output ) |
335 | | - installafterstep( diag2.write ) |
336 | 334 | species_dict = { species.name : species for species in listofallspecies \ |
337 | 335 | if species.name == "Hydrogen1+" } |
338 | 336 | diag3 = ParticleDiagnostic( period=diag_period, top=top, w3d=w3d, |
339 | 337 | species=species_dict, write_dir='./example-2d', |
340 | | - particle_data={"position"}, |
| 338 | + sub_sample=10, |
341 | 339 | comm_world=comm_world, lparallel_output=parallel_output ) |
342 | | - installafterstep( diag3.write ) |
343 | 340 |
|
344 | 341 | print('\nInitialization complete\n') |
345 | 342 |
|
346 | 343 | # ----------------------------------------------------------------------------- |
347 | 344 | # Simulation loop (Normal users should not modify this part either.) |
348 | 345 | # ----------------------------------------------------------------------------- |
349 | 346 |
|
350 | | -# Non-interactive mode |
351 | | -if interactive==0: |
352 | | - n_stepped=0 |
353 | | - while n_stepped < N_steps: |
354 | | - step(10) |
355 | | - n_stepped = n_stepped + 10 |
| 347 | +step(250) |
| 348 | +installafterstep( diag1.write ) |
| 349 | +installafterstep( diag2.write ) |
| 350 | +installafterstep( diag3.write ) |
| 351 | +step(151) |
| 352 | + |
356 | 353 |
|
357 | | -# Interactive mode |
358 | | -elif interactive==1: |
359 | | - print '<<< To execute n steps, type "step(n)" at the prompt >>>' |
0 commit comments