[petsc-users] approximating null space of matrix

Manav Bhatia bhatiamanav at gmail.com
Sun Mar 26 11:25:44 CDT 2017


Thanks Jose! 

What would be a good way to calculate null space of A^2? Would I need to create a shell matrix for A^2 and define matrix-vector products on this? 

-Manav


> On Mar 26, 2017, at 2:56 AM, Jose E. Roman <jroman at dsic.upv.es> wrote:
> 
> 
>> El 26 mar 2017, a las 5:17, Manav Bhatia <bhatiamanav at gmail.com> escribió:
>> 
>> Hi, 
>> 
>>  I am working on some continuation problems and need to approximate the null space of a matrix for bifurcation and branch switching. 
>> 
>>  Are there algorithms available in Petsc to do this? Can Slepc be used to calculate the null space of a matrix? I guess the eigenvectors corresponding to zero eigenvalues would serve this purpose? Literature is pointing me in the direction of more elaborate Moore-Spence algorithms. I am not sure why an eigensolver cannot be used for this purpose. 
>> 
>>   Any guidance would be greatly appreciated. 
>> 
>> Thanks,
>> Manav
>> 
> 
> You can use SLEPc to compute null space vectors, but some care must be taken.
> 
> You can do simple tests with ex11.c:
> http://slepc.upv.es/documentation/current/src/eps/examples/tutorials/ex11.c.html
> This example deflates the null space, but you can comment out the call to EPSSetDeflationSpace() and then the zero eigenvalue will be computed explicitly.
> 
> The first comment is that the default convergence criterion is relative to the eigenvalue, which is obvioulsy bad for the zero eigenvalue. So you should switch to the absolute convergence criterion: -eps_conv_abs
> 
> The above should work for a semi-definite matrix. If the matrix is indefinite then computing the null space will be more difficult. In this case, I would try computing the null space of A^2.
> 
> Finally, if the size of the null space is large, then the solver might have more difficulties. If this happens, try reducing the tolerance or deactivating locking: -eps_krylovschur_locking 0
> 
> Jose



More information about the petsc-users mailing list