[Trilinos-Users] How to import non-local CSR matrix elements?
rrossi at cimne.upc.edu
rrossi at cimne.upc.edu
Wed Jan 5 16:48:49 MST 2011
Dear list,
i am dealing with a somewhat non standard problem: i assembled an
Epetra_FECrsMatrix, and i would need
to get a copy of the values stored in the matrix. To explain better,
suppose that i have the matrix
2 3 * *
4 5 6 *
* * 1 *
* * 2 1
where the processor 1 owns the first two lines and the processor 2 owns
the second ones
i would like to be able (as process 2) to query for the values that
correspond to a given set of indices, which are however owned by processor
1,
say
(1,1)
(2,1)
from having a look to the documentation i found that the most similar
thing appears to be the function
int ExtractGlobalRowCopy [1] (int GlobalRow, int Length, int
however this is only defined for CRSMAtrix and does not allow accessing
to non local data.
For Epetra_FEVector i am currently doing the following to get a copy of
both local and non local data:
//defining the importer class
Epetra_Import importer( dof_update_map, Dx.Map() );
//defining a temporary vector to gather all of the values needed
Epetra_Vector temp( importer.TargetMap() );
//importing in the new temp vector the values
int ierr = temp.Import(Dx,importer,Insert);
if(ierr != 0) KRATOS_ERROR(std::logic_error,"Epetra failure
found","");
Is it possible to do something similar for my problem?
Any help/pointer to the correct documentation would be very welcome
thank you all in advance
Riccardo
More information about the Trilinos-Users
mailing list