Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[run]
omit = examples/*
test.py
incompressible/setup.py
compressible/setup.py
lm_atm/setup.py
advection_fv4/setup.py
plot.py
plot.py

[report]
omit = examples/*
test.py
plot.py
8 changes: 0 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@ language: python
python:
- "3.6"

matrix:
include:
- env:
- MK_ARGS=""
- env:
- MK_ARGS=fortran

before_install:
- export PATH=$(echo $PATH | tr ':' "\n" | sed '/\/opt\/python/d' | tr "\n" ":" | sed "s|::|:|g")

Expand All @@ -26,7 +19,6 @@ install:
before_script:
- export PYTHONPATH=$PYTHONPATH:$(pwd)
- export PYRO_HOME=$(pwd)
- ./mk.sh $MK_ARGS

script:
- flake8 .
Expand Down
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ http://python-hydro.github.io/pyro2/
switch to python 3.x

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

`dnf install python3-numpy python3-numpy-f2py python3-matplotlib python3-matplotlib-tk python3-h5py`
`dnf install python3-numpy python3-numba python3-matplotlib python3-matplotlib-tk python3-h5py`

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

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

* Build the Fortran source. In `pyro2/` type

`./mk.sh`

* Run a quick test of the advection solver:

`./pyro.py advection smooth inputs.smooth`
Expand Down
Binary file modified advection/tests/smooth_0040.h5
Binary file not shown.
6 changes: 3 additions & 3 deletions advection_fv4/fluxes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import advection_fv4.interface as interface_f
import advection_fv4.interface as interface
import mesh.array_indexer as ai


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

else:
a_l, a_r = interface_f.states(a, myg.qx, myg.qy, myg.ng, 1)
a_l, a_r = interface.states(a, myg.ng, 1)
if u > 0:
a_x = ai.ArrayIndexer(d=a_l, grid=myg)
else:
a_x = ai.ArrayIndexer(d=a_r, grid=myg)

a_l, a_r = interface_f.states(a, myg.qx, myg.qy, myg.ng, 2)
a_l, a_r = interface.states(a, myg.ng, 2)
if v > 0:
a_y = ai.ArrayIndexer(d=a_l, grid=myg)
else:
Expand Down
8 changes: 3 additions & 5 deletions advection_fv4/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


@njit(cache=True)
def states(a, qx, qy, ng, idir):
def states(a, ng, idir):
r"""
Predict the cell-centered state to the edges in one-dimension using the
reconstructed, limited slopes. We use a fourth-order Godunov method.
Expand All @@ -18,8 +18,6 @@ def states(a, qx, qy, ng, idir):
----------
a : ndarray
The cell-centered state.
qx, qy : int
The dimensions of `a`.
ng : int
The number of ghost cells
idir : int
Expand All @@ -31,6 +29,8 @@ def states(a, qx, qy, ng, idir):
The state predicted to the left and right edges.
"""

qx, qy = a.shape

al = np.zeros((qx, qy))
ar = np.zeros((qx, qy))

Expand Down Expand Up @@ -250,8 +250,6 @@ def states_nolimit(a, qx, qy, ng, idir):
----------
a : ndarray
The cell-centered state.
qx, qy : int
The dimensions of `a`.
ng : int
The number of ghost cells
idir : int
Expand Down
Loading