11Running
22=======
33
4- Pyro can be run in two ways: either from the commandline, using the ``pyro_sim.py ``
5- script and passing in the solver, problem and inputs as arguments, or by using
6- the :func: `Pyro <pyro.pyro_sim.pyro> ` class.
4+ Pyro can be run in two ways: either from the commandline, using the
5+ ``pyro_sim.py `` script (this will be installed into your search path)
6+ and passing in the solver, problem and inputs as arguments, or by
7+ using the :func: `Pyro <pyro.pyro_sim.Pyro> ` class.
78
89Commandline
910------------
@@ -18,7 +19,7 @@ For example, to run the Sedov problem with the compressible solver we would do:
1819
1920.. prompt :: bash
2021
21- ./ pyro_sim.py compressible sedov inputs.sedov
22+ pyro_sim.py compressible sedov inputs.sedov
2223
2324This knows to look for ``inputs.sedov `` in ``compressible/problems/ ``
2425(alternately, you can specify the full path for the inputs file).
@@ -27,15 +28,15 @@ To run the smooth Gaussian advection problem with the advection solver, we would
2728
2829.. prompt :: bash
2930
30- ./ pyro_sim.py advection smooth inputs.smooth
31+ pyro_sim.py advection smooth inputs.smooth
3132
3233Any runtime parameter can also be specified on the command line, after
3334the inputs file. For example, to disable runtime visualization for the
3435above run, we could do:
3536
3637.. prompt :: bash
3738
38- ./ pyro_sim.py advection smooth inputs.smooth vis.dovis=0
39+ pyro_sim.py advection smooth inputs.smooth vis.dovis=0
3940
4041
4142.. note ::
@@ -63,11 +64,11 @@ Kelvin-Helmholtz problem ``kh``, we would do the following:
6364
6465.. code-block :: python
6566
66- from pyro import Pyro
67- pyro = Pyro(" compressible" )
68- pyro .initialize_problem(problem_name = " kh" ,
69- inputs_file = " inputs.kh" )
70- pyro .run_sim()
67+ from pyro.pyro_sim import Pyro
68+ p = Pyro(" compressible" )
69+ p .initialize_problem(problem_name = " kh" ,
70+ inputs_file = " inputs.kh" )
71+ p .run_sim()
7172
7273 Instead of using an inputs file to define the problem parameters, we can define a
7374dictionary of parameters and pass them into the :func: `initialize_problem
@@ -79,9 +80,9 @@ visualization for the previous example, we would do:
7980.. code-block :: python
8081
8182 parameters = {" vis.dovis" :0 }
82- pyro .initialize_problem(problem_name = " kh" ,
83- inputs_file = " inputs.kh" ,
84- inputs_dict = parameters)
83+ p .initialize_problem(problem_name = " kh" ,
84+ inputs_file = " inputs.kh" ,
85+ inputs_dict = parameters)
8586
8687 It's possible to evolve the simulation forward timestep by timestep manually using
8788the :func: `single_step <pyro.pyro_sim.Pyro.single_step> ` function (rather than allowing
@@ -90,7 +91,7 @@ simulation forward by a single step, we'd run
9091
9192.. code-block :: python
9293
93- pyro .single_step()
94+ p .single_step()
9495
9596 This will fill the boundary conditions, compute the timestep ``dt ``, evolve a
9697single timestep and do output/visualization (if required).
0 commit comments