Yes, you are probably right: My code is not yet bug free (by all means!). However, I have been working very hard on it and I will see if I find something. B should not ever be really singular!
I do, however, still have some questions: - Does slepc detect whether my matrix is tridiagonal and does it apply a direct method to solve it? Or do you talk about it in general: that it would be better for me to use a direct method that is not part of slepc? - How do I make use of the information that both A and B have the same non-zero structure? Is there an easy way? - What is the call "MatSetOption(mat,MAT_HERMITIAN,PETSC_TRUE,ierr)" do? Is it important? It does not seem to influence anything... Thank you for your time and pacience! Toon On 19 August 2014 15:40, Jed Brown <[email protected]> wrote: > Toon Weyens <[email protected]> writes: > > > Okay I reread again your answers and it seems that I missed the fact > that I > > do not need shift invert to find the EV with the largest real part? > > Correct, inversion is way more expensive and used to find internal > eigenvalues. > > > Then the "trick" of ex. 13 does not apply (they look for something > > close to 0). So what could I do to avoid the LU? > > Is your matrix B singular? What are its boundary conditions? You have > to solve with B for the generalized eigenvalue problem. That could be > done iteratively, but a direct solve makes sense for a tridiagonal > system and the zero pivot likely indicates a deeper issue with the > formulation that won't vanish simply by avoiding LU. >
