[Trilinos-Users] Epetra_FEVector multiplication

Cristiano Malossi cristiano.malossi at epfl.ch
Mon Jan 10 02:32:44 MST 2011


I need some help to perform a vector by vector multiplication in Trilinos.

I have two distributed Epetra_FEVector, with the same map (and size), 
say A and B.
I need to perform the following operation: C = A * B^T, where C is a 
square Epetra_FECrsMatrix. The resulting matrix will then be used for 
other matrix by matrix operations.

Unfortunately I was not able to find an easy way to do that with Epetra 
and/or EpetraExt packages. Therefore, I suppose that I should somehow 
convert the vectors A and B to two Epetra_FECrsMatrix objects (of size 
Nx1, with N the length of the vectors), and then use the 
EpetraExt::MatrixMatrix::Multiply method for the computation of matrix 
C. However I do not know if there is a smart way to do the conversion 
from an Epetra_FEVector to an Epetra_FECrsMatrix (using a view for 
instance?). Any suggestion is welcome!

Thank you for your help.
Best regards,

    Cristiano Malossi

        Cristiano Malossi
        Ph.D. Student

        EPFL - SB - SMA - MATHICSE
        CMCS - Modelling and Scientific Computing
        Office MA C2 577, Av.Piccard, Station 8.
        CH-1015 Lausanne (Switzerland)
        Ph.    : +41 21 69 32733
        E-mail : cristiano.malossi at epfl.ch

More information about the Trilinos-Users mailing list