[petsc-users] KrylovSchur solver diverges when setting EPS_GHEP

Denis Davydov davydden at gmail.com
Tue Nov 25 04:48:01 CST 2014


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... 

2) Another peculiarity is that `-eps_smallest_real` and `-eps_target 0 -st_type sinvert` return different sets of 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.

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?

Sincerely,
Denis



More information about the petsc-users mailing list