Skip to content

Commit 94ab173

Browse files
author
Alice Harpole
committed
Merge branch 'master' of github.com:python-hydro/pyro2
2 parents 0a90bd2 + 5e30048 commit 94ab173

Some content is hidden

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

41 files changed

+263
-288
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[flake8]
22
max-line-length = 120
3-
ignore = E126, E127, E128, E129, E226, E241, E265, E741, F403, W504
3+
ignore = E126, E127, E128, E129, E226, E241, E265, E741, F401, F403, W504
44
exclude = docs/,lm_combustion,radhydro

.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__/

.zenodo.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"creators": [
3+
{
4+
"name": "the Pyro Development Team"
5+
},
6+
{
7+
"affiliation": "Department of Physics and Astronomy, Stony Brook University",
8+
"name": "Harpole, Alice",
9+
"orcid": "0000-0002-1530-781X"
10+
},
11+
{
12+
"affiliation": "Department of Physics and Astronomy, Stony Brook University",
13+
"name": "Zingale, Michael",
14+
"orcid": "0000-0001-8401-030X"
15+
},
16+
{
17+
"affiliation": "University of Southampton",
18+
"name": "Hawke, Ian",
19+
"orcid": "0000-0003-4805-0309"
20+
},
21+
{
22+
"affiliation": "University of Houston",
23+
"name": "Chegini, Taher",
24+
"orcid": "0000-0002-5430-6000"
25+
}
26+
],
27+
"keywords": [
28+
"hydrodynamics"
29+
]
30+
}

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status](https://travis-ci.com/python-hydro/pyro2.svg?branch=master)](https://travis-ci.com/python-hydro/pyro2) [![Documentation Status](https://readthedocs.org/projects/pyro2/badge/?version=latest)](https://pyro2.readthedocs.io/en/latest/?badge=latest) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/python-hydro/pyro2/master?filepath=examples%2Fexamples.ipynb)
1+
[![Build Status](https://travis-ci.com/python-hydro/pyro2.svg?branch=master)](https://travis-ci.com/python-hydro/pyro2) [![Documentation Status](https://readthedocs.org/projects/pyro2/badge/?version=latest)](https://pyro2.readthedocs.io/en/latest/?badge=latest) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/python-hydro/pyro2/master?filepath=examples%2Fexamples.ipynb) [![JOSS status](http://joss.theoj.org/papers/6d8b2f94e6d08a7b5d65e98a948dcad7/status.svg)](http://joss.theoj.org/papers/6d8b2f94e6d08a7b5d65e98a948dcad7)
22

33

44
![pyro logo](www/logo.gif)
@@ -70,7 +70,9 @@ https://pyro2.readthedocs.io/
7070
- The remaining steps are:
7171

7272
* Set the `PYTHONPATH` environment variable to point to the `pyro2/`
73-
directory.
73+
directory (note this is only needed if you wish to use pyro as a python
74+
module - this step is not necessary if you only run pyro via the
75+
commandline using the `pyro.py` script).
7476

7577
* Define the environment variable `PYRO_HOME` to point to the
7678
`pyro2/` directory (only needed for regression testing)

advection/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
"""
55

66
__all__ = ['simulation']
7-
from .simulation import *
7+
from .simulation import Simulation

advection_fv4/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
"""
77

88
__all__ = ['simulation']
9-
from .simulation import *
9+
from .simulation import Simulation

advection_nonuniform/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
"""
55

66
__all__ = ['simulation']
7-
from .simulation import *
7+
from .simulation import Simulation

advection_nonuniform/advective_fluxes.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -78,27 +78,27 @@ def unsplit_fluxes(my_data, rp, dt, scalar_name):
7878

7979
for index, vel in np.ndenumerate(u.v(buf=1)):
8080
if vel < 0:
81-
a_x.v(buf=1)[index] = a.ip(shift_x.v(buf=1)[index], buf=1)[index] - \
82-
0.5 * (1.0 + cx.v(buf=1)[index]) * \
83-
ldelta_ax.ip(shift_x.v(buf=1)[index], buf=1)[index]
81+
a_x.v(buf=1)[index] = a.ip(shift_x.v(buf=1)[index], buf=1)[index] \
82+
- 0.5*(1.0 + cx.v(buf=1)[index]) \
83+
* ldelta_ax.ip(shift_x.v(buf=1)[index], buf=1)[index]
8484
else:
85-
a_x.v(buf=1)[index] = a.ip(shift_x.v(buf=1)[index], buf=1)[index] + \
86-
0.5 * (1.0 - cx.v(buf=1)[index]) * \
87-
ldelta_ax.ip(shift_x.v(buf=1)[index], buf=1)[index]
85+
a_x.v(buf=1)[index] = a.ip(shift_x.v(buf=1)[index], buf=1)[index] \
86+
+ 0.5*(1.0 - cx.v(buf=1)[index]) \
87+
* ldelta_ax.ip(shift_x.v(buf=1)[index], buf=1)[index]
8888

8989
# upwind in y-direction
9090
a_y = myg.scratch_array()
9191
shift_y = my_data.get_var("y-shift").astype(int)
9292

9393
for index, vel in np.ndenumerate(v.v(buf=1)):
9494
if vel < 0:
95-
a_y.v(buf=1)[index] = a.jp(shift_y.v(buf=1)[index], buf=1)[index] - \
96-
0.5 * (1.0 + cy.v(buf=1)[index]) * \
97-
ldelta_ay.jp(shift_y.v(buf=1)[index], buf=1)[index]
95+
a_y.v(buf=1)[index] = a.jp(shift_y.v(buf=1)[index], buf=1)[index] \
96+
- 0.5*(1.0 + cy.v(buf=1)[index]) \
97+
* ldelta_ay.jp(shift_y.v(buf=1)[index], buf=1)[index]
9898
else:
99-
a_y.v(buf=1)[index] = a.jp(shift_y.v(buf=1)[index], buf=1)[index] + \
100-
0.5 * (1.0 - cy.v(buf=1)[index]) * \
101-
ldelta_ay.jp(shift_y.v(buf=1)[index], buf=1)[index]
99+
a_y.v(buf=1)[index] = a.jp(shift_y.v(buf=1)[index], buf=1)[index] \
100+
+ 0.5*(1.0 - cy.v(buf=1)[index]) \
101+
* ldelta_ay.jp(shift_y.v(buf=1)[index], buf=1)[index]
102102

103103
# compute the transverse flux differences. The flux is just (u a)
104104
# HOTF
@@ -114,13 +114,13 @@ def unsplit_fluxes(my_data, rp, dt, scalar_name):
114114
dtdy2 = 0.5 * dt / myg.dy
115115

116116
for index, vel in np.ndenumerate(u.v(buf=1)):
117-
F_x.v(buf=1)[index] = vel * (a_x.v(buf=1)[index] -
118-
dtdy2 * (F_yt.ip_jp(shift_x.v(buf=1)[index], 1, buf=1)[index] -
119-
F_yt.ip(shift_x.v(buf=1)[index], buf=1)[index]))
117+
F_x.v(buf=1)[index] = vel * (a_x.v(buf=1)[index] - dtdy2 *
118+
(F_yt.ip_jp(shift_x.v(buf=1)[index], 1, buf=1)[index] -
119+
F_yt.ip(shift_x.v(buf=1)[index], buf=1)[index]))
120120

121121
for index, vel in np.ndenumerate(v.v(buf=1)):
122-
F_y.v(buf=1)[index] = vel * (a_y.v(buf=1)[index] -
123-
dtdx2 * (F_xt.ip_jp(1, shift_y.v(buf=1)[index], buf=1)[index] -
124-
F_xt.jp(shift_y.v(buf=1)[index], buf=1)[index]))
122+
F_y.v(buf=1)[index] = vel * (a_y.v(buf=1)[index] - dtdx2 *
123+
(F_xt.ip_jp(1, shift_y.v(buf=1)[index], buf=1)[index] -
124+
F_xt.jp(shift_y.v(buf=1)[index], buf=1)[index]))
125125

126126
return F_x, F_y
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[slotted]
2-
omega = 0.5 ;angular velocity
3-
offset = 0.25 ;offset of the slot center from domain center
2+
omega = 0.5 ;angular velocity
3+
offset = 0.25 ;offset of the slot center from domain center

advection_nonuniform/problems/_smooth.defaults

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)