82 const TAdj &cell2cellFaceV,
83 const std::vector<index> localPartStarts_in,
98 for (
int iPart = 0; iPart < nParts; iPart++)
113 std::vector<std::unordered_set<index>> cell2cellFaceVEnlarged;
117 cell2cellFaceVEnlarged.resize(this->
Num());
118 for (
index iCell = 0; iCell < this->
Num(); iCell++)
119 for (
auto iCO : cell2cellFaceV[iCell])
120 cell2cellFaceVEnlarged[iCell].insert(iCO);
121 for (
int iFill = 0; iFill < iluCode; iFill++)
123 for (
index iCell = 0; iCell < this->
Num(); iCell++)
125 std::unordered_set<index> newNeighbor;
126 for (
auto iCO : cell2cellFaceVEnlarged[iCell])
127 for (
auto iCOO : cell2cellFaceV[iCO])
128 newNeighbor.insert(iCOO);
129 for (
auto iCN : newNeighbor)
130 cell2cellFaceVEnlarged[iCell].insert(iCN);
133 for (
index iCell = 0; iCell < this->
Num(); iCell++)
134 cell2cellFaceVEnlarged[iCell].erase(iCell);
137 std::vector<std::unordered_set<index>> triLowRows;
138 std::vector<std::unordered_set<index>> triUppRows;
139 std::vector<std::unordered_set<index>> midSymMatCols;
140 triLowRows.resize(this->
Num());
141 triUppRows.resize(this->
Num());
142 midSymMatCols.resize(this->
Num());
145 for (
index iCellP = 0; iCellP < this->
Num(); iCellP++)
148 midSymMatCols[iCellP].insert(iCellP);
149 for (
auto iCellOther : cell2cellFaceV[iCell])
152 midSymMatCols[iCellP].insert(iCellOtherP);
154 nnzOrig += cell2cellFaceV[iCell].size();
157 for (
index iCellP = 0; iCellP < this->
Num(); iCellP++)
159 for (
auto iCellOtherP : midSymMatCols[iCellP])
160 if (iCellOtherP > iCellP)
163 for (
auto iCellOtherPP : midSymMatCols[iCellP])
164 if (iCellOtherPP > iCellOtherP)
169 if (iluCode < 0 || (iluCode > 0 && cell2cellFaceVEnlarged[iCellOther].count(iCellOtherOther)))
171 midSymMatCols[iCellOtherPP].insert(iCellOtherP);
172 midSymMatCols[iCellOtherP].insert(iCellOtherPP);
175 triLowRows[iCellOtherP].insert(iCellP);
176 triUppRows[iCellP].insert(iCellOtherP);
181 upperTriStructure.resize(this->
Num());
182 lowerTriStructureNew.resize(this->
Num());
183 upperTriStructureNew.resize(this->
Num());
184 index nnzLower{0}, nnzUpper{0};
185 for (
index iCellP = 0; iCellP < this->
Num(); iCellP++)
192 for (
auto iCellOtherP : triLowRows[iCellP])
194 for (
auto iCellOtherP : triUppRows[iCellP])
210 log() <<
"Direct::ObtainSymmetricSymbolicFactorization(): Factorizing Done" << std::endl;
212 {
log() << fmt::format(
" ({}, {}/{})",
mpi.
rank,
213 nnzLower + nnzUpper + this->Num(),
215 << (((
mpi.
rank + 1) % 10) ?
"" :
"\n")
220 DNDS_assert_info(nnzLower == nnzUpper, fmt::format(
"nnzLower,Upper: [{},{}]", nnzLower, nnzUpper));
224 for (
index iP = 0; iP < this->
Num(); iP++)
228 for (
int ijP = 0; ijP < lowerRow.size(); ijP++)
230 index jP = lowerRow[ijP];
232 auto ret = std::lower_bound(upperRow.begin(), upperRow.end(), iP);
235 ? (ret - upperRow.begin())
242 for (
index iP = 0; iP < this->
Num(); iP++)
246 for (
int ijP = 0; ijP < upperRow.size(); ijP++)
248 index jP = upperRow[ijP];
250 auto ret = std::lower_bound(lowerRow.begin(), lowerRow.end(), iP);
253 ? (ret - lowerRow.begin())
259 for (
index i = 0; i < this->
Num(); i++)
263 for (
int ic2c = 0; ic2c < cell2cellFaceV[i].size(); ic2c++)
265 index j = cell2cellFaceV[i][ic2c];
270 auto ret = std::lower_bound(row.begin(), row.end(), jP);
273 (ret - row.begin()) + 1;
278 auto ret = std::lower_bound(row.begin(), row.end(), jP);