]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add print function to dvector.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 11 Mar 1998 11:17:57 +0000 (11:17 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 11 Mar 1998 11:17:57 +0000 (11:17 +0000)
git-svn-id: https://svn.dealii.org/trunk@53 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/dvector.h
deal.II/lac/source/dvector.cc

index 91456b8b0919daf16c4088f862de235561935dfd..7dd92527404a249c741a0fb93815785152aea73d 100644 (file)
@@ -253,6 +253,11 @@ class dVector : public VectorBase
                                      *  Output of vector in user-defined format.
                                      */
     void print(const char* format = 0) const;
+
+                                    /**
+                                     * Print to given stream, one element per line.
+                                     */
+    void print (ostream &) const;
                                     //@}
 
                                     /**
index 5a0d1986b32bc9782aba0a080601c534bc65521b..2ab715f7777acf57d0f86bfdaa90146a23131e33 100644 (file)
@@ -261,3 +261,10 @@ void dVector::print(const char* format) const
   for (int j=0;j<n();j++) printf (format, val[j]);
   printf ("\n");
 }
+
+
+
+void dVector::print (ostream &out) const {
+  for (int i=0; i<n(); ++i)
+    out << val[i] << endl;
+};

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.