# Is it possible to set PCD preconditioner within schurPreconditioner

**URL:** <https://community.freefem.org/t/is-it-possible-to-set-pcd-preconditioner-within-schurpreconditioner/4230>\
**Category:** General Discussion\
**Created:** [February 26, 2026, 3:10pm UTC](https://community.freefem.org/t/is-it-possible-to-set-pcd-preconditioner-within-schurpreconditioner/4230 "2026-02-26T15:10:31Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![zxss](https://avatars.discourse-cdn.com/v4/letter/z/bc8723/32.png) [@zxss](https://community.freefem.org/u/zxss)\
**Post date:** [February 27, 2026, 1:14pm UTC](https://community.freefem.org/t/is-it-possible-to-set-pcd-preconditioner-within-schurpreconditioner/4230/3 "2026-02-27T13:14:05Z")

</div>

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](https://community.freefem.org/t/resolvent-operator-with-ff-petsc-matmatsolve/1603/13) that we can set a Mat from a function, e.g.

```auto
    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`?

---

_[View the full topic](https://community.freefem.org/t/is-it-possible-to-set-pcd-preconditioner-within-schurpreconditioner/4230)._
