replace loop with std function, remove print from test

This commit is contained in:
Tobias Meyer Andersen 2023-11-21 09:52:48 +01:00
parent 3cd1873771
commit e2a531dd65
2 changed files with 1 additions and 7 deletions

View File

@ -252,12 +252,7 @@ getMatrixRowColoring(const M& matrix, ColoringType coloringType)
std::vector<std::size_t> color(matrix.N(), 0); std::vector<std::size_t> color(matrix.N(), 0);
std::vector<std::size_t> rowIndices(matrix.N(), 0); std::vector<std::size_t> rowIndices(matrix.N(), 0);
#ifdef _OPENMP std::iota(rowIndices.begin(), rowIndices.end(), 0);
#pragma omp parallel for
#endif
for (std::size_t i = 0; i < matrix.N(); i++) {
rowIndices[i] = i;
}
std::vector<std::size_t> colorCnt; std::vector<std::size_t> colorCnt;
// These dynamic programming computations only rely on the following observation: // These dynamic programming computations only rely on the following observation:

View File

@ -411,7 +411,6 @@ BOOST_AUTO_TEST_CASE(TestColoredDiluParallelisms5x5Complex)
coloring = Opm::getMatrixRowColoring(testMatrix, Opm::ColoringType::UPPER); coloring = Opm::getMatrixRowColoring(testMatrix, Opm::ColoringType::UPPER);
correctColor = {{3, 4}, {1, 2}, {0}}; correctColor = {{3, 4}, {1, 2}, {0}};
coloring.print(std::cout);
for (std::size_t i = 0; i < correctColor.size(); ++i){ for (std::size_t i = 0; i < correctColor.size(); ++i){
for (std::size_t j = 0; j < correctColor[i].size(); ++j){ for (std::size_t j = 0; j < correctColor[i].size(); ++j){