From: wolf Date: Sun, 29 Feb 2004 20:49:14 +0000 (+0000) Subject: new tests. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5ed05450d8361be8694a38f51a71144604a8b91;p=dealii-svn.git new tests. git-svn-id: https://svn.dealii.org/trunk@8620 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/bits/petsc_57.cc b/tests/bits/petsc_57.cc new file mode 100644 index 0000000000..1da34b557e --- /dev/null +++ b/tests/bits/petsc_57.cc @@ -0,0 +1,90 @@ +//---------------------------- petsc_57.cc --------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2004 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_57.cc --------------------------- + + +// check PETScWrappers::Vector::is_non_zero + +#include "../tests.h" +#include +#include +#include +#include + + +void test (PETScWrappers::Vector &v) +{ + // set only certain elements of the + // vector. they are all positive + std::vector pattern (v.size(), false); + for (unsigned int i=0; i +#include + +#include +#include +#include + + +void test (PETScWrappers::Vector &v) +{ + // set only certain elements of the + // vector. + std::vector pattern (v.size(), false); + for (unsigned int i=0; i w (v); + Vector x (v); + + for (unsigned int i=0; i +#include + +#include +#include +#include + + +void test (PETScWrappers::Vector &v) +{ + // set only certain elements of the + // vector. + std::vector pattern (v.size(), false); + for (unsigned int i=0; i w (v); + Vector x (v); + + PETScWrappers::Vector w1 (w); + PETScWrappers::Vector x1 (x); + + for (unsigned int i=0; i +#include + +#include +#include +#include + + +void test (PETScWrappers::Vector &v) +{ + // set only certain elements of the + // vector. + std::vector pattern (v.size(), false); + for (unsigned int i=0; i w; w=v; + Vector x; x=v; + + for (unsigned int i=0; i +#include + +#include +#include +#include + + +void test (PETScWrappers::Vector &v) +{ + // set only certain elements of the + // vector. + std::vector pattern (v.size(), false); + for (unsigned int i=0; i w; w=v; + Vector x; x=v; + + PETScWrappers::Vector w1; w1=w; + PETScWrappers::Vector x1; x1=x; + + for (unsigned int i=0; i