]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
check block_read and block_write properly
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 24 Jun 2005 14:25:14 +0000 (14:25 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 24 Jun 2005 14:25:14 +0000 (14:25 +0000)
git-svn-id: https://svn.dealii.org/trunk@10934 0785d39b-7218-0410-832d-ea1e28bc413d

tests/lac/sparsity_pattern.cc
tests/results/i686-pc-linux-gnu+gcc3.2/lac/sparsity_pattern.output

index 3644f73e1479a013c9ca226eb8d86c9eb9bffe42..56c5f53d8f658fd21acebfc061c2e3d5d828166f 100644 (file)
@@ -137,25 +137,33 @@ main ()
   std::ofstream tmp_write("sparsity_pattern.tmp");
   sp3.block_write (tmp_write);
   tmp_write.close ();
+
+  SparsityPattern sp5;
   
   std::ifstream tmp_read("sparsity_pattern.tmp");
-  sp4.block_read (tmp_read);
+  sp5.block_read (tmp_read);
   tmp_read.close ();
 
                                    // delete temporary file
   std::remove ("sparsity_pattern.tmp");
   
-                                  // now check for equivalence of sp3 and sp4
+                                  // now check for equivalence of sp3 and sp5
+  deallog << sp3.n_rows() - sp5.n_rows() << ' '
+         << sp3.n_cols() - sp5.n_cols() << ' '
+         << (sp3.is_compressed() ^ sp5.is_compressed()) << ' '
+         << (sp3.is_compressed() ^ sp5.is_compressed()) << ' '
+         << std::endl;
+  
   for (unsigned int row=0; row<sp3.n_rows(); ++row)
     {
       const unsigned int
         *sp3_p=sp3.get_column_numbers()+sp3.get_rowstart_indices()[row];
       const unsigned int
-        *sp4_p=sp4.get_column_numbers()+sp4.get_rowstart_indices()[row];
+        *sp5_p=sp5.get_column_numbers()+sp5.get_rowstart_indices()[row];
       for (; sp3_p != (sp3.get_column_numbers() +
                        sp3.get_rowstart_indices()[row+1]);
-           ++sp3_p, ++sp4_p)
-       Assert (*sp3_p == *sp4_p, ExcInternalError());
+           ++sp3_p, ++sp5_p)
+       Assert (*sp3_p == *sp5_p, ExcInternalError());
     };
 }
 
index e0395c4d2b720519d287cbdf638da8cfcfe03a32..b27383119c102cca6c4af6f535957f6544bb7ff3 100644 (file)
@@ -4574,3 +4574,4 @@ DEAL::5
 181 -195
 193 -195
 194 -195
+DEAL::0 0 0 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.