[Trilinos-Users] reading nonlocal entries of a
Epetra_FECrsMatrix ?? possible ?
Michael A Heroux
maherou at sandia.gov
Wed Dec 19 21:45:58 MST 2007
Epetra provide import and export capabilities to replicate data from other
processors. If you need specific rows of a matrix on a particular
processor, you can form an Epetra_Map (call it importMap) containing the
global IDs of rows you need, then create an Epetra_Import object using
importMap as the targetMap and the rowMap of your matrix as the sourceMap.
Then create a new matrix (call it importMatrix) with importMap as the
rowMap. Finally, perform the import and do FillComplete
Here is a code sketch (not guaranteed to be perfect, but close)
Create STL int vector called importGIDs with global IDs of rows you need.
Then:
Epetra_Map importMap(-1, &importGIDs[0], 0, comm);
Epetra_Import importer(importMap, matrix.RowMap());
Epetra_CrsMatrix importMatrix(Copy, importMap, 0);
importMatrix.Import(matrix, importer, Add);
importMatrix.FillComplete();
At this point, importMatrix has the rows you specified in the importGIDs
vector.
Mike
On 12/19/07 9:57 PM, "Davood Ansari" <david.ansari at gmail.com> wrote:
> Hi every one
>
> Epetra_FECrsMatrix if wonderful for FE applications.
> Building some kinds of FE matrices requires some post processing.
> During the post processing I need to read the values stored in some entries
> of my FECrsMatrix that are not local. How is that possible ?
>
> Yours
> Davood
>
>
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> http://software.sandia.gov/mailman/listinfo/trilinos-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://software.sandia.gov/mailman/private/trilinos-users/attachments/20071219/286a0435/attachment.html
More information about the Trilinos-Users
mailing list