[Trilinos-Users] Epetra_CrsMatrix redistribution
Chris Siefert
csiefer at sandia.gov
Wed Oct 5 10:10:16 EDT 2016
Sunghwan,
That constructor should do exactly what you want it to do (though you'll
have to be careful about which DomainMap you choose). If you could send
me a
stand-alone example, I could take a look at it.
Failing that, you can always do:
Epetra_CrsMatrix A(Copy,RowMap,0);
A.Import(SourceMatrix,Importer,CombineMode);
A.FillComplete(DomainMap,RangeMap);
-Chris
On 10/05/2016 01:06 AM, SungHwan Choi wrote:
> Dear all,
> I am using Epetra_CrsMatrix distributed to all processors. Now I need
> to redistribute among groups of processors. Each group has the same
> matrix. I found a good method in Epetra_CrsMatrix class
>
> Epetra_CrsMatrix
> <https://trilinos.org/docs/r12.6/packages/epetra/doc/html/classEpetra__CrsMatrix.html#a8b7002382b0e988660cc450a8453987e> (const
> Epetra_CrsMatrix
> <https://trilinos.org/docs/r12.6/packages/epetra/doc/html/classEpetra__CrsMatrix.html> &SourceMatrix,
> const Epetra_Import
> <https://trilinos.org/docs/r12.6/packages/epetra/doc/html/classEpetra__Import.html> &RowImporter,
> const Epetra_Map
> <https://trilinos.org/docs/r12.6/packages/epetra/doc/html/classEpetra__Map.html> *DomainMap
> <https://trilinos.org/docs/r12.6/packages/epetra/doc/html/classEpetra__CrsMatrix.html#a9e0fa687441503d5322d4f644383ad7a>=0,
> const Epetra_Map
> <https://trilinos.org/docs/r12.6/packages/epetra/doc/html/classEpetra__Map.html> *RangeMap
> <https://trilinos.org/docs/r12.6/packages/epetra/doc/html/classEpetra__CrsMatrix.html#a1818b6b366f7044d3b94c7c64cbea627>=0,
> bool RestrictCommunicator=false)
>
>
> however, it throws errors. terminate called after throwing an instance
> of 'std::runtime_error'
>
> For the clear explanation, Here is example
>
> original
> PID RowID
> 0 0,1,2,3
> 1 4,5,6,7
> 3 8,9,10,11
> 4 12,13,14,15
>
> new matrix
> PID RowID
> 0 0,1,2,3,4,5,6,7
> 1 8,9,10,11,12,13,14,15
> 2 0,1,2,3,4,5,6,7
> 3 8,9,10,11,12,13,14,15
>
> 1) the constructor of Epetra_CrsMatrix does not fit to current situation?
> 2) If no, are there any other ways to do it simply?
>
> Sincerely
> Sunghwan Choi
>
>
>
>
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at trilinos.org
> https://trilinos.org/mailman/listinfo/trilinos-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20161005/e3d42c35/attachment.html>
More information about the Trilinos-Users
mailing list