[Trilinos-Users] EIGENVECTORS OF A LARGE SPARSE NON-HERMITIAN MATRIX

Chris Baker cgbaker at gmail.com
Mon Aug 4 08:55:05 MDT 2008


Axel,

Try the following:
std::ofstream output("out.txt");
output << "# eigenvector: " << std::endl;
evecs->Print(*output*);
output.close();

The *ostream* accepted by the *Print()* routine is where the output is sent
to. Your previous code sent *std::cout* to the *Print()* routine.

Chris


On Mon, Aug 4, 2008 at 08:47, Axel CABLE <axel.cable at etu.univ-nantes.fr>wrote:

> Thank you for your answer Chris,
>
> So using the modified BlockKrylovSchurEx.cpp example, I asked to search
> for only one eigenvalue (the one of largest magnitude).
>
> evecs->Print(std::cout) gave me one eigenvector, which should be the one
> corresponding to the largest eigenvalue.
>
> Though, the eigenvector is large and I would like to get it in an output
> file: out.txt for example.
>
> I tried to do:
>
> std::ofstream output("out.txt");
>
> output << "# eigenvector: " << std::endl;
> output << evecs->Print(std::cout) << std::endl;
> output.close();
>
> But it did not work. As suggested in the error message, I tried using
> std::basic_ostream , but did not get anything working either.
>
> Would you have any idea?
>
> Thanks in advance!
> Regards,
> Axel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://software.sandia.gov/mailman/private/trilinos-users/attachments/20080804/737146d4/attachment.html 


More information about the Trilinos-Users mailing list