From 69bceee4ff945e1121b04f05b7a69b7e8db7c322 Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Wed, 21 Oct 2020 16:07:59 +0200 Subject: [PATCH] Use MatrixFree::initialize_dof_vector() at two places --- include/deal.II/matrix_free/operators.h | 5 +++-- tests/matrix_free/parallel_multigrid_adaptive_08.cc | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/deal.II/matrix_free/operators.h b/include/deal.II/matrix_free/operators.h index cd5cb3e7ca..d48471dda7 100644 --- a/include/deal.II/matrix_free/operators.h +++ b/include/deal.II/matrix_free/operators.h @@ -1385,8 +1385,9 @@ namespace MatrixFreeOperators // lost LinearAlgebra::distributed::Vector copy_vec( BlockHelper::subblock(src, i)); - BlockHelper::subblock(const_cast(src), i) - .reinit(data->get_dof_info(mf_component).vector_partitioner); + this->data->initialize_dof_vector( + BlockHelper::subblock(const_cast(src), i), + mf_component); BlockHelper::subblock(const_cast(src), i) .copy_locally_owned_data_from(copy_vec); } diff --git a/tests/matrix_free/parallel_multigrid_adaptive_08.cc b/tests/matrix_free/parallel_multigrid_adaptive_08.cc index 972cf28d9b..103c214855 100644 --- a/tests/matrix_free/parallel_multigrid_adaptive_08.cc +++ b/tests/matrix_free/parallel_multigrid_adaptive_08.cc @@ -166,8 +166,8 @@ private: ExcMessage("The vector passed to the vmult() function does not have " "the correct size for compatibility with MatrixFree.")); LinearAlgebra::distributed::Vector copy_vec(vec); - const_cast &>(vec).reinit( - this->data->get_dof_info(0).vector_partitioner); + this->data->initialize_dof_vector( + const_cast &>(vec), 0); const_cast &>(vec) .copy_locally_owned_data_from(copy_vec); } -- 2.39.5