Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion tests/tsfc/test_sum_factorisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from ufl import (Mesh, FunctionSpace, TestFunction, TrialFunction,
TensorProductCell, dx, action, interval, triangle,
quadrilateral, curl, dot, div, grad)
quadrilateral, hexahedron, curl, dot, div, grad)
from finat.ufl import (FiniteElement, VectorElement, EnrichedElement,
TensorProductElement, HCurlElement, HDivElement)

Expand Down Expand Up @@ -190,6 +190,19 @@ def test_vector_laplace_action(cell, order):
assert (rates < order).all()


@pytest.mark.parametrize(('cell', 'equivalent_cell'),
[(quadrilateral, TensorProductCell(interval, interval)),
(hexahedron, TensorProductCell(quadrilateral, interval)),
(hexahedron, TensorProductCell(interval, interval, interval))])
@pytest.mark.parametrize('degree', [3, 5])
def test_equivalent_cells(cell, equivalent_cell, degree):
"""A form is compiled the same way on cells that hold the same space."""
a = helmholtz(cell, degree)
b = helmholtz(equivalent_cell, degree)
assert count_flops(a) == count_flops(b)
assert count_flops(action(a)) == count_flops(action(b))


if __name__ == "__main__":
import os
import sys
Expand Down
Loading