Finding the zero space of a large sparse matrix in MATLAB

During the finite-difference discretization of the elliptic equation and the application of Neumann BC from all sides of the 2D region, I have a large sparse matrix. I need to find a zero space for its transposition to ensure compliance with the condition of consistency on both sides. For the 50X50 and 100X100 computing areas, I can do this with 32 GB of available RAM in Mathematica and MATLAB with the full matrix commands NullSpace and null available, respectively.

If the computing area is 500X250 (which is equal to the order of what I would have) RAM, the storage matrix needed for the storage size (500X250) X (500X250) is 125 GB and is extremely forbidden. I use sparse matrices to store this supermatrix, and I no longer have space limitations. But I can not use the "null" command for this, since it is only for full matrices. MATLAB suggests using the "SVDS" command for sparse matrices. SVDS (A) gives only the first 6 singular values ​​and singular vectors. another SVDS command (A, k, sigma), which gives the "k" singular values ​​and vectors around the scalar singular value of the "sigma". When I use sigma = 0 to find a singular vector corresponding to the value "zero", which would be a vector from zero space, I get an error that the "sigma" is too close to the eigenvalue of the matrix.

My matrix is ​​singular and, therefore, one of its eigenvalues ​​is zero. How to get around this error? Or is there a better way to do this using the tools available. I have both MATLAB and Mathematica.

Thanks in advance for your help and suggestions.

Best Trinath

+4
source share
1 answer

I think you can try with some kind of decomposition.

http://www.mathworks.co.uk/matlabcentral/fileexchange/11120-null-space-of-a-sparse-matrix

Have you tried this?

Or maybe this?

http://www.mathworks.co.uk/matlabcentral/newsreader/view_thread/249467

I am sure that they should work, but I have not tried them myself. Another way to continue is to get into a QR decomposition (which will give you a permutation of the first k independent columns if k is the rank of your matrix. Then the vectors from k + 1 to n will serve as the basis for your zero space).

Hope this helps.

Greetings

GL

+1
source

Source: https://habr.com/ru/post/1499358/


All Articles