From: Peter Munch Date: Sat, 22 Jul 2023 21:54:21 +0000 (+0200) Subject: MGLevelGlobalTransfer: remove unused variables X-Git-Tag: relicensing~650^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F15782%2Fhead;p=dealii.git MGLevelGlobalTransfer: remove unused variables --- diff --git a/include/deal.II/multigrid/mg_transfer.h b/include/deal.II/multigrid/mg_transfer.h index 5927dfb371..6f7c7e6071 100644 --- a/include/deal.II/multigrid/mg_transfer.h +++ b/include/deal.II/multigrid/mg_transfer.h @@ -536,11 +536,6 @@ protected: */ std::vector> copy_indices_global_mine; - /** - * Same as above, but used to transfer solution vectors. - */ - std::vector> solution_copy_indices_global_mine; - /** * Additional degrees of freedom for the copy_from_mg() function. These are * the ones where the level degree of freedom is locally owned and the @@ -605,12 +600,6 @@ protected: mutable MGLevelObject> ghosted_level_vector; - /** - * Same as above but used when working with solution vectors. - */ - mutable MGLevelObject> - solution_ghosted_level_vector; - /** * Function to initialize internal level vectors. */ diff --git a/source/multigrid/mg_level_global_transfer.cc b/source/multigrid/mg_level_global_transfer.cc index 332ea52d0f..5abd0f0eff 100644 --- a/source/multigrid/mg_level_global_transfer.cc +++ b/source/multigrid/mg_level_global_transfer.cc @@ -312,22 +312,27 @@ MGLevelGlobalTransfer>:: break; } if (Utilities::MPI::max(have_refinement_edge_dofs, mpi_communicator) == 1) - fill_internal(mg_dof, - mg_constrained_dofs, - mpi_communicator, - true, - this->solution_copy_indices, - this->solution_copy_indices_global_mine, - this->solution_copy_indices_level_mine, - solution_ghosted_global_vector, - solution_ghosted_level_vector); + { + // note: variables not needed + std::vector> solution_copy_indices_global_mine; + MGLevelObject> + solution_ghosted_level_vector; + + fill_internal(mg_dof, + mg_constrained_dofs, + mpi_communicator, + true, + this->solution_copy_indices, + solution_copy_indices_global_mine, + this->solution_copy_indices_level_mine, + solution_ghosted_global_vector, + solution_ghosted_level_vector); + } else { - this->solution_copy_indices = this->copy_indices; - this->solution_copy_indices_global_mine = this->copy_indices_global_mine; - this->solution_copy_indices_level_mine = this->copy_indices_level_mine; - solution_ghosted_global_vector = ghosted_global_vector; - solution_ghosted_level_vector = ghosted_level_vector; + this->solution_copy_indices = this->copy_indices; + this->solution_copy_indices_level_mine = this->copy_indices_level_mine; + solution_ghosted_global_vector = ghosted_global_vector; } // Check if we can perform a cheaper "plain copy" (with or without @@ -375,7 +380,6 @@ MGLevelGlobalTransfer>:: ghosted_global_vector.reinit(0); ghosted_level_vector.resize(0, 0); solution_ghosted_global_vector.reinit(0); - solution_ghosted_level_vector.resize(0, 0); } } @@ -389,7 +393,6 @@ MGLevelGlobalTransfer>::clear() copy_indices.clear(); solution_copy_indices.clear(); copy_indices_global_mine.clear(); - solution_copy_indices_global_mine.clear(); copy_indices_level_mine.clear(); solution_copy_indices_level_mine.clear(); component_to_block_map.resize(0); @@ -397,7 +400,6 @@ MGLevelGlobalTransfer>::clear() ghosted_global_vector.reinit(0); solution_ghosted_global_vector.reinit(0); ghosted_level_vector.resize(0, 0); - solution_ghosted_level_vector.resize(0, 0); perform_plain_copy = false; perform_renumbered_plain_copy = false; initialize_dof_vector = nullptr;