Skip to content

Commit

Permalink
minor clean up. Warp MLUPs is not affected.
Browse files Browse the repository at this point in the history
  • Loading branch information
hsalehipour committed Jul 30, 2024
1 parent e2616bd commit 8c2bc40
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions xlb/operator/stepper/nse_stepper.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@ def kernel2d(
else:
_missing_mask[l] = wp.uint8(0)

# Apply streaming boundary conditions
if (_boundary_id == wp.uint8(0)) or _boundary_id == bc_struct.id_FullwayBounceBackBC:
# Regular streaming
f_post_stream = self.stream.warp_functional(f_0, index)
elif _boundary_id == bc_struct.id_EquilibriumBC:
# Apply streaming (pull method)
f_post_stream = self.stream.warp_functional(f_0, index)

# Apply post-streaming type boundary conditions
if _boundary_id == bc_struct.id_EquilibriumBC:
# Equilibrium boundary condition
f_post_stream = self.equilibrium_bc.warp_functional(
f_0, _missing_mask, index
Expand Down Expand Up @@ -162,7 +162,7 @@ def kernel2d(
u,
)

# Apply collision type boundary conditions
# Apply post-collision type boundary conditions
if _boundary_id == bc_struct.id_FullwayBounceBackBC:
# Full way boundary condition
f_post_collision = self.fullway_bounce_back_bc.warp_functional(
Expand Down Expand Up @@ -199,11 +199,11 @@ def kernel3d(
else:
_missing_mask[l] = wp.uint8(0)

# Apply streaming boundary conditions
if (_boundary_id == wp.uint8(0)) or _boundary_id == bc_struct.id_FullwayBounceBackBC:
# Regular streaming
f_post_stream = self.stream.warp_functional(f_0, index)
elif _boundary_id == bc_struct.id_EquilibriumBC:
# Apply streaming (pull method)
f_post_stream = self.stream.warp_functional(f_0, index)

# Apply post-streaming boundary conditions
if _boundary_id == bc_struct.id_EquilibriumBC:
# Equilibrium boundary condition
f_post_stream = self.equilibrium_bc.warp_functional(
f_0, _missing_mask, index
Expand Down

0 comments on commit 8c2bc40

Please sign in to comment.