[Trilinos-Users] Tpetra Map/Multivector with repeated elements

Baker, Christopher G. bakercg at ornl.gov
Thu Nov 3 12:32:09 MDT 2011


Yes. The import and export functionality provides this. Customarily, you will create an Import object from the non-duplicated (source) to the duplicated (destination) maps. You effect this communication by calling the doImport() method on the duplicated vector, passing the Import object and the source vector.
Then you can do your local work. When you are done, you reverse the process, using the doExport() method on the vector where you would like the reduction to be placed. This operation takes an argument specifying the type of the reduction (sum, max, etc).

It may be possible to reuse for the export the Import object constructed earlier for the import step. This is possible if the export is the opposite of the import.

This is a common use case. Please fell free to email me directly for more help. Also, you might look at the examples and tests directories for the use of doExport and doImport.

Chris

Please excuse typos

-----Original Message-----
From: Andrea Zonca [zonca at deepspace.ucsb.edu<mailto:zonca at deepspace.ucsb.edu>]
Sent: Thursday, November 03, 2011 02:22 PM Eastern Standard Time
To: trilinos-users at software.sandia.gov
Subject: [Trilinos-Users] Tpetra Map/Multivector with repeated elements


Hi,
I would like to build a Tpetra Multivector where some elements are
repeated in more than one node, do some local operations and then
apply a sort of reduce
method to sum the repeated elements across all the nodes and broadcast
them back to each of the nodes.
Is there an easy way to achieve this in Tpetra?
Thanks,

Andrea Zonca

_______________________________________________
Trilinos-Users mailing list
Trilinos-Users at software.sandia.gov
hxxp://software.sandia.gov/mailman/listinfo/trilinos-users





More information about the Trilinos-Users mailing list