[Trilinos-Users] [EXTERNAL] math operation on RCP<Epetra_MultiVector>

Andrey Prokopenko aprokop at sandia.gov
Wed Feb 11 10:25:08 MST 2015


Something like this (assuming that the maps are compatible):

Teuchos::RCP<Epetra_MultiVector> R = Teuchos::rcp(new 
Epetra_MultiVector(A->RowMap());
A->Multiply(false, *X, *R);
R->Update(-1.0, *B, 1.0);

-Andrey

On 02/11/2015 04:28 AM, Antonella Longo wrote:
> We have a Teuchos::RCP<Epetra_CrsMatrix> A,
> a RCP<Epetra_MultiVector> B, and a RCP<Epetra_MultiVector> X.
> We want compute AX-B. What can we write to perform this?
>
> -- 
> -----------------------------------------------
> 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
>
>
> _______________________________________________
> 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/3be0ddc8/attachment.html>


More information about the Trilinos-Users mailing list