Skip to content

Commit

Permalink
Use new WADG (#1050)
Browse files Browse the repository at this point in the history
Co-authored-by: Mike Anderson <[email protected]>
  • Loading branch information
MTCam and anderson2981 authored Jul 30, 2024
1 parent 61bd76a commit f5d0d97
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 5 additions & 3 deletions mirgecom/diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,9 +724,11 @@ def boundary_flux(bdtag, bdry):
dcoll, dd_bdry_quad, kappa_minus_quad, u_minus_quad,
numerical_flux_func=numerical_flux_func))

u_quad = op.project(dcoll, dd_vol, dd_vol_quad, u)

return op.inverse_mass(
dcoll, dd_vol,
op.weak_local_grad(dcoll, dd_vol, -u)
dcoll, dd_vol_quad,
op.weak_local_grad(dcoll, dd_vol_quad, -u_quad)
- # noqa: W504
op.face_mass(
dcoll, dd_allfaces_quad,
Expand Down Expand Up @@ -888,7 +890,7 @@ def boundary_flux(bdtag, bdry):
numerical_flux_func=diffusion_numerical_flux_func))

diff_u = op.inverse_mass(
dcoll, dd_vol,
dcoll, dd_vol_quad,
op.weak_local_div(dcoll, dd_vol_quad, -kappa_quad*grad_u_quad)
- # noqa: W504
op.face_mass(
Expand Down
2 changes: 1 addition & 1 deletion mirgecom/euler.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def _interp_to_surf_modified_conservedvars(gamma, ev_pair):

return op.inverse_mass(
dcoll,
dd_vol,
dd_vol_quad,
inviscid_vol_term - op.face_mass(dcoll, dd_allfaces_quad,
inviscid_flux_bnd)
)
Expand Down
6 changes: 2 additions & 4 deletions mirgecom/operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@

import grudge.op as op

from grudge.dof_desc import DISCR_TAG_BASE


def grad_operator(dcoll, dd_vol, dd_allfaces, u, flux):
r"""Compute a DG gradient for the input *u* with flux given by *flux*.
Expand Down Expand Up @@ -60,7 +58,7 @@ def grad_operator(dcoll, dd_vol, dd_allfaces, u, flux):
"""
# pylint: disable=invalid-unary-operand-type
return -op.inverse_mass(
dcoll, dd_vol.with_discr_tag(DISCR_TAG_BASE),
dcoll, dd_vol,
op.weak_local_grad(dcoll, dd_vol, u)
- op.face_mass(dcoll, dd_allfaces, flux))

Expand Down Expand Up @@ -92,6 +90,6 @@ def div_operator(dcoll, dd_vol, dd_allfaces, v, flux):
"""
# pylint: disable=invalid-unary-operand-type
return -op.inverse_mass(
dcoll, dd_vol.with_discr_tag(DISCR_TAG_BASE),
dcoll, dd_vol,
op.weak_local_div(dcoll, dd_vol, v)
- op.face_mass(dcoll, dd_allfaces, flux))

0 comments on commit f5d0d97

Please sign in to comment.