mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
replace loop with std function, remove print from test
This commit is contained in:
parent
3cd1873771
commit
e2a531dd65
@ -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:
|
||||||
|
@ -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){
|
||||||
|
Loading…
Reference in New Issue
Block a user