Skip to content

Commit 69df3cd

Browse files
committed
Merge branch 'master' of ssh://github.com/zingale/pyro2
2 parents 18440c7 + 959b10d commit 69df3cd

14 files changed

Lines changed: 743 additions & 322 deletions

CONTRIBUTING.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
# Contributing
22

33
Contributions are welcomed from anyone, including posting issues or
4-
submitting pull requests to the [pyro github](https://github.com/zingale/pyro).
4+
submitting pull requests to the [pyro github](https://github.com/python-hydro/pyro).
5+
6+
Users who make significant contributions will be listed as developers
7+
in the pyro acknowledgements and be included in any future code
8+
papers.
59

610
## Issues
711

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2013-14, Michael Zingale
1+
Copyright (c) 2013-18, pyro development team
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status](https://travis-ci.org/zingale/pyro2.svg?branch=master)](https://travis-ci.org/zingale/pyro2)
1+
[![Build Status](https://travis-ci.com/python-hydro/pyro2.svg?branch=master)](https://travis-ci.com/python-hydro/pyro2)
22

33
![pyro logo](www/logo.gif)
44

@@ -14,12 +14,12 @@ methods.
1414

1515
The latest version of pyro is always available at:
1616

17-
https://github.com/zingale/pyro2
17+
https://github.com/python-hydro/pyro2
1818

1919
The project webpage, where you'll find documentation, plots, notes,
2020
etc. is here:
2121

22-
http://zingale.github.io/pyro2/
22+
http://python-hydro.github.io/pyro2/
2323

2424

2525
## Table of Contents
@@ -96,12 +96,12 @@ http://zingale.github.io/pyro2/
9696
The main data structures that describe the grid and the data the lives
9797
on the grid are described in a jupyter notebook:
9898

99-
https://github.com/zingale/pyro2/blob/master/mesh/mesh-examples.ipynb
99+
https://github.com/python-hydro/pyro2/blob/master/mesh/mesh-examples.ipynb
100100

101101
Many of the methods here rely on multigrid. The multigrid solver is
102102
demonstrated in the juputer notebook:
103103

104-
https://github.com/zingale/pyro2/blob/master/multigrid/multigrid-examples.ipynb
104+
https://github.com/python-hydro/pyro2/blob/master/multigrid/multigrid-examples.ipynb
105105

106106

107107
## Solvers

docs/source/ack.rst

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

4-
The original pyro code was written in 2003-4 to help understand this
5-
methods for myself. It was originally written using the Numeric array
6-
package and handwritten C extensions for the compute-intensive
7-
kernels. It was ported to numarray when that replaced Numeric, and
8-
continued to use C extensions. This version "pyro2" was resurrected
9-
beginning in 2012 and rewritten for numpy using f2py, and brought up
10-
to date.
11-
12-
You are free to use this code and notes in your classes. Please credit
13-
Michael Zingale (SBU). *Please send me a note describing how you use
14-
it, so I can keep track of it (and help justify the development
4+
Pyro developed by (in alphabetical order):
5+
6+
* Alice Harpole
7+
* Ian Hawke
8+
* Michael Zingale
9+
10+
11+
You are free to use this code and the accompanying notes in your
12+
classes. Please credit "pyro development team" for the code, and
13+
*please send a note to the pyro-help e-mail list describing how you
14+
use it, so we can keep track of it (and help justify the development
1515
effort).*
1616

1717
If you use pyro in a publication, please cite it using this bibtex
@@ -37,3 +37,15 @@ citation::
3737
pyro benefited from numerous useful discussions with Ann Almgren, John
3838
Bell, and Andy Nonaka.
3939

40+
41+
History
42+
=======
43+
44+
The original pyro code was written in 2003-4 to help developmer
45+
Zingale understand these methods for himself. It was originally written
46+
using the Numeric array package and handwritten C extensions for the
47+
compute-intensive kernels. It was ported to numarray when that
48+
replaced Numeric, and continued to use C extensions. This version
49+
"pyro2" was resurrected beginning in 2012 and rewritten for numpy
50+
using f2py, and brought up to date.
51+

docs/source/conf.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
'sphinx.ext.autosummary',
4040
'nbsphinx',
4141
'numpydoc',
42+
'sphinx.ext.inheritance_diagram',
43+
'sphinx.ext.graphviz',
4244
'IPython.sphinxext.ipython_console_highlighting',
4345
'sphinx.ext.githubpages']
4446

@@ -59,8 +61,8 @@
5961

6062
# General information about the project.
6163
project = 'pyro'
62-
copyright = '2017, Michael Zingale'
63-
author = 'Michael Zingale'
64+
copyright = '2018, pyro development tem'
65+
author = 'pyro development team'
6466

6567
# The version info for the project you're documenting, acts as replacement for
6668
# |version| and |release|, also used in various other places throughout the
@@ -159,7 +161,7 @@
159161
# author, documentclass [howto, manual, or own class]).
160162
latex_documents = [
161163
(master_doc, 'pyro.tex', 'pyro Documentation',
162-
'Michael Zingale', 'manual'),
164+
'pyro development team', 'manual'),
163165
]
164166

165167

docs/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
pyro: a python hydro code
88
*************************
99

10-
`http://github.com/zingale/pyro2 <http://github.com/zingale/pyro2>`_
10+
`http://github.com/python-hydro/pyro2 <http://github.com/python-hydro/pyro2>`_
1111

1212
.. image:: pyro_plots.png
1313

docs/source/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Setting up pyro
22
===============
33

4-
You can clone pyro from github: `http://github.com/zingale/pyro2 <http://github.com/zingale/pyro2>`_
4+
You can clone pyro from github: `http://github.com/python-hydro/pyro2 <http://github.com/python-hydro/pyro2>`_
55

66
.. note::
77

docs/source/modules.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ pyro2
2525
plot
2626
plotvar
2727
pyro
28-
setup
2928
simulation_null
3029
swe
3130
test

docs/source/running.rst

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

4-
All the solvers are run through the ``pyro.py`` script. This takes 3
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.
5+
6+
Commandline
7+
------------
8+
9+
The ``pyro.py`` script takes 3
510
arguments: the solver name, the problem setup to run with that solver
611
(this is defined in the solver's ``problems/`` sub-directory), and the
712
inputs file (again, usually from the solver's ``problems/``
@@ -38,12 +43,49 @@ above run, we could do:
3843
plot the results after the fact using the ``plot.py`` script, as discussed
3944
in :ref:`analysis`.
4045

46+
47+
Pyro class
48+
----------
49+
50+
Alternatively, pyro can be run using the :func:`Pyro <pyro.Pyro>` class. This is done by the following steps:
51+
52+
* create a ``Pyro`` object, initializing it with a specific solver
53+
* initialize the problem, passing in runtime parameters and inputs
54+
* run the simulation
55+
56+
For example, if we wished to use the ``compressible`` solver to run the Kelvin-Helmholtz problem ``kh``, we would do the following:
57+
58+
.. code-block:: python
59+
60+
pyro = Pyro("compressible")
61+
pyro.initialize_problem(problem_name="kh",
62+
inputs_file="inputs.kh")
63+
pyro.run_sim()
64+
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:
66+
67+
.. code-block:: python
68+
69+
parameters = {"vis.dovis":0}
70+
pyro.initialize_problem(problem_name="kh",
71+
inputs_file="inputs.kh",
72+
inputs_dict=parameters)
73+
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
75+
76+
.. code-block:: python
77+
78+
pyro.single_step()
79+
80+
This will fill the boundary conditions, compute the timestep ``dt``, evolve a single timestep and do output/visualization (if required).
81+
82+
4183
Runtime options
4284
---------------
4385

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

0 commit comments

Comments
 (0)