[petsc-users] Question regarding the EPSSetDimensions routine

Jose E. Roman jroman at dsic.upv.es
Thu Feb 13 15:17:20 CST 2020


I mean run with -eps_monitor (see section 2.5.3) and you will see if residuals are decreasing. Either increase the maximum number of iterations or the size of the subspace.


> El 13 feb 2020, a las 22:03, baikadi pranay <pranayreddy865 at gmail.com> escribió:
> 
> Thank you Jose for the reply. 
> 
> If I set PETSC_DEFAULT_INTEGER for ncv as suggested in the EPSSetDimensions documentation, I am still running into the same problem. Also, could you elaborate on what you mean by checking convergence with a monitor. Do you mean comparing the eigenvalues for ith and (i+1)th iterations and plotting the difference to see convergence?
> 
> Sincerely,
> Pranay.
>> 
> On Thu, Feb 13, 2020 at 1:54 PM Jose E. Roman <jroman at dsic.upv.es> wrote:
> 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.
>> 



More information about the petsc-users mailing list