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

Docs: fix broken links in Examples section #5239

Merged
merged 2 commits into from
Sep 10, 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
2 changes: 1 addition & 1 deletion Docs/source/developers/particles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ Attribute name ``int``/``real`` Description Default
when they were created.
================== ================ ================================= ==============

A Python example that adds runtime options can be found in :download:`Examples/Tests/particle_data_python <../../../Examples/Tests/particle_data_python/PICMI_inputs_prev_pos_2d.py>`
A Python example that adds runtime options can be found in :download:`Examples/Tests/particle_data_python <../../../Examples/Tests/particle_data_python/inputs_test_2d_prev_positions_picmi.py>`

.. note::

Expand Down
8 changes: 4 additions & 4 deletions Docs/source/usage/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Particle Accelerator & Beam Physics
:maxdepth: 1

examples/gaussian_beam/README.rst
examples/beam-beam_collision/README.rst
examples/beam_beam_collision/README.rst


High Energy Astrophysical Plasma Physics
Expand Down Expand Up @@ -101,7 +101,7 @@ examples below were generated at that time.
.. toctree::
:maxdepth: 1

examples/ohm_solver_EM_modes/README.rst
examples/ohm_solver_em_modes/README.rst
examples/ohm_solver_ion_beam_instability/README.rst
examples/ohm_solver_ion_Landau_damping/README.rst

Expand All @@ -127,11 +127,11 @@ Manipulating fields via Python

An example of using Python to access the simulation charge density, solve the Poisson equation (using ``superLU``) and write the resulting electrostatic potential back to the simulation is given in the input file below. This example uses the ``fields.py`` module included in the ``pywarpx`` library.

* :download:`Direct Poisson solver example <../../../Examples/Physics_applications/capacitive_discharge/PICMI_inputs_2d.py>`
* :download:`Direct Poisson solver example <../../../Examples/Physics_applications/capacitive_discharge/inputs_test_2d_background_mcc_picmi.py>`

An example of initializing the fields by accessing their data through Python, advancing the simulation for a chosen number of time steps, and plotting the fields again through Python. The simulation runs with 128 regular cells, 8 guard cells, and 10 PML cells, in each direction. Moreover, it uses div(E) and div(B) cleaning both in the regular grid and in the PML and initializes all available electromagnetic fields (E,B,F,G) identically.

* :download:`Unit pulse with PML <../../../Examples/Tests/python_wrappers/PICMI_inputs_2d.py>`
* :download:`Unit pulse with PML <../../../Examples/Tests/python_wrappers/inputs_test_2d_python_wrappers_picmi.py>`


Many Further Examples, Demos and Tests
Expand Down
1 change: 0 additions & 1 deletion Docs/source/usage/examples/beam-beam_collision

This file was deleted.

1 change: 1 addition & 0 deletions Docs/source/usage/examples/beam_beam_collision
1 change: 0 additions & 1 deletion Docs/source/usage/examples/ohm_solver_EM_modes

This file was deleted.

1 change: 1 addition & 0 deletions Docs/source/usage/examples/ohm_solver_em_modes
2 changes: 1 addition & 1 deletion Docs/source/usage/pwfa.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ In-Depth: PWFA

As described in the :doc:`../theory/intro`, one of the key applications of the WarpX exascale computing platform is in modelling future, compact and economic plasma-based accelerators.
In this section we describe the simulation setup of a realistic *electron beam driven plasma wakefield accelerator* (PWFA) configuration.
For illustration purposes the setup can be explored with **WarpX** using the example input file :download:`PWFA <../../../Examples/Physics_applications/plasma_acceleration/inputs_2d_boost>`.
For illustration purposes the setup can be explored with **WarpX** using the example input file :download:`PWFA <../../../Examples/Physics_applications/plasma_acceleration/inputs_test_2d_plasma_acceleration_boosted>`.

The simulation setup consists of 4 particle species: drive beam (driver), witness beam (beam), plasma electrons (plasma_e), and plasma ions (plasma_p).
The species physical parameters are summarized in the following table.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ The PICMI input file is not available for this example yet.

For `MPI-parallel <https://www.mpi-forum.org>`__ runs, prefix these lines with ``mpiexec -n 4 ...`` or ``srun -n 4 ...``, depending on the system.

.. literalinclude:: inputs
.. literalinclude:: inputs_test_3d_beam_beam_collision
:language: ini
:caption: You can copy this file from ``Examples/Physics_applications/beam-beam_collision/inputs``.
:caption: You can copy this file from ``Examples/Physics_applications/beam-beam_collision/inputs_test_3d_beam_beam_collision``.


Visualize
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ The implementation has been tested against the benchmark results from :cite:t:`e
Run
---

The 1D PICMI input file can be used to reproduce the results from Turner et al. for a given case, ``N`` from 1 to 4, by executing ``python3 PICMI_inputs_1d.py -n N``, e.g.,
The 1D PICMI input file can be used to reproduce the results from Turner et al. for a given case, ``N`` from 1 to 4, by executing ``python3 inputs_base_1d_picmi.py -n N``, e.g.,

.. code-block:: bash

python3 PICMI_inputs_1d.py -n 1
python3 inputs_base_1d_picmi.py -n 1

For `MPI-parallel <https://www.mpi-forum.org>`__ runs, prefix these lines with ``mpiexec -n 4 ...`` or ``srun -n 4 ...``, depending on the system.

.. literalinclude:: PICMI_inputs_1d.py
.. literalinclude:: inputs_base_1d_picmi.py
:language: python3
:caption: You can copy this file from ``Examples/Physics_applications/capacitive_discharge/PICMI_inputs_1d.py``.
:caption: You can copy this file from ``Examples/Physics_applications/capacitive_discharge/inputs_base_1d_picmi.py``.


Analyze
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Copyright 2021 Modern Electron

# This script checks that the PICMI_inputs_2d.py run more-or-less matches the
# This script checks that the inputs_test_2d_background_mcc_picmi.py run more-or-less matches the
# results from the non-PICMI run. The PICMI run is using an external Poisson
# solver that directly solves the Poisson equation using matrix inversion
# rather than the iterative approach from the MLMG solver.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,43 +24,43 @@ For `MPI-parallel <https://www.mpi-forum.org>`__ runs, prefix these lines with `

This example can be run **either** as:

* **Python** script: ``python3 PICMI_inputs_3d.py`` or
* WarpX **executable** using an input file: ``warpx.3d inputs_3d max_step=400``
* **Python** script: ``python3 inputs_test_3d_laser_acceleration_picmi.py`` or
* WarpX **executable** using an input file: ``warpx.3d inputs_test_3d_laser_acceleration max_step=400``

.. tab-set::

.. tab-item:: Python: Script

.. literalinclude:: PICMI_inputs_3d.py
.. literalinclude:: inputs_test_3d_laser_acceleration_picmi.py
:language: python3
:caption: You can copy this file from ``Examples/Physics_applications/laser_acceleration/PICMI_inputs_3d.py``.
:caption: You can copy this file from ``Examples/Physics_applications/laser_acceleration/inputs_test_3d_laser_acceleration_picmi.py``.

.. tab-item:: Executable: Input File

.. literalinclude:: inputs_3d
.. literalinclude:: inputs_test_3d_laser_acceleration
:language: ini
:caption: You can copy this file from ``Examples/Physics_applications/laser_acceleration/inputs_3d``.
:caption: You can copy this file from ``Examples/Physics_applications/laser_acceleration/inputs_test_3d_laser_acceleration``.

.. tab-item:: RZ

This example can be run **either** as:

* **Python** script: ``python3 PICMI_inputs_rz.py`` or
* WarpX **executable** using an input file: ``warpx.rz inputs_3d max_step=400``
* **Python** script: ``python3 inputs_test_rz_laser_acceleration_picmi.py`` or
* WarpX **executable** using an input file: ``warpx.rz inputs_test_rz_laser_acceleration max_step=400``

.. tab-set::

.. tab-item:: Python: Script

.. literalinclude:: PICMI_inputs_rz.py
.. literalinclude:: inputs_test_rz_laser_acceleration_picmi.py
:language: python3
:caption: You can copy this file from ``Examples/Physics_applications/laser_acceleration/PICMI_inputs_rz.py``.
:caption: You can copy this file from ``Examples/Physics_applications/laser_acceleration/inputs_test_rz_laser_acceleration_picmi.py``.

.. tab-item:: Executable: Input File

.. literalinclude:: inputs_rz
.. literalinclude:: inputs_test_rz_laser_acceleration
:language: ini
:caption: You can copy this file from ``Examples/Physics_applications/laser_acceleration/inputs_rz``.
:caption: You can copy this file from ``Examples/Physics_applications/laser_acceleration/inputs_test_rz_laser_acceleration``.

Analyze
-------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Run

This example can be run **either** as:

* **Python** script: ``mpiexec -n 2 python3 PICMI_inputs_2d.py`` or
* WarpX **executable** using an input file: ``mpiexec -n 2 warpx.2d inputs_2d``
* **Python** script: ``mpiexec -n 2 python3 inputs_test_2d_laser_ion_acc_picmi.py`` or
* WarpX **executable** using an input file: ``mpiexec -n 2 warpx.2d inputs_test_2d_laser_ion_acc``

.. tip::

Expand All @@ -35,16 +35,16 @@ This example can be run **either** as:

.. tab-item:: Python: Script

.. literalinclude:: PICMI_inputs_2d.py
.. literalinclude:: inputs_test_2d_laser_ion_acc_picmi.py
:language: python3
:caption: You can copy this file from ``Examples/Physics_applications/laser_ion/PICMI_inputs_2d.py``.
:caption: You can copy this file from ``Examples/Physics_applications/laser_ion/inputs_test_2d_laser_ion_acc_picmi.py``.


.. tab-item:: Executable: Input File

.. literalinclude:: inputs_2d
.. literalinclude:: inputs_test_2d_laser_ion_acc
:language: ini
:caption: You can copy this file from ``Examples/Physics_applications/laser_ion/inputs_2d``.
:caption: You can copy this file from ``Examples/Physics_applications/laser_ion/inputs_test_2d_laser_ion_acc``.

Analyze
-------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ In the Beam, Plasma & Accelerator Simulation Toolkit (BLAST), `HiPACE++ <https:/

.. note::

TODO: The Python (PICMI) input file should use the boosted frame method, like the ``inputs_3d_boost`` file.
TODO: The Python (PICMI) input file should use the boosted frame method, like the ``inputs_test_3d_plasma_acceleration_boosted`` file.


Run
---

This example can be run **either** as:

* **Python** script: ``python3 PICMI_inputs_plasma_acceleration.py`` or
* WarpX **executable** using an input file: ``warpx.3d inputs_3d_boost``
* **Python** script: ``python3 inputs_test_3d_plasma_acceleration_picmi.py`` or
* WarpX **executable** using an input file: ``warpx.3d inputs_test_3d_plasma_acceleration_boosted``

For `MPI-parallel <https://www.mpi-forum.org>`__ runs, prefix these lines with ``mpiexec -n 4 ...`` or ``srun -n 4 ...``, depending on the system.

Expand All @@ -35,17 +35,17 @@ For `MPI-parallel <https://www.mpi-forum.org>`__ runs, prefix these lines with `

.. note::

TODO: This input file should use the boosted frame method, like the ``inputs_3d_boost`` file.
TODO: This input file should use the boosted frame method, like the ``inputs_test_3d_plasma_acceleration_boosted`` file.

.. literalinclude:: PICMI_inputs_plasma_acceleration.py
.. literalinclude:: inputs_test_3d_plasma_acceleration_picmi.py
:language: python3
:caption: You can copy this file from ``Examples/Physics_applications/plasma_acceleration/PICMI_inputs_plasma_acceleration.py``.
:caption: You can copy this file from ``Examples/Physics_applications/plasma_acceleration/inputs_test_3d_plasma_acceleration_picmi.py``.

.. tab-item:: Executable: Input File

.. literalinclude:: inputs_3d_boost
.. literalinclude:: inputs_test_3d_plasma_acceleration_boosted
:language: ini
:caption: You can copy this file from ``Examples/Physics_applications/plasma_acceleration/inputs_3d_boost``.
:caption: You can copy this file from ``Examples/Physics_applications/plasma_acceleration/inputs_test_3d_plasma_acceleration_boosted``.

Analyze
-------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ For `MPI-parallel <https://www.mpi-forum.org>`__ runs, prefix these lines with `

.. tab-item:: Executable: Input File

.. literalinclude:: inputs_2d
.. literalinclude:: inputs_test_2d_plasma_mirror
:language: ini
:caption: You can copy this file from ``Examples/Physics_applications/plasma_mirror/inputs_2d``.
:caption: You can copy this file from ``Examples/Physics_applications/plasma_mirror/inputs_test_2d_plasma_mirror``.


Analyze
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
thermal plasma. The potential on the spacecraft decreases over
the time to reach an equilibrium floating potential.

An input Python file PICMI_inputs_rz.py is used.
An input Python file inputs_test_rz_spacecraft_charging_picmi.py is used.

The test will check the curve fitting parameters v0 and tau defined
by the following exponential function: phi(t)=v0(1-exp(-t/tau))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ For `MPI-parallel <https://www.mpi-forum.org>`__ runs, prefix these lines with `

.. note::

TODO: This input file should be created following the ``inputs_3d`` file.
TODO: This input file should be created following the ``inputs_test_3d_uniform_plasma`` file.

.. tab-item:: Executable: Input File

This example can be run **either** as WarpX **executable** using an input file: ``warpx.3d inputs_3d``
This example can be run **either** as WarpX **executable** using an input file: ``warpx.3d inputs_test_3d_uniform_plasma``

.. literalinclude:: inputs_3d
.. literalinclude:: inputs_test_3d_uniform_plasma
:language: ini
:caption: You can copy this file from ``usage/examples/lwfa/inputs_3d``.
:caption: You can copy this file from ``usage/examples/lwfa/inputs_test_3d_uniform_plasma``.

.. tab-item:: 2D

Expand All @@ -39,15 +39,15 @@ For `MPI-parallel <https://www.mpi-forum.org>`__ runs, prefix these lines with `

.. note::

TODO: This input file should be created following the ``inputs_2d`` file.
TODO: This input file should be created following the ``inputs_test_2d_uniform_plasma`` file.

.. tab-item:: Executable: Input File

This example can be run **either** as WarpX **executable** using an input file: ``warpx.2d inputs_2d``
This example can be run **either** as WarpX **executable** using an input file: ``warpx.2d inputs_test_2d_uniform_plasma``

.. literalinclude:: inputs_2d
.. literalinclude:: inputs_test_2d_uniform_plasma
:language: ini
:caption: You can copy this file from ``usage/examples/lwfa/inputs_2d``.
:caption: You can copy this file from ``usage/examples/lwfa/inputs_test_2d_uniform_plasma``.

Analyze
-------
Expand Down
4 changes: 2 additions & 2 deletions Examples/Tests/collision/inputs_test_2d_collision_xz_picmi.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
#
# --- Input file for binary Coulomb collision testing. This input script
# --- runs the same test as inputs_2d but via Python, therefore the input
# --- runs the same test as inputs_test_2d_collision_xz but via Python, therefore the input
# --- values where directly copied from inputs_2d.

from pywarpx import picmi
Expand Down Expand Up @@ -142,5 +142,5 @@
##### SIMULATION EXECUTION ######
#################################

# sim.write_input_file('PICMI_inputs_2d')
# sim.write_input_file('inputs_test_2d_collision_xz')
sim.step(max_steps)
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Run

This example can be run **either** as:

* **Python** script: ``python3 PICMI_inputs_gaussian_beam.py`` or
* **Python** script: ``python3 inputs_test_3d_gaussian_beam_picmi.py`` or
* WarpX **executable** using an input file: (*TODO*)

For `MPI-parallel <https://www.mpi-forum.org>`__ runs, prefix these lines with ``mpiexec -n 4 ...`` or ``srun -n 4 ...``, depending on the system.
Expand All @@ -20,15 +20,15 @@ For `MPI-parallel <https://www.mpi-forum.org>`__ runs, prefix these lines with `

.. tab-item:: Python: Script

.. literalinclude:: PICMI_inputs_gaussian_beam.py
.. literalinclude:: inputs_test_3d_gaussian_beam_picmi.py
:language: python3
:caption: You can copy this file from ``Examples/Tests/gaussian_beam/PICMI_inputs_gaussian_beam.py``.
:caption: You can copy this file from ``Examples/Tests/gaussian_beam/inputs_test_3d_gaussian_beam_picmi.py``.

.. tab-item:: Executable: Input File

.. note::

TODO: This input file should be created following the ``PICMI_inputs_gaussian_beam.py`` file.
TODO: This input file should be created following the ``inputs_test_3d_gaussian_beam_picmi.py`` file.


Analyze
Expand Down
Loading
Loading