# How can I find the inverse of a sparse matrix

 Register Blogs Members List Search Today's Posts Mark Forums Read

 January 18, 2014, 18:10 How can I find the inverse of a sparse matrix #1 Senior Member   Join Date: Jun 2011 Posts: 151 Rep Power: 7 I have a matrix n*n and I want to find its inverse. the matrix is not a 3 diagonal matrix (lower-upper- diagonal)and therefor I can not use the lduMatrix any help will be appreciated

 January 19, 2014, 11:47 #2 Super Moderator   Bruno Santos Join Date: Mar 2009 Location: Lisbon, Portugal Posts: 9,658 Blog Entries: 39 Rep Power: 99 Hi mechy, I'm just dropping by to help future readers on where you found part of the solution to your problem and a link to another thread that is on a related topic: Best regards, Bruno

January 19, 2014, 22:29
#3
Senior Member

Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 581
Rep Power: 20
Quote:
 the matrix is not a 3 diagonal matrix (lower-upper- diagonal)and therefor I can not use the lduMatrix
This is an incorrect assumption. lduMatrix can be used to represent a sparse matrix with any pattern**, not just 3 diagonals like you are assuming. The whole idea of the lduSolvers (preconditioned conjugate gradient, preconditioned bi-conjugate gradient, etc.) is to find the inverse of a sparse matrix, and also one of the key components of implicit finite volume methods. Your choice of algorithms depends on the system characteristics (mainly symmetric or asymmetric A, as in Ax=b ). The following threads may get you started at least with the storage format

If you want to look into the actual methods, i would look at the book "iterative methods for sparse linear systems" and the paper "An introduction to the conjugate gradient method without the agonizing pain". Good luck.

**much like CSR, CSC, ELL, and others...but some are better suited for certain sparse patterns
__________________
Dan

Last edited by chegdan; January 20, 2014 at 11:15. Reason: added some links

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post AndrewMortimer OpenFOAM Running, Solving & CFD 12 August 7, 2015 18:45 sina_mech Main CFD Forum 7 November 20, 2009 14:52 Sathe Main CFD Forum 5 May 15, 2002 16:01 ahmed mobarki Main CFD Forum 3 August 30, 2000 22:06 Yangang Bao Main CFD Forum 1 October 25, 1999 04:22

All times are GMT -4. The time now is 07:58.