From b355ccfc35274a9f3a7d23716bc2e4c3b6f89e62 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sat, 9 Jan 2016 15:53:32 -0600 Subject: [PATCH] Let GlobalToReferenceMapper deal with surface operators --- grudge/symbolic/mappers/__init__.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/grudge/symbolic/mappers/__init__.py b/grudge/symbolic/mappers/__init__.py index 2470bb86..fde4e302 100644 --- a/grudge/symbolic/mappers/__init__.py +++ b/grudge/symbolic/mappers/__init__.py @@ -498,8 +498,13 @@ class GlobalToReferenceMapper(CSECachingMapperMixin, IdentityMapper): # if we encounter non-quadrature operators here, we know they # must be nodal. - jac_in = sym.area_element(self.ambient_dim, self.dim, dd=expr.op.dd_in) - jac_noquad = sym.area_element(self.ambient_dim, self.dim, + if expr.op.dd_in.is_volume(): + dim = self.dim + else: + dim = self.dim - 1 + + jac_in = sym.area_element(self.ambient_dim, dim, dd=expr.op.dd_in) + jac_noquad = sym.area_element(self.ambient_dim, dim, dd=expr.op.dd_in.with_qtag(sym.QTAG_NONE)) def rewrite_derivative(ref_class, field, dd_in, with_jacobian=True): -- GitLab