[Trilinos-Users] Question about inserting a row not owned by a processor.

M. Scot Breitenfeld brtnfld at uiuc.edu
Thu Jun 17 15:25:25 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.

Similarly, LeftScale/RightScale has the same situation and can not be
used with Epetra_FEVector types. I would have to write new functions to
get these to work for the situation when rows are not owned by the
processor (i.e. for Epetra_FEVector), correct?

BTW, when I try to view the mailing list archive it asks for a username
and password, and the one I use for the mailing list does not work.

On 06/17/2010 09:58 AM, Williams, Alan B wrote:
>> On that note, I don't see a function that accesses an element in a
>> multi-vector, when globalLhs was Epetra_vector I could just use,
>>
>> value = (*globalLhs_)[i];
>>
>> do I have to extract the whole vector using
>> Epetra_MultiVector::ExtractView to access an element of the vector?
>>
>> Thanks.
>>
>>     
> That's right. Note that Epetra_FEVector provides for assembling a multi-vector, with values being contributed from any processor. But once globalAssemble is called, and the underlying multi-vector is assembled, then you just have a regular multi-vector. i.e., at that point you can't retrieve off-processor values. At that point you have to use the import/export capabilities to re-distribute if you want values from another processor.
>
> Alan
>
>
>
>   




More information about the Trilinos-Users mailing list