From 6283a4e51d6ecf3a2746933283ad9f85ad617e3f Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 16 Jul 2009 04:10:49 +0000 Subject: [PATCH] Add the forgotten output operator. git-svn-id: https://svn.dealii.org/trunk@19091 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/include/base/tensor_base.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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. -- 2.39.5