diff --git a/meshmode/mesh/processing.py b/meshmode/mesh/processing.py index 32016cd63afc3e2fd7379c3b3ba5b5f46ed05548..5dcb83dc620521440df90718144a1de267764e98 100644 --- a/meshmode/mesh/processing.py +++ b/meshmode/mesh/processing.py @@ -285,7 +285,9 @@ def map_mesh(mesh, f): # noqa new_groups = [] for group in mesh.groups: - new_groups.append(group.copy(nodes=f(group.nodes))) + mapped_nodes = f(group.nodes.reshape(mesh.ambient_dim, -1)) + new_groups.append(group.copy( + nodes=mapped_nodes.reshape(*group.nodes.shape))) # }}}