<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px"><div id="yui_3_16_0_ym19_1_1520249852137_84259"><span>Hi Everyone,</span></div><div id="yui_3_16_0_ym19_1_1520249852137_84353"><span id="yui_3_16_0_ym19_1_1520249852137_84354">I hope this is the right medium to post my question as it is related to slepc4py.</span></div><div id="yui_3_16_0_ym19_1_1520249852137_85405"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1520249852137_85406"><span id="yui_3_16_0_ym19_1_1520249852137_85407">I
have just installed slepc4py with complex scaler and I intend to use it
to solve large sparse generalised eigenvalue problems that result from
the stability of flows that can be described by linearised Navier-Stokes
equations. For my problem, </span><span id="yui_3_16_0_ym19_1_1520249852137_85408">Ax
= kBx, matrices A and B are non-Hermitian, B, in particular, is
singular and I am interested in eigenvalue with maximum real part which
could be positive if the flow is unstable or negative for a stable flow.
Following the steps described in exp1.py, I wrote a code for
Non-Hermitian Generalised Eigenvalue problem. I test the code on a
problem that is stable and with known solution using Shift and Invert
transformation with complex shift value and the solution seems okay but I
have the following concerns that I would be grateful if you could
clarify on.</span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1520249852137_85409"><span id="yui_3_16_0_ym19_1_1520249852137_85410"><br id="yui_3_16_0_ym19_1_1520249852137_85411"></span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1520249852137_85412"><span id="yui_3_16_0_ym19_1_1520249852137_85413">(1) </span>If
I used a shift value that is close to the solution (which I already
know for this test problem), the code converge at the correct eigenvalue
but the computed relative error is very large. I was wondering why the
error is large and the implication on my eigenvectors. How can this be
corrected? Below is a typical command line option I entered and the
results I got from solution:</div><div dir="ltr" id="yui_3_16_0_ym19_1_1520249852137_85414"><br id="yui_3_16_0_ym19_1_1520249852137_85415"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1520249852137_85416">python
ComputeEigenValueUsingSlepc4Python.py -eps_nev 1 -eps_tol 1e-10
-st_type sinvert -eps_target -105.01+252.02i -eps_converged_reason
-eps_conv_abs -st_pc_factor_shift_type NONZERO
-st_pc_factor_shift_amount 1e-10.</div><div dir="ltr" id="yui_3_16_0_ym19_1_1520249852137_85417"><br id="yui_3_16_0_ym19_1_1520249852137_85418"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1520249852137_85419">*** SLEPc Solution Results ***<br id="yui_3_16_0_ym19_1_1520249852137_85420"> <br id="yui_3_16_0_ym19_1_1520249852137_85421">Number of iterations of the method: 1<br id="yui_3_16_0_ym19_1_1520249852137_85422">Solution method: krylovschur<br id="yui_3_16_0_ym19_1_1520249852137_85423">Number of requested eigenvalues: 1<br id="yui_3_16_0_ym19_1_1520249852137_85424">Stopping condition: tol=1e-10, maxit=23923<br id="yui_3_16_0_ym19_1_1520249852137_85425">Number of converged eigenpairs 1<br id="yui_3_16_0_ym19_1_1520249852137_85426"> <br id="yui_3_16_0_ym19_1_1520249852137_85427"> k ||Ax-kx||/||kx|| <br id="yui_3_16_0_ym19_1_1520249852137_85428">----------------- ------------------<br id="yui_3_16_0_ym19_1_1520249852137_85429"> -106.296653+251.756509 j 3.64763e+11</div><div dir="ltr" id="yui_3_16_0_ym19_1_1520249852137_85430"><br id="yui_3_16_0_ym19_1_1520249852137_85431"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1520249852137_85432"><div dir="ltr" id="yui_3_16_0_ym19_1_1520249852137_85885">(2)
Since my goal is to use the code to test the stability of flows in
which I have no idea of what the maximum eigenvalue would be, I tried solving
the problem I stated in 1 with different target values that are not
close to the eigenvalue, but it was not successful. The code kept
running for a very long time that I had to cancel it. With a target
value of zero, I had convergence in finite time but to a spurious-like
eigenvalue. Any suggestion on how I could go about getting the true
eigenvalue for my main problem for which I have no idea of what a close
target value to the maximum value would be and considering that matrix B is singular?</div></div><div id="yui_3_16_0_ym19_1_1520249852137_84380"><span id="yui_3_16_0_ym19_1_1520249852137_84354"></span></div><div id="yui_3_16_0_ym19_1_1520249852137_84257"><div id="yui_3_16_0_ym19_1_1520249852137_86925"><br></div><div id="yui_3_16_0_ym19_1_1520249852137_86933">Looking forward to your suggestions.</div><div id="yui_3_16_0_ym19_1_1520249852137_86936"><br></div></div><div class="signature" id="yui_3_16_0_ym19_1_1520249852137_84237"><div id="yui_3_16_0_ym19_1_1520249852137_84258"><font id="yui_3_16_0_ym19_1_1520249852137_86823" size="2">Regards,<br></font></div><div id="yui_3_16_0_ym19_1_1520249852137_84252"><font id="yui_3_16_0_ym19_1_1520249852137_84381" size="2">Habib</font><br><font id="yui_3_16_0_ym19_1_1520249852137_84251" size="2">Department of Chemical Engineering,<br>Ahmadu Bello University, Zaria<br></font><font id="yui_3_16_0_ym19_1_1520249852137_87052" size="2">Samaru Campus, <br></font></div><div style="font-family:arial, helvetica, clean, sans-serif;" id="yui_3_16_0_ym19_1_1520249852137_84392"><div id="yui_3_16_0_ym19_1_1520249852137_86425"><font id="yui_3_16_0_ym19_1_1520249852137_84393" size="2">Kaduna State, Nigeria</font></div><div id="yui_3_16_0_ym19_1_1520249852137_86424"><font id="yui_3_16_0_ym19_1_1520249852137_84393" size="2"><br></font></div></div></div></div></body></html>