[petsc-users] How to get the eigenvectors in Slepc
Matthew Knepley
knepley at gmail.com
Sat Apr 13 13:02:06 CDT 2013
On Sat, Apr 13, 2013 at 11:34 AM, Sonya Blade <sonyablade2010 at hotmail.com>wrote:
> Thank you Hong,
>
> I already looked at those examples after not achieving the successful
> results I decide to share it. It seems that I don't know how to read
> values from the vectors, EPSGetEigenvector(eps,1,vec,PETSC_NULL); retrieves
> no errors which I assume that it returns the eigenvectors to corresponding
> eigenvalue(which is second in my case).
>
> I use following notation to read values from vectors, here I'm not sure
> whether the "&vec[i] or vec[i]" can be used to read the values from
> vector.
>
> Vec vec;
>
> for (i=0;i<9;i++)
> {
> PetscPrintf(MPI_COMM_WORLD," %3.8f: ",&vec[i] );
> }
>
Read the Manual chapter on Vectors.
Matt
> Regards,
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130413/1299a816/attachment.html>
More information about the petsc-users
mailing list