Petsc And Slepc, singular system

Jose E. Roman jroman at
Tue Jul 21 17:01:43 CDT 2009

If your eigenproblem is K x = lambda M x and you are solving it as  
K^-1 M x = 1/lambda x (with shift-and-invert with shift=0 in SLEPc),  
then if a basis of the nullspace of K is known (rigid-body modes) you  
can use EPSAttachDeflationSpace. That will make SLEPc automatically do  
KSPSetNullSpace in the underlying KSP object.


On 21/07/2009, Barry Smith wrote:

>   See the manual page for MatNullSpaceCreate() and KSPSetNullSpace()
>   Barry
> On Jul 21, 2009, at 4:24 PM, Matthew Knepley wrote:
>> On Tue, Jul 21, 2009 at 4:09 PM, Umut Tabak <u.tabak at>  
>> wrote:
>> On Tue, Jul 21, 2009 at 03:56:11PM -0500, Matthew Knepley wrote:
>> > If your system is badly scaled, roundoff errors could result in a  
>> pivot
>> > larger than our tolerance. It is also possible that your  
>> preconditioner
>> > resulted in a badly scaled system.
>> >
>> >    Matt
>> >
>> Hi,
>>   Thanks for the fast reply.
>>   since the system is singular condition number will be bad any way,
>>   but I was wondering if there were already ways to overcome this
>>   problem. And are there ways to prevent the preconditioner to give a
>>   badly scaled system, what I mean is that the system is singular so
>>   will preconditioning improve that? I definitely read about these.
>> Well, the default is ILU which can do horrendously things. Try  
>> running with
>> Jacobi as a test. It should fail like you want. In my opinion,  
>> blackbox PCs
>> almost never work, and what you really need is something tailored  
>> to your
>> problem (which is linear algebra heresy).
>>  Matt
>>   Thanks and best,
>>   Umut

More information about the petsc-users mailing list