CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Main CFD Forum (
-   -   Inverse of a matrix (

Sathe April 29, 2002 17:54

Inverse of a matrix
Hi all, I want to find the inverse of a matrix which will be diagonal for most part of it and blocked in the rest. Does anyone know any LAPACK routine or a numerical recipe to find this inverse. Sunil.

Sebastien Perron April 29, 2002 20:02

Re: Inverse of a matrix
Why do you want to find the inverse of your matrice?

The work to be done is of the same order as solving it with the gauss-jordan algorithm. Furthermore, the exact inverse will be possibly full.

Paul April 30, 2002 01:53

Re: Inverse of a matrix
There are many subroutines in for the inversion of different types of matrix. Try to find one fitting your matrix. Good luck!

Sathe April 30, 2002 10:20

Re: Inverse of a matrix
I have to find the inverse of this matrix because I want to use the inverse as a preconditioner for solving another linear equation system. I therefore need the exact inverse. The exact inverse should not be fully populated because the matrix is mostly diagonal and is blocked diagonal else where. So do you know any storage scheme and inversion algorithm for such a matrix?

Sebastien Perron April 30, 2002 19:14

Re: Inverse of a matrix
As Paul said, try looking for a free code in But I have some advices:

1) The inverse of a matrice is unique. Hence, the inverse you will be computing for a system won't apply to the other systems.

2) Be careful with preconditioners, they can have a bad effect on the condittioning of your system. The only one that works everytime is the diagonal preconditioner for weakly or strongly diagonal systems..

ananda himansu May 15, 2002 16:01

Re: Inverse of a matrix
generally, you do not need to explicitly know the inverse of a matrix in order to use it as a preconditioner. usually, a knowledge of its LU decomposition is sufficient. usually, you need only to invert the ACTION of the matrix on an unknown vector, for which purpose the LU decomposition is sufficient. the L and U matrices are not as full as the inverse may be.

All times are GMT -4. The time now is 06:12.