From c9c0de96b37a793525b3776bbd0510081cb9fb76 Mon Sep 17 00:00:00 2001 From: young Date: Sun, 20 Oct 2013 14:34:16 +0000 Subject: [PATCH] Cleanup attributes and let one failing test through. git-svn-id: https://svn.dealii.org/branches/branch_petscscalar_complex@31337 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/petsc_scalar_complex/13.cc | 93 +++++++++++++++++++ .../petsc_scalar_complex/solver_real_03_mf.cc | 4 +- 2 files changed, 95 insertions(+), 2 deletions(-) create mode 100644 tests/petsc_scalar_complex/13.cc diff --git a/tests/petsc_scalar_complex/13.cc b/tests/petsc_scalar_complex/13.cc new file mode 100644 index 0000000000..0335f2e04b --- /dev/null +++ b/tests/petsc_scalar_complex/13.cc @@ -0,0 +1,93 @@ +// --------------------------------------------------------------------- +// $Id: +// +// Copyright (C) 2013 by the deal.II authors +// +// This file is part of the deal.II library. +// +// The deal.II library is free software; you can use it, redistribute +// it, and/or modify it under the terms of the GNU Lesser General +// Public License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// The full text of the license can be found in the file LICENSE at +// the top level of the deal.II distribution. +// +// --------------------------------------------------------------------- + + + +// check PETScWrappers::Vector::operator() in add-mode + +#include "../tests.h" +#include +#include +#include +#include + + +void test (PETScWrappers::Vector &v) +{ + // set only certain elements of the vector. have a bit pattern of + // where we actually wrote elements to + std::vector pattern (v.size(), false); + for (unsigned int i=0; i (1.,1.)) ) || + ( (pattern[i]==false) ), + ExcInternalError()); + + deallog << "OK" << std::endl; +} + + + +int main (int argc,char **argv) +{ + std::ofstream logfile("13/output"); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + try + { + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); + { + PETScWrappers::Vector v (100); + 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/petsc_scalar_complex/solver_real_03_mf.cc b/tests/petsc_scalar_complex/solver_real_03_mf.cc index ad816220e6..c4979a16c7 100644 --- a/tests/petsc_scalar_complex/solver_real_03_mf.cc +++ b/tests/petsc_scalar_complex/solver_real_03_mf.cc @@ -1,7 +1,7 @@ // --------------------------------------------------------------------- -// $Id: solver_03_mf.cc 30045 2013-07-18 19:18:00Z maier $ +// $Id: solver_03_mf.cc // -// Copyright (C) 2004 - 2013 by the deal.II authors +// Copyright (C) 2013 by the deal.II authors // // This file is part of the deal.II library. // -- 2.39.5