Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test integral variant for Regge/HHJ #3839

Merged
merged 12 commits into from
Nov 19, 2024
2 changes: 1 addition & 1 deletion tests/regression/test_interpolate_cross_mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def parameters(request):
expected = np.asarray(
[np.outer(coords[i], coords[i]) for i in range(len(coords))]
)
V_src = FunctionSpace(m_src, "Regge", 2) # Not point evaluation nodes
V_src = FunctionSpace(m_src, "Regge", 2, variant="point") # Not point evaluation nodes
rckirby marked this conversation as resolved.
Show resolved Hide resolved
V_dest = TensorFunctionSpace(m_dest, "CG", 4)
V_dest_2 = TensorFunctionSpace(m_dest, "DQ", 2)
elif request.param == "spheresphere":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,21 @@
convergence_orders = lambda x: -np.log2(relative_magnitudes(x))


@pytest.fixture(scope='module', params=["conforming", "nonconforming", "macro"])
@pytest.fixture(params=["macro", "nonconforming", "conforming", "high-order"])
def stress_element(request):
if request.param == "conforming":
return FiniteElement("AWc", triangle, 3)
if request.param == "macro":
return FiniteElement("JM", triangle, 1)
elif request.param == "nonconforming":
return FiniteElement("AWnc", triangle, 2)
elif request.param == "macro":
return FiniteElement("JM", triangle, 1)
elif request.param == "conforming":
return FiniteElement("AWc", triangle, 3)
elif request.param == "high-order":
return FiniteElement("HZ", triangle, 3)

Check failure on line 19 in tests/regression/test_stress_elements.py

View workflow job for this annotation

GitHub Actions / Firedrake complex

test_stress_elements.test_stress_displacement_convergence[high-order]

failed on setup with "ValueError: Unknown finite element 'HZ'."
Raw output
request = <SubRequest 'stress_element' for <Function test_stress_displacement_convergence[high-order]>>

    @pytest.fixture(params=["macro", "nonconforming", "conforming", "high-order"])
    def stress_element(request):
        if request.param == "macro":
            return FiniteElement("JM", triangle, 1)
        elif request.param == "nonconforming":
            return FiniteElement("AWnc", triangle, 2)
        elif request.param == "conforming":
            return FiniteElement("AWc", triangle, 3)
        elif request.param == "high-order":
>           return FiniteElement("HZ", triangle, 3)

tests/regression/test_stress_elements.py:19: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../firedrake_venv/src/FInAT/finat/ufl/finiteelement.py:145: in __init__
    ) = canonical_element_description(family, cell, degree, form_degree)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

family = 'HZ', cell = triangle, order = 3, form_degree = None

    def canonical_element_description(family, cell, order, form_degree):
        """Given basic element information, return corresponding element information on canonical form.
    
        Input: family, cell, (polynomial) order, form_degree
        Output: family (canonical), short_name (for printing), order, value shape,
        reference value shape, sobolev_space.
    
        This is used by the FiniteElement constructor to ved input
        data against the element list and aliases defined in ufl.
        """
        # Get domain dimensions
        if cell is not None:
            tdim = cell.topological_dimension()
            if isinstance(cell, Cell):
                cellname = cell.cellname()
            else:
                cellname = None
        else:
            tdim = None
            cellname = None
    
        # Catch general FEEC notation "P" and "S"
        if form_degree is not None and family in ("P", "S"):
            family, order = feec_element(family, tdim, order, form_degree)
    
        if form_degree is not None and family in ("P L2", "S L2"):
            family, order = feec_element_l2(family, tdim, order, form_degree)
    
        # Check whether this family is an alias for something else
        while family in aliases:
            if tdim is None:
                raise ValueError("Need dimension to handle element aliases.")
            (family, order) = aliases[family](family, tdim, order, form_degree)
    
        # Check that the element family exists
        if family not in ufl_elements:
>           raise ValueError(f"Unknown finite element '{family}'.")
E           ValueError: Unknown finite element 'HZ'.

../firedrake_venv/src/FInAT/finat/ufl/elementlist.py:446: ValueError

Check failure on line 19 in tests/regression/test_stress_elements.py

View workflow job for this annotation

GitHub Actions / Firedrake complex

test_stress_elements.test_mass_conditioning[high-order]

failed on setup with "ValueError: Unknown finite element 'HZ'."
Raw output
request = <SubRequest 'stress_element' for <Function test_mass_conditioning[high-order]>>

    @pytest.fixture(params=["macro", "nonconforming", "conforming", "high-order"])
    def stress_element(request):
        if request.param == "macro":
            return FiniteElement("JM", triangle, 1)
        elif request.param == "nonconforming":
            return FiniteElement("AWnc", triangle, 2)
        elif request.param == "conforming":
            return FiniteElement("AWc", triangle, 3)
        elif request.param == "high-order":
>           return FiniteElement("HZ", triangle, 3)

tests/regression/test_stress_elements.py:19: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../firedrake_venv/src/FInAT/finat/ufl/finiteelement.py:145: in __init__
    ) = canonical_element_description(family, cell, degree, form_degree)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

family = 'HZ', cell = triangle, order = 3, form_degree = None

    def canonical_element_description(family, cell, order, form_degree):
        """Given basic element information, return corresponding element information on canonical form.
    
        Input: family, cell, (polynomial) order, form_degree
        Output: family (canonical), short_name (for printing), order, value shape,
        reference value shape, sobolev_space.
    
        This is used by the FiniteElement constructor to ved input
        data against the element list and aliases defined in ufl.
        """
        # Get domain dimensions
        if cell is not None:
            tdim = cell.topological_dimension()
            if isinstance(cell, Cell):
                cellname = cell.cellname()
            else:
                cellname = None
        else:
            tdim = None
            cellname = None
    
        # Catch general FEEC notation "P" and "S"
        if form_degree is not None and family in ("P", "S"):
            family, order = feec_element(family, tdim, order, form_degree)
    
        if form_degree is not None and family in ("P L2", "S L2"):
            family, order = feec_element_l2(family, tdim, order, form_degree)
    
        # Check whether this family is an alias for something else
        while family in aliases:
            if tdim is None:
                raise ValueError("Need dimension to handle element aliases.")
            (family, order) = aliases[family](family, tdim, order, form_degree)
    
        # Check that the element family exists
        if family not in ufl_elements:
>           raise ValueError(f"Unknown finite element '{family}'.")
E           ValueError: Unknown finite element 'HZ'.

../firedrake_venv/src/FInAT/finat/ufl/elementlist.py:446: ValueError

Check failure on line 19 in tests/regression/test_stress_elements.py

View workflow job for this annotation

GitHub Actions / Firedrake real

test_stress_elements.test_stress_displacement_convergence[high-order]

failed on setup with "ValueError: Unknown finite element 'HZ'."
Raw output
request = <SubRequest 'stress_element' for <Function test_stress_displacement_convergence[high-order]>>

    @pytest.fixture(params=["macro", "nonconforming", "conforming", "high-order"])
    def stress_element(request):
        if request.param == "macro":
            return FiniteElement("JM", triangle, 1)
        elif request.param == "nonconforming":
            return FiniteElement("AWnc", triangle, 2)
        elif request.param == "conforming":
            return FiniteElement("AWc", triangle, 3)
        elif request.param == "high-order":
>           return FiniteElement("HZ", triangle, 3)

tests/regression/test_stress_elements.py:19: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../firedrake_venv/src/FInAT/finat/ufl/finiteelement.py:145: in __init__
    ) = canonical_element_description(family, cell, degree, form_degree)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

family = 'HZ', cell = triangle, order = 3, form_degree = None

    def canonical_element_description(family, cell, order, form_degree):
        """Given basic element information, return corresponding element information on canonical form.
    
        Input: family, cell, (polynomial) order, form_degree
        Output: family (canonical), short_name (for printing), order, value shape,
        reference value shape, sobolev_space.
    
        This is used by the FiniteElement constructor to ved input
        data against the element list and aliases defined in ufl.
        """
        # Get domain dimensions
        if cell is not None:
            tdim = cell.topological_dimension()
            if isinstance(cell, Cell):
                cellname = cell.cellname()
            else:
                cellname = None
        else:
            tdim = None
            cellname = None
    
        # Catch general FEEC notation "P" and "S"
        if form_degree is not None and family in ("P", "S"):
            family, order = feec_element(family, tdim, order, form_degree)
    
        if form_degree is not None and family in ("P L2", "S L2"):
            family, order = feec_element_l2(family, tdim, order, form_degree)
    
        # Check whether this family is an alias for something else
        while family in aliases:
            if tdim is None:
                raise ValueError("Need dimension to handle element aliases.")
            (family, order) = aliases[family](family, tdim, order, form_degree)
    
        # Check that the element family exists
        if family not in ufl_elements:
>           raise ValueError(f"Unknown finite element '{family}'.")
E           ValueError: Unknown finite element 'HZ'.

../firedrake_venv/src/FInAT/finat/ufl/elementlist.py:446: ValueError

Check failure on line 19 in tests/regression/test_stress_elements.py

View workflow job for this annotation

GitHub Actions / Firedrake real

test_stress_elements.test_mass_conditioning[high-order]

failed on setup with "ValueError: Unknown finite element 'HZ'."
Raw output
request = <SubRequest 'stress_element' for <Function test_mass_conditioning[high-order]>>

    @pytest.fixture(params=["macro", "nonconforming", "conforming", "high-order"])
    def stress_element(request):
        if request.param == "macro":
            return FiniteElement("JM", triangle, 1)
        elif request.param == "nonconforming":
            return FiniteElement("AWnc", triangle, 2)
        elif request.param == "conforming":
            return FiniteElement("AWc", triangle, 3)
        elif request.param == "high-order":
>           return FiniteElement("HZ", triangle, 3)

tests/regression/test_stress_elements.py:19: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../firedrake_venv/src/FInAT/finat/ufl/finiteelement.py:145: in __init__
    ) = canonical_element_description(family, cell, degree, form_degree)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

family = 'HZ', cell = triangle, order = 3, form_degree = None

    def canonical_element_description(family, cell, order, form_degree):
        """Given basic element information, return corresponding element information on canonical form.
    
        Input: family, cell, (polynomial) order, form_degree
        Output: family (canonical), short_name (for printing), order, value shape,
        reference value shape, sobolev_space.
    
        This is used by the FiniteElement constructor to ved input
        data against the element list and aliases defined in ufl.
        """
        # Get domain dimensions
        if cell is not None:
            tdim = cell.topological_dimension()
            if isinstance(cell, Cell):
                cellname = cell.cellname()
            else:
                cellname = None
        else:
            tdim = None
            cellname = None
    
        # Catch general FEEC notation "P" and "S"
        if form_degree is not None and family in ("P", "S"):
            family, order = feec_element(family, tdim, order, form_degree)
    
        if form_degree is not None and family in ("P L2", "S L2"):
            family, order = feec_element_l2(family, tdim, order, form_degree)
    
        # Check whether this family is an alias for something else
        while family in aliases:
            if tdim is None:
                raise ValueError("Need dimension to handle element aliases.")
            (family, order) = aliases[family](family, tdim, order, form_degree)
    
        # Check that the element family exists
        if family not in ufl_elements:
>           raise ValueError(f"Unknown finite element '{family}'.")
E           ValueError: Unknown finite element 'HZ'.

../firedrake_venv/src/FInAT/finat/ufl/elementlist.py:446: ValueError
else:
raise ValueError("Unknown family")


@pytest.fixture(scope='module')
@pytest.fixture
def mesh_hierarchy(request):
N_base = 2
mesh = UnitSquareMesh(N_base, N_base)
Expand Down Expand Up @@ -64,7 +66,10 @@
l2_u = []
l2_sigma = []
l2_div_sigma = []
displacement_element = VectorElement("DG", cell=mesh.ufl_cell(), degree=1, variant="integral")
sdegree = stress_element.degree()
sfamily = stress_element.family()
vdegree = sdegree-1 if sfamily == "Hu-Zhang" else 1
displacement_element = VectorElement("DG", cell=mesh.ufl_cell(), degree=vdegree, variant="integral")
element = MixedElement([stress_element, displacement_element])
for msh in mesh_hierarchy[1:]:
x, y = SpatialCoordinate(msh)
Expand Down Expand Up @@ -126,20 +131,18 @@
l2_sigma.append(error_sigma)
l2_div_sigma.append(error_div_sigma)

if stress_element.family().startswith("Conforming"):
assert min(convergence_orders(l2_u)) > 1.9
assert min(convergence_orders(l2_sigma)) > 2.9
assert min(convergence_orders(l2_div_sigma)) > 1.9
elif stress_element.family().startswith("Nonconforming"):
assert min(convergence_orders(l2_u)) > 1.9
assert min(convergence_orders(l2_sigma)) > 1
assert min(convergence_orders(l2_div_sigma)) > 1.9
elif stress_element.family().startswith("Johnson-Mercier"):
assert min(convergence_orders(l2_u)) > 1.9
assert min(convergence_orders(l2_sigma)) > 1
assert min(convergence_orders(l2_div_sigma)) > 0.9
sdegree = V[0].ufl_element().degree()
vdegree = V[1].ufl_element().degree()
if stress_element.family().startswith("Nonconforming"):
expected_rates = (vdegree+1, sdegree-1, sdegree)
elif stress_element.family().startswith("Conforming"):
expected_rates = (vdegree+1, sdegree, sdegree-1)
else:
raise ValueError("Don't know what the convergence should be")
expected_rates = (vdegree+1, sdegree+1, sdegree)

assert min(convergence_orders(l2_u[1:])) > expected_rates[0] * 0.9
assert min(convergence_orders(l2_sigma[1:])) > expected_rates[1] * 0.9
assert min(convergence_orders(l2_div_sigma[1:])) > expected_rates[2] * 0.9


def test_mass_conditioning(stress_element, mesh_hierarchy):
Expand Down
51 changes: 51 additions & 0 deletions tests/regression/test_tensor_elements.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
from firedrake import *
import pytest


rg = RandomGenerator(PCG64(seed=1))


@pytest.fixture(params=("square", "cube"))
def mesh(request):
if request.param == "square":
return UnitSquareMesh(2, 2)
elif request.param == "cube":
return UnitCubeMesh(2, 2, 2)
else:
raise ValueError("Unrecognized mesh type")


@pytest.mark.parametrize("family, degree", [
rckirby marked this conversation as resolved.
Show resolved Hide resolved
("Regge", 0),
("Regge", 1),
("Regge", 2),
("HHJ", 0),
("HHJ", 1),
("HHJ", 2),
("GLS", 1),
("GLS", 2),
])
def test_tensor_continuity(mesh, family, degree):
V = FunctionSpace(mesh, family, degree)

Check failure on line 29 in tests/regression/test_tensor_elements.py

View workflow job for this annotation

GitHub Actions / Firedrake complex

test_tensor_elements.test_tensor_continuity[square-GLS-1]

ValueError: Unknown finite element 'GLS'.
Raw output
mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 2105)
family = 'GLS', degree = 1

    @pytest.mark.parametrize("family, degree", [
                             ("Regge", 0),
                             ("Regge", 1),
                             ("Regge", 2),
                             ("HHJ", 0),
                             ("HHJ", 1),
                             ("HHJ", 2),
                             ("GLS", 1),
                             ("GLS", 2),
                             ])
    def test_tensor_continuity(mesh, family, degree):
>       V = FunctionSpace(mesh, family, degree)

tests/regression/test_tensor_elements.py:29: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:104: in FunctionSpace
    element = make_scalar_element(mesh, family, degree, vfamily, vdegree, variant)
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:70: in make_scalar_element
    return finat.ufl.FiniteElement(family, cell=cell, degree=degree, variant=variant)
../firedrake_venv/src/FInAT/finat/ufl/finiteelement.py:145: in __init__
    ) = canonical_element_description(family, cell, degree, form_degree)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

family = 'GLS', cell = triangle, order = 1, form_degree = None

    def canonical_element_description(family, cell, order, form_degree):
        """Given basic element information, return corresponding element information on canonical form.
    
        Input: family, cell, (polynomial) order, form_degree
        Output: family (canonical), short_name (for printing), order, value shape,
        reference value shape, sobolev_space.
    
        This is used by the FiniteElement constructor to ved input
        data against the element list and aliases defined in ufl.
        """
        # Get domain dimensions
        if cell is not None:
            tdim = cell.topological_dimension()
            if isinstance(cell, Cell):
                cellname = cell.cellname()
            else:
                cellname = None
        else:
            tdim = None
            cellname = None
    
        # Catch general FEEC notation "P" and "S"
        if form_degree is not None and family in ("P", "S"):
            family, order = feec_element(family, tdim, order, form_degree)
    
        if form_degree is not None and family in ("P L2", "S L2"):
            family, order = feec_element_l2(family, tdim, order, form_degree)
    
        # Check whether this family is an alias for something else
        while family in aliases:
            if tdim is None:
                raise ValueError("Need dimension to handle element aliases.")
            (family, order) = aliases[family](family, tdim, order, form_degree)
    
        # Check that the element family exists
        if family not in ufl_elements:
>           raise ValueError(f"Unknown finite element '{family}'.")
E           ValueError: Unknown finite element 'GLS'.

../firedrake_venv/src/FInAT/finat/ufl/elementlist.py:446: ValueError

Check failure on line 29 in tests/regression/test_tensor_elements.py

View workflow job for this annotation

GitHub Actions / Firedrake complex

test_tensor_elements.test_tensor_continuity[square-GLS-2]

ValueError: Unknown finite element 'GLS'.
Raw output
mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 2106)
family = 'GLS', degree = 2

    @pytest.mark.parametrize("family, degree", [
                             ("Regge", 0),
                             ("Regge", 1),
                             ("Regge", 2),
                             ("HHJ", 0),
                             ("HHJ", 1),
                             ("HHJ", 2),
                             ("GLS", 1),
                             ("GLS", 2),
                             ])
    def test_tensor_continuity(mesh, family, degree):
>       V = FunctionSpace(mesh, family, degree)

tests/regression/test_tensor_elements.py:29: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:104: in FunctionSpace
    element = make_scalar_element(mesh, family, degree, vfamily, vdegree, variant)
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:70: in make_scalar_element
    return finat.ufl.FiniteElement(family, cell=cell, degree=degree, variant=variant)
../firedrake_venv/src/FInAT/finat/ufl/finiteelement.py:145: in __init__
    ) = canonical_element_description(family, cell, degree, form_degree)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

family = 'GLS', cell = triangle, order = 2, form_degree = None

    def canonical_element_description(family, cell, order, form_degree):
        """Given basic element information, return corresponding element information on canonical form.
    
        Input: family, cell, (polynomial) order, form_degree
        Output: family (canonical), short_name (for printing), order, value shape,
        reference value shape, sobolev_space.
    
        This is used by the FiniteElement constructor to ved input
        data against the element list and aliases defined in ufl.
        """
        # Get domain dimensions
        if cell is not None:
            tdim = cell.topological_dimension()
            if isinstance(cell, Cell):
                cellname = cell.cellname()
            else:
                cellname = None
        else:
            tdim = None
            cellname = None
    
        # Catch general FEEC notation "P" and "S"
        if form_degree is not None and family in ("P", "S"):
            family, order = feec_element(family, tdim, order, form_degree)
    
        if form_degree is not None and family in ("P L2", "S L2"):
            family, order = feec_element_l2(family, tdim, order, form_degree)
    
        # Check whether this family is an alias for something else
        while family in aliases:
            if tdim is None:
                raise ValueError("Need dimension to handle element aliases.")
            (family, order) = aliases[family](family, tdim, order, form_degree)
    
        # Check that the element family exists
        if family not in ufl_elements:
>           raise ValueError(f"Unknown finite element '{family}'.")
E           ValueError: Unknown finite element 'GLS'.

../firedrake_venv/src/FInAT/finat/ufl/elementlist.py:446: ValueError

Check failure on line 29 in tests/regression/test_tensor_elements.py

View workflow job for this annotation

GitHub Actions / Firedrake complex

test_tensor_elements.test_tensor_continuity[cube-HHJ-0]

ValueError: Cellname 'tetrahedron' invalid for 'Hellan-Herrmann-Johnson' finite element.
Raw output
mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 2119)
family = 'HHJ', degree = 0

    @pytest.mark.parametrize("family, degree", [
                             ("Regge", 0),
                             ("Regge", 1),
                             ("Regge", 2),
                             ("HHJ", 0),
                             ("HHJ", 1),
                             ("HHJ", 2),
                             ("GLS", 1),
                             ("GLS", 2),
                             ])
    def test_tensor_continuity(mesh, family, degree):
>       V = FunctionSpace(mesh, family, degree)

tests/regression/test_tensor_elements.py:29: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:104: in FunctionSpace
    element = make_scalar_element(mesh, family, degree, vfamily, vdegree, variant)
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:70: in make_scalar_element
    return finat.ufl.FiniteElement(family, cell=cell, degree=degree, variant=variant)
../firedrake_venv/src/FInAT/finat/ufl/finiteelement.py:145: in __init__
    ) = canonical_element_description(family, cell, degree, form_degree)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

family = 'Hellan-Herrmann-Johnson', cell = tetrahedron, order = 0
form_degree = None

    def canonical_element_description(family, cell, order, form_degree):
        """Given basic element information, return corresponding element information on canonical form.
    
        Input: family, cell, (polynomial) order, form_degree
        Output: family (canonical), short_name (for printing), order, value shape,
        reference value shape, sobolev_space.
    
        This is used by the FiniteElement constructor to ved input
        data against the element list and aliases defined in ufl.
        """
        # Get domain dimensions
        if cell is not None:
            tdim = cell.topological_dimension()
            if isinstance(cell, Cell):
                cellname = cell.cellname()
            else:
                cellname = None
        else:
            tdim = None
            cellname = None
    
        # Catch general FEEC notation "P" and "S"
        if form_degree is not None and family in ("P", "S"):
            family, order = feec_element(family, tdim, order, form_degree)
    
        if form_degree is not None and family in ("P L2", "S L2"):
            family, order = feec_element_l2(family, tdim, order, form_degree)
    
        # Check whether this family is an alias for something else
        while family in aliases:
            if tdim is None:
                raise ValueError("Need dimension to handle element aliases.")
            (family, order) = aliases[family](family, tdim, order, form_degree)
    
        # Check that the element family exists
        if family not in ufl_elements:
            raise ValueError(f"Unknown finite element '{family}'.")
    
        # Check that element data is valid (and also get common family
        # name)
        (family, short_name, value_rank, sobolev_space, mapping, krange, cellnames) = ufl_elements[family]
    
        # Accept CG/DG on all kind of cells, but use Q/DQ on "product" cells
        if cellname in set(cubes) - set(simplices) or isinstance(cell, TensorProductCell):
            if family == "Lagrange":
                family = "Q"
            elif family == "Discontinuous Lagrange":
                if order >= 1:
                    warnings.warn("Discontinuous Lagrange element requested on %s, creating DQ element." % cell.cellname())
                family = "DQ"
            elif family == "Discontinuous Lagrange L2":
                if order >= 1:
                    warnings.warn(f"Discontinuous Lagrange L2 element requested on {cell.cellname()}, "
                                  "creating DQ L2 element.")
                family = "DQ L2"
    
        # Validate cellname if a valid cell is specified
        if not (cellname is None or cellname in cellnames):
>           raise ValueError(f"Cellname '{cellname}' invalid for '{family}' finite element.")
E           ValueError: Cellname 'tetrahedron' invalid for 'Hellan-Herrmann-Johnson' finite element.

../firedrake_venv/src/FInAT/finat/ufl/elementlist.py:468: ValueError

Check failure on line 29 in tests/regression/test_tensor_elements.py

View workflow job for this annotation

GitHub Actions / Firedrake complex

test_tensor_elements.test_tensor_continuity[cube-HHJ-1]

ValueError: Cellname 'tetrahedron' invalid for 'Hellan-Herrmann-Johnson' finite element.
Raw output
mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 2120)
family = 'HHJ', degree = 1

    @pytest.mark.parametrize("family, degree", [
                             ("Regge", 0),
                             ("Regge", 1),
                             ("Regge", 2),
                             ("HHJ", 0),
                             ("HHJ", 1),
                             ("HHJ", 2),
                             ("GLS", 1),
                             ("GLS", 2),
                             ])
    def test_tensor_continuity(mesh, family, degree):
>       V = FunctionSpace(mesh, family, degree)

tests/regression/test_tensor_elements.py:29: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:104: in FunctionSpace
    element = make_scalar_element(mesh, family, degree, vfamily, vdegree, variant)
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:70: in make_scalar_element
    return finat.ufl.FiniteElement(family, cell=cell, degree=degree, variant=variant)
../firedrake_venv/src/FInAT/finat/ufl/finiteelement.py:145: in __init__
    ) = canonical_element_description(family, cell, degree, form_degree)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

family = 'Hellan-Herrmann-Johnson', cell = tetrahedron, order = 1
form_degree = None

    def canonical_element_description(family, cell, order, form_degree):
        """Given basic element information, return corresponding element information on canonical form.
    
        Input: family, cell, (polynomial) order, form_degree
        Output: family (canonical), short_name (for printing), order, value shape,
        reference value shape, sobolev_space.
    
        This is used by the FiniteElement constructor to ved input
        data against the element list and aliases defined in ufl.
        """
        # Get domain dimensions
        if cell is not None:
            tdim = cell.topological_dimension()
            if isinstance(cell, Cell):
                cellname = cell.cellname()
            else:
                cellname = None
        else:
            tdim = None
            cellname = None
    
        # Catch general FEEC notation "P" and "S"
        if form_degree is not None and family in ("P", "S"):
            family, order = feec_element(family, tdim, order, form_degree)
    
        if form_degree is not None and family in ("P L2", "S L2"):
            family, order = feec_element_l2(family, tdim, order, form_degree)
    
        # Check whether this family is an alias for something else
        while family in aliases:
            if tdim is None:
                raise ValueError("Need dimension to handle element aliases.")
            (family, order) = aliases[family](family, tdim, order, form_degree)
    
        # Check that the element family exists
        if family not in ufl_elements:
            raise ValueError(f"Unknown finite element '{family}'.")
    
        # Check that element data is valid (and also get common family
        # name)
        (family, short_name, value_rank, sobolev_space, mapping, krange, cellnames) = ufl_elements[family]
    
        # Accept CG/DG on all kind of cells, but use Q/DQ on "product" cells
        if cellname in set(cubes) - set(simplices) or isinstance(cell, TensorProductCell):
            if family == "Lagrange":
                family = "Q"
            elif family == "Discontinuous Lagrange":
                if order >= 1:
                    warnings.warn("Discontinuous Lagrange element requested on %s, creating DQ element." % cell.cellname())
                family = "DQ"
            elif family == "Discontinuous Lagrange L2":
                if order >= 1:
                    warnings.warn(f"Discontinuous Lagrange L2 element requested on {cell.cellname()}, "
                                  "creating DQ L2 element.")
                family = "DQ L2"
    
        # Validate cellname if a valid cell is specified
        if not (cellname is None or cellname in cellnames):
>           raise ValueError(f"Cellname '{cellname}' invalid for '{family}' finite element.")
E           ValueError: Cellname 'tetrahedron' invalid for 'Hellan-Herrmann-Johnson' finite element.

../firedrake_venv/src/FInAT/finat/ufl/elementlist.py:468: ValueError

Check failure on line 29 in tests/regression/test_tensor_elements.py

View workflow job for this annotation

GitHub Actions / Firedrake complex

test_tensor_elements.test_tensor_continuity[cube-HHJ-2]

ValueError: Cellname 'tetrahedron' invalid for 'Hellan-Herrmann-Johnson' finite element.
Raw output
mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 2121)
family = 'HHJ', degree = 2

    @pytest.mark.parametrize("family, degree", [
                             ("Regge", 0),
                             ("Regge", 1),
                             ("Regge", 2),
                             ("HHJ", 0),
                             ("HHJ", 1),
                             ("HHJ", 2),
                             ("GLS", 1),
                             ("GLS", 2),
                             ])
    def test_tensor_continuity(mesh, family, degree):
>       V = FunctionSpace(mesh, family, degree)

tests/regression/test_tensor_elements.py:29: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:104: in FunctionSpace
    element = make_scalar_element(mesh, family, degree, vfamily, vdegree, variant)
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:70: in make_scalar_element
    return finat.ufl.FiniteElement(family, cell=cell, degree=degree, variant=variant)
../firedrake_venv/src/FInAT/finat/ufl/finiteelement.py:145: in __init__
    ) = canonical_element_description(family, cell, degree, form_degree)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

family = 'Hellan-Herrmann-Johnson', cell = tetrahedron, order = 2
form_degree = None

    def canonical_element_description(family, cell, order, form_degree):
        """Given basic element information, return corresponding element information on canonical form.
    
        Input: family, cell, (polynomial) order, form_degree
        Output: family (canonical), short_name (for printing), order, value shape,
        reference value shape, sobolev_space.
    
        This is used by the FiniteElement constructor to ved input
        data against the element list and aliases defined in ufl.
        """
        # Get domain dimensions
        if cell is not None:
            tdim = cell.topological_dimension()
            if isinstance(cell, Cell):
                cellname = cell.cellname()
            else:
                cellname = None
        else:
            tdim = None
            cellname = None
    
        # Catch general FEEC notation "P" and "S"
        if form_degree is not None and family in ("P", "S"):
            family, order = feec_element(family, tdim, order, form_degree)
    
        if form_degree is not None and family in ("P L2", "S L2"):
            family, order = feec_element_l2(family, tdim, order, form_degree)
    
        # Check whether this family is an alias for something else
        while family in aliases:
            if tdim is None:
                raise ValueError("Need dimension to handle element aliases.")
            (family, order) = aliases[family](family, tdim, order, form_degree)
    
        # Check that the element family exists
        if family not in ufl_elements:
            raise ValueError(f"Unknown finite element '{family}'.")
    
        # Check that element data is valid (and also get common family
        # name)
        (family, short_name, value_rank, sobolev_space, mapping, krange, cellnames) = ufl_elements[family]
    
        # Accept CG/DG on all kind of cells, but use Q/DQ on "product" cells
        if cellname in set(cubes) - set(simplices) or isinstance(cell, TensorProductCell):
            if family == "Lagrange":
                family = "Q"
            elif family == "Discontinuous Lagrange":
                if order >= 1:
                    warnings.warn("Discontinuous Lagrange element requested on %s, creating DQ element." % cell.cellname())
                family = "DQ"
            elif family == "Discontinuous Lagrange L2":
                if order >= 1:
                    warnings.warn(f"Discontinuous Lagrange L2 element requested on {cell.cellname()}, "
                                  "creating DQ L2 element.")
                family = "DQ L2"
    
        # Validate cellname if a valid cell is specified
        if not (cellname is None or cellname in cellnames):
>           raise ValueError(f"Cellname '{cellname}' invalid for '{family}' finite element.")
E           ValueError: Cellname 'tetrahedron' invalid for 'Hellan-Herrmann-Johnson' finite element.

../firedrake_venv/src/FInAT/finat/ufl/elementlist.py:468: ValueError

Check failure on line 29 in tests/regression/test_tensor_elements.py

View workflow job for this annotation

GitHub Actions / Firedrake complex

test_tensor_elements.test_tensor_continuity[cube-GLS-1]

ValueError: Unknown finite element 'GLS'.
Raw output
mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 2122)
family = 'GLS', degree = 1

    @pytest.mark.parametrize("family, degree", [
                             ("Regge", 0),
                             ("Regge", 1),
                             ("Regge", 2),
                             ("HHJ", 0),
                             ("HHJ", 1),
                             ("HHJ", 2),
                             ("GLS", 1),
                             ("GLS", 2),
                             ])
    def test_tensor_continuity(mesh, family, degree):
>       V = FunctionSpace(mesh, family, degree)

tests/regression/test_tensor_elements.py:29: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:104: in FunctionSpace
    element = make_scalar_element(mesh, family, degree, vfamily, vdegree, variant)
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:70: in make_scalar_element
    return finat.ufl.FiniteElement(family, cell=cell, degree=degree, variant=variant)
../firedrake_venv/src/FInAT/finat/ufl/finiteelement.py:145: in __init__
    ) = canonical_element_description(family, cell, degree, form_degree)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

family = 'GLS', cell = tetrahedron, order = 1, form_degree = None

    def canonical_element_description(family, cell, order, form_degree):
        """Given basic element information, return corresponding element information on canonical form.
    
        Input: family, cell, (polynomial) order, form_degree
        Output: family (canonical), short_name (for printing), order, value shape,
        reference value shape, sobolev_space.
    
        This is used by the FiniteElement constructor to ved input
        data against the element list and aliases defined in ufl.
        """
        # Get domain dimensions
        if cell is not None:
            tdim = cell.topological_dimension()
            if isinstance(cell, Cell):
                cellname = cell.cellname()
            else:
                cellname = None
        else:
            tdim = None
            cellname = None
    
        # Catch general FEEC notation "P" and "S"
        if form_degree is not None and family in ("P", "S"):
            family, order = feec_element(family, tdim, order, form_degree)
    
        if form_degree is not None and family in ("P L2", "S L2"):
            family, order = feec_element_l2(family, tdim, order, form_degree)
    
        # Check whether this family is an alias for something else
        while family in aliases:
            if tdim is None:
                raise ValueError("Need dimension to handle element aliases.")
            (family, order) = aliases[family](family, tdim, order, form_degree)
    
        # Check that the element family exists
        if family not in ufl_elements:
>           raise ValueError(f"Unknown finite element '{family}'.")
E           ValueError: Unknown finite element 'GLS'.

../firedrake_venv/src/FInAT/finat/ufl/elementlist.py:446: ValueError

Check failure on line 29 in tests/regression/test_tensor_elements.py

View workflow job for this annotation

GitHub Actions / Firedrake complex

test_tensor_elements.test_tensor_continuity[cube-GLS-2]

ValueError: Unknown finite element 'GLS'.
Raw output
mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 2123)
family = 'GLS', degree = 2

    @pytest.mark.parametrize("family, degree", [
                             ("Regge", 0),
                             ("Regge", 1),
                             ("Regge", 2),
                             ("HHJ", 0),
                             ("HHJ", 1),
                             ("HHJ", 2),
                             ("GLS", 1),
                             ("GLS", 2),
                             ])
    def test_tensor_continuity(mesh, family, degree):
>       V = FunctionSpace(mesh, family, degree)

tests/regression/test_tensor_elements.py:29: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:104: in FunctionSpace
    element = make_scalar_element(mesh, family, degree, vfamily, vdegree, variant)
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:70: in make_scalar_element
    return finat.ufl.FiniteElement(family, cell=cell, degree=degree, variant=variant)
../firedrake_venv/src/FInAT/finat/ufl/finiteelement.py:145: in __init__
    ) = canonical_element_description(family, cell, degree, form_degree)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

family = 'GLS', cell = tetrahedron, order = 2, form_degree = None

    def canonical_element_description(family, cell, order, form_degree):
        """Given basic element information, return corresponding element information on canonical form.
    
        Input: family, cell, (polynomial) order, form_degree
        Output: family (canonical), short_name (for printing), order, value shape,
        reference value shape, sobolev_space.
    
        This is used by the FiniteElement constructor to ved input
        data against the element list and aliases defined in ufl.
        """
        # Get domain dimensions
        if cell is not None:
            tdim = cell.topological_dimension()
            if isinstance(cell, Cell):
                cellname = cell.cellname()
            else:
                cellname = None
        else:
            tdim = None
            cellname = None
    
        # Catch general FEEC notation "P" and "S"
        if form_degree is not None and family in ("P", "S"):
            family, order = feec_element(family, tdim, order, form_degree)
    
        if form_degree is not None and family in ("P L2", "S L2"):
            family, order = feec_element_l2(family, tdim, order, form_degree)
    
        # Check whether this family is an alias for something else
        while family in aliases:
            if tdim is None:
                raise ValueError("Need dimension to handle element aliases.")
            (family, order) = aliases[family](family, tdim, order, form_degree)
    
        # Check that the element family exists
        if family not in ufl_elements:
>           raise ValueError(f"Unknown finite element '{family}'.")
E           ValueError: Unknown finite element 'GLS'.

../firedrake_venv/src/FInAT/finat/ufl/elementlist.py:446: ValueError

Check failure on line 29 in tests/regression/test_tensor_elements.py

View workflow job for this annotation

GitHub Actions / Firedrake real

test_tensor_elements.test_tensor_continuity[square-GLS-1]

ValueError: Unknown finite element 'GLS'.
Raw output
mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 2514)
family = 'GLS', degree = 1

    @pytest.mark.parametrize("family, degree", [
                             ("Regge", 0),
                             ("Regge", 1),
                             ("Regge", 2),
                             ("HHJ", 0),
                             ("HHJ", 1),
                             ("HHJ", 2),
                             ("GLS", 1),
                             ("GLS", 2),
                             ])
    def test_tensor_continuity(mesh, family, degree):
>       V = FunctionSpace(mesh, family, degree)

tests/regression/test_tensor_elements.py:29: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:104: in FunctionSpace
    element = make_scalar_element(mesh, family, degree, vfamily, vdegree, variant)
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:70: in make_scalar_element
    return finat.ufl.FiniteElement(family, cell=cell, degree=degree, variant=variant)
../firedrake_venv/src/FInAT/finat/ufl/finiteelement.py:145: in __init__
    ) = canonical_element_description(family, cell, degree, form_degree)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

family = 'GLS', cell = triangle, order = 1, form_degree = None

    def canonical_element_description(family, cell, order, form_degree):
        """Given basic element information, return corresponding element information on canonical form.
    
        Input: family, cell, (polynomial) order, form_degree
        Output: family (canonical), short_name (for printing), order, value shape,
        reference value shape, sobolev_space.
    
        This is used by the FiniteElement constructor to ved input
        data against the element list and aliases defined in ufl.
        """
        # Get domain dimensions
        if cell is not None:
            tdim = cell.topological_dimension()
            if isinstance(cell, Cell):
                cellname = cell.cellname()
            else:
                cellname = None
        else:
            tdim = None
            cellname = None
    
        # Catch general FEEC notation "P" and "S"
        if form_degree is not None and family in ("P", "S"):
            family, order = feec_element(family, tdim, order, form_degree)
    
        if form_degree is not None and family in ("P L2", "S L2"):
            family, order = feec_element_l2(family, tdim, order, form_degree)
    
        # Check whether this family is an alias for something else
        while family in aliases:
            if tdim is None:
                raise ValueError("Need dimension to handle element aliases.")
            (family, order) = aliases[family](family, tdim, order, form_degree)
    
        # Check that the element family exists
        if family not in ufl_elements:
>           raise ValueError(f"Unknown finite element '{family}'.")
E           ValueError: Unknown finite element 'GLS'.

../firedrake_venv/src/FInAT/finat/ufl/elementlist.py:446: ValueError

Check failure on line 29 in tests/regression/test_tensor_elements.py

View workflow job for this annotation

GitHub Actions / Firedrake real

test_tensor_elements.test_tensor_continuity[square-GLS-2]

ValueError: Unknown finite element 'GLS'.
Raw output
mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 2515)
family = 'GLS', degree = 2

    @pytest.mark.parametrize("family, degree", [
                             ("Regge", 0),
                             ("Regge", 1),
                             ("Regge", 2),
                             ("HHJ", 0),
                             ("HHJ", 1),
                             ("HHJ", 2),
                             ("GLS", 1),
                             ("GLS", 2),
                             ])
    def test_tensor_continuity(mesh, family, degree):
>       V = FunctionSpace(mesh, family, degree)

tests/regression/test_tensor_elements.py:29: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:104: in FunctionSpace
    element = make_scalar_element(mesh, family, degree, vfamily, vdegree, variant)
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:70: in make_scalar_element
    return finat.ufl.FiniteElement(family, cell=cell, degree=degree, variant=variant)
../firedrake_venv/src/FInAT/finat/ufl/finiteelement.py:145: in __init__
    ) = canonical_element_description(family, cell, degree, form_degree)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

family = 'GLS', cell = triangle, order = 2, form_degree = None

    def canonical_element_description(family, cell, order, form_degree):
        """Given basic element information, return corresponding element information on canonical form.
    
        Input: family, cell, (polynomial) order, form_degree
        Output: family (canonical), short_name (for printing), order, value shape,
        reference value shape, sobolev_space.
    
        This is used by the FiniteElement constructor to ved input
        data against the element list and aliases defined in ufl.
        """
        # Get domain dimensions
        if cell is not None:
            tdim = cell.topological_dimension()
            if isinstance(cell, Cell):
                cellname = cell.cellname()
            else:
                cellname = None
        else:
            tdim = None
            cellname = None
    
        # Catch general FEEC notation "P" and "S"
        if form_degree is not None and family in ("P", "S"):
            family, order = feec_element(family, tdim, order, form_degree)
    
        if form_degree is not None and family in ("P L2", "S L2"):
            family, order = feec_element_l2(family, tdim, order, form_degree)
    
        # Check whether this family is an alias for something else
        while family in aliases:
            if tdim is None:
                raise ValueError("Need dimension to handle element aliases.")
            (family, order) = aliases[family](family, tdim, order, form_degree)
    
        # Check that the element family exists
        if family not in ufl_elements:
>           raise ValueError(f"Unknown finite element '{family}'.")
E           ValueError: Unknown finite element 'GLS'.

../firedrake_venv/src/FInAT/finat/ufl/elementlist.py:446: ValueError

Check failure on line 29 in tests/regression/test_tensor_elements.py

View workflow job for this annotation

GitHub Actions / Firedrake real

test_tensor_elements.test_tensor_continuity[cube-HHJ-0]

ValueError: Cellname 'tetrahedron' invalid for 'Hellan-Herrmann-Johnson' finite element.
Raw output
mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 2528)
family = 'HHJ', degree = 0

    @pytest.mark.parametrize("family, degree", [
                             ("Regge", 0),
                             ("Regge", 1),
                             ("Regge", 2),
                             ("HHJ", 0),
                             ("HHJ", 1),
                             ("HHJ", 2),
                             ("GLS", 1),
                             ("GLS", 2),
                             ])
    def test_tensor_continuity(mesh, family, degree):
>       V = FunctionSpace(mesh, family, degree)

tests/regression/test_tensor_elements.py:29: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:104: in FunctionSpace
    element = make_scalar_element(mesh, family, degree, vfamily, vdegree, variant)
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:70: in make_scalar_element
    return finat.ufl.FiniteElement(family, cell=cell, degree=degree, variant=variant)
../firedrake_venv/src/FInAT/finat/ufl/finiteelement.py:145: in __init__
    ) = canonical_element_description(family, cell, degree, form_degree)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

family = 'Hellan-Herrmann-Johnson', cell = tetrahedron, order = 0
form_degree = None

    def canonical_element_description(family, cell, order, form_degree):
        """Given basic element information, return corresponding element information on canonical form.
    
        Input: family, cell, (polynomial) order, form_degree
        Output: family (canonical), short_name (for printing), order, value shape,
        reference value shape, sobolev_space.
    
        This is used by the FiniteElement constructor to ved input
        data against the element list and aliases defined in ufl.
        """
        # Get domain dimensions
        if cell is not None:
            tdim = cell.topological_dimension()
            if isinstance(cell, Cell):
                cellname = cell.cellname()
            else:
                cellname = None
        else:
            tdim = None
            cellname = None
    
        # Catch general FEEC notation "P" and "S"
        if form_degree is not None and family in ("P", "S"):
            family, order = feec_element(family, tdim, order, form_degree)
    
        if form_degree is not None and family in ("P L2", "S L2"):
            family, order = feec_element_l2(family, tdim, order, form_degree)
    
        # Check whether this family is an alias for something else
        while family in aliases:
            if tdim is None:
                raise ValueError("Need dimension to handle element aliases.")
            (family, order) = aliases[family](family, tdim, order, form_degree)
    
        # Check that the element family exists
        if family not in ufl_elements:
            raise ValueError(f"Unknown finite element '{family}'.")
    
        # Check that element data is valid (and also get common family
        # name)
        (family, short_name, value_rank, sobolev_space, mapping, krange, cellnames) = ufl_elements[family]
    
        # Accept CG/DG on all kind of cells, but use Q/DQ on "product" cells
        if cellname in set(cubes) - set(simplices) or isinstance(cell, TensorProductCell):
            if family == "Lagrange":
                family = "Q"
            elif family == "Discontinuous Lagrange":
                if order >= 1:
                    warnings.warn("Discontinuous Lagrange element requested on %s, creating DQ element." % cell.cellname())
                family = "DQ"
            elif family == "Discontinuous Lagrange L2":
                if order >= 1:
                    warnings.warn(f"Discontinuous Lagrange L2 element requested on {cell.cellname()}, "
                                  "creating DQ L2 element.")
                family = "DQ L2"
    
        # Validate cellname if a valid cell is specified
        if not (cellname is None or cellname in cellnames):
>           raise ValueError(f"Cellname '{cellname}' invalid for '{family}' finite element.")
E           ValueError: Cellname 'tetrahedron' invalid for 'Hellan-Herrmann-Johnson' finite element.

../firedrake_venv/src/FInAT/finat/ufl/elementlist.py:468: ValueError

Check failure on line 29 in tests/regression/test_tensor_elements.py

View workflow job for this annotation

GitHub Actions / Firedrake real

test_tensor_elements.test_tensor_continuity[cube-HHJ-1]

ValueError: Cellname 'tetrahedron' invalid for 'Hellan-Herrmann-Johnson' finite element.
Raw output
mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 2529)
family = 'HHJ', degree = 1

    @pytest.mark.parametrize("family, degree", [
                             ("Regge", 0),
                             ("Regge", 1),
                             ("Regge", 2),
                             ("HHJ", 0),
                             ("HHJ", 1),
                             ("HHJ", 2),
                             ("GLS", 1),
                             ("GLS", 2),
                             ])
    def test_tensor_continuity(mesh, family, degree):
>       V = FunctionSpace(mesh, family, degree)

tests/regression/test_tensor_elements.py:29: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:104: in FunctionSpace
    element = make_scalar_element(mesh, family, degree, vfamily, vdegree, variant)
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:70: in make_scalar_element
    return finat.ufl.FiniteElement(family, cell=cell, degree=degree, variant=variant)
../firedrake_venv/src/FInAT/finat/ufl/finiteelement.py:145: in __init__
    ) = canonical_element_description(family, cell, degree, form_degree)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

family = 'Hellan-Herrmann-Johnson', cell = tetrahedron, order = 1
form_degree = None

    def canonical_element_description(family, cell, order, form_degree):
        """Given basic element information, return corresponding element information on canonical form.
    
        Input: family, cell, (polynomial) order, form_degree
        Output: family (canonical), short_name (for printing), order, value shape,
        reference value shape, sobolev_space.
    
        This is used by the FiniteElement constructor to ved input
        data against the element list and aliases defined in ufl.
        """
        # Get domain dimensions
        if cell is not None:
            tdim = cell.topological_dimension()
            if isinstance(cell, Cell):
                cellname = cell.cellname()
            else:
                cellname = None
        else:
            tdim = None
            cellname = None
    
        # Catch general FEEC notation "P" and "S"
        if form_degree is not None and family in ("P", "S"):
            family, order = feec_element(family, tdim, order, form_degree)
    
        if form_degree is not None and family in ("P L2", "S L2"):
            family, order = feec_element_l2(family, tdim, order, form_degree)
    
        # Check whether this family is an alias for something else
        while family in aliases:
            if tdim is None:
                raise ValueError("Need dimension to handle element aliases.")
            (family, order) = aliases[family](family, tdim, order, form_degree)
    
        # Check that the element family exists
        if family not in ufl_elements:
            raise ValueError(f"Unknown finite element '{family}'.")
    
        # Check that element data is valid (and also get common family
        # name)
        (family, short_name, value_rank, sobolev_space, mapping, krange, cellnames) = ufl_elements[family]
    
        # Accept CG/DG on all kind of cells, but use Q/DQ on "product" cells
        if cellname in set(cubes) - set(simplices) or isinstance(cell, TensorProductCell):
            if family == "Lagrange":
                family = "Q"
            elif family == "Discontinuous Lagrange":
                if order >= 1:
                    warnings.warn("Discontinuous Lagrange element requested on %s, creating DQ element." % cell.cellname())
                family = "DQ"
            elif family == "Discontinuous Lagrange L2":
                if order >= 1:
                    warnings.warn(f"Discontinuous Lagrange L2 element requested on {cell.cellname()}, "
                                  "creating DQ L2 element.")
                family = "DQ L2"
    
        # Validate cellname if a valid cell is specified
        if not (cellname is None or cellname in cellnames):
>           raise ValueError(f"Cellname '{cellname}' invalid for '{family}' finite element.")
E           ValueError: Cellname 'tetrahedron' invalid for 'Hellan-Herrmann-Johnson' finite element.

../firedrake_venv/src/FInAT/finat/ufl/elementlist.py:468: ValueError

Check failure on line 29 in tests/regression/test_tensor_elements.py

View workflow job for this annotation

GitHub Actions / Firedrake real

test_tensor_elements.test_tensor_continuity[cube-HHJ-2]

ValueError: Cellname 'tetrahedron' invalid for 'Hellan-Herrmann-Johnson' finite element.
Raw output
mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 2530)
family = 'HHJ', degree = 2

    @pytest.mark.parametrize("family, degree", [
                             ("Regge", 0),
                             ("Regge", 1),
                             ("Regge", 2),
                             ("HHJ", 0),
                             ("HHJ", 1),
                             ("HHJ", 2),
                             ("GLS", 1),
                             ("GLS", 2),
                             ])
    def test_tensor_continuity(mesh, family, degree):
>       V = FunctionSpace(mesh, family, degree)

tests/regression/test_tensor_elements.py:29: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:104: in FunctionSpace
    element = make_scalar_element(mesh, family, degree, vfamily, vdegree, variant)
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:70: in make_scalar_element
    return finat.ufl.FiniteElement(family, cell=cell, degree=degree, variant=variant)
../firedrake_venv/src/FInAT/finat/ufl/finiteelement.py:145: in __init__
    ) = canonical_element_description(family, cell, degree, form_degree)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

family = 'Hellan-Herrmann-Johnson', cell = tetrahedron, order = 2
form_degree = None

    def canonical_element_description(family, cell, order, form_degree):
        """Given basic element information, return corresponding element information on canonical form.
    
        Input: family, cell, (polynomial) order, form_degree
        Output: family (canonical), short_name (for printing), order, value shape,
        reference value shape, sobolev_space.
    
        This is used by the FiniteElement constructor to ved input
        data against the element list and aliases defined in ufl.
        """
        # Get domain dimensions
        if cell is not None:
            tdim = cell.topological_dimension()
            if isinstance(cell, Cell):
                cellname = cell.cellname()
            else:
                cellname = None
        else:
            tdim = None
            cellname = None
    
        # Catch general FEEC notation "P" and "S"
        if form_degree is not None and family in ("P", "S"):
            family, order = feec_element(family, tdim, order, form_degree)
    
        if form_degree is not None and family in ("P L2", "S L2"):
            family, order = feec_element_l2(family, tdim, order, form_degree)
    
        # Check whether this family is an alias for something else
        while family in aliases:
            if tdim is None:
                raise ValueError("Need dimension to handle element aliases.")
            (family, order) = aliases[family](family, tdim, order, form_degree)
    
        # Check that the element family exists
        if family not in ufl_elements:
            raise ValueError(f"Unknown finite element '{family}'.")
    
        # Check that element data is valid (and also get common family
        # name)
        (family, short_name, value_rank, sobolev_space, mapping, krange, cellnames) = ufl_elements[family]
    
        # Accept CG/DG on all kind of cells, but use Q/DQ on "product" cells
        if cellname in set(cubes) - set(simplices) or isinstance(cell, TensorProductCell):
            if family == "Lagrange":
                family = "Q"
            elif family == "Discontinuous Lagrange":
                if order >= 1:
                    warnings.warn("Discontinuous Lagrange element requested on %s, creating DQ element." % cell.cellname())
                family = "DQ"
            elif family == "Discontinuous Lagrange L2":
                if order >= 1:
                    warnings.warn(f"Discontinuous Lagrange L2 element requested on {cell.cellname()}, "
                                  "creating DQ L2 element.")
                family = "DQ L2"
    
        # Validate cellname if a valid cell is specified
        if not (cellname is None or cellname in cellnames):
>           raise ValueError(f"Cellname '{cellname}' invalid for '{family}' finite element.")
E           ValueError: Cellname 'tetrahedron' invalid for 'Hellan-Herrmann-Johnson' finite element.

../firedrake_venv/src/FInAT/finat/ufl/elementlist.py:468: ValueError

Check failure on line 29 in tests/regression/test_tensor_elements.py

View workflow job for this annotation

GitHub Actions / Firedrake real

test_tensor_elements.test_tensor_continuity[cube-GLS-1]

ValueError: Unknown finite element 'GLS'.
Raw output
mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 2531)
family = 'GLS', degree = 1

    @pytest.mark.parametrize("family, degree", [
                             ("Regge", 0),
                             ("Regge", 1),
                             ("Regge", 2),
                             ("HHJ", 0),
                             ("HHJ", 1),
                             ("HHJ", 2),
                             ("GLS", 1),
                             ("GLS", 2),
                             ])
    def test_tensor_continuity(mesh, family, degree):
>       V = FunctionSpace(mesh, family, degree)

tests/regression/test_tensor_elements.py:29: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:104: in FunctionSpace
    element = make_scalar_element(mesh, family, degree, vfamily, vdegree, variant)
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:70: in make_scalar_element
    return finat.ufl.FiniteElement(family, cell=cell, degree=degree, variant=variant)
../firedrake_venv/src/FInAT/finat/ufl/finiteelement.py:145: in __init__
    ) = canonical_element_description(family, cell, degree, form_degree)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

family = 'GLS', cell = tetrahedron, order = 1, form_degree = None

    def canonical_element_description(family, cell, order, form_degree):
        """Given basic element information, return corresponding element information on canonical form.
    
        Input: family, cell, (polynomial) order, form_degree
        Output: family (canonical), short_name (for printing), order, value shape,
        reference value shape, sobolev_space.
    
        This is used by the FiniteElement constructor to ved input
        data against the element list and aliases defined in ufl.
        """
        # Get domain dimensions
        if cell is not None:
            tdim = cell.topological_dimension()
            if isinstance(cell, Cell):
                cellname = cell.cellname()
            else:
                cellname = None
        else:
            tdim = None
            cellname = None
    
        # Catch general FEEC notation "P" and "S"
        if form_degree is not None and family in ("P", "S"):
            family, order = feec_element(family, tdim, order, form_degree)
    
        if form_degree is not None and family in ("P L2", "S L2"):
            family, order = feec_element_l2(family, tdim, order, form_degree)
    
        # Check whether this family is an alias for something else
        while family in aliases:
            if tdim is None:
                raise ValueError("Need dimension to handle element aliases.")
            (family, order) = aliases[family](family, tdim, order, form_degree)
    
        # Check that the element family exists
        if family not in ufl_elements:
>           raise ValueError(f"Unknown finite element '{family}'.")
E           ValueError: Unknown finite element 'GLS'.

../firedrake_venv/src/FInAT/finat/ufl/elementlist.py:446: ValueError

Check failure on line 29 in tests/regression/test_tensor_elements.py

View workflow job for this annotation

GitHub Actions / Firedrake real

test_tensor_elements.test_tensor_continuity[cube-GLS-2]

ValueError: Unknown finite element 'GLS'.
Raw output
mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 2532)
family = 'GLS', degree = 2

    @pytest.mark.parametrize("family, degree", [
                             ("Regge", 0),
                             ("Regge", 1),
                             ("Regge", 2),
                             ("HHJ", 0),
                             ("HHJ", 1),
                             ("HHJ", 2),
                             ("GLS", 1),
                             ("GLS", 2),
                             ])
    def test_tensor_continuity(mesh, family, degree):
>       V = FunctionSpace(mesh, family, degree)

tests/regression/test_tensor_elements.py:29: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:104: in FunctionSpace
    element = make_scalar_element(mesh, family, degree, vfamily, vdegree, variant)
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:70: in make_scalar_element
    return finat.ufl.FiniteElement(family, cell=cell, degree=degree, variant=variant)
../firedrake_venv/src/FInAT/finat/ufl/finiteelement.py:145: in __init__
    ) = canonical_element_description(family, cell, degree, form_degree)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

family = 'GLS', cell = tetrahedron, order = 2, form_degree = None

    def canonical_element_description(family, cell, order, form_degree):
        """Given basic element information, return corresponding element information on canonical form.
    
        Input: family, cell, (polynomial) order, form_degree
        Output: family (canonical), short_name (for printing), order, value shape,
        reference value shape, sobolev_space.
    
        This is used by the FiniteElement constructor to ved input
        data against the element list and aliases defined in ufl.
        """
        # Get domain dimensions
        if cell is not None:
            tdim = cell.topological_dimension()
            if isinstance(cell, Cell):
                cellname = cell.cellname()
            else:
                cellname = None
        else:
            tdim = None
            cellname = None
    
        # Catch general FEEC notation "P" and "S"
        if form_degree is not None and family in ("P", "S"):
            family, order = feec_element(family, tdim, order, form_degree)
    
        if form_degree is not None and family in ("P L2", "S L2"):
            family, order = feec_element_l2(family, tdim, order, form_degree)
    
        # Check whether this family is an alias for something else
        while family in aliases:
            if tdim is None:
                raise ValueError("Need dimension to handle element aliases.")
            (family, order) = aliases[family](family, tdim, order, form_degree)
    
        # Check that the element family exists
        if family not in ufl_elements:
>           raise ValueError(f"Unknown finite element '{family}'.")
E           ValueError: Unknown finite element 'GLS'.

../firedrake_venv/src/FInAT/finat/ufl/elementlist.py:446: ValueError
u = rg.beta(V, 1.0, 2.0)

n = FacetNormal(mesh)

space = V.ufl_element().sobolev_space
if space == HDivDiv:
utrace = dot(n, dot(u, n))
elif space == HEin:
if mesh.topological_dimension() == 2:
t = perp(n)
else:
t = as_matrix([[0, n[2], -n[1]], [-n[2], 0, n[0]], [n[1], -n[0], 0]])
utrace = dot(t, dot(u, t))
else:
if mesh.topological_dimension() == 2:
t = perp(n)
utrace = dot(t, dot(u, n))
else:
utrace = cross(n, dot(u, n))

ujump = utrace('+') - utrace('-')
assert assemble(inner(ujump, ujump)*dS) < 1E-10
2 changes: 1 addition & 1 deletion tests/vertexonly/test_interpolation_from_parent.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def vfs(request, parentmesh):

@pytest.fixture(params=[("CG", 2, TensorFunctionSpace),
("BDM", 2, VectorFunctionSpace),
("Regge", 2, FunctionSpace)],
("Regge", 2, lambda *args: FunctionSpace(*args, variant="point"))],
ids=lambda x: f"{x[2].__name__}({x[0]}{x[1]})")
def tfs(request, parentmesh):
family = request.param[0]
Expand Down
Loading