Skip to content

Commit ca29daa

Browse files
committed
pt -> ptype
1 parent cdef5ed commit ca29daa

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

python/basix/ufl.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,7 +1356,7 @@ def enriched_element(elements: _typing.List[_ElementBase],
13561356
set equal to the topological dimension of the cell.
13571357
"""
13581358
ct = elements[0].cell_type
1359-
pt = elements[0].polyset_type
1359+
ptype = elements[0].polyset_type
13601360
vshape = elements[0].value_shape()
13611361
vsize = elements[0].value_size
13621362
if map_type is None:
@@ -1374,7 +1374,7 @@ def enriched_element(elements: _typing.List[_ElementBase],
13741374
discontinuous = False
13751375
if e.cell_type != ct:
13761376
raise ValueError("Enriched elements on different cell types not supported.")
1377-
if e.polyset_type != pt:
1377+
if e.polyset_type != ptype:
13781378
raise ValueError("Enriched elements on different polyset types not supported.")
13791379
if e.value_shape() != vshape or e.value_size != vsize:
13801380
raise ValueError("Enriched elements on different value shapes not supported.")
@@ -1409,15 +1409,15 @@ def enriched_element(elements: _typing.List[_ElementBase],
14091409
row += e.dim
14101410

14111411
return custom_element(ct, list(vshape), wcoeffs, x, M, nderivs,
1412-
map_type, ss, discontinuous, hcd, hd, pt, gdim=gdim)
1412+
map_type, ss, discontinuous, hcd, hd, ptype, gdim=gdim)
14131413

14141414

14151415
def custom_element(cell_type: _basix.CellType, value_shape: _typing.Union[_typing.List[int], _typing.Tuple[int, ...]],
14161416
wcoeffs: _npt.NDArray[_np.float64], x: _typing.List[_typing.List[_npt.NDArray[_np.float64]]],
14171417
M: _typing.List[_typing.List[_npt.NDArray[_np.float64]]], interpolation_nderivs: int,
14181418
map_type: _basix.MapType, sobolev_space: _basix.SobolevSpace, discontinuous: bool,
14191419
highest_complete_degree: int, highest_degree: int,
1420-
poly_type: _basix.PolysetType = _basix.PolysetType.standard,
1420+
polyset_type: _basix.PolysetType = _basix.PolysetType.standard,
14211421
gdim: _typing.Optional[int] = None) -> _ElementBase:
14221422
"""Create a UFL compatible custom Basix element.
14231423
@@ -1442,7 +1442,7 @@ def custom_element(cell_type: _basix.CellType, value_shape: _typing.Union[_typin
14421442
"""
14431443
return _BasixElement(_basix.create_custom_element(
14441444
cell_type, list(value_shape), wcoeffs, x, M, interpolation_nderivs,
1445-
map_type, sobolev_space, discontinuous, highest_complete_degree, highest_degree, poly_type), gdim=gdim)
1445+
map_type, sobolev_space, discontinuous, highest_complete_degree, highest_degree, polyset_type), gdim=gdim)
14461446

14471447

14481448
def mixed_element(elements: _typing.List[_ElementBase], gdim: _typing.Optional[int] = None) -> _ElementBase:

test/test_equality.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ def test_custom_element_equality():
3535

3636
p1_custom = basix.create_custom_element(
3737
basix.CellType.triangle, [], wcoeffs,
38-
x, M, 0, basix.MapType.identity, basix.SobolevSpace.H1, False, 1, 1)
38+
x, M, 0, basix.MapType.identity, basix.SobolevSpace.H1, False, 1, 1, basix.PolysetType.standard)
3939
p1_custom_again = basix.create_custom_element(
4040
basix.CellType.triangle, [], wcoeffs,
41-
x, M, 0, basix.MapType.identity, basix.SobolevSpace.H1, False, 1, 1)
41+
x, M, 0, basix.MapType.identity, basix.SobolevSpace.H1, False, 1, 1, basix.PolysetType.standard)
4242

4343
wcoeffs = np.eye(3)
4444
z = np.zeros((0, 2))
@@ -48,7 +48,7 @@ def test_custom_element_equality():
4848

4949
cr_custom = basix.create_custom_element(
5050
basix.CellType.triangle, [], wcoeffs,
51-
x, M, 0, basix.MapType.identity, basix.SobolevSpace.L2, False, 1, 1)
51+
x, M, 0, basix.MapType.identity, basix.SobolevSpace.L2, False, 1, 1, basix.PolysetType.standard)
5252

5353
assert p1_custom == p1_custom_again
5454
assert p1_custom != cr_custom

0 commit comments

Comments
 (0)