[Trilinos-Users] Epetra_CrsMatrix multiplication with a complex vector

Baker, Christopher G. bakercg at ornl.gov
Mon Jan 25 07:55:49 MST 2010

Actually, the 10.0 and development branch versions of Tpetra::CrsMatrix::multiply() is templated for the scalar type of both the domain and range vectors:

However, this functionality has a few missing pieces at the moment (I don't even know if it will compile today.) I do want you to know that this is something that we recognize is important, and it is something that we plan on supporting very soon.


On 1/24/10 8:44 AM, "Nico Schlömer" <nico.schloemer at ua.ac.be> wrote:

Hi David,

when dealing with complex-valued vectors and matrices, Tpetra is your
friend: As opposed to Epetra, you can stuff basically any scalar type into
it, e.g, complex<double>.

As of now I don't believe it's possible to have two Tpetra objects
interact which don't exactly share their scalar types, e.g., double vs.
complex<double>. -- Trilinos devs, am I up-to-date here?

As a workaround, you could just create your Hamiltonian as a
complex<double> matrix, which admittedly wastes the memory that all the
imaginary part zeros occupy. Anyway, I attached a minimal example for
complex<double> Tpetra matrix-vector multiplication.


On Sun, 24 Jan 2010 13:23:41 +0100, "David Hochstuhl"
<Davidhochstuhl at web.de> wrote:
> Hello,
> at first I want to thank the trilinos team for all those impressing
> program pakets.
> Up to now, I only use the anasazi package to do Configuration
> i.e. to find the eigenvalues/-vectors of a quantum chemistry Hamiltonian
> matrix.
> The solutions shall serve as initial states for a subsequent time
> evolution, in which an electromagnetic field is applied to the system.
> Now, to solve this task with Runge-Kutta, one needs to apply the real
> Hamiltonian matrix to a complex vector.
> So, is there any straightforward way to do this efficiently within
> trilinos ?
> Thanks in advance,
> David
> ______________________________________________________________________
> Haiti-Nothilfe! Helfen Sie per SMS: Sende UIHAITI an die Nummer 81190.
> Von 5 Euro je SMS (zzgl. SMS-Gebühr) gehen 4,83 Euro an UNICEF.
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> http://software.sandia.gov/mailman/listinfo/trilinos-users

More information about the Trilinos-Users mailing list