]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix VectorDataExchange::zero_vector_region for Vector 11233/head
authorPeter Munch <peterrmuench@gmail.com>
Mon, 23 Nov 2020 12:09:46 +0000 (13:09 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Tue, 24 Nov 2020 09:58:09 +0000 (10:58 +0100)
include/deal.II/matrix_free/matrix_free.h
tests/simplex/matrix_free_01.cc

index fe03c8a0a104b76562100e7accf2406f5f423014..4438f81211e556e693ff90667e4f6c05d9c379cb 100644 (file)
@@ -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());
-        }
     }
 
 
index 90741f868357eedef60cbbd9475663ffe75f9f22..94e0f4031d7bb67d2e99ddf81f787cbafee6d325 100644 (file)
@@ -18,8 +18,6 @@
 // continuous elements and compare results between matrix-free and matrix-based
 // implementations.
 
-#include <deal.II/distributed/tria.h>
-
 #include <deal.II/dofs/dof_handler.h>
 #include <deal.II/dofs/dof_tools.h>
 
@@ -54,7 +52,7 @@ template <int dim>
 class PoissonOperator
 {
 public:
-  using VectorType = LinearAlgebra::distributed::Vector<double>;
+  using VectorType = Vector<double>;
 
   PoissonOperator(const MatrixFree<dim, double> &matrix_free,
                   const bool                     do_helmholtz)
@@ -179,7 +177,7 @@ test(const unsigned int degree, const bool do_helmholtz)
 
     PoissonOperator<dim> poisson_operator(matrix_free, do_helmholtz);
 
-    LinearAlgebra::distributed::Vector<double> x, b;
+    Vector<double> x, b;
     poisson_operator.initialize_dof_vector(x);
     poisson_operator.initialize_dof_vector(b);
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.