The EPS object is private, so I think the easiest thing here would be to 
modify SlepcEigenSolver to suit your needs. The beauty of open source 
software :)

You could change SlepcEigenSolver so that it can access Vi, like I said 
in my previous email (e.g. a bool to pick Vr or Vi). Or you could just 
add a getter for the EPS object. If you go with the former option, then 
a Pull Request on github would be appreciated.

David



On 09/09/2014 06:35 PM, Harshad Sahasrabudhe wrote:
> Hi David,
>
> Thanks for your reply. I'm working on a larger software which needs 
> LibMesh configured with real numbers. Does this mean I won't be able 
> to get complex eigen vectors?
>
> Is it possible to get the EPS object from SlepcEigenSolver so that I 
> can directly call SLEPc?
>
> Thanks,
> Harshad
>
> On Tue, Sep 9, 2014 at 6:23 PM, David Knezevic 
> <[email protected] <mailto:[email protected]>> wrote:
>
>     This is a good point. SLEPc does return both real and imaginary parts,
>     e.g. see here:
>     
> http://www.grycap.upv.es/slepc/documentation/current/docs/manualpages/EPS/EPSGetEigenpair.html
>
>     Note that it says "If PETSc is configured with complex scalars the
>     eigenvalue is stored directly in eigr (eigi is set to zero) and the
>     eigenvector in Vr (Vi is set to zero)."
>
>     So, it looks like in real mode we ignore the imaginary part in
>     SlepcEigenSolver<T>::get_eigenpair since we pass in PETSC_NULL for Vi.
>     But in complex mode the eigenvector should be correct, according
>     to the
>     quote above.
>
>     So you could configure libMesh with complex numbers, and then it
>     should
>     work for you.
>
>     But also, we should think about patching
>     SlepcEigenSolver<T>::get_eigenpair so that it sets Vi correctly in
>     real
>     mode as well. Perhaps the simplest way to do that is to add a
>     boolean to
>     select whether we want Vr or Vi when we call get_eigenpair.
>
>     David
>
>
>
>     On 09/09/2014 05:59 PM, Harshad Sahasrabudhe wrote:
>     > Hi,
>     >
>     > I'm using LibMesh compiled with SLEPc and PETSc in real mode.
>     I'm using
>     > EigenSystem class to solve an eigen problem with real matrix
>     coefficients.
>     > The eigen vectors of such a system can be complex.
>     >
>     > How do I get the complex eigenvectors? As far as I have looked
>     into LibMesh
>     > source code, I have only found the solution to be in this form:
>     >
>     > AutoPtr< NumericVector< Number > > solution
>     >
>     > where the Number is a Real. Does this mean the solution is a
>     real vector?
>     > Then how do we store the imaginary part?
>     >
>     > Thanks,
>     > Harshad
>     >
>     
> ------------------------------------------------------------------------------
>     > Want excitement?
>     > Manually upgrade your production database.
>     > When you want reliability, choose Perforce.
>     > Perforce version control. Predictably reliable.
>     >
>     
> http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
>     > _______________________________________________
>     > Libmesh-users mailing list
>     > [email protected]
>     <mailto:[email protected]>
>     > https://lists.sourceforge.net/lists/listinfo/libmesh-users
>
>     
> ------------------------------------------------------------------------------
>     Want excitement?
>     Manually upgrade your production database.
>     When you want reliability, choose Perforce.
>     Perforce version control. Predictably reliable.
>     
> http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
>     _______________________________________________
>     Libmesh-users mailing list
>     [email protected]
>     <mailto:[email protected]>
>     https://lists.sourceforge.net/lists/listinfo/libmesh-users
>
>

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce.
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to