From ebb10c195790f4df8325b01712748e0511b31de6 Mon Sep 17 00:00:00 2001 From: Rob Kirby Date: Thu, 27 Feb 2020 11:19:26 -0600 Subject: [PATCH 1/7] Add trimmed serendipity --- ufl/finiteelement/elementlist.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ufl/finiteelement/elementlist.py b/ufl/finiteelement/elementlist.py index 01cf430d5..73665e4cd 100644 --- a/ufl/finiteelement/elementlist.py +++ b/ufl/finiteelement/elementlist.py @@ -195,6 +195,8 @@ def show_elements(): ("quadrilateral",)) register_element2("BDMCF", 1, HDiv, "contravariant Piola", (1, None), ("quadrilateral",)) +register_element2("SminusE", 0, HCurl, "covariant Piola", (1, None), cubes[1:2]) +register_element2("SminusF", 0, HDiv, "contravariant Piola", (1, None), cubes[1:2]) register_element2("AAE", 1, HCurl, "covariant Piola", (1, None), ("hexahedron",)) register_element2("AAF", 1, HDiv, "contravariant Piola", (1, None), From 3ff2d5040a03d9dd854e591e3ba614783b1d67ba Mon Sep 17 00:00:00 2001 From: Rob Kirby Date: Thu, 27 Feb 2020 12:42:42 -0600 Subject: [PATCH 2/7] Fix value shape for trimmed serendipity --- ufl/finiteelement/elementlist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ufl/finiteelement/elementlist.py b/ufl/finiteelement/elementlist.py index 73665e4cd..0345419bf 100644 --- a/ufl/finiteelement/elementlist.py +++ b/ufl/finiteelement/elementlist.py @@ -195,8 +195,8 @@ def show_elements(): ("quadrilateral",)) register_element2("BDMCF", 1, HDiv, "contravariant Piola", (1, None), ("quadrilateral",)) -register_element2("SminusE", 0, HCurl, "covariant Piola", (1, None), cubes[1:2]) -register_element2("SminusF", 0, HDiv, "contravariant Piola", (1, None), cubes[1:2]) +register_element2("SminusE", 1, HCurl, "covariant Piola", (1, None), cubes[1:2]) +register_element2("SminusF", 1, HDiv, "contravariant Piola", (1, None), cubes[1:2]) register_element2("AAE", 1, HCurl, "covariant Piola", (1, None), ("hexahedron",)) register_element2("AAF", 1, HDiv, "contravariant Piola", (1, None), From c9bb809769ca66742d0427d27e8df0cce21b4adb Mon Sep 17 00:00:00 2001 From: Justincrum Date: Fri, 10 Apr 2020 10:23:34 -0700 Subject: [PATCH 3/7] ufl plumbing update for trimmed serendipity. --- ufl/finiteelement/elementlist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ufl/finiteelement/elementlist.py b/ufl/finiteelement/elementlist.py index 0345419bf..63cb0f29e 100644 --- a/ufl/finiteelement/elementlist.py +++ b/ufl/finiteelement/elementlist.py @@ -195,8 +195,8 @@ def show_elements(): ("quadrilateral",)) register_element2("BDMCF", 1, HDiv, "contravariant Piola", (1, None), ("quadrilateral",)) -register_element2("SminusE", 1, HCurl, "covariant Piola", (1, None), cubes[1:2]) -register_element2("SminusF", 1, HDiv, "contravariant Piola", (1, None), cubes[1:2]) +register_element2("SminusE", 1, HCurl, "covariant Piola", (1, None), cubes[1:3]) +register_element2("SminusF", 1, HDiv, "contravariant Piola", (1, None), cubes[1:3]) register_element2("AAE", 1, HCurl, "covariant Piola", (1, None), ("hexahedron",)) register_element2("AAF", 1, HDiv, "contravariant Piola", (1, None), From 87cd5a09dd16adab4f9455ed987958009bf732e9 Mon Sep 17 00:00:00 2001 From: Justincrum Date: Tue, 14 Apr 2020 11:27:44 -0700 Subject: [PATCH 4/7] Plumbing for SminusDiv.py --- ufl/finiteelement/elementlist.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ufl/finiteelement/elementlist.py b/ufl/finiteelement/elementlist.py index 63cb0f29e..8690fdbd4 100644 --- a/ufl/finiteelement/elementlist.py +++ b/ufl/finiteelement/elementlist.py @@ -196,7 +196,8 @@ def show_elements(): register_element2("BDMCF", 1, HDiv, "contravariant Piola", (1, None), ("quadrilateral",)) register_element2("SminusE", 1, HCurl, "covariant Piola", (1, None), cubes[1:3]) -register_element2("SminusF", 1, HDiv, "contravariant Piola", (1, None), cubes[1:3]) +register_element2("SminusF", 1, HDiv, "contravariant Piola", (1, None), cubes[1:2]) +register_element2("SminusDiv", 1, HDiv, "contravariant Piola", (1, None), cubes[1:3]) register_element2("AAE", 1, HCurl, "covariant Piola", (1, None), ("hexahedron",)) register_element2("AAF", 1, HDiv, "contravariant Piola", (1, None), From c17ccb5a6b4e641d533dd6411b9bb33327d2d28d Mon Sep 17 00:00:00 2001 From: Justincrum Date: Tue, 8 Sep 2020 13:24:57 -0700 Subject: [PATCH 5/7] Adding in element stuff for SminusCurl. --- ufl/finiteelement/elementlist.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ufl/finiteelement/elementlist.py b/ufl/finiteelement/elementlist.py index 8690fdbd4..70335550c 100644 --- a/ufl/finiteelement/elementlist.py +++ b/ufl/finiteelement/elementlist.py @@ -198,6 +198,7 @@ def show_elements(): register_element2("SminusE", 1, HCurl, "covariant Piola", (1, None), cubes[1:3]) register_element2("SminusF", 1, HDiv, "contravariant Piola", (1, None), cubes[1:2]) register_element2("SminusDiv", 1, HDiv, "contravariant Piola", (1, None), cubes[1:3]) +register_element2("SminusCurl", 1, HCurl, "covariant Piola", (1, None), cubes[1:3]) register_element2("AAE", 1, HCurl, "covariant Piola", (1, None), ("hexahedron",)) register_element2("AAF", 1, HDiv, "contravariant Piola", (1, None), From e2d2268c00e98a1ea6f01d3523195a249a27fa94 Mon Sep 17 00:00:00 2001 From: nbouziani Date: Sun, 15 Jan 2023 01:36:42 +0000 Subject: [PATCH 6/7] Fix typo --- ufl/split_functions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ufl/split_functions.py b/ufl/split_functions.py index 1b4439145..3d583d61f 100644 --- a/ufl/split_functions.py +++ b/ufl/split_functions.py @@ -51,7 +51,7 @@ def split(v): # Special case: simple element, just return function in a tuple element = v.ufl_element() - if element.num_sub_elements == 0: + if element.num_sub_elements() == 0: assert end is None return (v,) From 32c09fb8e341054ccf874393a32ff9f96de8d669 Mon Sep 17 00:00:00 2001 From: David Ham Date: Tue, 12 Sep 2023 10:43:11 +0100 Subject: [PATCH 7/7] remove spurioius names --- ufl/finiteelement/elementlist.py | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/ufl/finiteelement/elementlist.py b/ufl/finiteelement/elementlist.py index ff74c187a..977484dee 100644 --- a/ufl/finiteelement/elementlist.py +++ b/ufl/finiteelement/elementlist.py @@ -12,6 +12,7 @@ # Modified by Marie E. Rognes , 2010 # Modified by Lizao Li , 2015, 2016 # Modified by Massimiliano Leoni, 2016 +# Modified by Robert Kloefkorn, 2022 import warnings from numpy import asarray @@ -152,7 +153,7 @@ def show_elements(): register_alias("Lob", lambda family, dim, order, degree: ("Gauss-Lobatto-Legendre", order)) -register_element("Bernstein", "Bernstein", 0, H1, "identity", (1, None), simplices) +register_element("Bernstein", None, 0, H1, "identity", (1, None), simplices) # Let Nedelec H(div) elements be aliases to BDMs/RTs @@ -175,30 +176,30 @@ def show_elements(): lambda family, dim, order, degree: ("HDiv Trace", order)) # New elements introduced for the periodic table 2014 -register_element("Q", "Q", 0, H1, "identity", (1, None), cubes) -register_element("DQ", "DQ", 0, L2, "identity", (0, None), cubes) -register_element("RTCE", "RTCE", 1, HCurl, "covariant Piola", (1, None), +register_element("Q", None, 0, H1, "identity", (1, None), cubes) +register_element("DQ", None, 0, L2, "identity", (0, None), cubes) +register_element("RTCE", None, 1, HCurl, "covariant Piola", (1, None), ("quadrilateral",)) -register_element("RTCF", "RTCF", 1, HDiv, "contravariant Piola", (1, None), +register_element("RTCF", None, 1, HDiv, "contravariant Piola", (1, None), ("quadrilateral",)) -register_element("NCE", "NCE", 1, HCurl, "covariant Piola", (1, None), +register_element("NCE", None, 1, HCurl, "covariant Piola", (1, None), ("hexahedron",)) -register_element("NCF", "NCF", 1, HDiv, "contravariant Piola", (1, None), +register_element("NCF", None, 1, HDiv, "contravariant Piola", (1, None), ("hexahedron",)) -register_element("S", "S", 0, H1, "identity", (1, None), cubes) -register_element("DPC", "DPC", 0, L2, "identity", (0, None), cubes) -register_element("BDMCE", "BDMCE", 1, HCurl, "covariant Piola", (1, None), +register_element("S", None, 0, H1, "identity", (1, None), cubes) +register_element("DPC", None, 0, L2, "identity", (0, None), cubes) +register_element("BDMCE", None, 1, HCurl, "covariant Piola", (1, None), ("quadrilateral",)) -register_element("BDMCF", "BDMCF", 1, HDiv, "contravariant Piola", (1, None), +register_element("BDMCF", None, 1, HDiv, "contravariant Piola", (1, None), ("quadrilateral",)) register_element("SminusE", "SminusE", 1, HCurl, "covariant Piola", (1, None), cubes[1:3]) register_element("SminusF", "SminusF", 1, HDiv, "contravariant Piola", (1, None), cubes[1:2]) register_element("SminusDiv", "SminusDiv", 1, HDiv, "contravariant Piola", (1, None), cubes[1:3]) register_element("SminusCurl", "SminusCurl", 1, HCurl, "covariant Piola", (1, None), cubes[1:3]) -register_element("AAE", "AAE", 1, HCurl, "covariant Piola", (1, None), +register_element("AAE", None, 1, HCurl, "covariant Piola", (1, None), ("hexahedron",)) -register_element("AAF", "AAF", 1, HDiv, "contravariant Piola", (1, None), +register_element("AAF", None, 1, HDiv, "contravariant Piola", (1, None), ("hexahedron",)) # New aliases introduced for the periodic table 2014 @@ -224,8 +225,8 @@ def show_elements(): degree: ("Brezzi-Douglas-Marini", order)) # discontinuous elements using l2 pullbacks -register_element("DPC L2", "DPC L2", 0, L2, "L2 Piola", (1, None), cubes) -register_element("DQ L2", "DQ L2", 0, L2, "L2 Piola", (0, None), cubes) +register_element("DPC L2", None, 0, L2, "L2 Piola", (1, None), cubes) +register_element("DQ L2", None, 0, L2, "L2 Piola", (0, None), cubes) register_element("Gauss-Legendre L2", "GL L2", 0, L2, "L2 Piola", (0, None), ("interval",)) register_element("Discontinuous Lagrange L2", "DG L2", 0, L2, "L2 Piola", (0, None),