<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr">For nev=10 you are using a subspace of size 20. This may be too small. Check convergence with a monitor and increase ncv if necessary. </div><div dir="ltr"><br></div><div dir="ltr">Jose</div><div dir="ltr"><br><blockquote type="cite">El 13 feb 2020, a las 21:25, baikadi pranay <pranayreddy865@gmail.com> escribió:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr">Hello PETSc Users,<br><br>I am trying to find the lowest 'n' eigenvalues of a hermitian eigenvalue problem. The size of the operator matrix (hamiltonian in my case) is dependent on the mesh spacing provided by the user (which is expected). However I have the following issue:<br><br><div>The number of eigenvalues given by the solver is not consistent with what is given as input in the EPSSetDimensions routine. For example, for a 12000x12000 matrix, the solver gives 20 correct eigenvalues if nev=20, but fails to give any eigenvalue if nev=10.<br><br>I am using the following lines of code to solve the problem:<br><br></div><div><i>call <b>EPSCreate</b>(PETSC_COMM_WORLD,eps,ierr)<br></i></div><div><i>call <b>EPSSetOperators</b>(eps,ham,PETSC_NULL_MAT,ierr)<br>call <b>EPSSetProblemType</b>(eps,EPS_HEP,ierr)<br>call <b>EPSSetWhichEigenpairs</b>(eps,EPS_SMALLEST_MAGNITUDE,ierr)<br>call <b>EPSSetDimensions</b>(eps,n_sub,n_sub*2,PETSC_DEFAULT_INTEGER,ierr)</i></div><div><i>call<b> EPSSetTolerances</b>(eps,1D-10,5000,ierr)<br>call<b> EPSSolve</b>(eps,ierr)<br></i></div><div><br>After the EPSSolve, I am calling EPSGetEigenPair and other relevant routines to get the eigenvector and eigenvalues.<br><br>Any lead as to how to solve this problem would be greatly helpful to us. Please let me know if I need to provide any further information.<br><br>Thank you for your time.<br><br>Sincerely,<br>Pranay.</div><div><br></div></div>
</div></blockquote></body></html>