From: kronbichler Date: Thu, 17 Apr 2014 05:30:37 +0000 (+0000) Subject: Also compare correctness in release mode by replacing Assert by AssertThrow X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=571cea3282fa555c3fa4f953d589265b04af0d49;p=dealii-svn.git Also compare correctness in release mode by replacing Assert by AssertThrow git-svn-id: https://svn.dealii.org/trunk@32785 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/base/vectorization_01.cc b/tests/base/vectorization_01.cc index bb2e43046f..4d02ddadda 100644 --- a/tests/base/vectorization_01.cc +++ b/tests/base/vectorization_01.cc @@ -39,54 +39,54 @@ void test () deallog << "Addition: "; VectorizedArray d = a + b; for (unsigned int i=0; i e = d - b; for (unsigned int i=0; i::epsilon(), ExcInternalError()); @@ -95,53 +95,54 @@ void test () d = -c; d = std::abs(d); for (unsigned int i=0; i::epsilon(), - ExcInternalError()); + AssertThrow (std::fabs(e[i]-std::sin(b[i])) < + 10.*std::numeric_limits::epsilon(), + ExcInternalError()); deallog << "OK" << std::endl << "Cosine: "; e = std::cos(c); for (unsigned int i=0; i::epsilon(), - ExcInternalError()); + AssertThrow (std::fabs(e[i]-std::cos(c[i])) < + 10.*std::numeric_limits::epsilon(), + ExcInternalError()); deallog << "OK" << std::endl << "Tangent: "; d = std::tan(e); for (unsigned int i=0; i::epsilon(), - ExcInternalError()); + AssertThrow (std::fabs(d[i]-std::tan(e[i])) < + 10.*std::numeric_limits::epsilon(), + ExcInternalError()); deallog << "OK" << std::endl << "Exponential: "; d = std::exp(c-a); for (unsigned int i=0; i::epsilon(), - ExcInternalError()); + AssertThrow (std::fabs(d[i]-std::exp(c[i]-a[i])) < + 10.*std::numeric_limits::epsilon(), + ExcInternalError()); deallog << "OK" << std::endl << "Logarithm: "; e = std::log(d); for (unsigned int i=0; i::epsilon(), - ExcInternalError()); + AssertThrow (std::fabs(e[i]-(c[i]-a[i])) < + 10.*std::numeric_limits::epsilon(), + ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/base/vectorization_02.cc b/tests/base/vectorization_02.cc index 19ecfd625d..1e3f4fc0e6 100644 --- a/tests/base/vectorization_02.cc +++ b/tests/base/vectorization_02.cc @@ -35,7 +35,7 @@ void test () deallog << "Constructor: "; for (unsigned int i=0; i