Skip to content

Commit 31d5052

Browse files
committed
Merge branch 'master' of github.com:python-hydro/pyro2
2 parents e04b685 + c16147b commit 31d5052

50 files changed

Lines changed: 303 additions & 3617 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.coveragerc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
[run]
22
omit = examples/*
33
test.py
4-
incompressible/setup.py
5-
compressible/setup.py
6-
lm_atm/setup.py
7-
advection_fv4/setup.py
8-
plot.py
4+
plot.py
5+
6+
[report]
7+
omit = examples/*
8+
test.py
9+
plot.py

.mailmap

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Taher Chegini <taher.chegini@gmail.com> Taher Chegini <taher@cfd-lab.attlocal.net>
2+
Taher Chegini <taher.chegini@gmail.com> taataam <taher.chegini@gmail.com>
3+
Michael Zingale <michael.zingale@stonybrook.edu> Michael Zingale <mzingale@mail.astro.sunysb.edu>
4+
Michael Zingale <michael.zingale@stonybrook.edu> Michael Zingale <zingale@bender.astro.sunysb.edu>
5+
Michael Zingale <michael.zingale@stonybrook.edu> Michael Zingale <zingale@localhost.localdomain>
6+
Michael Zingale <michael.zingale@stonybrook.edu> Michael Zingale <zingale@nan.astro.sunysb.edu>
7+
Michael Zingale <michael.zingale@stonybrook.edu> Michael Zingale <zingale@inf.astro.sunysb.edu>
8+
Michael Zingale <michael.zingale@stonybrook.edu> zingale <zingale>

.travis.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@ language: python
33
python:
44
- "3.6"
55

6-
matrix:
7-
include:
8-
- env:
9-
- MK_ARGS=""
10-
- env:
11-
- MK_ARGS=fortran
12-
136
before_install:
147
- export PATH=$(echo $PATH | tr ':' "\n" | sed '/\/opt\/python/d' | tr "\n" ":" | sed "s|::|:|g")
158

@@ -26,7 +19,6 @@ install:
2619
before_script:
2720
- export PYTHONPATH=$PYTHONPATH:$(pwd)
2821
- export PYRO_HOME=$(pwd)
29-
- ./mk.sh $MK_ARGS
3022

3123
script:
3224
- flake8 .

README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ http://python-hydro.github.io/pyro2/
4343
switch to python 3.x
4444

4545
- There are a few steps to take to get things running. You need to
46-
make sure you have `numpy`, `f2py`, `matplotlib`, and `h5py`
46+
make sure you have `numpy`, `numba`, `matplotlib`, and `h5py`
4747
installed. On a Fedora system, this can be accomplished by doing:
4848

49-
`dnf install python3-numpy python3-numpy-f2py python3-matplotlib python3-matplotlib-tk python3-h5py`
49+
`dnf install python3-numpy python3-numba python3-matplotlib python3-matplotlib-tk python3-h5py`
5050

5151
(note, for older Fedora releases, replace `dnf` with `yum`. For
52-
python 2.x, leave off the `2` in the package names.)
52+
python 2.x, leave off the `3` in the package names.)
5353

5454
- You also need to make sure gfortran is present on you system. On a
5555
Fedora system, it can be installed as:
@@ -80,10 +80,6 @@ http://python-hydro.github.io/pyro2/
8080
* Define the environment variable `PYRO_HOME` to point to the
8181
`pyro2/` directory (only needed for regression testing)
8282

83-
* Build the Fortran source. In `pyro2/` type
84-
85-
`./mk.sh`
86-
8783
* Run a quick test of the advection solver:
8884

8985
`./pyro.py advection smooth inputs.smooth`

advection/tests/smooth_0040.h5

5.86 KB
Binary file not shown.

advection_fv4/fluxes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import advection_fv4.interface as interface_f
1+
import advection_fv4.interface as interface
22
import mesh.array_indexer as ai
33

44

@@ -77,13 +77,13 @@ def fluxes(my_data, rp, dt):
7777
1./12.*(a.jp(-2, buf=1) + a.jp(1, buf=1))
7878

7979
else:
80-
a_l, a_r = interface_f.states(a, myg.qx, myg.qy, myg.ng, 1)
80+
a_l, a_r = interface.states(a, myg.ng, 1)
8181
if u > 0:
8282
a_x = ai.ArrayIndexer(d=a_l, grid=myg)
8383
else:
8484
a_x = ai.ArrayIndexer(d=a_r, grid=myg)
8585

86-
a_l, a_r = interface_f.states(a, myg.qx, myg.qy, myg.ng, 2)
86+
a_l, a_r = interface.states(a, myg.ng, 2)
8787
if v > 0:
8888
a_y = ai.ArrayIndexer(d=a_l, grid=myg)
8989
else:

advection_fv4/interface.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44

55
@njit(cache=True)
6-
def states(a, qx, qy, ng, idir):
6+
def states(a, ng, idir):
77
r"""
88
Predict the cell-centered state to the edges in one-dimension using the
99
reconstructed, limited slopes. We use a fourth-order Godunov method.
@@ -18,8 +18,6 @@ def states(a, qx, qy, ng, idir):
1818
----------
1919
a : ndarray
2020
The cell-centered state.
21-
qx, qy : int
22-
The dimensions of `a`.
2321
ng : int
2422
The number of ghost cells
2523
idir : int
@@ -31,6 +29,8 @@ def states(a, qx, qy, ng, idir):
3129
The state predicted to the left and right edges.
3230
"""
3331

32+
qx, qy = a.shape
33+
3434
al = np.zeros((qx, qy))
3535
ar = np.zeros((qx, qy))
3636

@@ -250,8 +250,6 @@ def states_nolimit(a, qx, qy, ng, idir):
250250
----------
251251
a : ndarray
252252
The cell-centered state.
253-
qx, qy : int
254-
The dimensions of `a`.
255253
ng : int
256254
The number of ghost cells
257255
idir : int

0 commit comments

Comments
 (0)