From: young Date: Sat, 19 Oct 2013 14:40:33 +0000 (+0000) Subject: Another matrix element access test. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=efa52e8f81b19230409f1faeb4a5ae659c35534c;p=dealii-svn.git Another matrix element access test. git-svn-id: https://svn.dealii.org/branches/branch_petscscalar_complex@31316 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/petsc_scalar_complex/element_access_03.cc b/tests/petsc_scalar_complex/element_access_03.cc new file mode 100644 index 0000000000..fbed258e9c --- /dev/null +++ b/tests/petsc_scalar_complex/element_access_03.cc @@ -0,0 +1,119 @@ + +// --------------------------------------------------------------------- +// $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. +// +// --------------------------------------------------------------------- + + +// deal.II includes +#include "../tests.h" +#include +#include + +#include +#include +#include + +#include + +// test read/write element access using unsigned int and double. + + +// sparse matrix elements +void test_matrix (PETScWrappers::SparseMatrix &m) +{ + deallog << "Check matrix access" << std::endl; + + const double r = dealii::numbers::PI; + const double i = -1.*dealii::numbers::PI; + + // fill up a matrix with some numbers + for (unsigned int k=0; k