[petsc-users] MatCreateSchurComplementPmat to create a Schur complement

Tang, Qi tangqi at msu.edu
Thu Jan 21 01:52:04 CST 2021


Hi,
When I use the MatCreateSchurComplementPmat to create a Schur complement for my own usage, I do not understand the logic when preuse=MAT_INITIAL_MATRIX. If all the matrixes are not empty, the first thing it did is
809:     MatDestroy(Spmat);
So that means I cannot pass in an empty matrix. It works if I first do MatCreate a dummy matrix and then pass in. Is that just some inconsistency or is there something I misunderstood?

Qi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210121/7ad93b9b/attachment.html>


More information about the petsc-users mailing list