]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix structure of Assert in scalapack.cc 5803/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Thu, 25 Jan 2018 16:02:21 +0000 (17:02 +0100)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Thu, 25 Jan 2018 16:02:21 +0000 (17:02 +0100)
source/lac/scalapack.cc

index 174cd0a830eefe9f52e7b9f37be1bb8569a095bb..b7918ed7f5348252bf7dd2249de3c32c29339872 100644 (file)
@@ -627,9 +627,14 @@ void ScaLAPACKMatrix<NumberType>::least_squares(ScaLAPACKMatrix<NumberType> &B,
   Assert (B.state == LAPACKSupport::matrix,
           ExcMessage("Matrix B has to be in Matrix state before calling this function."));
 
-  transpose ?
-  (Assert(n_columns==B.n_rows,ExcDimensionMismatch(n_columns,B.n_rows))) :
-  (Assert(n_rows==B.n_rows,ExcDimensionMismatch(n_rows,B.n_rows)));
+  if (transpose)
+    {
+      Assert(n_columns==B.n_rows,ExcDimensionMismatch(n_columns,B.n_rows));
+    }
+  else
+    {
+      Assert(n_rows==B.n_rows,ExcDimensionMismatch(n_rows,B.n_rows));
+    }
 
   //see https://www.ibm.com/support/knowledgecenter/en/SSNR5K_4.2.0/com.ibm.cluster.pessl.v4r2.pssl100.doc/am6gr_lgels.htm
   Assert(row_block_size==column_block_size,ExcMessage("Use identical block sizes for rows and columns of matrix A"));

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.