[petsc-dev] any way to detect if a matrix is singular?

Kong, Fande fande.kong at inl.gov
Tue Oct 10 12:20:44 CDT 2017


Thanks, Hong and Matt,

I think the matrix is singular.  I will be checking the implementation.

Fande,

On Tue, Oct 10, 2017 at 8:57 AM, Hong <hzhang at mcs.anl.gov> wrote:

> Fande,
> '-pc_factor_shift_amount 1' is huge.
> Try use petsc default shift amount '1.e-14' by
>  '-pc_factor_shift_type  nonzero' only.
>
> Hong
>
> On Tue, Oct 10, 2017 at 9:40 AM, Matthew Knepley <knepley at gmail.com>
> wrote:
>
>> On Tue, Oct 10, 2017 at 10:36 AM, Kong, Fande <fande.kong at inl.gov> wrote:
>>
>>> Hi Developers,
>>>
>>> I am trying to use the native LU in PETSc to compute a matrix (arising
>>> from a fluid-structure interaction problem). I encounter a zero pivot. The
>>> matrix gives the wrong Newton direction when using "-pc_factor_shift_type
>>>  nonzero -pc_factor_shift_amount 1".  I hence guess the matrix is
>>> singular.
>>>
>>> Any easy way to detect if or not the matrix is singular??
>>>
>>
>> That is the easiest way, namely having LU fail. You can catch the failure
>> and do something useful.
>>
>>   Matt
>>
>>
>>> Fande,
>>>
>>
>>
>>
>> --
>> 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.proofpoint.com/v2/url?u=http-3A__www.caam.rice.edu_-7Emk51_&d=DwMFaQ&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=DUUt3SRGI0_JgtNaS3udV68GRkgV4ts7XKfj2opmiCY&m=OzufXo0CFDWCGheboXxUMvKt3soawuoLxqtBqJtH4tc&s=50QybFKpScUhuVT0fSUA4vPnZJrmTUdY0BKJlNOBCS4&e=>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20171010/446e152c/attachment.html>


More information about the petsc-dev mailing list