]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix a loop
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Sat, 3 Dec 2005 17:31:03 +0000 (17:31 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Sat, 3 Dec 2005 17:31:03 +0000 (17:31 +0000)
git-svn-id: https://svn.dealii.org/trunk@11810 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/multigrid/multigrid.all_dimensions.cc

index 27aeee36453512cb6bc244f3f02580a16ea7f477..a4204673e9698fabbcc7012f3874ac241d2ee379 100644 (file)
@@ -186,14 +186,14 @@ void MGTransferBlock<number>::restrict_and_add (
   unsigned int k=0;
   for (unsigned int b=0; b<src.n_blocks();++b)
     {
-      if (!selected[k])
-       ++k;
+      while (!selected[k]) ++k;
       if (factors.size() != 0)
        {
          Assert (memory != 0, ExcNotInitialized());
          Vector<number>* aux = memory->alloc();
          aux->reinit(dst.block(b));
          prolongation_matrices[from_level-1]->block(k,k).Tvmult (*aux, src.block(b));
+         
          dst.block(b).add(factors[k], *aux);
          memory->free(aux);
        }

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.