From 7686111f2120b1d2a61fef9da4239f46cd04b13f Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 22 Mar 2022 17:49:16 -0600 Subject: [PATCH] Also rename a variable. --- source/particles/generators.cc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/source/particles/generators.cc b/source/particles/generators.cc index bf82f2e63d..03dbf810d7 100644 --- a/source/particles/generators.cc +++ b/source/particles/generators.cc @@ -147,11 +147,11 @@ namespace Particles try { - const Point position_unit = + const Point reference_position = mapping.transform_real_to_unit_cell(cell, position); - if (cell->reference_cell().contains_point(position_unit)) - return {position, position_unit}; + if (cell->reference_cell().contains_point(reference_position)) + return {position, reference_position}; } catch (typename Mapping::ExcTransformationFailed &) { @@ -164,14 +164,15 @@ namespace Particles // randomly within the reference cell and then mapping it to to // real space. This is not generating a // uniform distribution in real space, but will always succeed. - Point position_unit; + Point reference_position; for (unsigned int d = 0; d < dim; ++d) - position_unit[d] = uniform_distribution_01(random_number_generator); + reference_position[d] = + uniform_distribution_01(random_number_generator); const Point position = - mapping.transform_unit_to_real_cell(cell, position_unit); + mapping.transform_unit_to_real_cell(cell, reference_position); - return {position, position_unit}; + return {position, reference_position}; } } // namespace -- 2.39.5