From: kronbichler Date: Mon, 21 Apr 2014 16:22:07 +0000 (+0000) Subject: Yet better information for test case failure: It looks like the big expression contai... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5958deb645fb44a7b553e1040027fe4b0bc0e930;p=dealii-svn.git Yet better information for test case failure: It looks like the big expression containing std::sin is evaluated wrongly whereas when using only individual terms things get right. git-svn-id: https://svn.dealii.org/trunk@32798 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/matrix_free/step-48b.cc b/tests/matrix_free/step-48b.cc index 650b6affb4..15dec5539b 100644 --- a/tests/matrix_free/step-48b.cc +++ b/tests/matrix_free/step-48b.cc @@ -15,7 +15,7 @@ // --------------------------------------------------------------------- -// simplified version of step-48, no sine term (i.e., usual wave equation) +// simplified version of step-48 #include "../tests.h" @@ -139,6 +139,9 @@ namespace Step48 const VectorizedArray submit_value = 2.*current_value - old_value - delta_t_sqr * std::sin(current_value); + const VectorizedArray simple_value = + 2.*current_value - old_value; + const VectorizedArray sin_value = delta_t_sqr * std::sin(current_value); current.submit_value (submit_value,q); current.submit_gradient (- delta_t_sqr * current.get_gradient(q), q); @@ -148,13 +151,13 @@ namespace Step48 // width) if (q==0) for (unsigned int v=0; v::n_array_elements; ++v) - deallog << submit_value[v] << " " << (delta_t_sqr*std::sin(current_value))[v] << " "; + deallog << submit_value[v] << " = " << simple_value[v] << " - " + << sin_value[v] << std::endl; } current.integrate (true,true); current.distribute_local_to_global (dst); } - deallog << std::endl; } @@ -187,7 +190,7 @@ namespace Step48 double ExactSolution::value (const Point &p, const unsigned int /* component */) const { - return 4.*std::exp(-p.square()*10); + return std::exp(-p.distance(Point<2>(0.03, -0.2))*p.distance(Point<2>(0.03,-0.2))*0.1); } @@ -230,7 +233,7 @@ namespace Step48 dof_handler (triangulation), n_global_refinements (2), time (-10), - final_time (-9.5), + final_time (-9.75), cfl_number (.1/fe_degree), output_timestep_skip (1) {}