Skip to content

Commit

Permalink
Merge branch 'fusion-actx-freeze-thaw' into build-production-freeze-thaw
Browse files Browse the repository at this point in the history
  • Loading branch information
MTCam committed Jul 4, 2022
2 parents 5e369d3 + 932ae0d commit 1cab8b3
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions mirgecom/boundary.py
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ def outflow_state(self, discr, btag, gas_model, state_minus, **kwargs):
[Mengaldo_2014]_ eqn. 40 if super-sonic, 41 if sub-sonic.
"""
actx = state_minus.array_context
nhat = thaw(discr.normal(btag), actx)
nhat = actx.thaw(discr.normal(btag))
# boundary-normal velocity
boundary_vel = np.dot(state_minus.velocity, nhat)*nhat
boundary_speed = actx.np.sqrt(np.dot(boundary_vel, boundary_vel))
Expand Down Expand Up @@ -855,7 +855,7 @@ def inflow_state(self, discr, btag, gas_model, state_minus, **kwargs):
[Mengaldo_2014]_ eqn. 40 if super-sonic, 41 if sub-sonic.
"""
actx = state_minus.array_context
nhat = thaw(discr.normal(btag), actx)
nhat = actx.thaw(discr.normal(btag))

v_plus = np.dot(self._free_stream_state.velocity, nhat)
rho_plus = self._free_stream_state.mass_density
Expand Down Expand Up @@ -987,7 +987,7 @@ def inviscid_wall_flux(self, discr, btag, gas_model, state_minus,
temperature_seed=state_minus.temperature)
state_pair = TracePair(btag, interior=state_minus, exterior=wall_state)

normal = thaw(discr.normal(btag), state_minus.array_context)
normal = state_minus.array_context.thaw(discr.normal(btag))
return numerical_flux_func(state_pair, gas_model, normal)

def temperature_bc(self, state_minus, **kwargs):
Expand Down Expand Up @@ -1023,7 +1023,7 @@ def viscous_wall_flux(self, discr, btag, gas_model, state_minus,
"""Return the boundary flux for the divergence of the viscous flux."""
from mirgecom.viscous import viscous_flux
actx = state_minus.array_context
normal = thaw(discr.normal(btag), actx)
normal = actx.thaw(discr.normal(btag))

state_plus = self.isothermal_wall_state(discr=discr, btag=btag,
gas_model=gas_model,
Expand Down Expand Up @@ -1092,7 +1092,7 @@ def inviscid_wall_flux(self, discr, btag, gas_model, state_minus,
discr, btag, gas_model, state_minus)
state_pair = TracePair(btag, interior=state_minus, exterior=wall_state)

normal = thaw(discr.normal(btag), state_minus.array_context)
normal = state_minus.array_context.thaw(discr.normal(btag))
return numerical_flux_func(state_pair, gas_model, normal)

def temperature_bc(self, state_minus, **kwargs):
Expand Down Expand Up @@ -1131,7 +1131,7 @@ def viscous_wall_flux(self, discr, btag, gas_model, state_minus,
"""Return the boundary flux for the divergence of the viscous flux."""
from mirgecom.viscous import viscous_flux
actx = state_minus.array_context
normal = thaw(discr.normal(btag), actx)
normal = actx.thaw(discr.normal(btag))

state_plus = self.adiabatic_wall_state_for_diffusion(
discr=discr, btag=btag, gas_model=gas_model, state_minus=state_minus)
Expand Down Expand Up @@ -1183,7 +1183,7 @@ def adiabatic_wall_state_for_advection(self, discr, btag, gas_model,
state_minus, **kwargs):
"""Return state with opposite normal momentum."""
actx = state_minus.array_context
nhat = thaw(discr.normal(btag), actx)
nhat = actx.thaw(discr.normal(btag))

mom_plus = \
(state_minus.momentum_density
Expand All @@ -1201,7 +1201,7 @@ def adiabatic_wall_state_for_diffusion(self, discr, btag, gas_model,
state_minus, **kwargs):
"""Return state with 0 velocities and energy(Twall)."""
actx = state_minus.array_context
nhat = thaw(discr.normal(btag), actx)
nhat = actx.thaw(discr.normal(btag))

mom_plus = \
(state_minus.momentum_density
Expand All @@ -1222,7 +1222,7 @@ def inviscid_wall_flux(self, discr, btag, gas_model, state_minus,
discr, btag, gas_model, state_minus)
state_pair = TracePair(btag, interior=state_minus, exterior=wall_state)

normal = thaw(discr.normal(btag), state_minus.array_context)
normal = state_minus.array_context.thaw(discr.normal(btag))
return numerical_flux_func(state_pair, gas_model, normal)

def temperature_bc(self, state_minus, **kwargs):
Expand Down Expand Up @@ -1261,7 +1261,7 @@ def viscous_wall_flux(self, discr, btag, gas_model, state_minus,
"""Return the boundary flux for the divergence of the viscous flux."""
from mirgecom.viscous import viscous_flux
actx = state_minus.array_context
normal = thaw(discr.normal(btag), actx)
normal = actx.thaw(discr.normal(btag))

state_plus = self.adiabatic_wall_state_for_diffusion(
discr=discr, btag=btag, gas_model=gas_model, state_minus=state_minus)
Expand All @@ -1283,7 +1283,7 @@ def adiabatic_slip_grad_av(self, discr, btag, grad_av_minus, **kwargs):
# Grab some boundary-relevant data
dim, = grad_av_minus.mass.shape
actx = grad_av_minus.mass[0].array_context
nhat = thaw(discr.norm(btag), actx)
nhat = actx.thaw(discr.norm(btag))

# Subtract 2*wall-normal component of q
# to enforce q=0 on the wall
Expand Down

0 comments on commit 1cab8b3

Please sign in to comment.