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

Bartlett, Roscoe A. bartlettra at ornl.gov
Tue Jan 20 14:00:22 MST 2015


Should be no difference.  Must be something else going on.  Does the compiler tell you what types it is passing in?

-Ross

From: trilinos-users-bounces at software.sandia.gov [mailto:trilinos-users-bounces at software.sandia.gov] On Behalf Of SungHwan Choi
Sent: Tuesday, January 20, 2015 2:41 AM
To: trilinos-users at software.sandia.gov
Subject: [Trilinos-Users] isn't the return value of Teuchos::RCP::getRawPtr function the same raw pointer?

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/004ca92e/attachment.html>


More information about the Trilinos-Users mailing list