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

Remove usage of removed nodal_face_mass_matrix from simple-dg #390

Merged
merged 1 commit into from
Oct 18, 2023
Merged
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
16 changes: 10 additions & 6 deletions examples/simple-dg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Loading