From: kronbichler Date: Mon, 21 Apr 2014 08:31:31 +0000 (+0000) Subject: Further simplification of test output. Update comment. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=141c4bac795314a72b8d6db38860c9c10b866cc3;p=dealii-svn.git Further simplification of test output. Update comment. git-svn-id: https://svn.dealii.org/trunk@32797 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/base/vectorization.h b/deal.II/include/deal.II/base/vectorization.h index 874f267644..a8e14d9dac 100644 --- a/deal.II/include/deal.II/base/vectorization.h +++ b/deal.II/include/deal.II/base/vectorization.h @@ -1750,7 +1750,7 @@ DEAL_II_NAMESPACE_CLOSE namespace std { /** - * Computes the sine of a vectorized data field. The result is return as + * Computes the sine of a vectorized data field. The result is returned as * vectorized array in the form {sin(x[0]), sin(x[1]), ..., * sin(x[n_array_elements-1])}. * @@ -1770,7 +1770,7 @@ namespace std /** - * Computes the tangent of a vectorized data field. The result is return as + * Computes the tangent of a vectorized data field. The result is returned as * vectorized array in the form {tan(x[0]), tan(x[1]), ..., * tan(x[n_array_elements-1])}. * @@ -1789,7 +1789,7 @@ namespace std /** - * Computes the cosine of a vectorized data field. The result is return as + * Computes the cosine of a vectorized data field. The result is returned as * vectorized array in the form {cos(x[0]), cos(x[1]), ..., * cos(x[n_array_elements-1])}. * @@ -1808,7 +1808,7 @@ namespace std /** - * Computes the exponential of a vectorized data field. The result is return + * Computes the exponential of a vectorized data field. The result is returned * as vectorized array in the form {exp(x[0]), exp(x[1]), ..., * exp(x[n_array_elements-1])}. * @@ -1828,7 +1828,7 @@ namespace std /** * Computes the natural logarithm of a vectorized data field. The result is - * return as vectorized array in the form {log(x[0]), log(x[1]), ..., + * returned as vectorized array in the form {log(x[0]), log(x[1]), ..., * log(x[n_array_elements-1])}. * * @relates VectorizedArray @@ -1847,7 +1847,7 @@ namespace std /** - * Computes the square root of a vectorized data field. The result is return + * Computes the square root of a vectorized data field. The result is returned * as vectorized array in the form {sqrt(x[0]), sqrt(x[1]), ..., * sqrt(x[n_array_elements-1])}. * @@ -1865,7 +1865,7 @@ namespace std /** * Computes the absolute value (modulus) of a vectorized data field. The - * result is return as vectorized array in the form {abs(x[0]), + * result is returned as vectorized array in the form {abs(x[0]), * abs(x[1]), ..., abs(x[n_array_elements-1])}. * * @relates VectorizedArray @@ -1882,7 +1882,7 @@ namespace std /** * Computes the componentwise maximum of two vectorized data fields. The - * result is return as vectorized array in the form {max(x[0],y[0]), + * result is returned as vectorized array in the form {max(x[0],y[0]), * max(x[1],y[1]), ...}. * * @relates VectorizedArray @@ -1900,7 +1900,7 @@ namespace std /** * Computes the componentwise minimum of two vectorized data fields. The - * result is return as vectorized array in the form {min(x[0],y[0]), + * result is returned as vectorized array in the form {min(x[0],y[0]), * min(x[1],y[1]), ...}. * * @relates VectorizedArray diff --git a/tests/base/vectorization_01.cc b/tests/base/vectorization_01.cc index 4d02ddadda..3d0fa338a1 100644 --- a/tests/base/vectorization_01.cc +++ b/tests/base/vectorization_01.cc @@ -110,9 +110,9 @@ void test () deallog << "OK" << std::endl << "Sine: "; - e = std::sin(b); + e = std::sin(d); for (unsigned int i=0; i::epsilon(), ExcInternalError()); deallog << "OK" << std::endl diff --git a/tests/matrix_free/step-48b.cc b/tests/matrix_free/step-48b.cc index 1a2e35acd6..650b6affb4 100644 --- a/tests/matrix_free/step-48b.cc +++ b/tests/matrix_free/step-48b.cc @@ -120,7 +120,7 @@ namespace Step48 { AssertDimension (src.size(), 2); FEEvaluationGL current (data), old (data); - deallog << "submitted values: "; + deallog << "submit / sine values: "; for (unsigned int cell=cell_range.first; cell current_value = current.get_value(q); const VectorizedArray old_value = old.get_value(q); - current.submit_value (2.*current_value - old_value - - delta_t_sqr * std::sin(current_value),q); + const VectorizedArray submit_value = + 2.*current_value - old_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); + + // output first value on quadrature point for all vector + // components (should be stable irrespective of vectorization + // 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] << " "; } - // output first value on quadrature point for all vector components - // (should be stable irrespective of vectorization width) - for (unsigned int v=0; v::n_array_elements; ++v) - deallog << current.begin_values()[0][v] << " "; current.integrate (true,true); current.distribute_local_to_global (dst); } deallog << std::endl; - - deallog << "no sine term: "; - // now output similar terms again but without the sine term (and do not - // write anything back to the solution vector) - for (unsigned int cell=cell_range.first; cell current_value = current.get_value(q); - const VectorizedArray old_value = old.get_value(q); - - current.submit_value (2.*current_value - old_value, q); - current.submit_gradient (- delta_t_sqr * - current.get_gradient(q), q); - } - // output first value on quadrature point for all vector components - // (should be stable irrespective of vectorization width) - for (unsigned int v=0; v::n_array_elements; ++v) - deallog << current.begin_values()[0][v] << " "; - } - deallog << std::endl; } diff --git a/tests/matrix_free/step-48b.output b/tests/matrix_free/step-48b.output index 20f0dcd6e1..4643d57ba2 100644 --- a/tests/matrix_free/step-48b.output +++ b/tests/matrix_free/step-48b.output @@ -4,11 +4,9 @@ DEAL:: Number of degrees of freedom: 289 DEAL:: Time step size: 0.2500, finest cell: 7.500 DEAL:: DEAL:: Time: -10.0 , solution norm: 7.11111164 -DEAL::submitted values: 0 0 0 0 0 0 0 0 0 0 0 0 0.569151584 0 0 0 -DEAL::no sine term: 0 0 0 0 0 0 0 0 0 0 0 0 0.562500000 0 0 0 +DEAL::submit / sine values: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4.04730016 -0.0473001560 0 0 0 0 0 0 DEAL:: Time: -9.75 , solution norm: 3.78861141 -DEAL::submitted values: 0 0 0 0 0 0 -0.00121093741 0 0 -0.00121093741 0 0 0.222882619 -0.00121093741 -0.00121093741 0 -DEAL::no sine term: 0 0 0 0 0 0 -0.00124999978 0 0 -0.00124999978 0 0 0.225803189 -0.00124999978 -0.00124999978 0 +DEAL::submit / sine values: 0 0 0 0 0 0 0 0 0 0 0 0 -0.00861111050 -0.000277776814 0 0 0 0 -0.00861111050 -0.000277776814 0 0 0 0 1.58494307 0.0207685003 -0.00861111050 -0.000277776814 -0.00861111050 -0.000277776814 0 0 DEAL:: Time: -9.50 , solution norm: 0.869590104 DEAL:: DEAL:: Performed 3 time steps.