Using SLEPc PEPLinear

Issue #14 resolved
Claire Lestringant created an issue

Hi,

I'm new using SLEPc via slepc4py interface (so maybe I am missing something, thank you in advance for your corrections). I try to solve a quadratic eigenvalue problem with PEP solver 'linear' (explicit linearization) via following code :

E = SLEPc.PEP().create()
E.setOperators([K,G,M])
E.setType('linear')
E.setProblemType(2)
E.solve()

And I get the following error :

File "PEP.pyx", line 540, in slepc4py.SLEPc.PEP.solve (src/slepc4py.SLEPc.c:34248)
petsc4py.PETSc.Error: error code 1
[0] PEPSolve() line 82 in .../slepc-3.5/src/pep/interface/pepsolve.c
[0] PEPSetUp() line 105 in .../slepc-3.5/src/pep/interface/pepsetup.c
[0] PEPSetUp_Linear() line 152 in .../slepc-3.5/src/pep/impls/linear/linear.c
[0] EPSSetUp() line 120 in .../slepc-3.5/src/eps/interface/epssetup.c
[0] EPSSetUp_KrylovSchur() line 95 in .../slepc-     3.5/src/eps/impls/krylov/krylovschur/krylovschur.c
[0] Wrong value of eps->which

Maybe I am missing some settings, but I can't find the related methods in slepc4py package (like PEPLinearsetCompanionForm, PEPLinearsetEPS or PEPLinearsetExplicitMatrix described in SLEPc documentation...)

Thank you in advance,

Comments (10)

  1. Jose E. Roman

    Do you get the same if you add E.setFromOptions() before E.solve() as in example demo/ex5.py?

  2. Claire Lestringant reporter

    I get the same error message with :

    E = SLEPc.PEP().create()
    E.setOperators([K,G,M])
    E.setType('linear')
    E.setProblemType(2)
    E.setFromOptions()
    E.solve()
    

    ... ex5.py uses default 'TOAR' method, right ?

  3. Jose E. Roman

    Yes. Does TOAR work for you? If so, do not bother about LINEAR because you won't get any additional benefit.

  4. Claire Lestringant reporter

    Yes it works. Ok, since my problem is hermitian, I though I could improve resolution using explicit linearization (TOAR method seems very general).

  5. Jose E. Roman

    You are using the repository version of SLEPc, right? Have to git pull at $SLEPC_DIR then rebuild SLEPc, then rerun setup.py in slepc4py.

  6. Log in to comment