diff --git a/test/test_grudge.py b/test/test_grudge.py index 2a6da624d01de2bd6c09a20c56009230277b7138..16ce3f36f4eeb0e6977c4dfc84d32a70d64585fd 100644 --- a/test/test_grudge.py +++ b/test/test_grudge.py @@ -25,6 +25,7 @@ import numpy.linalg as la from meshmode import _acf # noqa: F401 from meshmode.dof_array import flatten, thaw +import meshmode.mesh.generation as mgen from pytools.obj_array import flat_obj_array, make_obj_array @@ -1122,6 +1123,24 @@ def test_map_if(actx_factory): bind(discr, sym_if)(actx) +def test_empty_boundary(actx_factory): + # https://github.com/inducer/grudge/issues/54 + + actx = actx_factory() + + dim = 2 + mesh = mgen.generate_regular_rect_mesh( + a=(-0.5,)*dim, b=(0.5,)*dim, + n=(8,)*dim, order=4) + discr = DGDiscretizationWithBoundaries(actx, mesh, order=4) + normal = bind(discr, + sym.normal(sym.BTAG_NONE, dim, dim=dim - 1))(actx) + from meshmode.dof_array import DOFArray + for component in normal: + assert isinstance(component, DOFArray) + assert len(component) == len(discr.discr_from_dd(sym.BTAG_NONE).groups) + + # You can test individual routines by typing # $ python test_grudge.py 'test_routine()'