On 8/25/21 9:37 PM, Anton Ermakov wrote:

 >>> You can do that, but I believe that it's also possible to work with the
original system where one of the two matrices is only semidefinite.

I have redone it with the original system, but it seems that PETSc is complaining about missing diagonal entry.

/[0]PETSC ERROR: Object is in wrong state/

/[0]PETSC ERROR: Matrix is missing diagonal entry 3/

I presume this happens due to a zero block in one (or both) of the original matrices. Hmmm, should I then just explicitly see all zero diagonal values to 0.0.

I don't know whether the error complains about the value missing in the sparsity pattern, or it being zero.

In any case, you might have to read up in the documentation of SLEPC about two issues:

* You can solve Ax = lambda M x or M x = mu A x, where mu=1/lambda. The problem is well posed if one of the two matrices is not singular, but I bet that SLEPc has a convention where it either wants the matrix on the left, or the one on the right to be the non-singular one.

* There is probably a preconditioner involved somewhere. If that preconditioner happens to be something like Jacobi, then it will need to divide by a diagonal entry. You will need to make sure that the matrix that the preconditioner is applied to has nonzero diagonals -- or, alternatively, choose a different preconditioner.

Best
 W.



--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 bange...@colostate.edu
                           www: http://www.math.colostate.edu/~bangerth/

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/7e372c88-5e83-5514-c8f7-e3e9073476b4%40colostate.edu.

Reply via email to