From 22c21bdece61d3400eadb4931eef754fbf13dd9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Schartum=20Dokken?= Date: Mon, 22 Nov 2021 11:30:43 +0000 Subject: [PATCH] Add set of continuous families not requiring a restriction (#73) --- ufl/algorithms/apply_restrictions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ufl/algorithms/apply_restrictions.py b/ufl/algorithms/apply_restrictions.py index 4047f1d0b..1cdf2f3ea 100644 --- a/ufl/algorithms/apply_restrictions.py +++ b/ufl/algorithms/apply_restrictions.py @@ -132,7 +132,8 @@ def coefficient(self, o): d = e.degree() f = e.family() # TODO: Move this choice to the element class? - if (f == "Lagrange" and d > 0) or f == "Real": + continuous_families = ["Lagrange", "Q", "S"] + if (f in continuous_families and d > 0) or f == "Real": # If the coefficient _value_ is _fully_ continuous return self._default_restricted(o) # Must still be computed from one of the sides, we just don't care which else: