From 3f1afcddcd4b2d1dd16c343c1a9c007ce8f803f0 Mon Sep 17 00:00:00 2001 From: kanschat Date: Tue, 12 Oct 2010 14:40:06 +0000 Subject: [PATCH] Add a print function to log the whole block info git-svn-id: https://svn.dealii.org/trunk@22301 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/include/dofs/block_info.h | 42 +++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/deal.II/deal.II/include/dofs/block_info.h b/deal.II/deal.II/include/dofs/block_info.h index 3cde99c259..8d6fed91ff 100644 --- a/deal.II/deal.II/include/dofs/block_info.h +++ b/deal.II/deal.II/include/dofs/block_info.h @@ -17,6 +17,8 @@ #include #include +#include + DEAL_II_NAMESPACE_OPEN // Forward declarations @@ -172,6 +174,14 @@ class BlockInfo : public Subscriptor */ unsigned int base_element(unsigned int i) const; + /** + * Write a summary of the block + * structure to the stream. + */ + template + void + print(OS& stream) const; + /** * Determine an estimate for the * memory consumption (in bytes) @@ -270,6 +280,38 @@ BlockInfo::n_base_elements() const +template +inline +void +BlockInfo::print (OS& os) const +{ + os << "global dofs " << std::setw(5) << global().total_size() << " blocks"; + for (unsigned int i=0;i