diff --git a/ffcx/codegeneration/C/form.py b/ffcx/codegeneration/C/form.py index 0ea20d38c..d92760c39 100644 --- a/ffcx/codegeneration/C/form.py +++ b/ffcx/codegeneration/C/form.py @@ -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: diff --git a/ffcx/ir/representationutils.py b/ffcx/ir/representationutils.py index 99f5ca45c..48fd1f35e 100644 --- a/ffcx/ir/representationutils.py +++ b/ffcx/ir/representationutils.py @@ -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(