[Trilinos-Users] Question on Epetra_Vector::Export()
Littlewood, David John
djlittl at sandia.gov
Wed Jun 9 17:14:11 MDT 2010
Greetings,
I want to do two consecutive export operations like so:
[omitting the code where I construct the maps for brevity]
Teuchos::RCP<const Epetra_MultiVector> aOverlap = Teuchos::rcp(new Epetra_Vector(*secondaryEntryOverlapMap));
Teuchos::RCP<const Epetra_MultiVector> bOverlap = Teuchos::rcp(new Epetra_Vector(*secondaryEntryOverlapMap));
Teuchos::RCP<const Epetra_MultiVector> solverXDot = Teuchos::rcp(new Epetra_Vector(*threeDimensionalTwoEntryMap));
Teuchos::RCP<Epetra_Import> secondEntryImporter = Teuchos::rcp(new Epetra_Import(*secondaryEntryOverlapMap, *threeDimensionalTwoEntryMap));
solverXDot.Export(aOverlap, secondEntryImporter, Add);
solverXDot.Export(bOverlap, secondEntryImporter, Add);
And what I'd like is for the result in solverXDot to be the sum of the contributions from aOverlap and bOverlap. But it appears that the Export operation is first zeroing out the destination vector, such that the second Export overwrites what was put in solverXDot by the first Export.
Am I right on this, and is there anyway to avoid this behavior?
Thanks,
Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20100609/70c05c55/attachment.html
More information about the Trilinos-Users
mailing list