From e2e4669c1e30829151f08227c059622999deb6c1 Mon Sep 17 00:00:00 2001 From: turcksin Date: Thu, 7 Nov 2013 22:42:51 +0000 Subject: [PATCH] Fix a bug in graph_coloring when there is only one partition. git-svn-id: https://svn.dealii.org/trunk@31579 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/base/graph_coloring.h | 83 ++++++++++--------- 1 file changed, 43 insertions(+), 40 deletions(-) diff --git a/deal.II/include/deal.II/base/graph_coloring.h b/deal.II/include/deal.II/base/graph_coloring.h index 3deb60d595..31576e38f7 100644 --- a/deal.II/include/deal.II/base/graph_coloring.h +++ b/deal.II/include/deal.II/base/graph_coloring.h @@ -110,7 +110,7 @@ namespace GraphColoring for (unsigned int i=0; i &conflicting_elements - = indices_to_iterators[conflict_indices[i]]; + = indices_to_iterators[conflict_indices[i]]; for (unsigned int j=0; j1) { - if (max_odd_n_colors used_k; - for (unsigned int j=0; j::iterator it; - it = std::max_element(colors_counter[i].begin(),colors_counter[i].end()); - unsigned int min_iterators(-1); - unsigned int pos(0); - // Find the color of coloring with the least number of colors among - // the colors that have not been used yet. - for (unsigned int k=0; k used_k; + for (unsigned int j=0; j::iterator it; + it = std::max_element(colors_counter[i].begin(),colors_counter[i].end()); + unsigned int min_iterators(-1); + unsigned int pos(0); + // Find the color of coloring with the least number of colors among + // the colors that have not been used yet. + for (unsigned int k=0; k