@@ -3650,23 +3650,23 @@ const CCompressedSparsePatternUL& CGeometry::GetEdgeColoring(su2double* efficien
36503650 /* --- If the coloring fails, reduce the color group size. ---*/
36513651 if (edgeColoring.empty ()) {
36523652 upperEdgeColorGroupSize = nextEdgeColorGroupSize;
3653- nextEdgeColorGroupSize = lowerEdgeColorGroupSize + (upperEdgeColorGroupSize - lowerEdgeColorGroupSize) / 2 ;
3654- continue ;
36553653 }
3656-
3657- const su2double currentEfficiency =
3658- coloringEfficiency (edgeColoring, omp_get_max_threads (), nextEdgeColorGroupSize);
3659-
3660- /* --- If the coloring is not efficient, reduce the color group size. ---*/
3661- if (currentEfficiency < COLORING_EFF_THRESH) {
3662- upperEdgeColorGroupSize = nextEdgeColorGroupSize;
3663- }
3664- /* --- Otherwise, enlarge the color group size. ---*/
3654+ /* --- If the coloring succeeds, check the efficiency. ---*/
36653655 else {
3666- lowerEdgeColorGroupSize = nextEdgeColorGroupSize;
3656+ const su2double currentEfficiency =
3657+ coloringEfficiency (edgeColoring, omp_get_max_threads (), nextEdgeColorGroupSize);
3658+
3659+ /* --- If the coloring is not efficient, reduce the color group size. ---*/
3660+ if (currentEfficiency < COLORING_EFF_THRESH) {
3661+ upperEdgeColorGroupSize = nextEdgeColorGroupSize;
3662+ }
3663+ /* --- Otherwise, enlarge the color group size. ---*/
3664+ else {
3665+ lowerEdgeColorGroupSize = nextEdgeColorGroupSize;
3666+ }
36673667 }
3668- const auto increment = (upperEdgeColorGroupSize - lowerEdgeColorGroupSize) / 2 ;
36693668
3669+ const auto increment = (upperEdgeColorGroupSize - lowerEdgeColorGroupSize) / 2 ;
36703670 nextEdgeColorGroupSize = lowerEdgeColorGroupSize + increment;
36713671
36723672 if (increment == 0 ) {
0 commit comments