From f5d0d97c41e8c8a05546b1d1a6a2979ec8ea3554 Mon Sep 17 00:00:00 2001 From: Mike Campbell Date: Tue, 30 Jul 2024 10:52:55 -0500 Subject: [PATCH] Use new WADG (#1050) Co-authored-by: Mike Anderson --- mirgecom/diffusion.py | 8 +++++--- mirgecom/euler.py | 2 +- mirgecom/operators.py | 6 ++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mirgecom/diffusion.py b/mirgecom/diffusion.py index ab9759084..3b62a9c9a 100644 --- a/mirgecom/diffusion.py +++ b/mirgecom/diffusion.py @@ -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, @@ -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( diff --git a/mirgecom/euler.py b/mirgecom/euler.py index 378a8ee2c..2a4158fb1 100644 --- a/mirgecom/euler.py +++ b/mirgecom/euler.py @@ -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) ) diff --git a/mirgecom/operators.py b/mirgecom/operators.py index 3984f1656..9e022fea6 100644 --- a/mirgecom/operators.py +++ b/mirgecom/operators.py @@ -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*. @@ -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)) @@ -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))