[petsc-users] Calculate determinant in PETSc

Немања Илић (Nemanja Ilic) nemanja.ilic.81 at gmail.com
Wed Jul 28 11:40:26 CDT 2010


Thank you both,

I'll try to do it by LU factoring and pulling out the diagonal values.

Nemanja


On Wednesday 28 July 2010 18:31:12 Barry Smith wrote:
> 
>   The determinant can be computed from the LU factorization of a matrix (http://en.wikipedia.org/wiki/Determinant). We don't have code that can automatically pull out the appropriate values but it shouldn't be too hard to write. If you are running sequentially then you can just use PETS's LU factorization and then access the underlying data structure to pull out the diagonal entries. If you want in parallel you could use MUMPS or SuperLU_Dist() and then pull out the diagonals from their data structure (a bit of work to figure out how to do that).
> 
>    Is this what you are looking for? 
> 
>     Barry
> 
> On Jul 28, 2010, at 10:52 AM, Немања Илић (Nemanja Ilic) wrote:
> 
> > Hello,
> > 
> > Is there an easy way to calculate determinant in PETSc? I thought it could be done with MatNorm(), but I get bad results. Is there another way?
> > 
> > Thank you in advance,
> > Best regards,
> > Nemanja Ilic
> 
> 




More information about the petsc-users mailing list