Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diagnostics: Fix Position Selection #4914

Merged
merged 6 commits into from
May 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Docs/source/usage/parameters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2689,10 +2689,11 @@ In-situ capabilities can be used by turning on Sensei or Ascent (provided they a

* ``<diag_name>.<species_name>.variables`` (list of `strings` separated by spaces, optional)
List of particle quantities to write to output.
Choices are ``w`` for the particle weight and ``ux`` ``uy`` ``uz`` for the particle momenta.
Choices are ``x``, ``y``, ``z`` for the particle positions (3D and RZ), ``x`` & ``z`` in 2D, ``z`` in 1D,
``w`` for the particle weight and ``ux``, ``uy``, ``uz`` for the particle momenta.
When using the lab-frame electrostatic solver, ``phi`` (electrostatic potential, on the macroparticles) is also available.
By default, all particle quantities (except ``phi``) are written.
If ``<diag_name>.<species_name>.variables = none``, no particle data are written, except for particle positions, which are always included.
If ``<diag_name>.<species_name>.variables = none``, no particle data are written.

* ``<diag_name>.<species_name>.random_fraction`` (`float`) optional
If provided ``<diag_name>.<species_name>.random_fraction = a``, only `a` fraction of the particle data of this species will be dumped randomly in diag ``<diag_name>``, i.e. if `rand() < a`, this particle will be dumped, where `rand()` denotes a random number generator.
Expand Down
4 changes: 2 additions & 2 deletions Examples/Physics_applications/laser_acceleration/inputs_rz
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,5 @@ diagnostics.diags_names = diag1
diag1.intervals = 10
diag1.diag_type = Full
diag1.fields_to_plot = Er Et Ez Br Bt Bz jr jt jz rho
diag1.electrons.variables = w ux uy uz orig_x orig_z
diag1.beam.variables = w ux uy uz
diag1.electrons.variables = x y z w ux uy uz orig_x orig_z
diag1.beam.variables = x y z w ux uy uz
2 changes: 1 addition & 1 deletion Examples/Physics_applications/uniform_plasma/inputs_3d
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ electrons.uz_th = 0.01 # uth the std of the (unitless) momentum
diagnostics.diags_names = diag1 chk
diag1.intervals = 4
diag1.diag_type = Full
diag1.electrons.variables = ux uy uz w
diag1.electrons.variables = x y z ux uy uz w
diag1.fields_to_plot = Bx By Bz Ex Ey Ez jx jy jz rho

chk.intervals = 6
Expand Down
4 changes: 2 additions & 2 deletions Examples/Tests/Implicit/inputs_1d
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ diagnostics.diags_names = diag1
diag1.intervals = 100
diag1.diag_type = Full
diag1.fields_to_plot = Ex Ey Ez Bx By Bz jx jy jz rho divE
diag1.electrons.variables = w ux uy uz
diag1.protons.variables = w ux uy uz
diag1.electrons.variables = z w ux uy uz
diag1.protons.variables = z w ux uy uz

warpx.reduced_diags_names = particle_energy field_energy
particle_energy.type = ParticleEnergy
Expand Down
4 changes: 2 additions & 2 deletions Examples/Tests/Implicit/inputs_1d_semiimplicit
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ diagnostics.diags_names = diag1
diag1.intervals = 100
diag1.diag_type = Full
diag1.fields_to_plot = Ex Ey Ez Bx By Bz jx jy jz rho divE
diag1.electrons.variables = w ux uy uz
diag1.protons.variables = w ux uy uz
diag1.electrons.variables = z w ux uy uz
diag1.protons.variables = z w ux uy uz

warpx.reduced_diags_names = particle_energy field_energy
particle_energy.type = ParticleEnergy
Expand Down
4 changes: 2 additions & 2 deletions Examples/Tests/Implicit/inputs_vandb_2d
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ diagnostics.diags_names = diag1
diag1.intervals = 20
diag1.diag_type = Full
diag1.fields_to_plot = Ex Ey Ez Bx By Bz jx jy jz rho divE
diag1.electrons.variables = w ux uy uz
diag1.protons.variables = w ux uy uz
diag1.electrons.variables = x z w ux uy uz
diag1.protons.variables = x z w ux uy uz

warpx.reduced_diags_names = particle_energy field_energy
particle_energy.type = ParticleEnergy
Expand Down
2 changes: 1 addition & 1 deletion Examples/Tests/electrostatic_sphere/inputs_rz
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ diag1.fields_to_plot = Er Et Ez rho
diag2.intervals = 30
diag2.diag_type = Full
diag2.fields_to_plot = none
diag2.electron.variables = ux uy uz w phi
diag2.electron.variables = x y z ux uy uz w phi
diag2.format = openpmd
4 changes: 2 additions & 2 deletions Examples/Tests/langmuir/inputs_3d
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,5 @@ diagnostics.diags_names = diag1
diag1.intervals = max_step
diag1.diag_type = Full
diag1.fields_to_plot = Ex Ey Ez Bx By Bz jx jy jz part_per_cell rho
diag1.electrons.variables = w ux
diag1.positrons.variables = uz
diag1.electrons.variables = x y z w ux
diag1.positrons.variables = x y z uz
32 changes: 16 additions & 16 deletions Examples/Tests/photon_pusher/inputs_3d
Original file line number Diff line number Diff line change
Expand Up @@ -140,19 +140,19 @@ p_dn_10.single_particle_weight = 1.0
diagnostics.diags_names = diag1
diag1.intervals = 50
diag1.diag_type = Full
diag1.p_xp_1.variables = ux uy uz
diag1.p_xn_1.variables = ux uy uz
diag1.p_yp_1.variables = ux uy uz
diag1.p_yn_1.variables = ux uy uz
diag1.p_zp_1.variables = ux uy uz
diag1.p_zn_1.variables = ux uy uz
diag1.p_dp_1.variables = ux uy uz
diag1.p_dn_1.variables = ux uy uz
diag1.p_xp_10.variables = ux uy uz
diag1.p_xn_10.variables = ux uy uz
diag1.p_yp_10.variables = ux uy uz
diag1.p_yn_10.variables = ux uy uz
diag1.p_zp_10.variables = ux uy uz
diag1.p_zn_10.variables = ux uy uz
diag1.p_dp_10.variables = ux uy uz
diag1.p_dn_10.variables = ux uy uz
diag1.p_xp_1.variables = x y z ux uy uz
diag1.p_xn_1.variables = x y z ux uy uz
diag1.p_yp_1.variables = x y z ux uy uz
diag1.p_yn_1.variables = x y z ux uy uz
diag1.p_zp_1.variables = x y z ux uy uz
diag1.p_zn_1.variables = x y z ux uy uz
diag1.p_dp_1.variables = x y z ux uy uz
diag1.p_dn_1.variables = x y z ux uy uz
diag1.p_xp_10.variables = x y z ux uy uz
diag1.p_xn_10.variables = x y z ux uy uz
diag1.p_yp_10.variables = x y z ux uy uz
diag1.p_yn_10.variables = x y z ux uy uz
diag1.p_zp_10.variables = x y z ux uy uz
diag1.p_zn_10.variables = x y z ux uy uz
diag1.p_dp_10.variables = x y z ux uy uz
diag1.p_dn_10.variables = x y z ux uy uz
2 changes: 1 addition & 1 deletion Examples/Tests/plasma_lens/inputs_3d
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ particles.repeated_plasma_lens_strengths_B = 0.0 0.0 0.0 0.0
diagnostics.diags_names = diag1
diag1.intervals = 84
diag1.diag_type = Full
diag1.electrons.variables = ux uy uz
diag1.electrons.variables = x y z ux uy uz
2 changes: 1 addition & 1 deletion Examples/Tests/plasma_lens/inputs_boosted_3d
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ particles.repeated_plasma_lens_strengths_B = 0.0 0.0 0.0 0.0
diagnostics.diags_names = diag1
diag1.intervals = 84
diag1.diag_type = Full
diag1.electrons.variables = ux uy uz
diag1.electrons.variables = x y z ux uy uz
2 changes: 1 addition & 1 deletion Examples/Tests/plasma_lens/inputs_lattice_3d
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ plasmalens4.dEdx = 200000.
diagnostics.diags_names = diag1
diag1.intervals = 84
diag1.diag_type = Full
diag1.electrons.variables = ux uy uz
diag1.electrons.variables = x y z ux uy uz
2 changes: 1 addition & 1 deletion Examples/Tests/plasma_lens/inputs_short_3d
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ particles.repeated_plasma_lens_strengths_B = 0.0 0.0 0.0 0.0
diagnostics.diags_names = diag1
diag1.intervals = 1 #84
diag1.diag_type = Full
diag1.electrons.variables = ux uy uz
diag1.electrons.variables = x y z ux uy uz
28 changes: 14 additions & 14 deletions Examples/Tests/qed/breit_wheeler/inputs_2d
Original file line number Diff line number Diff line change
Expand Up @@ -201,19 +201,19 @@ diagnostics.diags_names = diag1
diag1.intervals = 2
diag1.diag_type = Full
diag1.fields_to_plot = Ex
diag1.p1.variables = ux uy uz w opticalDepthBW
diag1.p2.variables = ux uy uz w opticalDepthBW
diag1.p3.variables = ux uy uz w opticalDepthBW
diag1.p4.variables = ux uy uz w opticalDepthBW

diag1.ele1.variables = ux uy uz w opticalDepthQSR
diag1.ele2.variables = ux uy uz w opticalDepthQSR
diag1.ele3.variables = ux uy uz w opticalDepthQSR
diag1.ele4.variables = ux uy uz w opticalDepthQSR

diag1.pos1.variables = ux uy uz w opticalDepthQSR
diag1.pos2.variables = ux uy uz w opticalDepthQSR
diag1.pos3.variables = ux uy uz w opticalDepthQSR
diag1.pos4.variables = ux uy uz w opticalDepthQSR
diag1.p1.variables = x z ux uy uz w opticalDepthBW
diag1.p2.variables = x z ux uy uz w opticalDepthBW
diag1.p3.variables = x z ux uy uz w opticalDepthBW
diag1.p4.variables = x z ux uy uz w opticalDepthBW

diag1.ele1.variables = x z ux uy uz w opticalDepthQSR
diag1.ele2.variables = x z ux uy uz w opticalDepthQSR
diag1.ele3.variables = x z ux uy uz w opticalDepthQSR
diag1.ele4.variables = x z ux uy uz w opticalDepthQSR

diag1.pos1.variables = x z ux uy uz w opticalDepthQSR
diag1.pos2.variables = x z ux uy uz w opticalDepthQSR
diag1.pos3.variables = x z ux uy uz w opticalDepthQSR
diag1.pos4.variables = x z ux uy uz w opticalDepthQSR

diag1.format = plotfile
28 changes: 14 additions & 14 deletions Examples/Tests/qed/breit_wheeler/inputs_3d
Original file line number Diff line number Diff line change
Expand Up @@ -201,19 +201,19 @@ diagnostics.diags_names = diag1
diag1.intervals = 2
diag1.diag_type = Full
diag1.fields_to_plot = Ex
diag1.p1.variables = ux uy uz w opticalDepthBW
diag1.p2.variables = ux uy uz w opticalDepthBW
diag1.p3.variables = ux uy uz w opticalDepthBW
diag1.p4.variables = ux uy uz w opticalDepthBW

diag1.ele1.variables = ux uy uz w opticalDepthQSR
diag1.ele2.variables = ux uy uz w opticalDepthQSR
diag1.ele3.variables = ux uy uz w opticalDepthQSR
diag1.ele4.variables = ux uy uz w opticalDepthQSR

diag1.pos1.variables = ux uy uz w opticalDepthQSR
diag1.pos2.variables = ux uy uz w opticalDepthQSR
diag1.pos3.variables = ux uy uz w opticalDepthQSR
diag1.pos4.variables = ux uy uz w opticalDepthQSR
diag1.p1.variables = x y z ux uy uz w opticalDepthBW
diag1.p2.variables = x y z ux uy uz w opticalDepthBW
diag1.p3.variables = x y z ux uy uz w opticalDepthBW
diag1.p4.variables = x y z ux uy uz w opticalDepthBW

diag1.ele1.variables = x y z ux uy uz w opticalDepthQSR
diag1.ele2.variables = x y z ux uy uz w opticalDepthQSR
diag1.ele3.variables = x y z ux uy uz w opticalDepthQSR
diag1.ele4.variables = x y z ux uy uz w opticalDepthQSR

diag1.pos1.variables = x y z ux uy uz w opticalDepthQSR
diag1.pos2.variables = x y z ux uy uz w opticalDepthQSR
diag1.pos3.variables = x y z ux uy uz w opticalDepthQSR
diag1.pos4.variables = x y z ux uy uz w opticalDepthQSR

diag1.format = plotfile
18 changes: 9 additions & 9 deletions Examples/Tests/qed/quantum_synchrotron/inputs_2d
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,12 @@ diagnostics.diags_names = diag1
diag1.intervals = 2
diag1.diag_type = Full
diag1.fields_to_plot = Ex
diag1.p1.variables = ux uy uz w opticalDepthQSR
diag1.p2.variables = ux uy uz w opticalDepthQSR
diag1.p3.variables = ux uy uz w opticalDepthQSR
diag1.p4.variables = ux uy uz w opticalDepthQSR

diag1.qsp_1.variables = ux uy uz w opticalDepthBW
diag1.qsp_2.variables = ux uy uz w opticalDepthBW
diag1.qsp_3.variables = ux uy uz w opticalDepthBW
diag1.qsp_4.variables = ux uy uz w opticalDepthBW
diag1.p1.variables = x z ux uy uz w opticalDepthQSR
diag1.p2.variables = x z ux uy uz w opticalDepthQSR
diag1.p3.variables = x z ux uy uz w opticalDepthQSR
diag1.p4.variables = x z ux uy uz w opticalDepthQSR

diag1.qsp_1.variables = x z ux uy uz w opticalDepthBW
diag1.qsp_2.variables = x z ux uy uz w opticalDepthBW
diag1.qsp_3.variables = x z ux uy uz w opticalDepthBW
diag1.qsp_4.variables = x z ux uy uz w opticalDepthBW
18 changes: 9 additions & 9 deletions Examples/Tests/qed/quantum_synchrotron/inputs_3d
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,12 @@ diagnostics.diags_names = diag1
diag1.intervals = 2
diag1.diag_type = Full
diag1.fields_to_plot = Ex
diag1.p1.variables = ux uy uz w opticalDepthQSR
diag1.p2.variables = ux uy uz w opticalDepthQSR
diag1.p3.variables = ux uy uz w opticalDepthQSR
diag1.p4.variables = ux uy uz w opticalDepthQSR

diag1.qsp_1.variables = ux uy uz w opticalDepthBW
diag1.qsp_2.variables = ux uy uz w opticalDepthBW
diag1.qsp_3.variables = ux uy uz w opticalDepthBW
diag1.qsp_4.variables = ux uy uz w opticalDepthBW
diag1.p1.variables = x y z ux uy uz w opticalDepthQSR
diag1.p2.variables = x y z ux uy uz w opticalDepthQSR
diag1.p3.variables = x y z ux uy uz w opticalDepthQSR
diag1.p4.variables = x y z ux uy uz w opticalDepthQSR

diag1.qsp_1.variables = x y z ux uy uz w opticalDepthBW
diag1.qsp_2.variables = x y z ux uy uz w opticalDepthBW
diag1.qsp_3.variables = x y z ux uy uz w opticalDepthBW
diag1.qsp_4.variables = x y z ux uy uz w opticalDepthBW
Loading
Loading