[Trilinos-Users] isn't the return value of Teuchos::RCP::getRawPtr function the same raw pointer?

SungHwan Choi sunghwanchoi91 at gmail.com
Tue Jan 20 00:41:25 MST 2015


*Hi, *
*I want to use EpetraExt::MatrixMatrix::Add function *
*when I use*

RCP<Epetra_CrsMatrix> core_hamiltonian=Tuechos::null;
EpetraExt::MatrixMatrix::Add(*kinetic_matrix.get()
,false,1.0,*pseudopotential_matrix.get(),false,1.0,core_hamiltonian.getRawPtr());

then, compiler gives

no instance of overloaded function "EpetraExt::MatrixMatrix::Add" matches
the argument list
Epetra_CrsMatrix* core=NULL;
EpetraExt::MatrixMatrix::Add(*kinetic_matrix.get()
,false,1.0,*pseudopotential_matrix.get(),false,1.0,core_hamiltonian.getRawPtr());


*if I use*

Epetra_CrsMatrix* core=NULL;
EpetraExt::MatrixMatrix::Add(*kinetic_matrix.get()
,false,1.0,*pseudopotential_matrix.get(),false,1.0,core);

*Then, it works*

*What is the difference between above two cases? If you have any idea to
make me understand that, please don't hesitate*

*Sunghwan Choi *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://software.sandia.gov/pipermail/trilinos-users/attachments/20150120/8668d3f4/attachment.html>


More information about the Trilinos-Users mailing list