CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   Is there any efficient algorithm to compute the determinant of a sparse matrix? (http://www.cfd-online.com/Forums/main/104973-there-any-efficient-algorithm-compute-determinant-sparse-matrix.html)

 HectorRedal July 19, 2012 15:42

Is there any efficient algorithm to compute the determinant of a sparse matrix?

Hello,

I would like to know if there is any efficient way to compute the determinant of an sparse matrix?

Kind regards,
Hector.

 ztdep July 20, 2012 00:36

LU decomposition for the sparse decomposition. the determinant can be abtained by sum the digonal of mattrix.

 HectorRedal July 20, 2012 06:35

Quote:
 Originally Posted by ztdep (Post 372509) LU decomposition for the sparse decomposition. the determinant can be abtained by sum the digonal of mattrix.
Hi Ztdep,

One more question: Do you know where I can find LU decomposition for sparse matrix (article, reference)?

Best regards,
Hector.

 ztdep July 20, 2012 06:55

http://www.cise.ufl.edu/research/sparse/CSparse/

if your matrix dimension is not very large, i think we can use the traditional computational method to compute it.

 arjun July 20, 2012 07:09

Quote:
 Originally Posted by HectorRedal (Post 372563) Hi Ztdep, Thanks for your response. One more question: Do you know where I can find LU decomposition for sparse matrix (article, reference)? Best regards, Hector.

One good book that also provides source code (i think).

Remember that LU factorization for sparse matrix may not be that sparse. Whether ILU is sufficient for your need or not is what shall think.

 ztdep July 20, 2012 08:53

no ilu is incomplete lu , it is an approximation.

try to use lapack

http://www.netlib.org/lapack/double/dgetrf.f
* DGETRF computes an LU factorization of a general M-by-N matrix A
* using partial pivoting with row interchanges.

 arjun July 20, 2012 09:00

Quote:
 Originally Posted by ztdep (Post 372585) no ilu is incomplete lu , it is an approximation. http://people.sc.fsu.edu/~jburkardt/index.htmlffff

I am pretty sure what ILU is. I am also sure that calculating LU from sparse matrix is not efficient thing to do. Thats why I said think if ILU is sufficient for the needs.

 HectorRedal July 21, 2012 03:26

Quote:
 Originally Posted by ztdep (Post 372568) http://www.cise.ufl.edu/research/sparse/CSparse/ what is your matrix dimension? if your matrix dimension is not very large, i think we can use the traditional computational method to compute it.
Hi ztdep,

Thank you very much for the information you had provided to me. This is by far more than I needed. Thanks.

The matrix dimension for the LU decompostion varies from 2 to 10. This is the range I need.

I am developing a software for CFD using the finite element method, and for calculating the element matrices for the algorithm, I need the determinant of this matrices.

As mentioned before, I am thinking of using the LU decomposition for calculation of the determinant.

 HectorRedal July 21, 2012 03:44

Quote:
 Originally Posted by arjun (Post 372571) http://books.google.de/books/about/D...EC&redir_esc=y One good book that also provides source code (i think). Remember that LU factorization for sparse matrix may not be that sparse. Whether ILU is sufficient for your need or not is what shall think.
Hello Arjun,

Thanks for the information.
I agree with you that LU factorization may not be an sparse matrix.
The need for LU factorization is to compute the determinant of the sparse matrix.
That's the reason why I need it. Maybe, as you state, it is sufficient to compute the iLU for estimation of the determinant.
This is a good point to think about.

Thanks again.

 All times are GMT -4. The time now is 01:45.