]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix LA::Vector::reinit() 13268/head
authorPeter Munch <peterrmuench@gmail.com>
Wed, 19 Jan 2022 20:57:35 +0000 (21:57 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Wed, 19 Jan 2022 20:57:35 +0000 (21:57 +0100)
include/deal.II/lac/la_vector.templates.h

index c8713aea5bc4f10c16e8d96609e273abb8212e65..5d687738698e619f17a3b5d99cb822dc3e376432 100644 (file)
@@ -71,11 +71,7 @@ namespace LinearAlgebra
     Assert(dynamic_cast<const Vector<Number> *>(&V) != nullptr,
            ExcVectorTypeNotCompatible());
 
-    // Downcast V. If fails, throws an exception.
     const Vector<Number> &down_V = dynamic_cast<const Vector<Number> &>(V);
-    Assert(down_V.size() == this->size(),
-           ExcMessage(
-             "Cannot add two vectors with different numbers of elements"));
 
     ReadWriteVector<Number>::reinit(down_V, omit_zeroing_entries);
   }

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.