[petsc-users] Calculate determinant in PETSc

Jed Brown jed at 59A2.org
Wed Jul 28 11:30:10 CDT 2010


On Wed, 28 Jul 2010 17:52:59 +0200, "=?utf-8?b?0J3QtdC80LDRmtCwINCY0LvQuNGb?= (Nemanja Ilic)" <nemanja.ilic.81 at gmail.com> 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?

The standard way, as for dense matrices, is to compute an LU
decomposition and look at diagonal of your factor.  There are other ways
to approximate it, for example, see this talk

  http://www4.ncsu.edu/~ipsen/ps/slides_iwasep.pdf

or perhaps this method using sparse approximate inverses.

  http://arxiv.org/abs/hep-lat/0008007

Ask here if you need advice for implementing any of these methods.

Jed


More information about the petsc-users mailing list