Skip to content

Commit 9026495

Browse files
committed
RIP fortran
1 parent 51f37de commit 9026495

34 files changed

Lines changed: 286 additions & 3614 deletions

.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

.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
@@ -42,13 +42,13 @@ http://python-hydro.github.io/pyro2/
4242
switch to python 3.x
4343

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

48-
`dnf install python3-numpy python3-numpy-f2py python3-matplotlib python3-matplotlib-tk python3-h5py`
48+
`dnf install python3-numpy python3-numba python3-matplotlib python3-matplotlib-tk python3-h5py`
4949

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

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

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

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

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)