Skip to content

Commit

Permalink
Docs: fix broken links in Examples section
Browse files Browse the repository at this point in the history
  • Loading branch information
EZoni committed Sep 10, 2024
1 parent 10d1615 commit 375709b
Show file tree
Hide file tree
Showing 29 changed files with 97 additions and 97 deletions.
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 @@ -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 @@ -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
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
Original file line number Diff line number Diff line change
Expand Up @@ -23,39 +23,39 @@ For `MPI-parallel <https://www.mpi-forum.org>`__ runs, prefix these lines with `

.. tab-item:: Python: Script

This example can be run as a **Python** script: ``python3 PICMI_inputs_3d.py``.
This example can be run as a **Python** script: ``python3 inputs_test_3d_langmuir_multi_picmi.py``.

.. literalinclude:: PICMI_inputs_3d.py
.. literalinclude:: inputs_test_3d_langmuir_multi_picmi.py
:language: python3
:caption: You can copy this file from ``Examples/Tests/langmuir/PICMI_inputs_3d.py``.
:caption: You can copy this file from ``Examples/Tests/langmuir/inputs_test_3d_langmuir_multi_picmi.py``.

.. tab-item:: Executable: Input File

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

.. literalinclude:: inputs_3d
.. literalinclude:: inputs_test_3d_langmuir_multi
:language: ini
:caption: You can copy this file from ``Examples/Tests/langmuir/inputs_3d``.
:caption: You can copy this file from ``Examples/Tests/langmuir/inputs_test_3d_langmuir_multi``.

.. tab-item:: 2D

.. tab-set::

.. tab-item:: Python: Script

This example can be run as a **Python** script: ``python3 PICMI_inputs_2d.py``.
This example can be run as a **Python** script: ``python3 inputs_test_2d_langmuir_multi_picmi.py``.

.. literalinclude:: PICMI_inputs_2d.py
.. literalinclude:: inputs_test_2d_langmuir_multi_picmi.py
:language: python3
:caption: You can copy this file from ``Examples/Tests/langmuir/PICMI_inputs_2d.py``.
:caption: You can copy this file from ``Examples/Tests/langmuir/inputs_test_2d_langmuir_multi_picmi.py``.

.. tab-item:: Executable: Input File

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

.. literalinclude:: inputs_2d
.. literalinclude:: inputs_test_2d_langmuir_multi
:language: ini
:caption: You can copy this file from ``Examples/Tests/langmuir/inputs_2d``.
:caption: You can copy this file from ``Examples/Tests/langmuir/inputs_test_2d_langmuir_multi``.


.. tab-item:: RZ
Expand All @@ -64,19 +64,19 @@ For `MPI-parallel <https://www.mpi-forum.org>`__ runs, prefix these lines with `

.. tab-item:: Python: Script

This example can be run as a **Python** script: ``python3 PICMI_inputs_rz.py``.
This example can be run as a **Python** script: ``python3 inputs_test_rz_langmuir_multi_picmi.py``.

.. literalinclude:: PICMI_inputs_rz.py
.. literalinclude:: inputs_test_rz_langmuir_multi_picmi.py
:language: python3
:caption: You can copy this file from ``Examples/Tests/langmuir/PICMI_inputs_rz.py``.
:caption: You can copy this file from ``Examples/Tests/langmuir/inputs_test_rz_langmuir_multi_picmi.py``.

.. tab-item:: Executable: Input File

This example can be run as WarpX **executable** using an input file: ``warpx.rz inputs_rz``
This example can be run as WarpX **executable** using an input file: ``warpx.rz inputs_test_rz_langmuir_multi``

.. literalinclude:: inputs_rz
.. literalinclude:: inputs_test_rz_langmuir_multi
:language: ini
:caption: You can copy this file from ``Examples/Tests/langmuir/inputs_rz``.
:caption: You can copy this file from ``Examples/Tests/langmuir/inputs_test_rz_langmuir_multi``.


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

.. note::

TODO: This input file should be created, like the ``inputs_1d`` file.
TODO: This input file should be created, like the ``inputs_test_1d_langmuir_multi`` file.

.. tab-item:: Executable: Input File

This example can be run as WarpX **executable** using an input file: ``warpx.1d inputs_1d``
This example can be run as WarpX **executable** using an input file: ``warpx.1d inputs_test_1d_langmuir_multi``

.. literalinclude:: inputs_1d
.. literalinclude:: inputs_test_1d_langmuir_multi
:language: ini
:caption: You can copy this file from ``Examples/Tests/langmuir/inputs_1d``.
:caption: You can copy this file from ``Examples/Tests/langmuir/inputs_test_1d_langmuir_multi``.


Analyze
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,5 +134,5 @@
##### SIMULATION EXECUTION ######
#################################

# sim.write_input_file('PICMI_inputs_3d')
# sim.write_input_file('inputs_test_3d_load_external_field_grid')
sim.step(max_steps)
Original file line number Diff line number Diff line change
Expand Up @@ -134,5 +134,5 @@
##### SIMULATION EXECUTION ######
#################################

# sim.write_input_file('PICMI_inputs_3d')
# sim.write_input_file('inputs_test_3d_load_external_field_particle')
sim.step(max_steps)
Loading

0 comments on commit 375709b

Please sign in to comment.