[Trilinos-Users] Fwd: Converting Tpetra CrsMatrix

Pate Motter pate.motter at colorado.edu
Wed May 6 15:34:49 EDT 2015


Hi,

I was wondering what the correct method for converting a complex Tpetra
CrsMatrix to a new real Tpetra CrsMatrix just by taking the real portion
from each scalar. I am trying to use the convert() method, but I am getting
errors.

Thanks,
Pate

My Code:
//  here MATC is defined as  Tpetra::CrsMatrix<std::complex<double>, LO,
GO, NT>
//  MAT is defined as Tpetra::CrsMatrix<double, LO, GO, NT>
void func(const RCP<MATC> &A){
RCP<Tpetra::CrsMatrix<double, int, int, NT> > B = A->convert();
}

The error:
/home/pamo8800/tpetra/functions/builtin.cpp(44): error: no instance of
function template "Tpetra::CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal,
Node>::convert [with Scalar=ST={double}, LocalOrdinal=LO={int},
GlobalOrdinal=GO={int64_t={long}}, Node=NT]" matches the argument list
            object type is: MAT
        RCP<Tpetra::CrsMatrix<double, int, int, NT> > B = A->convert();
                                                             ^
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20150506/e1f44ecc/attachment.html>


More information about the Trilinos-Users mailing list