[petsc-users] Question regarding the EPSSetDimensions routine

baikadi pranay pranayreddy865 at gmail.com
Thu Feb 13 14:23:33 CST 2020


Hello PETSc Users,

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:

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.

I am using the following lines of code to solve the problem:


*call EPSCreate(PETSC_COMM_WORLD,eps,ierr)*



*call EPSSetOperators(eps,ham,PETSC_NULL_MAT,ierr)call
EPSSetProblemType(eps,EPS_HEP,ierr)call
EPSSetWhichEigenpairs(eps,EPS_SMALLEST_MAGNITUDE,ierr)call
EPSSetDimensions(eps,n_sub,n_sub*2,PETSC_DEFAULT_INTEGER,ierr)*


*call EPSSetTolerances(eps,1D-10,5000,ierr)call EPSSolve(eps,ierr)*

After the EPSSolve, I am calling EPSGetEigenPair and other relevant
routines to get the eigenvector and eigenvalues.

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.

Thank you for your time.

Sincerely,
Pranay.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200213/6ea9f4d5/attachment.html>


More information about the petsc-users mailing list