Thanks, Matt. That works now. ________________________________ From: Matthew Knepley <[email protected]> Sent: Thursday, January 21, 2021 9:29 AM To: Tang, Qi <[email protected]> Cc: PETSc users list <[email protected]> Subject: Re: [petsc-users] MatCreateSchurComplementPmat to create a Schur complement
On Thu, Jan 21, 2021 at 2:52 AM Tang, Qi <[email protected]<mailto:[email protected]>> 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$>
