[petsc-users] KrylovSchur solver diverges when setting EPS_GHEP

Jose E. Roman jroman at dsic.upv.es
Tue Nov 25 10:32:52 CST 2014


El 25/11/2014, a las 11:48, Denis Davydov escribió:

> Hi Jose, 
> 
> A follow up question on KrylovSchur solver:
> 
>>> One last thing, if I force EPSSetTrueResidual(eps, PETSC_TRUE)
>>> will that guarantee that  EPSComputeRelativeError() 
>>> will give the norm consistent to that, used internally by all SLEPc solvers?
>> 
>> I would not recommend that, since it is not implemented in all solvers.
>> 
>> I tried with your matrices. In your case, it is much better to compute eigenvalues close to the origin with shift-and-invert, rather than computing smallest_real eigenvalues. That is, replace
>> 
>> -eps_smallest_real
>> 
>> with
>> 
>> -eps_target 0 -st_type sinvert
> 
> 1) I tried forcing -eps_true_residual  (without sinvert) but have only 2 eigenpairs converged.
> Same happens with sinvert around 0.0 you recommended above. 
> I would expect more iterations to be required for convergence rather than the solver diverging completely... 

sinvert should give you more that 2 eigenvalues if you set eps_nev > 2. You may need to increase the number of iterations with eps_max_it

> 
> 2) Another peculiarity is that `-eps_smallest_real` and `-eps_target 0 -st_type sinvert` return different sets of eigenvalues. 

The matrix from the 2D Laplace operator is positive definite, so both should give the same eigenvalues.

> In the latter case there are degenerate eigenvalues. 
> Those are consistent with the results given by ARPACK with shift and invert around 0.
> The matrices I sent you originally correspond to the eigenvalues of the 2D Laplace operator on a uniform mesh with 256 cells.
> If more refined mesh is used (1024 cells instead of 256), same set with degenerate eigenvalues is returned in both cases.
> This is not directly related to SLEPc and is a question out of curiosity.

Some eigenvalues of the 2D Laplacian have multiplicity 2. The default SLEPc solver may not return the two copies of the eigenvalue, because the second copy appears much later and the iteration stops as soon as nev eigenvalues have been computed.

> 
> 3) It is not stated in the documentation explicitly, but I suppose the residual discussed in ‘SolverControl’ section 
> always corresponds to the direct problem (even in case when, say, shift-and-invert is applied) and so 
> EPSComputeRelativeError and EPSComputeResidualNorm?

The convergence criterion is applied to the transformed problem (shift-and-invert).

Jose


> 
> Sincerely,
> Denis
> 



More information about the petsc-users mailing list