Skip to content

Commit 61f127e

Browse files
committed
update tensor product interface
1 parent f32e469 commit 61f127e

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

.github/workflows/dolfinx-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
if: github.event_name != 'workflow_dispatch'
3737
run: |
3838
python3 -m pip install git+https://github.com/FEniCS/ufl.git
39-
python3 -m pip install git+https://github.com/FEniCS/basix.git
39+
python3 -m pip install git+https://github.com/FEniCS/basix.git@chris/tp-element
4040
- name: Install UFL and Basix (specified branches/tags)
4141
if: github.event_name == 'workflow_dispatch'
4242
run: |

.github/workflows/pythonapp.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- name: Install FEniCS dependencies (Python)
4040
run: |
4141
pip install git+https://github.com/FEniCS/ufl.git
42-
pip install git+https://github.com/FEniCS/basix.git
42+
pip install git+https://github.com/FEniCS/basix.git@chris/tp-element
4343
- name: Install FFCx
4444
run: pip install .[ci]
4545
- name: Lint with flake8

ffcx/ir/elementtables.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ def build_optimized_tables(quadrature_rule, cell, integral_type, entitytype,
409409
factors = element.get_tensor_product_representation()
410410

411411
tensor_factors = []
412-
for i, j in enumerate(factors[0][0]):
412+
for i, j in enumerate(factors[0]):
413413
pts = quadrature_rule.tensor_factors[i][0]
414414
d = local_derivatives[i]
415415
sub_tbl = j.tabulate(d, pts)[d]

test/test_tensor_product.py

+3-7
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,9 @@ def create_tensor_product_element(cell_type, degree, variant, shape=None):
2727
"""Create tensor product element."""
2828
gdim = cell_to_gdim(cell_type)
2929
family = basix.ElementFamily.P
30-
ref = basix.create_element(family, cell_type, degree, variant)
31-
factors = ref.get_tensor_product_representation()[0]
32-
perm = factors[1]
33-
dof_ordering = np.argsort(perm)
34-
element = basix.create_element(family, cell_type, degree, variant,
35-
dof_ordering=dof_ordering)
36-
uflelement = basix.ufl._BasixElement(element, gdim=gdim)
30+
element = basix.create_tp_element(family, cell_type, degree, variant)
31+
factors = element.get_tensor_product_representation()[0]
32+
uflelement = basix.ufl.wrap_element(element, gdim=gdim)
3733
if shape is None:
3834
return uflelement
3935
else:

0 commit comments

Comments
 (0)