Skip to content

Commit

Permalink
break up lines
Browse files Browse the repository at this point in the history
  • Loading branch information
zhichen3 committed Apr 27, 2023
1 parent b2d1d5b commit d68599c
Showing 1 changed file with 40 additions and 32 deletions.
72 changes: 40 additions & 32 deletions pyro/incompressible/incomp_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,28 @@ def mac_vels(grid, dt,
# get the full u and v left and right states (including transverse
# terms) on both the x- and y-interfaces

u_xl, u_xr, u_yl, u_yr, v_xl, v_xr, v_yl, v_yr = burgers_interface.get_interface_states(grid, dt,
u, v,
ldelta_ux, ldelta_vx,
ldelta_uy, ldelta_vy)
u_xl, u_xr, u_yl, u_yr, v_xl, v_xr, v_yl, v_yr = \
burgers_interface.get_interface_states(grid, dt,
u, v,
ldelta_ux, ldelta_vx,
ldelta_uy, ldelta_vy)

# apply transverse terms on both x- and y- interfaces
u_xl, u_xr, u_yl, u_yr, v_xl, v_xr, v_yl, v_yr = burgers_interface.apply_transverse_corrections(grid, dt,
u_xl, u_xr,
u_yl, u_yr,
v_xl, v_xr,
v_yl, v_yr)
u_xl, u_xr, u_yl, u_yr, v_xl, v_xr, v_yl, v_yr = \
burgers_interface.apply_transverse_corrections(grid, dt,
u_xl, u_xr,
u_yl, u_yr,
v_xl, v_xr,
v_yl, v_yr)

# apply pressure gradient correction terms to the interface state
u_xl, u_xr, u_yl, u_yr, v_xl, v_xr, v_yl, v_yr = apply_gradp_corrections(dt,
u_xl, u_xr,
u_yl, u_yr,
v_xl, v_xr,
v_yl, v_yr,
gradp_x, gradp_y)
u_xl, u_xr, u_yl, u_yr, v_xl, v_xr, v_yl, v_yr = \
apply_gradp_corrections(dt,
u_xl, u_xr,
u_yl, u_yr,
v_xl, v_xr,
v_yl, v_yr,
gradp_x, gradp_y)

# Riemann problem -- this follows Burger's equation. We don't use
# any input velocity for the upwinding. Also, we only care about
Expand Down Expand Up @@ -97,24 +100,28 @@ def states(grid, dt,
"""

# get the full u and v left and right states without transverse terms and gradp
u_xl, u_xr, u_yl, u_yr, v_xl, v_xr, v_yl, v_yr = burgers_interface.get_interface_states(grid, dt,
u, v,
ldelta_ux, ldelta_vx,
ldelta_uy, ldelta_vy)
u_xl, u_xr, u_yl, u_yr, v_xl, v_xr, v_yl, v_yr = \
burgers_interface.get_interface_states(grid, dt,
u, v,
ldelta_ux, ldelta_vx,
ldelta_uy, ldelta_vy)

# apply transverse terms on both x- and y- interfaces
u_xl, u_xr, u_yl, u_yr, v_xl, v_xr, v_yl, v_yr = burgers_interface.apply_transverse_corrections(grid, dt,
u_xl, u_xr,
u_yl, u_yr,
v_xl, v_xr,
v_yl, v_yr)
u_xl, u_xr, u_yl, u_yr, v_xl, v_xr, v_yl, v_yr = \
burgers_interface.apply_transverse_corrections(grid, dt,
u_xl, u_xr,
u_yl, u_yr,
v_xl, v_xr,
v_yl, v_yr)

# apply pressure gradient correction terms to the interface state
u_xl, u_xr, u_yl, u_yr, v_xl, v_xr, v_yl, v_yr = apply_gradp_corrections(dt,
u_xl, u_xr,
u_yl, u_yr,
v_xl, v_xr,
v_yl, v_yr,
gradp_x, gradp_y)
u_xl, u_xr, u_yl, u_yr, v_xl, v_xr, v_yl, v_yr = \
apply_gradp_corrections(dt,
u_xl, u_xr,
u_yl, u_yr,
v_xl, v_xr,
v_yl, v_yr,
gradp_x, gradp_y)

# upwind using the MAC velocity to determine which state exists on
# the interface
Expand Down Expand Up @@ -150,8 +157,9 @@ def apply_gradp_corrections(dt,
Returns
-------
out : ndarray, ndarray, ndarray, ndarray, ndarray, ndarray, ndarray, ndarray
correct the interface states of the left and right states of u and v on both the x- and
y-interfaces interface states with the pressure gradient terms.
correct the interface states of the left and right states of u and v on
both the x- and y-interfaces interface states with the pressure gradient
terms.
"""

# Apply pressure gradient correction terms
Expand Down

0 comments on commit d68599c

Please sign in to comment.