Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mscroggs committed Aug 7, 2023
1 parent bed29a2 commit cdef5ed
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions test/test_custom_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ def test_lagrange_custom_triangle_degree1():

element = basix.create_custom_element(
basix.CellType.triangle, [], wcoeffs,
x, M, 0, basix.MapType.identity, basix.SobolevSpace.H1, False, 1, 1)
x, M, 0, basix.MapType.identity, basix.SobolevSpace.H1, False, 1, 1,
basix.PolysetType.standard)

points = basix.create_lattice(basix.CellType.triangle, 5, basix.LatticeType.equispaced, True)
assert np.allclose(lagrange.tabulate(1, points), element.tabulate(1, points))
Expand All @@ -46,7 +47,8 @@ def test_lagrange_custom_triangle_degree1_l2piola():

element = basix.create_custom_element(
basix.CellType.triangle, [], wcoeffs,
x, M, 0, basix.MapType.L2Piola, basix.SobolevSpace.L2, False, 1, 1)
x, M, 0, basix.MapType.L2Piola, basix.SobolevSpace.L2, False, 1, 1,
basix.PolysetType.standard)

points = basix.create_lattice(basix.CellType.triangle, 5, basix.LatticeType.equispaced, True)
assert np.allclose(lagrange.tabulate(1, points), element.tabulate(1, points))
Expand All @@ -70,7 +72,8 @@ def test_lagrange_custom_triangle_degree4():

element = basix.create_custom_element(
basix.CellType.triangle, [], wcoeffs,
x, M, 0, basix.MapType.identity, basix.SobolevSpace.H1, False, 4, 4)
x, M, 0, basix.MapType.identity, basix.SobolevSpace.H1, False, 4, 4,
basix.PolysetType.standard)

points = basix.create_lattice(basix.CellType.triangle, 5, basix.LatticeType.equispaced, True)
assert np.allclose(lagrange.tabulate(1, points), element.tabulate(1, points))
Expand All @@ -93,7 +96,8 @@ def test_lagrange_custom_quadrilateral_degree1():

element = basix.create_custom_element(
basix.CellType.quadrilateral, [], wcoeffs,
x, M, 0, basix.MapType.identity, basix.SobolevSpace.H1, False, 1, 1)
x, M, 0, basix.MapType.identity, basix.SobolevSpace.H1, False, 1, 1,
basix.PolysetType.standard)

points = basix.create_lattice(basix.CellType.quadrilateral, 5, basix.LatticeType.equispaced, True)
assert np.allclose(lagrange.tabulate(1, points), element.tabulate(1, points))
Expand Down Expand Up @@ -135,7 +139,7 @@ def test_raviart_thomas_triangle_degree1():

element = basix.create_custom_element(
basix.CellType.triangle, [2], wcoeffs, x, M, 0, basix.MapType.contravariantPiola,
basix.SobolevSpace.HDiv, False, 0, 1)
basix.SobolevSpace.HDiv, False, 0, 1, basix.PolysetType.standard)

rt = basix.create_element(
basix.ElementFamily.RT, basix.CellType.triangle, 1)
Expand All @@ -162,7 +166,7 @@ def create_lagrange1_quad(cell_type=basix.CellType.quadrilateral, degree=1, wcoe
value_shape = []
basix.create_custom_element(
cell_type, value_shape, wcoeffs, x, M, interpolation_nderivs, basix.MapType.identity,
basix.SobolevSpace.H1, discontinuous, 1, degree)
basix.SobolevSpace.H1, discontinuous, 1, degree, basix.PolysetType.standard)


def test_create_lagrange1_quad():
Expand Down

0 comments on commit cdef5ed

Please sign in to comment.