Skip to content

Commit 302b76d

Browse files
committed
setValuesBlocked
1 parent b4752b0 commit 302b76d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

firedrake/interpolation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1049,9 +1049,10 @@ def _interpolator(tensor, expr, subset, access, bcs=None):
10491049
W = dual_arg.function_space()
10501050
m_ = get_interp_node_map(source_mesh, target_mesh, W)
10511051
m_indices = W.dof_dset.lgmap.apply(m_.values)
1052+
m_shape = m_indices.shape + W.shape
10521053
weight = firedrake.Function(W)
10531054
with weight.dat.vec as w:
1054-
w.setValues(m_indices, numpy.ones(m_indices.shape), PETSc.InsertMode.ADD)
1055+
w.setValuesBlocked(m_indices, numpy.ones(m_shape), PETSc.InsertMode.ADD)
10551056
w.assemble()
10561057
w.reciprocal()
10571058

0 commit comments

Comments
 (0)