From 2dd3bbd6f5223561c15aabef417394d57d653728 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 5 Feb 2015 06:49:33 -0600 Subject: [PATCH] Better fix for grid_tools. --- source/grid/grid_tools.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/grid/grid_tools.cc b/source/grid/grid_tools.cc index 83cf76e6a6..c9e5d9d2a7 100644 --- a/source/grid/grid_tools.cc +++ b/source/grid/grid_tools.cc @@ -2163,14 +2163,14 @@ next_cell: { const double eps = step_length/10; - Point 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); } -- 2.39.5