dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #22263
Re: Using SLEPcEigenSolver with shift-invert
Hi Marie,
On Wed, Mar 23, 2011 at 6:01 PM, Marie E. Rognes <meg@xxxxxxxxx> wrote:
> On 03/23/2011 04:44 PM, Neilen Marais wrote:
>>
> I'm not quite sure if I fully understand what your exact question is,
Just to be clear, the eigen spectrum (using exact math) for a lossless
EM vector wave eqn discretised using Nedelec elements will be real,
and in ascending order
0, 0, 0, 0, ......, mode1_cutoffwavenumber, mode2_cutoffwavenumber, .....
The first zero eigenvalue should be the physical static solution. The
other zero eigenvalues are non-physical, and are artefacts of the
discretisation used. The modeX_cutoffwavenumber values starting from
the smallest is usually what is of practical interest. Numerically the
zero eigenvalues usually show up as ~1e-14 or so.
> but using shift-and-invert with a given shift should give you the eigenvalues
> closest to that shift. The zero eigenvalues seem to be closer to your given
> shift than the others eigenvalues, so the fact that you are getting those is
> perhaps not so strange?
Well, for one I'd expect the ARPACK and SLEPc Arnoldi methods to
produce the same results, since the AR in ARPACK stands for Arnoldi :)
Taking your suggestion to heart, I did however play around with other
shifts. If I use a shift value of 0.03 which is very close the the
smallest non-zero eigenvalue (~0.03056), I still get similar results.
I.e. ARPACK gives only physical eigen values, SLEPc first gives a
number of ~0 eigenvalues.
Upon reading my old code that used ARPACK closely I realised that one
should actually ask for the largest real spectrum (the default for the
scipy ARPACK wrapper). The way I understand shift-invert, this
transforms the original eigenvalues to be 1/(original_eig-sigma) in
the shifted spectrum. This means that the eigen values smaller than
sigma should be negative and therefore shifted far away from "largest
real", while eigen values closest to sigma will have big values in the
shifted spectrum. Alas, doing
esolver.parameters["spectrum"] = "largest real"
results in the largest eigenvalus in the real spectrum, not the
shifted spectrum. This is not what I would like to calculate.
In any case, I would appreciate a recipe for getting the same results
with as ARPACK with a dolfin builtin solver :)
Best regards
Neilen
>
> --
> Marie
>
>
Follow ups
References