diff --git a/src/PolarGrid/polargrid.cpp b/src/PolarGrid/polargrid.cpp index abb42037..5337faa2 100644 --- a/src/PolarGrid/polargrid.cpp +++ b/src/PolarGrid/polargrid.cpp @@ -217,12 +217,11 @@ void PolarGrid::initializeLineSplitting(std::optional split number_smoother_circles_ = 2; /* We assume numberSmootherCircles_ >= 2 in the further implementation */ for (int i_r = 2; i_r < nr() - 2; i_r++) { /* We assume lengthRadialSmoother_ >= 3 in the further implementation */ - double uniform_theta_k = (2 * M_PI) / ntheta(); - double radius_r = radii_host(i_r); - double radial_dist_h = radii_host(i_r) - radii_host(i_r - 1); - ; - double q = uniform_theta_k / radial_dist_h; - if (q * radius_r > 1.0) { + const double uniform_theta_k = (2 * M_PI) / ntheta(); + const double radial_dist_h = radius(i_r + 1) - radius(i_r); + + const double q = uniform_theta_k / radial_dist_h; + if (q * radius(i_r) > 1.0) { number_smoother_circles_ = i_r; break; } diff --git a/tests/GMGPolar/pcg_tests.cpp b/tests/GMGPolar/pcg_tests.cpp index ad05bd60..691df402 100644 --- a/tests/GMGPolar/pcg_tests.cpp +++ b/tests/GMGPolar/pcg_tests.cpp @@ -217,7 +217,7 @@ using gmgpolar_test_suite = testing::Types< std::integral_constant, // residualNormType std::integral_constant, // absoluteTolerance std::integral_constant, // relativeTolerance - std::integral_constant, // expected_iterations + std::integral_constant, // expected_iterations std::integral_constant, // expected_l2_error std::integral_constant, // expected_inf_error std::integral_constant // expected_residual_reduction @@ -341,7 +341,7 @@ using gmgpolar_test_suite = testing::Types< std::integral_constant, // residualNormType std::integral_constant, // absoluteTolerance std::integral_constant, // relativeTolerance - std::integral_constant, // expected_iterations + std::integral_constant, // expected_iterations std::integral_constant, // expected_l2_error std::integral_constant, // expected_inf_error std::integral_constant // expected_residual_reduction diff --git a/tests/GMGPolar/solve_tests.cpp b/tests/GMGPolar/solve_tests.cpp index 0cdf54ca..43d06da3 100644 --- a/tests/GMGPolar/solve_tests.cpp +++ b/tests/GMGPolar/solve_tests.cpp @@ -293,7 +293,7 @@ using gmgpolar_test_suite = testing::Types< std::integral_constant, // residualNormType std::integral_constant, // absoluteTolerance std::integral_constant, // relativeTolerance - std::integral_constant, // expected_iterations + std::integral_constant, // expected_iterations std::integral_constant, // expected_l2_error std::integral_constant, // expected_inf_error std::integral_constant // expected_residual_reduction @@ -494,7 +494,7 @@ using gmgpolar_test_suite = testing::Types< std::integral_constant, // residualNormType std::integral_constant, // absoluteTolerance std::integral_constant, // relativeTolerance - std::integral_constant, // expected_iterations + std::integral_constant, // expected_iterations std::integral_constant, // expected_l2_error std::integral_constant, // expected_inf_error std::integral_constant // expected_residual_reduction