From: Peter Munch Date: Wed, 19 Jan 2022 20:57:35 +0000 (+0100) Subject: Fix LA::Vector::reinit() X-Git-Tag: v9.4.0-rc1~584^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13268%2Fhead;p=dealii.git Fix LA::Vector::reinit() --- diff --git a/include/deal.II/lac/la_vector.templates.h b/include/deal.II/lac/la_vector.templates.h index c8713aea5b..5d68773869 100644 --- a/include/deal.II/lac/la_vector.templates.h +++ b/include/deal.II/lac/la_vector.templates.h @@ -71,11 +71,7 @@ namespace LinearAlgebra Assert(dynamic_cast *>(&V) != nullptr, ExcVectorTypeNotCompatible()); - // Downcast V. If fails, throws an exception. const Vector &down_V = dynamic_cast &>(V); - Assert(down_V.size() == this->size(), - ExcMessage( - "Cannot add two vectors with different numbers of elements")); ReadWriteVector::reinit(down_V, omit_zeroing_entries); }