From: Wolfgang Bangerth Date: Thu, 16 Jul 2009 04:10:49 +0000 (+0000) Subject: Add the forgotten output operator. X-Git-Tag: v8.0.0~7470 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6283a4e51d6ecf3a2746933283ad9f85ad617e3f;p=dealii.git Add the forgotten output operator. git-svn-id: https://svn.dealii.org/trunk@19091 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/include/base/tensor_base.h b/deal.II/base/include/base/tensor_base.h index 7ee19d626c..103c6fe14c 100644 --- a/deal.II/base/include/base/tensor_base.h +++ b/deal.II/base/include/base/tensor_base.h @@ -1178,6 +1178,22 @@ Tensor<1,dim>::memory_consumption () #endif // DOXYGEN +/** + * Output operator for tensors of rank 0. Since such tensors are + * scalars, we simply print this one value. + * + * @relates Tensor<0,dim> + */ +template +inline +std::ostream & operator << (std::ostream &out, const Tensor<0,dim> &p) +{ + out << static_cast(p); + return out; +} + + + /** * Output operator for tensors of rank 1. Print the elements * consecutively, with a space in between.