Showing results for

- Intel Community
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
- Storing Tri-diagonal matrix in coo or csr format.

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

Highlighted
##

elmeliegy__abdelrahm

Beginner

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

05-06-2018
12:14 PM

17 Views

Storing Tri-diagonal matrix in coo or csr format.

Hi,

Is there any function/method to store the tridiagonal matrix in csr or coo format.

4 Replies

Highlighted
##

mecej4

Black Belt

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

05-06-2018
01:08 PM

17 Views

This is so trivial that there is no need to write a routine to do it. For a matrix of size n, all you need to do is to set

IA = [1, 3, 6, 9, ..., 3n-3; 3n-1]

JA = [1,2, 3,4,5, 6,7,8, ,...,3n-3, 3n-2]

and A to the 3n-2 values, arranged by rows.

Furthermore, why do you want to use the more general CSR representation for a tridiagonal matrix?

Highlighted
##

elmeliegy__abdelrahm

Beginner

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

05-06-2018
01:19 PM

17 Views

Thank you

I am going to assemble the tridiagonal matrix into csr/coo format and then use PARDISO linear solver routines.

Highlighted
##

mecej4

Black Belt

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

05-06-2018
07:52 PM

17 Views

elmeliegy, abdelrahman wrote:

I am going to assemble the tridiagonal matrix into csr/coo format and then use PARDISO linear solver routines.

Why do that? That would be wasted effort, since the "Thomas Algorithm" for solving tridiagonal equations can be coded in 10 to 20 lines of code.

Highlighted
##

I am upgrading an old FE code and i am going to set the solver as PARDISO. So, i need to convert all assembly format to the csr format.

elmeliegy__abdelrahm

Beginner

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

05-07-2018
01:36 PM

17 Views

For more complete information about compiler optimizations, see our Optimization Notice.