Skip to content

Commit 41ed55f

Browse files
committed
ruff
1 parent edf1084 commit 41ed55f

File tree

3 files changed

+6
-14
lines changed

3 files changed

+6
-14
lines changed

ffcx/codegeneration/C/expressions.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ def generator(ir, options):
106106

107107
# FIXME: Should be handled differently, revise how
108108
# ufcx_function_space is generated (also for ufcx_form)
109-
for name, (element, dofmap, cmap_family, cmap_degree, value_shape) in ir.function_spaces.items():
109+
for name, (
110+
element, dofmap, cmap_family, cmap_degree, value_shape,
111+
) in ir.function_spaces.items():
110112
code += [f"static ufcx_function_space function_space_{name}_{ir.name_from_uflfile} ="]
111113
code += ["{"]
112114
code += [f".finite_element = &{element},"]

ffcx/ir/representation.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class FormIR(typing.NamedTuple):
4848
num_constants: int
4949
name_from_uflfile: str
5050
function_spaces: dict[str, tuple[str, str, str, int, basix.CellType, basix.LagrangeVariant,
51-
typing.Tuple[int]]]
51+
tuple[int]]]
5252
original_coefficient_position: list[int]
5353
coefficient_names: list[str]
5454
constant_names: list[str]
@@ -174,7 +174,7 @@ class ExpressionIR(typing.NamedTuple):
174174
constant_names: list[str]
175175
needs_facet_permutations: bool
176176
function_spaces: dict[str, tuple[str, str, str, int, basix.CellType, basix.LagrangeVariant,
177-
typing.Tuple[int]]]
177+
tuple[int]]]
178178
name_from_uflfile: str
179179
original_coefficient_positions: list[int]
180180

test/test_tensor_product.py

+1-11
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,8 @@ def cell_to_gdim(cell_type):
2626
def create_tensor_product_element(cell_type, degree, variant, shape=None):
2727
"""Create tensor product element."""
2828
family = basix.ElementFamily.P
29-
<<<<<<< HEAD
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)
37-
=======
3829
element = basix.create_tp_element(family, cell_type, degree, variant)
39-
uflelement = basix.ufl.wrap_element(element, gdim=gdim)
40-
>>>>>>> main
30+
uflelement = basix.ufl.wrap_element(element)
4131
if shape is None:
4232
return uflelement
4333
else:

0 commit comments

Comments
 (0)