]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
step-4: write constants as doubles
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 22 Jan 2014 15:51:32 +0000 (15:51 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 22 Jan 2014 15:51:32 +0000 (15:51 +0000)
git-svn-id: https://svn.dealii.org/trunk@32285 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-4/step-4.cc

index d6ed24c0e9479c4680754f87ea8026ad21747e82..f2bc57d2d25d582a1d3977cf656a18ebc7ef2f2d 100644 (file)
@@ -172,9 +172,9 @@ template <int dim>
 double RightHandSide<dim>::value (const Point<dim> &p,
                                   const unsigned int /*component*/) const
 {
-  double return_value = 0;
+  double return_value = 0.0;
   for (unsigned int i=0; i<dim; ++i)
-    return_value += 4*std::pow(p(i), 4);
+    return_value += 4.0 * std::pow(p(i), 4.0);
 
   return return_value;
 }

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.