diff --git a/python/dune/perftool/blockstructured/tools.py b/python/dune/perftool/blockstructured/tools.py index 31f57e70f7bfbdafc061a0b248e6614a7ee6480c..029b0f752b6c5f37854550588070f6072a7de977 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 e4dfb972a48b34428b54bef25f142eafd2c86866..30449edea105a0a962c5883559e61ced1fc4cdb0 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 6c400cc4db61472abef9e0d39e953eb9e1e8d1e0..40391a5f60a4a54f4d1c6149cb9c63b1ab0726c5 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 4873920b2901f812bbe06e01f233c0f9d3423630..6e1bcc34239637aa56cab3e64e8908e961c6b544 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 19339acfd315038f8e7d03ed8409265084fad2f4..031d97b019df0cab8355d4295b5229584e077b9b 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 6eb30cd11b977e4b6aa930dd86558219e9da3280..2990c8b24b9c89bcca243dce78c9144914c26b44 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 706be5b91a186b990719227fe61f1336d01313a0..d5f62735ea0b1d98c3496f49f0d062fc62bd1e5a 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 9566efb71e358dcaf346bd3a24b94858e3a56f26..58dad0d9b8058dc199ff8d4234b01369fb94e4f5 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 0fd86eec08e519960d344cf13cf894f7243f287b..d0763db759836bcd49150c9a983dcd357a49006d 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 873d7d462f7cd560d0c46a1ea811c34d9cec2ef5..8c6a0f13ace27b6e3081030607149b7b003aa82c 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 ac372d7fde8ba533fc52232f663a292026c2b7b4..bf3a6df939ddf787967b16c316cd2aaab308ce07 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 6a344353043b27589a6579edcd7ea6922f3be280..aa0f4799c1028f0fd1e8451e0391793792d85354 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)