Actually no point
, I just wonder if it’s possible to set an approximate schur complement (take PCD as an example) without the block structure .
Sorry to disturb you again, I learnt from this post Resolvent operator with FF/PETSc (MatMatSolve?) - #13 by cmd that we can set a Mat from a function, e.g.
func real[int] PCD(real[int]& in) {
real[int] out;
KSPSolve(dAp, in, out);
MatMult(dFp, out, in);
KSPSolve(dMp, in, out);
out *= -1.0;
return out;
}
Mat S(dAp,PCD);
But the input of schurPreconditioner should be a matrix format, I wonder if it is possible to convert from Mat to matrix?