69 ElementsPerPart[i] = div;
70 if (i < mod) ElementsPerPart[i]++;
81 int CurrentPartition = 0;
88 NumEntries, &Indices[0]);
90 if (NumEntries <= 1) {
99 std::vector<int> ThisLevel(1);
100 ThisLevel[0] = RootNode_;
116 while (ThisLevel.size()) {
118 std::vector<int> NextLevel;
120 for (
unsigned int i = 0 ; i < ThisLevel.size() ; ++i) {
122 int CurrentNode = ThisLevel[i];
124 NumEntries, &Indices[0]);
125 IFPACK_CHK_ERR(ierr);
130 for (
int j = 0 ; j < NumEntries ; ++j) {
132 int NextNode = Indices[j];
139 ++Count[CurrentPartition];
141 NextLevel.push_back(NextNode);
147 if (Count[CurrentPartition] >= ElementsPerPart[CurrentPartition])
152 for (
unsigned int i = 0 ; i < NextLevel.size() ; ++i)
153 ThisLevel.push_back(NextLevel[i]);
155 if (ThisLevel.size() == 0 && (TotalCount !=
NumMyRows())) {
157 for (
int i = 0 ; i <
NumMyRows() ; i++) {
159 ThisLevel.push_back(i);
virtual int ExtractMyRowCopy(int MyRow, int LenOfIndices, int &NumIndices, int *Indices) const =0
Extracts a copy of input local row.