Skip to content

Commit 024fc3c

Browse files
authored
Updated the docs to mention the examples notebook (#57)
1 parent 6fbaa64 commit 024fc3c

1 file changed

Lines changed: 23 additions & 7 deletions

File tree

docs/source/running.rst

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
Running
22
=======
33

4-
Pyro can be run in two ways: either from the commandline, using the ``pyro.py`` script and passing in the solver, problem and inputs as arguments, or by using the :func:`Pyro <pyro.Pyro>` class.
4+
Pyro can be run in two ways: either from the commandline, using the ``pyro.py``
5+
script and passing in the solver, problem and inputs as arguments, or by using
6+
the :func:`Pyro <pyro.Pyro>` class.
57

68
Commandline
79
------------
@@ -47,13 +49,17 @@ above run, we could do:
4749
Pyro class
4850
----------
4951

50-
Alternatively, pyro can be run using the :func:`Pyro <pyro.Pyro>` class. This is done by the following steps:
52+
Alternatively, pyro can be run using the :func:`Pyro <pyro.Pyro>` class. This provides
53+
an interface that enables simulations to be set up and run in a Jupyter notebook - see
54+
``examples/examples.ipynb`` for an example notebook. A simulation can be set up and run
55+
by carrying out the following steps:
5156

5257
* create a ``Pyro`` object, initializing it with a specific solver
5358
* initialize the problem, passing in runtime parameters and inputs
5459
* run the simulation
5560

56-
For example, if we wished to use the ``compressible`` solver to run the Kelvin-Helmholtz problem ``kh``, we would do the following:
61+
For example, if we wished to use the ``compressible`` solver to run the
62+
Kelvin-Helmholtz problem ``kh``, we would do the following:
5763

5864
.. code-block:: python
5965
@@ -62,7 +68,12 @@ For example, if we wished to use the ``compressible`` solver to run the Kelvin-H
6268
inputs_file="inputs.kh")
6369
pyro.run_sim()
6470
65-
Instead of using an inputs file to define the problem parameters, we can define a dictionary of parameters and pass them into the :func:`initialize_problem <pyro.Pyro.initialize_problem>` function using the keyword argument ``inputs_dict``. If an inputs file is also passed into the function, the parameters in the dictionary will override any parameters in the file. For example, if we wished to turn off visualization for the previous example, we would do:
71+
Instead of using an inputs file to define the problem parameters, we can define a
72+
dictionary of parameters and pass them into the :func:`initialize_problem
73+
<pyro.Pyro.initialize_problem>` function using the keyword argument ``inputs_dict``.
74+
If an inputs file is also passed into the function, the parameters in the dictionary
75+
will override any parameters in the file. For example, if we wished to turn off
76+
visualization for the previous example, we would do:
6677

6778
.. code-block:: python
6879
@@ -71,21 +82,26 @@ Instead of using an inputs file to define the problem parameters, we can define
7182
inputs_file="inputs.kh",
7283
inputs_dict=parameters)
7384
74-
It's possible to evolve the simulation forward timestep by timestep manually using the :func:`single_step <pyro.Pyro.single_step>` function (rather than allowing :func:`run_sim <pyro.Pyro.run_sim>` to do this for us). To evolve our example simulation forward by a single step, we'd run
85+
It's possible to evolve the simulation forward timestep by timestep manually using
86+
the :func:`single_step <pyro.Pyro.single_step>` function (rather than allowing
87+
:func:`run_sim <pyro.Pyro.run_sim>` to do this for us). To evolve our example
88+
simulation forward by a single step, we'd run
7589

7690
.. code-block:: python
7791
7892
pyro.single_step()
7993
80-
This will fill the boundary conditions, compute the timestep ``dt``, evolve a single timestep and do output/visualization (if required).
94+
This will fill the boundary conditions, compute the timestep ``dt``, evolve a
95+
single timestep and do output/visualization (if required).
8196

8297

8398
Runtime options
8499
---------------
85100

86101
The behavior of the main driver, the solver, and the problem setup can
87102
be controlled by runtime parameters specified in the inputs file (or
88-
via the command line or passed into the ``initialize_problem`` function). Runtime parameters are grouped into sections,
103+
via the command line or passed into the ``initialize_problem`` function).
104+
Runtime parameters are grouped into sections,
89105
with the heading of that section enclosed in ``[ .. ]``. The list of
90106
parameters are stored in three places:
91107

0 commit comments

Comments
 (0)