KSPSolveTranspose?

Hello,
I was unable to find any documentation about the implementation of KSPSolveTranspose in the FF/PETSc interface, though I can see it is mentioned in PETSc-code.hpp. I was wondering if this:

load "PETSc"
Mat A;
real[int] bP, solP;
KSPSolve(A, bP, solP);
real[int] b;
ChangeNumbering(J, b, bP, inverse = true, exchange = true);
real[int] solT = A'^-1*b;
real[int] solTP;
ChangeNumbering(J, solT, solTP);

could be replaced with something like this?

load "PETSc"
Mat A;
real[int] bP, solP, solTP;
KSPSolve(A, bP, solP);
KSPSolveTranspose(A, bP, solTP);

Thanks!

It is most definitely possible, mostly a matter of copy/pasting the code path of KSPSolveHermitianTranspose(). Would you feel like making a PR for this addition?

1 Like

Thanks! done.

Not quite though. This needs to be in a branch and then you need to create a PR. Furthermore, you must adapt the code to avoid conjugating in the complex case.

Got it. Sorry about the amateurism. New territory for me :slight_smile: