]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
stupid error removed
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 13 Nov 2000 11:19:48 +0000 (11:19 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 13 Nov 2000 11:19:48 +0000 (11:19 +0000)
git-svn-id: https://svn.dealii.org/trunk@3481 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/source/function_derivative.cc

index 5866eb9747b3bf9046deb70b9015e36de3530a8f..ad76305d02fd0eacf646257afc238660e50a3605 100644 (file)
@@ -58,7 +58,7 @@ FunctionDerivative<dim>::value (const Point<dim>   &p,
   switch (formula)
     {
     case Euler:
-      return (f.value(p+incr, component)-f.value(p-incr, component))/2*h;
+      return (f.value(p+incr, component)-f.value(p-incr, component))/(2*h);
     case UpwindEuler:
       return (f.value(p, component)-f.value(p-incr, component))/h;
     default:
@@ -91,8 +91,11 @@ FunctionDerivative<dim>::value_list (const vector<Point<dim> > &points,
        }
       f.value_list(p1, values, component);
       f.value_list(p2, e2, component);
+      
       for (unsigned int i=0;i<n;++i)
-       values[i] = (values[i]-e2[i])/2*h;
+       {
+         values[i] = (values[i]-e2[i])/(2*h);
+       }
       break;
     }    
     case UpwindEuler:

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.