]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Move FullMatrix::print into header file to make it visible for all template arguments...
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 7 Jun 2006 20:37:58 +0000 (20:37 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 7 Jun 2006 20:37:58 +0000 (20:37 +0000)
git-svn-id: https://svn.dealii.org/trunk@13194 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/news/changes.html
deal.II/lac/include/lac/full_matrix.h
deal.II/lac/include/lac/full_matrix.templates.h

index dcdd5cf4c84d3adf926e7d76e1a6c08df6cf15ae..e98b53af4a2001f37d0079d5176ab5b0e5bea643 100644 (file)
@@ -486,6 +486,17 @@ inconvenience this causes.
 
 <ol>
   
+  <li> <p>Fixed: The <code
+       class="class">FullMatrix::print</code> would yield a link error
+       when used with <code>std::ofstream</code> since an explicit
+       instantiation was missing. The function has now been moved to
+       the header file and made inline so that it is always visible,
+       whatever the type of the output stream is.
+       <br> 
+       (WB 2006/06/07)
+       </p>
+
+  
   <li> <p> Improved: The <code
        class="class">SparseDirectUMFPACK</code> solver can now also be
        used with sparse matrices with elements of type float, as well
index bbb148ed4381f18082a493017122517faa886c71..dc2792525becc7b4cb6f03d429021402671989a7 100644 (file)
@@ -1423,6 +1423,28 @@ FullMatrix<number>::end (const unsigned int r) const
   return const_iterator(this, r+1, 0);
 }
 
+
+
+template <typename number>
+template <class STREAM>
+inline
+void
+FullMatrix<number>::print (STREAM             &s,
+                          const unsigned int  w,
+                          const unsigned int  p) const
+{
+  Assert (!this->empty(), ExcEmptyMatrix());
+  
+  for (unsigned int i=0; i<this->m(); ++i)
+    {
+      for (unsigned int j=0; j<this->n(); ++j)
+       s << std::setw(w) << std::setprecision(p) << this->el(i,j);
+      s << std::endl;
+    }
+}
+
+
+
 #endif // DOXYGEN
 
 #endif
index d2928ae4ef7703dab97408d944b0a05c56101c00..138289cb25c8bacaa6e4c2e2074fa67f1fa1d58f 100644 (file)
@@ -1032,6 +1032,7 @@ number FullMatrix<number>::l1_norm () const
 }
 
 
+
 template <typename number>
 number FullMatrix<number>::linfty_norm () const
 {
@@ -1052,23 +1053,6 @@ number FullMatrix<number>::linfty_norm () const
 }
 
 
-template <typename number>
-template <class STREAM>
-void
-FullMatrix<number>::print (STREAM             &s,
-                          const unsigned int  w,
-                          const unsigned int  p) const
-{
-  Assert (!this->empty(), ExcEmptyMatrix());
-  
-  for (unsigned int i=0; i<this->m(); ++i)
-    {
-      for (unsigned int j=0; j<this->n(); ++j)
-       s << std::setw(w) << std::setprecision(p) << this->el(i,j);
-      s << std::endl;
-    }
-}
-
 
 template <typename number>
 template <typename number2>

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.