]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
updated tests
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 28 Sep 2011 01:56:07 +0000 (01:56 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 28 Sep 2011 01:56:07 +0000 (01:56 +0000)
git-svn-id: https://svn.dealii.org/trunk@24452 0785d39b-7218-0410-832d-ea1e28bc413d

tests/lac/solver_relaxation_02.cc
tests/lac/solver_relaxation_03.cc

index 268e6860650be9670dab438bf9940e469e7c7787..65de156ff5baea22b3a3f94bd0c87eada558b9cc 100644 (file)
@@ -79,19 +79,17 @@ int main()
        {
          deallog << "Block size " << blocksize << std::endl;
 
-         const unsigned int n_blocks = dim/blocksize;
-         std::vector<unsigned int> indices(blocksize);
-         
+         const unsigned int n_blocks = dim/blocksize;    
          RelaxationBlock<SparseMatrix<double>,double>::AdditionalData relax_data(0.8);
          PreconditionBlock<SparseMatrix<double>,double>::AdditionalData prec_data(blocksize, 0.8);
          
-         relax_data.block_list.initialize(n_blocks);
+         relax_data.block_list.reinit(n_blocks, dim, blocksize);
          for (unsigned int block=0;block<n_blocks;++block)
            {
              for (unsigned int i=0;i<blocksize;++i)
-               indices[i] = i+block*blocksize;
-             relax_data.block_list.add(block, indices);
+               relax_data.block_list.add(block, i+block*blocksize);
            }
+         relax_data.block_list.compress();
          
          PreconditionBlockJacobi<SparseMatrix<double>,double> prec_jacobi;
          prec_jacobi.initialize(A, prec_data);
index 205244cef7098e9b6639a18a141b532c0e311db6..7050b697d46eb2d65db8de85de350c8d3580eb2e 100644 (file)
@@ -84,9 +84,7 @@ int main()
        {
          deallog << "Block size " << blocksize << std::endl;
 
-         const unsigned int n_blocks = dim/blocksize;
-         std::vector<unsigned int> indices(blocksize);
-
+         const unsigned int n_blocks = dim/blocksize;    
          RelaxationBlock<SparseMatrix<double>,double>::AdditionalData relax_data(0.8);
          PreconditionBlock<SparseMatrix<double>,double>::AdditionalData prec_data(blocksize, 0.8);
          
@@ -94,14 +92,14 @@ int main()
          std::vector<unsigned int> bperm(n_blocks);
          std::vector<unsigned int> ibperm(n_blocks);
          
-         relax_data.block_list.initialize(n_blocks);
+         relax_data.block_list.reinit(n_blocks, dim, blocksize);
          for (unsigned int block=0;block<n_blocks;++block)
            {
              bperm[block] = n_blocks-block-1;
              for (unsigned int i=0;i<blocksize;++i)
-               indices[i] = i+block*blocksize;
-             relax_data.block_list.add(block, indices);
+               relax_data.block_list.add(block, i+block*blocksize);
            }
+         relax_data.block_list.compress();
                                           // Currently, bperm is just
                                           // the inversion.
                                           // Now swap the last two

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.