Skip to content

Commit

Permalink
Move test documentation to the test directory
Browse files Browse the repository at this point in the history
- move field ionization test docs the test directory
- rename `ionization` test to `field_ionization` to be more precise
  • Loading branch information
n01r committed Sep 13, 2024
1 parent b3daa63 commit 0bbeb17
Show file tree
Hide file tree
Showing 12 changed files with 73 additions and 52 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/insitu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ jobs:
cmake --build build -j 10
- name: 2D Test
run: |
cp Examples/Tests/ionization/inputs_test_2d_ionization_lab .
cp Examples/Tests/ionization/catalyst_pipeline.py .
cp Examples/Tests/field_ionization/inputs_test_2d_ionization_lab .
cp Examples/Tests/field_ionization/catalyst_pipeline.py .
mpiexec -n 2 ./build/bin/warpx.2d \
inputs_test_2d_ionization_lab \
catalyst.script_paths = catalyst_pipeline.py\
Expand Down
53 changes: 4 additions & 49 deletions Docs/source/theory/multiphysics/ionization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,55 +64,10 @@ For hydrogen, WarpX offers the modified empirical ADK extension to the Over-the-
The parameters :math:`a_1` through :math:`a_3` are independent of :math:`E` and can be found in the same reference. :math:`E_\mathrm{b}` is the classical Barrier Suppresion Ionization (BSI) field strength :math:`E_\mathrm{b} = U_\mathrm{ion}^2 / (4 Z)` given here in atomic units (AU). For a detailed description of conversion between unit systems consider the book by :cite:t:`mpion-Mulser2010`.

Run Test
--------
Testing
^^^^^^^

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

.. tab-set::

.. tab-item:: lab frame

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

* **Python** script: ``python3 inputs_test_2d_ionization_picmi.py`` or
* WarpX **executable** using an input file: ``warpx.2d inputs_test_2d_ionization_lab max_step=1600``

.. tab-set::

.. tab-item:: Python: Script

.. literalinclude:: ../../../../Examples/Tests/ionization/inputs_test_2d_ionization_picmi.py
:language: python3
:caption: You can copy this file from ``Examples/Tests/ionization/inputs_test_2d_ionization_picmi.py``.

.. tab-item:: Executable: Input File

.. literalinclude:: ../../../../Examples/Tests/ionization/inputs_test_2d_ionization_lab
:language: ini
:caption: You can copy this file from ``Examples/Tests/ionization/inputs_test_2d_ionization_lab``.

.. tab-item:: boosted frame

This example can be run as:

* WarpX **executable** using an input file: ``warpx.2d inputs_test_2d_ionization_boost max_step=420``

.. literalinclude:: ../../../../Examples/Tests/ionization/inputs_test_2d_ionization_boost
:language: ini
:caption: You can copy this file from ``Examples/Tests/ionization/inputs_test_2d_ionization_boost``.

Analyze
-------

.. dropdown:: Script ``analysis.py``

.. literalinclude:: ../../../../Examples/Tests/ionization/analysis.py
:language: python3
:caption: You can copy this file from ``Examples/Tests/ionization/analysis.py``.

.. figure:: https://gist.githubusercontent.com/johvandewetering/48d092c003915f1d1689b507caa2865b/raw/29f5d12ed77831047ca12f456a07dbf3b99770d5/image_ionization.png
:alt: Electric field of the laser pulse with (top) ions with ionization levels and (bottom) ionized electrons.
* `Testing the field ionization module <../../../../Examples/Tests/field_ionization/README.rst>`_.

.. bibliography::
:keyprefix: mpion-
:keyprefix: mpion-
5 changes: 5 additions & 0 deletions Docs/source/usage/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ An example of initializing the fields by accessing their data through Python, ad
Many Further Examples, Demos and Tests
--------------------------------------

.. toctree::
:maxdepth: 1

examples/field_ionization/README.rst

WarpX runs over 200 integration tests on a variety of modeling cases, which validate and demonstrate its functionality.
Please see the `Examples/Tests/ <https://github.com/ECP-WarpX/WarpX/tree/development/Examples/Tests>`__ directory for many more examples.

Expand Down
1 change: 1 addition & 0 deletions Docs/source/usage/examples/field_ionization
2 changes: 1 addition & 1 deletion Examples/Tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ add_subdirectory(gaussian_beam)
add_subdirectory(implicit)
add_subdirectory(initial_distribution)
add_subdirectory(initial_plasma_profile)
add_subdirectory(ionization)
add_subdirectory(field_ionization)
add_subdirectory(ion_stopping)
add_subdirectory(langmuir)
add_subdirectory(langmuir_fluids)
Expand Down
File renamed without changes.
60 changes: 60 additions & 0 deletions Examples/Tests/field_ionization/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
.. _examples-tests-field_ionization:

Field Ionization
================

Run Test
--------

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

.. tab-set::

.. tab-item:: lab frame

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

* **Python** script: ``python3 inputs_test_2d_ionization_picmi.py`` or
* WarpX **executable** using an input file: ``warpx.2d inputs_test_2d_ionization_lab max_step=1600``

.. tab-set::

.. tab-item:: Python: Script

.. literalinclude:: inputs_test_2d_ionization_picmi.py
:language: python3
:caption: You can copy this file from ``Examples/Tests/field_ionization/inputs_test_2d_ionization_picmi.py``.

.. tab-item:: Executable: Input File

.. literalinclude:: inputs_test_2d_ionization_lab
:language: ini
:caption: You can copy this file from ``Examples/Tests/field_ionization/inputs_test_2d_ionization_lab``.

.. tab-item:: boosted frame

This example can be run as:

* WarpX **executable** using an input file: ``warpx.2d inputs_test_2d_ionization_boost max_step=420``

.. literalinclude:: inputs_test_2d_ionization_boost
:language: ini
:caption: You can copy this file from ``Examples/Tests/field_ionization/inputs_test_2d_ionization_boost``.

Analyze
-------

.. dropdown:: Script ``analysis.py``

.. literalinclude:: analysis.py
:language: python3
:caption: You can copy this file from ``Examples/Tests/field_ionization/analysis.py``.

Visualize
---------

.. figure:: https://gist.githubusercontent.com/johvandewetering/48d092c003915f1d1689b507caa2865b/raw/29f5d12ed77831047ca12f456a07dbf3b99770d5/image_ionization.png
:alt: Electric field of the laser pulse with (top) ions with ionization levels and (bottom) ionized electrons.

Electric field of the laser pulse with (top) ions with ionization levels and (bottom) ionized electrons.

File renamed without changes.

0 comments on commit 0bbeb17

Please sign in to comment.