[Trilinos-Users] RCP<Epetra_MultiVector> convertion

Alicia Klinvex aklinvex at purdue.edu
Wed Feb 11 07:21:34 MST 2015


Hello Antonella,

Try grabbing the first (and only) vector of your multivector using ()

http://trilinos.org/docs/r11.12/packages/epetra/doc/html/classEpetra__MultiVector.html#a9ff1873a78c6fecf7a3188f925689e9c

i.e. Epetra_Vector* x = (*X)(0);

On Wed, Feb 11, 2015 at 8:37 AM, Antonella Longo <antonella.longo at ingv.it>
wrote:

> 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
> Tel. office: 050 8311939
> Cell.: 339 7532089
>
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> https://software.sandia.gov/mailman/listinfo/trilinos-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://software.sandia.gov/pipermail/trilinos-users/attachments/20150211/713b4c72/attachment.html>


More information about the Trilinos-Users mailing list