From 2b927e8247ebe1a7e6c74461c302ade6be831691 Mon Sep 17 00:00:00 2001 From: Kaushik Kulkarni Date: Thu, 22 Oct 2026 10:46:45 -0700 Subject: [PATCH] Replace deprecated Modepy face mass matrix APIs Use generic nodal quadrature matrix routines for interpolatory and quadrature-only face groups. Require Modepy 2026.1 for these APIs. Assisted-by: GPT-6.1 Sol (OpenAI) --- grudge/op.py | 23 ++++++++++++++--------- pyproject.toml | 2 +- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/grudge/op.py b/grudge/op.py index 5f534158..c87c78a9 100644 --- a/grudge/op.py +++ b/grudge/op.py @@ -1182,20 +1182,25 @@ def get_ref_face_mass_mat( f"exact for degree {n+m}." ) - matrix[:, iface, :] = mp.nodal_mass_matrix_for_face( - face, face_quadrature, - face_basis.functions, vol_basis.functions, - vol_grp.unit_nodes, - face_grp.unit_nodes, + matrix[:, iface, :] = mp.nodal_quadrature_bilinear_form_matrix( + face_quadrature, + test_functions=vol_basis.functions, + trial_functions=face_basis.functions, + nodal_interp_functions_test=vol_basis.functions, + nodal_interp_functions_trial=face_basis.functions, + input_nodes=face_grp.unit_nodes, + output_nodes=vol_grp.unit_nodes, + test_function_node_map=face.map_to_volume, ) else: # Otherwise, we use a routine that is purely quadrature-based # (no need for explicit face basis functions) - matrix[:, iface, :] = mp.nodal_quad_mass_matrix_for_face( - face, + matrix[:, iface, :] = mp.nodal_quadrature_test_matrix( face_quadrature, - vol_basis.functions, - vol_grp.unit_nodes, + test_functions=vol_basis.functions, + nodal_interp_functions=vol_basis.functions, + nodes=vol_grp.unit_nodes, + test_function_node_map=face.map_to_volume, ) return actx.freeze( diff --git a/pyproject.toml b/pyproject.toml index c8f34db3..dc7f4584 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,7 @@ dependencies = [ "constantdict", "loopy>=2024.1", "meshmode>=2021.2", - "modepy>=2021.1", + "modepy>=2026.1", "pymbolic>=2022.2", "pyopencl>=2022.1", "pytools>=2024.1.18",