From: Martin Kronbichler Date: Wed, 13 Jan 2010 16:27:48 +0000 (+0000) Subject: One more fix when PETSc is used. X-Git-Tag: v8.0.0~6630 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47c07289ad4e5d151f13ad37f3bfc22295380770;p=dealii.git One more fix when PETSc is used. git-svn-id: https://svn.dealii.org/trunk@20364 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/petsc_block_vector.h b/deal.II/lac/include/lac/petsc_block_vector.h index c526cbf449..94b6d2793e 100644 --- a/deal.II/lac/include/lac/petsc_block_vector.h +++ b/deal.II/lac/include/lac/petsc_block_vector.h @@ -291,6 +291,14 @@ namespace PETScWrappers */ void swap (BlockVector &v); + /** + * Print to a stream. + */ + void print (std::ostream &out, + const unsigned int precision = 3, + const bool scientific = true, + const bool across = true) const; + /** @addtogroup Exceptions * @{ */ @@ -463,6 +471,23 @@ namespace PETScWrappers } + + void BlockVector::print (std::ostream &out, + const unsigned int precision, + const bool scientific, + const bool across) const + { + for (unsigned int i=0;in_blocks();++i) + { + if (across) + out << 'C' << i << ':'; + else + out << "Component " << i << std::endl; + this->components[i].print(out, precision, scientific, across); + } + } + + /**