@@ -56,7 +56,8 @@ https://python-hydro.github.io/pyro2
56
56
- We require ` numpy ` , ` numba ` , ` matplotlib ` , and ` h5py ` for running pyro
57
57
and ` setuptools_scm ` for the install.
58
58
59
- - There are several ways to install pyro. The simplest way is via PyPI/pip:
59
+ - There are several ways to install pyro. The simplest way is via
60
+ PyPI/pip:
60
61
61
62
```
62
63
pip install pyro-hydro
@@ -85,7 +86,8 @@ https://python-hydro.github.io/pyro2
85
86
print matplotlib.pyplot.get_backend()
86
87
```
87
88
88
- - If you want to run the unit tests, you need to have `pytest` installed.
89
+ - If you want to run the unit tests, you need to have `pytest`
90
+ installed.
89
91
90
92
- Finally, you can run a quick test of the advection solver:
91
93
@@ -105,8 +107,8 @@ on the grid are described in a jupyter notebook:
105
107
https://github.com/python-hydro/pyro2/blob/main/pyro/mesh/mesh-examples.ipynb
106
108
107
109
108
- Many of the methods here rely on multigrid. The basic multigrid solver is
109
- demonstrated in the juputer notebook:
110
+ Many of the methods here rely on multigrid. The basic multigrid
111
+ solver is demonstrated in the juputer notebook:
110
112
111
113
https://github.com/python-hydro/pyro2/blob/main/pyro/multigrid/multigrid-constant-coefficients.ipynb
112
114
@@ -123,7 +125,8 @@ pyro provides the following solvers (all in 2-d):
123
125
- `advection_fv4`: a fourth-order accurate finite-volume advection
124
126
solver that uses RK4 time integration.
125
127
126
- - `advection_nonuniform`: a solver for advection with a non-uniform velocity field.
128
+ - `advection_nonuniform`: a solver for advection with a non-uniform
129
+ velocity field.
127
130
128
131
- `advection_rk`: a second-order unsplit solver for linear advection
129
132
that uses Runge-Kutta integration instead of characteristic
@@ -132,27 +135,28 @@ pyro provides the following solvers (all in 2-d):
132
135
- `advection_weno`: a method-of-lines WENO solver for linear
133
136
advection.
134
137
135
- - `burgers`: a second-order unsplit solver for invsicid Burgers' equation.
138
+ - `burgers`: a second-order unsplit solver for invsicid Burgers'
139
+ equation.
136
140
137
- - `viscous_burgers`: a second-order unsplit solver for viscous Burgers' equation
138
- with constant-coefficient diffusion. It uses Crank-Nicolson time-discretized
139
- solver for solving diffusion.
141
+ - `viscous_burgers`: a second-order unsplit solver for viscous
142
+ Burgers' equation with constant-coefficient diffusion. It uses
143
+ Crank-Nicolson time-discretized solver for solving diffusion.
140
144
141
145
- `compressible`: a second-order unsplit solver for the Euler
142
146
equations of compressible hydrodynamics. This uses characteristic
143
147
tracing and corner coupling for the prediction of the interface
144
148
states and a 2-shock or HLLC approximate Riemann solver.
145
149
146
- - `compressible_fv4`: a fourth-order accurate finite-volume compressible
147
- hydro solver that uses RK4 time integration. This is built from the
148
- method of McCourquodale and Colella (2011).
150
+ - `compressible_fv4`: a fourth-order accurate finite-volume
151
+ compressible hydro solver that uses RK4 time integration. This
152
+ is built from the method of McCourquodale and Colella (2011).
149
153
150
154
- `compressible_rk`: a second-order unsplit solver for Euler
151
- equations that uses Runge-Kutta integration instead of
152
- characteristic tracing.
155
+ equations that uses Runge-Kutta integration instead of
156
+ characteristic tracing.
153
157
154
- - `compressible_sdc`: a fourth-order compressible solver,
155
- using spectral-deferred correction (SDC) for the time integration.
158
+ - `compressible_sdc`: a fourth-order compressible solver, using
159
+ spectral-deferred correction (SDC) for the time integration.
156
160
157
161
- `diffusion`: a Crank-Nicolson time-discretized solver for the
158
162
constant-coefficient diffusion equation.
@@ -188,29 +192,30 @@ of the simulation specifying the analysis routines that can be used
188
192
with their data.
189
193
190
194
- `pyro/util/compare.py`: this takes two simulation output files as
191
- input and compares zone-by-zone for exact agreement. This is used as
192
- part of the regression testing.
195
+ input and compares zone-by-zone for exact agreement. This is used
196
+ as part of the regression testing.
193
197
194
198
usage: `./compare.py file1 file2`
195
199
196
- - `pyro/plot.py`: this takes the an output file as input and plots the
197
- data using the solver's dovis method.
200
+ - `pyro/plot.py`: this takes the an output file as input and plots
201
+ the data using the solver's dovis method.
198
202
199
203
usage: `./plot.py file`
200
204
201
205
- `pyro/analysis/`
202
206
203
- * `dam_compare.py`: this takes an output file from the
204
- shallow water dam break problem and plots a slice through the domain
205
- together with the analytic solution (calculated in the script).
207
+ * `dam_compare.py`: this takes an output file from the shallow
208
+ water dam break problem and plots a slice through the domain
209
+ together with the analytic solution (calculated in the
210
+ script).
206
211
207
212
usage: `./dam_compare.py file`
208
213
209
- * `gauss_diffusion_compare.py`: this is for the diffusion solver's
210
- Gaussian diffusion problem. It takes a sequence of output
211
- files as arguments, computes the angle-average, and the plots
212
- the resulting points over the analytic solution for comparison
213
- with the exact result.
214
+ * `gauss_diffusion_compare.py`: this is for the diffusion
215
+ solver's Gaussian diffusion problem. It takes a sequence of
216
+ output files as arguments, computes the angle-average, and the
217
+ plots the resulting points over the analytic solution for
218
+ comparison with the exact result.
214
219
215
220
usage: `./gauss_diffusion_compare.py file*`
216
221
@@ -233,9 +238,9 @@ with their data.
233
238
234
239
usage: `./sedov_compare.py file`
235
240
236
- * `smooth_error.py`: this takes an output file from the advection
237
- solver's smooth problem and compares to the analytic solution,
238
- outputting the L2 norm of the error.
241
+ * `smooth_error.py`: this takes an output file from the
242
+ advection solver's smooth problem and compares to the analytic
243
+ solution, outputting the L2 norm of the error.
239
244
240
245
usage: `./smooth_error.py file`
241
246
@@ -248,8 +253,8 @@ with their data.
248
253
249
254
## Understanding the algorithms
250
255
251
- There is a set of notes that describe the background and details of the
252
- algorithms that pyro implements:
256
+ There is a set of notes that describe the background and details of
257
+ the algorithms that pyro implements:
253
258
254
259
http://open-astrophysics-bookshelf.github.io/numerical_exercises/
255
260
@@ -260,10 +265,10 @@ with their data.
260
265
261
266
## Regression and unit testing
262
267
263
- The `pyro/test.py` script will run several of the problems (as well as
264
- some stand-alone multigrid tests) and compare the solution to stored
265
- benchmarks (in each solver's `tests/` subdirectory). The return value
266
- of the script is the number of tests that failed.
268
+ The `pyro/test.py` script will run several of the problems (as well
269
+ as some stand-alone multigrid tests) and compare the solution to
270
+ stored benchmarks (in each solver's `tests/` subdirectory). The
271
+ return value of the script is the number of tests that failed.
267
272
268
273
Unit tests are controlled by pytest and can be run simply via
269
274
@@ -273,8 +278,8 @@ with their data.
273
278
274
279
## Acknowledgements
275
280
276
- If you use pyro in a class or workshop, please e-mail us to let us know
277
- (we'd like to start listing these on the website).
281
+ If you use pyro in a class or workshop, please e-mail us to let us
282
+ know (we'd like to start listing these on the website).
278
283
279
284
If pyro was used for a publication, please cite the article found in
280
285
the `CITATION` file.
0 commit comments