Skip to content

Commit

Permalink
ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
mscroggs committed Dec 20, 2024
1 parent d76950c commit 3356abb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 3 additions & 1 deletion ffcx/codegeneration/C/form.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ def generator(ir: FormIR, options):
f"static ufcx_integral* form_integrals_{ir.name}[{sizes}] = {{{values}}};"
)
d["form_integrals"] = f"form_integrals_{ir.name}"
values = ", ".join(f"{i}" for i, domains in zip(integral_ids, integral_domains) for _ in domains)
values = ", ".join(
f"{i}" for i, domains in zip(integral_ids, integral_domains) for _ in domains
)
d["form_integral_ids_init"] = f"int form_integral_ids_{ir.name}[{sizes}] = {{{values}}};"
d["form_integral_ids"] = f"form_integral_ids_{ir.name}"
else:
Expand Down
9 changes: 5 additions & 4 deletions ffcx/ir/representationutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,16 @@ def create_quadrature_points_and_weights(
create_quadrature("interval", degree, rule, elements) for _ in range(3)
]
pts[cell_name] = np.array(
[tuple(i[0] for i in p) for p in itertools.product(*[f[0] for f in tensor_factors[cell_name]])]
[
tuple(i[0] for i in p)
for p in itertools.product(*[f[0] for f in tensor_factors[cell_name]])
]
)
wts[cell_name] = np.array(
[np.prod(p) for p in itertools.product(*[f[1] for f in tensor_factors[cell_name]])]
)
else:
pts[cell_name], wts[cell_name] = create_quadrature(
cell_name, degree, rule, elements
)
pts[cell_name], wts[cell_name] = create_quadrature(cell_name, degree, rule, elements)
elif integral_type in ufl.measure.facet_integral_types:
for ft in cell.facet_types():
pts[ft.cellname()], wts[ft.cellname()] = create_quadrature(
Expand Down

0 comments on commit 3356abb

Please sign in to comment.