From 9569513271d2549337e35ad764347dc2509d5ef5 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Tue, 17 Oct 2023 22:43:27 -0500 Subject: [PATCH] Remove usage of removed nodal_face_mass_matrix from simple-dg --- examples/simple-dg.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/examples/simple-dg.py b/examples/simple-dg.py index 964e0a12d..47d473519 100644 --- a/examples/simple-dg.py +++ b/examples/simple-dg.py @@ -275,15 +275,19 @@ def get_local_face_mass_matrix(self, afgrp, volgrp, dtype): import modepy as mp shape = mp.Simplex(volgrp.dim) - unit_vertices = mp.unit_vertices_for_shape(shape).T for face in mp.faces_for_shape(shape): - face_vertices = unit_vertices[np.array(face.volume_vertex_indices)].T - matrix[:, face.face_index, :] = mp.nodal_face_mass_matrix( + from modepy import basis_for_space, quadrature_for_space, PN, Simplex + face_space = PN(volgrp.dim - 1, volgrp.order) + face_shape = Simplex(volgrp.dim-1) + face_quad = quadrature_for_space(face_space, face_shape) + face_basis = basis_for_space(face_space, face_shape) + + matrix[:, face.face_index, :] = mp.nodal_mass_matrix_for_face( + face, face_quad, + face_basis.functions, volgrp.basis_obj().functions, - volgrp.unit_nodes, afgrp.unit_nodes, - volgrp.order, - face_vertices) + volgrp.unit_nodes, afgrp.unit_nodes) actx = self._setup_actx return actx.freeze(actx.from_numpy(matrix))