Skip to content

Commit a06c727

Browse files
committed
Fix integral count
1 parent 07ccdd7 commit a06c727

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ffcx/codegeneration/form.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ def generator(ir, options):
3333
code = []
3434
cases = []
3535
for itg_type in ("cell", "interior_facet", "exterior_facet"):
36-
cases += [(L.Symbol(itg_type), L.Return(len(ir.subdomain_ids[itg_type])))]
36+
num_integrals = 0
37+
for ids in ir.subdomain_ids[itg_type].values():
38+
num_integrals += len(ids)
39+
cases += [(L.Symbol(itg_type), L.Return(num_integrals))]
3740
code += [L.Switch("integral_type", cases, default=L.Return(0))]
3841
d["num_integrals"] = L.StatementList(code)
3942

0 commit comments

Comments
 (0)