From: John P. <jwp...@gm...> - 2018-08-12 21:23:13
|
On Wed, Aug 8, 2018 at 3:51 AM, Barna Becsek <bar...@gm...> wrote: > Hello, > > is there a way to compute a SparseMatrix’s determinant? I would like to > solve a linear system but my final residual always equals exactly 0 after > just one iteration (where the solve terminates). Hence, I would like to > check the matrix for singularity. > If you are using PETSc, for a small enough problem you could run with the "-pc_type svd -pc_svd_monitor" command line options and look at the singular values. If any of them are zero or nearly zero, the system is singular. -- John |