From: young Date: Sat, 19 Oct 2013 19:08:07 +0000 (+0000) Subject: Test print a complex vector. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eaf3316152b192511634f601d3f9bd70a2a6b2bb;p=dealii-svn.git Test print a complex vector. git-svn-id: https://svn.dealii.org/branches/branch_petscscalar_complex@31322 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/petsc_scalar_complex/vector_print.cc b/tests/petsc_scalar_complex/vector_print.cc new file mode 100644 index 0000000000..a2d793b474 --- /dev/null +++ b/tests/petsc_scalar_complex/vector_print.cc @@ -0,0 +1,77 @@ +// --------------------------------------------------------------------- +// $Id: vector_print.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. +// +// --------------------------------------------------------------------- + + + +// verify that VectorBase::print uses the precision parameter correctly and +// restores the previous value of the stream precision + +#include "../tests.h" +#include +#include +#include +#include + + +int main (int argc, char **argv) +{ + std::ofstream logfile("vector_print/output"); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + try + { + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); + { + PETScWrappers::Vector v (5); + for (unsigned int k=0; k