[petsc-users] MatCreateSchurComplementPmat to create a Schur complement

Tang, Qi tangqi at msu.edu
Thu Jan 21 13:13:15 CST 2021


Thanks, Matt. That works now.
________________________________
From: Matthew Knepley <knepley at gmail.com>
Sent: Thursday, January 21, 2021 9:29 AM
To: Tang, Qi <tangqi at msu.edu>
Cc: PETSc users list <petsc-users at mcs.anl.gov>
Subject: Re: [petsc-users] MatCreateSchurComplementPmat to create a Schur complement

On Thu, Jan 21, 2021 at 2:52 AM Tang, Qi <tangqi at msu.edu<mailto:tangqi at msu.edu>> wrote:
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?

Yes, it wants you to pass &Sp with Sp == NULL. Sorry this is not more clear.

  Thanks,

     Matt

Qi


--
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/<https://urldefense.com/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!HXCxUKc!lWaU4FwF3eBzTZ6qZtDUmi6NM1nfH1fzSJezBU0TRxqwDaxq75KMAgaW8hpk_g$>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210121/6883d8fb/attachment.html>


More information about the petsc-users mailing list