From 6abcb8ea738c431bf2b5cb6618dc8dd3bc2136e1 Mon Sep 17 00:00:00 2001 From: young Date: Sat, 19 Oct 2013 18:23:03 +0000 Subject: [PATCH] Check l1- and l2-norm of complex vectors. Ignore test generated files. git-svn-id: https://svn.dealii.org/branches/branch_petscscalar_complex@31320 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/petsc_scalar_complex/17.cc | 87 +++++++++++++++++++++ tests/petsc_scalar_complex/17/cmp/generic | 2 + tests/petsc_scalar_complex/18.cc | 92 +++++++++++++++++++++++ tests/petsc_scalar_complex/18/cmp/generic | 2 + 4 files changed, 183 insertions(+) create mode 100644 tests/petsc_scalar_complex/17.cc create mode 100644 tests/petsc_scalar_complex/17/cmp/generic create mode 100644 tests/petsc_scalar_complex/18.cc create mode 100644 tests/petsc_scalar_complex/18/cmp/generic diff --git a/tests/petsc_scalar_complex/17.cc b/tests/petsc_scalar_complex/17.cc new file mode 100644 index 0000000000..8625638b20 --- /dev/null +++ b/tests/petsc_scalar_complex/17.cc @@ -0,0 +1,87 @@ +// --------------------------------------------------------------------- +// $Id: 17.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 PETScWrappers::Vector::l1_norm() + +#include "../tests.h" +#include +#include +#include +#include + + +void test (PETScWrappers::Vector &v) +{ + // set some elements of the vector + double norm = 0; + for (unsigned int k=0; k +#include +#include +#include + + +void test (PETScWrappers::Vector &v) +{ + // set some elements of the vector + double norm = 0; + for (unsigned int k=0; k