[Trilinos-Users] Question about inserting a row not owned by a processor.
Williams, Alan B
william at sandia.gov
Thu Jun 17 16:07:21 MDT 2010
> I also noticed that I can not use ExtractDiagonalCopy for a matrix
> created of type Epetra_FECrsMatrix because the type is Epetra_FEVector
> and not Epetra_Vector. ExtractDiagonalCopy I guess does not work for
> when rows are not owned by the processor.
>
> globalMatrixDiagFE_ = Teuchos::rcp(new
> Epetra_FEVector(*globalRowMap_));
> ierr += globalMatrix_->ExtractDiagonalCopy(*globalMatrixDiagFE_);
>
> If globalMatrixDiagFE is Epetra_Vector then the values from rows not
> owned by the processor are not returned.
That's correct. If you want to extract off-processor values, you need to export your matrix to a different matrix which has a map that describes the overlapping set of rows you need.
A better approach of course is to adjust your algorithm so you don't need to access off-processor values. (Access them in-situ on that other processor.)
Alan
More information about the Trilinos-Users
mailing list