]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
implementation of print_formatted function. similar to one in BlockVector.
authorbrian <brian@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 2 Jun 2003 13:54:39 +0000 (13:54 +0000)
committerbrian <brian@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 2 Jun 2003 13:54:39 +0000 (13:54 +0000)
git-svn-id: https://svn.dealii.org/trunk@7719 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/block_sparse_matrix.templates.h

index 9673f891f02eb5978754b5b9124a16334bea363e..c9adb4785be7fe2ca2e8d1fd0b90640e68cfcf96 100644 (file)
@@ -176,6 +176,26 @@ BlockSparseMatrix<number>::get_sparsity_pattern () const
 }
 
 
+template <typename number>
+void 
+BlockSparseMatrix<number>::print_formatted (std::ostream       &out,
+                                           const unsigned int  precision,
+                                           const bool          scientific,
+                                           const unsigned int  width,
+                                           const char         *zero_string,
+                                           const double        denominator) const
+{
+  for (unsigned int r=0;r<rows;++r)
+  {
+    for (unsigned int c=0;c<columns;++c)
+    {
+      out << "Component (" << r << "," << c << ")" << std::endl;
+      block(r,c).print_formatted (out, precision, scientific, width, zero_string, denominator);
+    } 
+  } 
+}
+
+
 template <typename number>
 unsigned int
 BlockSparseMatrix<number>::memory_consumption () const

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.