aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Remi Lehe <remi.lehe@normalesup.org> 2017-10-22 07:46:33 -0700
committerGravatar Remi Lehe <remi.lehe@normalesup.org> 2017-10-22 07:46:33 -0700
commit94385cef8da5c96e4c5bb62ed0e15cceb2d4ac62 (patch)
treec06c7044b1d00192b651f62575408a4d615ae91c
parent13ab3acd7ca91678cd849e2e900f315bf3df72bd (diff)
downloadWarpX-94385cef8da5c96e4c5bb62ed0e15cceb2d4ac62.tar.gz
WarpX-94385cef8da5c96e4c5bb62ed0e15cceb2d4ac62.tar.zst
WarpX-94385cef8da5c96e4c5bb62ed0e15cceb2d4ac62.zip
Added more documentation for Python wrapper
-rw-r--r--Docs/source/installation.rst6
-rw-r--r--Docs/source/running_python/api_reference.rst2
-rw-r--r--Docs/source/running_python/examples.rst14
-rw-r--r--Docs/source/running_python/how_to_run.rst25
-rw-r--r--Docs/source/running_python/running_python.rst3
5 files changed, 44 insertions, 6 deletions
diff --git a/Docs/source/installation.rst b/Docs/source/installation.rst
index 143e9bb6c..39a57d0b2 100644
--- a/Docs/source/installation.rst
+++ b/Docs/source/installation.rst
@@ -45,9 +45,9 @@ This will generate an executable file in the ``Bin`` directory.
* Profile or debug the code
* Choose a given compiler
- For a description of these different options, see section 3 of the
- `AMReX User's Guide <https://amrex-codes.github.io/AMReXUsersGuide.pdf>`__.
- TODO: Link to new documentation
+ For a description of these different options, see the `corresponding page
+ <https://amrex-codes.github.io/amrex/BuildingAMReX.html#building-with-gnu-make>`__ in
+ the AMReX documentation.
Alternatively, instead of modifying the file ``GNUmakefile``, you can
directly pass the options in command line ; for instance:
diff --git a/Docs/source/running_python/api_reference.rst b/Docs/source/running_python/api_reference.rst
deleted file mode 100644
index b1276856f..000000000
--- a/Docs/source/running_python/api_reference.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-pyWarpX API reference
-=====================
diff --git a/Docs/source/running_python/examples.rst b/Docs/source/running_python/examples.rst
new file mode 100644
index 000000000..a546294fb
--- /dev/null
+++ b/Docs/source/running_python/examples.rst
@@ -0,0 +1,14 @@
+Example input files
+===================
+
+.. warning::
+
+ This section is currently in development.
+
+This section allows you to **download Python scripts** that correspond to different
+physical situations.
+
+Laser wakefield acceleration
+----------------------------
+
+* :download:`Without mesh refinement<../../../Example/laser_acceleration/laser_acceleration.py>`
diff --git a/Docs/source/running_python/how_to_run.rst b/Docs/source/running_python/how_to_run.rst
new file mode 100644
index 000000000..54568a64c
--- /dev/null
+++ b/Docs/source/running_python/how_to_run.rst
@@ -0,0 +1,25 @@
+How to run a new simulation
+===========================
+
+After installing WarpX as a Python package (see the section
+:doc:`../installation`), you can use its functionalities in a Python script
+to run a simulation.
+
+In order to run a new simulation:
+
+* Create a **new directory**, where the simulation will be run.
+
+* Add a **Python script** in the directory.
+
+This file contains the numerical and physical parameters that define
+the situation to be simulated.
+Example input files can be found in the section :doc:`examples`.
+
+* **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
index f590887db..cf960d431 100644
--- a/Docs/source/running_python/running_python.rst
+++ b/Docs/source/running_python/running_python.rst
@@ -4,4 +4,5 @@ Running WarpX from Python
.. toctree::
:maxdepth: 1
- api_reference \ No newline at end of file
+ how_to_run
+ examples