Skip to content

Commit

Permalink
fix flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
zhichen3 committed Jul 14, 2024
1 parent c9a084b commit 8f26cb1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pyro/mesh/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ def __init__(self, nx, ny, ng=1,
volume = np.full((self.qx, self.qy), self.dx * self.dy)
self.V = ArrayIndexer(volume, grid=self)


class SphericalPolar(Grid2d):
"""
This class defines a spherical polar grid.
Expand Down Expand Up @@ -252,9 +253,9 @@ def __init__(self, nx, ny, ng=1,
# = (dr) * (r * dtheta) * (r * sin(theta) * dphi)
# dV = - 2*np.pi / 3 * (cos(theta{i+1/2}) - cos(theta{i-1/2})) * (r{i+1/2}^3 - r{i-1/2}^3)

volume = -0.6666666666666667 * np.pi * \
(np.cos(self.yr2d) - np.cos(self.yl2d)) * \
(self.xr2d**3 - self.xl2d**3)
volume = -0.6666666666666667 * np.pi * \
(np.cos(self.yr2d) - np.cos(self.yl2d)) * \
(self.xr2d**3 - self.xl2d**3)
self.V = ArrayIndexer(volume, grid=self)


Expand Down

0 comments on commit 8f26cb1

Please sign in to comment.