[petsc-users] Yet another inversion question

Barry Smith bsmith at mcs.anl.gov
Sat May 1 17:00:22 CDT 2010


On May 1, 2010, at 3:59 PM, Umut Tabak wrote:

> Jed Brown wrote:
>> You say that both A and B are sparse, what are you going to do with  
>> the
>> product C = A^{-1} B?  The most common thing is to apply it to some
>> vectors or perhaps compute a few eigen/singular values/vectors.  You
>> rarely need an explicit representation of the product to do such  
>> things.
>>
>>
> Dear Barry and Jed,
>
> Thanks for the swift replies.
>
> Barry,
>
> that goes really slower than what I tried. That is not the way to go  
> I suppose.

    This cannot be! Perhaps you used the PETSc default solver for my  
suggestion but UMFPACK for your version? With a direct solve "all" the  
work will be in the factorization and triangular solves so if you use  
UMFPACK for both they both do the same amount of work.

   Barry


>
> Jed,
>
> I have some kind of a symmetrization(or call transformation) matrix  
> for symmetrizing an unsymmetric problem. I need these terms in this  
> explicit symmetrization matrix. I guess this is also a rare case. I  
> could not device an analytical expression to get rid of these kinds  
> of terms yet. That is why I try different approaches, not with high  
> expectations though.
>> It is extremely unlikely that C is symmetric.
>>
>>
> Yep, you are right ;)
>> This will work, you could also use the lower level interface to  
>> factor
>> A, MatConvert() B to MATDENSE, then MatMatSolve() the result.
>> Internally this will do something very similar to what you have  
>> already
>> done, it's questionable whether it would actually be faster (it will
>> certainly use more memory).
>>
> I will see what this does.
>
> Thanks and best,
> Umut



More information about the petsc-users mailing list