]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make output_matrix work for empty matrices as well
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 11 Aug 2006 13:17:51 +0000 (13:17 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 11 Aug 2006 13:17:51 +0000 (13:17 +0000)
git-svn-id: https://svn.dealii.org/trunk@13658 0785d39b-7218-0410-832d-ea1e28bc413d

tests/bits/fe_tools_common.cc

index 5986d90da81441d7efc83e74ab22a1811956175c..8c384d133753002c711b7cbf530d216ff8f3868b 100644 (file)
@@ -56,6 +56,12 @@ extern std::string output_file_name;
 void
 output_matrix (const FullMatrix<double> &m)
 {
+  if ((m.m() == 0) || (m.n() == 0))
+    {
+      deallog << "(Empty matrix)" << std::endl;
+      return;
+    }
+  
   deallog << m.l1_norm() << ' ' << m.linfty_norm()
           << std::endl;
   if (m.m() == m.n())

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.