From: Peter Munch Date: Wed, 21 Oct 2020 14:07:59 +0000 (+0200) Subject: Use MatrixFree::initialize_dof_vector() at two places X-Git-Tag: v9.3.0-rc1~988^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69bceee4ff945e1121b04f05b7a69b7e8db7c322;p=dealii.git Use MatrixFree::initialize_dof_vector() at two places --- 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); }