aboutsummaryrefslogtreecommitdiff
path: root/Docs/source/running_python/how_to_run.rst
blob: 390abb8c2dd02a5c37a879769d2cad919a45c10c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
How to run a new simulation
===========================

After installing WarpX as a Python package, 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.