From 0a025178870c35fe9301b96c08ee16a30c35ec66 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Fri, 8 May 2020 19:51:59 -0500 Subject: [PATCH] fix some remaining issues with 1d meshes --- meshmode/discretization/connection/opposite_face.py | 2 +- meshmode/discretization/poly_element.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/meshmode/discretization/connection/opposite_face.py b/meshmode/discretization/connection/opposite_face.py index 05d55483..97570b33 100644 --- a/meshmode/discretization/connection/opposite_face.py +++ b/meshmode/discretization/connection/opposite_face.py @@ -43,7 +43,7 @@ def _make_cross_face_batches(queue, return cl.array.to_device(queue, ary, array_queue=None) from meshmode.discretization.connection.direct import InterpolationBatch - if tgt_bdry_discr.ambient_dim == 1: + if tgt_bdry_discr.dim == 0: yield InterpolationBatch( from_group_index=i_src_grp, from_element_indices=to_dev(src_bdry_element_indices), diff --git a/meshmode/discretization/poly_element.py b/meshmode/discretization/poly_element.py index 7aba12a0..436b1fb1 100644 --- a/meshmode/discretization/poly_element.py +++ b/meshmode/discretization/poly_element.py @@ -177,7 +177,9 @@ class QuadratureSimplexElementGroup(SimplexElementGroupBase): @memoize_method def _quadrature_rule(self): dims = self.mesh_el_group.dim - if dims == 1: + if dims == 0: + return mp.Quadrature(np.empty((0, 1)), np.empty((0, 1))) + elif dims == 1: return mp.LegendreGaussQuadrature(self.order) else: return mp.XiaoGimbutasSimplexQuadrature(self.order, dims) -- GitLab