Thank you for your answers.

First, I was wrong when telling that having empty rows is working for LU solver: after verification, it is the exact opposite: it does not work for MUMPS.

We have a nightly test that solve that kind of matrix with a gmres+jacobi combination and it works well...

Second, since LU solvers are interesting to use as the solvers for the coarsest level in a PCGAMG for example, we still have to give a non-zero for all the diagonal...

So my solution will be to add it anyway... :)

Thanks again,

Eric


On 22/11/17 11:26 AM, Matthew Knepley wrote:
On Wed, Nov 22, 2017 at 11:13 AM, Eric Chamberland <[email protected] <mailto:[email protected]>> wrote:

    Hi,

    I have 2 questions:

    First, I am looking for a function that is almost like
    MatMissingDiagonal, but that would return me *all* missing diagonal
    entries.

    Does it exists?


No

    If not, is there another way of doing this?


Not a nice way, unfortunately. It is fairly dependent on the implementation. You could call GetRow() for every row and check.



    Second: after searching through Petsc list, I found this that upset
    me a bit:

    https://www.mail-archive.com/[email protected]/msg22867.html
    <https://www.mail-archive.com/[email protected]/msg22867.html>

so maybe I should modify our code to be fully compliant with this? I have some examples (MUMPS) that are working without diagonal
    entries but I didn't tried other PCs or KSPs...


We use the diagonal frequently, for instance in the factorization PCs. I am guessing we put in the diagonal when converting to the MUMPS format.

   Thanks,

     Matt

    Thanks,

    Eric




--
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/ <http://www.caam.rice.edu/~mk51/>

Reply via email to