The ARPACK manual for znaupd
on pp. 128–129 says:
Mode 2:[...]
OP = inv[M]*A and B = M.
[...]
IDO = 1: compute Y = OP * Z and Z = B * X where
IPNTR(1) is the pointer into WORKD for X,
IPNTR(2) is the pointer into WORKD for Y,
IPNTR(3) is the pointer into WORKD for Z.
I interpret that as:
When IDO=1, compute the matrix=vector product $$ Z = MX $$ and store the result Z at IPNTR(3) then compute another matrix-vector product $$ rhs = AZ $$ then solve the linear system $$MY = rhs $$ and store the result Y at IPNTR(2).
However, the example zndrv3.f
does this:
When IDO=1, compute the matrix-vector product $$ rhs = AX $$ Then solve the linear system $$ MY = rhs $$ and store the result Y at IPNTR(2).
Which seems contradictory since it lacks one of the multiplications by $M$ and doesn't store Z.
So I'm not sure what I should do. I tried to copy the example but it didn't work (seems like wrong solutions). There are other possible reasons it didn't work but this is one of them I want to confirm. There's a similar inconsistency for dsaupd
and doing it like the examples works OK there.
Y=OP*Z
is computed with the inputZ
, and then the outputZ
, overwriting the input in the referenced array, is computed asZ=B*M
. This would also be slightly more useful for the solution of the generalized eigenvalue problem. $\endgroup$