]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Better fix for grid_tools.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 5 Feb 2015 12:49:33 +0000 (06:49 -0600)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 5 Feb 2015 12:49:33 +0000 (06:49 -0600)
source/grid/grid_tools.cc

index 83cf76e6a6ad7db903ebedc556cdbfdc95d570e2..c9e5d9d2a74c9887135e933957e94a4d801ad4c7 100644 (file)
@@ -2163,14 +2163,14 @@ next_cell:
               {
                 const double eps = step_length/10;
 
-                Point<spacedim> h;
+                Tensor<1,spacedim> h;
                 h[d] = eps/2;
 
                 if (respect_manifold == false)
                   gradient[d]
                     = ((objective_function (object, object_mid_point + h)
                         -
-                        objective_function (object, object_mid_point + (-h)))
+                        objective_function (object, object_mid_point - h))
                        /
                        eps);
                 else
@@ -2181,7 +2181,7 @@ next_cell:
                         -
                         objective_function (object,
                                             manifold->project_to_surface(object,
-                                                                         object_mid_point + (-h))))
+                                                                         object_mid_point - h)))
                        /
                        eps);
               }

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.