Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use new WADG #1050

Merged
merged 8 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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))