Skip to content

Commit

Permalink
petsc: Use correct scalar type for datmat multiplication
Browse files Browse the repository at this point in the history
  • Loading branch information
wence- committed Aug 25, 2021
1 parent 0007d46 commit d5f82d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyop2/petsc_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ def mult(self, mat, x, y):
# Column matrix
if x.sizes[1] == 1:
v.copy(y)
a = np.zeros(1)
a = np.zeros(1, dtype=ScalarType)
if x.comm.rank == 0:
a[0] = x.array_r
else:
Expand All @@ -979,7 +979,7 @@ def multTranspose(self, mat, x, y):
# Row matrix
if x.sizes[1] == 1:
v.copy(y)
a = np.zeros(1)
a = np.zeros(1, dtype=ScalarType)
if x.comm.rank == 0:
a[0] = x.array_r
else:
Expand All @@ -1003,7 +1003,7 @@ def multTransposeAdd(self, mat, x, y, z):
# Row matrix
if x.sizes[1] == 1:
v.copy(z)
a = np.zeros(1)
a = np.zeros(1, dtype=ScalarType)
if x.comm.rank == 0:
a[0] = x.array_r
else:
Expand Down

0 comments on commit d5f82d3

Please sign in to comment.