From 3de93233523bc786add65830e0ea1799835cd191 Mon Sep 17 00:00:00 2001 From: Pablo Brubeck Date: Sun, 31 Dec 2023 13:35:11 -0600 Subject: [PATCH] Support Lagrange/IntegratedLegendre variants --- finat/fiat_elements.py | 4 ++-- finat/spectral.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/finat/fiat_elements.py b/finat/fiat_elements.py index ea63a1e9d..9880318c7 100644 --- a/finat/fiat_elements.py +++ b/finat/fiat_elements.py @@ -346,8 +346,8 @@ def __init__(self, cell, degree): class Lagrange(ScalarFiatElement): - def __init__(self, cell, degree): - super(Lagrange, self).__init__(FIAT.Lagrange(cell, degree)) + def __init__(self, cell, degree, variant=None): + super(Lagrange, self).__init__(FIAT.Lagrange(cell, degree, variant=variant)) class KongMulderVeldhuizen(ScalarFiatElement): diff --git a/finat/spectral.py b/finat/spectral.py index bd8acd64d..8489be041 100644 --- a/finat/spectral.py +++ b/finat/spectral.py @@ -65,7 +65,7 @@ def basis_evaluation(self, order, ps, entity=None, coordinate_mapping=None): class Legendre(ScalarFiatElement): - """1D DG element with Legendre polynomials.""" + """DG element with Legendre polynomials.""" def __init__(self, cell, degree): fiat_element = FIAT.Legendre(cell, degree) @@ -73,10 +73,10 @@ def __init__(self, cell, degree): class IntegratedLegendre(ScalarFiatElement): - """1D CG element with integrated Legendre polynomials.""" + """CG element with integrated Legendre polynomials.""" - def __init__(self, cell, degree): - fiat_element = FIAT.IntegratedLegendre(cell, degree) + def __init__(self, cell, degree, variant=None): + fiat_element = FIAT.IntegratedLegendre(cell, degree, variant=variant) super(IntegratedLegendre, self).__init__(fiat_element)