[Trilinos-Users] Inverse of a sparse matrix

Heroux, Michael A maherou at sandia.gov
Tue Aug 31 12:47:51 MDT 2010


Martin,

The best way to compute the exact inverse is to solve with the "e_i"
vectors, i=1,...,n where e_i = (0, ..., 0, 1, 0, ..., 0)^T with the "1" in
the ith location.

You could try to solve all RHS simultaneously by forming a MultiVector
object with all e_i vectors, or you could "stripmine" by doing, say 10 RHS
at a time.  Stripmining can make storage savings easier.

I recommend the direct solvers in Amesos since your problem sizes are small.
Amesos can solve multiple simultaneous RHS. You can also use the iterative
methods in Belos, which can also solve multiple simultaneous RHS.

I hope this helps.

Mike

On 8/31/10 1:20 PM, "Martin Vymazal" <martin.vymazal at vki.ac.be> wrote:

> Hello Mike,
> 
>   since it's a little testing code for the moment, I typically have
> 1000 DOF (i.e. the full dense matrix would have 1000x1000 entries). I
> don't think I'll play with meshes bigger than 5000 DOF. For the
> moment, I'm just testing the concept.
> 
>   Martin Vymazal
> 
> Quoting "Heroux, Michael A" <maherou at sandia.gov>:
> 
>> Martin,
>> 
>> How big is your system, typically and at its largest?
>> 
>> Mike
>> 
>> 
>> On 8/31/10 1:03 PM, "Martin Vymazal" <martin.vymazal at vki.ac.be> wrote:
>> 
>>> Hello Mark,
>>> 
>>>   no, I'm not a physicist. My matrix is a discrete representation of
>>> an operator acting between two finite element grids. Wherever I could,
>>> I avoided the inversion by solving Ax=b. Unfortunately, now I really
>>> need the complete inverse.
>>> 
>>>    Best regards,
>>> 
>>>   Martin Vymazal
>>> 
>>> Quoting Mark Hoemmen <mhoemme at sandia.gov>:
>>> 
>>>> On Aug 31, 2010, at 10:47 AM,
>>>> trilinos-users-request at software.sandia.gov wrote:
>>>>> Message: 1
>>>>> Date: Tue, 31 Aug 2010 00:29:43 +0200
>>>>> From: "Martin Vymazal" <martin.vymazal at vki.ac.be>
>>>>> Subject: [Trilinos-Users] Inverse of a sparse matrix?
>>>>> To: trilinos-users at software.sandia.gov
>>>>> Message-ID: <20100831002943.122974kkn7rtlwif at horde.vki.ac.be>
>>>>> Content-Type: text/plain; charset=iso-8859-1; DelSp=Yes; format=flowed
>>>>> 
>>>>> Hello,
>>>>> 
>>>>>  I'm sorry if this question was already answered somewhere, but I
>>>>> searched and didn't find the answer. I'd like to ask what is the best
>>>>> way to compute an inverse of a Epetra__FECrsMatrix. Thank you.
>>>> 
>>>> Are you a physicist, and if so, do you wish to compute specific
>>>> elements of the inverse?  If you are just solving linear systems
>>>> Ax=b, you never want the inverse.  However, some physics
>>>> applications do call for certain elements of the inverse.  If you
>>>> only need, say, the diagonal entries of the inverse, there are less
>>>> computationally expensive ways to do this than to compute the full
>>>> inverse.
>>>> 
>>>> mfh
>>>> _______________________________________________
>>>> Trilinos-Users mailing list
>>>> Trilinos-Users at software.sandia.gov
>>>> http://software.sandia.gov/mailman/listinfo/trilinos-users
>>>> 
>>>> 
>>> 
>>> 
>>> 
>>> ----------------------------------------------------------------
>>> This message was sent using IMP, the Internet Messaging Program.
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> Trilinos-Users mailing list
>>> Trilinos-Users at software.sandia.gov
>>> http://software.sandia.gov/mailman/listinfo/trilinos-users
>> 
>> 
>> 
> 
> 
> 
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
> 
> 
> 
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> http://software.sandia.gov/mailman/listinfo/trilinos-users




More information about the Trilinos-Users mailing list