Skip to content

Commit

Permalink
linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
anderson2981 committed May 16, 2024
1 parent ff5ba2c commit b266020
Show file tree
Hide file tree
Showing 4 changed files with 159 additions and 134 deletions.
6 changes: 4 additions & 2 deletions y3prediction/actii_y3_cav5.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,9 +670,10 @@ def add_injection(self, cv, pressure, temperature, x_vec, eos, *, time=0.0):

xpos = x_vec[0]
ypos = x_vec[1]
actx = xpos.array_context
zpos = actx.np.zeros_like(xpos)
if self._dim == 3:
zpos = x_vec[2]
actx = xpos.array_context

zeros = actx.np.zeros_like(xpos)
ones = zeros + 1.0
Expand Down Expand Up @@ -862,9 +863,10 @@ def add_injection_upstream(self, cv, pressure, temperature,

xpos = x_vec[0]
ypos = x_vec[1]
actx = xpos.array_context
zpos = actx.np.zeros_like(xpos)
if self._dim == 3:
zpos = x_vec[2]
actx = xpos.array_context

zeros = actx.np.zeros_like(xpos)
ones = zeros + 1.0
Expand Down
19 changes: 12 additions & 7 deletions y3prediction/actii_y3_cav8.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,12 @@ def __call__(self, dcoll, x_vec, eos, *, time=0.0):

xpos = x_vec[0]
ypos = x_vec[1]
actx = xpos.array_context
zpos = actx.np.zeros_like(xpos)
if self._dim == 3:
zpos = x_vec[2]
ytop = 0*x_vec[0]
actx = xpos.array_context
zeros = 0*xpos
ytop = actx.zeros_like(xpos)
zeros = actx.zeros_like(xpos)
ones = zeros + 1.0

mach = zeros
Expand Down Expand Up @@ -670,9 +671,10 @@ def add_injection(self, cv, pressure, temperature, x_vec, eos, *, time=0.0):

xpos = x_vec[0]
ypos = x_vec[1]
actx = xpos.array_context
zpos = actx.np.zeros_like(xpos)
if self._dim == 3:
zpos = x_vec[2]
actx = xpos.array_context

zeros = actx.np.zeros_like(xpos)
ones = zeros + 1.0
Expand Down Expand Up @@ -862,9 +864,10 @@ def add_injection_upstream(self, cv, pressure, temperature,

xpos = x_vec[0]
ypos = x_vec[1]
actx = xpos.array_context
zpos = actx.np.zeros_like(xpos)
if self._dim == 3:
zpos = x_vec[2]
actx = xpos.array_context

zeros = actx.np.zeros_like(xpos)
ones = zeros + 1.0
Expand Down Expand Up @@ -1395,9 +1398,10 @@ def add_injection(self, cv, pressure, temperature, x_vec, eos, *, time=0.0):

xpos = x_vec[0]
ypos = x_vec[1]
actx = xpos.array_context
zpos = actx.np.zeros_like(xpos)
if self._dim == 3:
zpos = x_vec[2]
actx = xpos.array_context

zeros = actx.np.zeros_like(xpos)
ones = zeros + 1.0
Expand Down Expand Up @@ -1550,9 +1554,10 @@ def add_injection_upstream(self, cv, pressure, temperature,

xpos = x_vec[0]
ypos = x_vec[1]
actx = xpos.array_context
zpos = actx.np.zeros_like(xpos)
if self._dim == 3:
zpos = x_vec[2]
actx = xpos.array_context

zeros = actx.np.zeros_like(xpos)
ones = zeros + 1.0
Expand Down
Loading

0 comments on commit b266020

Please sign in to comment.