Skip to content

Commit 351b7c4

Browse files
committed
test_mesh_multiple_groups: Test inhomogeneous polynomial degree
1 parent abaf862 commit 351b7c4

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

meshmode/discretization/connection/opposite_face.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ def _make_cross_face_batches(actx,
7070

7171
dim = src_grp.dim
7272
_, nelements, ntgt_unit_nodes = tgt_bdry_nodes.shape
73-
assert tgt_bdry_nodes.shape == src_bdry_nodes.shape
7473

7574
# {{{ invert face map (using Gauss-Newton)
7675

@@ -101,7 +100,9 @@ def apply_map(unit_nodes):
101100
one_deviation = np.abs(np.sum(intp_coeffs, axis=0) - 1)
102101
assert (one_deviation < tol).all(), np.max(one_deviation)
103102

104-
return np.einsum("fet,aef->aet", intp_coeffs, src_bdry_nodes)
103+
mapped = np.einsum("fet,aef->aet", intp_coeffs, src_bdry_nodes)
104+
assert tgt_bdry_nodes.shape == mapped.shape
105+
return mapped
105106

106107
def get_map_jacobian(unit_nodes):
107108
# unit_nodes: (dim, nelements, ntgt_unit_nodes)

test/test_meshmode.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,12 @@ def test_mesh_multiple_groups(actx_factory, ambient_dim, visualize=False):
808808
plt.savefig("test_mesh_multiple_groups_2d_elements.png", dpi=300)
809809

810810
from meshmode.discretization import Discretization
811-
grp_factory = default_simplex_group_factory(base_dim=ambient_dim, order=order)
811+
812+
def grp_factory(mesh_el_group, index):
813+
return default_simplex_group_factory(
814+
base_dim=ambient_dim, order=order + 2 if index == 0 else order
815+
)(mesh_el_group, index)
816+
812817
discr = Discretization(actx, mesh, grp_factory)
813818

814819
if visualize:

0 commit comments

Comments
 (0)