From bfd3e15b1b889a0d05468170ac429338ab5ae54e Mon Sep 17 00:00:00 2001 From: bangerth Date: Wed, 27 Mar 2013 11:44:16 +0000 Subject: [PATCH] Fix up a few tests. git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@29062 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/trilinos/65.cc | 19 ++++++++++--------- tests/trilinos/slowness_03.cc | 21 +++++++++++---------- tests/trilinos/slowness_04.cc | 29 +++++++++++++++-------------- tests/trilinos/sparse_matrix_02.cc | 5 ++++- tests/trilinos/sparse_matrix_04.cc | 4 +++- 5 files changed, 43 insertions(+), 35 deletions(-) diff --git a/tests/trilinos/65.cc b/tests/trilinos/65.cc index 3c61d1b109..30ac8c08d3 100644 --- a/tests/trilinos/65.cc +++ b/tests/trilinos/65.cc @@ -1,8 +1,8 @@ //---------------------------- trilinos_65.cc --------------------------- // $Id$ -// Version: $Name$ +// Version: $Name$ // -// Copyright (C) 2004, 2005, 2008 by the deal.II authors +// Copyright (C) 2004, 2005, 2008, 2013 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -15,7 +15,7 @@ // This test used to fail after upgrading to petsc 2.2.1 -#include "../tests.h" +#include "../tests.h" #include #include @@ -26,8 +26,9 @@ void test () { - TrilinosWrappers::MPI::Vector - v (Epetra_Map(100,0,Utilities::Trilinos::comm_world())); + TrilinosWrappers::MPI::Vector + v (Epetra_Map(TrilinosWrappers::types::int_type(100),0, + Utilities::Trilinos::comm_world())); v(0) = 1; v = 0; @@ -36,12 +37,12 @@ void test () -int main (int argc,char **argv) +int main (int argc,char **argv) { std::ofstream logfile("65/output"); deallog.attach(logfile); deallog.depth_console(0); - deallog.threshold_double(1.e-10); + deallog.threshold_double(1.e-10); Utilities::MPI::MPI_InitFinalize mpi_initialization (argc, argv); @@ -62,10 +63,10 @@ int main (int argc,char **argv) << "Aborting!" << std::endl << "----------------------------------------------------" << std::endl; - + return 1; } - catch (...) + catch (...) { std::cerr << std::endl << std::endl << "----------------------------------------------------" diff --git a/tests/trilinos/slowness_03.cc b/tests/trilinos/slowness_03.cc index 19fcbf64b6..77a28ced2a 100644 --- a/tests/trilinos/slowness_03.cc +++ b/tests/trilinos/slowness_03.cc @@ -1,8 +1,8 @@ //---------------------------- trilinos_slowness_03.cc --------------------------- // $Id$ -// Version: $Name$ +// Version: $Name$ // -// Copyright (C) 2005 by the deal.II authors +// Copyright (C) 2005, 2013 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -19,7 +19,7 @@ // // the tests build the 5-point stencil matrix for a uniform grid of size N*N -#include "../tests.h" +#include "../tests.h" #include #include #include @@ -32,8 +32,9 @@ void test () { const unsigned int N = 200; - // build the sparse matrix - Epetra_Map map (static_cast(N*N), 0, Utilities::Trilinos::comm_world()); + // build the sparse matrix + Epetra_Map map (TrilinosWrappers::types::int_type(N*N), 0, + Utilities::Trilinos::comm_world()); TrilinosWrappers::SparseMatrix matrix (map, 5); for(unsigned int i=0; i #include #include @@ -52,23 +52,24 @@ void test () // unused indices const unsigned int k = rand() % (N-i); permutation[i] = unused_indices[k]; - + // then swap this used element to the // end where we won't consider it any // more std::swap (unused_indices[k], unused_indices[N-i-1]); - } + } } - - // build the sparse matrix - Epetra_Map map (static_cast(N*N), 0, Utilities::Trilinos::comm_world()); + + // build the sparse matrix + Epetra_Map map (TrilinosWrappers::types::int_type(N*N), 0, + Utilities::Trilinos::comm_world()); TrilinosWrappers::SparseMatrix matrix (map, 5); for(unsigned int i_=0; i_0) @@ -93,7 +94,7 @@ void test () } } matrix.compress (); - + // then do a single matrix-vector // multiplication with subsequent formation // of the matrix norm @@ -102,13 +103,13 @@ void test () for (unsigned int i=0; i