[Trilinos-Users] Epetra_CrsMatrix redistribution
SungHwan Choi
sunghwanchoi91 at gmail.com
Wed Oct 5 03:06:38 EDT 2016
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20161005/5d4f5100/attachment-0001.html>
More information about the Trilinos-Users
mailing list