From a22138744072b3fcd039593532a6378aaa7530a3 Mon Sep 17 00:00:00 2001 From: young Date: Sun, 20 Oct 2013 15:58:53 +0000 Subject: [PATCH] Put in three tests that illustrate a dirty bug exactly. git-svn-id: https://svn.dealii.org/branches/branch_petscscalar_complex@31340 0785d39b-7218-0410-832d-ea1e28bc413d --- .../petsc_scalar_complex/sparse_matrix_01.cc | 83 ++++++++++++++++ .../sparse_matrix_01/cmp/generic | 8 ++ .../petsc_scalar_complex/sparse_matrix_02.cc | 94 +++++++++++++++++++ .../sparse_matrix_02/cmp/generic | 8 ++ tests/petsc_scalar_complex/vector_02.cc | 90 ++++++++++++++++++ .../vector_02/cmp/generic | 8 ++ 6 files changed, 291 insertions(+) create mode 100644 tests/petsc_scalar_complex/sparse_matrix_01.cc create mode 100644 tests/petsc_scalar_complex/sparse_matrix_01/cmp/generic create mode 100644 tests/petsc_scalar_complex/sparse_matrix_02.cc create mode 100644 tests/petsc_scalar_complex/sparse_matrix_02/cmp/generic create mode 100644 tests/petsc_scalar_complex/vector_02.cc create mode 100644 tests/petsc_scalar_complex/vector_02/cmp/generic diff --git a/tests/petsc_scalar_complex/sparse_matrix_01.cc b/tests/petsc_scalar_complex/sparse_matrix_01.cc new file mode 100644 index 0000000000..ed35aa432a --- /dev/null +++ b/tests/petsc_scalar_complex/sparse_matrix_01.cc @@ -0,0 +1,83 @@ +// --------------------------------------------------------------------- +// $Id sparse_matrix_01.cc +// +// 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 SparseMatrix::add(other, factor) + +#include "../tests.h" +#include +#include +#include +#include +#include + + +void test () +{ + const unsigned int s = 10; + PETScWrappers::SparseMatrix m(s,s,s); + for (unsigned int k=0; k +#include +#include +#include +#include + + +void test () +{ + const unsigned int s = 10; + PETScWrappers::SparseMatrix m(s,s,s); + for (unsigned int k=0; k +#include +#include +#include + + +void test () +{ + const unsigned int s = 10; + PETScWrappers::Vector v(s); + for (unsigned int k=0; k