Skip to content

Commit

Permalink
fix slepc v3.22+ shell matrix solving
Browse files Browse the repository at this point in the history
  • Loading branch information
jcmgray committed Oct 28, 2024
1 parent 3695f50 commit 20fe4c6
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions quimb/linalg/slepc_linalg.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,15 @@ def __init__(self, lo):
self.lo = lo
self.real = lo.dtype in (float, np.float64)

def mult(self, _, x, y):
y[:] = self.lo.matvec(x)

def multHermitian(self, _, x, y):
y[:] = self.lo.rmatvec(x)
def mult(self, _, xvec, yvec):
x = xvec.getArray(readonly=True)
y = self.lo.matvec(x)
yvec.setArray(y)

def multHermitian(self, _, xvec, yvec):
x = xvec.getArray(readonly=True)
y = self.lo.rmatvec(x)
yvec.setArray(y)


def linear_operator_2_petsc_shell(lo, comm=None):
Expand Down

0 comments on commit 20fe4c6

Please sign in to comment.