diff options
Diffstat (limited to 'Docs/source/running_python')
-rw-r--r-- | Docs/source/running_python/examples.rst | 27 | ||||
-rw-r--r-- | Docs/source/running_python/how_to_run.rst | 63 | ||||
-rw-r--r-- | Docs/source/running_python/running_python.rst | 8 |
3 files changed, 0 insertions, 98 deletions
diff --git a/Docs/source/running_python/examples.rst b/Docs/source/running_python/examples.rst deleted file mode 100644 index 4104bcf78..000000000 --- a/Docs/source/running_python/examples.rst +++ /dev/null @@ -1,27 +0,0 @@ -Example input files -=================== - -WarpX includes several example Python input files corresponding to various physical situations. -These can be downloaded here (or obtained from the WarpX source). - -Beam-driven acceleration ------------------------- - -* :download:`Without mesh refinement<../../../Examples/Physics_applications/plasma_acceleration/PICMI_inputs_plasma_acceleration.py>` -* :download:`With mesh refinement<../../../Examples/Physics_applications/plasma_acceleration/PICMI_inputs_plasma_acceleration_mr.py>` - -Laser-driven acceleration -------------------------- - -* :download:`Without mesh refinement<../../../Examples/Physics_applications/laser_acceleration/PICMI_inputs_laser_acceleration.py>` - -Test cases ----------- - -There are also several test cases included that can be used for reference. - -* :download:`Gaussian beam<../../../Examples//Modules/gaussian_beam/PICMI_inputs_gaussian_beam.py>` -* :download:`Langmuir plasma wave test in 3d<../../../Examples//Tests/Langmuir/PICMI_inputs_langmuir_rt.py>` -* :download:`Langmuir plasma wave test in RZ<../../../Examples//Tests/Langmuir/PICMI_inputs_langmuir_rz_multimode_analyze.py>` -* :download:`Langmuir plasma wave test in 2D<../../../Examples//Tests/Langmuir/PICMI_inputs_langmuir2d.py>` - diff --git a/Docs/source/running_python/how_to_run.rst b/Docs/source/running_python/how_to_run.rst deleted file mode 100644 index 222e96074..000000000 --- a/Docs/source/running_python/how_to_run.rst +++ /dev/null @@ -1,63 +0,0 @@ -Using WarpX with Python -=========================== - -WarpX uses the PICMI standard for its Python input files. -See `PICMI information and source code <https://github.com/picmi-standard/picmi>`__. - -WarpX can be run in one of two modes. It can run as a preprocessor, using the -Python input file to generate an input file to be used by the C++ version, or -it can be run directly from Python. - -In either mode, if using a `virtual environment <https://docs.python.org/3/tutorial/venv.html>`__, be sure to activate it before compiling and running WarpX. - -Example input files can be found in the section :doc:`examples`. -The examples support running in both modes by commenting and uncommenting the appropriate lines. - -WarpX requires Python version 3.6 or newer. - - -Using Python input as a preprocessor ------------------------------------- - -In this case, only the pure Python version needs to be installed, as described in :doc:`../building/python`. - -In order to run a new simulation: - -* Create a **new directory**, where the simulation will be run. - -* Add a **Python script** in the directory. - -The input file should have the line like "sim.write_input_file(file_name = 'inputs_from_PICMI')" -which runs the preprocessor, generating the C++ input file. - -* **Run** the script with Python: - -:: - - python <python_script> - -where ``<python_script>`` is the name of the script. -This creates the WarpX input file that you can run as normal with the WarpX executable. - - -Running WarpX directly from Python ----------------------------------- - -For this, a full Python installation of WarpX is required, as described in :doc:`../building/python`. - -In order to run a new simulation: - -* Create a **new directory**, where the simulation will be run. - -* Add a **Python script** in the directory. - -The input file should have the line "sim.step()" which runs the simulation. - -* **Run** the script with Python: - -:: - - mpirun -np <n_ranks> python <python_script> - -where ``<n_ranks>`` is the number of MPI ranks used, and ``<python_script>`` -is the name of the script. diff --git a/Docs/source/running_python/running_python.rst b/Docs/source/running_python/running_python.rst deleted file mode 100644 index cf960d431..000000000 --- a/Docs/source/running_python/running_python.rst +++ /dev/null @@ -1,8 +0,0 @@ -Running WarpX from Python -========================= - -.. toctree:: - :maxdepth: 1 - - how_to_run - examples |