[petsc-users] set shift while not setting target

Jose E. Roman jroman at dsic.upv.es
Sun Jan 18 10:49:49 CST 2015


El 18/01/2015, a las 14:14, Denis Davydov escribió:

> Dear all, 
> 
> What is the expected behaviour when a user set shift value via STSetShift() with shift or shift-and-invert transformations, 
> but ignores setting target via EPSSetTarget ? 
> 
> From the Table 2.2 (chapter 2.3), it seems that Target are used only in conjunction with EPS_TARGET_XXX of EPSWhich. 
> Even though it is written in chapter 3.3 that "In all transformations except STSHIFT, there is a direct connection between the target τ (described in §2.3) and the shift σ, as will be discussed below.”
> it does not look like the absence of EPSSetTarget call would affect solution with ST objects. 
> At least that is my experience so far at least with Slepc 3.5.3.
> 
> p.s. Of course, there is a logical connecting, namely one obtains eigenvalues near the shift value. 
> p.p.s. I am solving GHEP for EPS_SMALLEST_REAL.
> 
> Kind regards,
> Denis 
> 

STSetShift() is a remnant of the old interface, before the target was introduced. The intended usage for the application is to use a target (set with EPSSetTarget) in combination with EPS_TARGET_XXX. STSetShift() could be used for the case that the target coincides with an eigenvalue (to avoid solving a singular system).

When you set the target in shift-and-invert, two things happen: (1) the shift is set to the target and (2) eigenvalue approximations are sorted with respect to the target. The latter may be important for convergence. So it is recommended to set the target, not the shift.

For STSHIFT, the shift is irrelevant because Krylov subspaces are shift invariant. But non-Krylov solvers may depend on the shift.

For a GHEP, if you know where your eigenvalues are, use shift-and-invert with a target and EPS_TARGET_XXX.

Jose



More information about the petsc-users mailing list