From: Peter Munch Date: Mon, 23 Nov 2020 12:09:46 +0000 (+0100) Subject: Fix VectorDataExchange::zero_vector_region for Vector X-Git-Tag: v9.3.0-rc1~855^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F11233%2Fhead;p=dealii.git Fix VectorDataExchange::zero_vector_region for Vector --- diff --git a/include/deal.II/matrix_free/matrix_free.h b/include/deal.II/matrix_free/matrix_free.h index fe03c8a0a1..4438f81211 100644 --- a/include/deal.II/matrix_free/matrix_free.h +++ b/include/deal.II/matrix_free/matrix_free.h @@ -3797,12 +3797,8 @@ namespace internal void zero_vector_region(const unsigned int range_index, VectorType &vec) const { - if (range_index == numbers::invalid_unsigned_int) + if (range_index == numbers::invalid_unsigned_int || range_index == 0) vec = typename VectorType::value_type(); - else - { - Assert(false, ExcNotImplemented()); - } } diff --git a/tests/simplex/matrix_free_01.cc b/tests/simplex/matrix_free_01.cc index 90741f8683..94e0f4031d 100644 --- a/tests/simplex/matrix_free_01.cc +++ b/tests/simplex/matrix_free_01.cc @@ -18,8 +18,6 @@ // continuous elements and compare results between matrix-free and matrix-based // implementations. -#include - #include #include @@ -54,7 +52,7 @@ template class PoissonOperator { public: - using VectorType = LinearAlgebra::distributed::Vector; + using VectorType = Vector; PoissonOperator(const MatrixFree &matrix_free, const bool do_helmholtz) @@ -179,7 +177,7 @@ test(const unsigned int degree, const bool do_helmholtz) PoissonOperator poisson_operator(matrix_free, do_helmholtz); - LinearAlgebra::distributed::Vector x, b; + Vector x, b; poisson_operator.initialize_dof_vector(x); poisson_operator.initialize_dof_vector(b);