[petsc-users] Question regarding the EPSSetDimensions routine

Jose E. Roman jroman at dsic.upv.es
Thu Feb 13 14:53:54 CST 2020


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. 

Jose

> El 13 feb 2020, a las 21:25, baikadi pranay <pranayreddy865 at gmail.com> escribió:
> 
> 
> 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/2e7ed72c/attachment.html>


More information about the petsc-users mailing list