@@ -140,7 +140,7 @@ def compute_integral_ir(
140
140
for comp in S .nodes [target ]["component" ]:
141
141
assert expressions [comp ] is None
142
142
expressions [comp ] = S .nodes [target ]["expression" ]
143
- expression = ufl .as_tensor (np .reshape (expressions , expression .ufl_shape ))
143
+ expression = ufl .as_tensor (np .reshape (expressions , expression .ufl_shape )) # type: ignore
144
144
145
145
# Rebuild scalar list-based graph representation
146
146
S = build_scalar_graph (expression )
@@ -173,10 +173,10 @@ def compute_integral_ir(
173
173
k += 1
174
174
175
175
# Get list of indices in F which are the arguments (should be at start)
176
- argkeys : set [int ] = set ()
176
+ _argkeys : set [int ] = set ()
177
177
for w in argument_factorization :
178
- argkeys = argkeys | set (w )
179
- argkeys = list (argkeys )
178
+ _argkeys = _argkeys | set (w )
179
+ argkeys = list (_argkeys )
180
180
181
181
# Build set of modified_terminals for each mt factorized vertex in F
182
182
# and attach tables, if appropriate
@@ -216,12 +216,13 @@ def compute_integral_ir(
216
216
assert tr .block_size is not None
217
217
dofmap = tuple (begin + i * tr .block_size for i in range (num_dofs ))
218
218
_blockmap .append (dofmap )
219
+ blockmap = tuple (_blockmap )
219
220
220
221
block_is_uniform = all (tr .is_uniform for tr in trs )
221
222
222
223
# Collect relevant restrictions to identify blocks correctly
223
224
# in interior facet integrals
224
-
225
+
225
226
# Collect relevant restrictions to identify blocks correctly
226
227
# in interior facet integrals
227
228
_block_restrictions : list [str ] = []
@@ -267,8 +268,9 @@ def compute_integral_ir(
267
268
tr = v .get ("tr" )
268
269
if tr is not None and F .nodes [i ]["status" ] != "inactive" :
269
270
if tr .has_tensor_factorisation :
271
+ assert tr .tensor_factors is not None
270
272
for t in tr .tensor_factors :
271
- active_table_names .add (t .name )
273
+ active_table_names .add (t .name )
272
274
else :
273
275
active_table_names .add (tr .name )
274
276
@@ -277,6 +279,7 @@ def compute_integral_ir(
277
279
for blockdata in contributions :
278
280
for mad in blockdata .ma_data :
279
281
if mad .tabledata .has_tensor_factorisation :
282
+ assert mad .tabledata .tensor_factors is not None
280
283
for t in mad .tabledata .tensor_factors :
281
284
active_table_names .add (t .name )
282
285
else :
0 commit comments