]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Update a test that now produces different output since the change that makes Sparsity...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 10 Feb 2013 05:02:06 +0000 (05:02 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 10 Feb 2013 05:02:06 +0000 (05:02 +0000)
git-svn-id: https://svn.dealii.org/trunk@28305 0785d39b-7218-0410-832d-ea1e28bc413d

tests/bits/chunk_sparse_matrix_05a.cc
tests/bits/chunk_sparse_matrix_05a/cmp/generic

index e6608cdaa80d15886fbc93df9bd75917e107eb6d..3a48e16e15eea7d178cd86a979a1781ddab2ef62 100644 (file)
@@ -1,8 +1,8 @@
 //----------------------------  chunk_sparse_matrix_05a.cc  ---------------------------
 //    $Id$
-//    Version: $Name$ 
+//    Version: $Name$
 //
-//    Copyright (C) 2004, 2005, 2008 by the deal.II authors
+//    Copyright (C) 2004, 2005, 2008, 2013 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
 // ChunkSparseMatrix when we don't store the diagonal elements explicitly
 
 #include "../tests.h"
-#include <deal.II/lac/chunk_sparse_matrix.h>    
+#include <deal.II/lac/chunk_sparse_matrix.h>
 #include <fstream>
 
 
 void test (const unsigned int chunk_size)
 {
-  ChunkSparsityPattern sp (5,5,3,chunk_size,false);
+  ChunkSparsityPattern sp (5,5,3,chunk_size);
   for (unsigned int i=0; i<5; ++i)
     for (unsigned int j=0; j<5; ++j)
       if ((i+2*j+1) % 3 == 0)
@@ -30,17 +30,15 @@ void test (const unsigned int chunk_size)
   sp.compress ();
 
   ChunkSparseMatrix<double> m(sp);
-  
+
                                    // first set a few entries. count how many
                                    // entries we have. note that for square
                                    // matrices we also always store the
-                                   // diagonal element, except when as above
-                                   // we set the special flag for the matrix
-                                   // sparsity pattern
+                                   // diagonal element
   unsigned int counter = 0;
   for (unsigned int i=0; i<m.m(); ++i)
     for (unsigned int j=0; j<m.n(); ++j)
-      if ((i+2*j+1) % 3 == 0)
+      if (((i+2*j+1) % 3 == 0) || (i==j))
         {
           m.set (i,j, i*j*.5+.5);
           ++counter;
@@ -54,7 +52,7 @@ void test (const unsigned int chunk_size)
   else
     Assert (m.n_nonzero_elements() >= counter,
            ExcInternalError());
-  
+
   deallog << "OK" << std::endl;
 }
 
@@ -85,10 +83,10 @@ int main ()
                << "Aborting!" << std::endl
                << "----------------------------------------------------"
                << std::endl;
-      
+
       return 1;
     }
-  catch (...) 
+  catch (...)
     {
       deallog << std::endl << std::endl
                << "----------------------------------------------------"
index 5f8ca8feaa7e6bf56cbc7d03615f8186b09a351c..1af82416568046e449fc8f78e5fddd11d83a04f2 100644 (file)
@@ -1,9 +1,9 @@
 
-DEAL::8
+DEAL::13
 DEAL::OK
-DEAL::22
+DEAL::23
 DEAL::OK
-DEAL::24
+DEAL::25
 DEAL::OK
 DEAL::25
 DEAL::OK

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.