From: turcksin Date: Thu, 7 Nov 2013 22:42:51 +0000 (+0000) Subject: Fix a bug in graph_coloring when there is only one partition. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2e4669c1e30829151f08227c059622999deb6c1;p=dealii-svn.git 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 --- 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