From 44cf4e2dbcd70d2488e1cf8c3a27454662b4b9ea Mon Sep 17 00:00:00 2001 From: Guido Kanschat Date: Tue, 10 Feb 2004 12:34:20 +0000 Subject: [PATCH] new print function git-svn-id: https://svn.dealii.org/trunk@8452 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/include/lac/sparsity_pattern.h | 8 +++++--- deal.II/lac/source/sparsity_pattern.cc | 9 ++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/deal.II/lac/include/lac/sparsity_pattern.h b/deal.II/lac/include/lac/sparsity_pattern.h index a70c8bc0f0..4f41ba1d91 100644 --- a/deal.II/lac/include/lac/sparsity_pattern.h +++ b/deal.II/lac/include/lac/sparsity_pattern.h @@ -780,9 +780,11 @@ class SparsityPattern : public Subscriptor /** * Print the sparsity of the * matrix. The output consists of - * terms [i,j] for each - * allocated entry. No linefeeds - * are added. + * one line per row of the format + * [i,j1,j2,j3,...]. i + * is the row number and + * jn are the allocated + * columns in this row. */ void print (std::ostream &out) const; diff --git a/deal.II/lac/source/sparsity_pattern.cc b/deal.II/lac/source/sparsity_pattern.cc index aa3aa9007f..f99b09d698 100644 --- a/deal.II/lac/source/sparsity_pattern.cc +++ b/deal.II/lac/source/sparsity_pattern.cc @@ -758,7 +758,14 @@ void SparsityPattern::print (std::ostream &out) const { Assert ((rowstart!=0) && (colnums!=0), ExcEmptyObject()); - const_iterator e = begin(); + for (unsigned int i=0; i