Skip to content

Commit 75de8e2

Browse files
committed
fixes
1 parent 7e84571 commit 75de8e2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

firedrake/assemble.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ def assemble(self, tensor=None, current_state=None):
238238
if isinstance(expr, ufl.algebra.Sum):
239239
a, b = [assemble(e) for e in expr.ufl_operands]
240240
# Only Expr resulting in a Matrix if assembled are BaseFormOperator
241-
if not all(isinstance(op, matrix.AssembledMatrix) for op in (a, b)):
241+
if not all(isinstance(op, matrix.MatrixBase) for op in (a, b)):
242242
raise TypeError('Mismatching Sum shapes')
243243
return assemble(ufl.FormSum((a, 1), (b, 1)), tensor=tensor)
244244
elif isinstance(expr, ufl.algebra.Product):

firedrake/interpolation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def assemble(
307307
"""
308308
self._check_mat_type(mat_type)
309309

310-
if mat_type == "matfree":
310+
if mat_type == "matfree" and self.rank == 2:
311311
ctx = ImplicitMatrixContext(
312312
self.ufl_interpolate, row_bcs=bcs, col_bcs=bcs,
313313
)

0 commit comments

Comments
 (0)