Skip to content

Commit 8de78a1

Browse files
committed
Added corresponding dataset
1 parent b1d55c9 commit 8de78a1

2 files changed

Lines changed: 9 additions & 15 deletions

File tree

example-2d.tar.gz

12.8 MB
Binary file not shown.

scripts/warp_2d_script.py

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# Number of azimuthal modes beyond m=0, for "circ" (not used for "2d" and "3d")
2525
circ_m = 1
2626
# Total number of timesteps in the simulation
27-
N_steps = 500
27+
N_steps = 401
2828
# Whether to run the simulation interactively (0:off, 1:on)
2929
interactive = 0
3030

@@ -59,7 +59,7 @@
5959
# Diagnostics
6060
# -----------
6161
# Period of diagnostics (in number of timesteps)
62-
diag_period = 25
62+
diag_period = 5
6363
# Whether to write the fields
6464
write_fields = 1
6565
# Whether to write the particles
@@ -324,36 +324,30 @@ def beam_dens_func(x, y, z):
324324
diag1 = FieldDiagnostic( period=diag_period, top=top, w3d=w3d, em=em,
325325
comm_world=comm_world, lparallel_output=parallel_output,
326326
write_dir='./example-2d', fieldtypes=["E", "rho"] )
327-
installafterstep( diag1.write )
328327
if write_particles == 1:
329328
species_dict = { species.name : species for species in listofallspecies \
330329
if species.name == "electrons" }
331330
diag2 = ParticleDiagnostic( period=diag_period, top=top, w3d=w3d,
332331
species=species_dict, write_dir='./example-2d',
333332
particle_data={"position","momentum","weighting","id"},
334333
comm_world=comm_world, lparallel_output=parallel_output )
335-
installafterstep( diag2.write )
336334
species_dict = { species.name : species for species in listofallspecies \
337335
if species.name == "Hydrogen1+" }
338336
diag3 = ParticleDiagnostic( period=diag_period, top=top, w3d=w3d,
339337
species=species_dict, write_dir='./example-2d',
340-
particle_data={"position"},
338+
sub_sample=10,
341339
comm_world=comm_world, lparallel_output=parallel_output )
342-
installafterstep( diag3.write )
343340

344341
print('\nInitialization complete\n')
345342

346343
# -----------------------------------------------------------------------------
347344
# Simulation loop (Normal users should not modify this part either.)
348345
# -----------------------------------------------------------------------------
349346

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+
356353

357-
# Interactive mode
358-
elif interactive==1:
359-
print '<<< To execute n steps, type "step(n)" at the prompt >>>'

0 commit comments

Comments
 (0)