]> https://gitweb.dealii.org/ - dealii.git/commitdiff
allow writing Tensor to LogStream
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Wed, 11 Feb 2004 10:27:04 +0000 (10:27 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Wed, 11 Feb 2004 10:27:04 +0000 (10:27 +0000)
git-svn-id: https://svn.dealii.org/trunk@8457 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/tensor.h

index 752c7a1ba53a17f40d391af2945f31ed850ea335..31fbf27c818f2ba1792d27f12777b21ca928f489 100644 (file)
@@ -402,10 +402,12 @@ Tensor<rank_,dim>::memory_consumption ()
  * Output operator for tensors. Print the elements consecutively, with
  * a space in between, two spaces between rank 1 subtensors, three
  * between rank 2 and so on.
+ *
+ * @relates Tensor
  */
-template <int rank_, int dim>
+template <class STREAM, int rank_, int dim>
 inline
-std::ostream & operator << (std::ostream &out, const Tensor<rank_,dim> &p)
+STREAM & operator << (STREAM &out, const Tensor<rank_,dim> &p)
 {
   for (unsigned int i=0; i<dim-1; ++i)
     out << p[i] << ' ';

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.