]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Error in subtract_mean_value removed
authorcvs <cvs@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 12 Oct 1999 16:16:13 +0000 (16:16 +0000)
committercvs <cvs@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 12 Oct 1999 16:16:13 +0000 (16:16 +0000)
git-svn-id: https://svn.dealii.org/trunk@1761 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/numerics/vectors.cc

index 0c8d998b3a08968c542c2a984f3269723d34d537..a12b946c3e3d6fa286ddfb5b5f84247804a415d4 100644 (file)
@@ -1116,6 +1116,8 @@ VectorTools<dim>::subtract_mean_value(Vector<double>& v, const
   for (unsigned int i=0;i<n;++i)
     if (p_select[i]) s += v(i);
 
+  s /= n;
+  
   for (unsigned int i=0;i<n;++i)
     if (p_select[i]) v(i) -= s;  
 }

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.