- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

**sparse complex**matrix with MKL using C?

Link Copied

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

*=1;*

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Hi,

You can define many rhs in the same way that I described upper and use dss function dss_solve_complex. By the way Y=Y1*inv(Y2)*Y3 seems like Schur complimented. Are you really need to have this matrix or you need to multiply it on some vector only? Ive asked it because inverse of sparse matrix is dense and will calculate really long time. But if you need to multiply matrix Y on some vector only you can do it in next way:

x=Yr=Y1*inv(Y2)*Y3*r;

x1=Y3*r; //calculated by mkl_ccsrgemv

x2= inv(Y2)*x1; //x2 is solution of system Y2*x2=x1, calculated by PARDISO/DSS

x = Y1*x3 // calculated by mkl_ccsrgemv

With best regards,

Alexander Kalinkin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Needless to say, the inverse is no longer sparse, so inverting a sparse matrix is expensive in storage and time, and very inefficient if the aim is to solve a system of equations.

Not necessarily! Of course solving an equation using inverting the coefficient matrix is not a good idea in general, no matter the matrix is sparse or dense or what format has been used, but inversion is really needed in for example electromagnetic analysis and/or graphical calculations. Besides, in many cases, the inversion of a non-singular sparse matrix will still be sparse. Using PARDISO seems to be the only reasonable way, but if the storage of your sparse matrix won't exceed the peak usage of the memory, so it may be better to simply store the data in dense format and invert it.

Good luck,

D.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

HI,

I agree that inverse of sparse matrix could be sparse but PARDISO package doesnt take it into account. Briefly, PARDISO calculate each column of inverse matrix by setting rhs as correspondent column of unit matrix. So size of each column of inverse matrix is N and size of inverse matrix is NxN, where N is size of initial matrix. Hence the size of the matrix is equal to the size of a dense one even though the inverse matrix contains a lot of zeros.

With best regards,

Alexander Kalinkin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

That's true! That's why the output matrix has always been assumed to be dense. However, there are algorithms tailored for inverting sparse matrices that I didn't find in MKL, like Fast Inverse using Nested Dissection (FIND).

Regards,

Dan

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page