]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use MatrixFree::initialize_dof_vector() at two places 11070/head
authorPeter Munch <peterrmuench@gmail.com>
Wed, 21 Oct 2020 14:07:59 +0000 (16:07 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Wed, 21 Oct 2020 14:07:59 +0000 (16:07 +0200)
include/deal.II/matrix_free/operators.h
tests/matrix_free/parallel_multigrid_adaptive_08.cc

index cd5cb3e7cae5fb107f76405447bc07dc1a5b6ded..d48471dda7766515d736a38a909bdd4b5d41dec4 100644 (file)
@@ -1385,8 +1385,9 @@ namespace MatrixFreeOperators
         // lost
         LinearAlgebra::distributed::Vector<Number> copy_vec(
           BlockHelper::subblock(src, i));
-        BlockHelper::subblock(const_cast<VectorType &>(src), i)
-          .reinit(data->get_dof_info(mf_component).vector_partitioner);
+        this->data->initialize_dof_vector(
+          BlockHelper::subblock(const_cast<VectorType &>(src), i),
+          mf_component);
         BlockHelper::subblock(const_cast<VectorType &>(src), i)
           .copy_locally_owned_data_from(copy_vec);
       }
index 972cf28d9b7bb20133540afb8781e32a8d47fbb1..103c2148559c67fd039fe7e802a8e246a17a112b 100644 (file)
@@ -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<Number> copy_vec(vec);
-    const_cast<LinearAlgebra::distributed::Vector<Number> &>(vec).reinit(
-      this->data->get_dof_info(0).vector_partitioner);
+    this->data->initialize_dof_vector(
+      const_cast<LinearAlgebra::distributed::Vector<Number> &>(vec), 0);
     const_cast<LinearAlgebra::distributed::Vector<Number> &>(vec)
       .copy_locally_owned_data_from(copy_vec);
   }

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.