Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/PolarGrid/polargrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,11 @@ void PolarGrid<MemorySpace>::initializeLineSplitting(std::optional<double> 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;
}
Expand Down
4 changes: 2 additions & 2 deletions tests/GMGPolar/pcg_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ using gmgpolar_test_suite = testing::Types<
std::integral_constant<ResidualNormType, ResidualNormType::EUCLIDEAN>, // residualNormType
std::integral_constant<double, 1e-8>, // absoluteTolerance
std::integral_constant<double, 1e-8>, // relativeTolerance
std::integral_constant<int, 8>, // expected_iterations
std::integral_constant<int, 7>, // expected_iterations
std::integral_constant<double, 2e-6>, // expected_l2_error
std::integral_constant<double, 9e-6>, // expected_inf_error
std::integral_constant<double, 0.7> // expected_residual_reduction
Expand Down Expand Up @@ -341,7 +341,7 @@ using gmgpolar_test_suite = testing::Types<
std::integral_constant<ResidualNormType, ResidualNormType::INFINITY_NORM>, // residualNormType
std::integral_constant<double, 1e-12>, // absoluteTolerance
std::integral_constant<double, 1e-10>, // relativeTolerance
std::integral_constant<int, 4>, // expected_iterations
std::integral_constant<int, 3>, // expected_iterations
std::integral_constant<double, 6e-6>, // expected_l2_error
std::integral_constant<double, 2e-5>, // expected_inf_error
std::integral_constant<double, 0.3> // expected_residual_reduction
Expand Down
4 changes: 2 additions & 2 deletions tests/GMGPolar/solve_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ using gmgpolar_test_suite = testing::Types<
std::integral_constant<ResidualNormType, ResidualNormType::INFINITY_NORM>, // residualNormType
std::integral_constant<double, 1e-12>, // absoluteTolerance
std::integral_constant<double, 1e-10>, // relativeTolerance
std::integral_constant<int, 13>, // expected_iterations
std::integral_constant<int, 7>, // expected_iterations
std::integral_constant<double, 6e-6>, // expected_l2_error
std::integral_constant<double, 2e-5>, // expected_inf_error
std::integral_constant<double, 0.3> // expected_residual_reduction
Expand Down Expand Up @@ -494,7 +494,7 @@ using gmgpolar_test_suite = testing::Types<
std::integral_constant<ResidualNormType, ResidualNormType::EUCLIDEAN>, // residualNormType
std::integral_constant<double, 1e-9>, // absoluteTolerance
std::integral_constant<double, 1e-8>, // relativeTolerance
std::integral_constant<int, 8>, // expected_iterations
std::integral_constant<int, 6>, // expected_iterations
std::integral_constant<double, 5e-6>, // expected_l2_error
std::integral_constant<double, 2e-5>, // expected_inf_error
std::integral_constant<double, 0.2> // expected_residual_reduction
Expand Down
Loading