Skip to content

Commit b16208f

Browse files
committed
fix flake8
1 parent 8aac072 commit b16208f

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

compressible/problems/logo.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
import mesh.patch as patch
55
import numpy as np
66
from util import msg
7-
import math
87
import matplotlib.pyplot as plt
98

9+
1010
def init_data(my_data, rp):
1111
""" initialize the sedov problem """
1212

@@ -22,7 +22,7 @@ def init_data(my_data, rp):
2222
myg = my_data.grid
2323

2424
fig = plt.figure(2, (0.64, 0.64), dpi=100*myg.nx/64)
25-
ax = fig.add_subplot(111)
25+
fig.add_subplot(111)
2626

2727
fig.text(0.5, 0.5, "pyro", transform=fig.transFigure, fontsize="16",
2828
horizontalalignment="center", verticalalignment="center")
@@ -33,7 +33,7 @@ def init_data(my_data, rp):
3333
data = np.fromstring(fig.canvas.tostring_rgb(), dtype=np.uint8, sep='')
3434
data = data.reshape(fig.canvas.get_width_height()[::-1] + (3,))
3535

36-
logo = np.rot90(np.rot90(np.rot90((256-data[:,:,1])/255.0)))
36+
logo = np.rot90(np.rot90(np.rot90((256-data[:, :, 1])/255.0)))
3737

3838
# get the density, momenta, and energy as separate variables
3939
dens = my_data.get_var("density")
@@ -53,20 +53,19 @@ def init_data(my_data, rp):
5353
# set the density in the logo zones to be really large
5454
logo_dens = 50.0
5555

56-
dens.v()[:,:] = logo[:,:] * logo_dens
56+
dens.v()[:, :] = logo[:, :] * logo_dens
5757

5858
# pressure equilibrium
5959
gamma = rp.get_param("eos.gamma")
6060

6161
p_ambient = 1.e-5
62-
ener[:,:] = p_ambient/(gamma - 1.0)
63-
62+
ener[:, :] = p_ambient/(gamma - 1.0)
6463

6564
# explosion
66-
ener[myg.ilo,myg.jlo] = 1.0
67-
ener[myg.ilo,myg.jhi] = 1.0
68-
ener[myg.ihi,myg.jlo] = 1.0
69-
ener[myg.ihi,myg.jhi] = 1.0
65+
ener[myg.ilo, myg.jlo] = 1.0
66+
ener[myg.ilo, myg.jhi] = 1.0
67+
ener[myg.ihi, myg.jlo] = 1.0
68+
ener[myg.ihi, myg.jhi] = 1.0
7069

7170

7271
def finalize():

0 commit comments

Comments
 (0)