<ol>
<li>
<p>
- Fixed: There is now a function CompressedSparsityPattern::print, in analogy
- to SparsityPattern::print
+ Fixed: There are now functions CompressedSparsityPattern::print and
+ CompressedSetSparsityPattern::print, in analogy
+ to SparsityPattern::print .
<br>
(WB 2008/07/31)
<li>
*/
void symmetrize ();
+ /**
+ * Print the sparsity of the
+ * matrix. The output consists of
+ * one line per row of the format
+ * <tt>[i,j1,j2,j3,...]</tt>. <i>i</i>
+ * is the row number and
+ * <i>jn</i> are the allocated
+ * columns in this row.
+ */
+ void print (std::ostream &out) const;
+
/**
* Print the sparsity of the matrix in a
* format that @p gnuplot understands and
// $Id: compressed_sparsity_pattern.cc 14038 2006-10-23 02:46:34Z bangerth $
// Version: $Name$
//
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2008 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
+void
+CompressedSetSparsityPattern::print (std::ostream &out) const
+{
+ AssertThrow (out, ExcIO());
+
+ for (unsigned int row=0; row<rows; ++row)
+ {
+ out << '[' << row << ' ';
+
+ for (std::set<unsigned int>::const_iterator
+ j=lines[row].entries.begin();
+ j != lines[row].entries.end(); ++j)
+ out << *j << ' ';
+
+ out << ']' << std::endl;
+ }
+
+ AssertThrow (out, ExcIO());
+}
+
+
+
void
CompressedSetSparsityPattern::print_gnuplot (std::ostream &out) const
{
+ AssertThrow (out, ExcIO());
+
for (unsigned int row=0; row<rows; ++row)
{
for (std::set<unsigned int>::const_iterator