From 6f2c5975e19d1d484da4951e7be5d0b744d09e2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20He=C3=9F?= <rene.hess@iwr.uni-heidelberg.de> Date: Mon, 26 Feb 2018 15:05:20 +0100 Subject: [PATCH] Use the correct restriction everywhere --- python/dune/perftool/blockstructured/tools.py | 2 +- python/dune/perftool/pdelab/argument.py | 4 +- python/dune/perftool/pdelab/geometry.py | 10 +- python/dune/perftool/pdelab/localoperator.py | 12 +- python/dune/perftool/pdelab/quadrature.py | 1 - python/dune/perftool/pdelab/signatures.py | 106 +++++++++--------- python/dune/perftool/pdelab/spaces.py | 2 +- python/dune/perftool/sumfact/accumulation.py | 10 +- python/dune/perftool/sumfact/geometry.py | 12 +- python/dune/perftool/sumfact/switch.py | 8 +- .../dune/perftool/ufl/modified_terminals.py | 4 +- python/dune/perftool/ufl/visitor.py | 8 +- 12 files changed, 88 insertions(+), 91 deletions(-) diff --git a/python/dune/perftool/blockstructured/tools.py b/python/dune/perftool/blockstructured/tools.py index 31f57e70..029b0f75 100644 --- a/python/dune/perftool/blockstructured/tools.py +++ b/python/dune/perftool/blockstructured/tools.py @@ -38,7 +38,7 @@ def sub_element_inames(): def sub_facet_inames(): subelem_inames = sub_element_inames() - center = pymbolic_in_cell_coordinates(prim.Variable(name_localcenter()), Restriction.NEGATIVE) + center = pymbolic_in_cell_coordinates(prim.Variable(name_localcenter()), Restriction.POSITIVE) # check if iname[index] must be constant or not def predicate(index): diff --git a/python/dune/perftool/pdelab/argument.py b/python/dune/perftool/pdelab/argument.py index e4dfb972..30449ede 100644 --- a/python/dune/perftool/pdelab/argument.py +++ b/python/dune/perftool/pdelab/argument.py @@ -177,14 +177,14 @@ def name_accumulation_variable(restrictions=None): if measure == "cell": restrictions = (Restriction.NONE,) else: - restrictions = (Restriction.NEGATIVE,) + restrictions = (Restriction.POSITIVE,) return name_residual(*restrictions) if ft == 'jacobian': if restrictions is None: if measure == "cell": restrictions = (Restriction.NONE, Restriction.NONE) else: - restrictions = (Restriction.NEGATIVE, Restriction.NEGATIVE) + restrictions = (Restriction.POSITIVE, Restriction.POSITIVE) return name_jacobian(*restrictions) assert False diff --git a/python/dune/perftool/pdelab/geometry.py b/python/dune/perftool/pdelab/geometry.py index 6c400cc4..40391a5f 100644 --- a/python/dune/perftool/pdelab/geometry.py +++ b/python/dune/perftool/pdelab/geometry.py @@ -112,7 +112,7 @@ def type_geometry_wrapper(): @preamble def define_restricted_cell(name, restriction): ig = name_intersection_geometry_wrapper() - which = "inside" if restriction == Restriction.NEGATIVE else "outside" + which = "inside" if restriction == Restriction.POSITIVE else "outside" return "const auto& {} = {}.{}();".format(name, ig, which, @@ -124,7 +124,7 @@ def name_cell(restriction): eg = name_element_geometry_wrapper() return "{}.entity()".format(eg) else: - which = "inside" if restriction == Restriction.NEGATIVE else "outside" + which = "inside" if restriction == Restriction.POSITIVE else "outside" name = "{}_cell".format(which) define_restricted_cell(name, restriction) return name @@ -186,7 +186,7 @@ def name_geometry(): @preamble def define_in_cell_geometry(restriction, name): ig = name_intersection_geometry_wrapper() - which = "In" if restriction == Restriction.NEGATIVE else "Out" + which = "In" if restriction == Restriction.POSITIVE else "Out" return "auto {} = {}.geometryIn{}side();".format(name, ig, which @@ -196,7 +196,7 @@ def define_in_cell_geometry(restriction, name): def name_in_cell_geometry(restriction): assert restriction is not Restriction.NONE - name = "geo_in_{}side".format("in" if restriction is Restriction.NEGATIVE else "out") + name = "geo_in_{}side".format("in" if restriction is Restriction.POSITIVE else "out") define_in_cell_geometry(restriction, name) return name @@ -216,7 +216,7 @@ def apply_in_cell_transformation(name, local, restriction): def pymbolic_in_cell_coordinates(local, restriction): basename = get_pymbolic_basename(local) - name = "{}_in_{}side".format(basename, "in" if restriction is Restriction.NEGATIVE else "out") + name = "{}_in_{}side".format(basename, "in" if restriction is Restriction.POSITIVE else "out") temporary_variable(name, shape=(world_dimension(),), shape_impl=("fv",)) apply_in_cell_transformation(name, local, restriction) return Variable(name) diff --git a/python/dune/perftool/pdelab/localoperator.py b/python/dune/perftool/pdelab/localoperator.py index 4873920b..6e1bcc34 100644 --- a/python/dune/perftool/pdelab/localoperator.py +++ b/python/dune/perftool/pdelab/localoperator.py @@ -159,9 +159,9 @@ def localoperator_basename(form_ident): def name_gridfunction_member(coeff, restriction, diffOrder=0): # We reuse the grid function for volume integrals in skeleton integrals - if restriction == Restriction.NEGATIVE: + if restriction == Restriction.POSITIVE: restriction = Restriction.NONE - restr = "_n" if restriction == Restriction.POSITIVE else "" + restr = "_n" if restriction == Restriction.NEGATIVE else "" name = "local_gridfunction_coeff{}_diff{}{}".format(coeff.count(), diffOrder, restr) define_gridfunction_member(name, coeff, restriction, diffOrder) return name @@ -345,13 +345,12 @@ def _list_infos(expr, number, visitor): return element = ma[0].argexpr.ufl_element() - from dune.perftool.ufl.modified_terminals import Restriction if visitor.measure == "cell": restrictions = (Restriction.NONE,) elif visitor.measure == "exterior_facet": - restrictions = (Restriction.NEGATIVE,) + restrictions = (Restriction.POSITIVE,) elif visitor.measure == "interior_facet": - restrictions = (Restriction.NEGATIVE, Restriction.POSITIVE) + restrictions = (Restriction.POSITIVE, Restriction.NEGATIVE) for res in restrictions: for ei in range(element.value_size()): yield PDELabAccumulationInfo(element_index=ei, restriction=res) @@ -376,8 +375,7 @@ def get_accumulation_info(expr, visitor): restriction = visitor.restriction if visitor.measure == 'exterior_facet': - from dune.perftool.pdelab.restriction import Restriction - restriction = Restriction.NEGATIVE + restriction = Restriction.POSITIVE inames = visitor.interface.lfs_inames(leaf_element, restriction, diff --git a/python/dune/perftool/pdelab/quadrature.py b/python/dune/perftool/pdelab/quadrature.py index 19339acf..031d97b0 100644 --- a/python/dune/perftool/pdelab/quadrature.py +++ b/python/dune/perftool/pdelab/quadrature.py @@ -15,7 +15,6 @@ from dune.perftool.generation import (backend, ) from dune.perftool.pdelab.localoperator import lop_template_range_field from dune.perftool.options import get_form_option -from dune.perftool.ufl.modified_terminals import Restriction from pymbolic.primitives import Variable, Subscript diff --git a/python/dune/perftool/pdelab/signatures.py b/python/dune/perftool/pdelab/signatures.py index 6eb30cd1..2990c8b2 100644 --- a/python/dune/perftool/pdelab/signatures.py +++ b/python/dune/perftool/pdelab/signatures.py @@ -141,10 +141,10 @@ def alpha_boundary_templates(): def alpha_boundary_args(): geo = name_geometry_wrapper() - lfsu = name_trialfunctionspace(Restriction.NEGATIVE) - lfsv = name_testfunctionspace(Restriction.NEGATIVE) - cc = name_coefficientcontainer(Restriction.NEGATIVE) - av = name_accumulation_variable((Restriction.NEGATIVE,)) + lfsu = name_trialfunctionspace(Restriction.POSITIVE) + lfsv = name_testfunctionspace(Restriction.POSITIVE) + cc = name_coefficientcontainer(Restriction.POSITIVE) + av = name_accumulation_variable((Restriction.POSITIVE,)) return ((True, geo), (True, lfsu), (True, cc), (True, lfsv), (False, av)) @@ -159,14 +159,14 @@ def alpha_skeleton_templates(): def alpha_skeleton_args(): geo = name_geometry_wrapper() - lfsu_s = name_trialfunctionspace(Restriction.NEGATIVE) - lfsu_n = name_trialfunctionspace(Restriction.POSITIVE) - lfsv_s = name_testfunctionspace(Restriction.NEGATIVE) - lfsv_n = name_testfunctionspace(Restriction.POSITIVE) - cc_s = name_coefficientcontainer(Restriction.NEGATIVE) - cc_n = name_coefficientcontainer(Restriction.POSITIVE) - av_s = name_accumulation_variable((Restriction.NEGATIVE,)) - av_n = name_accumulation_variable((Restriction.POSITIVE,)) + lfsu_s = name_trialfunctionspace(Restriction.POSITIVE) + lfsu_n = name_trialfunctionspace(Restriction.NEGATIVE) + lfsv_s = name_testfunctionspace(Restriction.POSITIVE) + lfsv_n = name_testfunctionspace(Restriction.NEGATIVE) + cc_s = name_coefficientcontainer(Restriction.POSITIVE) + cc_n = name_coefficientcontainer(Restriction.NEGATIVE) + av_s = name_accumulation_variable((Restriction.POSITIVE,)) + av_n = name_accumulation_variable((Restriction.NEGATIVE,)) return ((True, geo), (True, lfsu_s), (True, cc_s), (True, lfsv_s), (True, lfsu_n), (True, cc_n), (True, lfsv_n), (False, av_s), (False, av_n)) @@ -199,10 +199,10 @@ def jacobian_boundary_templates(): def jacobian_boundary_args(): geo = name_geometry_wrapper() - lfsu = name_trialfunctionspace(Restriction.NEGATIVE) - lfsv = name_testfunctionspace(Restriction.NEGATIVE) - cc = name_coefficientcontainer(Restriction.NEGATIVE) - av = name_accumulation_variable((Restriction.NEGATIVE, Restriction.NEGATIVE)) + lfsu = name_trialfunctionspace(Restriction.POSITIVE) + lfsv = name_testfunctionspace(Restriction.POSITIVE) + cc = name_coefficientcontainer(Restriction.POSITIVE) + av = name_accumulation_variable((Restriction.POSITIVE, Restriction.POSITIVE)) return ((True, geo), (True, lfsu), (True, cc), (True, lfsv), (False, av)) @@ -217,16 +217,16 @@ def jacobian_skeleton_templates(): def jacobian_skeleton_args(): geo = name_geometry_wrapper() - lfsu_s = name_trialfunctionspace(Restriction.NEGATIVE) - lfsu_n = name_trialfunctionspace(Restriction.POSITIVE) - lfsv_s = name_testfunctionspace(Restriction.NEGATIVE) - lfsv_n = name_testfunctionspace(Restriction.POSITIVE) - cc_s = name_coefficientcontainer(Restriction.NEGATIVE) - cc_n = name_coefficientcontainer(Restriction.POSITIVE) - av_ss = name_accumulation_variable((Restriction.NEGATIVE, Restriction.NEGATIVE)) - av_sn = name_accumulation_variable((Restriction.NEGATIVE, Restriction.POSITIVE)) - av_ns = name_accumulation_variable((Restriction.POSITIVE, Restriction.NEGATIVE)) - av_nn = name_accumulation_variable((Restriction.POSITIVE, Restriction.POSITIVE)) + lfsu_s = name_trialfunctionspace(Restriction.POSITIVE) + lfsu_n = name_trialfunctionspace(Restriction.NEGATIVE) + lfsv_s = name_testfunctionspace(Restriction.POSITIVE) + lfsv_n = name_testfunctionspace(Restriction.NEGATIVE) + cc_s = name_coefficientcontainer(Restriction.POSITIVE) + cc_n = name_coefficientcontainer(Restriction.NEGATIVE) + av_ss = name_accumulation_variable((Restriction.POSITIVE, Restriction.POSITIVE)) + av_sn = name_accumulation_variable((Restriction.POSITIVE, Restriction.NEGATIVE)) + av_ns = name_accumulation_variable((Restriction.NEGATIVE, Restriction.POSITIVE)) + av_nn = name_accumulation_variable((Restriction.NEGATIVE, Restriction.NEGATIVE)) return ((True, geo), (True, lfsu_s), (True, cc_s), (True, lfsv_s), (True, lfsu_n), (True, cc_n), (True, lfsv_n), (False, av_ss), (False, av_sn), (False, av_ns), (False, av_nn)) @@ -259,10 +259,10 @@ def jacobian_apply_boundary_templates(): def jacobian_apply_boundary_args(): geo = name_geometry_wrapper() - lfsu = name_trialfunctionspace(Restriction.NEGATIVE) - lfsv = name_testfunctionspace(Restriction.NEGATIVE) - ac = name_applycontainer(Restriction.NEGATIVE) - av = name_accumulation_variable((Restriction.NEGATIVE,)) + lfsu = name_trialfunctionspace(Restriction.POSITIVE) + lfsv = name_testfunctionspace(Restriction.POSITIVE) + ac = name_applycontainer(Restriction.POSITIVE) + av = name_accumulation_variable((Restriction.POSITIVE,)) return ((True, geo), (True, lfsu), (True, ac), (True, lfsv), (False, av)) @@ -277,14 +277,14 @@ def jacobian_apply_skeleton_templates(): def jacobian_apply_skeleton_args(): geo = name_geometry_wrapper() - lfsu_s = name_trialfunctionspace(Restriction.NEGATIVE) - lfsu_n = name_trialfunctionspace(Restriction.POSITIVE) - lfsv_s = name_testfunctionspace(Restriction.NEGATIVE) - lfsv_n = name_testfunctionspace(Restriction.POSITIVE) - ac_s = name_applycontainer(Restriction.NEGATIVE) - ac_n = name_applycontainer(Restriction.POSITIVE) - av_s = name_accumulation_variable((Restriction.NEGATIVE,)) - av_n = name_accumulation_variable((Restriction.POSITIVE,)) + lfsu_s = name_trialfunctionspace(Restriction.POSITIVE) + lfsu_n = name_trialfunctionspace(Restriction.NEGATIVE) + lfsv_s = name_testfunctionspace(Restriction.POSITIVE) + lfsv_n = name_testfunctionspace(Restriction.NEGATIVE) + ac_s = name_applycontainer(Restriction.POSITIVE) + ac_n = name_applycontainer(Restriction.NEGATIVE) + av_s = name_accumulation_variable((Restriction.POSITIVE,)) + av_n = name_accumulation_variable((Restriction.NEGATIVE,)) return ((True, geo), (True, lfsu_s), (True, ac_s), (True, lfsv_s), (True, lfsu_n), (True, ac_n), (True, lfsv_n), (False, av_s), (False, av_n)) @@ -318,11 +318,11 @@ def nonlinear_jacobian_apply_boundary_templates(): def nonlinear_jacobian_apply_boundary_args(): geo = name_geometry_wrapper() - lfsu = name_trialfunctionspace(Restriction.NEGATIVE) - lfsv = name_testfunctionspace(Restriction.NEGATIVE) - cc = name_coefficientcontainer(Restriction.NEGATIVE) - ac = name_applycontainer(Restriction.NEGATIVE) - av = name_accumulation_variable((Restriction.NEGATIVE,)) + lfsu = name_trialfunctionspace(Restriction.POSITIVE) + lfsv = name_testfunctionspace(Restriction.POSITIVE) + cc = name_coefficientcontainer(Restriction.POSITIVE) + ac = name_applycontainer(Restriction.POSITIVE) + av = name_accumulation_variable((Restriction.POSITIVE,)) return ((True, geo), (True, lfsu), (True, cc), (True, ac), (True, lfsv), (False, av)) @@ -337,14 +337,14 @@ def nonlinear_jacobian_apply_skeleton_templates(): def nonlinear_jacobian_apply_skeleton_args(): geo = name_geometry_wrapper() - lfsu_s = name_trialfunctionspace(Restriction.NEGATIVE) - lfsu_n = name_trialfunctionspace(Restriction.POSITIVE) - lfsv_s = name_testfunctionspace(Restriction.NEGATIVE) - lfsv_n = name_testfunctionspace(Restriction.POSITIVE) - cc_s = name_coefficientcontainer(Restriction.NEGATIVE) - cc_n = name_coefficientcontainer(Restriction.POSITIVE) - ac_s = name_applycontainer(Restriction.NEGATIVE) - ac_n = name_applycontainer(Restriction.POSITIVE) - av_s = name_accumulation_variable((Restriction.NEGATIVE,)) - av_n = name_accumulation_variable((Restriction.POSITIVE,)) + lfsu_s = name_trialfunctionspace(Restriction.POSITIVE) + lfsu_n = name_trialfunctionspace(Restriction.NEGATIVE) + lfsv_s = name_testfunctionspace(Restriction.POSITIVE) + lfsv_n = name_testfunctionspace(Restriction.NEGATIVE) + cc_s = name_coefficientcontainer(Restriction.POSITIVE) + cc_n = name_coefficientcontainer(Restriction.NEGATIVE) + ac_s = name_applycontainer(Restriction.POSITIVE) + ac_n = name_applycontainer(Restriction.NEGATIVE) + av_s = name_accumulation_variable((Restriction.POSITIVE,)) + av_n = name_accumulation_variable((Restriction.NEGATIVE,)) return ((True, geo), (True, lfsu_s), (True, cc_s), (True, ac_s), (True, lfsv_s), (True, lfsu_n), (True, cc_n), (True, ac_n), (True, lfsv_n), (False, av_s), (False, av_n)) diff --git a/python/dune/perftool/pdelab/spaces.py b/python/dune/perftool/pdelab/spaces.py index 706be5b9..d5f62735 100644 --- a/python/dune/perftool/pdelab/spaces.py +++ b/python/dune/perftool/pdelab/spaces.py @@ -125,7 +125,7 @@ type_gfs = partial(_function_space_traversal, defaultname=available_gfs_names, r def initialize_function_spaces(expr, visitor): restriction = visitor.restriction if visitor.measure == 'exterior_facet': - restriction = Restriction.NEGATIVE + restriction = Restriction.POSITIVE index = None from ufl import MixedElement diff --git a/python/dune/perftool/sumfact/accumulation.py b/python/dune/perftool/sumfact/accumulation.py index 9566efb7..58dad0d9 100644 --- a/python/dune/perftool/sumfact/accumulation.py +++ b/python/dune/perftool/sumfact/accumulation.py @@ -133,7 +133,7 @@ def get_accumulation_info(expr, visitor): restriction = visitor.restriction if visitor.measure == 'exterior_facet': from dune.perftool.pdelab.restriction import Restriction - restriction = Restriction.NEGATIVE + restriction = Restriction.POSITIVE inames = visitor.interface.lfs_inames(leaf_element, restriction, @@ -175,9 +175,9 @@ def _test_generator(expr, visitor): if visitor.measure == "cell": restrictions = (Restriction.NONE,) elif visitor.measure == "exterior_facet": - restrictions = (Restriction.NEGATIVE,) + restrictions = (Restriction.POSITIVE,) elif visitor.measure == "interior_facet": - restrictions = (Restriction.NEGATIVE, Restriction.POSITIVE) + restrictions = (Restriction.POSITIVE, Restriction.NEGATIVE) for res in restrictions: for ei, e in _get_childs(element): for grad in (None,) + tuple(range(dim)): @@ -198,9 +198,9 @@ def _trial_generator(expr, visitor): if visitor.measure == "cell": restrictions = (Restriction.NONE,) elif visitor.measure == "exterior_facet": - restrictions = (Restriction.NEGATIVE,) + restrictions = (Restriction.POSITIVE,) elif visitor.measure == "interior_facet": - restrictions = (Restriction.NEGATIVE, Restriction.POSITIVE) + restrictions = (Restriction.POSITIVE, Restriction.NEGATIVE) for res in restrictions: for ei, e in _get_childs(element): yield SumfactAccumulationInfo(element_index=ei, restriction=res, element=e) diff --git a/python/dune/perftool/sumfact/geometry.py b/python/dune/perftool/sumfact/geometry.py index 0fd86eec..d0763db7 100644 --- a/python/dune/perftool/sumfact/geometry.py +++ b/python/dune/perftool/sumfact/geometry.py @@ -152,7 +152,7 @@ def pymbolic_spatial_coordinate_axiparallel(do_predicates, visitor): restriction = Restriction.NONE from dune.perftool.generation import get_global_context_value if get_global_context_value("integral_type") == "interior_facet": - restriction = Restriction.NEGATIVE + restriction = Restriction.POSITIVE from dune.perftool.sumfact.switch import get_facedir face = get_facedir(restriction) @@ -183,8 +183,8 @@ def pymbolic_unit_outer_normal(visitor_indices): assert isinstance(index, int) if get_form_option("diagonal_transformation_matrix"): from dune.perftool.sumfact.switch import get_facedir, get_facemod - if index == get_facedir(Restriction.NEGATIVE): - if get_facemod(Restriction.NEGATIVE): + if index == get_facedir(Restriction.POSITIVE): + if get_facemod(Restriction.POSITIVE): return 1, None else: return -1, None @@ -200,8 +200,8 @@ def pymbolic_unit_inner_normal(visitor_indices): assert isinstance(index, int) if get_form_option("diagonal_transformation_matrix"): from dune.perftool.sumfact.switch import get_facedir, get_facemod - if index == get_facedir(Restriction.NEGATIVE): - if get_facemod(Restriction.NEGATIVE): + if index == get_facedir(Restriction.POSITIVE): + if get_facemod(Restriction.POSITIVE): return -1, None else: return 1, None @@ -221,7 +221,7 @@ def pymbolic_facet_jacobian_determinant(): def pymbolic_constant_facet_jacobian_determinant(): - facedir = get_facedir(Restriction.NEGATIVE) + facedir = get_facedir(Restriction.POSITIVE) assert isinstance(facedir, int) name = "fdetjac" diff --git a/python/dune/perftool/sumfact/switch.py b/python/dune/perftool/sumfact/switch.py index 873d7d46..8c6a0f13 100644 --- a/python/dune/perftool/sumfact/switch.py +++ b/python/dune/perftool/sumfact/switch.py @@ -138,9 +138,9 @@ def generate_interior_facet_switch(): def get_facedir(restriction): from dune.perftool.pdelab.restriction import Restriction - if restriction == Restriction.NEGATIVE or get_global_context_value("integral_type") == "exterior_facet": + if restriction == Restriction.POSITIVE or get_global_context_value("integral_type") == "exterior_facet": return get_global_context_value("facedir_s") - if restriction == Restriction.POSITIVE: + if restriction == Restriction.NEGATIVE: return get_global_context_value("facedir_n") if restriction == Restriction.NONE: return None @@ -149,9 +149,9 @@ def get_facedir(restriction): def get_facemod(restriction): from dune.perftool.pdelab.restriction import Restriction - if restriction == Restriction.NEGATIVE or get_global_context_value("integral_type") == "exterior_facet": + if restriction == Restriction.POSITIVE or get_global_context_value("integral_type") == "exterior_facet": return get_global_context_value("facemod_s") - if restriction == Restriction.POSITIVE: + if restriction == Restriction.NEGATIVE: return get_global_context_value("facemod_n") if restriction == Restriction.NONE: return None diff --git a/python/dune/perftool/ufl/modified_terminals.py b/python/dune/perftool/ufl/modified_terminals.py index ac372d7f..bf3a6df9 100644 --- a/python/dune/perftool/ufl/modified_terminals.py +++ b/python/dune/perftool/ufl/modified_terminals.py @@ -9,8 +9,8 @@ import ufl.classes as uc class Restriction: NONE = 0 - NEGATIVE = 1 - POSITIVE = 2 + POSITIVE = 1 + NEGATIVE = 2 class ModifiedArgument(Record): diff --git a/python/dune/perftool/ufl/visitor.py b/python/dune/perftool/ufl/visitor.py index 6a344353..aa0f4799 100644 --- a/python/dune/perftool/ufl/visitor.py +++ b/python/dune/perftool/ufl/visitor.py @@ -104,7 +104,7 @@ class UFL2LoopyVisitor(ModifiedTerminalTracker): # Correct the restriction on boundary integrals restriction = self.restriction if self.measure == 'exterior_facet': - restriction = Restriction.NEGATIVE + restriction = Restriction.POSITIVE leaf_element = o.ufl_element() # Select the correct leaf element in the case of this being a mixed finite element @@ -130,7 +130,7 @@ class UFL2LoopyVisitor(ModifiedTerminalTracker): # Correct the restriction on boundary integrals restriction = self.restriction if self.measure == 'exterior_facet': - restriction = Restriction.NEGATIVE + restriction = Restriction.POSITIVE # Do something different for trial function and coefficients from jacobian apply if o.count() == 0 or o.count() == 1: @@ -432,7 +432,7 @@ class UFL2LoopyVisitor(ModifiedTerminalTracker): def jacobian_inverse(self, o): restriction = self.restriction if self.measure == 'exterior_facet': - restriction = Restriction.NEGATIVE + restriction = Restriction.POSITIVE assert(len(self.indices) == 2) i, j = self.indices @@ -454,7 +454,7 @@ class UFL2LoopyVisitor(ModifiedTerminalTracker): def cell_volume(self, o): restriction = self.restriction if self.measure == 'exterior_facet': - restriction = Restriction.NEGATIVE + restriction = Restriction.POSITIVE return self.interface.pymbolic_cell_volume(restriction) -- GitLab