Skip to content

Commit 6e3233b

Browse files
committed
Merge branch 'master' of github.com:python-hydro/pyro2
2 parents 1f14c58 + 94ab173 commit 6e3233b

File tree

6 files changed

+33
-22
lines changed

6 files changed

+33
-22
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ inputs.auto
1818
.cache
1919

2020
.pytest_cache/
21+
22+
__pycache__/

docs/source/compressible_basics.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ escape the domain. It is run as:
181181

182182
.. code-block:: none
183183
184-
./pyro.py compressible er inputs.rt
184+
./pyro.py compressible rt inputs.rt
185185
186186
.. raw:: html
187187

docs/source/multigrid_basics.rst

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,13 @@ Examples
3232

3333
multigrid test
3434
^^^^^^^^^^^^^^
35-
A basic multigrid test is run as:
35+
36+
A basic multigrid test is run as (using a path relative to the root of the
37+
``pyro2`` repository):
3638

3739
.. code-block:: none
3840
39-
./mg_test_simple.py
41+
./examples/multigrid/mg_test_simple.py
4042
4143
The ``mg_test_simple.py`` script solves a Poisson equation with a
4244
known analytic solution. This particular example comes from the text
@@ -77,17 +79,21 @@ The movie below shows the smoothing at each level to realize this solution:
7779
<iframe src="https://www.youtube.com/embed/h9MUgwJvr-g?rel=0" frameborder="0" allowfullscreen style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe>
7880
</div><br>
7981

82+
You can run this example locally by running the ``mg_vis.py`` script:
83+
84+
.. code-block:: none
85+
86+
./examples/multigrid/mg_vis.py
8087
8188
projection
8289
^^^^^^^^^^
8390

84-
Another example (``examples/multigrid/project_periodic.py``) uses
85-
multigrid to extract the divergence free part of a velocity field.
86-
This is run as:
91+
Another example uses multigrid to extract the divergence free part of a velocity
92+
field. This is run as:
8793

8894
.. code-block:: none
8995
90-
./project-periodic.py
96+
./examples/multigrid/project_periodic.py
9197
9298
Given a vector field, :math:`U`, we can decompose it into a divergence free part, :math:`U_d`, and the gradient of a scalar, :math:`\phi`:
9399

docs/source/running.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ Kelvin-Helmholtz problem ``kh``, we would do the following:
6363

6464
.. code-block:: python
6565
66+
from pyro import Pyro
6667
pyro = Pyro("compressible")
6768
pyro.initialize_problem(problem_name="kh",
6869
inputs_file="inputs.kh")

examples/multigrid/mg_test_simple.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ def test_poisson_dirichlet(N, store_bench=False, comp_bench=False,
8484
plt.xlabel("x")
8585
plt.ylabel("y")
8686

87+
print("Saving figure to mg_test.png")
88+
8789
plt.savefig("mg_test.png")
8890

8991
# store the output for later comparison
@@ -114,4 +116,4 @@ def test_poisson_dirichlet(N, store_bench=False, comp_bench=False,
114116

115117

116118
if __name__ == "__main__":
117-
test_poisson_dirichlet(256, comp_bench=True)
119+
test_poisson_dirichlet(256, comp_bench=True, make_plot=True)

paper/paper.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,6 @@ implementation and exploration of hydrodynamics methods. It is
4141
built in a object-oriented fashion, allowing for the reuse of
4242
the core components and fast prototyping of new methods.
4343

44-
In the time since the first pyro paper [@pyroI], the code has
45-
undergone considerable development, gained a large number of solvers,
46-
adopted unit testing through pytest and documentation through sphinx,
47-
and a number of new contributors. pyro's functionality can now
48-
be accessed directly through a `Pyro()` class, in addition to the
49-
original commandline script interface. This new interface in particular
50-
allows for easy use within Jupyter notebooks. We also now use HDF5
51-
for output instead of python's `pickle()` function. Previously, we used Fortran
52-
to speed up some performance-critical portions of the code. These routines
53-
could be called by the main python code by first compiling them using `f2py`.
54-
In the new version, we have replaced these Fortran routines by python functions
55-
that are compiled at runtime by `numba`. Consequently, pyro is now written
56-
entirely in python.
57-
5844
The original goal of pyro was to learn hydrodynamics methods through
5945
example, and it still serves this goal. At Stony Brook, pyro is used
6046
with new undergraduate researchers in our group to introduce them to
@@ -70,6 +56,20 @@ on the Maestro code [@maestro] and the pyro implementation will be
7056
used to prototype new low Mach number algorithms before porting them
7157
to science codes.
7258

59+
In the time since the first pyro paper [@pyroI], the code has
60+
undergone considerable development, gained a large number of solvers,
61+
adopted unit testing through pytest and documentation through sphinx,
62+
and a number of new contributors. pyro's functionality can now
63+
be accessed directly through a `Pyro()` class, in addition to the
64+
original commandline script interface. This new interface in particular
65+
allows for easy use within Jupyter notebooks. We also now use HDF5
66+
for output instead of python's `pickle()` function. Previously, we used Fortran
67+
to speed up some performance-critical portions of the code. These routines
68+
could be called by the main python code by first compiling them using `f2py`.
69+
In the new version, we have replaced these Fortran routines by python functions
70+
that are compiled at runtime by `numba`. Consequently, pyro is now written
71+
entirely in python.
72+
7373
The current pyro solvers are:
7474

7575
- linear advection (including a second-order unsplit CTU scheme, a

0 commit comments

Comments
 (0)