From: Timo Heister Date: Wed, 4 Nov 2020 13:44:16 +0000 (-0500) Subject: step-7: mark some ints as doubles X-Git-Tag: v9.3.0-rc1~934^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28ee015f60777b716e1c8f8d746c0e3370c78498;p=dealii.git step-7: mark some ints as doubles --- diff --git a/examples/step-7/step-7.cc b/examples/step-7/step-7.cc index 14e0b40630..91628c7b47 100644 --- a/examples/step-7/step-7.cc +++ b/examples/step-7/step-7.cc @@ -254,7 +254,7 @@ namespace Step7 // add up multiples of this distance vector, where the factor is given // by the exponentials. return_value += - (-2 / (this->width * this->width) * + (-2. / (this->width * this->width) * std::exp(-x_minus_xi.norm_square() / (this->width * this->width)) * x_minus_xi); } @@ -293,8 +293,8 @@ namespace Step7 // The first contribution is the Laplacian: return_value += - ((2 * dim - - 4 * x_minus_xi.norm_square() / (this->width * this->width)) / + ((2. * dim - + 4. * x_minus_xi.norm_square() / (this->width * this->width)) / (this->width * this->width) * std::exp(-x_minus_xi.norm_square() / (this->width * this->width))); // And the second is the solution itself: @@ -967,15 +967,15 @@ namespace Step7 { if (cycle == 0) { - GridGenerator::hyper_cube(triangulation, -1, 1); + GridGenerator::hyper_cube(triangulation, -1., 1.); triangulation.refine_global(3); for (const auto &cell : triangulation.cell_iterators()) for (const auto &face : cell->face_iterators()) { const auto center = face->center(); - if ((std::fabs(center(0) - (-1)) < 1e-12) || - (std::fabs(center(1) - (-1)) < 1e-12)) + if ((std::fabs(center(0) - (-1.0)) < 1e-12) || + (std::fabs(center(1) - (-1.0)) < 1e-12)) face->set_boundary_id(1); } }