From 8925d03a02c326dfb0f81dc6733894df49089359 Mon Sep 17 00:00:00 2001 From: kanschat Date: Thu, 22 May 2014 20:20:24 +0000 Subject: [PATCH] adjust OutputOperator for AnyData git-svn-id: https://svn.dealii.org/trunk@32967 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/algorithms/operator.h | 2 +- .../deal.II/algorithms/operator.templates.h | 50 +++++++------------ 2 files changed, 18 insertions(+), 34 deletions(-) diff --git a/deal.II/include/deal.II/algorithms/operator.h b/deal.II/include/deal.II/algorithms/operator.h index 5dbe64a4b7..bad83a96dd 100644 --- a/deal.II/include/deal.II/algorithms/operator.h +++ b/deal.II/include/deal.II/algorithms/operator.h @@ -208,7 +208,7 @@ namespace Algorithms /** * @deprecated Output all the vectors in NamedData. */ - virtual OutputOperator &operator<< (const NamedData &vectors); + OutputOperator &operator<< (const NamedData &vectors); protected: unsigned int step; private: diff --git a/deal.II/include/deal.II/algorithms/operator.templates.h b/deal.II/include/deal.II/algorithms/operator.templates.h index eed6e1a984..0a941933ed 100644 --- a/deal.II/include/deal.II/algorithms/operator.templates.h +++ b/deal.II/include/deal.II/algorithms/operator.templates.h @@ -128,29 +128,27 @@ namespace Algorithms { if (os == 0) { - //TODO: make this possible - //deallog << ' ' << step; - //for (unsigned int i=0;iprint(deallog); - //deallog << std::endl; + deallog << "Step " << step << std::endl; + for (unsigned int i=0; i(i); + if (v == 0) continue; + for (unsigned int j=0; jsize(); ++j) + (*os) << ' ' << (*v)(j); + deallog << std::endl; + } + deallog << std::endl; } else { (*os) << ' ' << step; for (unsigned int i=0; i(i)) - { - const VECTOR& v = *vectors.entry(i); - for (unsigned int j=0; j(i)) - { - const VECTOR& v = *vectors.entry(i); - for (unsigned int j=0; j(i); + if (v == 0) continue; + for (unsigned int j=0; jsize(); ++j) + (*os) << ' ' << (*v)(j); + (*os) << std::endl; } (*os) << std::endl; } @@ -162,22 +160,8 @@ namespace Algorithms OutputOperator & OutputOperator::operator<< (const NamedData &vectors) { - if (os == 0) - { - //TODO: make this possible - //deallog << ' ' << step; - //for (unsigned int i=0;iprint(deallog); - //deallog << std::endl; - } - else - { - (*os) << ' ' << step; - for (unsigned int i=0; isize(); ++j) - (*os) << ' ' << (*vectors(i))(j); - (*os) << std::endl; - } + const AnyData newdata = vectors; + (*this) << newdata; return *this; } } -- 2.39.5