matrix inverse and multiplication

Barry Smith bsmith at mcs.anl.gov
Sat Oct 4 18:11:16 CDT 2008


    In petsc-dev http://www-unix.mcs.anl.gov/petsc/petsc-as/developers/index.html 
  use MatMatSolve() after
doing a MatLUFactorNumeric().

    C will always be dense, hence you input for B a SeqDense matrix,  
not a sparse matrix. A can be sparse.

    Barry

On Oct 4, 2008, at 5:58 PM, Manav Bhatia wrote:

> Hi
>
>   I have a problem with two sparse matrices: A and B where I need to  
> calculate the following:
>
> C = A^{-1} B
>
>   What is the best way to do this? Is there a better way to do it  
> than to calculate the columns of C by a linear solution with  
> individual columns of B as rhs vectors?
>
>   Also, is it possible to have a-priori knowledge of sparsity  
> pattern of C for two sparse matrices A and B?
>
> Regards,
> Manav
>
>




More information about the petsc-users mailing list