From: Martin Kronbichler Date: Wed, 21 Dec 2022 11:06:12 +0000 (+0100) Subject: Make sure to clear a variable that gets set X-Git-Tag: v9.5.0-rc1~401^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6046d78c65f395840f7eca8154e3f20a8eb05c0;p=dealii.git Make sure to clear a variable that gets set --- diff --git a/source/multigrid/mg_level_global_transfer.cc b/source/multigrid/mg_level_global_transfer.cc index f0c18c1357..6592169300 100644 --- a/source/multigrid/mg_level_global_transfer.cc +++ b/source/multigrid/mg_level_global_transfer.cc @@ -387,14 +387,20 @@ MGLevelGlobalTransfer>::clear() { sizes.resize(0); 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); mg_constrained_dofs = nullptr; 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; } diff --git a/source/multigrid/mg_transfer_matrix_free.cc b/source/multigrid/mg_transfer_matrix_free.cc index a131d8846b..1859913180 100644 --- a/source/multigrid/mg_transfer_matrix_free.cc +++ b/source/multigrid/mg_transfer_matrix_free.cc @@ -109,10 +109,9 @@ MGTransferMatrixFree::build( "probably close to where you already call distribute_dofs().")); if (external_partitioners.size() > 0) { - Assert( - this->initialize_dof_vector == nullptr, - ExcMessage( - "A initialize_dof_vector function has already been registered in the constructor!")); + Assert(this->initialize_dof_vector == nullptr, + ExcMessage("An initialize_dof_vector function has already " + "been registered in the constructor!")); this->initialize_dof_vector = [external_partitioners](