From d35e227f06ab865651397bc67997703dcc839f92 Mon Sep 17 00:00:00 2001 From: bangerth Date: Thu, 23 Oct 2008 03:10:32 +0000 Subject: [PATCH] Update several tests. git-svn-id: https://svn.dealii.org/trunk@17310 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/trilinos/08.cc | 2 +- tests/trilinos/18.cc | 4 ++-- tests/trilinos/25.cc | 2 +- tests/trilinos/26.cc | 2 +- tests/trilinos/27.cc | 2 +- tests/trilinos/28.cc | 2 +- tests/trilinos/31.cc | 4 ++-- tests/trilinos/32.cc | 4 ++-- tests/trilinos/33.cc | 6 +++--- tests/trilinos/48.cc | 2 +- tests/trilinos/49.cc | 2 +- tests/trilinos/50.cc | 4 ++-- tests/trilinos/51.cc | 2 +- tests/trilinos/61.cc | 10 +++++----- tests/trilinos/70.cc | 6 +++--- tests/trilinos/full_matrix_08.cc | 2 +- tests/trilinos/full_matrix_vector_05.cc | 4 ++-- tests/trilinos/full_matrix_vector_06.cc | 4 ++-- tests/trilinos/sparse_matrix_vector_05.cc | 4 ++-- tests/trilinos/sparse_matrix_vector_06.cc | 4 ++-- tests/trilinos/vector_assign_02.cc | 2 +- 21 files changed, 37 insertions(+), 37 deletions(-) diff --git a/tests/trilinos/08.cc b/tests/trilinos/08.cc index cca957f515..9df997d40d 100644 --- a/tests/trilinos/08.cc +++ b/tests/trilinos/08.cc @@ -24,7 +24,7 @@ void test (TrilinosWrappers::SparseMatrix &m) { // first set a few entries. count how many // entries we have - PetscScalar norm = 0; + TrilinosScalar norm = 0; for (unsigned int i=0; i diff --git a/tests/trilinos/26.cc b/tests/trilinos/26.cc index 746618f1e0..3c5fbe5281 100644 --- a/tests/trilinos/26.cc +++ b/tests/trilinos/26.cc @@ -12,7 +12,7 @@ //---------------------------- trilinos_26.cc --------------------------- -// check TrilinosWrappers::Vector::operator = (PetscScalar) with setting to a +// check TrilinosWrappers::Vector::operator = (TrilinosScalar) with setting to a // nonzero value #include "../tests.h" diff --git a/tests/trilinos/27.cc b/tests/trilinos/27.cc index a61cb30be1..f7e2b99fd0 100644 --- a/tests/trilinos/27.cc +++ b/tests/trilinos/27.cc @@ -36,7 +36,7 @@ void test (TrilinosWrappers::Vector &v) // make sure they're equal deallog << v*w << ' ' << v.l2_norm() * w.l2_norm() << ' ' << v*w - v.l2_norm() * w.l2_norm() << std::endl; - const double eps=typeid(PetscScalar)==typeid(double) ? 1e-14 : 1e-5; + const double eps=typeid(TrilinosScalar)==typeid(double) ? 1e-14 : 1e-5; Assert (std::fabs(v*w - v.l2_norm() * w.l2_norm()) < eps*(v*w), ExcInternalError()); diff --git a/tests/trilinos/28.cc b/tests/trilinos/28.cc index 207305a7f3..fb2edc2df3 100644 --- a/tests/trilinos/28.cc +++ b/tests/trilinos/28.cc @@ -38,7 +38,7 @@ void test (TrilinosWrappers::Vector &v) // make sure they're equal deallog << v*w << ' ' << v.l2_norm() * w.l2_norm() << ' ' << v*w - v.l2_norm() * w.l2_norm() << std::endl; - const double eps=typeid(PetscScalar)==typeid(double) ? 1e-14 : 1e-5; + const double eps=typeid(TrilinosScalar)==typeid(double) ? 1e-14 : 1e-5; Assert (std::fabs(v*w - v.l2_norm() * w.l2_norm()) < eps*(v*w), ExcInternalError()); diff --git a/tests/trilinos/31.cc b/tests/trilinos/31.cc index 3003e8a74b..f3740039cb 100644 --- a/tests/trilinos/31.cc +++ b/tests/trilinos/31.cc @@ -24,7 +24,7 @@ void test (TrilinosWrappers::Vector &v) { // set some elements of the vector - PetscScalar norm = 0; + TrilinosScalar norm = 0; for (unsigned int i=0; i (1./3.)); + const double eps=typeid(TrilinosScalar)==typeid(double) ? 1e-14 : 1e-5; + const double true_value=std::pow(sum, static_cast (1./3.)); Assert (std::fabs(v.lp_norm(3) - true_value) < eps*true_value, ExcInternalError()); diff --git a/tests/trilinos/48.cc b/tests/trilinos/48.cc index 6dc840d9fe..1c854d98fb 100644 --- a/tests/trilinos/48.cc +++ b/tests/trilinos/48.cc @@ -39,7 +39,7 @@ void test (TrilinosWrappers::Vector &v, v.ratio (w, x); // make sure we get the expected result - const double eps=typeid(PetscScalar)==typeid(double) ? 1e-14 : 1e-5; + const double eps=typeid(TrilinosScalar)==typeid(double) ? 1e-14 : 1e-5; for (unsigned int i=0; i w (v.size()); + Vector w (v.size()); for (unsigned int i=0; i) with T!=PetscScalar +// check TrilinosWrappers::operator = (Vector) with T!=TrilinosScalar #include "../tests.h" #include @@ -38,7 +38,7 @@ void test (TrilinosWrappers::Vector &v) // and do the same. in at least one of the // two cases, the template argument to // Vector must be different from - // PetscScalar + // TrilinosScalar v = w; for (unsigned int i=0; i w; w=v; - Vector x; x=v; + Vector w(v.size()); w=v; + Vector x(v.size()); x=v; - TrilinosWrappers::Vector w1; w1=w; - TrilinosWrappers::Vector x1; x1=x; + TrilinosWrappers::Vector w1(v.size()); w1=w; + TrilinosWrappers::Vector x1(v.size()); x1=x; for (unsigned int i=0; i @@ -27,9 +27,9 @@ int main () deallog.depth_console(0); deallog.threshold_double(1.e-10); - if (typeid(PetscScalar)==typeid(double)) + if (typeid(TrilinosScalar)==typeid(double)) deallog << "double" << std::endl; - else if (typeid(PetscScalar)==typeid(float)) + else if (typeid(TrilinosScalar)==typeid(float)) deallog << "float" << std::endl; else Assert(false, ExcNotImplemented()); diff --git a/tests/trilinos/full_matrix_08.cc b/tests/trilinos/full_matrix_08.cc index 586c1650f4..2c14a8b95c 100644 --- a/tests/trilinos/full_matrix_08.cc +++ b/tests/trilinos/full_matrix_08.cc @@ -24,7 +24,7 @@ void test (TrilinosWrappers::FullMatrix &m) { // first set a few entries. count how many // entries we have - PetscScalar norm = 0; + TrilinosScalar norm = 0; for (unsigned int i=0; i - const PetscScalar s = m.matrix_scalar_product (w,v); + const TrilinosScalar s = m.matrix_scalar_product (w,v); // make sure we get the expected result for (unsigned int i=0; i - const PetscScalar s = m.matrix_norm_square (v); + const TrilinosScalar s = m.matrix_norm_square (v); // make sure we get the expected result for (unsigned int i=0; i - const PetscScalar s = m.matrix_scalar_product (w,v); + const TrilinosScalar s = m.matrix_scalar_product (w,v); // make sure we get the expected result for (unsigned int i=0; i - const PetscScalar s = m.matrix_norm_square (v); + const TrilinosScalar s = m.matrix_norm_square (v); // make sure we get the expected result for (unsigned int i=0; i