[Trilinos-Users] RCP<Epetra_MultiVector> convertion

Bartlett, Roscoe A. bartlettra at ornl.gov
Wed Feb 11 06:56:56 MST 2015


That code looks okay.  I would have to see the exact output with a full stack trace.  But the fact that this is an ‘int’ exception is not a good sign.

-Ross


From: trilinos-users-bounces at software.sandia.gov [mailto:trilinos-users-bounces at software.sandia.gov] On Behalf Of Antonella Longo
Sent: Wednesday, February 11, 2015 8:37 AM
To: trilinos-users at software.sandia.gov
Cc: Deepak Garg
Subject: [Trilinos-Users] RCP<Epetra_MultiVector> convertion

We have a Teuchos::RCP<Epetra_MultiVector> X made of only 1 column,
and we want to convert this vector into a simple Epetra_Vector.
We used the following functions:

      const Teuchos::RCP<Epetra_Vector> x_rcp =
        Teuchos::rcpWithEmbeddedObj( (*X)(1), X, false );

      Epetra_Vector* x = x_rcp.getRawPtr();
We can compile these functions, but when we try to print out both
x_rcp and x we do not get any result (files are not written), the code stops
with error: terminate called after throwing an instance of 'int'.
What are we doing wrong?




--
-----------------------------------------------
Antonella Longo
Istituto Nazionale di Geofisica e Vulcanologia
Sezione di Pisa
Via Uguccione della Faggiola, 32
Pisa, Italy
email: antonella.longo at ingv.it<mailto:antonella.longo at ingv.it>
Tel. office: 050 8311939
Cell.: 339 7532089
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://software.sandia.gov/pipermail/trilinos-users/attachments/20150211/ce6348b9/attachment.html>


More information about the Trilinos-Users mailing list