From: guido Date: Tue, 10 Feb 2004 12:34:20 +0000 (+0000) Subject: new print function X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a2ca7e507fa7b0cc6077866b569864ab786c0af;p=dealii-svn.git new print function git-svn-id: https://svn.dealii.org/trunk@8452 0785d39b-7218-0410-832d-ea1e28bc413d --- 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