Skip to content

Commit b43fcd9

Browse files
committed
Updated scripts and tried to reduce size of the 2d dataset
1 parent 2bb92f7 commit b43fcd9

3 files changed

Lines changed: 9 additions & 7 deletions

File tree

scripts/warp_2d_script.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
Otherwise, one can just type exit()
1212
"""
1313
# Import warp-specific packages
14-
from warp_init_tools import *
14+
from warp.init_tools import *
1515

1616
# -----------------------------------------------------------------------------
1717
# Parameters (Modify the values below to suit your needs)
@@ -59,7 +59,7 @@
5959
# Diagnostics
6060
# -----------
6161
# Period of diagnostics (in number of timesteps)
62-
diag_period = 100
62+
diag_period = 25
6363
# Whether to write the fields
6464
write_fields = 1
6565
# Whether to write the particles
@@ -128,9 +128,9 @@
128128
# Number of macroparticles per cell in each direction
129129
# In Circ, nppcelly is the number of particles along the
130130
# azimuthal direction. Use a multiple of 4*circ_m
131-
plasma_nx = 2
131+
plasma_nx = 1
132132
plasma_ny = 4
133-
plasma_nz = 2
133+
plasma_nz = 1
134134

135135
# Plasma content and profile
136136
# --------------------------
@@ -274,6 +274,7 @@ def beam_dens_func(x, y, z):
274274
beam_nz, dim, circ_m )
275275
beam = Species(type=Electron, weight=beam_weight, name='beam')
276276
# Set the numerical parameters only now: they affect the newly created species
277+
top.ssnpid = nextpid()
277278
set_numerics( depos_order, efetch, particle_pusher, dim)
278279

279280
# Setup the field solver object
@@ -322,13 +323,14 @@ def beam_dens_func(x, y, z):
322323
if write_fields == 1:
323324
diag1 = FieldDiagnostic( period=diag_period, top=top, w3d=w3d, em=em,
324325
comm_world=comm_world, lparallel_output=parallel_output,
325-
write_dir='./example-2d' )
326+
write_dir='./example-2d', fieldtypes=["E", "rho"] )
326327
installafterstep( diag1.write )
327328
if write_particles == 1:
328329
species_dict = { species.name : species for species in listofallspecies \
329330
if not( species.name in ["Hydrogen0+", "electron from Hydrogen"] )}
330331
diag2 = ParticleDiagnostic( period=diag_period, top=top, w3d=w3d,
331332
species=species_dict, write_dir='./example-2d',
333+
particle_data={"position","momentum","weighting","id"},
332334
comm_world=comm_world, lparallel_output=parallel_output )
333335
installafterstep( diag2.write )
334336

scripts/warp_3d_script.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
Otherwise, one can just type exit()
1212
"""
1313
# Import warp-specific packages
14-
from warp_init_tools import *
14+
from warp.init_tools import *
1515

1616
# -----------------------------------------------------------------------------
1717
# Parameters (Modify the values below to suit your needs)

scripts/warp_thetaMode_script.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
Otherwise, one can just type exit()
1212
"""
1313
# Import warp-specific packages
14-
from warp_init_tools import *
14+
from warp.init_tools import *
1515

1616
# -----------------------------------------------------------------------------
1717
# Parameters (Modify the values below to suit your needs)

0 commit comments

Comments
 (0)