From 7e7d64e63ce996bd58dcdeaec400b05f971f1e93 Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Mon, 23 Nov 2020 13:09:46 +0100 Subject: [PATCH] Fix VectorDataExchange::zero_vector_region for Vector --- include/deal.II/matrix_free/matrix_free.h | 6 +----- tests/simplex/matrix_free_01.cc | 6 ++---- 2 files changed, 3 insertions(+), 9 deletions(-) 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); -- 2.39.5