From bf942bd291e44d9078925622702438cc0b28d38d Mon Sep 17 00:00:00 2001 From: heister Date: Fri, 3 Dec 2010 22:53:42 +0000 Subject: [PATCH] New test for PETSc vectors. git-svn-id: https://svn.dealii.org/trunk@22915 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/petsc/vector_wrap_01.cc | 93 ++++++++++++++++++++++++++ tests/petsc/vector_wrap_01/cmp/generic | 2 + 2 files changed, 95 insertions(+) create mode 100644 tests/petsc/vector_wrap_01.cc create mode 100644 tests/petsc/vector_wrap_01/cmp/generic diff --git a/tests/petsc/vector_wrap_01.cc b/tests/petsc/vector_wrap_01.cc new file mode 100644 index 0000000000..3fd91b0957 --- /dev/null +++ b/tests/petsc/vector_wrap_01.cc @@ -0,0 +1,93 @@ +//---------------------------- petsc_vector_assign_01.cc --------------------------- +// $Id: vector_assign_01.cc 17443 2008-10-31 19:25:47Z bangerth $ +// Version: $Name$ +// +// Copyright (C) 2004, 2005 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. +// +//---------------------------- petsc_vector_assign_01.cc --------------------------- + + +// Test the constructor PETScWrappers::Vector(const Vec &) that takes an +// existing PETSc vector. + +#include "../tests.h" +#include +#include +#include +#include + + +void test (PETScWrappers::Vector &v, + PETScWrappers::Vector &w) +{ + // set the first vector + for (unsigned int i=0; i