]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix some assertions in FullMatrix.
authorDavid Wells <wellsd2@rpi.edu>
Fri, 16 Mar 2018 16:03:23 +0000 (12:03 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Fri, 16 Mar 2018 17:41:43 +0000 (13:41 -0400)
include/deal.II/lac/full_matrix.templates.h

index 9859a8992e891fc9258305a8287798aa466350af..6132eeeadef442aa3a8cc7850e1921c146303183 100644 (file)
@@ -108,7 +108,7 @@ FullMatrix<number> &
 FullMatrix<number>::operator = (const LAPACKFullMatrix<number2> &M)
 {
   Assert (this->m() == M.n_rows(), ExcDimensionMismatch(this->m(), M.n_rows()));
-  Assert (this->n() == M.n_cols(), ExcDimensionMismatch(this->n(), M.n_rows()));
+  Assert (this->n() == M.n_cols(), ExcDimensionMismatch(this->n(), M.n_cols()));
   for (size_type i=0; i<this->m(); ++i)
     for (size_type j=0; j<this->n(); ++j)
       (*this)(i,j) = M(i,j);
@@ -932,7 +932,7 @@ FullMatrix<number>::matrix_scalar_product (const Vector<number2> &u,
 {
   Assert (!this->empty(), ExcEmptyMatrix());
 
-  Assert(m() == u.size(), ExcDimensionMismatch(m(),v.size()));
+  Assert(m() == u.size(), ExcDimensionMismatch(m(),u.size()));
   Assert(n() == v.size(), ExcDimensionMismatch(n(),v.size()));
 
   number2 sum = 0.;

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.