From e47f9fcc18f281da3bf757ad33f794262bd5344f Mon Sep 17 00:00:00 2001 From: bangerth Date: Mon, 29 Jun 2009 09:37:29 +0000 Subject: [PATCH] Take over a test from mainline. git-svn-id: https://svn.dealii.org/branches/releases/Branch-6-2@18993 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/trilinos/49b.cc | 108 +++++++++++++++++++++++++++++++++ tests/trilinos/49b/cmp/generic | 2 + 2 files changed, 110 insertions(+) create mode 100644 tests/trilinos/49b.cc create mode 100644 tests/trilinos/49b/cmp/generic diff --git a/tests/trilinos/49b.cc b/tests/trilinos/49b.cc new file mode 100644 index 0000000000..98cab09c6b --- /dev/null +++ b/tests/trilinos/49b.cc @@ -0,0 +1,108 @@ +//---------------------------- 49b.cc --------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2004, 2005, 2008, 2009 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------- 49b.cc --------------------------- + + +// like 49, but do the test for +// TrilinosWrappers::MPI::BlockVector +// ::operator = (dealii::BlockVector) +// with block vectors instead of plain vectors + +#include "../tests.h" +#include +#include +#include +#include +#include +#include + + +void test (TrilinosWrappers::MPI::BlockVector &v) +{ + std::vector sizes (2, 3); + dealii::BlockVector w (sizes); + + for (unsigned int i=0; i sizes; + Epetra_Map map(3, 3, 0, Utilities::Trilinos::comm_world()); + sizes.push_back (map); + sizes.push_back (map); + + TrilinosWrappers::MPI::BlockVector v (sizes); + test (v); + } + } + catch (std::exception &exc) + { + std::cerr << std::endl << std::endl + << "----------------------------------------------------" + << std::endl; + std::cerr << "Exception on processing: " << std::endl + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + + return 1; + } + catch (...) + { + std::cerr << std::endl << std::endl + << "----------------------------------------------------" + << std::endl; + std::cerr << "Unknown exception!" << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; + }; +} diff --git a/tests/trilinos/49b/cmp/generic b/tests/trilinos/49b/cmp/generic new file mode 100644 index 0000000000..0fd8fc12f0 --- /dev/null +++ b/tests/trilinos/49b/cmp/generic @@ -0,0 +1,2 @@ + +DEAL::OK -- 2.39.5