From f1a56296b6994a195cefcd1aaf9b98b575856680 Mon Sep 17 00:00:00 2001 From: Pablo Brubeck Date: Thu, 24 Oct 2024 17:51:53 +0100 Subject: [PATCH] Fix default variant --- FIAT/hellan_herrmann_johnson.py | 4 +++- FIAT/regge.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/FIAT/hellan_herrmann_johnson.py b/FIAT/hellan_herrmann_johnson.py index 1d8b3731f..b4050306e 100644 --- a/FIAT/hellan_herrmann_johnson.py +++ b/FIAT/hellan_herrmann_johnson.py @@ -97,8 +97,10 @@ class HellanHerrmannJohnson(finite_element.CiarletElement): HHJ(r) is the space of symmetric-matrix-valued polynomials of degree r or less with normal-normal continuity. """ - def __init__(self, ref_el, degree, variant="integral"): + def __init__(self, ref_el, degree, variant=None): assert degree >= 0, "Hellan-Herrmann-Johnson starts at degree 0!" + if variant is None: + variant = "integral" poly_set = polynomial_set.ONSymTensorPolynomialSet(ref_el, degree) dual = HellanHerrmannJohnsonDual(ref_el, degree, variant) sd = ref_el.get_spatial_dimension() diff --git a/FIAT/regge.py b/FIAT/regge.py index 49f894e34..d55da68a0 100644 --- a/FIAT/regge.py +++ b/FIAT/regge.py @@ -62,8 +62,10 @@ class Regge(finite_element.CiarletElement): REG(r) is the space of symmetric-matrix-valued polynomials of degree r or less with tangential-tangential continuity. """ - def __init__(self, ref_el, degree, variant="integral"): + def __init__(self, ref_el, degree, variant=None): assert degree >= 0, "Regge start at degree 0!" + if variant is None: + variant = "integral" poly_set = polynomial_set.ONSymTensorPolynomialSet(ref_el, degree) dual = ReggeDual(ref_el, degree, variant) formdegree = (1, 1)